diff --git a/css/app.4d7f7a7f.css b/css/app.eb999aee.css similarity index 60% rename from css/app.4d7f7a7f.css rename to css/app.eb999aee.css index af9d21a..b8dda46 100644 --- a/css/app.4d7f7a7f.css +++ b/css/app.eb999aee.css @@ -1 +1 @@ -.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)}.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)}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,.5);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{transform:scale(1.1)}.layer-container[data-v-66dc9e3e]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-66dc9e3e]: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-66dc9e3e]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-66dc9e3e]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:0;padding-top:55px;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized div[data-v-66dc9e3e]{margin:0;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-66dc9e3e]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-66dc9e3e]{padding-bottom:0}.modal-body .layer-tab[data-v-66dc9e3e]:not(.hasSubtabs){padding-top:0}.minimize[data-v-66dc9e3e]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;width: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;padding:0;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-66dc9e3e]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-66dc9e3e]{position:absolute;top:0;left:20px;background-color:transparent;border:1px solid transparent;color:var(--foreground);font-size:40px;cursor:pointer;line-height:40px;z-index:7}.goBack[data-v-66dc9e3e]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}details[data-v-5f8298e6]{margin:10px 0;padding-left:18px}summary[data-v-5f8298e6]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-5f8298e6]{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-5f8298e6]{margin:8px 0}li[data-v-5f8298e6]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-5f8298e6]:before{content:"Feature";background:var(--accent1)}.fix[data-v-5f8298e6]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-5f8298e6]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-5f8298e6]:before{content:"Breaking";background:var(--danger)}.info-modal-header[data-v-3eb46986]{display:flex;margin:-20px;margin-bottom:0;background:var(--raised-background);align-items:center}.info-modal-header [data-v-3eb46986]{margin:0}.info-modal-logo[data-v-3eb46986]{height:4em;width:4em}.info-modal-title[data-v-3eb46986]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link[data-v-3eb46986]{display:flex;align-items:center}.info-modal-discord[data-v-3eb46986]{margin:0;margin-right:4px}.field{display:flex;position:relative;min-height:2em;margin:10px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-dropdown,.vue-select{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--feature-foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.highlighted.selected,.vue-dropdown-item.selected{background-color:var(--bought)}.vue-input input::-moz-placeholder{color:var(--link)}.vue-input input:-ms-input-placeholder{color:var(--link)}.vue-input input::placeholder{color:var(--link)}.field[data-v-43cf95d0]{cursor:pointer}input[data-v-43cf95d0]{-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}span[data-v-43cf95d0]{width:100%;position:relative}input+span[data-v-43cf95d0]:before{content:"";float:right;margin:5px 0 5px 10px;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-43cf95d0]:after{content:"";position:absolute;top:2px;right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);transition:background-color .2s,transform .2s}input:checked+span[data-v-43cf95d0]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-43cf95d0]:after{background-color:var(--link);transform:translateX(16px)}input:active+span[data-v-43cf95d0]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-43cf95d0]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-43cf95d0]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-43cf95d0]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-43cf95d0]:before{background-color:var(--link);opacity:.6}.tooltip-container[data-v-adb5f26e]{position:relative;--xoffset:0px;--yoffset:0px}.tooltip[data-v-adb5f26e],.tooltip[data-v-adb5f26e]:after{pointer-events:none;position:absolute}.tooltip[data-v-adb5f26e]{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:translateX(-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-adb5f26e] hr{margin:var(--feature-margin) 0}.shown[data-v-adb5f26e]{z-index:10}.fade-enter-from[data-v-adb5f26e],.fade-leave-to[data-v-adb5f26e]{opacity:0}.tooltip[data-v-adb5f26e]: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}.side-nodes .tooltip[data-v-adb5f26e]:not(.right):not(.bottom):not(.top),.tooltip.left[data-v-adb5f26e]{bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.side-nodes .tooltip[data-v-adb5f26e]:not(.right):not(.bottom):not(.top):after,.tooltip.left[data-v-adb5f26e]: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-adb5f26e]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-adb5f26e]: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-adb5f26e]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translateX(-50%)}.tooltip.bottom[data-v-adb5f26e]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-adb5f26e]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.header[data-v-85d7ae40]{margin-bottom:-10px}[data-v-85d7ae40] .tooltip-container{display:inline;margin-left:5px}form[data-v-8bda704a]{margin:0;width:100%}.field>[data-v-8bda704a]{margin:0}input[data-v-8bda704a]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-8bda704a]{width:100%}.container[data-v-bf59fca4]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-bf59fca4]{font-size:1em}.container>[data-v-bf59fca4]{margin:0 4px}.button.danger,.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.feedback[data-v-5bbcedd3]{position:relative}.feedback[data-v-5bbcedd3]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"✔";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px rgba(111,148,182,0);text-shadow:none}.feedback.left[data-v-5bbcedd3]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-5bbcedd3]:after{-webkit-animation:feedback-5bbcedd3 .5s ease-out forwards;animation:feedback-5bbcedd3 .5s ease-out forwards}@-webkit-keyframes feedback-5bbcedd3{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%)}}@keyframes feedback-5bbcedd3{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%)}}.save[data-v-6a0cf7ac]{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-6a0cf7ac]{border-color:var(--bought)}.open[data-v-6a0cf7ac]{display:inline;margin:0;padding-left:0}.handle[data-v-6a0cf7ac]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-6a0cf7ac]{margin:0;flex-grow:1;margin-right:80px}.error[data-v-6a0cf7ac]{font-size:.8em;color:var(--danger)}.save-version[data-v-6a0cf7ac]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-6a0cf7ac]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-6a0cf7ac]{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}.field .field-buttons[data-v-7d95f59e],.field .field-title[data-v-7d95f59e],.field form[data-v-7d95f59e],.save .field{margin:0}.field-buttons[data-v-7d95f59e]{display:flex}.field-buttons .field[data-v-7d95f59e]{margin:0;margin-left:8px}.modal-footer[data-v-7d95f59e]{margin-top:-20px}.footer[data-v-7d95f59e]{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-71847eca]{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-71847eca]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-71847eca]{height:100%;width:unset}.overlay-nav[data-v-71847eca]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>[data-v-71847eca]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-71847eca]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-71847eca]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .info[data-v-71847eca],.nav .saves[data-v-71847eca]{display:flex}.tooltip-container[data-v-71847eca]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-71847eca]{position:relative}.discord img[data-v-71847eca]{width:100%;height:100%}.discord-links[data-v-71847eca]{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-71847eca]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-71847eca]{left:-10px}.discord-links li[data-v-71847eca]{margin-bottom:4px}.discord-links li[data-v-71847eca]:first-child{font-size:1.2em}:not(.overlay-nav) .discord:hover .discord-links[data-v-71847eca]{right:0}.material-icons[data-v-71847eca]{font-size:36px}.material-icons[data-v-71847eca]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-71847eca]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-71847eca]{width:unset;height:25px}.version[data-v-71847eca]{color:var(--points)}.version:hover span[data-v-71847eca]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-71847eca],.overlay-nav>div>a[data-v-71847eca]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-4fd7697b]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-4fd7697b]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-4fd7697b]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-4fd7697b]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.separator[data-v-4fd7697b]{position:absolute;right:-4px;top:0;bottom:0;width:8px;background:var(--outline);z-index:1}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) -10px}.tab .modal-body hr{margin:7px 0}svg[data-v-07150322]{background:#2e3440}svg .svg-elem-1[data-v-07150322]{stroke-dashoffset:2648.758056640625px;stroke-dasharray:1324.3790283203125px;transition:stroke-dashoffset 1s cubic-bezier(.47,0,.745,.715) 0s}svg.v-enter-from .svg-elem-1[data-v-07150322],svg.v-leave-to .svg-elem-1[data-v-07150322]{stroke-dashoffset:1324.3790283203125px}svg .svg-elem-2[data-v-07150322]{stroke-dashoffset:680.4000854492188px;stroke-dasharray:340.2000427246094px;transition:stroke-dashoffset 1s ease-out .4s}svg.v-enter-from .svg-elem-2[data-v-07150322],svg.v-leave-to .svg-elem-2[data-v-07150322]{stroke-dashoffset:340.2000427246094px}svg .svg-elem-3[data-v-07150322]{stroke-dashoffset:76.21031951904297px;stroke-dasharray:38.105159759521484px;transition:stroke-dashoffset 1s ease-out .8s}svg.v-enter-from .svg-elem-3[data-v-07150322],svg.v-leave-to .svg-elem-3[data-v-07150322]{stroke-dashoffset:38.105159759521484px}svg .svg-elem-4[data-v-07150322]{stroke-dashoffset:175.18072509765625px;stroke-dasharray:87.59036254882812px;transition:stroke-dashoffset 1s cubic-bezier(.47,0,.745,.715) .36s}svg.v-enter-from .svg-elem-4[data-v-07150322],svg.v-leave-to .svg-elem-4[data-v-07150322]{stroke-dashoffset:87.59036254882812px}svg .svg-elem-5[data-v-07150322]{stroke-dashoffset:671.9447021484375px;stroke-dasharray:335.97235107421875px;transition:stroke-dashoffset 1s ease-out .8s}svg.v-enter-from .svg-elem-5[data-v-07150322],svg.v-leave-to .svg-elem-5[data-v-07150322]{stroke-dashoffset:335.97235107421875px}svg .svg-elem-6[data-v-07150322]{stroke-dashoffset:173.96141052246094px;stroke-dasharray:86.98070526123047px;transition:stroke-dashoffset 1s ease-out 1s}svg.v-enter-from .svg-elem-6[data-v-07150322],svg.v-leave-to .svg-elem-6[data-v-07150322]{stroke-dashoffset:86.98070526123047px}svg .svg-elem-7[data-v-07150322]{stroke-dashoffset:172.99151611328125px;stroke-dasharray:86.49575805664062px;transition:stroke-dashoffset 1s ease-out .85s}svg.v-enter-from .svg-elem-7[data-v-07150322],svg.v-leave-to .svg-elem-7[data-v-07150322]{stroke-dashoffset:86.49575805664062px}.resize-listener[data-v-e35b0402],svg[data-v-e35b0402]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.row[data-v-51e99c22]{margin:50px auto}.left-side-nodes[data-v-51e99c22]{position:absolute;left:15px;top:65px}.side-nodes[data-v-51e99c22]{position:absolute;right:15px;top:65px}.small[data-v-51e99c22] .treeNode{height:60px;width:60px}.small[data-v-51e99c22] .treeNode>:first-child{font-size:30px}.node[data-v-63ded336]{position:absolute;z-index:-10;top:0;left:0;width:100%;height:100%;pointer-events:none}.mark[data-v-c476c56a]{position:absolute;left:-25px;top:-10px;width:30px;height:30px;z-index:1;border-bottom:.7em solid transparent}.mark[data-v-c476c56a],.star[data-v-c476c56a]{pointer-events:none;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-left:.3em solid transparent;font-size:10px}.star[data-v-c476c56a]{left:-10px;width:0;height:0;border-bottom:.7em solid #fc0}.star[data-v-c476c56a]:after,.star[data-v-c476c56a]:before{content:"";width:0;height:0;position:absolute;top:.6em;left:-1em;border-right:1em solid transparent;border-bottom:.7em solid #fc0;border-left:1em solid transparent;transform:rotate(-35deg)}.star[data-v-c476c56a]:after{transform:rotate(35deg)}.treeNode[data-v-426d9bce]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px 0 10px}.treeNode>[data-v-426d9bce]:first-child{width:100%;height:100%;border:2px solid rgba(0,0,0,.125);border-radius:inherit;font-size:40px;color:rgba(0,0,0,.5);text-shadow:2px 2px 4px rgba(0,0,0,.25);box-shadow:-4px -4px 4px rgba(0,0,0,.25) inset,0 0 20px var(--background);text-transform:capitalize;display:flex}.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}.achievement[data-v-e3f32402]{height:90px;width:90px;font-size:10px;color:#fff;text-shadow:0 0 2px #000}.tile[data-v-b1182ac6]{min-height:80px;width:80px;font-size:10px;background-color:var(--layer-color)}.clickable[data-v-6b39988a]{min-height:120px;width:120px;font-size:10px}.clickable.small[data-v-6b39988a]{min-height:unset}.infobox[data-v-6447a93e]{position:relative;width:600px;max-width:95%;margin-top:0;text-align:left;border-style:solid;border-width:0;box-sizing:border-box;border-radius:5px}.infobox.stacked[data-v-6447a93e]{border-width:4px}.infobox:not(.stacked)+.infobox[data-v-6447a93e]:not(.stacked){margin-top:20px}.infobox[data-v-6447a93e]+:not(.infobox){margin-top:10px}.title[data-v-6447a93e]{font-size:24px;color:#000;cursor:pointer;border:none;padding:4px;width:auto;text-align:left;padding-left:30px}.infobox:not(.stacked) .title[data-v-6447a93e]{border-top-left-radius:5px;border-top-right-radius:5px}.infobox.stacked+.infobox.stacked[data-v-6447a93e]{border-top-left-radius:0;border-top-right-radius:0;margin-top:-5px}.stacked .title[data-v-6447a93e]{width:100%}.collapsed:not(.stacked) .title[data-v-6447a93e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background-color:inherit}.toggle[data-v-6447a93e]{position:absolute;left:10px}.collapsed .toggle[data-v-6447a93e]{transform:rotate(-90deg)}.body[data-v-6447a93e]{transition-duration:.5s;border-radius:5px;border-top-left-radius:0}.infobox:not(.stacked) .body[data-v-6447a93e]{padding:4px}.body>[data-v-6447a93e]{padding:8px;width:100%;display:block;box-sizing:border-box;border-radius:5px;border-top-left-radius:0;background-color:var(--background)}.not-fullscreen[data-v-4e1c0c10],.resize-listener[data-v-4e1c0c10]{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.modifier-container{display:flex}.modifier-container:nth-child(2n){background:var(--raised-background)}.modifier-amount{flex-basis:100px;flex-shrink:0}.modifier-description{flex-grow:1}.fullWidth[data-v-20a0a34d]{width:100%}.sticky[data-v-6987dd96]{position:sticky;background:var(--background);margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px;width:100%;z-index:3}.modal-body .sticky[data-v-6987dd96]{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.vr[data-v-15f6e746]{width:4px;background:var(--outline);height:100%;margin:auto var(--feature-margin)}.bar[data-v-e6e3c366]{position:relative;display:table}.overlayTextContainer[data-v-e6e3c366]{position:absolute;border-radius:10px;vertical-align:middle;display:flex;justify-content:center;z-index:3}.overlayText[data-v-e6e3c366]{z-index:6}.border[data-v-e6e3c366]{border:2px solid;border-radius:10px;border-color:var(--foreground);overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);margin:0}.fill[data-v-e6e3c366]{position:absolute;background-color:var(--foreground);overflow:hidden;margin-left:-.5px;transition-duration:.2s;z-index:2}.challenge[data-v-5e580749]{background-color:var(--locked);width:300px;min-height:300px;color:#000;font-size:15px;display:flex;flex-flow:column;align-items:center}.challenge.done[data-v-5e580749]{background-color:var(--bought)}.challenge button[data-v-5e580749]{min-height:50px;width:120px;border-radius:var(--border-radius);box-shadow:none!important;background:transparent}.challenge.canStart button[data-v-5e580749]{cursor:pointer;background-color:var(--layer-color)}.milestone[data-v-0b660ac3]{width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;background-color:var(--locked);border-width:4px;border-radius:5px;color:rgba(0,0,0,.5)}.milestone.done[data-v-0b660ac3]{background-color:var(--bought);cursor:default}.milestone[data-v-0b660ac3] .equal-spaced{display:flex;justify-content:center}.milestone[data-v-0b660ac3] .equal-spaced>*{margin:auto}.tabButton[data-v-361380c0]{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-361380c0]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}:not(.floating)>.tabButton[data-v-361380c0]{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-361380c0]:not(.active){border-bottom-color:transparent}.tab-family-container[data-v-38d5b5f9]{margin:calc(50px + var(--feature-margin)) 20px var(--feature-margin) 20px;position:relative;border:4px solid;border-color:var(--outline)}.layer-tab>.tab-family-container[data-v-38d5b5f9]:first-child{margin:-4px -11px var(--feature-margin) -11px}.layer-tab>.tab-family-container[data-v-38d5b5f9]: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-38d5b5f9]:first-child{margin:calc(10px + var(--feature-margin)) 10px 0 10px;border:none}.tab-family-container[data-v-38d5b5f9]>:nth-child(2){margin-top:20px}.modal-body>.tab-family-container[data-v-38d5b5f9]>:nth-child(2){margin-top:50px}.tab-family-container[data-v-f18896fc][data-v-38d5b5f9]>:last-child{margin-bottom:20px}.tab-family-container .sticky[data-v-38d5b5f9]{margin-left:-3px!important;margin-right:-3px!important}.tab-buttons-container[data-v-38d5b5f9]{width:calc(100% - 14px);z-index:4}.tab-buttons-container[data-v-38d5b5f9]:not(.floating){border-top:4px solid;border-bottom:4px solid;border-color:inherit}.tab-buttons-container:not(.floating) .tab-buttons[data-v-38d5b5f9]{width:calc(100% + 14px);margin-left:-7px;margin-right:-7px;box-sizing:border-box;text-align:left;padding-left:14px;margin-bottom:-4px}.tab-buttons-container.floating .tab-buttons[data-v-38d5b5f9]{justify-content:center;margin-top:-25px}.tab-buttons[data-v-38d5b5f9]{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-38d5b5f9]{padding-right:60px}.tab-buttons[data-v-38d5b5f9]:not(.floating){text-align:left;border-bottom:inherit;border-width:4px;box-sizing:border-box;height:50px}.modal-body .tab-buttons[data-v-38d5b5f9]{width:100%;margin-left:0;margin-right:0;padding-left:0}.showGoBack>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-38d5b5f9]{padding-left:70px}:not(.showGoBack)>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-38d5b5f9]{padding-left:2px}.tab-buttons-container[data-v-38d5b5f9]:not(.floating):first-child{border-top:0}.minimizable>.tab-buttons-container[data-v-38d5b5f9]:not(.floating):first-child{padding-right:50px}.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-38d5b5f9]{margin-top:-50px}.tab-buttons-container+[data-v-38d5b5f9]{margin-top:20px}.upgrade[data-v-264c96b4]{min-height:120px;width:120px;font-size:10px}.game-over-modal-header[data-v-06188cc8]{display:flex;margin:-20px;margin-bottom:0;background:var(--raised-background);align-items:center}.game-over-modal-header [data-v-06188cc8]{margin:0}.game-over-modal-logo[data-v-06188cc8]{height:4em;width:4em}.game-over-modal-title[data-v-06188cc8]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-06188cc8]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-06188cc8]{margin:0 10px}.game-over-modal-discord-link[data-v-06188cc8]{display:flex;align-items:center}.game-over-modal-discord[data-v-06188cc8]{margin:0;margin-right:4px}.nan-modal-header[data-v-5935214c]{padding:10px 0;margin-left:10px}.nan-footer[data-v-5935214c]{display:flex;justify-content:flex-end}.nan-footer button[data-v-5935214c]{margin:0 10px}.nan-modal-discord-link[data-v-5935214c]{display:flex;align-items:center}.nan-modal-discord[data-v-5935214c]{margin:0;margin-right:4px}.tpsDisplay[data-v-c0663118]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-c0663118]{color:var(--danger)}.fade-leave-to[data-v-c0663118]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none}:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}#app,body,html{min-height:100%;height:100%}b,h1,h2,h3,input{display:inline}button{color:#000}.button,.link,a{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}.button:hover,.link:hover,a: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-f13f28b6]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-f13f28b6]{position:absolute;min-height:100%;height:100%} \ No newline at end of file +.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)}.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)}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,.5);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{transform:scale(1.1)}.layer-container[data-v-66dc9e3e]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-66dc9e3e]: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-66dc9e3e]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-66dc9e3e]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:0;padding-top:55px;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized div[data-v-66dc9e3e]{margin:0;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-66dc9e3e]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-66dc9e3e]{padding-bottom:0}.modal-body .layer-tab[data-v-66dc9e3e]:not(.hasSubtabs){padding-top:0}.minimize[data-v-66dc9e3e]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;width: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;padding:0;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-66dc9e3e]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-66dc9e3e]{position:absolute;top:0;left:20px;background-color:transparent;border:1px solid transparent;color:var(--foreground);font-size:40px;cursor:pointer;line-height:40px;z-index:7}.goBack[data-v-66dc9e3e]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}details[data-v-5f8298e6]{margin:10px 0;padding-left:18px}summary[data-v-5f8298e6]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-5f8298e6]{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-5f8298e6]{margin:8px 0}li[data-v-5f8298e6]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-5f8298e6]:before{content:"Feature";background:var(--accent1)}.fix[data-v-5f8298e6]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-5f8298e6]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-5f8298e6]:before{content:"Breaking";background:var(--danger)}.info-modal-header[data-v-3eb46986]{display:flex;margin:-20px;margin-bottom:0;background:var(--raised-background);align-items:center}.info-modal-header [data-v-3eb46986]{margin:0}.info-modal-logo[data-v-3eb46986]{height:4em;width:4em}.info-modal-title[data-v-3eb46986]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link[data-v-3eb46986]{display:flex;align-items:center}.info-modal-discord[data-v-3eb46986]{margin:0;margin-right:4px}.field{display:flex;position:relative;min-height:2em;margin:10px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-dropdown,.vue-select{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--feature-foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.highlighted.selected,.vue-dropdown-item.selected{background-color:var(--bought)}.vue-input input::-moz-placeholder{color:var(--link)}.vue-input input:-ms-input-placeholder{color:var(--link)}.vue-input input::placeholder{color:var(--link)}.field[data-v-43cf95d0]{cursor:pointer}input[data-v-43cf95d0]{-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}span[data-v-43cf95d0]{width:100%;position:relative}input+span[data-v-43cf95d0]:before{content:"";float:right;margin:5px 0 5px 10px;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-43cf95d0]:after{content:"";position:absolute;top:2px;right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);transition:background-color .2s,transform .2s}input:checked+span[data-v-43cf95d0]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-43cf95d0]:after{background-color:var(--link);transform:translateX(16px)}input:active+span[data-v-43cf95d0]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-43cf95d0]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-43cf95d0]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-43cf95d0]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-43cf95d0]:before{background-color:var(--link);opacity:.6}.tooltip-container[data-v-adb5f26e]{position:relative;--xoffset:0px;--yoffset:0px}.tooltip[data-v-adb5f26e],.tooltip[data-v-adb5f26e]:after{pointer-events:none;position:absolute}.tooltip[data-v-adb5f26e]{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:translateX(-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-adb5f26e] hr{margin:var(--feature-margin) 0}.shown[data-v-adb5f26e]{z-index:10}.fade-enter-from[data-v-adb5f26e],.fade-leave-to[data-v-adb5f26e]{opacity:0}.tooltip[data-v-adb5f26e]: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}.side-nodes .tooltip[data-v-adb5f26e]:not(.right):not(.bottom):not(.top),.tooltip.left[data-v-adb5f26e]{bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.side-nodes .tooltip[data-v-adb5f26e]:not(.right):not(.bottom):not(.top):after,.tooltip.left[data-v-adb5f26e]: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-adb5f26e]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-adb5f26e]: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-adb5f26e]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translateX(-50%)}.tooltip.bottom[data-v-adb5f26e]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-adb5f26e]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.header[data-v-85d7ae40]{margin-bottom:-10px}[data-v-85d7ae40] .tooltip-container{display:inline;margin-left:5px}form[data-v-8bda704a]{margin:0;width:100%}.field>[data-v-8bda704a]{margin:0}input[data-v-8bda704a]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-8bda704a]{width:100%}.container[data-v-bf59fca4]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-bf59fca4]{font-size:1em}.container>[data-v-bf59fca4]{margin:0 4px}.button.danger,.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.feedback[data-v-5bbcedd3]{position:relative}.feedback[data-v-5bbcedd3]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"✔";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px rgba(111,148,182,0);text-shadow:none}.feedback.left[data-v-5bbcedd3]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-5bbcedd3]:after{-webkit-animation:feedback-5bbcedd3 .5s ease-out forwards;animation:feedback-5bbcedd3 .5s ease-out forwards}@-webkit-keyframes feedback-5bbcedd3{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%)}}@keyframes feedback-5bbcedd3{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%)}}.save[data-v-6a0cf7ac]{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-6a0cf7ac]{border-color:var(--bought)}.open[data-v-6a0cf7ac]{display:inline;margin:0;padding-left:0}.handle[data-v-6a0cf7ac]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-6a0cf7ac]{margin:0;flex-grow:1;margin-right:80px}.error[data-v-6a0cf7ac]{font-size:.8em;color:var(--danger)}.save-version[data-v-6a0cf7ac]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-6a0cf7ac]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-6a0cf7ac]{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}.field .field-buttons[data-v-7d95f59e],.field .field-title[data-v-7d95f59e],.field form[data-v-7d95f59e],.save .field{margin:0}.field-buttons[data-v-7d95f59e]{display:flex}.field-buttons .field[data-v-7d95f59e]{margin:0;margin-left:8px}.modal-footer[data-v-7d95f59e]{margin-top:-20px}.footer[data-v-7d95f59e]{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-71847eca]{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-71847eca]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-71847eca]{height:100%;width:unset}.overlay-nav[data-v-71847eca]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>[data-v-71847eca]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-71847eca]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-71847eca]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .info[data-v-71847eca],.nav .saves[data-v-71847eca]{display:flex}.tooltip-container[data-v-71847eca]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-71847eca]{position:relative}.discord img[data-v-71847eca]{width:100%;height:100%}.discord-links[data-v-71847eca]{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-71847eca]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-71847eca]{left:-10px}.discord-links li[data-v-71847eca]{margin-bottom:4px}.discord-links li[data-v-71847eca]:first-child{font-size:1.2em}:not(.overlay-nav) .discord:hover .discord-links[data-v-71847eca]{right:0}.material-icons[data-v-71847eca]{font-size:36px}.material-icons[data-v-71847eca]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-71847eca]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-71847eca]{width:unset;height:25px}.version[data-v-71847eca]{color:var(--points)}.version:hover span[data-v-71847eca]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-71847eca],.overlay-nav>div>a[data-v-71847eca]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-4fd7697b]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-4fd7697b]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-4fd7697b]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-4fd7697b]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.separator[data-v-4fd7697b]{position:absolute;right:-4px;top:0;bottom:0;width:8px;background:var(--outline);z-index:1}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) -10px}.tab .modal-body hr{margin:7px 0}svg[data-v-07150322]{background:#2e3440}svg .svg-elem-1[data-v-07150322]{stroke-dashoffset:2648.758056640625px;stroke-dasharray:1324.3790283203125px;transition:stroke-dashoffset 1s cubic-bezier(.47,0,.745,.715) 0s}svg.v-enter-from .svg-elem-1[data-v-07150322],svg.v-leave-to .svg-elem-1[data-v-07150322]{stroke-dashoffset:1324.3790283203125px}svg .svg-elem-2[data-v-07150322]{stroke-dashoffset:680.4000854492188px;stroke-dasharray:340.2000427246094px;transition:stroke-dashoffset 1s ease-out .4s}svg.v-enter-from .svg-elem-2[data-v-07150322],svg.v-leave-to .svg-elem-2[data-v-07150322]{stroke-dashoffset:340.2000427246094px}svg .svg-elem-3[data-v-07150322]{stroke-dashoffset:76.21031951904297px;stroke-dasharray:38.105159759521484px;transition:stroke-dashoffset 1s ease-out .8s}svg.v-enter-from .svg-elem-3[data-v-07150322],svg.v-leave-to .svg-elem-3[data-v-07150322]{stroke-dashoffset:38.105159759521484px}svg .svg-elem-4[data-v-07150322]{stroke-dashoffset:175.18072509765625px;stroke-dasharray:87.59036254882812px;transition:stroke-dashoffset 1s cubic-bezier(.47,0,.745,.715) .36s}svg.v-enter-from .svg-elem-4[data-v-07150322],svg.v-leave-to .svg-elem-4[data-v-07150322]{stroke-dashoffset:87.59036254882812px}svg .svg-elem-5[data-v-07150322]{stroke-dashoffset:671.9447021484375px;stroke-dasharray:335.97235107421875px;transition:stroke-dashoffset 1s ease-out .8s}svg.v-enter-from .svg-elem-5[data-v-07150322],svg.v-leave-to .svg-elem-5[data-v-07150322]{stroke-dashoffset:335.97235107421875px}svg .svg-elem-6[data-v-07150322]{stroke-dashoffset:173.96141052246094px;stroke-dasharray:86.98070526123047px;transition:stroke-dashoffset 1s ease-out 1s}svg.v-enter-from .svg-elem-6[data-v-07150322],svg.v-leave-to .svg-elem-6[data-v-07150322]{stroke-dashoffset:86.98070526123047px}svg .svg-elem-7[data-v-07150322]{stroke-dashoffset:172.99151611328125px;stroke-dasharray:86.49575805664062px;transition:stroke-dashoffset 1s ease-out .85s}svg.v-enter-from .svg-elem-7[data-v-07150322],svg.v-leave-to .svg-elem-7[data-v-07150322]{stroke-dashoffset:86.49575805664062px}.resize-listener[data-v-e35b0402],svg[data-v-e35b0402]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.left-side-nodes[data-v-aa87859c]{position:absolute;left:15px;top:65px}.side-nodes[data-v-aa87859c]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-aa87859c] .treeNode,.side-nodes[data-v-aa87859c] .treeNode{margin:20px auto}.small[data-v-aa87859c] .treeNode{height:60px;width:60px}.small[data-v-aa87859c] .treeNode>:first-child{font-size:30px}.node[data-v-63ded336]{position:absolute;z-index:-10;top:0;left:0;width:100%;height:100%;pointer-events:none}.mark[data-v-c476c56a]{position:absolute;left:-25px;top:-10px;width:30px;height:30px;z-index:1;border-bottom:.7em solid transparent}.mark[data-v-c476c56a],.star[data-v-c476c56a]{pointer-events:none;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-left:.3em solid transparent;font-size:10px}.star[data-v-c476c56a]{left:-10px;width:0;height:0;border-bottom:.7em solid #fc0}.star[data-v-c476c56a]:after,.star[data-v-c476c56a]:before{content:"";width:0;height:0;position:absolute;top:.6em;left:-1em;border-right:1em solid transparent;border-bottom:.7em solid #fc0;border-left:1em solid transparent;transform:rotate(-35deg)}.star[data-v-c476c56a]:after{transform:rotate(35deg)}.treeNode[data-v-426d9bce]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px 0 10px}.treeNode>[data-v-426d9bce]:first-child{width:100%;height:100%;border:2px solid rgba(0,0,0,.125);border-radius:inherit;font-size:40px;color:rgba(0,0,0,.5);text-shadow:2px 2px 4px rgba(0,0,0,.25);box-shadow:-4px -4px 4px rgba(0,0,0,.25) inset,0 0 20px var(--background);text-transform:capitalize;display:flex}.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}.achievement[data-v-e3f32402]{height:90px;width:90px;font-size:10px;color:#fff;text-shadow:0 0 2px #000}.tile[data-v-b1182ac6]{min-height:80px;width:80px;font-size:10px;background-color:var(--layer-color)}.clickable[data-v-6b39988a]{min-height:120px;width:120px;font-size:10px}.clickable.small[data-v-6b39988a]{min-height:unset}.infobox[data-v-6447a93e]{position:relative;width:600px;max-width:95%;margin-top:0;text-align:left;border-style:solid;border-width:0;box-sizing:border-box;border-radius:5px}.infobox.stacked[data-v-6447a93e]{border-width:4px}.infobox:not(.stacked)+.infobox[data-v-6447a93e]:not(.stacked){margin-top:20px}.infobox[data-v-6447a93e]+:not(.infobox){margin-top:10px}.title[data-v-6447a93e]{font-size:24px;color:#000;cursor:pointer;border:none;padding:4px;width:auto;text-align:left;padding-left:30px}.infobox:not(.stacked) .title[data-v-6447a93e]{border-top-left-radius:5px;border-top-right-radius:5px}.infobox.stacked+.infobox.stacked[data-v-6447a93e]{border-top-left-radius:0;border-top-right-radius:0;margin-top:-5px}.stacked .title[data-v-6447a93e]{width:100%}.collapsed:not(.stacked) .title[data-v-6447a93e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background-color:inherit}.toggle[data-v-6447a93e]{position:absolute;left:10px}.collapsed .toggle[data-v-6447a93e]{transform:rotate(-90deg)}.body[data-v-6447a93e]{transition-duration:.5s;border-radius:5px;border-top-left-radius:0}.infobox:not(.stacked) .body[data-v-6447a93e]{padding:4px}.body>[data-v-6447a93e]{padding:8px;width:100%;display:block;box-sizing:border-box;border-radius:5px;border-top-left-radius:0;background-color:var(--background)}.not-fullscreen[data-v-4e1c0c10],.resize-listener[data-v-4e1c0c10]{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.modifier-container{display:flex}.modifier-container:nth-child(2n){background:var(--raised-background)}.modifier-amount{flex-basis:100px;flex-shrink:0}.modifier-description{flex-grow:1}.fullWidth[data-v-20a0a34d]{width:100%}.sticky[data-v-6987dd96]{position:sticky;background:var(--background);margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px;width:100%;z-index:3}.modal-body .sticky[data-v-6987dd96]{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.vr[data-v-15f6e746]{width:4px;background:var(--outline);height:100%;margin:auto var(--feature-margin)}.bar[data-v-e6e3c366]{position:relative;display:table}.overlayTextContainer[data-v-e6e3c366]{position:absolute;border-radius:10px;vertical-align:middle;display:flex;justify-content:center;z-index:3}.overlayText[data-v-e6e3c366]{z-index:6}.border[data-v-e6e3c366]{border:2px solid;border-radius:10px;border-color:var(--foreground);overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);margin:0}.fill[data-v-e6e3c366]{position:absolute;background-color:var(--foreground);overflow:hidden;margin-left:-.5px;transition-duration:.2s;z-index:2}.challenge[data-v-5e580749]{background-color:var(--locked);width:300px;min-height:300px;color:#000;font-size:15px;display:flex;flex-flow:column;align-items:center}.challenge.done[data-v-5e580749]{background-color:var(--bought)}.challenge button[data-v-5e580749]{min-height:50px;width:120px;border-radius:var(--border-radius);box-shadow:none!important;background:transparent}.challenge.canStart button[data-v-5e580749]{cursor:pointer;background-color:var(--layer-color)}.milestone[data-v-0b660ac3]{width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;background-color:var(--locked);border-width:4px;border-radius:5px;color:rgba(0,0,0,.5)}.milestone.done[data-v-0b660ac3]{background-color:var(--bought);cursor:default}.milestone[data-v-0b660ac3] .equal-spaced{display:flex;justify-content:center}.milestone[data-v-0b660ac3] .equal-spaced>*{margin:auto}.tabButton[data-v-361380c0]{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-361380c0]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}:not(.floating)>.tabButton[data-v-361380c0]{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-361380c0]:not(.active){border-bottom-color:transparent}.tab-family-container[data-v-38d5b5f9]{margin:calc(50px + var(--feature-margin)) 20px var(--feature-margin) 20px;position:relative;border:4px solid;border-color:var(--outline)}.layer-tab>.tab-family-container[data-v-38d5b5f9]:first-child{margin:-4px -11px var(--feature-margin) -11px}.layer-tab>.tab-family-container[data-v-38d5b5f9]: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-38d5b5f9]:first-child{margin:calc(10px + var(--feature-margin)) 10px 0 10px;border:none}.tab-family-container[data-v-38d5b5f9]>:nth-child(2){margin-top:20px}.modal-body>.tab-family-container[data-v-38d5b5f9]>:nth-child(2){margin-top:50px}.tab-family-container[data-v-f18896fc][data-v-38d5b5f9]>:last-child{margin-bottom:20px}.tab-family-container .sticky[data-v-38d5b5f9]{margin-left:-3px!important;margin-right:-3px!important}.tab-buttons-container[data-v-38d5b5f9]{width:calc(100% - 14px);z-index:4}.tab-buttons-container[data-v-38d5b5f9]:not(.floating){border-top:4px solid;border-bottom:4px solid;border-color:inherit}.tab-buttons-container:not(.floating) .tab-buttons[data-v-38d5b5f9]{width:calc(100% + 14px);margin-left:-7px;margin-right:-7px;box-sizing:border-box;text-align:left;padding-left:14px;margin-bottom:-4px}.tab-buttons-container.floating .tab-buttons[data-v-38d5b5f9]{justify-content:center;margin-top:-25px}.tab-buttons[data-v-38d5b5f9]{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-38d5b5f9]{padding-right:60px}.tab-buttons[data-v-38d5b5f9]:not(.floating){text-align:left;border-bottom:inherit;border-width:4px;box-sizing:border-box;height:50px}.modal-body .tab-buttons[data-v-38d5b5f9]{width:100%;margin-left:0;margin-right:0;padding-left:0}.showGoBack>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-38d5b5f9]{padding-left:70px}:not(.showGoBack)>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-38d5b5f9]{padding-left:2px}.tab-buttons-container[data-v-38d5b5f9]:not(.floating):first-child{border-top:0}.minimizable>.tab-buttons-container[data-v-38d5b5f9]:not(.floating):first-child{padding-right:50px}.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-38d5b5f9]{margin-top:-50px}.tab-buttons-container+[data-v-38d5b5f9]{margin-top:20px}.upgrade[data-v-264c96b4]{min-height:120px;width:120px;font-size:10px}.game-over-modal-header[data-v-06188cc8]{display:flex;margin:-20px;margin-bottom:0;background:var(--raised-background);align-items:center}.game-over-modal-header [data-v-06188cc8]{margin:0}.game-over-modal-logo[data-v-06188cc8]{height:4em;width:4em}.game-over-modal-title[data-v-06188cc8]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-06188cc8]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-06188cc8]{margin:0 10px}.game-over-modal-discord-link[data-v-06188cc8]{display:flex;align-items:center}.game-over-modal-discord[data-v-06188cc8]{margin:0;margin-right:4px}.nan-modal-header[data-v-5935214c]{padding:10px 0;margin-left:10px}.nan-footer[data-v-5935214c]{display:flex;justify-content:flex-end}.nan-footer button[data-v-5935214c]{margin:0 10px}.nan-modal-discord-link[data-v-5935214c]{display:flex;align-items:center}.nan-modal-discord[data-v-5935214c]{margin:0;margin-right:4px}.tpsDisplay[data-v-c0663118]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-c0663118]{color:var(--danger)}.fade-leave-to[data-v-c0663118]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none}:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}#app,body,html{min-height:100%;height:100%}b,h1,h2,h3,input{display:inline}button{color:#000}.button,.link,a{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}.button:hover,.link:hover,a: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-f13f28b6]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-f13f28b6]{position:absolute;min-height:100%;height:100%} \ No newline at end of file diff --git a/index.html b/index.html index 1d035e8..a3e7a63 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -profectus
\ No newline at end of file +profectus
\ No newline at end of file diff --git a/js/app-legacy.9714db0a.js b/js/app-legacy.83d76432.js similarity index 59% rename from js/app-legacy.9714db0a.js rename to js/app-legacy.83d76432.js index 8968e3a..c1782ae 100644 --- a/js/app-legacy.9714db0a.js +++ b/js/app-legacy.83d76432.js @@ -1,2 +1,2 @@ -(function(){var e={1037:function(e,n,o){"use strict";o.d(n,{b:function(){return r}});var r,t=o(5082),l={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#eee","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};(function(e){e["Classic"]="classic",e["Paper"]="paper",e["Nordic"]="nordic",e["Aqua"]="aqua"})(r||(r={})),n["Z"]={classic:l,paper:(0,t.Z)((0,t.Z)({},l),{},{variables:(0,t.Z)((0,t.Z)({},l.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:(0,t.Z)((0,t.Z)({},l),{},{variables:(0,t.Z)((0,t.Z)({},l.variables),{},{"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"}),floatingTabs:!1}),aqua:(0,t.Z)((0,t.Z)({},l),{},{variables:(0,t.Z)((0,t.Z)({},l.variables),{},{"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"})})}},6113:function(e,n,o){"use strict";o.d(n,{wA:function(){return a},tj:function(){return f},QI:function(){return s},EE:function(){return r},tZ:function(){return m},Kf:function(){return d},Rh:function(){return y},bD:function(){return b}});var r,t=o(3336),l=(o(2526),o(1817),o(1539),o(4747),o(7941),o(5613)),i=o(9583),u=o(4865),a=Symbol("Component"),f=Symbol("GatherProps"),c=0;function s(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:"feature-";return function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](c++):n+c++}()}function m(e){return e[i.mM]=!0,e}function d(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:r.None;return e?r.Visible:o}function y(e,n,o){void 0===e[n]&&function(){return void 0!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](void 0):void 0!=o}()&&(e[n]=o)}function b(e,n){var o=[],r=function e(r){Object.keys(r).forEach((function(i){var a=r[i];a&&"object"===(0,t.Z)(a)&&(a.type===n?o.push(a):function(){return a instanceof l.ZP!==void 0&&a instanceof l.ZP!==null&&(a instanceof l.ZP)[Symbol.for("!")]?(a instanceof l.ZP)[Symbol.for("!")]():!(a instanceof l.ZP)}()&&function(){return void 0!==(0,u.isRef)(a)&&null!==(0,u.isRef)(a)&&(0,u.isRef)(a)[Symbol.for("!")]?(0,u.isRef)(a)[Symbol.for("!")]():!(0,u.isRef)(a)}()&&e(a))}))};return r(e),o}(function(e){e[e["Visible"]=0]="Visible",e[e["Hidden"]=1]="Hidden",e[e["None"]=2]="None"})(r||(r={}))},4096:function(e,n,o){"use strict";o.d(n,{A:function(){return r},Z:function(){return f}});var r,t=o(2482),l=(o(2526),o(1817),o(1539),o(264)),i=o(6113),u=o(9583),a=o(4061);function f(e,n){n.pinnable&&(!function(){return"pinned"[Symbol.for("in")]?"pinned"[Symbol.for("in")](e):"pinned"in e}()?e.pinned=n.pinned=(0,a.ax)(!1):(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),n.pinnable=!1)),(0,u.yB)(n,"display"),(0,u.yB)(n,"classes"),(0,u.yB)(n,"style"),(0,u.yB)(n,"direction"),(0,i.Rh)(n,"direction",r.UP),(0,u.yB)(n,"xoffset"),(0,u.yB)(n,"yoffset");var o=e[i.wA];e[i.wA]=l.Z;var f=e[i.tj].bind(e);return e[i.tj]=function(){var e,n=this.display,r=this.classes,l=this.style,u=this.direction,a=this.xoffset,c=this.yoffset,s=this.pinned;return{element:(e={},(0,t.Z)(e,i.wA,o),(0,t.Z)(e,i.tj,f),e),display:n,classes:r,style:l,direction:u,xoffset:a,yoffset:c,pinned:s}}.bind(n),n}(function(e){e[e["UP"]=0]="UP",e[e["LEFT"]=1]="LEFT",e[e["RIGHT"]=2]="RIGHT",e[e["DOWN"]=3]="DOWN"})(r||(r={}))},7302:function(e,n,o){"use strict";o.r(n),o.d(n,{globalBus:function(){return s},startGameLoop:function(){return b}});var r=o(8534),t=(o(5666),o(2526),o(1817),o(1539),o(7042),o(5192),o(9653),o(8783),o(3948),o(6453)),l=o(5613),i=o(8111),u=o(4865),a=o(5967),f=o(9266),c=o(3032),s=(0,i.i)(),m=null,d=null;function y(){var e,n=Date.now(),o=function(){return n-a.Z.time!==void 0&&n-a.Z.time!==null&&(n-a.Z.time)[Symbol.for("/")]?(n-a.Z.time)[Symbol.for("/")](1e3):(n-a.Z.time)/1e3}();a.Z.time=n;var r=o;if(c.Z.lastTenTicks.push(r),function(){return void 0!==c.Z.lastTenTicks.length&&null!==c.Z.lastTenTicks.length&&c.Z.lastTenTicks.length[Symbol.for(">")]?c.Z.lastTenTicks.length[Symbol.for(">")](10):c.Z.lastTenTicks.length>10}()&&(c.Z.lastTenTicks=c.Z.lastTenTicks.slice(1)),!(function(){return void 0!==(e=d)&&null!==(e=d)&&(e=d)[Symbol.for("!==")]?(e=d)[Symbol.for("!==")](null):null!==(e=d)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.value&&function(){return void 0!==a.Z.keepGoing&&null!==a.Z.keepGoing&&a.Z.keepGoing[Symbol.for("!")]?a.Z.keepGoing[Symbol.for("!")]():!a.Z.keepGoing}())&&!c.Z.hasNaN&&(o=Math.max(o,0),0!==a.Z.devSpeed)){if(function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("!=")]?a.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=a.Z.offlineTime}()){if(l.ZP.gt(a.Z.offlineTime,function(){return void 0!==t.offlineLimit&&null!==t.offlineLimit&&t.offlineLimit[Symbol.for("*")]?t.offlineLimit[Symbol.for("*")](3600):3600*t.offlineLimit}())&&(a.Z.offlineTime=function(){return void 0!==t.offlineLimit&&null!==t.offlineLimit&&t.offlineLimit[Symbol.for("*")]?t.offlineLimit[Symbol.for("*")](3600):3600*t.offlineLimit}()),l.ZP.gt(a.Z.offlineTime,0)&&function(){return void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!==")]?a.Z.devSpeed[Symbol.for("!==")](0):0!==a.Z.devSpeed}()){var i=Math.max(function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("/")]?a.Z.offlineTime[Symbol.for("/")](10):a.Z.offlineTime/10}(),o);a.Z.offlineTime=function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("-")]?a.Z.offlineTime[Symbol.for("-")](i):a.Z.offlineTime-i}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](i):o+i}()}else 0===a.Z.devSpeed&&(a.Z.offlineTime=function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("+")]?a.Z.offlineTime[Symbol.for("+")](o):a.Z.offlineTime+o}());(function(){return void 0!==a.Z.offlineProd&&null!==a.Z.offlineProd&&a.Z.offlineProd[Symbol.for("!")]?a.Z.offlineProd[Symbol.for("!")]():!a.Z.offlineProd}()||l.ZP.lt(a.Z.offlineTime,0))&&(a.Z.offlineTime=null)}o=Math.min(o,t.maxTickLength),function(){return void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!=")]?a.Z.devSpeed[Symbol.for("!=")](void 0):void 0!=a.Z.devSpeed}()&&(o=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](a.Z.devSpeed):o*a.Z.devSpeed}()),function(){return void 0!==Number.isFinite(o)&&null!==Number.isFinite(o)&&Number.isFinite(o)[Symbol.for("!")]?Number.isFinite(o)[Symbol.for("!")]():!Number.isFinite(o)}()&&(o=1e308),l.ZP.eq(o,0)||(a.Z.timePlayed=function(){return void 0!==a.Z.timePlayed&&null!==a.Z.timePlayed&&a.Z.timePlayed[Symbol.for("+")]?a.Z.timePlayed[Symbol.for("+")](o):a.Z.timePlayed+o}(),function(){return void 0!==Number.isFinite(a.Z.timePlayed)&&null!==Number.isFinite(a.Z.timePlayed)&&Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]?Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]():!Number.isFinite(a.Z.timePlayed)}()&&(a.Z.timePlayed=1e308),s.emit("update",o,r),f.ZP.unthrottled?(requestAnimationFrame(y),function(){return void 0!==m&&null!==m&&m[Symbol.for("!=")]?m[Symbol.for("!=")](null):null!=m}()&&(clearInterval(m),m=null)):function(){return void 0!==m&&null!==m&&m[Symbol.for("==")]?m[Symbol.for("==")](null):null==m}()&&(m=setInterval(y,50)))}}function b(){return v.apply(this,arguments)}function v(){return v=(0,r.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then(o.bind(o,1657));case 2:d=e.sent.hasWon,(0,u.watch)(d,(function(e){e&&s.emit("gameWon")})),f.ZP.unthrottled?requestAnimationFrame(y):m=setInterval(y,50);case 5:case"end":return e.stop()}}),e)}))),v.apply(this,arguments)}},4061:function(e,n,o){"use strict";o.d(n,{n9:function(){return s},nY:function(){return m},ax:function(){return v}});var r=o(9584),t=o(3336),l=(o(2526),o(1817),o(1539),o(1703),o(9600),o(1249),o(7042),o(4916),o(3123),o(3210),o(4747),o(7941),o(6699),o(2222),o(7302)),i=o(5613),u=o(3273),a=o(3577),f=o(4865),c=o(9365),s=Symbol("PersistentState"),m=Symbol("DefaultValue"),d=Symbol("StackTrace"),y=Symbol("Deleted");function b(){var e;return(null===(e=(new Error).stack)||void 0===e?void 0:e.split("\n").slice(3,5).map((function(e){return e.trim()})).join("\n"))||""}function v(e){var n=(0,f.isRef)(e)?e:(0,f.ref)(e);return n[s]=n,n[m]=(0,f.isRef)(e)?e.value:e,n[d]=b(),n[y]=!1,0===c.addingLayers.length?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",n,function(){return"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](n[d]):"\nCreated at:\n"+n[d]}()):c.persistentRefs[c.addingLayers[function(){return void 0!==c.addingLayers.length&&null!==c.addingLayers.length&&c.addingLayers.length[Symbol.for("-")]?c.addingLayers.length[Symbol.for("-")](1):c.addingLayers.length-1}()]].add(n),n}l.globalBus.on("addLayer",(function(e,n){var o=[],l=function l(b){var v=arguments,S=function(){return void 0!==v.length&&null!==v.length&&v.length[Symbol.for(">")]?v.length[Symbol.for(">")](1):v.length>1}()&&function(){return void 0!==v[1]&&null!==v[1]&&v[1][Symbol.for("!==")]?v[1][Symbol.for("!==")](void 0):void 0!==v[1]}()?arguments[1]:[],g=!1;return Object.keys(b).forEach((function(v){var p=b[v];if(p&&"object"===(0,t.Z)(p))if(function(){return void 0!==s&&null!==s&&s[Symbol.for("in")]?s[Symbol.for("in")](p):s in p}()){if(g=!0,p[y])return void console.warn("Deleted persistent ref present in returned object. Ignoring...",p,function(){return"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](p[d]):"\nCreated at:\n"+p[d]}());c.persistentRefs[e.id].delete(function(){return void 0!==u.Le&&null!==u.Le&&u.Le[Symbol.for("in")]?u.Le[Symbol.for("in")](p):u.Le in p}()?p[u.Le]:p);var h=S.reduce((function(e,n){return function(){return n in e!==void 0&&n in e!==null&&(n in e)[Symbol.for("!")]?(n in e)[Symbol.for("!")]():!(n in e)}()&&(e[n]={}),e[n]}),n),N=h[v];h[v]=p[s],(0,f.isReactive)(h)?!function(){return void 0!==N&&null!==N&&N[Symbol.for("!=")]?N[Symbol.for("!=")](null):null!=N}()?h[v]=p[m]:h[v]=N:!function(){return void 0!==N&&null!==N&&N[Symbol.for("!=")]?N[Symbol.for("!=")](null):null!=N}()?h[v].value=p[m]:h[v].value=N}else if(function(){return p instanceof i.ZP!==void 0&&p instanceof i.ZP!==null&&(p instanceof i.ZP)[Symbol.for("!")]?(p instanceof i.ZP)[Symbol.for("!")]():!(p instanceof i.ZP)}()&&function(){return void 0!==(0,f.isRef)(p)&&null!==(0,f.isRef)(p)&&(0,f.isRef)(p)[Symbol.for("!")]?(0,f.isRef)(p)[Symbol.for("!")]():!(0,f.isRef)(p)}()&&function(){return void 0!==o.includes(p)&&null!==o.includes(p)&&o.includes(p)[Symbol.for("!")]?o.includes(p)[Symbol.for("!")]():!o.includes(p)}()){"symbol"===(0,t.Z)(p.type)&&o.push(p);var k=l(p,[].concat((0,r.Z)(S),[v]));k&&((0,a.kJ)(p)&&function(){return void 0!==(0,a.kJ)(b)&&null!==(0,a.kJ)(b)&&(0,a.kJ)(b)[Symbol.for("!")]?(0,a.kJ)(b)[Symbol.for("!")]():!(0,a.kJ)(b)}()?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.",function(){return void 0!==u.Le&&null!==u.Le&&u.Le[Symbol.for("in")]?u.Le[Symbol.for("in")](b):u.Le in b}()?b[u.Le]:b,v):g=!0)}})),g};l(e),c.persistentRefs[e.id].forEach((function(n){console.error("Created persistent ref in ".concat(e.id," without registering it to the layer! Make sure to include everything persistent in the returned object"),n,function(){return"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](n[d]):"\nCreated at:\n"+n[d]}())})),c.persistentRefs[e.id].clear()}))},5967:function(e,n,o){"use strict";o.d(n,{U:function(){return m}});var r,t=o(2482),l=o(9584),i=(o(2526),o(1817),o(1539),o(8862),o(2222),o(7556),o(1299),o(4858),o(5003),o(5613)),u=o(1349),a=o(3273),f=o(4865),c=o(3032),s=(0,f.reactive)({id:"",devSpeed:null,name:"",tabs:[],time:function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function m(e){return JSON.stringify(e,(function(e,n){return(0,f.unref)(n)}))}var d={get:function(e,n){if(n===a.Le||n===a.c4)return e[n];var o=e[a.Le][n];if(function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")]("value"):"value"!==n}()&&(0,u.PO)(o)&&function(){return o instanceof i.ZP!==void 0&&o instanceof i.ZP!==null&&(o instanceof i.ZP)[Symbol.for("!")]?(o instanceof i.ZP)[Symbol.for("!")]():!(o instanceof i.ZP)}()){if(function(){var r,t;return void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](null===(r=e[n])||void 0===r?void 0:r[a.Le]):o!==(null===(t=e[n])||void 0===t?void 0:t[a.Le])}()){var r,f=[].concat((0,l.Z)(e[a.c4]),[n]);e[n]=new Proxy((r={},(0,t.Z)(r,a.Le,o),(0,t.Z)(r,a.c4,f),r),d)}return e[n]}return o},set:function(e,n,o,r){if(function(){return void 0!==c.Z.hasNaN&&null!==c.Z.hasNaN&&c.Z.hasNaN[Symbol.for("!")]?c.Z.hasNaN[Symbol.for("!")]():!c.Z.hasNaN}()&&("number"===typeof o&&isNaN(o)||o instanceof i.ZP&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag)))){var t=e[a.Le][n];if(function(){return void 0!==("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&null!==("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]?("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]():!("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))}())throw s.autosave=!1,c.Z.hasNaN=!0,c.Z.NaNPath=[].concat((0,l.Z)(e[a.c4]),[n]),c.Z.NaNReceiver=r,console.error("Attempted to set NaN value",[].concat((0,l.Z)(e[a.c4]),[n]),e[a.Le]),"Attempted to set NaN value. See above for details"}return e[a.Le][n]=o,!0},ownKeys:function(e){return Reflect.ownKeys(e[a.Le])},has:function(e,n){return Reflect.has(e[a.Le],n)},getOwnPropertyDescriptor:function(e,n){return Object.getOwnPropertyDescriptor(e[a.Le],n)}};n["Z"]=window.player=new Proxy((r={},(0,t.Z)(r,a.Le,s),(0,t.Z)(r,a.c4,["player"]),r),d)},9266:function(e,n,o){"use strict";o.d(n,{ri:function(){return c},V$:function(){return s},QV:function(){return m},II:function(){return d},fw:function(){return y},t:function(){return b}});var r=o(3336),t=(o(7714),o(2801),o(1174),o(8862),o(2526),o(1817),o(1539),o(6453)),l=o(1037),i=o(7302),u=o(463),a=o(4865),f=(0,a.reactive)({active:"",saves:[],showTPS:!0,theme:l.b.Nordic,unthrottled:!1});function c(){try{var e=localStorage.getItem(t.id);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](""):""!==e}()){var n=JSON.parse(decodeURIComponent(escape(atob(e))));"object"===(0,r.Z)(n)&&Object.assign(f,n)}i.globalBus.emit("loadSettings",f)}catch(o){}}(0,a.watch)(f,(function(e){return localStorage.setItem(t.id,btoa(unescape(encodeURIComponent(JSON.stringify(e)))))}),{deep:!0}),n["ZP"]=window.settings=f;window.hardResetSettings=function(){var e={active:"",saves:[],showTPS:!0,theme:l.b.Nordic};i.globalBus.emit("loadSettings",e),Object.assign(f,e),(0,u.y6)()};var s=(0,a.reactive)([]);function m(e){s.push(e)}var d=(0,a.reactive)([]);function y(e){d.push(e)}var b=(0,a.reactive)([])},3032:function(e,n,o){"use strict";var r=o(4865);n["Z"]=window.state=(0,r.shallowReactive)({lastTenTicks:[],hasNaN:!1,NaNPath:[]})},6098:function(e,n,o){"use strict";var r=o(8534),t=(o(6992),o(8674),o(9601),o(7727),o(5666),o(4865)),l=(o(1249),o(6113)),i=o(1604),u=(o(7941),o(8309),o(2526),o(1817),o(1539),o(6699),o(2023),o(6453)),a=o(9365),f=o(5967);function c(e,n,o,r,l,i){var u=(0,t.resolveComponent)("Context");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"layer-container",style:(0,t.normalizeStyle)({"--layer-color":e.unref(e.color)})},[e.showGoBack?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,class:"goBack",onClick:n[0]||(n[0]=function(){return e.goBack&&e.goBack.apply(e,arguments)})},"←")):(0,t.createCommentVNode)("",!0),e.minimized.value?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"layer-tab minimized",onClick:n[1]||(n[1]=function(n){return e.minimized.value=!1})},[(0,t.createElementVNode)("div",null,(0,t.toDisplayString)(e.unref(e.name)),1)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:2,class:(0,t.normalizeClass)(["layer-tab",[{showGoBack:e.showGoBack},e.unref(e.classes)]]),style:(0,t.normalizeStyle)(e.unref(e.style))},[(0,t.createVNode)(u,{ref:"contextRef"},{default:(0,t.withCtx)((function(){return[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component)))]})),_:1},512)],6)),e.unref(e.minimizable)?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:3,class:"minimize",onClick:n[2]||(n[2]=function(n){return e.minimized.value=!0})}," ▼ ")):(0,t.createCommentVNode)("",!0)],4)}var s=o(6084),m=(o(9653),o(561),o(4048),o(5053)),d=(0,t.defineComponent)({components:{Context:m.Z},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:(0,i.P5)(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:(0,i.P5)(Number,String),required:!0},name:{type:(0,i.P5)(String),required:!0},color:(0,i.P5)(String),style:(0,i.P5)(String,Object,Array),classes:(0,i.P5)(Object),minimizable:(0,i.P5)(Boolean),nodes:{type:Object,required:!0}},setup:function(e){var n=(0,t.toRefs)(e),o=n.display,r=n.index,l=n.minimized,a=n.minWidth,c=n.tab,m=(0,i.vq)(o),d=(0,t.computed)((function(){return u.allowGoBack&&function(){return void 0!==r.value&&null!==r.value&&r.value[Symbol.for(">")]?r.value[Symbol.for(">")](0):r.value>0}()&&function(){return void 0!==l.value&&null!==l.value&&l.value[Symbol.for("!")]?l.value[Symbol.for("!")]():!l.value}()}));function y(){f.Z.tabs.splice((0,t.unref)(e.index),1/0)}(0,t.nextTick)((function(){return v(l.value,(0,t.unref)(a.value))})),(0,t.watch)([l,(0,i.o9)(a)],(function(e){var n=(0,s.Z)(e,2),o=n[0],r=n[1];return v(o,r)}));var b=(0,t.ref)(null);function v(e,n){var o="number"===typeof n||Number.isNaN(parseInt(n))?function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")]("px"):n+"px"}():n,r=c.value();(function(){return void 0!==r&&null!==r&&r[Symbol.for("!=")]?r[Symbol.for("!=")](void 0):void 0!=r})()&&(e?(r.style.flexGrow="0",r.style.flexShrink="0",r.style.width="60px",r.style.minWidth=r.style.flexBasis="",r.style.margin="0"):(r.style.flexGrow="",r.style.flexShrink="",r.style.width="",r.style.minWidth=r.style.flexBasis="".concat(o,"px"),r.style.margin=""))}return(0,t.watch)((function(){var e;return null===(e=b.value)||void 0===e?void 0:e.nodes}),(function(n){n&&(e.nodes.value=n)})),{component:m,showGoBack:d,contextRef:b,unref:t.unref,goBack:y}}}),y=o(3744);const b=(0,y.Z)(d,[["render",c],["__scopeId","data-v-66dc9e3e"]]);var v=b,S=o(6948),g=function(e){return(0,t.pushScopeId)("data-v-5f8298e6"),e=e(),(0,t.popScopeId)(),e},p=g((function(){return(0,t.createElementVNode)("h2",null,"Changelog",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),h=g((function(){return(0,t.createElementVNode)("details",{open:""},[(0,t.createElementVNode)("summary",null,[(0,t.createTextVNode)("v0.0 Initial Commit - "),(0,t.createElementVNode)("time",null,"2021-09-04")]),(0,t.createTextVNode)(" This is the first release :D "),(0,t.createElementVNode)("ul",null,[(0,t.createElementVNode)("li",{class:"feature"},"Did everything"),(0,t.createElementVNode)("li",{class:"fix"},"Had some fun"),(0,t.createElementVNode)("li",{class:"breaking"},"Removed everything"),(0,t.createElementVNode)("li",{class:"balancing"},"Created some bugs to fix later")])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),N=(0,t.defineComponent)({setup:function(e,n){var o=n.expose,r=(0,t.ref)(!1);return o({open:function(){r.value=!0}}),function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.value=e})},{header:(0,t.withCtx)((function(){return[p]})),body:(0,t.withCtx)((function(){return[h]})),_:1},8,["modelValue"])}}});const k=(0,y.Z)(N,[["__scopeId","data-v-5f8298e6"]]);var V=k,x=o(9266),M=o(5613),Z=function(e){return(0,t.pushScopeId)("data-v-3eb46986"),e=e(),(0,t.popScopeId)(),e},C={class:"info-modal-header"},w=["src","alt"],B={class:"info-modal-title"},P={key:0},E={key:0},T={key:0},F=Z((function(){return(0,t.createElementVNode)("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),I=Z((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),D=Z((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),R=["href"],O=Z((function(){return(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),_=Z((function(){return(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,t.createTextVNode)(" The Paper Pilot Community ")])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),j=Z((function(){return(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,t.createTextVNode)(" The Modding Tree ")])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),A=Z((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),U=(0,t.defineComponent)({props:{changelog:null},setup:function(e,n){var o=n.expose,r=e,a=u.title,c=u.logo,s=u.author,m=u.discordName,d=u.discordLink,y=u.versionNumber,b=u.versionTitle,v=(0,t.toRefs)(r),g=(0,t.ref)(!1),p=(0,t.computed)((function(){return(0,M.mr)(f.Z.timePlayed)})),h=(0,t.computed)((function(){return(0,i.MM)((0,l.tZ)((function(){return(0,t.createVNode)(t.Fragment,null,[x.II.map(i.sY)])})))}));function N(){var e;null===(e=(0,t.unref)(v.changelog))||void 0===e||e.open()}return o({open:function(){g.value=!0}}),function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return g.value=e})},{header:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",C,[(0,t.unref)(c)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,class:"info-modal-logo",src:(0,t.unref)(c),alt:(0,t.unref)(a)},null,8,w)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",B,[(0,t.createElementVNode)("h2",null,(0,t.toDisplayString)((0,t.unref)(a)),1),(0,t.createElementVNode)("h4",null,[(0,t.createTextVNode)(function(){return" v"[Symbol.for("+")]?" v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(y))):" v"+(0,t.toDisplayString)((0,t.unref)(y))}(),1),(0,t.unref)(b)?((0,t.openBlock)(),(0,t.createElementBlock)("span",P,function(){return": "[Symbol.for("+")]?": "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(b))):": "+(0,t.toDisplayString)((0,t.unref)(b))}(),1)):(0,t.createCommentVNode)("",!0)])])])]})),body:(0,t.withCtx)((function(e){var n=e.shown;return[n?((0,t.openBlock)(),(0,t.createElementBlock)("div",E,[(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)("div",T,function(){return"By "[Symbol.for("+")]?"By "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(s))):"By "+(0,t.toDisplayString)((0,t.unref)(s))}(),1)):(0,t.createCommentVNode)("",!0),F,I,(0,t.createElementVNode)("div",{class:"link",onClick:N},"Changelog"),D,(0,t.createElementVNode)("div",null,[function(){return void 0!==(0,t.unref)(d)&&null!==(0,t.unref)(d)&&(0,t.unref)(d)[Symbol.for("!==")]?(0,t.unref)(d)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,t.unref)(d)}()?((0,t.openBlock)(),(0,t.createElementBlock)("a",{key:0,href:(0,t.unref)(d),class:"info-modal-discord-link"},[O,(0,t.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(m))):" "+(0,t.toDisplayString)((0,t.unref)(m))}(),1)],8,R)):(0,t.createCommentVNode)("",!0)]),_,j,A,(0,t.createElementVNode)("div",null,function(){return"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(p))):"Time Played: "+(0,t.toDisplayString)((0,t.unref)(p))}(),1),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(h))))])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["modelValue"])}}});const q=(0,y.Z)(U,[["__scopeId","data-v-3eb46986"]]);var z=q,L=o(1037),G=o(1349),H=o(3525),W=o(9868),Y=o(264),K=function(e){return(0,t.pushScopeId)("data-v-85d7ae40"),e=e(),(0,t.popScopeId)(),e},J=K((function(){return(0,t.createElementVNode)("div",{class:"header"},[(0,t.createElementVNode)("h2",null,"Options")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Q=K((function(){return(0,t.createElementVNode)("hr",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),$=(0,t.defineComponent)({setup:function(e,n){var o=n.expose,r=(0,t.ref)(!1);o({open:function(){r.value=!0}});var a=Object.keys(L.Z).map((function(e){return{label:(0,G.IJ)(e),value:e}})),c=(0,t.computed)((function(){return(0,i.MM)((0,l.tZ)((function(){return(0,t.createVNode)(t.Fragment,null,[x.V$.map(i.sY)])})))})),s=(0,t.toRefs)(x.ZP),m=s.showTPS,d=s.theme,y=s.unthrottled,b=(0,t.toRefs)(f.Z),v=b.autosave,g=b.offlineProd,p=(0,t.computed)({get:function(){return 0===f.Z.devSpeed},set:function(e){f.Z.devSpeed=e?0:null}}),h=(0,l.tZ)((function(){return(0,t.createVNode)("span",null,[(0,t.createTextVNode)("Offline Production"),(0,t.createVNode)(Y.Z,{display:"Save-specific"},{default:function(){return[(0,t.createTextVNode)("*")]}})])})),N=(0,l.tZ)((function(){return(0,t.createVNode)("span",null,[(0,t.createTextVNode)("Autosave"),(0,t.createVNode)(Y.Z,{display:"Save-specific"},{default:function(){return[(0,t.createTextVNode)("*")]}})])})),k=(0,l.tZ)((function(){return(0,t.createVNode)("span",null,[(0,t.createTextVNode)("Pause game"),(0,t.createVNode)(Y.Z,{display:"Save-specific"},{default:function(){return[(0,t.createTextVNode)("*")]}})])}));return function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:r.value,"onUpdate:modelValue":n[6]||(n[6]=function(e){return r.value=e})},{header:(0,t.withCtx)((function(){return[J]})),body:(0,t.withCtx)((function(){return[(0,t.createVNode)(H.Z,{title:"Theme",options:(0,t.unref)(a),modelValue:(0,t.unref)(d),"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,t.isRef)(d)?d.value=e:null})},null,8,["options","modelValue"]),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(c)))),(0,t.createVNode)(W.Z,{title:"Show TPS",modelValue:(0,t.unref)(m),"onUpdate:modelValue":n[1]||(n[1]=function(e){return(0,t.isRef)(m)?m.value=e:null})},null,8,["modelValue"]),Q,(0,t.createVNode)(W.Z,{title:"Unthrottled",modelValue:(0,t.unref)(y),"onUpdate:modelValue":n[2]||(n[2]=function(e){return(0,t.isRef)(y)?y.value=e:null})},null,8,["modelValue"]),(0,t.createVNode)(W.Z,{title:(0,t.unref)(h),modelValue:(0,t.unref)(g),"onUpdate:modelValue":n[3]||(n[3]=function(e){return(0,t.isRef)(g)?g.value=e:null})},null,8,["title","modelValue"]),(0,t.createVNode)(W.Z,{title:(0,t.unref)(N),modelValue:(0,t.unref)(v),"onUpdate:modelValue":n[4]||(n[4]=function(e){return(0,t.isRef)(v)?v.value=e:null})},null,8,["title","modelValue"]),(0,t.unref)(u).enablePausing?((0,t.openBlock)(),(0,t.createBlock)(W.Z,{key:0,title:(0,t.unref)(k),modelValue:(0,t.unref)(p),"onUpdate:modelValue":n[5]||(n[5]=function(e){return(0,t.isRef)(p)?p.value=e:null})},null,8,["title","modelValue"])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["modelValue"])}}});const X=(0,y.Z)($,[["__scopeId","data-v-85d7ae40"]]);var ee=X,ne=o(5082),oe=o(3336),re=(o(7714),o(2801),o(1174),o(8862),o(3948),o(7042),o(2222),o(4747),o(7327),o(463)),te=o(4520),le={key:0},ie=["onClick","disabled"],ue={key:0},ae=["onClick"],fe=(0,t.defineComponent)({props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup:function(e,n){var o=n.emit,r=e,l=(0,t.toRefs)(r),i=(0,t.ref)(!1);function u(){(0,t.unref)(l.skipConfirm)?o("click"):(i.value&&o("click"),i.value=function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value}())}function a(){i.value=!1}return(0,t.watch)(i,(function(e){o("confirmingChanged",e)})),function(n,o){return(0,t.openBlock)(),(0,t.createElementBlock)("span",{class:(0,t.normalizeClass)(["container",{confirming:i.value}])},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)("span",le,"Are you sure?")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("button",{onClick:(0,t.withModifiers)(u,["stop"]),class:"button danger",disabled:e.disabled},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)("span",ue,"Yes")):(0,t.renderSlot)(n.$slots,"default",{key:1})],8,ie),i.value?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"button",onClick:(0,t.withModifiers)(a,["stop"])},"No",8,ae)):(0,t.createCommentVNode)("",!0)],2)}}});const ce=(0,y.Z)(fe,[["__scopeId","data-v-bf59fca4"]]);var se=ce,me=["onClick"],de=(0,t.defineComponent)({props:{left:{type:Boolean}},emits:["click"],setup:function(e,n){var o=n.emit,r=(0,t.ref)(!1),l=(0,t.ref)(null);function i(){o("click"),l.value&&clearTimeout(l.value),r.value=!1,(0,t.nextTick)((function(){r.value=!0,l.value=setTimeout((function(){return r.value=!1}),500)}))}return function(n,o){return(0,t.openBlock)(),(0,t.createElementBlock)("button",{onClick:(0,t.withModifiers)(i,["stop"]),class:(0,t.normalizeClass)(["feedback",{activated:r.value,left:e.left}])},[(0,t.renderSlot)(n.$slots,"default")],10,me)}}});const ye=(0,y.Z)(de,[["__scopeId","data-v-5bbcedd3"]]);var be=ye,ve=function(e){return(0,t.pushScopeId)("data-v-6a0cf7ac"),e=e(),(0,t.popScopeId)(),e},Se=ve((function(){return(0,t.createElementVNode)("div",{class:"handle material-icons"},"drag_handle",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),ge={key:0,class:"actions"},pe=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"content_paste",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),he=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"content_copy",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ne=[he],ke=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"edit",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ve=[ke],xe=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons",style:{margin:"-2px"}},"delete",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Me={key:1,class:"actions"},Ze=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"check",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ce=[Ze],we=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"close",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Be=[we],Pe={key:2,class:"details"},Ee={class:"save-version"},Te=ve((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Fe={key:0},Ie={key:3,class:"details"},De={key:4,class:"details error"},Re=ve((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Oe=(0,t.defineComponent)({props:{save:null},emits:["export","open","duplicate","delete","editName"],setup:function(e,n){var o=n.emit,r=e,l=(0,t.toRefs)(r),i=l.save,u=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=(0,t.ref)(!1),c=(0,t.ref)(!1),s=(0,t.ref)("");(0,t.watch)(a,(function(){return s.value=i.value.name||""}));var m=(0,t.computed)((function(){return i.value&&i.value.id===f.Z.id})),d=(0,t.computed)((function(){return m.value?f.Z.time:i.value&&i.value.time||0}));function y(){o("editName",s.value),a.value=!1}return function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["save",{active:(0,t.unref)(m)}])},[Se,function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",ge,[function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==c.value&&null!==c.value&&c.value[Symbol.for("!")]?c.value[Symbol.for("!")]():!c.value}()?((0,t.openBlock)(),(0,t.createBlock)(be,{key:0,onClick:n[0]||(n[0]=function(e){return o("export")}),class:"button",left:""},{default:(0,t.withCtx)((function(){return[pe]})),_:1})):(0,t.createCommentVNode)("",!0),function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==c.value&&null!==c.value&&c.value[Symbol.for("!")]?c.value[Symbol.for("!")]():!c.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,onClick:n[1]||(n[1]=function(e){return o("duplicate")}),class:"button"},Ne)):(0,t.createCommentVNode)("",!0),function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==c.value&&null!==c.value&&c.value[Symbol.for("!")]?c.value[Symbol.for("!")]():!c.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:2,onClick:n[2]||(n[2]=function(e){return a.value=function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()}),class:"button"},Ve)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(se,{disabled:(0,t.unref)(m),onClick:n[3]||(n[3]=function(e){return o("delete")}),onConfirmingChanged:n[4]||(n[4]=function(e){return c.value=e})},{default:(0,t.withCtx)((function(){return[xe]})),_:1},8,["disabled"])])):((0,t.openBlock)(),(0,t.createElementBlock)("div",Me,[(0,t.createElementVNode)("button",{onClick:y,class:"button"},Ce),(0,t.createElementVNode)("button",{onClick:n[5]||(n[5]=function(e){return a.value=function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()}),class:"button"},Be)])),function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Pe,[(0,t.createElementVNode)("button",{class:"button open",onClick:n[6]||(n[6]=function(e){return o("open")})},[(0,t.createElementVNode)("h3",null,(0,t.toDisplayString)((0,t.unref)(i).name),1)]),(0,t.createElementVNode)("span",Ee,function(){return"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(i).modVersion)):"v"+(0,t.toDisplayString)((0,t.unref)(i).modVersion)}(),1),Te,(0,t.unref)(d)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Fe,function(){return"Last played "[Symbol.for("+")]?"Last played "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(u).format((0,t.unref)(d)))):"Last played "+(0,t.toDisplayString)((0,t.unref)(u).format((0,t.unref)(d)))}(),1)):(0,t.createCommentVNode)("",!0)])):function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&a.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ie,[(0,t.createVNode)(te.Z,{modelValue:s.value,"onUpdate:modelValue":n[7]||(n[7]=function(e){return s.value=e}),class:"editname",onSubmit:y},null,8,["modelValue"])])):((0,t.openBlock)(),(0,t.createElementBlock)("div",De,[(0,t.createTextVNode)(function(){return" Error: Failed to load save with id "[Symbol.for("+")]?" Error: Failed to load save with id "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(i).id)):" Error: Failed to load save with id "+(0,t.toDisplayString)((0,t.unref)(i).id)}(),1),Re,(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(i).error),1)]))],2)}}});const _e=(0,y.Z)(Oe,[["__scopeId","data-v-6a0cf7ac"]]);var je=_e,Ae=o(9980),Ue=o.n(Ae),qe=function(e){return(0,t.pushScopeId)("data-v-7d95f59e"),e=e(),(0,t.popScopeId)(),e},ze=qe((function(){return(0,t.createElementVNode)("h2",null,"Saves Manager",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Le={class:"modal-footer"},Ge={class:"field"},He=qe((function(){return(0,t.createElementVNode)("span",{class:"field-title"},"Create Save",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),We={class:"field-buttons"},Ye={class:"footer"},Ke=qe((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Je=(0,t.defineComponent)({setup:function(e,n){var r=n.expose,l=(0,t.ref)(!1),i=(0,t.ref)(null);r({open:function(){l.value=!0}});var u=(0,t.ref)(!1),a=(0,t.ref)("");(0,t.watch)(a,(function(e){e?(0,t.nextTick)((function(){try{var n=JSON.parse(decodeURIComponent(escape(atob(e))));if(function(){return void 0!==(0,oe.Z)(n)&&null!==typeof n&&(0,oe.Z)(n)[Symbol.for("!==")]?(0,oe.Z)(n)[Symbol.for("!==")]("object"):"object"!==(0,oe.Z)(n)}())return void(u.value=!0);var o=(0,re.QI)();n.id=o,localStorage.setItem(o,btoa(unescape(encodeURIComponent(JSON.stringify(n))))),a.value="",u.value=!1,x.ZP.saves.push(o)}catch(r){u.value=!0}})):u.value=!1}));var c=o(7634),s=(0,t.ref)(c.keys().reduce((function(e,n){return e.push({label:n.slice(2,function(){return 4[Symbol.for("minus")]?4[Symbol.for("minus")]():-4}()),value:c(n).default}),e}),[])),m=(0,t.shallowReactive)({});function d(e){if(function(){return void 0!==m[e]&&null!==m[e]&&m[e][Symbol.for("==")]?m[e][Symbol.for("==")](null):null==m[e]}()){var n=localStorage.getItem(e);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}())m[e]={error:"Save doesn't exist in localStorage",id:e};else if("dW5kZWZpbmVk"===n)m[e]={error:"Save is undefined",id:e};else try{m[e]=(0,ne.Z)((0,ne.Z)({},JSON.parse(decodeURIComponent(escape(atob(n))))),{},{id:e})}catch(o){m[e]={error:o,id:e},console.warn("SavesManager: Failed to load info about save with id ".concat(e,":\n").concat(o,"\n").concat(n))}}return m[e]}(0,t.watch)(l,(function(e){e&&Object.keys(m).forEach((function(e){return function(){return void 0!==m&&null!==m&&m[Symbol.for("delete")]?m[Symbol.for("delete")]("key"):delete m.key}()}))}));var y=(0,t.computed)((function(){return x.ZP.saves.reduce((function(e,n){return e[n]=d(n),e}),{})}));function b(e){var n;n=f.Z.id===e?(0,re.a1)():btoa(unescape(encodeURIComponent(JSON.stringify(y.value[e]))));var o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),o.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(o)}function v(e){f.Z.id===e&&(0,re.a1)();var n=(0,ne.Z)((0,ne.Z)({},y.value[e]),{},{id:(0,re.QI)()});localStorage.setItem(n.id,btoa(unescape(encodeURIComponent(JSON.stringify(n))))),x.ZP.saves.push(n.id)}function g(e){x.ZP.saves=x.ZP.saves.filter((function(n){return function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](e):n!==e}()})),localStorage.removeItem(e),m[e]=void 0}function p(e){y.value[f.Z.id].time=f.Z.time,(0,re.a1)(),(0,re.uW)(y.value[e]),m[e]=void 0}function h(e){var n=JSON.parse(decodeURIComponent(escape(atob(e))));n.id=(0,re.QI)(),localStorage.setItem(n.id,btoa(unescape(encodeURIComponent(JSON.stringify(n))))),x.ZP.saves.push(n.id)}function N(e,n){var o=y.value[e];o&&(o.name=n,f.Z.id===e?(f.Z.name=n,(0,re.a1)()):(localStorage.setItem(e,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),m[e]=void 0))}return function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:l.value,"onUpdate:modelValue":n[4]||(n[4]=function(e){return l.value=e}),ref_key:"modal",ref:i},{header:(0,t.withCtx)((function(){return[ze]})),body:(0,t.withCtx)((function(e){var n=e.shown;return[n?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ue()),{key:0,list:(0,t.unref)(x.ZP).saves,handle:".handle",itemKey:function(e){return e}},{item:(0,t.withCtx)((function(e){var n=e.element;return[(0,t.createVNode)(je,{save:(0,t.unref)(y)[n],onOpen:function(e){return p(n)},onExport:function(e){return b(n)},onEditName:function(e){return N(n,e)},onDuplicate:function(e){return v(n)},onDelete:function(e){return g(n)}},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]})),_:1},8,["list","itemKey"])):(0,t.createCommentVNode)("",!0)]})),footer:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",Le,[(0,t.createVNode)(te.Z,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.value=e}),title:"Import Save",placeholder:"Paste your save here!",class:(0,t.normalizeClass)({importingFailed:u.value})},null,8,["modelValue","class"]),(0,t.createElementVNode)("div",Ge,[He,(0,t.createElementVNode)("div",We,[(0,t.createElementVNode)("button",{class:"button",onClick:n[1]||(n[1]=function(){return(0,t.unref)(re.xM)&&(0,t.unref)(re.xM).apply(void 0,arguments)})},"New Game"),function(){return void 0!==Object.keys((0,t.unref)(s)).length&&null!==Object.keys((0,t.unref)(s)).length&&Object.keys((0,t.unref)(s)).length[Symbol.for(">")]?Object.keys((0,t.unref)(s)).length[Symbol.for(">")](0):Object.keys((0,t.unref)(s)).length>0}()?((0,t.openBlock)(),(0,t.createBlock)(H.Z,{key:0,options:(0,t.unref)(s),modelValue:void 0,"onUpdate:modelValue":n[2]||(n[2]=function(e){return h(e)}),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,t.createCommentVNode)("",!0)])]),(0,t.createElementVNode)("div",Ye,[Ke,(0,t.createElementVNode)("button",{class:"button modal-default-button",onClick:n[3]||(n[3]=function(e){return l.value=!1})}," Close ")])])]})),_:1},8,["modelValue"])}}});const Qe=(0,y.Z)(Je,[["__scopeId","data-v-7d95f59e"]]);var $e=Qe,Xe=o(4096),en=function(e){return(0,t.pushScopeId)("data-v-71847eca"),e=e(),(0,t.popScopeId)(),e},nn=["src","alt"],on={key:1,class:"title"},rn=en((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),tn={class:"discord"},ln={class:"discord-links"},un={key:0},an=["href"],fn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),cn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),sn={href:"https://forums.moddingtree.com/",target:"_blank"},mn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),dn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),yn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),bn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),vn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Sn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),gn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),pn={href:"https://forums.moddingtree.com/",target:"_blank"},hn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Nn={class:"discord"},kn={class:"discord-links"},Vn={key:0},xn=["href"],Mn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Zn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Cn=(0,t.defineComponent)({setup:function(e){var n=(0,t.ref)(null),o=(0,t.ref)(null),r=(0,t.ref)(null),l=(0,t.ref)(null),i=u.useHeader,a=u.banner,f=u.title,c=u.discordName,s=u.discordLink,m=u.versionNumber;function d(){window.open(s,"mywindow")}return function(e,u){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.unref)(i)?((0,t.openBlock)(),(0,t.createElementBlock)("div",(0,t.mergeProps)({key:0,class:"nav"},e.$attrs),[(0,t.unref)(a)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:(0,t.unref)(a),class:"banner",alt:(0,t.unref)(f)},null,8,nn)):((0,t.openBlock)(),(0,t.createElementBlock)("div",on,(0,t.toDisplayString)((0,t.unref)(f)),1)),(0,t.createElementVNode)("div",{onClick:u[0]||(u[0]=function(e){var n;return null===(n=l.value)||void 0===n?void 0:n.open()}),class:"version-container"},[(0,t.createVNode)(Y.Z,{display:"Changelog",direction:(0,t.unref)(Xe.A).DOWN,class:"version"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",null,function(){return"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(m))):"v"+(0,t.toDisplayString)((0,t.unref)(m))}(),1)]})),_:1},8,["direction"])]),rn,(0,t.createElementVNode)("div",tn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",ln,[function(){return void 0!==(0,t.unref)(s)&&null!==(0,t.unref)(s)&&(0,t.unref)(s)[Symbol.for("!==")]?(0,t.unref)(s)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,t.unref)(s)}()?((0,t.openBlock)(),(0,t.createElementBlock)("li",un,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,an)])):(0,t.createCommentVNode)("",!0),fn,cn])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",sn,[(0,t.createVNode)(Y.Z,{display:"Forums",direction:(0,t.unref)(Xe.A).DOWN,yoffset:"5px"},{default:(0,t.withCtx)((function(){return[mn]})),_:1},8,["direction"])])]),(0,t.createElementVNode)("div",{onClick:u[1]||(u[1]=function(e){var o;return null===(o=n.value)||void 0===o?void 0:o.open()})},[(0,t.createVNode)(Y.Z,{display:"Info",direction:(0,t.unref)(Xe.A).DOWN,class:"info"},{default:(0,t.withCtx)((function(){return[dn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[2]||(u[2]=function(e){var n;return null===(n=o.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Saves",direction:(0,t.unref)(Xe.A).DOWN,xoffset:"-20px"},{default:(0,t.withCtx)((function(){return[yn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[3]||(u[3]=function(e){var n;return null===(n=r.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Options",direction:(0,t.unref)(Xe.A).DOWN,xoffset:"-66px"},{default:(0,t.withCtx)((function(){return[bn]})),_:1},8,["direction"])])],16)):((0,t.openBlock)(),(0,t.createElementBlock)("div",(0,t.mergeProps)({key:1,class:"overlay-nav"},e.$attrs),[(0,t.createElementVNode)("div",{onClick:u[4]||(u[4]=function(e){var n;return null===(n=l.value)||void 0===n?void 0:n.open()}),class:"version-container"},[(0,t.createVNode)(Y.Z,{display:"Changelog",direction:(0,t.unref)(Xe.A).RIGHT,xoffset:"25%",class:"version"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",null,function(){return"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(m))):"v"+(0,t.toDisplayString)((0,t.unref)(m))}(),1)]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[5]||(u[5]=function(e){var n;return null===(n=o.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Saves",direction:(0,t.unref)(Xe.A).RIGHT},{default:(0,t.withCtx)((function(){return[vn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[6]||(u[6]=function(e){var n;return null===(n=r.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Options",direction:(0,t.unref)(Xe.A).RIGHT},{default:(0,t.withCtx)((function(){return[Sn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[7]||(u[7]=function(e){var o;return null===(o=n.value)||void 0===o?void 0:o.open()})},[(0,t.createVNode)(Y.Z,{display:"Info",direction:(0,t.unref)(Xe.A).RIGHT},{default:(0,t.withCtx)((function(){return[gn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",pn,[(0,t.createVNode)(Y.Z,{display:"Forums",direction:(0,t.unref)(Xe.A).RIGHT,xoffset:"7px"},{default:(0,t.withCtx)((function(){return[hn]})),_:1},8,["direction"])])]),(0,t.createElementVNode)("div",Nn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",kn,[function(){return void 0!==(0,t.unref)(s)&&null!==(0,t.unref)(s)&&(0,t.unref)(s)[Symbol.for("!==")]?(0,t.unref)(s)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,t.unref)(s)}()?((0,t.openBlock)(),(0,t.createElementBlock)("li",Vn,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,xn)])):(0,t.createCommentVNode)("",!0),Mn,Zn])])],16)),(0,t.createVNode)(z,{ref_key:"info",ref:n,changelog:l.value},null,8,["changelog"]),(0,t.createVNode)($e,{ref_key:"savesManager",ref:o},null,512),(0,t.createVNode)(ee,{ref_key:"options",ref:r},null,512),(0,t.createVNode)(V,{ref_key:"changelog",ref:l},null,512)],64)}}});const wn=(0,y.Z)(Cn,[["__scopeId","data-v-71847eca"]]);var Bn=wn,Pn={class:"inner-tab"},En={key:1,class:"separator"},Tn=(0,t.defineComponent)({setup:function(e){var n=(0,t.toRef)(f.Z,"tabs"),o=(0,t.computed)((function(){return Object.keys(a.layers)})),r=u.useHeader;function l(e){var n=e.display,o=e.minimized,r=e.minWidth,t=e.name,l=e.color,i=e.style,u=e.classes,a=e.minimizable,f=e.nodes;return{display:n,minimized:o,minWidth:r,name:t,color:l,style:i,classes:u,minimizable:a,nodes:f}}return function(e,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["tabs-container",{useHeader:(0,t.unref)(r)}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(n),(function(i,u){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:u,class:"tab",ref_for:!0,ref:"tab-".concat(u)},[0===u&&function(){return void 0!==(0,t.unref)(r)&&null!==(0,t.unref)(r)&&(0,t.unref)(r)[Symbol.for("!")]?(0,t.unref)(r)[Symbol.for("!")]():!(0,t.unref)(r)}()?((0,t.openBlock)(),(0,t.createBlock)(Bn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Pn,[(0,t.unref)(o).includes(i)?((0,t.openBlock)(),(0,t.createBlock)(v,(0,t.mergeProps)({key:0},l((0,t.unref)(a.layers)[i]),{index:u,tab:function(){var n;return null===(n=e.$refs["tab-".concat(u)])||void 0===n?void 0:n[0]}}),null,16,["index","tab"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(i),{key:1,index:u},null,8,["index"]))]),function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")]((0,t.unref)(n).length-1):u!==(0,t.unref)(n).length-1}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",En)):(0,t.createCommentVNode)("",!0)])})),128))],2)}}});const Fn=(0,y.Z)(Tn,[["__scopeId","data-v-4fd7697b"]]);var In=Fn,Dn=o(1657),Rn=function(e){return(0,t.pushScopeId)("data-v-06188cc8"),e=e(),(0,t.popScopeId)(),e},On={class:"game-over-modal-header"},_n=["src","alt"],jn={class:"game-over-modal-title"},An=Rn((function(){return(0,t.createElementVNode)("h2",null,"Congratulations!",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Un={key:0},qn=Rn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),zn=Rn((function(){return(0,t.createElementVNode)("div",null," Please check the Discord to discuss the game or to check for new content updates! ",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ln=Rn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Gn=["href"],Hn=Rn((function(){return(0,t.createElementVNode)("span",{class:"material-icons game-over-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Wn=(0,t.defineComponent)({setup:function(e){var n=u.title,o=u.logo,r=u.discordName,l=u.discordLink,i=u.versionNumber,a=u.versionTitle,c=(0,t.computed)((function(){return(0,M.mr)(f.Z.timePlayed)})),s=(0,t.computed)((function(){return Dn.hasWon.value&&function(){return void 0!==f.Z.keepGoing&&null!==f.Z.keepGoing&&f.Z.keepGoing[Symbol.for("!")]?f.Z.keepGoing[Symbol.for("!")]():!f.Z.keepGoing}()})),m=(0,t.toRef)(f.Z,"autosave");function d(){f.Z.keepGoing=!0}function y(){(0,re.uW)((0,re.xM)())}return function(e,u){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{"model-value":(0,t.unref)(s)},{header:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",On,[(0,t.unref)(o)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,class:"game-over-modal-logo",src:(0,t.unref)(o),alt:(0,t.unref)(n)},null,8,_n)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",jn,[An,(0,t.createElementVNode)("h4",null,function(){return"You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": "!==void 0&&"You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": "!==null&&("You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": ")[Symbol.for("+")]?("You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": ")[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(a))):"You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": "+(0,t.toDisplayString)((0,t.unref)(a))}(),1)])])]})),body:(0,t.withCtx)((function(e){var n=e.shown;return[n?((0,t.openBlock)(),(0,t.createElementBlock)("div",Un,[(0,t.createElementVNode)("div",null,function(){return"It took you "+(0,t.toDisplayString)((0,t.unref)(c))!==void 0&&"It took you "+(0,t.toDisplayString)((0,t.unref)(c))!==null&&("It took you "+(0,t.toDisplayString)((0,t.unref)(c)))[Symbol.for("+")]?("It took you "+(0,t.toDisplayString)((0,t.unref)(c)))[Symbol.for("+")](" to beat the game."):"It took you "+(0,t.toDisplayString)((0,t.unref)(c))+" to beat the game."}(),1),qn,zn,Ln,(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:(0,t.unref)(l),class:"game-over-modal-discord-link"},[Hn,(0,t.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(r))):" "+(0,t.toDisplayString)((0,t.unref)(r))}(),1)],8,Gn)]),(0,t.createVNode)(W.Z,{title:"Autosave",modelValue:(0,t.unref)(m),"onUpdate:modelValue":u[0]||(u[0]=function(e){return(0,t.isRef)(m)?m.value=e:null})},null,8,["modelValue"])])):(0,t.createCommentVNode)("",!0)]})),footer:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",{class:"game-over-footer"},[(0,t.createElementVNode)("button",{onClick:d,class:"button"},"Keep Going"),(0,t.createElementVNode)("button",{onClick:y,class:"button danger"},"Play Again")])]})),_:1},8,["model-value"])}}});const Yn=(0,y.Z)(Wn,[["__scopeId","data-v-06188cc8"]]);var Kn=Yn,Jn=(o(9600),o(3032)),Qn=function(e){return(0,t.pushScopeId)("data-v-5935214c"),e=e(),(0,t.popScopeId)(),e},$n=Qn((function(){return(0,t.createElementVNode)("div",{class:"nan-modal-header"},[(0,t.createElementVNode)("h2",null,"NaN value detected!")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Xn={key:0},eo=Qn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),no=["href"],oo=Qn((function(){return(0,t.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),ro=Qn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),to={class:"nan-footer"},lo=(0,t.defineComponent)({setup:function(e){var n=u.discordName,o=u.discordLink,r=(0,t.toRef)(f.Z,"autosave"),l=(0,t.toRef)(Jn.Z,"hasNaN"),i=(0,t.ref)(null),a=(0,t.computed)((function(){var e;return null===(e=Jn.Z.NaNPath)||void 0===e?void 0:e.join(".")})),c=(0,t.computed)((function(){var e;return null===(e=Jn.Z.NaNPath)||void 0===e?void 0:e.slice(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())[0]})),s=(0,t.computed)((function(){return Jn.Z.NaNReceiver&&c.value?Jn.Z.NaNReceiver[c.value]:null})),m=(0,t.computed)({get:function(){return 0===f.Z.devSpeed},set:function(e){f.Z.devSpeed=e?null:0}});function d(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new M.ZP(0),Jn.Z.hasNaN=!1)}function y(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new M.ZP(1),Jn.Z.hasNaN=!1)}function b(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new M.ZP(NaN),Jn.Z.hasNaN=!1)}return function(e,f){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(S.Z,(0,t.mergeProps)({modelValue:(0,t.unref)(l),"onUpdate:modelValue":f[4]||(f[4]=function(e){return(0,t.isRef)(l)?l.value=e:null})},e.$attrs),{header:(0,t.withCtx)((function(){return[$n]})),body:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",null,[(0,t.createTextVNode)(function(){return' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a))!==void 0&&' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a))!==null&&(' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a)))[Symbol.for("+")]?(' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a)))[Symbol.for("+")]('" to NaN'):' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a))+'" to NaN'}(),1),(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)("span",Xn,function(){return(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s)))!==void 0&&(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s)))!==null&&((0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s))))[Symbol.for("+")]?((0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s))))[Symbol.for("+")](")"):(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s)))+")"}(),1)):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(function(){return". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled")!==void 0&&". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled")!==null&&(". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled"))[Symbol.for("+")]?(". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled"))[Symbol.for("+")](". Check the console for more details, and consider sharing it with the developers on discord. "):". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. "}(),1)]),eo,(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:(0,t.unref)(o),class:"nan-modal-discord-link"},[oo,(0,t.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(n))):" "+(0,t.toDisplayString)((0,t.unref)(n))}(),1)],8,no)]),ro,(0,t.createVNode)(W.Z,{title:"Autosave",modelValue:(0,t.unref)(r),"onUpdate:modelValue":f[0]||(f[0]=function(e){return(0,t.isRef)(r)?r.value=e:null})},null,8,["modelValue"]),(0,t.unref)(u).enablePausing?((0,t.openBlock)(),(0,t.createBlock)(W.Z,{key:0,title:"Pause game",modelValue:(0,t.unref)(m),"onUpdate:modelValue":f[1]||(f[1]=function(e){return(0,t.isRef)(m)?m.value=e:null})},null,8,["modelValue"])):(0,t.createCommentVNode)("",!0)]})),footer:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",to,[(0,t.createElementVNode)("button",{onClick:f[2]||(f[2]=function(e){var n;return null===(n=i.value)||void 0===n?void 0:n.open()}),class:"button"},"Open Saves Manager"),(0,t.createElementVNode)("button",{onClick:d,class:"button"},"Set to 0"),(0,t.createElementVNode)("button",{onClick:y,class:"button"},"Set to 1"),(0,t.unref)(s)&&(0,t.unref)(M.ZP).neq((0,t.unref)(s),0)&&(0,t.unref)(M.ZP).neq((0,t.unref)(s),1)?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,onClick:f[3]||(f[3]=function(e){return l.value=!1}),class:"button"}," Set to previous ")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("button",{onClick:b,class:"button danger"},"Ignore")])]})),_:1},16,["modelValue"]),(0,t.createVNode)($e,{ref_key:"savesManager",ref:i},null,512)],64)}}});const io=(0,y.Z)(lo,[["__scopeId","data-v-5935214c"]]);var uo=io,ao=(o(86),{key:0,class:"tpsDisplay"}),fo={key:0,class:"low"},co=(0,t.defineComponent)({setup:function(e){var n=(0,t.computed)((function(){return M.ZP.div(Jn.Z.lastTenTicks.length,Jn.Z.lastTenTicks.reduce((function(e,n){return function(){return void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](n):e+n}()}),0))})),o=(0,t.ref)([]);(0,t.watchEffect)((function(){o.value.push(Math.round(n.value.toNumber())),function(){return void 0!==o.value.length&&null!==o.value.length&&o.value.length[Symbol.for(">")]?o.value.length[Symbol.for(">")](10):o.value.length>10}()&&(o.value=o.value.slice(1))}));var r=(0,t.computed)((function(){return o.value.reduce((function(e,n){return M.ZP.max(e,n)}),0)})),l=(0,t.computed)((function(){return M.ZP.sub(n.value,r.value).gt(1)}));return function(e,o){return function(){return void 0!==(0,t.unref)(n).isNan()&&null!==(0,t.unref)(n).isNan()&&(0,t.unref)(n).isNan()[Symbol.for("!")]?(0,t.unref)(n).isNan()[Symbol.for("!")]():!(0,t.unref)(n).isNan()}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",ao,[(0,t.createTextVNode)(function(){return" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n)))!==void 0&&" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n)))!==null&&(" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n))))[Symbol.for("+")]?(" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n))))[Symbol.for("+")](" "):" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n)))+" "}(),1),(0,t.createVNode)(t.Transition,{name:"fade"},{default:(0,t.withCtx)((function(){return[(0,t.unref)(l)?((0,t.openBlock)(),(0,t.createElementBlock)("span",fo,(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(r))),1)):(0,t.createCommentVNode)("",!0)]})),_:1})])):(0,t.createCommentVNode)("",!0)}}});const so=(0,y.Z)(co,[["__scopeId","data-v-c0663118"]]);var mo=so,yo=(0,t.defineComponent)({setup:function(e){var n=u.useHeader,o=(0,t.computed)((function(){return L.Z[x.ZP.theme].variables})),r=(0,t.toRef)(x.ZP,"showTPS"),a=(0,t.computed)((function(){return(0,i.MM)((0,l.tZ)((function(){return(0,t.createVNode)(t.Fragment,null,[x.t.map(i.sY)])})))}));return function(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",{id:"modal-root",style:(0,t.normalizeStyle)((0,t.unref)(o))},null,4),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["app",{useHeader:(0,t.unref)(n)}]),style:(0,t.normalizeStyle)((0,t.unref)(o))},[(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createBlock)(Bn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(In),(0,t.unref)((0,t.unref)(r))?((0,t.openBlock)(),(0,t.createBlock)(mo,{key:1})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Kn),(0,t.createVNode)(uo),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(a))))],6)],64)}}});const bo=(0,y.Z)(yo,[["__scopeId","data-v-f13f28b6"]]);var vo=bo;if(document.title=u.title,""===u.id)throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame((0,r.Z)(regeneratorRuntime.mark((function e(){var n,r,l,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("%cMade in Profectus%c\nLearn more at www.moddingtree.com","font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),e.next=3,(0,re.zD)();case 3:return e.next=5,o(7302);case 5:n=e.sent,r=n.globalBus,l=n.startGameLoop,i=window.vue=(0,t.createApp)(vo),r.emit("setupVue",i),i.mount("#app"),l();case 12:case"end":return e.stop()}}),e)})))),window.projInfo=u},5613:function(e,n,o){"use strict";o.d(n,{ZP:function(){return Se},WU:function(){return se},mr:function(){return de},Ht:function(){return me}});o(2526),o(1817),o(1539),o(6977),o(4916),o(3123),o(5306),o(9653),o(86);var r,t,l,i,u,a,f,c,s,m,d,y=o(3087),b=o(2833),v=o(2482),S=o(3336),g=(o(658),o(2420),o(3689),o(5192),o(1703),o(9714),o(3210),o(2481),o(1354),o(4914),17),p=9e15,h=Math.log10(9e15),N=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](9e15):1/9e15}(),k=308,V=function(){return 324[Symbol.for("minus")]?324[Symbol.for("minus")]():-324}(),x=5,M=!0,Z=!1,C=function(){for(var e=[],n=function(){return void 0!==V&&null!==V&&V[Symbol.for("+")]?V[Symbol.for("+")](1):V+1}();function(){return void 0!==n&&null!==n&&n[Symbol.for("<=")]?n[Symbol.for("<=")](k):n<=k}();function(){return void 0!==n&&null!==n&&"object"===(0,S.Z)(n)&&n[Symbol.for("postfix-increment")]?n[Symbol.for("postfix-increment")]():n++}())e.push(Number(function(){return"1e"[Symbol.for("+")]?"1e"[Symbol.for("+")](n):"1e"+n}()));var o=323;return function(n){return e[function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](o):n+o}()]}}(),w=[2,Math.E,3,4,5,6,7,8,9,10],B=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],P=[[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.9194161097107025[Symbol.for("minus")]?.9194161097107025[Symbol.for("minus")]():-.9194161097107025}(),function(){return.8335625019330468[Symbol.for("minus")]?.8335625019330468[Symbol.for("minus")]():-.8335625019330468}(),function(){return.7425599821143978[Symbol.for("minus")]?.7425599821143978[Symbol.for("minus")]():-.7425599821143978}(),function(){return.6466611521029437[Symbol.for("minus")]?.6466611521029437[Symbol.for("minus")]():-.6466611521029437}(),function(){return.5462617907227869[Symbol.for("minus")]?.5462617907227869[Symbol.for("minus")]():-.5462617907227869}(),function(){return.4419033816638769[Symbol.for("minus")]?.4419033816638769[Symbol.for("minus")]():-.4419033816638769}(),function(){return.3342645487554494[Symbol.for("minus")]?.3342645487554494[Symbol.for("minus")]():-.3342645487554494}(),function(){return.224140440909962[Symbol.for("minus")]?.224140440909962[Symbol.for("minus")]():-.224140440909962}(),function(){return.11241087890006762[Symbol.for("minus")]?.11241087890006762[Symbol.for("minus")]():-.11241087890006762}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.90603157029014[Symbol.for("minus")]?.90603157029014[Symbol.for("minus")]():-.90603157029014}(),function(){return.80786507256596[Symbol.for("minus")]?.80786507256596[Symbol.for("minus")]():-.80786507256596}(),function(){return.7064666939634[Symbol.for("minus")]?.7064666939634[Symbol.for("minus")]():-.7064666939634}(),function(){return.60294836853664[Symbol.for("minus")]?.60294836853664[Symbol.for("minus")]():-.60294836853664}(),function(){return.49849837513117[Symbol.for("minus")]?.49849837513117[Symbol.for("minus")]():-.49849837513117}(),function(){return.39430303318768[Symbol.for("minus")]?.39430303318768[Symbol.for("minus")]():-.39430303318768}(),function(){return.29147201034755[Symbol.for("minus")]?.29147201034755[Symbol.for("minus")]():-.29147201034755}(),function(){return.19097820800866[Symbol.for("minus")]?.19097820800866[Symbol.for("minus")]():-.19097820800866}(),function(){return.09361896280296[Symbol.for("minus")]?.09361896280296[Symbol.for("minus")]():-.09361896280296}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.9021579584316141[Symbol.for("minus")]?.9021579584316141[Symbol.for("minus")]():-.9021579584316141}(),function(){return.8005762598234203[Symbol.for("minus")]?.8005762598234203[Symbol.for("minus")]():-.8005762598234203}(),function(){return.6964780623319391[Symbol.for("minus")]?.6964780623319391[Symbol.for("minus")]():-.6964780623319391}(),function(){return.5911906810998454[Symbol.for("minus")]?.5911906810998454[Symbol.for("minus")]():-.5911906810998454}(),function(){return.486050182576545[Symbol.for("minus")]?.486050182576545[Symbol.for("minus")]():-.486050182576545}(),function(){return.3823089430815083[Symbol.for("minus")]?.3823089430815083[Symbol.for("minus")]():-.3823089430815083}(),function(){return.28106046722897615[Symbol.for("minus")]?.28106046722897615[Symbol.for("minus")]():-.28106046722897615}(),function(){return.1831906535795894[Symbol.for("minus")]?.1831906535795894[Symbol.for("minus")]():-.1831906535795894}(),function(){return.08935809204418144[Symbol.for("minus")]?.08935809204418144[Symbol.for("minus")]():-.08935809204418144}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8917227442365535[Symbol.for("minus")]?.8917227442365535[Symbol.for("minus")]():-.8917227442365535}(),function(){return.781258746326964[Symbol.for("minus")]?.781258746326964[Symbol.for("minus")]():-.781258746326964}(),function(){return.6705130326902455[Symbol.for("minus")]?.6705130326902455[Symbol.for("minus")]():-.6705130326902455}(),function(){return.5612813129406509[Symbol.for("minus")]?.5612813129406509[Symbol.for("minus")]():-.5612813129406509}(),function(){return.4551067709033134[Symbol.for("minus")]?.4551067709033134[Symbol.for("minus")]():-.4551067709033134}(),function(){return.35319256652135966[Symbol.for("minus")]?.35319256652135966[Symbol.for("minus")]():-.35319256652135966}(),function(){return.2563741554088552[Symbol.for("minus")]?.2563741554088552[Symbol.for("minus")]():-.2563741554088552}(),function(){return.1651412821106526[Symbol.for("minus")]?.1651412821106526[Symbol.for("minus")]():-.1651412821106526}(),function(){return.0796919581982668[Symbol.for("minus")]?.0796919581982668[Symbol.for("minus")]():-.0796919581982668}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8843387974366064[Symbol.for("minus")]?.8843387974366064[Symbol.for("minus")]():-.8843387974366064}(),function(){return.7678744063886243[Symbol.for("minus")]?.7678744063886243[Symbol.for("minus")]():-.7678744063886243}(),function(){return.6529563724510552[Symbol.for("minus")]?.6529563724510552[Symbol.for("minus")]():-.6529563724510552}(),function(){return.5415870994657841[Symbol.for("minus")]?.5415870994657841[Symbol.for("minus")]():-.5415870994657841}(),function(){return.4352842206588936[Symbol.for("minus")]?.4352842206588936[Symbol.for("minus")]():-.4352842206588936}(),function(){return.33504449124791424[Symbol.for("minus")]?.33504449124791424[Symbol.for("minus")]():-.33504449124791424}(),function(){return.24138853420685147[Symbol.for("minus")]?.24138853420685147[Symbol.for("minus")]():-.24138853420685147}(),function(){return.15445285440944467[Symbol.for("minus")]?.15445285440944467[Symbol.for("minus")]():-.15445285440944467}(),function(){return.07409659641336663[Symbol.for("minus")]?.07409659641336663[Symbol.for("minus")]():-.07409659641336663}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8786709358426346[Symbol.for("minus")]?.8786709358426346[Symbol.for("minus")]():-.8786709358426346}(),function(){return.7577735191184886[Symbol.for("minus")]?.7577735191184886[Symbol.for("minus")]():-.7577735191184886}(),function(){return.6399546189952064[Symbol.for("minus")]?.6399546189952064[Symbol.for("minus")]():-.6399546189952064}(),function(){return.527284921869926[Symbol.for("minus")]?.527284921869926[Symbol.for("minus")]():-.527284921869926}(),function(){return.4211627631006314[Symbol.for("minus")]?.4211627631006314[Symbol.for("minus")]():-.4211627631006314}(),function(){return.3223479611761232[Symbol.for("minus")]?.3223479611761232[Symbol.for("minus")]():-.3223479611761232}(),function(){return.23107655627789858[Symbol.for("minus")]?.23107655627789858[Symbol.for("minus")]():-.23107655627789858}(),function(){return.1472057700818259[Symbol.for("minus")]?.1472057700818259[Symbol.for("minus")]():-.1472057700818259}(),function(){return.07035171210706326[Symbol.for("minus")]?.07035171210706326[Symbol.for("minus")]():-.07035171210706326}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8740862815291583[Symbol.for("minus")]?.8740862815291583[Symbol.for("minus")]():-.8740862815291583}(),function(){return.7497032990976209[Symbol.for("minus")]?.7497032990976209[Symbol.for("minus")]():-.7497032990976209}(),function(){return.6297119746181752[Symbol.for("minus")]?.6297119746181752[Symbol.for("minus")]():-.6297119746181752}(),function(){return.5161838335958787[Symbol.for("minus")]?.5161838335958787[Symbol.for("minus")]():-.5161838335958787}(),function(){return.41036238255751956[Symbol.for("minus")]?.41036238255751956[Symbol.for("minus")]():-.41036238255751956}(),function(){return.31277212146489963[Symbol.for("minus")]?.31277212146489963[Symbol.for("minus")]():-.31277212146489963}(),function(){return.2233976621705518[Symbol.for("minus")]?.2233976621705518[Symbol.for("minus")]():-.2233976621705518}(),function(){return.1418697367979619[Symbol.for("minus")]?.1418697367979619[Symbol.for("minus")]():-.1418697367979619}(),function(){return.06762117662323441[Symbol.for("minus")]?.06762117662323441[Symbol.for("minus")]():-.06762117662323441}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8702632331800649[Symbol.for("minus")]?.8702632331800649[Symbol.for("minus")]():-.8702632331800649}(),function(){return.7430366914122081[Symbol.for("minus")]?.7430366914122081[Symbol.for("minus")]():-.7430366914122081}(),function(){return.6213373075161548[Symbol.for("minus")]?.6213373075161548[Symbol.for("minus")]():-.6213373075161548}(),function(){return.5072025698095242[Symbol.for("minus")]?.5072025698095242[Symbol.for("minus")]():-.5072025698095242}(),function(){return.40171437727184167[Symbol.for("minus")]?.40171437727184167[Symbol.for("minus")]():-.40171437727184167}(),function(){return.30517930701410456[Symbol.for("minus")]?.30517930701410456[Symbol.for("minus")]():-.30517930701410456}(),function(){return.21736343968190863[Symbol.for("minus")]?.21736343968190863[Symbol.for("minus")]():-.21736343968190863}(),function(){return.137710238299109[Symbol.for("minus")]?.137710238299109[Symbol.for("minus")]():-.137710238299109}(),function(){return.06550774483471955[Symbol.for("minus")]?.06550774483471955[Symbol.for("minus")]():-.06550774483471955}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8670016295947213[Symbol.for("minus")]?.8670016295947213[Symbol.for("minus")]():-.8670016295947213}(),function(){return.7373984232432306[Symbol.for("minus")]?.7373984232432306[Symbol.for("minus")]():-.7373984232432306}(),function(){return.6143173985094293[Symbol.for("minus")]?.6143173985094293[Symbol.for("minus")]():-.6143173985094293}(),function(){return.49973884395492807[Symbol.for("minus")]?.49973884395492807[Symbol.for("minus")]():-.49973884395492807}(),function(){return.394584953527678[Symbol.for("minus")]?.394584953527678[Symbol.for("minus")]():-.394584953527678}(),function(){return.2989649949848695[Symbol.for("minus")]?.2989649949848695[Symbol.for("minus")]():-.2989649949848695}(),function(){return.21245647317021688[Symbol.for("minus")]?.21245647317021688[Symbol.for("minus")]():-.21245647317021688}(),function(){return.13434688362382652[Symbol.for("minus")]?.13434688362382652[Symbol.for("minus")]():-.13434688362382652}(),function(){return.0638072667348083[Symbol.for("minus")]?.0638072667348083[Symbol.for("minus")]():-.0638072667348083}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8641642839543857[Symbol.for("minus")]?.8641642839543857[Symbol.for("minus")]():-.8641642839543857}(),function(){return.732534623168535[Symbol.for("minus")]?.732534623168535[Symbol.for("minus")]():-.732534623168535}(),function(){return.6083127477059322[Symbol.for("minus")]?.6083127477059322[Symbol.for("minus")]():-.6083127477059322}(),function(){return.4934049257184696[Symbol.for("minus")]?.4934049257184696[Symbol.for("minus")]():-.4934049257184696}(),function(){return.3885773075899922[Symbol.for("minus")]?.3885773075899922[Symbol.for("minus")]():-.3885773075899922}(),function(){return.29376029055315767[Symbol.for("minus")]?.29376029055315767[Symbol.for("minus")]():-.29376029055315767}(),function(){return.2083678561173622[Symbol.for("minus")]?.2083678561173622[Symbol.for("minus")]():-.2083678561173622}(),function(){return.13155653399373268[Symbol.for("minus")]?.13155653399373268[Symbol.for("minus")]():-.13155653399373268}(),function(){return.062401588652553186[Symbol.for("minus")]?.062401588652553186[Symbol.for("minus")]():-.062401588652553186}(),0]],E=function(e){return A.fromValue_noAlloc(e)},T=function(e,n,o){return A.fromComponents(e,n,o)},F=function(e,n,o){return A.fromComponents_noNormalize(e,n,o)},I=function(e,n){var o=function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](1):n+1}(),r=Math.ceil(Math.log10(Math.abs(e))),t=function(){return void 0!==Math.round(e*Math.pow(10,o-r))&&null!==Math.round(e*Math.pow(10,o-r))&&Math.round(e*Math.pow(10,o-r))[Symbol.for("*")]?Math.round(e*Math.pow(10,o-r))[Symbol.for("*")](Math.pow(10,r-o)):Math.round(e*Math.pow(10,o-r))*Math.pow(10,r-o)}();return parseFloat(t.toFixed(Math.max(function(){return void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](r):o-r}(),0)))},D=function(e){return function(){return void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e))}()},R=function(e){if(function(){return void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e)}())return e;if(function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50}())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;var n=1;while(function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10}())n=function(){return void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](e):n*e}(),function(){void 0!==e&&null!==e&&"object"===(0,S.Z)(e)&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e}();e=function(){return void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1}();var o=.9189385332046727;o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e)}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e}();var r=function(){return void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e}(),t=e;return o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(12*t)):o+1/(12*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(360*t)):o+1/(360*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(1260*t)):o+1/(1260*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(1680*t)):o+1/(1680*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(1188*t)):o+1/(1188*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](691/(360360*t)):o+691/(360360*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](7/(1092*t)):o+7/(1092*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](3617/(122400*t)):o+3617/(122400*t)}(),function(){return void 0!==Math.exp(o)&&null!==Math.exp(o)&&Math.exp(o)[Symbol.for("/")]?Math.exp(o)[Symbol.for("/")](n):Math.exp(o)/n}()},O=.5671432904097838,_=function(e){var n,o,r=arguments,t=function(){return void 0!==r.length&&null!==r.length&&r.length[Symbol.for(">")]?r.length[Symbol.for(">")](1):r.length>1}()&&function(){return void 0!==r[1]&&null!==r[1]&&r[1][Symbol.for("!==")]?r[1][Symbol.for("!==")](void 0):void 0!==r[1]}()?arguments[1]:1e-10;if(function(){return void 0!==Number.isFinite(e)&&null!==Number.isFinite(e)&&Number.isFinite(e)[Symbol.for("!")]?Number.isFinite(e)[Symbol.for("!")]():!Number.isFinite(e)}())return e;if(0===e)return e;if(1===e)return O;n=function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10}()?0:function(){return void 0!==Math.log(e)&&null!==Math.log(e)&&Math.log(e)[Symbol.for("-")]?Math.log(e)[Symbol.for("-")](Math.log(Math.log(e))):Math.log(e)-Math.log(Math.log(e))}();for(var l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100}();function(){return void 0!==l&&null!==l&&"object"===(0,S.Z)(l)&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l}()){if(o=function(){return e*Math.exp(-n)+n*n!==void 0&&e*Math.exp(-n)+n*n!==null&&(e*Math.exp(-n)+n*n)[Symbol.for("/")]?(e*Math.exp(-n)+n*n)[Symbol.for("/")](n+1):(e*Math.exp(-n)+n*n)/(n+1)}(),function(){return void 0!==Math.abs(o-n)&&null!==Math.abs(o-n)&&Math.abs(o-n)[Symbol.for("<")]?Math.abs(o-n)[Symbol.for("<")](t*Math.abs(o)):Math.abs(o-n)")]?l.length[Symbol.for(">")](1):l.length>1}()&&function(){return void 0!==l[1]&&null!==l[1]&&l[1][Symbol.for("!==")]?l[1][Symbol.for("!==")](void 0):void 0!==l[1]}()?arguments[1]:1e-10;if(function(){return void 0!==Number.isFinite(e.mag)&&null!==Number.isFinite(e.mag)&&Number.isFinite(e.mag)[Symbol.for("!")]?Number.isFinite(e.mag)[Symbol.for("!")]():!Number.isFinite(e.mag)}())return e;if(e===A.dZero)return e;if(e===A.dOne)return E(O);A.abs(e);n=A.ln(e);for(var u=0;function(){return void 0!==u&&null!==u&&u[Symbol.for("<")]?u[Symbol.for("<")](100):u<100}();function(){return void 0!==u&&null!==u&&"object"===(0,S.Z)(u)&&u[Symbol.for("prefix-increment")]?u[Symbol.for("prefix-increment")]():++u}()){if(o=A.exp(function(){return void 0!==n&&null!==n&&n[Symbol.for("minus")]?n[Symbol.for("minus")]():-n}()),r=n.sub(e.mul(o)),t=n.sub(r.div(n.add(1).sub(n.add(2).mul(r).div(A.mul(2,n).add(2))))),A.abs(t.sub(n)).lt(A.abs(t).mul(i)))return t;n=t}throw Error("Iteration failed to converge: ".concat(e.toString()))}r=Symbol.for("+"),t=Symbol.for("-"),l=Symbol.for("*"),i=Symbol.for("/"),u=Symbol.for("minus"),a=Symbol.for("=="),f=Symbol.for(">"),c=Symbol.for("<"),s=Symbol.for(">="),m=Symbol.for("<="),d=Symbol.for("!=");var A=function(){function e(n){(0,y.Z)(this,e),(0,v.Z)(this,"sign",Number.NaN),(0,v.Z)(this,"mag",Number.NaN),(0,v.Z)(this,"layer",Number.NaN),n instanceof e||function(){return void 0!==n&&null!==n&&n[Symbol.for("!=")]?n[Symbol.for("!=")](null):null!=n}()&&"object"===(0,S.Z)(n)&&function(){return"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](n):"sign"in n}()&&function(){return"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](n):"mag"in n}()&&function(){return"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](n):"layer"in n}()?this.fromDecimal(n):"number"===typeof n?this.fromNumber(n):"string"===typeof n?this.fromString(n):(this.sign=0,this.layer=0,this.mag=0)}return(0,b.Z)(e,[{key:"m",get:function(){var e=this;if(0===this.sign)return 0;if(0===this.layer){var n,o=Math.floor(Math.log10(this.mag));return n=5e-324===this.mag?5:function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("/")]?e.mag[Symbol.for("/")](C(o)):e.mag/C(o)}(),function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](n):e.sign*n}()}if(1===this.layer){var r=function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("-")]?e.mag[Symbol.for("-")](Math.floor(e.mag)):e.mag-Math.floor(e.mag)}();return function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](Math.pow(10,r)):e.sign*Math.pow(10,r)}()}return this.sign},set:function(e){var n=this;!function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("<=")]?n.layer[Symbol.for("<=")](2):n.layer<=2}()?(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent)):this.fromMantissaExponent(e,this.e)}},{key:"e",get:function(){var e=this;return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor(function(){return void 0!==Math.sign(e.mag)&&null!==Math.sign(e.mag)&&Math.sign(e.mag)[Symbol.for("*")]?Math.sign(e.mag)[Symbol.for("*")](Math.pow(10,Math.abs(e.mag))):Math.sign(e.mag)*Math.pow(10,Math.abs(e.mag))}()):function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("*")]?e.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):e.mag*Number.POSITIVE_INFINITY}()},set:function(e){this.fromMantissaExponent(this.m,e)}},{key:"s",get:function(){return this.sign},set:function(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}},{key:"mantissa",get:function(){return this.m},set:function(e){this.m=e}},{key:"exponent",get:function(){return this.e},set:function(e){this.e=e}},{key:r,value:function(e){return this.add(e)}},{key:t,value:function(e){return this.sub(e)}},{key:l,value:function(e){return this.times(e)}},{key:i,value:function(e){return this.div(e)}},{key:u,value:function(){return this.neg()}},{key:a,value:function(e){return this.eq(e)}},{key:f,value:function(e){return this.gt(e)}},{key:c,value:function(e){return this.lt(e)}},{key:s,value:function(e){return this.gte(e)}},{key:m,value:function(e){return this.lte(e)}},{key:d,value:function(e){return this.neq(e)}},{key:"normalize",value:function(){var e=this;if(0===this.sign||0===this.mag&&0===this.layer)return this.sign=0,this.mag=0,this.layer=0,this;if(0===this.layer&&function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()&&(this.mag=function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag}(),this.sign=function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign}()),0===this.layer&&function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](N):e.mag=")]?n[Symbol.for(">=")](p):n>=p}())return e.layer=function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1}(),this.mag=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.log10(n)):o*Math.log10(n)}(),this;while(function(){return void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](h):n")]?e.layer[Symbol.for(">")](0):e.layer>0}())e.layer=function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("-")]?e.layer[Symbol.for("-")](1):e.layer-1}(),0===this.layer?this.mag=Math.pow(10,this.mag):(this.mag=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.pow(10,n)):o*Math.pow(10,n)}(),n=Math.abs(this.mag),o=Math.sign(this.mag));return 0===this.layer&&(!function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?0===this.mag&&(this.sign=0):(this.mag=function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag}(),this.sign=function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign}())),this}},{key:"fromComponents",value:function(e,n,o){return this.sign=e,this.layer=n,this.mag=o,this.normalize(),this}},{key:"fromComponents_noNormalize",value:function(e,n,o){return this.sign=e,this.layer=n,this.mag=o,this}},{key:"fromMantissaExponent",value:function(e,n){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](Math.log10(e)):n+Math.log10(e)}(),this.normalize(),this}},{key:"fromMantissaExponent_noNormalize",value:function(e,n){return this.fromMantissaExponent(e,n),this}},{key:"fromDecimal",value:function(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}},{key:"fromNumber",value:function(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}},{key:"fromString",value:function(n){M?n=n.replace(",",""):Z&&(n=n.replace(",","."));var o=n.split("^^^");if(2===o.length){var r=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";"),i=1;if(2===l.length&&(i=parseFloat(l[1]),function(){return void 0!==isFinite(i)&&null!==isFinite(i)&&isFinite(i)[Symbol.for("!")]?isFinite(i)[Symbol.for("!")]():!isFinite(i)}()&&(i=1)),isFinite(r)&&isFinite(t)){var u=e.pentate(r,t,i);return this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this}}var a=n.split("^^");if(2===a.length){var f=parseFloat(a[0]),c=parseFloat(a[1]),s=a[1].split(";"),m=1;if(2===s.length&&(m=parseFloat(s[1]),function(){return void 0!==isFinite(m)&&null!==isFinite(m)&&isFinite(m)[Symbol.for("!")]?isFinite(m)[Symbol.for("!")]():!isFinite(m)}()&&(m=1)),isFinite(f)&&isFinite(c)){var d=e.tetrate(f,c,m);return this.sign=d.sign,this.layer=d.layer,this.mag=d.mag,this}}var y,b,v=n.split("^");if(2===v.length){var g=parseFloat(v[0]),p=parseFloat(v[1]);if(isFinite(g)&&isFinite(p)){var h=e.pow(g,p);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}}n=n.trim().toLowerCase();var N=n.split("pt");if(2===N.length){y=10,b=parseFloat(N[0]),N[1]=N[1].replace("(",""),N[1]=N[1].replace(")","");var k=parseFloat(N[1]);if(function(){return void 0!==isFinite(k)&&null!==isFinite(k)&&isFinite(k)[Symbol.for("!")]?isFinite(k)[Symbol.for("!")]():!isFinite(k)}()&&(k=1),isFinite(y)&&isFinite(b)){var V=e.tetrate(y,b,k);return this.sign=V.sign,this.layer=V.layer,this.mag=V.mag,this}}if(N=n.split("p"),2===N.length){y=10,b=parseFloat(N[0]),N[1]=N[1].replace("(",""),N[1]=N[1].replace(")","");var x=parseFloat(N[1]);if(function(){return void 0!==isFinite(x)&&null!==isFinite(x)&&isFinite(x)[Symbol.for("!")]?isFinite(x)[Symbol.for("!")]():!isFinite(x)}()&&(x=1),isFinite(y)&&isFinite(b)){var C=e.tetrate(y,b,x);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,this}}var w=n.split("e"),B=function(){return void 0!==w.length&&null!==w.length&&w.length[Symbol.for("-")]?w.length[Symbol.for("-")](1):w.length-1}();if(0===B){var P=parseFloat(n);if(isFinite(P))return this.fromNumber(P)}else if(1===B){var F=parseFloat(n);if(isFinite(F)&&function(){return void 0!==F&&null!==F&&F[Symbol.for("!==")]?F[Symbol.for("!==")](0):0!==F}())return this.fromNumber(F)}var I=n.split("e^");if(2===I.length){this.sign=1,function(){return void 0!==I[0].charAt(0)&&null!==I[0].charAt(0)&&I[0].charAt(0)[Symbol.for("==")]?I[0].charAt(0)[Symbol.for("==")]("-"):"-"==I[0].charAt(0)}()&&(this.sign=function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}());for(var R="",O=0;function(){return void 0!==O&&null!==O&&O[Symbol.for("<")]?O[Symbol.for("<")](I[1].length):O=")]?_[Symbol.for(">=")](43):_>=43}()&&function(){return void 0!==_&&null!==_&&_[Symbol.for("<=")]?_[Symbol.for("<=")](57):_<=57}()||101===_))return this.layer=parseFloat(R),this.mag=parseFloat(I[1].substr(function(){return void 0!==O&&null!==O&&O[Symbol.for("+")]?O[Symbol.for("+")](1):O+1}())),this.normalize(),this;R=function(){return void 0!==R&&null!==R&&R[Symbol.for("+")]?R[Symbol.for("+")](I[1].charAt(O)):R+I[1].charAt(O)}()}}if(function(){return void 0!==B&&null!==B&&B[Symbol.for("<")]?B[Symbol.for("<")](1):B<1}())return this.sign=0,this.layer=0,this.mag=0,this;var j=parseFloat(w[0]);if(0===j)return this.sign=0,this.layer=0,this.mag=0,this;var A=parseFloat(w[function(){return void 0!==w.length&&null!==w.length&&w.length[Symbol.for("-")]?w.length[Symbol.for("-")](1):w.length-1}()]);if(function(){return void 0!==B&&null!==B&&B[Symbol.for(">=")]?B[Symbol.for(">=")](2):B>=2}()){var U=parseFloat(w[function(){return void 0!==w.length&&null!==w.length&&w.length[Symbol.for("-")]?w.length[Symbol.for("-")](2):w.length-2}()]);isFinite(U)&&(A=function(){return void 0!==A&&null!==A&&A[Symbol.for("*")]?A[Symbol.for("*")](Math.sign(U)):A*Math.sign(U)}(),A=function(){return void 0!==A&&null!==A&&A[Symbol.for("+")]?A[Symbol.for("+")](D(U)):A+D(U)}())}if(function(){return void 0!==isFinite(j)&&null!==isFinite(j)&&isFinite(j)[Symbol.for("!")]?isFinite(j)[Symbol.for("!")]():!isFinite(j)}())this.sign="-"===w[0]?function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}():1,this.layer=B,this.mag=A;else if(1===B)this.sign=Math.sign(j),this.layer=1,this.mag=function(){return void 0!==A&&null!==A&&A[Symbol.for("+")]?A[Symbol.for("+")](Math.log10(Math.abs(j))):A+Math.log10(Math.abs(j))}();else{if(this.sign=Math.sign(j),this.layer=B,2===B){var q=e.mul(T(1,2,A),E(j));return this.sign=q.sign,this.layer=q.layer,this.mag=q.mag,this}this.mag=A}return this.normalize(),this}},{key:"fromValue",value:function(n){return n instanceof e||function(){return void 0!==n&&null!==n&&n[Symbol.for("!=")]?n[Symbol.for("!=")](null):null!=n}()&&"object"===(0,S.Z)(n)&&function(){return"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](n):"sign"in n}()&&function(){return"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](n):"mag"in n}()&&function(){return"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](n):"layer"in n}()?this.fromDecimal(n):"number"===typeof n?this.fromNumber(n):"string"===typeof n?this.fromString(n):(this.sign=0,this.layer=0,this.mag=0,this)}},{key:"toNumber",value:function(){var e=this;return function(){return void 0!==Number.isFinite(e.layer)&&null!==Number.isFinite(e.layer)&&Number.isFinite(e.layer)[Symbol.for("!")]?Number.isFinite(e.layer)[Symbol.for("!")]():!Number.isFinite(e.layer)}()?Number.NaN:0===this.layer?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}():1===this.layer?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](Math.pow(10,e.mag)):e.sign*Math.pow(10,e.mag)}():function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">")]?e.mag[Symbol.for(">")](0):e.mag>0}()?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for(">")]?e.sign[Symbol.for(">")](0):e.sign>0}()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}},{key:"mantissaWithDecimalPlaces",value:function(e){return isNaN(this.m)?Number.NaN:0===this.m?0:I(this.m,e)}},{key:"magnitudeWithDecimalPlaces",value:function(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:I(this.mag,e)}},{key:"toString",value:function(){var e=this;return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?1===this.sign?"Infinity":"-Infinity":0===this.layer?function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e21):e.mag<1e21}()&&function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">")]?e.mag[Symbol.for(">")](1e-7):e.mag>1e-7}()||0===this.mag?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}().toString():function(){return e.m+"e"!==void 0&&e.m+"e"!==null&&(e.m+"e")[Symbol.for("+")]?(e.m+"e")[Symbol.for("+")](e.e):e.m+"e"+e.e}():1===this.layer?function(){return e.m+"e"!==void 0&&e.m+"e"!==null&&(e.m+"e")[Symbol.for("+")]?(e.m+"e")[Symbol.for("+")](e.e):e.m+"e"+e.e}():function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("<=")]?e.layer[Symbol.for("<=")](x):e.layer<=x}()?function(){return(-1===e.sign?"-":"")+"e".repeat(e.layer)!==void 0&&(-1===e.sign?"-":"")+"e".repeat(e.layer)!==null&&((-1===e.sign?"-":"")+"e".repeat(e.layer))[Symbol.for("+")]?((-1===e.sign?"-":"")+"e".repeat(e.layer))[Symbol.for("+")](e.mag):(-1===e.sign?"-":"")+"e".repeat(e.layer)+e.mag}():function(){return(-1===e.sign?"-":"")+"(e^"+e.layer+")"!==void 0&&(-1===e.sign?"-":"")+"(e^"+e.layer+")"!==null&&((-1===e.sign?"-":"")+"(e^"+e.layer+")")[Symbol.for("+")]?((-1===e.sign?"-":"")+"(e^"+e.layer+")")[Symbol.for("+")](e.mag):(-1===e.sign?"-":"")+"(e^"+e.layer+")"+e.mag}()}},{key:"toExponential",value:function(e){var n=this;return 0===this.layer?function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}().toExponential(e):this.toStringWithDecimalPlaces(e)}},{key:"toFixed",value:function(e){var n=this;return 0===this.layer?function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}().toFixed(e):this.toStringWithDecimalPlaces(e)}},{key:"toPrecision",value:function(e){var n=this;return function(){return void 0!==n.e&&null!==n.e&&n.e[Symbol.for("<=")]?n.e[Symbol.for("<=")](-7):n.e<=-7}()?this.toExponential(function(){return void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1}()):function(){return void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](n.e):e>n.e}()?this.toFixed(function(){return e-n.exponent!==void 0&&e-n.exponent!==null&&(e-n.exponent)[Symbol.for("-")]?(e-n.exponent)[Symbol.for("-")](1):e-n.exponent-1}()):this.toExponential(function(){return void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1}())}},{key:"valueOf",value:function(){return this.toString()}},{key:"toJSON",value:function(){return this.toString()}},{key:"toStringWithDecimalPlaces",value:function(e){var n=this;return 0===this.layer?function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](1e21):n.mag<1e21}()&&function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for(">")]?n.mag[Symbol.for(">")](1e-7):n.mag>1e-7}()||0===this.mag?function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}().toFixed(e):function(){return I(n.m,e)+"e"!==void 0&&I(n.m,e)+"e"!==null&&(I(n.m,e)+"e")[Symbol.for("+")]?(I(n.m,e)+"e")[Symbol.for("+")](I(n.e,e)):I(n.m,e)+"e"+I(n.e,e)}():1===this.layer?function(){return I(n.m,e)+"e"!==void 0&&I(n.m,e)+"e"!==null&&(I(n.m,e)+"e")[Symbol.for("+")]?(I(n.m,e)+"e")[Symbol.for("+")](I(n.e,e)):I(n.m,e)+"e"+I(n.e,e)}():function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("<=")]?n.layer[Symbol.for("<=")](x):n.layer<=x}()?function(){return(-1===n.sign?"-":"")+"e".repeat(n.layer)!==void 0&&(-1===n.sign?"-":"")+"e".repeat(n.layer)!==null&&((-1===n.sign?"-":"")+"e".repeat(n.layer))[Symbol.for("+")]?((-1===n.sign?"-":"")+"e".repeat(n.layer))[Symbol.for("+")](I(n.mag,e)):(-1===n.sign?"-":"")+"e".repeat(n.layer)+I(n.mag,e)}():function(){return(-1===n.sign?"-":"")+"(e^"+n.layer+")"!==void 0&&(-1===n.sign?"-":"")+"(e^"+n.layer+")"!==null&&((-1===n.sign?"-":"")+"(e^"+n.layer+")")[Symbol.for("+")]?((-1===n.sign?"-":"")+"(e^"+n.layer+")")[Symbol.for("+")](I(n.mag,e)):(-1===n.sign?"-":"")+"(e^"+n.layer+")"+I(n.mag,e)}()}},{key:"abs",value:function(){return F(0===this.sign?0:1,this.layer,this.mag)}},{key:"neg",value:function(){var e=this;return F(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign}(),this.layer,this.mag)}},{key:"negate",value:function(){return this.neg()}},{key:"negated",value:function(){return this.neg()}},{key:"sgn",value:function(){return this.sign}},{key:"round",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.round(this.mag)):this}},{key:"floor",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.floor(this.mag)):this}},{key:"ceil",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.ceil(this.mag)):this}},{key:"trunc",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.trunc(this.mag)):this}},{key:"add",value:function(n){var o,r,t=this,l=E(n);if(function(){return void 0!==Number.isFinite(t.layer)&&null!==Number.isFinite(t.layer)&&Number.isFinite(t.layer)[Symbol.for("!")]?Number.isFinite(t.layer)[Symbol.for("!")]():!Number.isFinite(t.layer)}())return this;if(function(){return void 0!==Number.isFinite(l.layer)&&null!==Number.isFinite(l.layer)&&Number.isFinite(l.layer)[Symbol.for("!")]?Number.isFinite(l.layer)[Symbol.for("!")]():!Number.isFinite(l.layer)}())return l;if(0===this.sign)return l;if(0===l.sign)return this;if(this.sign===function(){return void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("minus")]?l.sign[Symbol.for("minus")]():-l.sign}()&&this.layer===l.layer&&this.mag===l.mag)return F(0,0,0);if(function(){return void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for(">=")]?t.layer[Symbol.for(">=")](2):t.layer>=2}()||function(){return void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for(">=")]?l.layer[Symbol.for(">=")](2):l.layer>=2}())return this.maxabs(l);if(!function(){return void 0!==e.cmpabs(t,l)&&null!==e.cmpabs(t,l)&&e.cmpabs(t,l)[Symbol.for(">")]?e.cmpabs(t,l)[Symbol.for(">")](0):e.cmpabs(t,l)>0}()?(o=l,r=this):(o=this,r=l),0===o.layer&&0===r.layer)return E(function(){return o.sign*o.mag!==void 0&&o.sign*o.mag!==null&&(o.sign*o.mag)[Symbol.for("+")]?(o.sign*o.mag)[Symbol.for("+")](r.sign*r.mag):o.sign*o.mag+r.sign*r.mag}());var i=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("*")]?o.layer[Symbol.for("*")](Math.sign(o.mag)):o.layer*Math.sign(o.mag)}(),u=function(){return void 0!==r.layer&&null!==r.layer&&r.layer[Symbol.for("*")]?r.layer[Symbol.for("*")](Math.sign(r.mag)):r.layer*Math.sign(r.mag)}();if(function(){return i-u!==void 0&&i-u!==null&&(i-u)[Symbol.for(">=")]?(i-u)[Symbol.for(">=")](2):i-u>=2}())return o;if(0===i&&u===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()){if(function(){return void 0!==Math.abs(r.mag-Math.log10(o.mag))&&null!==Math.abs(r.mag-Math.log10(o.mag))&&Math.abs(r.mag-Math.log10(o.mag))[Symbol.for(">")]?Math.abs(r.mag-Math.log10(o.mag))[Symbol.for(">")](g):Math.abs(r.mag-Math.log10(o.mag))>g}())return o;var a=Math.pow(10,function(){return void 0!==Math.log10(o.mag)&&null!==Math.log10(o.mag)&&Math.log10(o.mag)[Symbol.for("-")]?Math.log10(o.mag)[Symbol.for("-")](r.mag):Math.log10(o.mag)-r.mag}()),f=function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("+")]?r.sign[Symbol.for("+")](o.sign*a):r.sign+o.sign*a}();return T(Math.sign(f),1,function(){return void 0!==r.mag&&null!==r.mag&&r.mag[Symbol.for("+")]?r.mag[Symbol.for("+")](Math.log10(Math.abs(f))):r.mag+Math.log10(Math.abs(f))}())}if(1===i&&0===u){if(function(){return void 0!==Math.abs(o.mag-Math.log10(r.mag))&&null!==Math.abs(o.mag-Math.log10(r.mag))&&Math.abs(o.mag-Math.log10(r.mag))[Symbol.for(">")]?Math.abs(o.mag-Math.log10(r.mag))[Symbol.for(">")](g):Math.abs(o.mag-Math.log10(r.mag))>g}())return o;var c=Math.pow(10,function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("-")]?o.mag[Symbol.for("-")](Math.log10(r.mag)):o.mag-Math.log10(r.mag)}()),s=function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("+")]?r.sign[Symbol.for("+")](o.sign*c):r.sign+o.sign*c}();return T(Math.sign(s),1,function(){return void 0!==Math.log10(r.mag)&&null!==Math.log10(r.mag)&&Math.log10(r.mag)[Symbol.for("+")]?Math.log10(r.mag)[Symbol.for("+")](Math.log10(Math.abs(s))):Math.log10(r.mag)+Math.log10(Math.abs(s))}())}if(function(){return void 0!==Math.abs(o.mag-r.mag)&&null!==Math.abs(o.mag-r.mag)&&Math.abs(o.mag-r.mag)[Symbol.for(">")]?Math.abs(o.mag-r.mag)[Symbol.for(">")](g):Math.abs(o.mag-r.mag)>g}())return o;var m=Math.pow(10,function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("-")]?o.mag[Symbol.for("-")](r.mag):o.mag-r.mag}()),d=function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("+")]?r.sign[Symbol.for("+")](o.sign*m):r.sign+o.sign*m}();return T(Math.sign(d),1,function(){return void 0!==r.mag&&null!==r.mag&&r.mag[Symbol.for("+")]?r.mag[Symbol.for("+")](Math.log10(Math.abs(d))):r.mag+Math.log10(Math.abs(d))}())}},{key:"plus",value:function(e){return this.add(e)}},{key:"sub",value:function(e){return this.add(E(e).neg())}},{key:"subtract",value:function(e){return this.sub(e)}},{key:"minus",value:function(e){return this.sub(e)}},{key:"mul",value:function(e){var n,o,r=this,t=E(e);if(function(){return void 0!==Number.isFinite(r.layer)&&null!==Number.isFinite(r.layer)&&Number.isFinite(r.layer)[Symbol.for("!")]?Number.isFinite(r.layer)[Symbol.for("!")]():!Number.isFinite(r.layer)}())return this;if(function(){return void 0!==Number.isFinite(t.layer)&&null!==Number.isFinite(t.layer)&&Number.isFinite(t.layer)[Symbol.for("!")]?Number.isFinite(t.layer)[Symbol.for("!")]():!Number.isFinite(t.layer)}())return t;if(0===this.sign||0===t.sign)return F(0,0,0);if(this.layer===t.layer&&this.mag===function(){return void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("minus")]?t.mag[Symbol.for("minus")]():-t.mag}())return F(function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("*")]?r.sign[Symbol.for("*")](t.sign):r.sign*t.sign}(),0,1);if(function(){return void 0!==r.layer&&null!==r.layer&&r.layer[Symbol.for(">")]?r.layer[Symbol.for(">")](t.layer):r.layer>t.layer}()||function(){return void 0!==r.layer&&null!==r.layer&&r.layer[Symbol.for("==")]?r.layer[Symbol.for("==")](t.layer):r.layer==t.layer}()&&function(){return void 0!==Math.abs(r.mag)&&null!==Math.abs(r.mag)&&Math.abs(r.mag)[Symbol.for(">")]?Math.abs(r.mag)[Symbol.for(">")](Math.abs(t.mag)):Math.abs(r.mag)>Math.abs(t.mag)}()?(n=this,o=t):(n=t,o=this),0===n.layer&&0===o.layer)return E(function(){return n.sign*o.sign*n.mag!==void 0&&n.sign*o.sign*n.mag!==null&&(n.sign*o.sign*n.mag)[Symbol.for("*")]?(n.sign*o.sign*n.mag)[Symbol.for("*")](o.mag):n.sign*o.sign*n.mag*o.mag}());if(function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for(">=")]?n.layer[Symbol.for(">=")](3):n.layer>=3}()||function(){return n.layer-o.layer!==void 0&&n.layer-o.layer!==null&&(n.layer-o.layer)[Symbol.for(">=")]?(n.layer-o.layer)[Symbol.for(">=")](2):n.layer-o.layer>=2}())return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),n.layer,n.mag);if(1===n.layer&&0===o.layer)return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),1,function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("+")]?n.mag[Symbol.for("+")](Math.log10(o.mag)):n.mag+Math.log10(o.mag)}());if(1===n.layer&&1===o.layer)return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),1,function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("+")]?n.mag[Symbol.for("+")](o.mag):n.mag+o.mag}());if(2===n.layer&&1===o.layer){var l=T(Math.sign(n.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(n.mag)).add(T(Math.sign(o.mag),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1}(),Math.abs(o.mag)));return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),function(){return void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("+")]?l.layer[Symbol.for("+")](1):l.layer+1}(),function(){return void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("*")]?l.sign[Symbol.for("*")](l.mag):l.sign*l.mag}())}if(2===n.layer&&2===o.layer){var i=T(Math.sign(n.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(n.mag)).add(T(Math.sign(o.mag),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1}(),Math.abs(o.mag)));return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),function(){return void 0!==i.layer&&null!==i.layer&&i.layer[Symbol.for("+")]?i.layer[Symbol.for("+")](1):i.layer+1}(),function(){return void 0!==i.sign&&null!==i.sign&&i.sign[Symbol.for("*")]?i.sign[Symbol.for("*")](i.mag):i.sign*i.mag}())}throw Error(function(){return"Bad arguments to mul: "+r+", "!==void 0&&"Bad arguments to mul: "+r+", "!==null&&("Bad arguments to mul: "+r+", ")[Symbol.for("+")]?("Bad arguments to mul: "+r+", ")[Symbol.for("+")](e):"Bad arguments to mul: "+r+", "+e}())}},{key:"multiply",value:function(e){return this.mul(e)}},{key:"times",value:function(e){return this.mul(e)}},{key:"div",value:function(e){var n=E(e);return this.mul(n.recip())}},{key:"divide",value:function(e){return this.div(e)}},{key:"divideBy",value:function(e){return this.div(e)}},{key:"dividedBy",value:function(e){return this.div(e)}},{key:"recip",value:function(){var n=this;return 0===this.mag?e.dNaN:0===this.layer?T(this.sign,0,function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](n.mag):1/n.mag}()):T(this.sign,this.layer,function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("minus")]?n.mag[Symbol.for("minus")]():-n.mag}())}},{key:"reciprocal",value:function(){return this.recip()}},{key:"reciprocate",value:function(){return this.recip()}},{key:"cmp",value:function(e){var n=this,o=E(e);return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for(">")]?n.sign[Symbol.for(">")](o.sign):n.sign>o.sign}()?1:function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<")]?n.sign[Symbol.for("<")](o.sign):n.sign")]?n.mag[Symbol.for(">")](0):n.mag>0}()?this.layer:function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("minus")]?n.layer[Symbol.for("minus")]():-n.layer}(),t=function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">")]?o.mag[Symbol.for(">")](0):o.mag>0}()?o.layer:function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("minus")]?o.layer[Symbol.for("minus")]():-o.layer}();return function(){return void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](t):r>t}()?1:function(){return void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](t):r")]?n.mag[Symbol.for(">")](o.mag):n.mag>o.mag}()?1:function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](o.mag):n.mag")]?n.cmpabs(o)[Symbol.for(">")](0):n.cmpabs(o)>0}()?o:this}},{key:"clamp",value:function(e,n){return this.max(e).min(n)}},{key:"clampMin",value:function(e){return this.max(e)}},{key:"clampMax",value:function(e){return this.min(e)}},{key:"cmp_tolerance",value:function(e,n){var o=E(e);return this.eq_tolerance(o,n)?0:this.cmp(o)}},{key:"compare_tolerance",value:function(e,n){return this.cmp_tolerance(e,n)}},{key:"eq_tolerance",value:function(e,n){var o=this,r=E(e);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&(n=1e-7),function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("!==")]?o.sign[Symbol.for("!==")](r.sign):o.sign!==r.sign}())return!1;if(function(){return void 0!==Math.abs(o.layer-r.layer)&&null!==Math.abs(o.layer-r.layer)&&Math.abs(o.layer-r.layer)[Symbol.for(">")]?Math.abs(o.layer-r.layer)[Symbol.for(">")](1):Math.abs(o.layer-r.layer)>1}())return!1;var t=this.mag,l=r.mag;return function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](r.layer):o.layer>r.layer}()&&(l=D(l)),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](r.layer):o.layer")]?n.layer[Symbol.for(">")](0):n.layer>0}()?T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag)):T(1,0,Math.log10(this.mag))}},{key:"log10",value:function(){var n=this;return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()?e.dNaN:function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for(">")]?n.layer[Symbol.for(">")](0):n.layer>0}()?T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag)):T(this.sign,0,Math.log10(this.mag))}},{key:"log",value:function(n){var o=this;return n=E(n),function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("<=")]?o.sign[Symbol.for("<=")](0):o.sign<=0}()||function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()||1===n.sign&&0===n.layer&&1===n.mag?e.dNaN:0===this.layer&&0===n.layer?T(this.sign,0,function(){return void 0!==Math.log(o.mag)&&null!==Math.log(o.mag)&&Math.log(o.mag)[Symbol.for("/")]?Math.log(o.mag)[Symbol.for("/")](Math.log(n.mag)):Math.log(o.mag)/Math.log(n.mag)}()):e.div(this.log10(),n.log10())}},{key:"log2",value:function(){var n=this;return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()?e.dNaN:0===this.layer?T(this.sign,0,Math.log2(this.mag)):1===this.layer?T(Math.sign(this.mag),0,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("*")]?Math.abs(n.mag)[Symbol.for("*")](3.321928094887362):3.321928094887362*Math.abs(n.mag)}()):2===this.layer?T(Math.sign(this.mag),1,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("+")]?Math.abs(n.mag)[Symbol.for("+")](.5213902276543247):Math.abs(n.mag)+.5213902276543247}()):T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag))}},{key:"ln",value:function(){var n=this;return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()?e.dNaN:0===this.layer?T(this.sign,0,Math.log(this.mag)):1===this.layer?T(Math.sign(this.mag),0,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("*")]?Math.abs(n.mag)[Symbol.for("*")](2.302585092994046):2.302585092994046*Math.abs(n.mag)}()):2===this.layer?T(Math.sign(this.mag),1,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("+")]?Math.abs(n.mag)[Symbol.for("+")](.36221568869946325):Math.abs(n.mag)+.36221568869946325}()):T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag))}},{key:"logarithm",value:function(e){return this.log(e)}},{key:"pow",value:function(n){var o=E(n),r=this,t=o;if(0===r.sign)return t.eq(0)?F(1,0,1):r;if(1===r.sign&&0===r.layer&&1===r.mag)return r;if(0===t.sign)return F(1,0,1);if(1===t.sign&&0===t.layer&&1===t.mag)return r;var l=r.absLog10().mul(t).pow10();return this.sign===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()?1===function(){return void 0!==Math.abs(t.toNumber()%2)&&null!==Math.abs(t.toNumber()%2)&&Math.abs(t.toNumber()%2)[Symbol.for("%")]?Math.abs(t.toNumber()%2)[Symbol.for("%")](2):Math.abs(t.toNumber()%2)%2}()?l.neg():0===function(){return void 0!==Math.abs(t.toNumber()%2)&&null!==Math.abs(t.toNumber()%2)&&Math.abs(t.toNumber()%2)[Symbol.for("%")]?Math.abs(t.toNumber()%2)[Symbol.for("%")](2):Math.abs(t.toNumber()%2)%2}()?l:e.dNaN:l}},{key:"pow10",value:function(){var n=this;if(function(){return void 0!==Number.isFinite(n.layer)&&null!==Number.isFinite(n.layer)&&Number.isFinite(n.layer)[Symbol.for("!")]?Number.isFinite(n.layer)[Symbol.for("!")]():!Number.isFinite(n.layer)}()||function(){return void 0!==Number.isFinite(n.mag)&&null!==Number.isFinite(n.mag)&&Number.isFinite(n.mag)[Symbol.for("!")]?Number.isFinite(n.mag)[Symbol.for("!")]():!Number.isFinite(n.mag)}())return e.dNaN;var o=this;if(0===o.layer){var r=Math.pow(10,function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("*")]?o.sign[Symbol.for("*")](o.mag):o.sign*o.mag}());if(Number.isFinite(r)&&function(){return void 0!==Math.abs(r)&&null!==Math.abs(r)&&Math.abs(r)[Symbol.for(">=")]?Math.abs(r)[Symbol.for(">=")](.1):Math.abs(r)>=.1}())return T(1,0,r);if(0===o.sign)return e.dOne;o=F(o.sign,function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),Math.log10(o.mag))}return function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for(">")]?o.sign[Symbol.for(">")](0):o.sign>0}()&&function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">=")]?o.mag[Symbol.for(">=")](0):o.mag>=0}()?T(o.sign,function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),o.mag):function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("<")]?o.sign[Symbol.for("<")](0):o.sign<0}()&&function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">=")]?o.mag[Symbol.for(">=")](0):o.mag>=0}()?T(function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("minus")]?o.sign[Symbol.for("minus")]():-o.sign}(),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag}()):e.dOne}},{key:"pow_base",value:function(e){return E(e).pow(this)}},{key:"root",value:function(e){var n=E(e);return this.pow(n.recip())}},{key:"factorial",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()||0===this.layer?this.add(1).gamma():1===this.layer?e.exp(e.mul(this,e.ln(this).sub(1))):e.exp(this)}},{key:"gamma",value:function(){var n=this;if(function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}())return this.recip();if(0===this.layer){if(this.lt(F(1,0,24)))return E(R(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}()));var o=function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("-")]?n.mag[Symbol.for("-")](1):n.mag-1}(),r=.9189385332046727;r=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")]((o+.5)*Math.log(o)):r+(o+.5)*Math.log(o)}(),r=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](o):r-o}();var t=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](o):o*o}(),l=o,i=function(){return 12[Symbol.for("*")]?12[Symbol.for("*")](l):12*l}(),u=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}(),a=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")](u):r+u}();if(a===r)return e.exp(r);if(r=a,l=function(){return void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t}(),i=function(){return 360[Symbol.for("*")]?360[Symbol.for("*")](l):360*l}(),u=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}(),a=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](u):r-u}(),a===r)return e.exp(r);r=a,l=function(){return void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t}(),i=function(){return 1260[Symbol.for("*")]?1260[Symbol.for("*")](l):1260*l}();var f=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}();return r=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")](f):r+f}(),l=function(){return void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t}(),i=function(){return 1680[Symbol.for("*")]?1680[Symbol.for("*")](l):1680*l}(),f=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}(),r=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](f):r-f}(),e.exp(r)}return 1===this.layer?e.exp(e.mul(this,e.ln(this).sub(1))):e.exp(this)}},{key:"lngamma",value:function(){return this.gamma().ln()}},{key:"exp",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dOne:0===this.layer&&function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<=")]?n.mag[Symbol.for("<=")](709.7):n.mag<=709.7}()?E(Math.exp(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}())):0===this.layer?T(1,1,function(){return n.sign*Math.log10(Math.E)!==void 0&&n.sign*Math.log10(Math.E)!==null&&(n.sign*Math.log10(Math.E))[Symbol.for("*")]?(n.sign*Math.log10(Math.E))[Symbol.for("*")](n.mag):n.sign*Math.log10(Math.E)*n.mag}()):1===this.layer?T(1,2,function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](Math.log10(.4342944819032518)+n.mag):n.sign*(Math.log10(.4342944819032518)+n.mag)}()):T(1,function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("+")]?n.layer[Symbol.for("+")](1):n.layer+1}(),function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}())}},{key:"sqr",value:function(){return this.pow(2)}},{key:"sqrt",value:function(){var n=this;if(0===this.layer)return E(Math.sqrt(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}()));if(1===this.layer)return T(1,2,function(){return void 0!==Math.log10(n.mag)&&null!==Math.log10(n.mag)&&Math.log10(n.mag)[Symbol.for("-")]?Math.log10(n.mag)[Symbol.for("-")](.3010299956639812):Math.log10(n.mag)-.3010299956639812}());var o=e.div(F(this.sign,function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),this.mag),F(1,0,2));return o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),o.normalize(),o}},{key:"cube",value:function(){return this.pow(3)}},{key:"cbrt",value:function(){return this.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](3):1/3}())}},{key:"tetrate",value:function(){var n=arguments,o=this,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:2,t=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:F(1,0,1);if(1===r)return e.pow(this,t);if(0===r)return new e(t);if(this.eq(e.dOne))return e.dOne;if(this.eq(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()))return e.pow(this,t);if(r===Number.POSITIVE_INFINITY){var l=this.toNumber();if(function(){return void 0!==l&&null!==l&&l[Symbol.for("<=")]?l[Symbol.for("<=")](1.444667861009766):l<=1.444667861009766}()&&function(){return void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](.06598803584531254):l>=.06598803584531254}()){if(function(){return void 0!==l&&null!==l&&l[Symbol.for(">")]?l[Symbol.for(">")](1.444667861009099):l>1.444667861009099}())return new e(Math.E);var i=e.ln(this).neg();return i.lambertw().div(i)}return function(){return void 0!==l&&null!==l&&l[Symbol.for(">")]?l[Symbol.for(">")](1.444667861009766):l>1.444667861009766}()?new e(Number.POSITIVE_INFINITY):e.dNaN}if(this.eq(e.dZero)){var u=Math.abs(function(){return r+1!==void 0&&r+1!==null&&(r+1)[Symbol.for("%")]?(r+1)[Symbol.for("%")](2):(r+1)%2}());return function(){return void 0!==u&&null!==u&&u[Symbol.for(">")]?u[Symbol.for(">")](1):u>1}()&&(u=function(){return 2[Symbol.for("-")]?2[Symbol.for("-")](u):2-u}()),new e(u)}if(function(){return void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](0):r<0}())return e.iteratedlog(t,this,function(){return void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r}());t=E(t);var a=r;r=Math.trunc(r);var f=function(){return void 0!==a&&null!==a&&a[Symbol.for("-")]?a[Symbol.for("-")](r):a-r}();if(this.gt(e.dZero)&&this.lte(1.444667861009766)){r=Math.min(1e4,r);for(var c=0;function(){return void 0!==c&&null!==c&&c[Symbol.for("<")]?c[Symbol.for("<")](r):c")]?(t.layer-o.layer)[Symbol.for(">")](3):t.layer-o.layer>3}())return F(t.sign,function(){return void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("+")]?t.layer[Symbol.for("+")](r-d-1):t.layer+(r-d-1)}(),t.mag);if(function(){return void 0!==d&&null!==d&&d[Symbol.for(">")]?d[Symbol.for(">")](1e4):d>1e4}())return t}return t}},{key:"iteratedexp",value:function(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:2,o=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](1):e.length>1}()&&function(){return void 0!==e[1]&&null!==e[1]&&e[1][Symbol.for("!==")]?e[1][Symbol.for("!==")](void 0):void 0!==e[1]}()?arguments[1]:F(1,0,1);return this.tetrate(n,o)}},{key:"iteratedlog",value:function(){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:10,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:1;if(function(){return void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](0):r<0}())return e.tetrate(o,function(){return void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r}(),this);o=E(o);var t=E(this),l=r;r=Math.trunc(r);var i=function(){return void 0!==l&&null!==l&&l[Symbol.for("-")]?l[Symbol.for("-")](r):l-r}();if(function(){return t.layer-o.layer!==void 0&&t.layer-o.layer!==null&&(t.layer-o.layer)[Symbol.for(">")]?(t.layer-o.layer)[Symbol.for(">")](3):t.layer-o.layer>3}()){var u=Math.min(r,function(){return t.layer-o.layer!==void 0&&t.layer-o.layer!==null&&(t.layer-o.layer)[Symbol.for("-")]?(t.layer-o.layer)[Symbol.for("-")](3):t.layer-o.layer-3}());r=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](u):r-u}(),t.layer=function(){return void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](u):t.layer-u}()}for(var a=0;function(){return void 0!==a&&null!==a&&a[Symbol.for("<")]?a[Symbol.for("<")](r):a")]?a[Symbol.for(">")](1e4):a>1e4}())return t}return function(){return void 0!==i&&null!==i&&i[Symbol.for(">")]?i[Symbol.for(">")](0):i>0}()&&function(){return void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](1):i<1}()&&(t=o.eq(10)?t.layeradd10(function(){return void 0!==i&&null!==i&&i[Symbol.for("minus")]?i[Symbol.for("minus")]():-i}()):t.layeradd(function(){return void 0!==i&&null!==i&&i[Symbol.for("minus")]?i[Symbol.for("minus")]():-i}(),o)),t}},{key:"slog",value:function(){var n=arguments,o=this,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:10;if(r=E(r),r.lte(e.dZero))return e.dNaN;if(r.eq(e.dOne))return e.dNaN;if(r.lt(e.dOne))return this.eq(e.dOne)?e.dZero:this.eq(e.dZero)?e.dNegOne:e.dNaN;if(function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0}()||this.eq(e.dZero))return e.dNegOne;var t=0,l=E(this);if(function(){return l.layer-r.layer!==void 0&&l.layer-r.layer!==null&&(l.layer-r.layer)[Symbol.for(">")]?(l.layer-r.layer)[Symbol.for(">")](3):l.layer-r.layer>3}()){var i=function(){return l.layer-r.layer!==void 0&&l.layer-r.layer!==null&&(l.layer-r.layer)[Symbol.for("-")]?(l.layer-r.layer)[Symbol.for("-")](3):l.layer-r.layer-3}();t=function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](i):t+i}(),l.layer=function(){return void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](i):l.layer-i}()}for(var u=0;function(){return void 0!==u&&null!==u&&u[Symbol.for("<")]?u[Symbol.for("<")](100):u<100}();function(){return void 0!==u&&null!==u&&"object"===(0,S.Z)(u)&&u[Symbol.for("prefix-increment")]?u[Symbol.for("prefix-increment")]():++u}())if(l.lt(e.dZero))l=e.pow(r,l),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](1):t-1}();else{if(l.lte(e.dOne))return E(function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](e.slog_critical(r.toNumber(),l.toNumber())):t+e.slog_critical(r.toNumber(),l.toNumber())}());t=function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1):t+1}(),l=e.log(l,r)}return E(t)}},{key:"layeradd10",value:function(n){n=e.fromValue_noAlloc(n).toNumber();var o=E(this);if(function(){return void 0!==n&&null!==n&&n[Symbol.for(">=")]?n[Symbol.for(">=")](1):n>=1}()){(function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0})()&&function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](0):o.layer>0}()?(o.sign=0,o.mag=0,o.layer=0):o.sign===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()&&function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("==")]?o.layer[Symbol.for("==")](0):0==o.layer}()&&(o.sign=1,o.mag=function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag}());var r=Math.trunc(n);n=function(){return void 0!==n&&null!==n&&n[Symbol.for("-")]?n[Symbol.for("-")](r):n-r}(),o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](r):o.layer+r}()}if(function(){return void 0!==n&&null!==n&&n[Symbol.for("<=")]?n[Symbol.for("<=")](-1):n<=-1}()){var t=Math.trunc(n);if(n=function(){return void 0!==n&&null!==n&&n[Symbol.for("-")]?n[Symbol.for("-")](t):n-t}(),o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t}(),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0}())for(var l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100}();function(){return void 0!==l&&null!==l&&"object"===(0,S.Z)(l)&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l}()){if(function(){void 0!==o.layer&&null!==o.layer&&"object"===(0,S.Z)(o.layer)&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++}(),o.mag=Math.log10(o.mag),function(){return void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag)}())return 0===o.sign&&(o.sign=1),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0}()&&(o.layer=0),o.normalize();if(function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](0):o.layer>=0}())break}}while(function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0}())(function(){void 0!==o.layer&&null!==o.layer&&"object"===(0,S.Z)(o.layer)&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag);return 0===o.sign&&(o.sign=1,0===o.mag&&function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](1):o.layer>=1}()&&(o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1}(),o.mag=1)),o.normalize(),function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](0):0!==n}()?o.layeradd(n,10):o}},{key:"layeradd",value:function(n,o){var r=this.slog(o).toNumber(),t=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")](n):r+n}();return function(){return void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](0):t>=0}()?e.tetrate(o,t):function(){return void 0!==Number.isFinite(t)&&null!==Number.isFinite(t)&&Number.isFinite(t)[Symbol.for("!")]?Number.isFinite(t)[Symbol.for("!")]():!Number.isFinite(t)}()?e.dNaN:function(){return void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](-1):t>=-1}()?e.log(e.tetrate(o,function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1):t+1}()),o):e.log(e.log(e.tetrate(o,function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](2):t+2}()),o),o)}},{key:"lambertw",value:function(){var e=this;if(this.lt(function(){return.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499}()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}())return E(_(this.toNumber()));if(0===this.layer)return E(_(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}()));if(1===this.layer)return j(this);if(2===this.layer)return j(this);if(function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">=")]?e.layer[Symbol.for(">=")](3):e.layer>=3}())return F(this.sign,function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("-")]?e.layer[Symbol.for("-")](1):e.layer-1}(),this.mag);throw"Unhandled behavior in lambertw()"}},{key:"ssqrt",value:function(){var e=this;if(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("==")]?e.sign[Symbol.for("==")](1):1==e.sign}()&&function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">=")]?e.layer[Symbol.for(">=")](3):e.layer>=3}())return F(this.sign,function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("-")]?e.layer[Symbol.for("-")](1):e.layer-1}(),this.mag);var n=this.ln();return n.div(n.lambertw())}},{key:"pentate",value:function(){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:F(1,0,1);r=E(r);var t=o;o=Math.trunc(o);var l=function(){return void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](o):t-o}();(function(){return void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l})()&&(r.eq(e.dOne)?(function(){void 0!==o&&null!==o&&"object"===(0,S.Z)(o)&&o[Symbol.for("prefix-increment")]?o[Symbol.for("prefix-increment")]():++o}(),r=new e(l)):r=this.eq(10)?r.layeradd10(l):r.layeradd(l,this));for(var i=0;function(){return void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](o):i")]?i[Symbol.for(">")](10):i>10}())return r}return r}},{key:"sin",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.sin(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(0,0,0)}},{key:"cos",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dOne:0===this.layer?E(Math.cos(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}())):F(0,0,0)}},{key:"tan",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.tan(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(0,0,0)}},{key:"asin",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.asin(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(Number.NaN,Number.NaN,Number.NaN)}},{key:"acos",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?E(Math.acos(this.toNumber())):0===this.layer?E(Math.acos(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(Number.NaN,Number.NaN,Number.NaN)}},{key:"atan",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.atan(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):E(Math.atan(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](Infinity):Infinity*e.sign}()))}},{key:"sinh",value:function(){return this.exp().sub(this.negate().exp()).div(2)}},{key:"cosh",value:function(){return this.exp().add(this.negate().exp()).div(2)}},{key:"tanh",value:function(){return this.sinh().div(this.cosh())}},{key:"asinh",value:function(){return e.ln(this.add(this.sqr().add(1).sqrt()))}},{key:"acosh",value:function(){return e.ln(this.add(this.sqr().sub(1).sqrt()))}},{key:"atanh",value:function(){return this.abs().gte(1)?F(Number.NaN,Number.NaN,Number.NaN):e.ln(this.add(1).div(E(1).sub(this))).div(2)}},{key:"ascensionPenalty",value:function(n){return 0===n?this:this.root(e.pow(10,n))}},{key:"egg",value:function(){return this.add(9)}},{key:"lessThanOrEqualTo",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for("<")]?n.cmp(e)[Symbol.for("<")](1):n.cmp(e)<1}()}},{key:"lessThan",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for("<")]?n.cmp(e)[Symbol.for("<")](0):n.cmp(e)<0}()}},{key:"greaterThanOrEqualTo",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for(">")]?n.cmp(e)[Symbol.for(">")](-1):n.cmp(e)>-1}()}},{key:"greaterThan",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for(">")]?n.cmp(e)[Symbol.for(">")](0):n.cmp(e)>0}()}}],[{key:"fromComponents",value:function(n,o,r){return(new e).fromComponents(n,o,r)}},{key:"fromComponents_noNormalize",value:function(n,o,r){return(new e).fromComponents_noNormalize(n,o,r)}},{key:"fromMantissaExponent",value:function(n,o){return(new e).fromMantissaExponent(n,o)}},{key:"fromMantissaExponent_noNormalize",value:function(n,o){return(new e).fromMantissaExponent_noNormalize(n,o)}},{key:"fromDecimal",value:function(n){return(new e).fromDecimal(n)}},{key:"fromNumber",value:function(n){return(new e).fromNumber(n)}},{key:"fromString",value:function(n){return(new e).fromString(n)}},{key:"fromValue",value:function(n){return(new e).fromValue(n)}},{key:"fromValue_noAlloc",value:function(n){return n instanceof e?n:new e(n)}},{key:"abs",value:function(e){return E(e).abs()}},{key:"neg",value:function(e){return E(e).neg()}},{key:"negate",value:function(e){return E(e).neg()}},{key:"negated",value:function(e){return E(e).neg()}},{key:"sign",value:function(e){return E(e).sign}},{key:"sgn",value:function(e){return E(e).sign}},{key:"round",value:function(e){return E(e).round()}},{key:"floor",value:function(e){return E(e).floor()}},{key:"ceil",value:function(e){return E(e).ceil()}},{key:"trunc",value:function(e){return E(e).trunc()}},{key:"add",value:function(e,n){return E(e).add(n)}},{key:"plus",value:function(e,n){return E(e).add(n)}},{key:"sub",value:function(e,n){return E(e).sub(n)}},{key:"subtract",value:function(e,n){return E(e).sub(n)}},{key:"minus",value:function(e,n){return E(e).sub(n)}},{key:"mul",value:function(e,n){return E(e).mul(n)}},{key:"multiply",value:function(e,n){return E(e).mul(n)}},{key:"times",value:function(e,n){return E(e).mul(n)}},{key:"div",value:function(e,n){return E(e).div(n)}},{key:"divide",value:function(e,n){return E(e).div(n)}},{key:"recip",value:function(e){return E(e).recip()}},{key:"reciprocal",value:function(e){return E(e).recip()}},{key:"reciprocate",value:function(e){return E(e).reciprocate()}},{key:"cmp",value:function(e,n){return E(e).cmp(n)}},{key:"cmpabs",value:function(e,n){return E(e).cmpabs(n)}},{key:"compare",value:function(e,n){return E(e).cmp(n)}},{key:"isNaN",value:function(e){function n(n){return e.apply(this,arguments)}return n.toString=function(){return e.toString()},n}((function(e){return e=E(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}))},{key:"isFinite",value:function(e){function n(n){return e.apply(this,arguments)}return n.toString=function(){return e.toString()},n}((function(e){return e=E(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}))},{key:"eq",value:function(e,n){return E(e).eq(n)}},{key:"equals",value:function(e,n){return E(e).eq(n)}},{key:"neq",value:function(e,n){return E(e).neq(n)}},{key:"notEquals",value:function(e,n){return E(e).notEquals(n)}},{key:"lt",value:function(e,n){return E(e).lt(n)}},{key:"lte",value:function(e,n){return E(e).lte(n)}},{key:"gt",value:function(e,n){return E(e).gt(n)}},{key:"gte",value:function(e,n){return E(e).gte(n)}},{key:"max",value:function(e,n){return E(e).max(n)}},{key:"min",value:function(e,n){return E(e).min(n)}},{key:"minabs",value:function(e,n){return E(e).minabs(n)}},{key:"maxabs",value:function(e,n){return E(e).maxabs(n)}},{key:"clamp",value:function(e,n,o){return E(e).clamp(n,o)}},{key:"clampMin",value:function(e,n){return E(e).clampMin(n)}},{key:"clampMax",value:function(e,n){return E(e).clampMax(n)}},{key:"cmp_tolerance",value:function(e,n,o){return E(e).cmp_tolerance(n,o)}},{key:"compare_tolerance",value:function(e,n,o){return E(e).cmp_tolerance(n,o)}},{key:"eq_tolerance",value:function(e,n,o){return E(e).eq_tolerance(n,o)}},{key:"equals_tolerance",value:function(e,n,o){return E(e).eq_tolerance(n,o)}},{key:"neq_tolerance",value:function(e,n,o){return E(e).neq_tolerance(n,o)}},{key:"notEquals_tolerance",value:function(e,n,o){return E(e).notEquals_tolerance(n,o)}},{key:"lt_tolerance",value:function(e,n,o){return E(e).lt_tolerance(n,o)}},{key:"lte_tolerance",value:function(e,n,o){return E(e).lte_tolerance(n,o)}},{key:"gt_tolerance",value:function(e,n,o){return E(e).gt_tolerance(n,o)}},{key:"gte_tolerance",value:function(e,n,o){return E(e).gte_tolerance(n,o)}},{key:"pLog10",value:function(e){return E(e).pLog10()}},{key:"absLog10",value:function(e){return E(e).absLog10()}},{key:"log10",value:function(e){return E(e).log10()}},{key:"log",value:function(e,n){return E(e).log(n)}},{key:"log2",value:function(e){return E(e).log2()}},{key:"ln",value:function(e){return E(e).ln()}},{key:"logarithm",value:function(e,n){return E(e).logarithm(n)}},{key:"pow",value:function(e,n){return E(e).pow(n)}},{key:"pow10",value:function(e){return E(e).pow10()}},{key:"root",value:function(e,n){return E(e).root(n)}},{key:"factorial",value:function(e,n){return E(e).factorial()}},{key:"gamma",value:function(e,n){return E(e).gamma()}},{key:"lngamma",value:function(e,n){return E(e).lngamma()}},{key:"exp",value:function(e){return E(e).exp()}},{key:"sqr",value:function(e){return E(e).sqr()}},{key:"sqrt",value:function(e){return E(e).sqrt()}},{key:"cube",value:function(e){return E(e).cube()}},{key:"cbrt",value:function(e){return E(e).cbrt()}},{key:"tetrate",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:F(1,0,1);return E(e).tetrate(o,r)}},{key:"iteratedexp",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:F(1,0,1);return E(e).iteratedexp(o,r)}},{key:"iteratedlog",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:10,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:1;return E(e).iteratedlog(o,r)}},{key:"layeradd10",value:function(e,n){return E(e).layeradd10(n)}},{key:"layeradd",value:function(e,n){var o=arguments,r=function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()&&function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()?arguments[2]:10;return E(e).layeradd(n,r)}},{key:"slog",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:10;return E(e).slog(o)}},{key:"lambertw",value:function(e){return E(e).lambertw()}},{key:"ssqrt",value:function(e){return E(e).ssqrt()}},{key:"pentate",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:F(1,0,1);return E(e).pentate(o,r)}},{key:"affordGeometricSeries",value:function(e,n,o,r){return this.affordGeometricSeries_core(E(e),E(n),E(o),r)}},{key:"sumGeometricSeries",value:function(e,n,o,r){return this.sumGeometricSeries_core(e,E(n),E(o),r)}},{key:"affordArithmeticSeries",value:function(e,n,o,r){return this.affordArithmeticSeries_core(E(e),E(n),E(o),E(r))}},{key:"sumArithmeticSeries",value:function(e,n,o,r){return this.sumArithmeticSeries_core(E(e),E(n),E(o),E(r))}},{key:"efficiencyOfPurchase",value:function(e,n,o){return this.efficiencyOfPurchase_core(E(e),E(n),E(o))}},{key:"randomDecimalForTesting",value:function(e){if(function(){return 20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1}())return F(0,0,0);var n=function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.5):Math.random()>.5}()?1:function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}();if(function(){return 20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1}())return F(n,0,1);var o=Math.floor(function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](e+1):Math.random()*(e+1)}()),r=0===o?function(){return 616*Math.random()!==void 0&&616*Math.random()!==null&&(616*Math.random())[Symbol.for("-")]?(616*Math.random())[Symbol.for("-")](308):616*Math.random()-308}():function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](16):16*Math.random()}();(function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9})()&&(r=Math.trunc(r));var t=Math.pow(10,r);return function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9}()&&(t=Math.trunc(t)),T(n,o,t)}},{key:"affordGeometricSeries_core",value:function(n,o,r,t){var l=o.mul(r.pow(t));return e.floor(n.div(l).mul(r.sub(1)).add(1).log10().div(r.log10()))}},{key:"sumGeometricSeries_core",value:function(n,o,r,t){return o.mul(r.pow(t)).mul(e.sub(1,r.pow(n))).div(e.sub(1,r))}},{key:"affordArithmeticSeries_core",value:function(e,n,o,r){var t=n.add(r.mul(o)),l=t.sub(o.div(2)),i=l.pow(2);return l.neg().add(i.add(o.mul(e).mul(2)).sqrt()).div(o).floor()}},{key:"sumArithmeticSeries_core",value:function(e,n,o,r){var t=n.add(r.mul(o));return e.div(2).mul(t.mul(2).plus(e.sub(1).mul(o)))}},{key:"efficiencyOfPurchase_core",value:function(e,n,o){return e.div(n).add(e.div(o))}},{key:"slog_critical",value:function(n,o){return function(){return void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](10):n>10}()?function(){return void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1}():e.critical_section(n,o,P)}},{key:"tetrate_critical",value:function(n,o){return e.critical_section(n,o,B)}},{key:"critical_section",value:function(e,n,o){n=function(){return void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](10):10*n}(),function(){return void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](0):n<0}()&&(n=0),function(){return void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](10):n>10}()&&(n=10),function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](2):e<2}()&&(e=2),function(){return void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10}()&&(e=10);for(var r=0,t=0,l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](w.length):l")]?w[l+1][Symbol.for(">")](e):w[l+1]>e}()){var i=function(){return e-w[l]!==void 0&&e-w[l]!==null&&(e-w[l])[Symbol.for("/")]?(e-w[l])[Symbol.for("/")](w[l+1]-w[l]):(e-w[l])/(w[l+1]-w[l])}();r=function(){return o[l][Math.floor(n)]*(1-i)!==void 0&&o[l][Math.floor(n)]*(1-i)!==null&&(o[l][Math.floor(n)]*(1-i))[Symbol.for("+")]?(o[l][Math.floor(n)]*(1-i))[Symbol.for("+")](o[l+1][Math.floor(n)]*i):o[l][Math.floor(n)]*(1-i)+o[l+1][Math.floor(n)]*i}(),t=function(){return o[l][Math.ceil(n)]*(1-i)!==void 0&&o[l][Math.ceil(n)]*(1-i)!==null&&(o[l][Math.ceil(n)]*(1-i))[Symbol.for("+")]?(o[l][Math.ceil(n)]*(1-i))[Symbol.for("+")](o[l+1][Math.ceil(n)]*i):o[l][Math.ceil(n)]*(1-i)+o[l+1][Math.ceil(n)]*i}();break}}var u=function(){return void 0!==n&&null!==n&&n[Symbol.for("-")]?n[Symbol.for("-")](Math.floor(n)):n-Math.floor(n)}(),a=function(){return r*(1-u)!==void 0&&r*(1-u)!==null&&(r*(1-u))[Symbol.for("+")]?(r*(1-u))[Symbol.for("+")](t*u):r*(1-u)+t*u}();return a}}]),e}();(0,v.Z)(A,"dZero",F(0,0,0)),(0,v.Z)(A,"dOne",F(1,0,1)),(0,v.Z)(A,"dNegOne",F(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),0,1)),(0,v.Z)(A,"dTwo",F(1,0,2)),(0,v.Z)(A,"dTen",F(1,0,10)),(0,v.Z)(A,"dNaN",F(Number.NaN,Number.NaN,Number.NaN)),(0,v.Z)(A,"dInf",F(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,v.Z)(A,"dNegInf",F(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,v.Z)(A,"dNumberMax",T(1,0,Number.MAX_VALUE)),(0,v.Z)(A,"dNumberMin",T(1,0,Number.MIN_VALUE));var U=o(6453),q=A,z=new A(1);function L(e,n){var o=arguments,r=!function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()||!function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()||arguments[2],t=A.log10(e).floor(),l=A.div(e,A.pow(10,t));"10"===l.toStringWithDecimalPlaces(n)&&(l=z,t=t.add(1));var i=t.gte(1e9)?oe(t,Math.max(Math.max(n,3),U.defaultDecimalsShown)):t.gte(1e4)?G(t,0):t.toStringWithDecimalPlaces(0);return r?function(){return l.toStringWithDecimalPlaces(n)+"e"!==void 0&&l.toStringWithDecimalPlaces(n)+"e"!==null&&(l.toStringWithDecimalPlaces(n)+"e")[Symbol.for("+")]?(l.toStringWithDecimalPlaces(n)+"e")[Symbol.for("+")](i):l.toStringWithDecimalPlaces(n)+"e"+i}():function(){return"e"[Symbol.for("+")]?"e"[Symbol.for("+")](i):"e"+i}()}function G(e,n){if(null===e||void 0===e)return"NaN";if(e=new A(e),function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.001):e.mag<.001}())return(0).toFixed(n);var o=e.toStringWithDecimalPlaces(n),r=o.split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),function(){return void 0!==r.length&&null!==r.length&&r.length[Symbol.for("==")]?r.length[Symbol.for("==")](1):1==r.length}()?r[0]:function(){return r[0]+"."!==void 0&&r[0]+"."!==null&&(r[0]+".")[Symbol.for("+")]?(r[0]+".")[Symbol.for("+")](r[1]):r[0]+"."+r[1]}()}function H(e,n){return null===e||void 0===e?"NaN":(e=new A(e),function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e-4):e.mag<1e-4}()?(0).toFixed(n):(function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.1):e.mag<.1}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](0):0!==n}()&&(n=Math.max(Math.max(n,4),U.defaultDecimalsShown)),e.toStringWithDecimalPlaces(n)))}var W=new A("eeee1000"),Y=new A("e100000"),K=new A("e1000"),J=new A(1e9),Q=new A(1e6),$=new A(1e3),X=new A(.98),ee=new A(.001),ne=new A(0);function oe(e,n,o){var r;if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&(n=U.defaultDecimalsShown),o=function(){return void 0!==(r=o)&&null!==(r=o)&&(r=o)[Symbol.for("!==")]?(r=o)[Symbol.for("!==")](null):null!==(r=o)}()&&function(){return void 0!==r&&null!==r&&r[Symbol.for("!==")]?r[Symbol.for("!==")](void 0):void 0!==r}()?r:U.defaultShowSmall,e=new A(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0}())return function(){return"-"[Symbol.for("+")]?"-"[Symbol.for("+")](oe(e.neg(),n)):"-"+oe(e.neg(),n)}();if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(W)){var t=e.slog();return t.gte(Q)?function(){return"F"[Symbol.for("+")]?"F"[Symbol.for("+")](oe(t.floor())):"F"+oe(t.floor())}():function(){return A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](G(t.floor(),0)):A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"+G(t.floor(),0)}()}if(e.gte(Y))return L(e,0,!1);if(e.gte(K))return L(e,0);if(e.gte(J))return L(e,n);if(e.gte($))return G(e,0);if(e.gte(ee)||function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}())return H(e,n);if(e.eq(ne))return(0).toFixed(n);if(e=ue(e),e.lt(K)){var l=L(e,n);return l.replace(/([^(?:e|F)]*)$/,"-$1")}return function(){return void 0!==oe(e,n)&&null!==oe(e,n)&&oe(e,n)[Symbol.for("+")]?oe(e,n)[Symbol.for("+")]("⁻¹"):oe(e,n)+"⁻¹"}()}function re(e){return e=new A(e),function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0}()?function(){return"-"[Symbol.for("+")]?"-"[Symbol.for("+")](re(e.neg())):"-"+re(e.neg())}():e.gte(J)||e.lte(X)&&function(){return void 0!==e.eq(ne)&&null!==e.eq(ne)&&e.eq(ne)[Symbol.for("!")]?e.eq(ne)[Symbol.for("!")]():!e.eq(ne)}()?oe(e):oe(e,0)}function te(e){return A.lt(e,0)?function(){return"-"[Symbol.for("+")]?"-"[Symbol.for("+")](te(A.neg(e))):"-"+te(A.neg(e))}():A.gt(e,function(){return 2[Symbol.for("**")]?2[Symbol.for("**")](51):Math.pow(2,51)}())?function(){return void 0!==oe(A.div(e,31536e3))&&null!==oe(A.div(e,31536e3))&&oe(A.div(e,31536e3))[Symbol.for("+")]?oe(A.div(e,31536e3))[Symbol.for("+")]("y"):oe(A.div(e,31536e3))+"y"}():(e=new A(e).toNumber(),function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](60):e<60}()?function(){return void 0!==oe(e)&&null!==oe(e)&&oe(e)[Symbol.for("+")]?oe(e)[Symbol.for("+")]("s"):oe(e)+"s"}():function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](3600):e<3600}()?function(){return re(Math.floor(e/60))+"m "+oe(e%60)!==void 0&&re(Math.floor(e/60))+"m "+oe(e%60)!==null&&(re(Math.floor(e/60))+"m "+oe(e%60))[Symbol.for("+")]?(re(Math.floor(e/60))+"m "+oe(e%60))[Symbol.for("+")]("s"):re(Math.floor(e/60))+"m "+oe(e%60)+"s"}():function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](86400):e<86400}()?function(){return re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60)!==void 0&&re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60)!==null&&(re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60))[Symbol.for("+")]?(re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60))[Symbol.for("+")]("s"):re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60)+"s"}():function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](31536e3):e<31536e3}()?function(){return re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60)!==void 0&&re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60)!==null&&(re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60))[Symbol.for("+")]?(re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60))[Symbol.for("+")]("m"):re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60)+"m"}():function(){return re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)!==void 0&&re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)!==null&&(re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24))[Symbol.for("+")]?(re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24))[Symbol.for("+")]("h"):re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h"}())}function le(e,n,o){e=new A(e);var r=e.toStringWithDecimalPlaces(n);return new A(r).gte(o)&&(r=A.sub(o,Math.pow(.1,n)).toStringWithDecimalPlaces(n)),r}function ie(e,n){return oe(e,n,!0)}function ue(e){var n=A.log10(e).ceil(),o=A.div(e,A.pow(10,n));return n=n.neg(),e=new A(10).pow(n).times(o),e}var ae=L,fe=G,ce=H,se=oe,me=re,de=te,ye=le,be=ie,ve=ue;window.Decimal=q,window.exponentialFormat=ae,window.commaFormat=fe,window.regularFormat=ce,window.format=se,window.formatWhole=me,window.formatTime=de,window.toPlaces=ye,window.formatSmall=be,window.invertOOM=ve;var Se=q},1349:function(e,n,o){"use strict";o.d(n,{IJ:function(){return r},PO:function(){return t},mf:function(){return l}});o(4916),o(5306),o(2526),o(1817),o(1539),o(7042);function r(e){var n=e.replace(/([A-Z])/g," $1");return n=function(){return void 0!==n.charAt(0).toUpperCase()&&null!==n.charAt(0).toUpperCase()&&n.charAt(0).toUpperCase()[Symbol.for("+")]?n.charAt(0).toUpperCase()[Symbol.for("+")](n.slice(1)):n.charAt(0).toUpperCase()+n.slice(1)}(),n}function t(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e){return"function"===typeof e}},9583:function(e,n,o){"use strict";o.d(n,{mM:function(){return l},yB:function(){return i},UI:function(){return u}});o(2526),o(1817),o(1539);var r=o(4865),t=o(1349),l=Symbol("DoNotCache");function i(e,n){var o=e[n];(0,t.mf)(o)&&0===o.length&&function(){return void 0!==o[l]&&null!==o[l]&&o[l][Symbol.for("!")]?o[l][Symbol.for("!")]():!o[l]}()&&(e[n]=(0,r.computed)(o.bind(e)))}function u(e){return(0,t.mf)(e)&&function(){return void 0!==e[l]&&null!==e[l]&&e[l][Symbol.for("!")]?e[l][Symbol.for("!")]():!e[l]}()&&(e=(0,r.computed)(e)),e}},3273:function(e,n,o){"use strict";o.d(n,{Le:function(){return r},c4:function(){return t},z2:function(){return l}});o(2526),o(1817),o(1539),o(4858),o(1299),o(7556),o(5003);var r=Symbol("ProxyState"),t=Symbol("ProxyPath");function l(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:{},t=o,l=!1;function i(){return function(){return void 0!==l&&null!==l&&l[Symbol.for("!")]?l[Symbol.for("!")]():!l}()&&(Object.assign(t,e(t)),l=!0),t}return new Proxy(t,{get:function(e,n){return n===r?i():i()[n]},set:function(e,n,o){return i()[n]=o,!0},has:function(e,n){return n===r||Reflect.has(i(),n)},ownKeys:function(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor:function(n,o){return function(){return void 0!==l&&null!==l&&l[Symbol.for("!")]?l[Symbol.for("!")]():!l}()&&(Object.assign(t,e(t)),l=!0),Object.getOwnPropertyDescriptor(n,o)}})}},463:function(e,n,o){"use strict";o.d(n,{a1:function(){return c},zD:function(){return s},xM:function(){return d},QI:function(){return y},uW:function(){return b},y6:function(){return S}});var r=o(3336),t=o(8534),l=(o(5666),o(2526),o(1817),o(1539),o(7042),o(7714),o(2801),o(1174),o(2222),o(8783),o(3948),o(4747),o(6453)),i=o(5967),u=o(9266),a=o(3273);function f(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:{};return Object.assign({id:"".concat(l.id,"-0"),name:"Default Save",tabs:l.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:l.id,modVersion:l.versionNumber,layers:{}},n)}function c(){var e=btoa(unescape(encodeURIComponent((0,i.U)(i.Z[a.Le]))));return localStorage.setItem(i.Z.id,e),e}function s(){return m.apply(this,arguments)}function m(){return m=(0,t.Z)(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if((0,u.ri)(),e.prev=1,n=localStorage.getItem(u.ZP.active),function(){return void 0!==function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&null!==function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()[Symbol.for("!")]?function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()[Symbol.for("!")]():!function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()}()){e.next=7;break}return e.next=6,b(d());case 6:return e.abrupt("return");case 7:if(o=JSON.parse(decodeURIComponent(escape(atob(n)))),function(){return void 0!==function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()&&null!==function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()&&function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()[Symbol.for("!")]?function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()[Symbol.for("!")]():!function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()}()){e.next=12;break}return e.next=11,b(d());case 11:return e.abrupt("return");case 12:return o.id=u.ZP.active,e.next=15,b(o);case 15:e.next=22;break;case 17:return e.prev=17,e.t0=e["catch"](1),console.error("Failed to load save. Falling back to new save.\n",e.t0),e.next=22,b(d());case 22:case"end":return e.stop()}}),e,null,[[1,17]])}))),m.apply(this,arguments)}function d(){var e=y(),n=f({id:e});return localStorage.setItem(e,btoa(unescape(encodeURIComponent((0,i.U)(n))))),u.ZP.saves.push(e),n}function y(){var e,n=0;do{e="".concat(l.id,"-").concat(function(){return void 0!==n&&null!==n&&"object"===(0,r.Z)(n)&&n[Symbol.for("postfix-increment")]?n[Symbol.for("postfix-increment")]():n++}())}while(localStorage.getItem(e));return e}function b(e){return v.apply(this,arguments)}function v(){return v=(0,t.Z)(regeneratorRuntime.mark((function e(n){var r,t,a,c,s,m,d,y;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.info("Loading save",n),e.next=3,Promise.resolve().then(o.bind(o,9365));case 3:return r=e.sent,t=r.layers,a=r.removeLayer,c=r.addLayer,e.next=9,Promise.resolve().then(o.bind(o,1657));case 9:for(y in s=e.sent,m=s.fixOldSave,d=s.getInitialLayers,t)a(t[y]);d(n).forEach((function(e){return c(e,n)})),n=f(n),n.offlineProd&&n.time&&(function(){return void 0!==n.offlineTime&&null!==n.offlineTime&&n.offlineTime[Symbol.for("==")]?n.offlineTime[Symbol.for("==")](void 0):void 0==n.offlineTime}()&&(n.offlineTime=0),n.offlineTime=function(){return void 0!==n.offlineTime&&null!==n.offlineTime&&n.offlineTime[Symbol.for("+")]?n.offlineTime[Symbol.for("+")]((Date.now()-n.time)/1e3):n.offlineTime+(Date.now()-n.time)/1e3}()),n.time=Date.now(),function(){return void 0!==n.modVersion&&null!==n.modVersion&&n.modVersion[Symbol.for("!==")]?n.modVersion[Symbol.for("!==")](l.versionNumber):n.modVersion!==l.versionNumber}()&&m(n.modVersion,n),Object.assign(i.Z,n),u.ZP.active=i.Z.id;case 20:case"end":return e.stop()}}),e)}))),v.apply(this,arguments)}setInterval((function(){i.Z.autosave&&c()}),1e3),window.onbeforeunload=function(){i.Z.autosave&&c()},window.save=c;var S=window.hardReset=(0,t.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,b(d());case 2:case"end":return e.stop()}}),e)})))},5246:function(e,n,o){"use strict";o(2526),o(1817),o(1539),o(4747),o(7327),o(2479);var r=o(9365),t=o(6591),l=o(1604),i=o(4865);e=o.hmd(e),n["Z"]=(0,i.defineComponent)({props:{style:(0,l.P5)(String,Object,Array),classes:(0,l.P5)(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup:function(n){var o=(0,i.ref)(null),l=new ResizeObserver(c),u=(0,i.inject)(r.NodesInjectionKey),a=(0,i.ref)(null);(0,i.onMounted)((function(){var r,u,f=a.value;(function(){return void 0!==f&&null!==f&&f[Symbol.for("!=")]?f[Symbol.for("!=")](null):null!=f})()&&(l.observe(f),o.value=new t.MxU({resizeTo:f,backgroundAlpha:0}),null===(u=a.value)||void 0===u||u.appendChild(o.value.view),n.onInit(o.value));c(),"apply"===(null===(r=e.hot)||void 0===r?void 0:r.status())&&n.onHotReload&&(0,i.nextTick)(n.onHotReload)})),(0,i.onBeforeUnmount)((function(){var e;null===(e=o.value)||void 0===e||e.destroy()}));var f=!0;function c(){f&&(f=!1,(0,i.nextTick)((function(){var e;(function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!=")]?a.value[Symbol.for("!=")](null):null!=a.value})()&&n.onContainerResized&&(Object.values(u.value).filter((function(e){return e})).forEach((function(e){return e.rect=e.element.getBoundingClientRect()})),n.onContainerResized(a.value.getBoundingClientRect()),null===(e=o.value)||void 0===e||e.resize());f=!0})))}return document.fonts.ready.then(c),{unref:i.unref,resizeListener:a}}})},1657:function(e,n,o){"use strict";o.r(n),o.d(n,{fixOldSave:function(){return yr},getInitialLayers:function(){return mr},hasWon:function(){return dr},main:function(){return sr}});var r=o(4865),t=(o(2526),o(1817),o(1539),function(e){return(0,r.pushScopeId)("data-v-07150322"),e=e(),(0,r.popScopeId)(),e}),l=t((function(){return(0,r.createElementVNode)("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[(0,r.createElementVNode)("g",{id:"P"},[(0,r.createElementVNode)("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),(0,r.createElementVNode)("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),(0,r.createElementVNode)("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),(0,r.createElementVNode)("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),(0,r.createElementVNode)("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),(0,r.createElementVNode)("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),(0,r.createElementVNode)("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())}));function i(e,n){return(0,r.openBlock)(),(0,r.createBlock)(r.Transition,{appear:""},{default:(0,r.withCtx)((function(){return[l]})),_:1})}var u=o(3744);const a={},f=(0,u.Z)(a,[["render",i],["__scopeId","data-v-07150322"]]);var c=f,s=(0,r.defineComponent)({props:{width:{default:"8px"},height:{default:"17px"}},setup:function(e){return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{style:(0,r.normalizeStyle)({width:e.width,height:e.height})},null,4)}}});const m=s;var d=m,y=o(6113),b=o(3336),v=(o(7268),o(86),o(5613)),S=o(7302),g=o(4061);function p(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"points",t=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:0,l=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](3):n.length>3}()&&function(){return void 0!==n[3]&&null!==n[3]&&n[3][Symbol.for("!==")]?n[3][Symbol.for("!==")](void 0):void 0!==n[3]}()?arguments[3]:void 0,i=(0,r.isRef)(e)?e:(0,g.ax)(e);return i.displayName=o,i.precision=t,i.small=l,i}function h(e){var n=(0,g.ax)(e.value);return(0,r.watch)(e,(function(e){v.ZP.gt(e,n.value)&&(n.value=e)})),n}function N(e){var n=(0,g.ax)(e.value);return(0,r.watch)(e,(function(e,o){v.ZP.gt(e,o)&&(n.value=v.ZP.add(n.value,v.ZP.sub(e,o)))})),n}var k=new v.ZP("10^^8"),V=new v.ZP("1e100");function x(e,n){var o=(0,r.ref)(0),t=(0,r.ref)(0),l=(0,r.ref)(0);S.globalBus.on("update",(function(n){if(t.value=0,v.ZP.lte(e.value,V))l.value=e.value;else{var r=e.value,i=l.value;if(l.value=r,v.ZP.gt(r,i))if(v.ZP.gte(r,k))r=v.ZP.slog(r,1e10),i=v.ZP.slog(i,1e10),o.value=r.sub(i).div(n),t.value=function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}();else while(v.ZP.div(r,i).log(10).div(n).gte("100")&&function(){return void 0!==t.value&&null!==t.value&&t.value[Symbol.for("<=")]?t.value[Symbol.for("<=")](5):t.value<=5}()&&v.ZP.gt(i,0))r=v.ZP.log10(r),i=v.ZP.log10(i),o.value=r.sub(i).div(n),function(){void 0!==t.value&&null!==t.value&&"object"===(0,b.Z)(t.value)&&t.value[Symbol.for("postfix-increment")]?t.value[Symbol.for("postfix-increment")]():t.value++}()}}));var i=(0,r.computed)((function(){return 0===t.value?n?function(){return(0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName!==void 0&&(0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName!==null&&((0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]?((0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]("/s"):(0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName+"/s"}():"":function(){return(0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value)!==void 0&&(0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value)!==null&&((0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value))[Symbol.for("+")]?((0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value))[Symbol.for("+")]("s/sec"):(0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value)+"s/sec"}()}));return i}function M(e,n){var o=function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](null):null!==n}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](void 0):void 0!==n}()?n:e.value;return v.ZP.eq(e.precision,0)?(0,v.Ht)(o):(0,v.WU)(o,e.precision,e.small)}var Z=o(9584);o(4553),o(6699),o(2023),o(4747),o(7327),o(1249),o(2222);function C(e,n,o,t,l,i){var u=(0,r.resolveComponent)("Links");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.nodesComp))),e.leftNodesComp?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.leftNodesComp),{key:0})):(0,r.createCommentVNode)("",!0),e.rightNodesComp?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.rightNodesComp),{key:1})):(0,r.createCommentVNode)("",!0),e.branches?((0,r.openBlock)(),(0,r.createBlock)(u,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,r.createCommentVNode)("",!0)],64)}var w=o(1604),B=(o(2479),o(9365)),P=(o(9254),["x1","y1","x2","y2"]),E=(0,r.defineComponent)({props:{link:null,startNode:null,endNode:null,boundingRect:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,r.computed)((function(){var e=o.startNode.value.rect,n=o.boundingRect.value,r=n?{x:function(){return e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](n.x):e.x+e.width/2-n.x}(),y:function(){return e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](n.y):e.y+e.height/2-n.y}()}:{x:0,y:0};return o.link.value.offsetStart&&(r.x=function(){return void 0!==r.x&&null!==r.x&&r.x[Symbol.for("+")]?r.x[Symbol.for("+")](o.link.value.offsetStart.x):r.x+o.link.value.offsetStart.x}(),r.y=function(){return void 0!==r.y&&null!==r.y&&r.y[Symbol.for("+")]?r.y[Symbol.for("+")](o.link.value.offsetStart.y):r.y+o.link.value.offsetStart.y}()),r})),l=(0,r.computed)((function(){var e=o.endNode.value.rect,n=o.boundingRect.value,r=n?{x:function(){return e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](n.x):e.x+e.width/2-n.x}(),y:function(){return e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](n.y):e.y+e.height/2-n.y}()}:{x:0,y:0};return o.link.value.offsetEnd&&(r.x=function(){return void 0!==r.x&&null!==r.x&&r.x[Symbol.for("+")]?r.x[Symbol.for("+")](o.link.value.offsetEnd.x):r.x+o.link.value.offsetEnd.x}(),r.y=function(){return void 0!==r.y&&null!==r.y&&r.y[Symbol.for("+")]?r.y[Symbol.for("+")](o.link.value.offsetEnd.y):r.y+o.link.value.offsetEnd.y}()),r}));return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("line",(0,r.mergeProps)({"stroke-width":"15px",stroke:"white"},e.link,{x1:(0,r.unref)(t).x,y1:(0,r.unref)(t).y,x2:(0,r.unref)(l).x,y2:(0,r.unref)(l).y}),null,16,P)}}});const T=E;var F=T,I=(0,r.defineComponent)({props:{links:null},setup:function(e){var n,o=e,t=(0,r.toRef)(o,"links"),l=new ResizeObserver(c),i=(0,r.inject)(B.NodesInjectionKey),u=(0,r.ref)(null);(0,r.onMounted)((function(){var e=u.value;(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e})()&&l.observe(e)}));var a=!0,f=(0,r.ref)(null===(n=u.value)||void 0===n?void 0:n.getBoundingClientRect());function c(){(function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!=")]?u.value[Symbol.for("!=")](null):null!=u.value})()&&a&&(a=!1,(0,r.nextTick)((function(){var e;f.value=null===(e=u.value)||void 0===e?void 0:e.getBoundingClientRect(),Object.values(i.value).forEach((function(e){return e.rect=e.element.getBoundingClientRect()})),a=!0})))}document.fonts.ready.then(c);var s=(0,r.computed)((function(){var e,n=i.value;return function(){var o,r,l,i,u;return void 0!==(e=null===(o=t.value)||void 0===o?void 0:o.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))&&null!==(e=null===(r=t.value)||void 0===r?void 0:r.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))&&(e=null===(l=t.value)||void 0===l?void 0:l.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))[Symbol.for("!==")]?(e=null===(i=t.value)||void 0===i?void 0:i.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))[Symbol.for("!==")](null):null!==(e=null===(u=t.value)||void 0===u?void 0:u.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()?e:[]}));return function(e,n){return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.unref)(s)?((0,r.openBlock)(),(0,r.createElementBlock)("svg",(0,r.normalizeProps)((0,r.mergeProps)({key:0},e.$attrs)),[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(s),(function(e,n){return(0,r.openBlock)(),(0,r.createBlock)(F,{key:n,link:e,boundingRect:(0,r.unref)(f),startNode:(0,r.unref)(i)[e.startNode.id],endNode:(0,r.unref)(i)[e.endNode.id]},null,8,["link","boundingRect","startNode","endNode"])})),128))],16)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",{ref_key:"resizeListener",ref:u,class:"resize-listener"},null,512)],64)}}});const D=(0,u.Z)(I,[["__scopeId","data-v-e35b0402"]]);var R=D,O=(0,r.defineComponent)({props:{nodes:{type:(0,w.P5)(Array),required:!0},leftSideNodes:(0,w.P5)(Array),rightSideNodes:(0,w.P5)(Array),branches:(0,w.P5)(Array)},components:{Links:R},setup:function(e){var n=(0,r.toRefs)(e),o=n.nodes,t=n.leftSideNodes,l=n.rightSideNodes,i=(0,r.shallowRef)();(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);i.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[e.map((function(e){return(0,r.createVNode)("span",{class:"row"},[e.map(w.qF)])}))])})))}));var u=(0,r.shallowRef)();(0,r.watchEffect)((function(){var e=(0,w.Uv)(t);u.value=e?(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",{class:"left-side-nodes small"},[e.map(w.qF)])}))):""}));var a=(0,r.shallowRef)();return(0,r.watchEffect)((function(){var e=(0,w.Uv)(l);a.value=e?(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",{class:"side-nodes small"},[e.map(w.qF)])}))):""})),{unref:r.unref,nodesComp:i,leftNodesComp:u,rightNodesComp:a}}});const _=(0,u.Z)(O,[["render",C],["__scopeId","data-v-51e99c22"]]);var j=_,A=o(5082);function U(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:(0,r.normalizeClass)((0,A.Z)({treeNode:!0,can:e.unref(e.canClick)},e.unref(e.classes)))},[(0,r.createElementVNode)("div",{onClick:n[0]||(n[0]=function(){return e.onClick&&e.onClick.apply(e,arguments)}),onMousedown:n[1]||(n[1]=function(){return e.start&&e.start.apply(e,arguments)}),onMouseleave:n[2]||(n[2]=function(){return e.stop&&e.stop.apply(e,arguments)}),onMouseup:n[3]||(n[3]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchstart:n[4]||(n[4]=function(){return e.start&&e.start.apply(e,arguments)}),onTouchend:n[5]||(n[5]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchcancel:n[6]||(n[6]=function(){return e.stop&&e.stop.apply(e,arguments)}),style:(0,r.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:"-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ".concat(e.unref(e.glowColor))},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[]])},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp))))],36),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}o(9653);var q=o(6084),z=(0,r.defineComponent)({props:{id:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,r.inject)(B.RegisterNodeInjectionKey),l=(0,r.inject)(B.UnregisterNodeInjectionKey),i=(0,r.ref)(null),u=(0,r.computed)((function(){return i.value&&i.value.parentElement}));return t&&l&&((0,r.watch)([u,o.id],(function(e,n){var o=(0,q.Z)(e,2),i=o[0],u=o[1],a=(0,q.Z)(n,2),f=a[0],c=a[1];f&&l((0,r.unref)(c)),i&&t(u,i)})),(0,r.onUnmounted)((function(){return l((0,r.unref)(o.id))}))),function(e,n){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"node",ref_key:"node",ref:i},null,512)}}});const L=(0,u.Z)(z,[["__scopeId","data-v-63ded336"]]);var G=L,H={key:0},W={key:0,class:"mark star"},Y=["src"],K=(0,r.defineComponent)({props:{mark:{type:[Boolean,String]}},setup:function(e){return function(n,o){return e.mark?((0,r.openBlock)(),(0,r.createElementBlock)("div",H,[!0===e.mark?((0,r.openBlock)(),(0,r.createElementBlock)("div",W)):((0,r.openBlock)(),(0,r.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,Y))])):(0,r.createCommentVNode)("",!0)}}});const J=(0,u.Z)(K,[["__scopeId","data-v-c476c56a"]]);var Q=J,$=(0,r.defineComponent)({props:{display:(0,w.P5)(Object,String,Function),visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),onClick:Function,onHold:Function,color:(0,w.P5)(String),glowColor:(0,w.P5)(String),canClick:{type:(0,w.P5)(Boolean),required:!0},mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Q,Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.onClick,t=n.onHold,l=n.display,i=(0,w.KO)(l),u=(0,w.ix)(o,t),a=u.start,f=u.stop;return{start:a,stop:f,comp:i,unref:r.unref,Visibility:y.EE,isCoercableComponent:w.RU}}});const X=(0,u.Z)($,[["render",U],["__scopeId","data-v-426d9bce"]]);var ee=X,ne=o(9583),oe=o(3273),re=Symbol("TreeNode"),te=Symbol("Tree");function le(e){return(0,oe.z2)((function(){var n=e();if(n.id=(0,y.QI)("treeNode-"),n.type=re,n[y.wA]=ee,(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,ne.yB)(n,"color"),(0,ne.yB)(n,"display"),(0,ne.yB)(n,"glowColor"),(0,ne.yB)(n,"classes"),(0,ne.yB)(n,"style"),(0,ne.yB)(n,"mark"),n.onClick){var o=n.onClick.bind(n);n.onClick=function(){(0,r.unref)(n.canClick)&&o()}}if(n.onHold){var t=n.onHold.bind(n);n.onHold=function(){(0,r.unref)(n.canClick)&&t()}}return n[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,r=this.classes,t=this.onClick,l=this.onHold,i=this.color,u=this.glowColor,a=this.canClick,f=this.mark,c=this.id;return{display:e,visibility:n,style:o,classes:r,onClick:t,onHold:l,color:i,glowColor:u,canClick:a,mark:f,id:c}},n}))}function ie(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("tree-"),n.type=te,n[y.wA]=j,n.isResetting=(0,r.ref)(!1),n.resettingNode=(0,r.shallowRef)(null),n.reset=function(e){var o,r,t=n;t.isResetting.value=!0,t.resettingNode.value=e,null===(o=t.resetPropagation)||void 0===o||o.call(t,t,e),null===(r=t.onReset)||void 0===r||r.call(t,e),t.isResetting.value=!1,t.resettingNode.value=null},n.links=(0,r.computed)((function(){var e,o=n;return function(){return void 0!==(e=(0,r.unref)(o.branches))&&null!==(e=(0,r.unref)(o.branches))&&(e=(0,r.unref)(o.branches))[Symbol.for("!==")]?(e=(0,r.unref)(o.branches))[Symbol.for("!==")](null):null!==(e=(0,r.unref)(o.branches))}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()?e:[]})),(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"nodes"),(0,ne.yB)(n,"leftSideNodes"),(0,ne.yB)(n,"rightSideNodes"),(0,ne.yB)(n,"branches"),n[y.tj]=function(){var e=this.nodes,n=this.leftSideNodes,o=this.rightSideNodes,r=this.branches;return{nodes:e,leftSideNodes:n,rightSideNodes:o,branches:r}},n}))}var ue=function(e,n){var o=[n],t=[n];(function(){return void 0!==e.branches&&null!==e.branches&&e.branches[Symbol.for("!=")]?e.branches[Symbol.for("!=")](null):null!=e.branches})()&&function(){var n=(0,r.unref)(e.branches),l=function(){var e=[];t.forEach((function(r){n.filter((function(e){return e.startNode===r||e.endNode===r})).map((function(e){return e.startNode===r?e.endNode:e.startNode})).filter((function(e){return function(){return void 0!==o.includes(e)&&null!==o.includes(e)&&o.includes(e)[Symbol.for("!")]?o.includes(e)[Symbol.for("!")]():!o.includes(e)}()})).forEach((function(n){var o;(function(){return void 0!==e.includes(n)&&null!==e.includes(n)&&e.includes(n)[Symbol.for("!")]?e.includes(n)[Symbol.for("!")]():!e.includes(n)})()&&(e.push(n),null===(o=n.reset)||void 0===o||o.reset())}))})),t=e,o.push.apply(o,(0,Z.Z)(t))};while(function(){return void 0!==t.length&&null!==t.length&&t.length[Symbol.for(">")]?t.length[Symbol.for(">")](0):t.length>0}())l()}()};function ae(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:null,t=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:0,l=(0,ne.UI)(t);return(0,r.computed)((function(){return function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||v.ZP.gte(e.value,(0,r.unref)(l))?function(){return M(e)+" "!==void 0&&M(e)+" "!==null&&(M(e)+" ")[Symbol.for("+")]?(M(e)+" ")[Symbol.for("+")](e.displayName):M(e)+" "+e.displayName}():"Reach ".concat(v.ZP.eq(o.precision,0)?(0,v.Ht)((0,r.unref)(l)):(0,v.WU)((0,r.unref)(l),o.precision)," ").concat(o.displayName," to unlock (You have ").concat(v.ZP.eq(o.precision,0)?(0,v.Ht)(o.value):(0,v.WU)(o.value,o.precision),")")}))}var fe=o(5967),ce=o(2482),se=(o(8862),o(274)),me=o(264);function de(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&"url(".concat(e.image,")")||""},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[]]),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,achievement:!0,locked:function(){return void 0!==e.unref(e.earned)&&null!==e.unref(e.earned)&&e.unref(e.earned)[Symbol.for("!")]?e.unref(e.earned)[Symbol.for("!")]():!e.unref(e.earned)}(),bought:e.unref(e.earned)},e.unref(e.classes)))},[e.component?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var ye=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:(0,w.P5)(Object,String,Function),earned:{type:(0,w.P5)(Boolean),required:!0},image:(0,w.P5)(String),style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:G,MarkNode:Q},setup:function(e){var n=(0,r.toRefs)(e),o=n.display;return{component:(0,w.KO)(o),unref:r.unref,Visibility:y.EE}}});const be=(0,u.Z)(ye,[["render",de],["__scopeId","data-v-e3f32402"]]);var ve=be,Se=o(3002);o(343);function ge(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:"white",o=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](1):e.length>1}()&&function(){return void 0!==e[1]&&null!==e[1]&&e[1][Symbol.for("!==")]?e[1][Symbol.for("!==")](void 0):void 0!==e[1]}()?arguments[1]:"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 ".concat(o," ").concat(n),zIndex:1}}function pe(){return ge("red","20px")}S.globalBus.on("setupVue",(function(e){return e.use(Se.ZP)}));var he=(0,Se.pm)(),Ne=Symbol("Achievement");function ke(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());if(o.id=(0,y.QI)("achievement-"),o.type=Ne,o[y.wA]=ve,o.earned=o[g.n9],o.complete=function(){o[g.n9].value=!0},(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"display"),(0,ne.yB)(o,"mark"),(0,ne.yB)(o,"image"),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"classes"),o[y.tj]=function(){var e=this.visibility,n=this.display,o=this.earned,t=this.image,l=this.style,i=this.classes,u=this.mark,a=this.id;return{visibility:e,display:n,earned:o,image:t,style:(0,r.unref)(l),classes:i,mark:u,id:a}},o.shouldEarn){var t=o;(0,r.watchEffect)((function(){var e,n;if(function(){return void 0!==t.earned.value&&null!==t.earned.value&&t.earned.value[Symbol.for("!")]?t.earned.value[Symbol.for("!")]():!t.earned.value}()&&(0,r.unref)(t.visibility)===y.EE.Visible&&function(){return void 0!==(e=t.shouldEarn)&&null!==(e=t.shouldEarn)&&(e=t.shouldEarn)[Symbol.for("!==")]?(e=t.shouldEarn)[Symbol.for("!==")](null):null!==(e=t.shouldEarn)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.call(t)&&(t.earned.value=!0,null===(n=t.onComplete)||void 0===n||n.call(t),t.display)){var o=(0,w.MM)((0,r.unref)(t.display));he.info((0,r.createVNode)("div",null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Achievement earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(o,null,null)])]))}}))}return o}),(0,g.ax)(!1))}o(9714),o(7042);function Ve(e,n,o,t,l,i){var u=(0,r.resolveComponent)("GridCell");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.rows),(function(n){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["row",{mergeAdjacent:e.mergeAdjacent}]),key:n},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.cols),(function(o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherCellProps(e.unref(e.cells)[function(){return 100*n!==void 0&&100*n!==null&&(100*n)[Symbol.for("+")]?(100*n)[Symbol.for("+")](o):100*n+o}()])),null,16)})),128))],2)})),128))],4)):(0,r.createCommentVNode)("",!0)}var xe=o(1037),Me=o(9266),Ze={key:0};function Ce(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,class:(0,r.normalizeClass)({feature:!0,tile:!0,can:e.unref(e.canClick),locked:function(){return void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick)}()}),style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),onClick:n[0]||(n[0]=function(){return e.onClick&&e.onClick.apply(e,arguments)}),onMousedown:n[1]||(n[1]=function(){return e.start&&e.start.apply(e,arguments)}),onMouseleave:n[2]||(n[2]=function(){return e.stop&&e.stop.apply(e,arguments)}),onMouseup:n[3]||(n[3]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchstart:n[4]||(n[4]=function(){return e.start&&e.start.apply(e,arguments)}),onTouchend:n[5]||(n[5]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchcancel:n[6]||(n[6]=function(){return e.stop&&e.stop.apply(e,arguments)})},[e.title?((0,r.openBlock)(),(0,r.createElementBlock)("div",Ze,[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.titleComponent)))])):(0,r.createCommentVNode)("",!0),((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component),{style:{"white-space":"pre-line"}})),(0,r.createVNode)(a,{id:e.id},null,8,["id"])],38)):(0,r.createCommentVNode)("",!0)}var we=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,w.P5)(Object,String,Function),required:!0},title:(0,w.P5)(Object,String,Function),style:(0,w.P5)(String,Object,Array),canClick:{type:(0,w.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.onClick,t=n.onHold,l=n.title,i=n.display,u=(0,w.ix)(o,t),a=u.start,f=u.stop,c=(0,w.KO)(l),s=(0,w.vq)(i);return{start:a,stop:f,titleComponent:c,component:s,Visibility:y.EE,unref:r.unref}}});const Be=(0,u.Z)(we,[["render",Ce],["__scopeId","data-v-b1182ac6"]]);var Pe=Be,Ee=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},rows:{type:(0,w.P5)(Number),required:!0},cols:{type:(0,w.P5)(Number),required:!0},cells:{type:(0,w.P5)(Object),required:!0}},components:{GridCell:Pe},setup:function(){var e=(0,r.computed)((function(){return xe.Z[Me.ZP.theme].mergeAdjacent}));function n(e){var n=e.visibility,o=e.onClick,r=e.onHold,t=e.display,l=e.title,i=e.style,u=e.canClick,a=e.id;return{visibility:n,onClick:o,onHold:r,display:t,title:l,style:i,canClick:u,id:a}}return{unref:r.unref,gatherCellProps:n,Visibility:y.EE,mergeAdjacent:e}}});const Te=(0,u.Z)(Ee,[["render",Ve]]);var Fe=Te,Ie=o(1349);Symbol("Grid");function De(e){return new Proxy({},Re(e))}function Re(e){var n=(0,r.computed)((function(){for(var n=[],o=1;function(){return void 0!==o&&null!==o&&o[Symbol.for("<=")]?o[Symbol.for("<=")]((0,r.unref)(e.rows)):o<=(0,r.unref)(e.rows)}();function(){return void 0!==o&&null!==o&&"object"===(0,b.Z)(o)&&o[Symbol.for("postfix-increment")]?o[Symbol.for("postfix-increment")]():o++}())for(var t=1;function(){return void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")]((0,r.unref)(e.cols)):t<=(0,r.unref)(e.cols)}();function(){return void 0!==t&&null!==t&&"object"===(0,b.Z)(t)&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++}())n.push(function(){return 100*o!==void 0&&100*o!==null&&(100*o)[Symbol.for("+")]?(100*o)[Symbol.for("+")](t):100*o+t}().toString());return n}));return{get:function(o,r){return"isProxy"===r||("symbol"===(0,b.Z)(r)?e[r]:function(){return void 0!==n.value.includes(r.toString())&&null!==n.value.includes(r.toString())&&n.value.includes(r.toString())[Symbol.for("!")]?n.value.includes(r.toString())[Symbol.for("!")]():!n.value.includes(r.toString())}()?void 0:(function(){return void 0!==o[r]&&null!==o[r]&&o[r][Symbol.for("==")]?o[r][Symbol.for("==")](null):null==o[r]}()&&(o[r]=new Proxy(e,Oe(r.toString()))),o[r]))},set:function(e,n,o){return console.warn("Cannot set grid cells",e,n,o),!1},ownKeys:function(){return n.value},has:function(e,o){return n.value.includes(o.toString())},getOwnPropertyDescriptor:function(e,o){if(n.value.includes(o.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function Oe(e){var n=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],o={};return{get:function(n,t,l){if("isProxy"===t)return!0;var i=n[t];return(0,Ie.mf)(i)?function(){return i.call(l,e,n.getState(e))}:function(){return void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i}()||"symbol"===(0,b.Z)(t)?i:(t=function(){return void 0!==t.slice(0,1).toUpperCase()&&null!==t.slice(0,1).toUpperCase()&&t.slice(0,1).toUpperCase()[Symbol.for("+")]?t.slice(0,1).toUpperCase()[Symbol.for("+")](t.slice(1)):t.slice(0,1).toUpperCase()+t.slice(1)}(),"startState"===t?i.call(l,e):(i=n["get".concat(t)],(0,Ie.mf)(i)?(function(){return t in o!==void 0&&t in o!==null&&(t in o)[Symbol.for("!")]?(t in o)[Symbol.for("!")]():!(t in o)}()&&(o[t]=(0,r.computed)((function(){return i.call(l,e,n.getState(e))}))),o[t].value):function(){return void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i}()?(0,r.unref)(i):(i=n["on".concat(t)],(0,Ie.mf)(i)?function(){return i.call(l,e,n.getState(e))}:function(){return void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i}()?i:n[t])))},set:function(n,o,r,t){return o="set".concat(function(){return void 0!==o.slice(0,1).toUpperCase()&&null!==o.slice(0,1).toUpperCase()&&o.slice(0,1).toUpperCase()[Symbol.for("+")]?o.slice(0,1).toUpperCase()[Symbol.for("+")](o.slice(1)):o.slice(0,1).toUpperCase()+o.slice(1)}()),function(){return void 0!==o&&null!==o&&o[Symbol.for("in")]?o[Symbol.for("in")](n):o in n}()&&(0,Ie.mf)(n[o])&&function(){return void 0!==n[o].length&&null!==n[o].length&&n[o].length[Symbol.for("<")]?n[o].length[Symbol.for("<")](3):n[o].length<3}()?(n[o].call(t,e,r),!0):(console.warn('No setter for "'.concat(o,'".'),n),!1)},ownKeys:function(){return n},has:function(e,o){return n.includes(o.toString())},getOwnPropertyDescriptor:function(e,o){if(n.includes(o.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function _e(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());if(o.id=(0,y.QI)("grid-"),o[y.wA]=Fe,o.getID=function(e){return function(){return o.id+"-"!==void 0&&o.id+"-"!==null&&(o.id+"-")[Symbol.for("+")]?(o.id+"-")[Symbol.for("+")](e):o.id+"-"+e}()},o.getState=function(e){var n=this;return function(){return void 0!==n[g.n9].value[e]&&null!==n[g.n9].value[e]&&n[g.n9].value[e][Symbol.for("!=")]?n[g.n9].value[e][Symbol.for("!=")](void 0):void 0!=n[g.n9].value[e]}()?this[g.n9].value[e]:this.cells[e].startState},o.setState=function(e,n){this[g.n9].value[e]=n},o.cells=De(o),(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"rows"),(0,ne.yB)(o,"cols"),(0,ne.yB)(o,"getVisibility"),(0,y.Rh)(o,"getVisibility",y.EE.Visible),(0,ne.yB)(o,"getCanClick"),(0,y.Rh)(o,"getCanClick",!0),(0,ne.yB)(o,"getStartState"),(0,ne.yB)(o,"getStyle"),(0,ne.yB)(o,"getClasses"),(0,ne.yB)(o,"getTitle"),(0,ne.yB)(o,"getDisplay"),o.onClick){var t=o.onClick.bind(o);o.onClick=function(e,n){(0,r.unref)(o.cells[e].canClick)&&t(e,n)}}if(o.onHold){var l=o.onHold.bind(o);o.onHold=function(e,n){(0,r.unref)(o.cells[e].canClick)&&l(e,n)}}return o[y.tj]=function(){var e=this.visibility,n=this.rows,o=this.cols,r=this.cells,t=this.id;return{visibility:e,rows:n,cols:o,cells:r,id:t}},o}),(0,g.ax)({}))}o(561);function je(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[]]),onClick:n[0]||(n[0]=function(){return e.onClick&&e.onClick.apply(e,arguments)}),onMousedown:n[1]||(n[1]=function(){return e.start&&e.start.apply(e,arguments)}),onMouseleave:n[2]||(n[2]=function(){return e.stop&&e.stop.apply(e,arguments)}),onMouseup:n[3]||(n[3]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchstart:n[4]||(n[4]=function(){return e.start&&e.start.apply(e,arguments)}),onTouchend:n[5]||(n[5]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchcancel:n[6]||(n[6]=function(){return e.stop&&e.stop.apply(e,arguments)}),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:function(){return void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick)}(),small:e.small},e.unref(e.classes)))},[e.unref(e.comp)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],38)):(0,r.createCommentVNode)("",!0)}var Ae=(0,r.defineComponent)({props:{display:{type:(0,w.P5)(Object,String,Function),required:!0},visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(Object,String,Array),classes:(0,w.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,w.P5)(Boolean),required:!0},small:Boolean,mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:G,MarkNode:Q},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=n.onClick,l=n.onHold,i=(0,r.shallowRef)("");(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())i.value="";else if((0,w.RU)(e))i.value=(0,w.MM)(e);else{var n=(0,w.MM)(e.title||"","h3"),t=(0,w.MM)(e.description,"div");i.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",null,[e.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(n,null,null)]):null,(0,r.createVNode)(t,null,null)])})))}}));var u=(0,w.ix)(t,l),a=u.start,f=u.stop;return{start:a,stop:f,comp:i,Visibility:y.EE,unref:r.unref}}});const Ue=(0,u.Z)(Ae,[["render",je],["__scopeId","data-v-6b39988a"]]);var qe=Ue,ze=Symbol("Clickable");function Le(e){return(0,oe.z2)((function(){var n=e();if(n.id=(0,y.QI)("clickable-"),n.type=ze,n[y.wA]=qe,(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,ne.yB)(n,"classes"),(0,ne.yB)(n,"style"),(0,ne.yB)(n,"mark"),(0,ne.yB)(n,"display"),n.onClick){var o=n.onClick.bind(n);n.onClick=function(e){(0,r.unref)(n.canClick)&&o(e)}}if(n.onHold){var t=n.onHold.bind(n);n.onHold=function(){(0,r.unref)(n.canClick)&&t()}}return n[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,t=this.classes,l=this.onClick,i=this.onHold,u=this.canClick,a=this.small,f=this.mark,c=this.id;return{display:e,visibility:n,style:(0,r.unref)(o),classes:t,onClick:l,onHold:i,canClick:u,small:a,mark:f,id:c}},n}))}function Ge(e){return Le((function(){var n=e();(0,ne.yB)(n,"showNextAt"),(0,y.Rh)(n,"showNextAt",!0),(0,y.Rh)(n,"minimumGain",1),!function(){return void 0!==n.resetDescription&&null!==n.resetDescription&&n.resetDescription[Symbol.for("==")]?n.resetDescription[Symbol.for("==")](null):null==n.resetDescription}()?(0,ne.yB)(n,"resetDescription"):n.resetDescription=(0,r.computed)((function(){return v.ZP.lt(n.conversion.gainResource.value,1e3)?"Reset for ":""})),function(){return void 0!==n.display&&null!==n.display&&n.display[Symbol.for("==")]?n.display[Symbol.for("==")](null):null==n.display}()&&(n.display=(0,y.tZ)((function(){return(0,r.createVNode)("span",null,[(0,r.unref)(n.resetDescription),(0,r.createVNode)("b",null,[M(n.conversion.gainResource,v.ZP.max((0,r.unref)(n.conversion.actualGain),(0,r.unref)(n.minimumGain)))])," ",n.conversion.gainResource.displayName,(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),n.conversion.buyMax?"Next:":"Req:"," ",M(n.conversion.baseResource,n.conversion.buyMax||v.ZP.floor((0,r.unref)(n.conversion.actualGain)).neq(1)?(0,r.unref)(n.conversion.nextAt):(0,r.unref)(n.conversion.currentAt))," ",n.conversion.baseResource.displayName]),[[r.vShow,(0,r.unref)(n.showNextAt)]])])}))),function(){return void 0!==n.canClick&&null!==n.canClick&&n.canClick[Symbol.for("==")]?n.canClick[Symbol.for("==")](null):null==n.canClick}()&&(n.canClick=(0,r.computed)((function(){return v.ZP.gte((0,r.unref)(n.conversion.actualGain),(0,r.unref)(n.minimumGain))})));var o=n.onClick;return n.onClick=function(){(function(){return void 0!==(0,r.unref)(n.canClick)&&null!==(0,r.unref)(n.canClick)&&(0,r.unref)(n.canClick)[Symbol.for("!")]?(0,r.unref)(n.canClick)[Symbol.for("!")]():!(0,r.unref)(n.canClick)})()||(n.conversion.convert(),n.tree.reset(n.treeNode),null===o||void 0===o||o())},n}))}function He(e){return le((function(){var n=e();return(0,ne.yB)(n,"display"),(0,y.Rh)(n,"display",n.layerID),(0,ne.yB)(n,"append"),(0,A.Z)((0,A.Z)({},n),{},{display:n.layerID,onClick:(0,r.unref)(n.append)?function(){if(fe.Z.tabs.includes(n.layerID)){var e=fe.Z.tabs.lastIndexOf(n.layerID);fe.Z.tabs.splice(e,1)}else fe.Z.tabs.push(n.layerID)}:function(){fe.Z.tabs.splice(1,1,n.layerID)}})}))}function We(e){return(0,oe.z2)((function(){var n=e();return function(){return void 0!==n.currentGain&&null!==n.currentGain&&n.currentGain[Symbol.for("==")]?n.currentGain[Symbol.for("==")](null):null==n.currentGain}()&&(n.currentGain=(0,r.computed)((function(){var e=n.gainModifier?n.gainModifier.apply(n.scaling.currentGain(n)):n.scaling.currentGain(n);return e=v.ZP.floor(e).max(0),function(){return void 0!==(0,r.unref)(n.buyMax)&&null!==(0,r.unref)(n.buyMax)&&(0,r.unref)(n.buyMax)[Symbol.for("!")]?(0,r.unref)(n.buyMax)[Symbol.for("!")]():!(0,r.unref)(n.buyMax)}()&&(e=e.min(1)),e}))),function(){return void 0!==n.actualGain&&null!==n.actualGain&&n.actualGain[Symbol.for("==")]?n.actualGain[Symbol.for("==")](null):null==n.actualGain}()&&(n.actualGain=n.currentGain),function(){return void 0!==n.currentAt&&null!==n.currentAt&&n.currentAt[Symbol.for("==")]?n.currentAt[Symbol.for("==")](null):null==n.currentAt}()&&(n.currentAt=(0,r.computed)((function(){var e=n.scaling.currentAt(n);return n.roundUpCost&&(e=v.ZP.ceil(e)),e}))),function(){return void 0!==n.nextAt&&null!==n.nextAt&&n.nextAt[Symbol.for("==")]?n.nextAt[Symbol.for("==")](null):null==n.nextAt}()&&(n.nextAt=(0,r.computed)((function(){var e=n.scaling.nextAt(n);return n.roundUpCost&&(e=v.ZP.ceil(e)),e}))),function(){return void 0!==n.convert&&null!==n.convert&&n.convert[Symbol.for("==")]?n.convert[Symbol.for("==")](null):null==n.convert}()&&(n.convert=function(){n.gainResource.value=v.ZP.add(n.gainResource.value,(0,r.unref)(n.currentGain)),n.baseResource.value=0}),(0,ne.yB)(n,"currentGain"),(0,ne.yB)(n,"actualGain"),(0,ne.yB)(n,"currentAt"),(0,ne.yB)(n,"nextAt"),(0,ne.yB)(n,"buyMax"),(0,y.Rh)(n,"buyMax",!0),(0,ne.yB)(n,"roundUpCost"),(0,y.Rh)(n,"roundUpCost",!0),n}))}function Ye(e,n){return{currentGain:function(o){var t=v.ZP.div(o.baseResource.value,(0,r.unref)(e)).pow((0,r.unref)(n));return t.isNan()?new v.ZP(0):t},currentAt:function(o){var t=(0,r.unref)(o.currentGain);return o.gainModifier&&(t=o.gainModifier.revert(t)),t=v.ZP.max(0,t),v.ZP.root(t,(0,r.unref)(n)).times((0,r.unref)(e))},nextAt:function(o){var t=v.ZP.add((0,r.unref)(o.currentGain),1);return o.gainModifier&&(t=o.gainModifier.revert(t)),t=v.ZP.max(0,t),v.ZP.root(t,(0,r.unref)(n)).times((0,r.unref)(e)).max((0,r.unref)(e))}}}function Ke(e){return We(e)}function Je(e){return We((function(){var n=e();return(0,y.Rh)(n,"buyMax",!1),function(){return void 0!==n.currentGain&&null!==n.currentGain&&n.currentGain[Symbol.for("==")]?n.currentGain[Symbol.for("==")](null):null==n.currentGain}()&&(n.currentGain=(0,r.computed)((function(){var e=n.gainModifier?n.gainModifier.apply(n.scaling.currentGain(n)):n.scaling.currentGain(n);return e=v.ZP.floor(e).max(n.gainResource.value),function(){return void 0!==(0,r.unref)(n.buyMax)&&null!==(0,r.unref)(n.buyMax)&&(0,r.unref)(n.buyMax)[Symbol.for("!")]?(0,r.unref)(n.buyMax)[Symbol.for("!")]():!(0,r.unref)(n.buyMax)}()&&(e=e.min(v.ZP.add(n.gainResource.value,1))),e}))),function(){return void 0!==n.actualGain&&null!==n.actualGain&&n.actualGain[Symbol.for("==")]?n.actualGain[Symbol.for("==")](null):null==n.actualGain}()&&(n.actualGain=(0,r.computed)((function(){var e=v.ZP.sub(n.scaling.currentGain(n),n.gainResource.value).max(0);return function(){return void 0!==(0,r.unref)(n.buyMax)&&null!==(0,r.unref)(n.buyMax)&&(0,r.unref)(n.buyMax)[Symbol.for("!")]?(0,r.unref)(n.buyMax)[Symbol.for("!")]():!(0,r.unref)(n.buyMax)}()&&(e=e.min(1)),e}))),(0,y.Rh)(n,"convert",(function(){n.gainResource.value=n.gainModifier?n.gainModifier.apply((0,r.unref)(n.currentGain)):(0,r.unref)(n.currentGain),n.baseResource.value=0})),n}))}function Qe(e,n){var o=arguments,r=function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()&&function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()?arguments[2]:.5;return v.ZP.lte(e,n)?e:v.ZP.pow(e,r).times(v.ZP.pow(n,v.ZP.sub(1,r)))}function $e(e,n){var o=arguments,t=function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()&&function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()?arguments[2]:.5;return(0,A.Z)((0,A.Z)({},e),{},{currentGain:function(o){return Qe(e.currentGain(o),(0,r.unref)(n),(0,r.unref)(t))}})}var Xe=function(e){return(0,r.pushScopeId)("data-v-6447a93e"),e=e(),(0,r.popScopeId)(),e},en=Xe((function(){return(0,r.createElementVNode)("span",{class:"toggle"},"▼",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())}));function nn(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("CollapseTransition"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["infobox",(0,A.Z)({collapsed:e.unref(e.collapsed),stacked:e.stacked},e.unref(e.classes))]),style:(0,r.normalizeStyle)([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}])},[(0,r.createElementVNode)("button",{class:"title",style:(0,r.normalizeStyle)([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:n[0]||(n[0]=function(n){return e.collapsed.value=function(){return void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed)}()})},[en,((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.titleComponent)))],4),(0,r.createVNode)(a,null,{default:(0,r.withCtx)((function(){return[function(){return void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed)}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"body",style:(0,r.normalizeStyle)({backgroundColor:e.unref(e.color)})},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.bodyComponent),{style:(0,r.normalizeStyle)(e.unref(e.bodyStyle))},null,8,["style"]))],4)):(0,r.createCommentVNode)("",!0)]})),_:1}),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var on=o(423),rn=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:{type:(0,w.P5)(Object,String,Function),required:!0},title:{type:(0,w.P5)(Object,String,Function),required:!0},color:(0,w.P5)(String),collapsed:{type:Object,required:!0},style:(0,w.P5)(Object,String,Array),titleStyle:(0,w.P5)(Object,String,Array),bodyStyle:(0,w.P5)(Object,String,Array),classes:(0,w.P5)(Object),id:{type:String,required:!0}},components:{Node:G,CollapseTransition:on.Z},setup:function(e){var n=(0,r.toRefs)(e),o=n.title,t=n.display,l=(0,w.vq)(o),i=(0,w.vq)(t),u=(0,r.computed)((function(){return xe.Z[Me.ZP.theme].mergeAdjacent}));return{titleComponent:l,bodyComponent:i,stacked:u,unref:r.unref,Visibility:y.EE}}});const tn=(0,u.Z)(rn,[["render",nn],["__scopeId","data-v-6447a93e"]]);var ln=tn,un=Symbol("Infobox");function an(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());return o.id=(0,y.QI)("infobox-"),o.type=un,o[y.wA]=ln,o.collapsed=o[g.n9],(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"color"),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"titleStyle"),(0,ne.yB)(o,"bodyStyle"),(0,ne.yB)(o,"classes"),(0,ne.yB)(o,"title"),(0,ne.yB)(o,"display"),o[y.tj]=function(){var e=this.visibility,n=this.display,o=this.title,t=this.color,l=this.collapsed,i=this.style,u=this.titleStyle,a=this.bodyStyle,f=this.classes,c=this.id;return{visibility:e,display:n,title:o,color:t,collapsed:l,style:(0,r.unref)(i),titleStyle:u,bodyStyle:a,classes:f,id:c}},o}),(0,g.ax)(!1))}function fn(e,n,o,t,l,i){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{ref:"resizeListener",class:(0,r.normalizeClass)(["resize-listener",e.unref(e.classes)]),style:(0,r.normalizeStyle)(e.unref(e.style))},null,6)}var cn=o(5246);const sn=(0,u.Z)(cn.Z,[["render",fn],["__scopeId","data-v-4e1c0c10"]]);var mn=sn,dn=o(1845),yn=Symbol("Particles");function bn(e){return(0,oe.z2)((function(){var n,o=e();o.id=(0,y.QI)("particles-"),o.type=yn,o[y.wA]=mn,o.app=(0,r.shallowRef)(null),o.addEmitter=function(e){var n=o;return n.app.value?Promise.resolve(new dn.Q5(n.app.value.stage,e)):new Promise((function(n){t.push({resolve:n,config:e})}))};var t=[];function l(e){o.app.value=e,t.forEach((function(n){var o=n.resolve,r=n.config;return o(new dn.Q5(e.stage,r))})),t=[]}return o.onContainerResized=null===(n=o.onContainerResized)||void 0===n?void 0:n.bind(o),o[y.tj]=function(){var e=this.id,n=this.style,o=this.classes,t=this.onContainerResized,i=this.onHotReload;return{id:e,style:(0,r.unref)(n),classes:o,onContainerResized:t,onHotReload:i,onInit:l}},o}))}window.upgradeConfig=dn.oC;var vn=Symbol("Reset");function Sn(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("reset-"),n.type=vn,n.reset=function(){var e,o=function e(n){n&&"object"===(0,b.Z)(n)&&(!function(){return void 0!==g.n9&&null!==g.n9&&g.n9[Symbol.for("in")]?g.n9[Symbol.for("in")](n):g.n9 in n}()?function(){return n instanceof v.ZP!==void 0&&n instanceof v.ZP!==null&&(n instanceof v.ZP)[Symbol.for("!")]?(n instanceof v.ZP)[Symbol.for("!")]():!(n instanceof v.ZP)}()&&function(){return void 0!==(0,r.isRef)(n)&&null!==(0,r.isRef)(n)&&(0,r.isRef)(n)[Symbol.for("!")]?(0,r.isRef)(n)[Symbol.for("!")]():!(0,r.isRef)(n)}()&&Object.values(n).forEach((function(n){return e(n)})):n[g.n9].value=n[g.nY])};(0,r.unref)(n.thingsToReset).forEach(o),S.globalBus.emit("reset",n),null===(e=n.onReset)||void 0===e||e.call(n)},(0,ne.yB)(n,"thingsToReset"),n}))}var gn={};S.globalBus.on("removeLayer",(function(e){var n;null===(n=gn[e.id])||void 0===n||n.call(gn),gn[e.id]=void 0}));var pn=(0,r.defineComponent)({props:{resource:null,color:null},setup:function(e){var n=e,o=(0,r.computed)((function(){return M(n.resource)}));return function(n,t){return(0,r.openBlock)(),(0,r.createElementBlock)("h2",{style:(0,r.normalizeStyle)({color:e.color,"text-shadow":function(){return"0px 0px 10px "[Symbol.for("+")]?"0px 0px 10px "[Symbol.for("+")](e.color):"0px 0px 10px "+e.color}()})},(0,r.toDisplayString)((0,r.unref)(o)),5)}}});const hn=pn;var Nn=hn,kn={key:0},Vn={key:1},xn=(0,r.createTextVNode)(", "),Mn=(0,r.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),Zn=(0,r.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),Cn=(0,r.defineComponent)({props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,w.KO)(o.effectDisplay),l=(0,r.computed)((function(){return v.ZP.lt(o.resource.value,"1e1000")}));return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",null,[(0,r.unref)(l)?((0,r.openBlock)(),(0,r.createElementBlock)("span",kn,"You have ")):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(Nn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),(0,r.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,r.toDisplayString)(e.resource.displayName)):" "+(0,r.toDisplayString)(e.resource.displayName)}(),1),(0,r.unref)(t)?((0,r.openBlock)(),(0,r.createElementBlock)("span",Vn,[xn,((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(t))))])):(0,r.createCommentVNode)("",!0),Mn,Zn])}}});const wn=Cn;var Bn=wn,Pn=o(4096);function En(e,n,o){var t=(0,ne.UI)(e),l=(0,ne.UI)(n),i=(0,ne.UI)(!!function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||o);return{apply:function(e){return v.ZP.add(e,(0,r.unref)(t))},revert:function(e){return v.ZP.sub(e,(0,r.unref)(t))},enabled:i,description:(0,y.tZ)((function(){return(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,r.createTextVNode)("+"),(0,v.WU)((0,r.unref)(t))]),(0,r.unref)(l)?(0,r.createVNode)("span",{class:"modifier-description"},[(0,w.qF)((0,r.unref)(l))]):null])}))}}function Tn(e,n,o){var t=(0,ne.UI)(e),l=(0,ne.UI)(n),i=(0,ne.UI)(!!function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||o);return{apply:function(e){return v.ZP.times(e,(0,r.unref)(t))},revert:function(e){return v.ZP.div(e,(0,r.unref)(t))},enabled:i,description:(0,y.tZ)((function(){return(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,r.createTextVNode)("x"),(0,v.WU)((0,r.unref)(t))]),(0,r.unref)(l)?(0,r.createVNode)("span",{class:"modifier-description"},[(0,w.qF)((0,r.unref)(l))]):null])}))}}function Fn(e,n,o){var t=(0,ne.UI)(e),l=(0,ne.UI)(n),i=(0,ne.UI)(!!function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||o);return{apply:function(e){return v.ZP.pow(e,(0,r.unref)(t))},revert:function(e){return v.ZP.root(e,(0,r.unref)(t))},enabled:i,description:(0,y.tZ)((function(){return(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,r.createTextVNode)("^"),(0,v.WU)((0,r.unref)(t))]),(0,r.unref)(l)?(0,r.createVNode)("span",{class:"modifier-description"},[(0,w.qF)((0,r.unref)(l))]):null])}))}}function In(){for(var e=arguments.length,n=new Array(e),o=0;function(){return void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](e):o")]?n.filter((function(e){return(0,r.unref)(e.enabled)})).length[Symbol.for(">")](0):n.filter((function(e){return(0,r.unref)(e.enabled)})).length>0}()})),description:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[n.filter((function(e){return(0,r.unref)(e.enabled)})).map((function(e){return(0,r.unref)(e.description)})).filter((function(e){return e})).map(w.qF)])}))}}function Dn(e,n,o){var t=arguments,l=function(){return void 0!==t.length&&null!==t.length&&t.length[Symbol.for(">")]?t.length[Symbol.for(">")](3):t.length>3}()&&function(){return void 0!==t[3]&&null!==t[3]&&t[3][Symbol.for("!==")]?t[3][Symbol.for("!==")](void 0):void 0!==t[3]}()?arguments[3]:1,i=function(){return void 0!==t.length&&null!==t.length&&t.length[Symbol.for(">")]?t.length[Symbol.for(">")](4):t.length>4}()&&function(){return void 0!==t[4]&&null!==t[4]&&t[4][Symbol.for("!==")]?t[4][Symbol.for("!==")](void 0):void 0!==t[4]}()?arguments[4]:"";return(0,r.createVNode)("div",null,[(0,r.createVNode)("h3",null,[e,n?(0,r.createVNode)("span",{class:"subtitle"},[(0,r.createTextVNode)(" ("),n,(0,r.createTextVNode)(")")]):null]),(0,r.createVNode)("br",null,null),(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,v.WU)(l),i]),(0,r.createVNode)("span",{class:"modifier-description"},[(0,r.createTextVNode)("Base")])]),(0,w.qF)((0,r.unref)(o.description)),(0,r.createVNode)("hr",null,null),(0,r.createTextVNode)("Total: "),(0,v.WU)(o.apply(l)),i])}var Rn={class:"field"},On={key:0,class:"field-title"},_n=["min","max"],jn=(0,r.defineComponent)({props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup:function(e,n){var o=n.emit,t=e,l=(0,r.toRefs)(t),i=(0,r.computed)({get:function(){return String((0,r.unref)(l.modelValue)||0)},set:function(e){o("update:modelValue",Number(e))}});return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",Rn,[e.title?((0,r.openBlock)(),(0,r.createElementBlock)("span",On,(0,r.toDisplayString)(e.title),1)):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(me.Z,{display:"".concat((0,r.unref)(i)),class:(0,r.normalizeClass)({fullWidth:function(){return void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title}()})},{default:(0,r.withCtx)((function(){return[(0,r.withDirectives)((0,r.createElementVNode)("input",{type:"range","onUpdate:modelValue":o[0]||(o[0]=function(e){return(0,r.isRef)(i)?i.value=e:null}),min:e.min,max:e.max},null,8,_n),[[r.vModelText,(0,r.unref)(i)]])]})),_:1},8,["display","class"])])}}});const An=(0,u.Z)(jn,[["__scopeId","data-v-20a0a34d"]]);var Un=An,qn=o(4520),zn=o(9868),Ln=o(9905),Gn=(0,r.defineComponent)({setup:function(e){var n=(0,r.ref)("0"),o=new ResizeObserver(l),t=(0,r.ref)(null);function l(){var e=t.value;if(!function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e}()){var o=0;while(e.previousSibling){var r=e.previousSibling;r.dataset&&function(){return"vSticky"[Symbol.for("in")]?"vSticky"[Symbol.for("in")](r.dataset):"vSticky"in r.dataset}()&&(o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](r.offsetHeight):o+r.offsetHeight}()),e=r}n.value=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]("px"):o+"px"}()}}return(0,r.nextTick)(l),document.fonts.ready.then(l),(0,r.onMounted)((function(){var e,n=null===(e=t.value)||void 0===e?void 0:e.parentElement;n&&o.observe(n)})),function(e,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"sticky",style:(0,r.normalizeStyle)({top:n.value}),ref_key:"element",ref:t,"data-v-sticky":""},[(0,r.renderSlot)(e.$slots,"default")],4)}}});const Hn=(0,u.Z)(Gn,[["__scopeId","data-v-6987dd96"]]);var Wn=Hn,Yn=(0,r.defineComponent)({props:{height:null},setup:function(e){return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vr",style:(0,r.normalizeStyle)({height:e.height})},null,4)}}});const Kn=(0,u.Z)(Yn,[["__scopeId","data-v-15f6e746"]]);var Jn=Kn,Qn=o(6948);function $n(e,n,o,t,l,i){var u,a,f,c,s,m,d,y=(0,r.resolveComponent)("MarkNode"),b=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{width:function(){return void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px"}(),height:function(){return void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px"}(),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),class:(0,r.normalizeClass)((0,A.Z)({bar:!0},e.unref(e.classes)))},[(0,r.createElementVNode)("div",{class:"overlayTextContainer border",style:(0,r.normalizeStyle)([{width:function(){return void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px"}(),height:function(){return void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px"}()},function(){return void 0!==(a=e.unref(e.borderStyle))&&null!==(a=e.unref(e.borderStyle))&&(a=e.unref(e.borderStyle))[Symbol.for("!==")]?(a=e.unref(e.borderStyle))[Symbol.for("!==")](null):null!==(a=e.unref(e.borderStyle))}()&&function(){return void 0!==a&&null!==a&&a[Symbol.for("!==")]?a[Symbol.for("!==")](void 0):void 0!==a}()?a:{}])},[e.component?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component),{key:0,class:"overlayText",style:(0,r.normalizeStyle)(e.unref(e.textStyle))},null,8,["style"])):(0,r.createCommentVNode)("",!0)],4),(0,r.createElementVNode)("div",{class:"border",style:(0,r.normalizeStyle)([{width:function(){return void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px"}(),height:function(){return void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px"}()},function(){return void 0!==(f=e.unref(e.style))&&null!==(f=e.unref(e.style))&&(f=e.unref(e.style))[Symbol.for("!==")]?(f=e.unref(e.style))[Symbol.for("!==")](null):null!==(f=e.unref(e.style))}()&&function(){return void 0!==f&&null!==f&&f[Symbol.for("!==")]?f[Symbol.for("!==")](void 0):void 0!==f}()?f:{},function(){return void 0!==(c=e.unref(e.baseStyle))&&null!==(c=e.unref(e.baseStyle))&&(c=e.unref(e.baseStyle))[Symbol.for("!==")]?(c=e.unref(e.baseStyle))[Symbol.for("!==")](null):null!==(c=e.unref(e.baseStyle))}()&&function(){return void 0!==c&&null!==c&&c[Symbol.for("!==")]?c[Symbol.for("!==")](void 0):void 0!==c}()?c:{},function(){return void 0!==(s=e.unref(e.borderStyle))&&null!==(s=e.unref(e.borderStyle))&&(s=e.unref(e.borderStyle))[Symbol.for("!==")]?(s=e.unref(e.borderStyle))[Symbol.for("!==")](null):null!==(s=e.unref(e.borderStyle))}()&&function(){return void 0!==s&&null!==s&&s[Symbol.for("!==")]?s[Symbol.for("!==")](void 0):void 0!==s}()?s:{}])},[(0,r.createElementVNode)("div",{class:"fill",style:(0,r.normalizeStyle)([e.barStyle,function(){return void 0!==(m=e.unref(e.style))&&null!==(m=e.unref(e.style))&&(m=e.unref(e.style))[Symbol.for("!==")]?(m=e.unref(e.style))[Symbol.for("!==")](null):null!==(m=e.unref(e.style))}()&&function(){return void 0!==m&&null!==m&&m[Symbol.for("!==")]?m[Symbol.for("!==")](void 0):void 0!==m}()?m:{},function(){return void 0!==(d=e.unref(e.fillStyle))&&null!==(d=e.unref(e.fillStyle))&&(d=e.unref(e.fillStyle))[Symbol.for("!==")]?(d=e.unref(e.fillStyle))[Symbol.for("!==")](null):null!==(d=e.unref(e.fillStyle))}()&&function(){return void 0!==d&&null!==d&&d[Symbol.for("!==")]?d[Symbol.for("!==")](void 0):void 0!==d}()?d:{}])},null,4)],4),(0,r.createVNode)(y,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(b,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var Xn=(0,r.defineComponent)({props:{progress:{type:(0,w.P5)(String,Object,Number),required:!0},width:{type:(0,w.P5)(Number),required:!0},height:{type:(0,w.P5)(Number),required:!0},direction:{type:(0,w.P5)(String),required:!0},display:(0,w.P5)(Object,String,Function),visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(Object,String,Array),classes:(0,w.P5)(Object),borderStyle:(0,w.P5)(Object,String,Array),textStyle:(0,w.P5)(Object,String,Array),baseStyle:(0,w.P5)(Object,String,Array),fillStyle:(0,w.P5)(Object,String,Array),mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Q,Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.progress,t=n.width,l=n.height,i=n.direction,u=n.display,a=(0,r.computed)((function(){var e=o.value instanceof v.ZP?o.value.toNumber():Number(o.value);return function(){return 1-Math.min(Math.max(e,0),1)!==void 0&&1-Math.min(Math.max(e,0),1)!==null&&(1-Math.min(Math.max(e,0),1))[Symbol.for("*")]?(1-Math.min(Math.max(e,0),1))[Symbol.for("*")](100):100*(1-Math.min(Math.max(e,0),1))}()})),f=(0,r.computed)((function(){var e={width:function(){return(0,w.Uv)(t)+.5!==void 0&&(0,w.Uv)(t)+.5!==null&&((0,w.Uv)(t)+.5)[Symbol.for("+")]?((0,w.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,w.Uv)(t)+.5+"px"}(),height:function(){return(0,w.Uv)(l)+.5!==void 0&&(0,w.Uv)(l)+.5!==null&&((0,w.Uv)(l)+.5)[Symbol.for("+")]?((0,w.Uv)(l)+.5)[Symbol.for("+")]("px"):(0,w.Uv)(l)+.5+"px"}()};switch((0,r.unref)(i)){case no.Up:e.clipPath="inset(".concat(a.value,"% 0% 0% 0%)"),e.width=function(){return(0,w.Uv)(t)+1!==void 0&&(0,w.Uv)(t)+1!==null&&((0,w.Uv)(t)+1)[Symbol.for("+")]?((0,w.Uv)(t)+1)[Symbol.for("+")]("px"):(0,w.Uv)(t)+1+"px"}();break;case no.Down:e.clipPath="inset(0% 0% ".concat(a.value,"% 0%)"),e.width=function(){return(0,w.Uv)(t)+1!==void 0&&(0,w.Uv)(t)+1!==null&&((0,w.Uv)(t)+1)[Symbol.for("+")]?((0,w.Uv)(t)+1)[Symbol.for("+")]("px"):(0,w.Uv)(t)+1+"px"}();break;case no.Right:e.clipPath="inset(0% ".concat(a.value,"% 0% 0%)");break;case no.Left:e.clipPath="inset(0% 0% 0% ".concat(a.value," + '%)");break;case no.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),c=(0,w.KO)(u);return{normalizedProgress:a,barStyle:f,component:c,unref:r.unref,Visibility:y.EE}}});const eo=(0,u.Z)(Xn,[["render",$n],["__scopeId","data-v-e6e3c366"]]);var no,oo=eo,ro=Symbol("Bar");function to(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("bar-"),n.type=ro,n[y.wA]=oo,(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"width"),(0,ne.yB)(n,"height"),(0,ne.yB)(n,"direction"),(0,ne.yB)(n,"style"),(0,ne.yB)(n,"classes"),(0,ne.yB)(n,"borderStyle"),(0,ne.yB)(n,"baseStyle"),(0,ne.yB)(n,"textStyle"),(0,ne.yB)(n,"fillStyle"),(0,ne.yB)(n,"progress"),(0,ne.yB)(n,"display"),(0,ne.yB)(n,"mark"),n[y.tj]=function(){var e=this.progress,n=this.width,o=this.height,t=this.direction,l=this.display,i=this.visibility,u=this.style,a=this.classes,f=this.borderStyle,c=this.textStyle,s=this.baseStyle,m=this.fillStyle,d=this.mark,y=this.id;return{progress:e,width:n,height:o,direction:t,display:l,visibility:i,style:(0,r.unref)(u),classes:a,borderStyle:f,textStyle:c,baseStyle:s,fillStyle:m,mark:d,id:y}},n}))}(function(e){e["Up"]="Up",e["Down"]="Down",e["Left"]="Left",e["Right"]="Right",e["Default"]="Up"})(no||(no={}));var lo=Symbol("Buyable");function io(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());if(function(){return void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase}()&&(function(){return void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource}()||function(){return void 0!==o.cost&&null!==o.cost&&o.cost[Symbol.for("==")]?o.cost[Symbol.for("==")](null):null==o.cost}()))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",o),"Cannot create buyable without a canPurchase property or a resource and cost property";o.id=(0,y.QI)("buyable-"),o.type=lo,o[y.wA]=qe,o.amount=o[g.n9],o.canAfford=(0,r.computed)((function(){var e=o,n=(0,r.unref)(e.cost);return function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!=")]?n[Symbol.for("!=")](null):null!=n}()&&v.ZP.gte(e.resource.value,n)})),function(){return void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase}()&&(o.canPurchase=(0,r.computed)((function(){return(0,r.unref)(o.visibility)===y.EE.Visible&&(0,r.unref)(o.canAfford)&&v.ZP.lt(o.amount.value,(0,r.unref)(o.purchaseLimit))}))),o.maxed=(0,r.computed)((function(){return v.ZP.gte(o.amount.value,(0,r.unref)(o.purchaseLimit))})),(0,ne.yB)(o,"classes");var t=o.classes;o.classes=(0,r.computed)((function(){var e=(0,r.unref)(t)||{};return o.maxed.value&&(e.bought=!0),e})),(0,ne.yB)(o,"canPurchase"),o.canClick=o.canPurchase,o.onClick=o.purchase=function(){var e,n=o;if(!(function(){return void 0!==(0,r.unref)(n.canPurchase)&&null!==(0,r.unref)(n.canPurchase)&&(0,r.unref)(n.canPurchase)[Symbol.for("!")]?(0,r.unref)(n.canPurchase)[Symbol.for("!")]():!(0,r.unref)(n.canPurchase)}()||function(){return void 0!==n.cost&&null!==n.cost&&n.cost[Symbol.for("==")]?n.cost[Symbol.for("==")](null):null==n.cost}()||function(){return void 0!==n.resource&&null!==n.resource&&n.resource[Symbol.for("==")]?n.resource[Symbol.for("==")](null):null==n.resource}())){var t=(0,r.unref)(n.cost);n.resource.value=v.ZP.sub(n.resource.value,t),n.amount.value=v.ZP.add(n.amount.value,1),null===(e=this.onPurchase)||void 0===e||e.call(this,t)}},(0,ne.yB)(o,"display");var l=o.display;return o.display=(0,y.tZ)((function(){var e=(0,r.unref)(l);if((0,w.RU)(e)){var n=(0,w.MM)(e);return(0,r.createVNode)(n,null,null)}if(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e}()&&function(){return void 0!==o.cost&&null!==o.cost&&o.cost[Symbol.for("!=")]?o.cost[Symbol.for("!=")](null):null!=o.cost}()&&function(){return void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("!=")]?o.resource[Symbol.for("!=")](null):null!=o.resource}()){var t=o,i=(0,w.MM)(e.title||"","h3"),u=(0,w.MM)(e.description),a=(0,w.MM)(e.effectDisplay||""),f=(0,r.unref)(t.purchaseLimit)===v.ZP.dInf?(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Amount: "),(0,v.Ht)(t.amount.value)]):(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Amount: "),(0,v.Ht)(t.amount.value),(0,r.createTextVNode)(" /")," ",(0,v.Ht)((0,r.unref)(t.purchaseLimit))]);return(0,r.createVNode)("span",null,[e.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(i,null,null)]):null,(0,r.createVNode)(u,null,null),(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),f]),e.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Currently: "),(0,r.createVNode)(a,null,null)]):null,t.cost&&function(){return void 0!==t.maxed.value&&null!==t.maxed.value&&t.maxed.value[Symbol.for("!")]?t.maxed.value[Symbol.for("!")]():!t.maxed.value}()?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Cost: "),(0,v.WU)((0,r.unref)(t.cost)||0)," ",o.resource.displayName]):null])}return""})),(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"cost"),(0,ne.yB)(o,"resource"),(0,ne.yB)(o,"purchaseLimit"),(0,y.Rh)(o,"purchaseLimit",v.ZP.dInf),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"mark"),(0,ne.yB)(o,"small"),o[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,t=this.classes,l=this.onClick,i=this.canClick,u=this.small,a=this.mark,f=this.id;return{display:e,visibility:n,style:(0,r.unref)(o),classes:t,onClick:l,canClick:i,small:u,mark:a,id:f}},o}),(0,g.ax)(0))}o(9826),o(3577);var uo=["disabled"];function ao(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&function(){return void 0!==e.unref(e.maxed)&&null!==e.unref(e.maxed)&&e.unref(e.maxed)[Symbol.for("!")]?e.unref(e.maxed)[Symbol.for("!")]():!e.unref(e.maxed)}(),maxed:e.unref(e.maxed)},e.unref(e.classes)))},[(0,r.createElementVNode)("button",{class:"toggleChallenge",onClick:n[0]||(n[0]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),disabled:function(){return void 0!==e.unref(e.canStart)&&null!==e.unref(e.canStart)&&e.unref(e.canStart)[Symbol.for("!")]?e.unref(e.canStart)[Symbol.for("!")]():!e.unref(e.canStart)}()||e.unref(e.maxed)},(0,r.toDisplayString)(e.buttonText),9,uo),e.unref(e.comp)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var fo=(0,r.defineComponent)({props:{active:{type:(0,w.P5)(Boolean),required:!0},maxed:{type:(0,w.P5)(Boolean),required:!0},canComplete:{type:(0,w.P5)(Boolean),required:!0},display:(0,w.P5)(String,Object,Function),visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),completed:{type:(0,w.P5)(Boolean),required:!0},canStart:{type:(0,w.P5)(Boolean),required:!0},mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:Q,Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.active,t=n.maxed,l=n.canComplete,i=n.display,u=(0,r.computed)((function(){return o.value?l.value?"Finish":"Exit Early":t.value?"Completed":"Start"})),a=(0,r.shallowRef)(""),f=(0,r.computed)((function(){var e=(0,w.Uv)(o),n=(0,w.Uv)(l);return e?n?pe():ge():{}}));return(0,r.watchEffect)((function(){var e=(0,w.Uv)(i);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())a.value="";else if((0,w.RU)(e))a.value=(0,w.MM)(e);else{var n=(0,w.MM)(e.title||"","h3"),o=(0,w.MM)(e.description,"div"),t=(0,w.MM)(e.goal||""),l=(0,w.MM)(e.reward||""),u=(0,w.MM)(e.effectDisplay||"");a.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",null,[e.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(n,null,null)]):null,(0,r.createVNode)(o,null,null),e.goal?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Goal: "),(0,r.createVNode)(t,null,null)]):null,e.reward?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Reward: "),(0,r.createVNode)(l,null,null)]):null,e.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Currently: "),(0,r.createVNode)(u,null,null)]):null])})))}})),{buttonText:u,notifyStyle:f,comp:a,Visibility:y.EE,unref:r.unref}}});const co=(0,u.Z)(fo,[["render",ao],["__scopeId","data-v-5e580749"]]);var so=co,mo=Symbol("ChallengeType");function yo(e){var n=(0,g.ax)(0),o=(0,g.ax)(!1);return(0,oe.z2)((function(){var t=e();if(function(){return void 0!==t.canComplete&&null!==t.canComplete&&t.canComplete[Symbol.for("==")]?t.canComplete[Symbol.for("==")](null):null==t.canComplete}()&&(function(){return void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("==")]?t.resource[Symbol.for("==")](null):null==t.resource}()||function(){return void 0!==t.goal&&null!==t.goal&&t.goal[Symbol.for("==")]?t.goal[Symbol.for("==")](null):null==t.goal}()))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",t),"Cannot create challenge without a canComplete property or a resource and goal property";t.id=(0,y.QI)("challenge-"),t.type=mo,t[y.wA]=so,t.completions=n,t.active=o,t.completed=(0,r.computed)((function(){return v.ZP.gt(t.completions.value,0)})),t.maxed=(0,r.computed)((function(){return v.ZP.gte(t.completions.value,(0,r.unref)(t.completionLimit))})),t.toggle=function(){var e=t;if(e.active.value){var n,o;if((0,r.unref)(e.canComplete)&&function(){return void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value}()){var l,i=(0,r.unref)(e.canComplete);"boolean"===typeof i&&(i=1),e.completions.value=v.ZP.min(v.ZP.add(e.completions.value,i),(0,r.unref)(e.completionLimit)),null===(l=e.onComplete)||void 0===l||l.call(e)}e.active.value=!1,null===(n=e.onExit)||void 0===n||n.call(e),null===(o=e.reset)||void 0===o||o.reset()}else if((0,r.unref)(e.canStart)&&(0,r.unref)(e.visibility)===y.EE.Visible&&function(){return void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value}()){var u,a;null===(u=e.reset)||void 0===u||u.reset(),e.active.value=!0,null===(a=e.onEnter)||void 0===a||a.call(e)}},t.complete=function(e){var n,o,l,i=t,u=(0,r.unref)(i.canComplete);i.active.value&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](!1):!1!==u}()&&(!0===u||v.ZP.neq(0,u))&&function(){return void 0!==i.maxed.value&&null!==i.maxed.value&&i.maxed.value[Symbol.for("!")]?i.maxed.value[Symbol.for("!")]():!i.maxed.value}()&&("boolean"===typeof u&&(u=1),i.completions.value=v.ZP.min(v.ZP.add(i.completions.value,u),(0,r.unref)(i.completionLimit)),null===(n=i.onComplete)||void 0===n||n.call(i),function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e}()&&(i.active.value=!1,null===(o=i.onExit)||void 0===o||o.call(i),null===(l=i.reset)||void 0===l||l.reset()))},(0,ne.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible);var l=t.visibility;return t.visibility=(0,r.computed)((function(){return!0===Me.ZP.hideChallenges&&(0,r.unref)(t.maxed)?y.EE.None:(0,r.unref)(l)})),function(){return void 0!==t.canComplete&&null!==t.canComplete&&t.canComplete[Symbol.for("==")]?t.canComplete[Symbol.for("==")](null):null==t.canComplete}()&&(t.canComplete=(0,r.computed)((function(){var e=t;return!(function(){return void 0!==e.active.value&&null!==e.active.value&&e.active.value[Symbol.for("!")]?e.active.value[Symbol.for("!")]():!e.active.value}()||function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("==")]?e.resource[Symbol.for("==")](null):null==e.resource}()||function(){return void 0!==e.goal&&null!==e.goal&&e.goal[Symbol.for("==")]?e.goal[Symbol.for("==")](null):null==e.goal}())&&v.ZP.gte(e.resource.value,(0,r.unref)(e.goal))}))),function(){return void 0!==t.mark&&null!==t.mark&&t.mark[Symbol.for("==")]?t.mark[Symbol.for("==")](null):null==t.mark}()&&(t.mark=(0,r.computed)((function(){return v.ZP.gt((0,r.unref)(t.completionLimit),1)&&function(){return void 0!==!(0,r.unref)(t.maxed)&&null!==!(0,r.unref)(t.maxed)&&(!(0,r.unref)(t.maxed))[Symbol.for("!")]?(!(0,r.unref)(t.maxed))[Symbol.for("!")]():!!(0,r.unref)(t.maxed)}()}))),(0,ne.yB)(t,"canStart"),(0,y.Rh)(t,"canStart",!0),(0,ne.yB)(t,"canComplete"),(0,ne.yB)(t,"completionLimit"),(0,y.Rh)(t,"completionLimit",1),(0,ne.yB)(t,"mark"),(0,ne.yB)(t,"goal"),(0,ne.yB)(t,"classes"),(0,ne.yB)(t,"style"),(0,ne.yB)(t,"display"),function(){return void 0!==t.reset&&null!==t.reset&&t.reset[Symbol.for("!=")]?t.reset[Symbol.for("!=")](null):null!=t.reset}()&&S.globalBus.on("reset",(function(e){e===t.reset&&t.active.value&&t.toggle()})),t[y.tj]=function(){var e=this.active,n=this.maxed,o=this.canComplete,t=this.display,l=this.visibility,i=this.style,u=this.classes,a=this.completed,f=this.canStart,c=this.mark,s=this.id,m=this.toggle;return{active:e,maxed:n,canComplete:o,display:t,visibility:l,style:(0,r.unref)(i),classes:u,completed:a,canStart:f,mark:c,id:s,toggle:m}},t}))}S.globalBus.on("loadSettings",(function(e){(0,y.Rh)(e,"hideChallenges",!1)})),(0,Me.QV)((0,y.tZ)((function(){return(0,r.createVNode)(zn.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":function(e){return Me.ZP.hideChallenges=e},modelValue:Me.ZP.hideChallenges},null)})));var bo=(0,r.shallowReactive)({}),vo=Symbol("Hotkey");function So(e){return(0,oe.z2)((function(){var n=e();return n.type=vo,(0,ne.yB)(n,"enabled"),(0,y.Rh)(n,"enabled",!0),(0,ne.yB)(n,"description"),n}))}S.globalBus.on("addLayer",(function(e){(0,y.bD)(e,vo).forEach((function(e){bo[e.key]=e}))})),S.globalBus.on("removeLayer",(function(e){(0,y.bD)(e,vo).forEach((function(e){bo[e.key]=void 0}))})),document.onkeydown=function(e){var n;if("INPUT"!==(null===(n=e.target)||void 0===n?void 0:n.tagName)&&(!dr.value||!function(){return void 0!==fe.Z.keepGoing&&null!==fe.Z.keepGoing&&fe.Z.keepGoing[Symbol.for("!")]?fe.Z.keepGoing[Symbol.for("!")]():!fe.Z.keepGoing}())){var o=e.key;e.shiftKey&&(o=function(){return"shift+"[Symbol.for("+")]?"shift+"[Symbol.for("+")](o):"shift+"+o}()),e.ctrlKey&&(o=function(){return"ctrl+"[Symbol.for("+")]?"ctrl+"[Symbol.for("+")](o):"ctrl+"+o}());var t=bo[o];t&&(0,r.unref)(t.enabled)&&(e.preventDefault(),t.onPress())}},(0,Me.fw)((0,y.tZ)((function(){var e=Object.values(bo).filter((function(e){return(0,r.unref)(null===e||void 0===e?void 0:e.enabled)}));return 0===e.length?"":(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createVNode)("h4",null,[(0,r.createTextVNode)("Hotkeys")]),e.map((function(e){return(0,r.createVNode)("div",null,[null===e||void 0===e?void 0:e.key,(0,r.createTextVNode)(": "),null===e||void 0===e?void 0:e.description])}))])})));var go=Symbol("Links");function po(e){return(0,oe.z2)((function(){var n=e();return n.type=go,n[y.wA]=R,(0,ne.yB)(n,"links"),n[y.tj]=function(){var e=this.links;return{links:e}},n}))}var ho=o(3525);function No(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,milestone:!0,done:e.unref(e.earned)},e.unref(e.classes)))},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp)))),(0,r.createVNode)(a,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var ko=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:{type:(0,w.P5)(String,Object,Function),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),earned:{type:(0,w.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=(0,r.shallowRef)("");return(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())t.value="";else if((0,w.RU)(e))t.value=(0,w.MM)(e);else{var n=(0,w.MM)(e.requirement,"h3"),l=(0,w.MM)(e.effectDisplay||"","b"),i=(0,w.MM)(e.optionsDisplay||"","span");t.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",null,[(0,r.createVNode)(n,null,null),e.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createVNode)(l,null,null)]):null,e.optionsDisplay?(0,r.createVNode)("div",{class:"equal-spaced"},[(0,r.createVNode)(i,null,null)]):null])})))}})),{comp:t,unref:r.unref,Visibility:y.EE}}});const Vo=(0,u.Z)(ko,[["render",No],["__scopeId","data-v-0b660ac3"]]);var xo,Mo=Vo,Zo=(0,Se.pm)(),Co=Symbol("Milestone");function wo(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());o.id=(0,y.QI)("milestone-"),o.type=Co,o[y.wA]=Mo,o.earned=o[g.n9],o.complete=function(){o[g.n9].value=!0},(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible);var t=o.visibility;if(o.visibility=(0,r.computed)((function(){var e=(0,r.unref)(o.display);switch(Me.ZP.msDisplay){default:case xo.All:return(0,r.unref)(t);case xo.Configurable:return(0,r.unref)(o.earned)&&function(){return void 0!==(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)&&null!==(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)&&(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)[Symbol.for("!")]?(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)[Symbol.for("!")]():!(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)}()?y.EE.None:(0,r.unref)(t);case xo.Incomplete:return(0,r.unref)(o.earned)?y.EE.None:(0,r.unref)(t);case xo.None:return y.EE.None}})),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"classes"),(0,ne.yB)(o,"display"),o[y.tj]=function(){var e=this.visibility,n=this.display,o=this.style,t=this.classes,l=this.earned,i=this.id;return{visibility:e,display:n,style:(0,r.unref)(o),classes:t,earned:l,id:i}},o.shouldEarn){var l=o;(0,r.watchEffect)((function(){var e,n;if(function(){return void 0!==l.earned.value&&null!==l.earned.value&&l.earned.value[Symbol.for("!")]?l.earned.value[Symbol.for("!")]():!l.earned.value}()&&(0,r.unref)(l.visibility)===y.EE.Visible&&function(){return void 0!==(e=l.shouldEarn)&&null!==(e=l.shouldEarn)&&(e=l.shouldEarn)[Symbol.for("!==")]?(e=l.shouldEarn)[Symbol.for("!==")](null):null!==(e=l.shouldEarn)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.call(l)&&(l.earned.value=!0,null===(n=l.onComplete)||void 0===n||n.call(l),l.display)){var o=(0,r.unref)(l.display),t=(0,w.MM)((0,w.RU)(o)?o:o.requirement);Zo((0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Milestone earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(t,null,null)])]))}}))}return o}),(0,g.ax)(!1))}(function(e){e["All"]="all",e["Configurable"]="configurable",e["Incomplete"]="incomplete",e["None"]="none"})(xo||(xo={})),S.globalBus.on("loadSettings",(function(e){(0,y.Rh)(e,"msDisplay",xo.All)}));var Bo=Object.values(xo).map((function(e){return{label:(0,Ie.IJ)(e),value:e}}));(0,Me.QV)((0,y.tZ)((function(){return(0,r.createVNode)(ho.Z,{title:"Show Milestones",options:Bo,"onUpdate:modelValue":function(e){return Me.ZP.msDisplay=e},modelValue:Me.ZP.msDisplay},null)})));var Po=(0,r.defineComponent)({props:{display:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=o.display,l=(0,w.vq)(t);return function(e,n){return(0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(l)))}}});const Eo=Po;var To=Eo,Fo=Symbol("Tab");function Io(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("tab-"),n.type=Fo,n[y.wA]=To,n[y.tj]=function(){var e=this.display;return{display:e}},n}))}o(7941);function Do(e,n,o,t,l,i){var u;return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,onClick:n[0]||(n[0]=function(){return e.selectTab&&e.selectTab.apply(e,arguments)}),class:(0,r.normalizeClass)(["tabButton",(0,A.Z)({active:e.active},e.unref(e.classes))]),style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}])},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component)))],6)):(0,r.createCommentVNode)("",!0)}var Ro=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:{type:(0,w.P5)(Object,String,Function),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),glowColor:(0,w.P5)(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup:function(e,n){var o=n.emit,t=(0,r.toRefs)(e),l=t.display,i=t.glowColor,u=t.floating,a=(0,w.vq)(l),f=(0,r.computed)((function(){var e=(0,w.Uv)(i);return function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?{}:(0,r.unref)(u)?ge(e):{boxShadow:"0px 9px 5px -6px ".concat(e)}}));function c(){o("selectTab")}return{selectTab:c,component:a,glowColorStyle:f,unref:r.unref,Visibility:y.EE}}});const Oo=(0,u.Z)(Ro,[["render",Do],["__scopeId","data-v-361380c0"]]);var _o=Oo;function jo(e,n,o,t,l,i){var u,a,f=(0,r.resolveComponent)("TabButton"),c=(0,r.resolveComponent)("Sticky");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["tab-family-container",(0,A.Z)((0,A.Z)({},e.unref(e.classes)),e.tabClasses)]),style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[],function(){return void 0!==(a=e.tabStyle)&&null!==(a=e.tabStyle)&&(a=e.tabStyle)[Symbol.for("!==")]?(a=e.tabStyle)[Symbol.for("!==")](null):null!==(a=e.tabStyle)}()&&function(){return void 0!==a&&null!==a&&a[Symbol.for("!==")]?a[Symbol.for("!==")](void 0):void 0!==a}()?a:[]])},[(0,r.createVNode)(c,{class:"tab-buttons-container"},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["tab-buttons",{floating:e.floating}])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.tabs),(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(f,(0,r.mergeProps)({onSelectTab:function(n){return e.selected.value=o},floating:e.floating,key:o,active:e.unref(n.tab)===e.unref(e.activeTab)},e.gatherButtonProps(n)),null,16,["onSelectTab","floating","active"])})),128))],2)]})),_:1}),e.unref(e.activeTab)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,r.createCommentVNode)("",!0)],6)):(0,r.createCommentVNode)("",!0)}var Ao=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},activeTab:{type:(0,w.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,w.P5)(Object),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object)},components:{Sticky:Wn,TabButton:_o},setup:function(e){var n=(0,r.toRefs)(e),o=n.activeTab,t=(0,r.computed)((function(){return xe.Z[Me.ZP.theme].floatingTabs})),l=(0,r.shallowRef)("");(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);!function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}()?(0,w.RU)(e)?l.value=(0,w.MM)(e):l.value=(0,w.MM)((0,r.unref)(e.display)):l.value=""}));var i=(0,r.computed)((function(){var e=(0,w.Uv)(o),n=(0,w.RU)(e)||function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?void 0:(0,r.unref)(e.classes);return n})),u=(0,r.computed)((function(){var e=(0,w.Uv)(o);return(0,w.RU)(e)||function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?void 0:(0,r.unref)(e.style)}));function a(e){var n=e.display,o=e.style,r=e.classes,t=e.glowColor,l=e.visibility;return{display:n,style:o,classes:r,glowColor:t,visibility:l}}return{floating:t,tabClasses:i,tabStyle:u,Visibility:y.EE,component:l,gatherButtonProps:a,unref:r.unref}}});const Uo=(0,u.Z)(Ao,[["render",jo],["__scopeId","data-v-38d5b5f9"]]);var qo=Uo,zo=Symbol("TabButton"),Lo=Symbol("TabFamily");function Go(e,n){if(0===Object.keys(e).length)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";return(0,oe.z2)((function(o){var t=Object.assign(o,null===n||void 0===n?void 0:n());t.id=(0,y.QI)("tabFamily-"),t.type=Lo,t[y.wA]=qo,t.tabs=Object.keys(e).reduce((function(n,o){var r=e[o]();return r.type=zo,r[y.wA]=_o,(0,ne.yB)(r,"visibility"),(0,y.Rh)(r,"visibility",y.EE.Visible),(0,ne.yB)(r,"tab"),(0,ne.yB)(r,"display"),(0,ne.yB)(r,"classes"),(0,ne.yB)(r,"style"),(0,ne.yB)(r,"glowColor"),n[o]=r,n}),{}),t.selected=t[g.n9],t.activeTab=(0,r.computed)((function(){var e=(0,r.unref)(l.tabs);if(function(){return void 0!==t[g.n9].value&&null!==t[g.n9].value&&t[g.n9].value[Symbol.for("in")]?t[g.n9].value[Symbol.for("in")](e):t[g.n9].value in e}()&&(0,r.unref)(e[l[g.n9].value].visibility)===y.EE.Visible)return(0,r.unref)(e[l[g.n9].value].tab);var n=Object.values(e).find((function(e){return(0,r.unref)(e.visibility)===y.EE.Visible}));return n?(0,r.unref)(n.tab):null})),(0,ne.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,ne.yB)(t,"classes"),(0,ne.yB)(t,"style"),t[y.tj]=function(){var e=this.visibility,n=this.activeTab,o=this.selected,t=this.tabs,l=this.style,i=this.classes;return{visibility:e,activeTab:n,selected:o,tabs:t,style:(0,r.unref)(l),classes:i}};var l=t;return l}),(0,g.ax)(Object.keys(e)[0]))}var Ho=["disabled"];function Wo(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),onClick:n[0]||(n[0]=function(){return e.purchase&&e.purchase.apply(e,arguments)}),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:function(){return void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase)}(),bought:e.unref(e.bought)},e.unref(e.classes))),disabled:function(){return void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase)}()},[e.unref(e.component)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],14,Ho)):(0,r.createCommentVNode)("",!0)}var Yo=(0,r.defineComponent)({props:{display:{type:(0,w.P5)(String,Object,Function),required:!0},visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),resource:Object,cost:(0,w.P5)(String,Object,Number),canPurchase:{type:(0,w.P5)(Boolean),required:!0},bought:{type:(0,w.P5)(Boolean),required:!0},mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:G,MarkNode:Q},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=n.cost,l=(0,r.shallowRef)("");return(0,r.watchEffect)((function(){var n=(0,w.Uv)(o);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}())l.value="";else if((0,w.RU)(n))l.value=(0,w.MM)(n);else{var i=(0,w.Uv)(t),u=(0,w.MM)(n.title||"","h3"),a=(0,w.MM)(n.description,"div"),f=(0,w.MM)(n.effectDisplay||"");l.value=(0,w.MM)((0,y.tZ)((function(){var o;return(0,r.createVNode)("span",null,[n.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(u,null,null)]):null,(0,r.createVNode)(a,null,null),n.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Currently: "),(0,r.createVNode)(f,null,null)]):null,function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource}()?(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Cost: "),e.resource&&M(e.resource,i)," ",null===(o=e.resource)||void 0===o?void 0:o.displayName]):null])})))}})),{component:l,unref:r.unref,Visibility:y.EE}}});const Ko=(0,u.Z)(Yo,[["render",Wo],["__scopeId","data-v-264c96b4"]]);var Jo=Ko,Qo=Symbol("Upgrade");function $o(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());return o.id=(0,y.QI)("upgrade-"),o.type=Qo,o[y.wA]=Jo,function(){return void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford}()&&(function(){return void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource}()||function(){return void 0!==o.cost&&null!==o.cost&&o.cost[Symbol.for("==")]?o.cost[Symbol.for("==")](null):null==o.cost}())&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",o),o.bought=o[g.n9],!function(){return void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford}()?(0,ne.yB)(o,"canAfford"):o.canAfford=(0,r.computed)((function(){var e=o;return function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource}()&&function(){return void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("!=")]?e.cost[Symbol.for("!=")](null):null!=e.cost}()&&v.ZP.gte(e.resource.value,(0,r.unref)(e.cost))})),o.canPurchase=(0,r.computed)((function(){return(0,r.unref)(o.visibility)===y.EE.Visible&&(0,r.unref)(o.canAfford)&&function(){return void 0!==(0,r.unref)(o.bought)&&null!==(0,r.unref)(o.bought)&&(0,r.unref)(o.bought)[Symbol.for("!")]?(0,r.unref)(o.bought)[Symbol.for("!")]():!(0,r.unref)(o.bought)}()})),o.purchase=function(){var e,n=o;(function(){return void 0!==(0,r.unref)(n.canPurchase)&&null!==(0,r.unref)(n.canPurchase)&&(0,r.unref)(n.canPurchase)[Symbol.for("!")]?(0,r.unref)(n.canPurchase)[Symbol.for("!")]():!(0,r.unref)(n.canPurchase)})()||(function(){return void 0!==n.resource&&null!==n.resource&&n.resource[Symbol.for("!=")]?n.resource[Symbol.for("!=")](null):null!=n.resource}()&&function(){return void 0!==n.cost&&null!==n.cost&&n.cost[Symbol.for("!=")]?n.cost[Symbol.for("!=")](null):null!=n.cost}()&&(n.resource.value=v.ZP.sub(n.resource.value,(0,r.unref)(n.cost))),n[g.n9].value=!0,null===(e=n.onPurchase)||void 0===e||e.call(n))},(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"classes"),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"display"),(0,ne.yB)(o,"mark"),(0,ne.yB)(o,"cost"),(0,ne.yB)(o,"resource"),o[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,t=this.classes,l=this.resource,i=this.cost,u=this.canPurchase,a=this.bought,f=this.mark,c=this.id,s=this.purchase;return{display:e,visibility:n,style:(0,r.unref)(o),classes:t,resource:l,cost:i,canPurchase:u,bought:a,mark:f,id:c,purchase:s}},o}),(0,g.ax)(!1))}function Xo(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&function(){return void 0!==(0,r.isVNode)(e)&&null!==(0,r.isVNode)(e)&&(0,r.isVNode)(e)[Symbol.for("!")]?(0,r.isVNode)(e)[Symbol.for("!")]():!(0,r.isVNode)(e)}()}var er="c",nr=(0,B.createLayer)(er,(function(){var e="#4BDC13",n="Candies",o=p(0,"lollipops"),t=h(o),l=(0,g.ax)(!1),i=(0,g.ax)("pointy"),u=(0,g.ax)(10),a=(0,g.ax)(new v.ZP(10)),f=(0,r.computed)((function(){return v.ZP.pow(o.value,.2)})),c=(0,r.computed)((function(){return v.ZP.times(o.value,10)})),s=an((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}})),m=wo((function(){return{shouldEarn:function(){return v.ZP.gte(t.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}})),b=wo((function(){return{visibility:function(){return(0,y.Kf)(m.earned.value)},shouldEarn:function(){return v.ZP.gte(t.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(zn.Z,{title:"beep","onUpdate:modelValue":function(e){return l.value=e},modelValue:l.value},null),(0,r.createVNode)(zn.Z,{title:"boop","onUpdate:modelValue":function(e){return ir.boop.value=e},modelValue:ir.boop.value},null)])}))},style:function(){return this.earned?{backgroundColor:"#1111DD"}:{}}}})),S=[m,b],N=yo((function(){return{title:"Fun",completionLimit:3,display:function(){return{description:"Makes the game 0% harder
".concat((0,v.Ht)(this.completions.value),"/").concat(this.completionLimit," completions"),goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:function(){return void 0!==(0,v.WU)(k.value)&&null!==(0,v.WU)(k.value)&&(0,v.WU)(k.value)[Symbol.for("+")]?(0,v.WU)(k.value)[Symbol.for("+")]("x"):(0,v.WU)(k.value)+"x"}()}},visibility:function(){return(0,y.Kf)(v.ZP.gt(t.value,0))},goal:20,resource:sr.points,onComplete:function(){console.log("hiii")},onEnter:function(){sr.points.value=0,sr.best.value=sr.points.value,sr.total.value=sr.points.value,console.log("So challenging")},onExit:function(){console.log("Sweet freedom!")},style:{height:"200px"}}})),k=(0,r.computed)((function(){return v.ZP.add(o.value,1).tetrate(.02)})),V=$o((function(){return{display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:o}})),x=$o((function(){return{display:function(){return{description:"Point generation is faster based on your unspent Lollipops",effectDisplay:"".concat((0,v.WU)(Z.value),"x")}},cost:1,resource:o,visibility:function(){return(0,y.Kf)(V.bought.value)}}})),Z=(0,r.computed)((function(){var e=v.ZP.add(o.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),C=$o((function(){return{visibility:function(){return(0,y.Kf)(x.bought.value)},canAfford:function(){return v.ZP.lt(sr.points.value,7)},onPurchase:function(){sr.points.value=v.ZP.add(sr.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style:function(){var e=this;return this.bought?{backgroundColor:"#1111dd"}:function(){return void 0!==e.canAfford&&null!==e.canAfford&&e.canAfford[Symbol.for("!")]?e.canAfford[Symbol.for("!")]():!e.canAfford}()?{backgroundColor:"#dd1111"}:{}}}})),B=$o((function(){return{resource:p(E.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}})),P=[V,x,C],E=io((function(){return{resource:o,cost:function(){var e=new v.ZP(this.amount.value);e.gte(25)&&(e=e.pow(2).div(25));var n=v.ZP.pow(2,e.pow(1.5));return n.floor()},display:function(){return{title:"Exhancers",description:"Adds ".concat((0,v.WU)(T.value)," things and multiplies stuff by ").concat((0,v.WU)(F.value),".")}},onPurchase:function(e){a.value=v.ZP.add(a.value,e)},style:{height:"222px"},purchaseLimit:4}})),T=(0,r.computed)((function(){return v.ZP.gte(E.amount.value,0)?v.ZP.pow(25,v.ZP.pow(E.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(E.amount.value,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()).pow(1.1))})),F=(0,r.computed)((function(){return v.ZP.gte(E.amount.value,0)?v.ZP.pow(25,v.ZP.pow(E.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(E.amount.value,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()).pow(1.1))})),I=(0,g.ax)(!1),D=(0,r.ref)(!1),R=Le((function(){return{small:!0,display:"Respec Thingies",onClick:function(){I.value&&function(){return void 0!==D.value&&null!==D.value&&D.value[Symbol.for("!")]?D.value[Symbol.for("!")]():!D.value}()?D.value=!0:(o.value=v.ZP.add(o.value,a.value),E.amount.value=0,sr.tree.reset(G))}}})),O=Le((function(){return{small:!0,display:"Sell One",onClick:function(){v.ZP.lte(E.amount.value,0)||(E.amount.value=v.ZP.sub(E.amount.value,1),o.value=v.ZP.add(o.value,E.cost.value),a.value=v.ZP.sub(a.value,E.cost.value))}}})),_=(0,y.tZ)((function(){return(0,r.createVNode)(Ln.Z,null,{default:function(){return[(0,r.createVNode)(se.Z,null,{default:function(){return[(0,r.createVNode)(zn.Z,{title:"Confirm","onUpdate:modelValue":function(e){return I.value=e},modelValue:I.value},null),(0,w._4)(R)]}}),(0,w._4)(E),(0,w._4)(O),(0,r.createVNode)(Qn.Z,{modelValue:D.value,"onUpdate:modelValue":function(e){return D.value=e}},{header:function(){return(0,r.createVNode)("h2",null,[(0,r.createTextVNode)("Confirm Respec")])},body:function(){return(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Are you sure? Respeccing these doesn't accomplish much")])},footer:function(){return(0,r.createVNode)("div",{class:"modal-default-footer"},[(0,r.createVNode)("div",{class:"modal-default-flex-grow"},null),(0,r.createVNode)("button",{class:"button modal-default-button",onClick:function(){return D.value=!1}},[(0,r.createTextVNode)("Cancel")]),(0,r.createVNode)("button",{class:"button modal-default-button danger",onClick:function(){R.onClick(),D.value=!1}},[(0,r.createTextVNode)("Respec")])])}})]}})})),j=to((function(){return{fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:no.Right,width:300,height:30,progress:function(){return v.ZP.add(sr.points.value,1).log(10).div(10).toNumber()},display:function(){return function(){return void 0!==(0,v.WU)(sr.points.value)&&null!==(0,v.WU)(sr.points.value)&&(0,v.WU)(sr.points.value)[Symbol.for("+")]?(0,v.WU)(sr.points.value)[Symbol.for("+")](" / 1e10 points"):(0,v.WU)(sr.points.value)+" / 1e10 points"}()}}})),A=to((function(){return{fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:no.Up,width:50,height:200,progress:function(){return v.ZP.div(sr.points.value,100)},display:function(){return function(){return void 0!==(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))&&null!==(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))&&(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))[Symbol.for("+")]?(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))[Symbol.for("+")]("%"):(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))+"%"}()}}})),U=to((function(){return{fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:no.Up,width:100,height:30,progress:function(){return v.ZP.div(o.value,50)}}})),q=Ke((function(){return{scaling:$e(Ye(10,.5),1e100,.5),baseResource:sr.points,gainResource:o,roundUpCost:!0,gainModifier:In(Fn(2,"Because I felt like it"),En(1,"Nice modifier"))}})),z=Sn((function(){return{thingsToReset:function(){return[nr]}}})),L=[So((function(){return{key:"c",description:"reset for lollipops or whatever",onPress:function(){H.canClick.value&&H.onClick()}}})),So((function(){return{key:"ctrl+c",description:"respec things",onPress:function(){R.onClick()}}}))],G=He((function(){return{layerID:er,color:e,reset:z,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip:function(){var e=M(o);return v.ZP.gt(E.amount.value,0)&&(e=function(){return void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")]("



".concat((0,v.Ht)(E.amount.value)," Exhancers
")):e+"



".concat((0,v.Ht)(E.amount.value)," Exhancers
")}()),e},style:{color:"#3325CC",textDecoration:"underline"}}}));(0,Pn.Z)(G,{display:ae(o),pinnable:!0});var H=Ge((function(){return{conversion:q,tree:sr.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}}));(0,Pn.Z)(H,{display:(0,y.tZ)((function(){return Dn("Modifiers","",q.gainModifier,q.scaling.currentGain(q))})),pinnable:!0,direction:Pn.A.DOWN,style:"width: 400px; text-align: left"});var W=le((function(){return{display:"TH",color:"#6d3678",canClick:function(){return v.ZP.gte(sr.points.value,10)},tooltip:"Thanos your points",onClick:function(){sr.points.value=v.ZP.div(sr.points.value,2),console.log("Thanos'd")},glowColor:function(){return v.ZP.eq(E.amount.value,1)?"orange":""}}})),Y=le((function(){return{display:"h",color:function(){return xe.Z[Me.ZP.theme].variables["--locked"]},tooltip:{display:(0,r.computed)((function(){return"Restore your points to ".concat((0,v.WU)(u.value))})),right:!0},canClick:function(){return v.ZP.lt(sr.points.value,u.value)},onClick:function(){sr.points.value=u.value}}})),K=le((function(){return{visibility:y.EE.Hidden}})),J=ie((function(){return{nodes:function(){return[[ir.treeNode,G],[W,K,Y]]},branches:function(){return[{startNode:ir.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:W},{startNode:W,endNode:Y}]}}})),Q=po((function(){return{links:[{startNode:Y,endNode:U,"stroke-width":"5px",stroke:"red",offsetEnd:{x:function(){return(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*U.progress.value.toNumber()):100*U.progress.value.toNumber()-50}(),y:0}}]}})),$=Go({first:function(){return{tab:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[w._4.apply(void 0,P),(0,w._4)(B),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("confirmed")])])})),display:"first"}},second:function(){return{tab:ir.display,display:"second"}}},(function(){return{style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}})),X=Go({mainTab:function(){return{tab:Io((function(){return{display:(0,y.tZ)((function(){var n;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(Bn,{resource:o,color:e,effectDisplay:"which are boosting waffles by ".concat((0,v.WU)(f.value)," and increasing the Ice Cream cap by ").concat((0,v.WU)(c.value))},null),(0,r.createVNode)(Wn,null,Xo(n=(0,w.sY)(H))?n:{default:function(){return[n]}}),(0,r.createVNode)(Nn,{resource:o,color:e},null),(0,r.createVNode)(d,{height:"5px"},null),(0,r.createVNode)("button",{onClick:function(){return console.log("yeet")}},[(0,r.createTextVNode)("'HI'")]),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Name your points!")]),(0,r.createVNode)(qn.Z,{modelValue:i.value,"onUpdate:modelValue":function(e){return i.value=e}},null),(0,r.createVNode)(Wn,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:function(){return[(0,r.createTextVNode)("I have "),M(sr.points),(0,r.createTextVNode)(" "),i.value,(0,r.createTextVNode)(" points!")]}}),(0,r.createVNode)("hr",null,null),w.Dy.apply(void 0,S),(0,r.createVNode)(d,null,null),w._4.apply(void 0,P),(0,w._4)(B),(0,w._4)(N)])}))}})),display:"main tab",glowColor:function(){return V.canPurchase.value||x.canPurchase.value||C.canPurchase.value||N.canComplete.value?"blue":""},style:{color:"orange"}}},thingies:function(){return{tab:Io((function(){return{style:function(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(_),(0,r.createVNode)(d,null,null),(0,r.createVNode)(se.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:function(){return[(0,r.createVNode)(zn.Z,{"onUpdate:modelValue":function(e){return l.value=e},modelValue:l.value},null),(0,r.createVNode)(d,{width:"30px",height:"10px"},null),(0,r.createVNode)("div",null,[(0,r.createVNode)("span",null,[(0,r.createTextVNode)("Beep")])]),(0,r.createVNode)(d,null,null),(0,r.createVNode)(Jn,{height:"200px"},null)]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)])}))}})),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}},jail:function(){return{tab:Io((function(){return{display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(s),(0,w.sY)(j),(0,r.createVNode)(d,null,null),(0,r.createVNode)(se.Z,null,{default:function(){return[(0,r.createVNode)(Ln.Z,{style:"background-color: #555555; padding: 15px"},{default:function(){return[(0,r.createVNode)("div",{style:"color: teal"},[(0,r.createTextVNode)("Sugar level:")]),(0,r.createVNode)(d,null,null),(0,w.sY)(A)]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)(Ln.Z,null,{default:function(){return[(0,r.createVNode)("div",null,[(0,r.createTextVNode)("idk")]),(0,r.createVNode)(d,{width:"0",height:"50px"},null),(0,w.sY)(U)]}})]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)("div",null,[(0,r.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,w.sY)(J)])}))}})),display:"jail"}},illuminati:function(){return{tab:Io((function(){return{display:(0,y.tZ)((function(){return(0,r.createVNode)("div",null,[(0,r.createVNode)("h1",null,[(0,r.createTextVNode)(" C O N F I R M E D ")]),(0,r.createVNode)(d,null,null),(0,w.sY)($),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Adjust how many points H gives you!")]),(0,r.createVNode)(Un,{"onUpdate:modelValue":function(e){return u.value=e},modelValue:u.value,min:1,max:30},null)])})),style:{backgroundColor:"#3325CC"}}})),visibility:function(){return(0,y.Kf)(C.bought.value)},display:"illuminati"}}});return{id:er,color:e,name:n,points:o,best:t,beep:l,thingy:i,otherThingy:u,spentOnBuyables:a,waffleBoost:f,icecreamCap:c,coolInfo:s,lollipopMilestones:S,funChallenge:N,funEffect:k,generatorUpgrade:V,lollipopMultiplierUpgrade:x,lollipopMultiplierEffect:Z,unlockIlluminatiUpgrade:C,quasiUpgrade:B,exhancers:E,respecBuyables:R,sellExhancer:O,bars:{tallBoi:A,longBoi:j,flatBoi:U},tree:J,g:W,h:Y,spook:K,conversion:q,reset:z,hotkeys:L,treeNode:G,resetButton:H,confirmRespec:I,minWidth:800,tabs:X,display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(X),(0,w.sY)(Q)])}))}})),or=nr,rr=JSON.parse('{"lifetime":{"min":0.5,"max":1},"ease":[{"s":0,"cp":0.329,"e":0.548},{"s":0.548,"cp":0.767,"e":0.876},{"s":0.876,"cp":0.985,"e":1}],"frequency":0.001,"emitterLifetime":0.1,"maxParticles":100,"addAtBack":true,"pos":{"x":0,"y":0},"emit":false,"behaviors":[{"type":"alpha","config":{"alpha":{"list":[{"time":0,"value":0.74},{"time":1,"value":0}]}}},{"type":"moveSpeed","config":{"speed":{"list":[{"time":0,"value":300},{"time":1,"value":0}]},"minMult":1}},{"type":"scale","config":{"scale":{"list":[{"time":0,"value":1},{"time":1,"value":0.25}]},"minMult":1}},{"type":"color","config":{"color":{"list":[{"time":0,"value":"#ffdfa0"},{"time":1,"value":"#100f0c"}]}}},{"type":"rotation","config":{"accel":0,"minSpeed":0,"maxSpeed":200,"minStart":0,"maxStart":360}},{"type":"textureRandom","config":{"textures":["/particle.png"]}},{"type":"spawnShape","config":{"type":"rect","data":{"x":0,"y":0,"w":0,"h":0}}}]}'),tr="f",lr=(0,B.createLayer)(tr,(function(){var e="#FE0102",n="Farms",o=p(0,"farm points"),t=(0,g.ax)(!1),l=an((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}})),i=(0,g.ax)("Start"),u=Le((function(){return{display:function(){return{title:"Clicky clicky!",description:function(){return"Current state:
"[Symbol.for("+")]?"Current state:
"[Symbol.for("+")](i.value):"Current state:
"+i.value}()}},initialState:"Start",canClick:function(){return function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!==")]?i.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==i.value}()},onClick:function(e){switch(i.value){case"Start":i.value="A new state!";break;case"A new state!":i.value="Keep going!";break;case"Keep going!":i.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":var n=function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e}()?void 0:function(){return"touches"[Symbol.for("in")]?"touches"[Symbol.for("in")](e):"touches"in e}()?e.touches[0]:e,o=Object.assign({},rr,{pos:{x:function(){var e,o,r,t,l,i,u,a,f,c,s;return void 0!==(null!==(e=null===n||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)&&null!==(null!==(o=null===n||void 0===n?void 0:n.clientX)&&void 0!==o?o:0)&&(null!==(r=null===n||void 0===n?void 0:n.clientX)&&void 0!==r?r:0)[Symbol.for("-")]?(null!==(t=null===n||void 0===n?void 0:n.clientX)&&void 0!==t?t:0)[Symbol.for("-")](null!==(l=null===(i=b.boundingRect)||void 0===i||null===(u=i.value)||void 0===u?void 0:u.left)&&void 0!==l?l:0):(null!==(a=null===n||void 0===n?void 0:n.clientX)&&void 0!==a?a:0)-(null!==(f=null===(c=b.boundingRect)||void 0===c||null===(s=c.value)||void 0===s?void 0:s.left)&&void 0!==f?f:0)}(),y:function(){var e,o,r,t,l,i,u,a,f,c,s;return void 0!==(null!==(e=null===n||void 0===n?void 0:n.clientY)&&void 0!==e?e:0)&&null!==(null!==(o=null===n||void 0===n?void 0:n.clientY)&&void 0!==o?o:0)&&(null!==(r=null===n||void 0===n?void 0:n.clientY)&&void 0!==r?r:0)[Symbol.for("-")]?(null!==(t=null===n||void 0===n?void 0:n.clientY)&&void 0!==t?t:0)[Symbol.for("-")](null!==(l=null===(i=b.boundingRect)||void 0===i||null===(u=i.value)||void 0===u?void 0:u.top)&&void 0!==l?l:0):(null!==(a=null===n||void 0===n?void 0:n.clientY)&&void 0!==a?a:0)-(null!==(f=null===(c=b.boundingRect)||void 0===c||null===(s=c.value)||void 0===s?void 0:s.top)&&void 0!==f?f:0)}()}});b.addEmitter(o).then((function(e){return e.playOnceAndDestroy()})),i.value="Borkened...";break;default:i.value="Start";break}},onHold:function(){console.log("Clickkkkk...")},style:function(){switch(i.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}}})),a=Le((function(){return{onClick:function(){(function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value})()&&(i.value="Start")},display:function(){return function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value}()?"Fix the clickable!":"Does nothing"},small:!0}})),f=Sn((function(){return{thingsToReset:function(){return[lr]}}})),c=Je((function(){return{scaling:Ye(10,.5),baseResource:sr.points,gainResource:o,modifyGainAmount:Tn(or.otherThingy)}})),s=He((function(){return{layerID:tr,color:e,reset:f,tooltip:function(){return s.canClick.value?"".concat(M(o)," ").concat(o.displayName):"This weird farmer dinosaur will only see you if you have at least 10 points. You only have ".concat(M(sr.points))},canClick:function(){return v.ZP.gte(sr.points.value,10)}}}));(0,Pn.Z)(s,{display:ae(o),pinnable:!0});var m=Ge((function(){return{conversion:c,tree:sr.tree,treeNode:s,display:(0,y.tZ)((function(){return m.conversion.buyMax?(0,r.createVNode)("span",null,[(0,r.createTextVNode)("Hi! I'm a "),(0,r.createVNode)("u",null,[(0,r.createTextVNode)("weird dinosaur")]),(0,r.createTextVNode)(" and I'll give you")," ",(0,r.createVNode)("b",null,[(0,v.Ht)(m.conversion.currentGain.value)]),(0,r.createTextVNode)(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",(0,v.Ht)(m.conversion.nextAt.value),(0,r.createTextVNode)(" points)")]):(0,r.createVNode)("span",null,[(0,r.createTextVNode)("Hi! I'm a "),(0,r.createVNode)("u",null,[(0,r.createTextVNode)("weird dinosaur")]),(0,r.createTextVNode)(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",(0,v.Ht)(m.conversion.nextAt.value),(0,r.createTextVNode)(" points)")])}))}})),b=bn((function(){return{boundingRect:(0,r.ref)(null),onContainerResized:function(e){this.boundingRect.value=e},style:"z-index: 2"}})),S=(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(l),(0,r.createVNode)(Bn,{resource:o,color:e},null),(0,w.sY)(m),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("You have "),(0,v.Ht)(c.baseResource.value),(0,r.createTextVNode)(" points")]),(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createVNode)("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Bork Bork!")])]),(0,r.createVNode)(d,null,null),(0,w._4)(a),(0,w._4)(u),(0,w.sY)(b)])}));return{id:tr,color:e,name:n,points:o,boop:t,coolInfo:l,clickable:u,clickableState:i,reset:f,conversion:c,treeNode:s,resetButton:m,display:S}})),ir=lr;function ur(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&function(){return void 0!==(0,r.isVNode)(e)&&null!==(0,r.isVNode)(e)&&(0,r.isVNode)(e)[Symbol.for("!")]?(0,r.isVNode)(e)[Symbol.for("!")]():!(0,r.isVNode)(e)}()}var ar="a",fr=(0,B.createLayer)(ar,(function(){var e="yellow",n="Achievements",o=p(0,"achievement power"),t=le((function(){return{display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick:function(){sr.showAchievements()}}})),l=ke((function(){return{image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,r.computed)((function(){return l.earned.value?"You did it!":"How did this happen?"})),shouldEarn:function(){return!0}}})),i=ke((function(){return{display:"Impossible!",tooltip:(0,r.computed)((function(){return i.earned.value?"HOW????":"Mwahahaha!"})),style:{color:"#04e050"}}})),u=ke((function(){return{display:"EIEIO",tooltip:"Get a farm point.\n\nReward: The dinosaur is now your friend (you can max Farm Points).",shouldEarn:function(){return v.ZP.gte(ir.points.value,1)},onComplete:function(){console.log("Bork bork bork!")}}})),a=[l,i,u],f=_e((function(){return{rows:2,cols:2,getStartState:function(e){return e},getStyle:function(e,n){return{backgroundColor:"#".concat(function(){return 1234*Number(n)!==void 0&&1234*Number(n)!==null&&(1234*Number(n))[Symbol.for("%")]?(1234*Number(n))[Symbol.for("%")](999999):1234*Number(n)%999999}())}},getTitle:function(e){var n=this,o="";return"101"===e?o="top":"102"===e?o="bottom":"201"===e?o="left":"202"===e&&(o="right"),(0,y.tZ)((function(){return(0,r.createVNode)(me.Z,(0,r.mergeProps)({display:JSON.stringify(n.cells[e].style)},(0,ce.Z)({},o,!0)),{default:function(){return[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Gridable #"),e])]}})}))},getDisplay:function(e,n){return String(n)},getCanClick:function(){return v.ZP.eq(sr.points.value,10)},onClick:function(e,n){this.cells[e].state=function(){return void 0!==Number(n)&&null!==Number(n)&&Number(n)[Symbol.for("+")]?Number(n)[Symbol.for("+")](1):Number(n)+1}()}}})),c=(0,y.tZ)((function(){var e,n,o;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(se.Z,null,{default:function(){return[(0,r.createVNode)(me.Z,{display:l.tooltip,bottom:!0},ur(e=(0,w.sY)(l))?e:{default:function(){return[e]}}),(0,r.createVNode)(me.Z,{display:i.tooltip,bottom:!0},ur(n=(0,w.sY)(i))?n:{default:function(){return[n]}}),(0,r.createVNode)(me.Z,{display:u.tooltip,bottom:!0},ur(o=(0,w.sY)(u))?o:{default:function(){return[o]}})]}}),(0,w._4)(f)])}));return{id:ar,color:e,name:n,points:o,achievements:a,grid:f,treeNode:t,display:c}})),cr=fr,sr=(0,B.createLayer)("main",(function(){var e=p(10),n=h(e),o=N(e),t=(0,r.computed)((function(){if(function(){return void 0!==or.generatorUpgrade.bought.value&&null!==or.generatorUpgrade.bought.value&&or.generatorUpgrade.bought.value[Symbol.for("!")]?or.generatorUpgrade.bought.value[Symbol.for("!")]():!or.generatorUpgrade.bought.value}())return new v.ZP(0);var e=new v.ZP(3.19);return or.lollipopMultiplierUpgrade.bought.value&&(e=e.times(or.lollipopMultiplierEffect.value)),e}));S.globalBus.on("update",(function(n){e.value=v.ZP.add(e.value,v.ZP.times(t.value,n))}));var l=x(e,t),i=(0,B.setupLayerModal)(cr),u=i.openModal,a=i.modal,f=ie((function(){return{nodes:[[or.treeNode],[ir.treeNode,or.spook]],leftSideNodes:[cr.treeNode,or.h],branches:[{startNode:ir.treeNode,endNode:or.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset:function(){e.value=(0,r.toRaw)(this.resettingNode.value)===(0,r.toRaw)(or.treeNode)?0:10,n.value=e.value,o.value=e.value},resetPropagation:ue}}));return{name:"Tree",display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[0===fe.Z.devSpeed?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Game Paused")]):null,fe.Z.devSpeed&&function(){return void 0!==fe.Z.devSpeed&&null!==fe.Z.devSpeed&&fe.Z.devSpeed[Symbol.for("!==")]?fe.Z.devSpeed[Symbol.for("!==")](1):1!==fe.Z.devSpeed}()?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Dev Speed: "),(0,v.WU)(fe.Z.devSpeed||0),(0,r.createTextVNode)("x")]):null,function(){return void 0!==fe.Z.offlineTime&&null!==fe.Z.offlineTime&&fe.Z.offlineTime[Symbol.for("!=")]?fe.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=fe.Z.offlineTime}()?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Offline Time: "),(0,v.mr)(fe.Z.offlineTime||0)]):null,(0,r.createVNode)("div",null,[v.ZP.lt(e.value,"1e1000")?(0,r.createVNode)("span",null,[(0,r.createTextVNode)("You have ")]):null,(0,r.createVNode)("h2",null,[(0,v.WU)(e.value)]),v.ZP.lt(e.value,"1e1e6")?(0,r.createVNode)("span",null,[(0,r.createTextVNode)(" points")]):null]),v.ZP.gt(t.value,0)?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("("),l.value,(0,r.createTextVNode)(")")]):null,(0,r.createVNode)(d,null,null),(0,r.createVNode)("button",{onClick:u},[(0,r.createTextVNode)("open achievements")]),(0,w.sY)(a),(0,w.sY)(f),(0,r.createVNode)(c,{height:"200px",style:"margin: 10px auto; display: block"},null)])})),points:e,best:n,total:o,oomps:l,tree:f,showAchievements:u}})),mr=function(e){return[sr,ir,or,cr]},dr=(0,r.computed)((function(){return v.ZP.gt(sr.points.value,25)}));function yr(e,n){}},9365:function(e,n,o){"use strict";o.r(n),o.d(n,{RegisterNodeInjectionKey:function(){return m},UnregisterNodeInjectionKey:function(){return d},NodesInjectionKey:function(){return y},layers:function(){return b},persistentRefs:function(){return v},addingLayers:function(){return S},createLayer:function(){return g},addLayer:function(){return p},getLayer:function(){return h},removeLayer:function(){return N},reloadLayer:function(){return k},setupLayerModal:function(){return V}});var r=o(4865),t=(o(2526),o(1817),o(1539),o(189),o(8783),o(3948),o(8309),o(4747),o(2479),o(6948)),l=o(6113),i=o(9583),u=o(3273),a=o(8111),f=o(7302),c=o(4061),s=o(5967),m=Symbol("RegisterNode"),d=Symbol("UnregisterNode"),y=Symbol("Nodes"),b={};window.layers=b;var v={},S=[];function g(e,n){return(0,u.z2)((function(){var o={},t=o.emitter=(0,a.i)();if(o.on=t.on.bind(t),o.emit=t.emit.bind(t),o.nodes=(0,r.ref)({}),o.id=e,S.push(e),v[e]=new Set,o.minimized=(0,c.ax)(!1),Object.assign(o,n.call(o)),function(){return void 0!==S[S.length-1]&&null!==S[S.length-1]&&S[S.length-1][Symbol.for("==")]?S[S.length-1][Symbol.for("==")](null):null==S[S.length-1]}()||function(){return void 0!==S[S.length-1]&&null!==S[S.length-1]&&S[S.length-1][Symbol.for("!==")]?S[S.length-1][Symbol.for("!==")](e):S[S.length-1]!==e}())throw"Adding layers stack in invalid state. This should not happen\nStack: ".concat(S,"\nTrying to pop ").concat(o.id);return S.pop(),(0,i.yB)(o,"color"),(0,i.yB)(o,"display"),(0,i.yB)(o,"name"),(0,l.Rh)(o,"name",o.id),(0,i.yB)(o,"minWidth"),(0,l.Rh)(o,"minWidth",600),(0,i.yB)(o,"minimizable"),(0,l.Rh)(o,"minimizable",!0),o}))}function p(e,n){console.info("Adding layer",e.id),b[e.id]?console.error("Attempted to add layer with same ID as existing layer",e.id,b[e.id]):((0,l.Rh)(n,"layers",{}),function(){return void 0!==n.layers[e.id]&&null!==n.layers[e.id]&&n.layers[e.id][Symbol.for("==")]?n.layers[e.id][Symbol.for("==")](null):null==n.layers[e.id]}()&&(n.layers[e.id]={}),b[e.id]=e,f.globalBus.emit("addLayer",e,n.layers[e.id]))}function h(e){return b[e]}function N(e){console.info("Removing layer",e.id),f.globalBus.emit("removeLayer",e),b[e.id]=void 0}function k(e){N(e),p(e,s.Z)}function V(e){var n=(0,r.ref)(!1);return{openModal:function(){return n.value=!0},modal:(0,l.tZ)((function(){return(0,r.createVNode)(t.Z,{modelValue:n.value,"onUpdate:modelValue":function(e){return n.value=e}},{header:function(){return(0,r.createVNode)("h2",null,[(0,r.unref)(e.name)])},body:(0,r.unref)(e.display)})}))}}f.globalBus.on("update",(function(e){Object.values(b).forEach((function(n){null===n||void 0===n||n.emit("preUpdate",e)})),Object.values(b).forEach((function(n){null===n||void 0===n||n.emit("update",e)})),Object.values(b).forEach((function(n){null===n||void 0===n||n.emit("postUpdate",e)}))}))},1604:function(e,n,o){"use strict";o.d(n,{MM:function(){return c},sY:function(){return s},_4:function(){return m},Dy:function(){return d},qF:function(){return y},RU:function(){return b},ix:function(){return v},vq:function(){return S},KO:function(){return g},o9:function(){return p},Uv:function(){return h},P5:function(){return N}});var r=o(3336),t=o(4865),l=(o(2526),o(1817),o(1539),o(3210),o(2222),o(1249),o(7327),o(7042),o(6699),o(2023),o(9905)),i=o(274),u=o(6113),a=o(9583);function f(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&function(){return void 0!==(0,t.isVNode)(e)&&null!==(0,t.isVNode)(e)&&(0,t.isVNode)(e)[Symbol.for("!")]?(0,t.isVNode)(e)[Symbol.for("!")]():!(0,t.isVNode)(e)}()}function c(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"span";return"function"===typeof e?(0,t.defineComponent)({render:e}):"string"===typeof e?function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()?(e=e.trim(),function(){return void 0!==e.charAt(0)&&null!==e.charAt(0)&&e.charAt(0)[Symbol.for("!==")]?e.charAt(0)[Symbol.for("!==")]("<"):"<"!==e.charAt(0)}()&&(e="<".concat(o,">").concat(e,"")),(0,t.defineComponent)({template:e})):(0,t.defineComponent)({render:function(){return{}}}):e}function s(e){if(b(e))return"function"===typeof e?e():c(e);var n=e[u.wA];return(0,t.createVNode)(n,e[u.tj](),null)}function m(){for(var e,n=arguments.length,o=new Array(n),l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](n):l")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"div",r=(0,t.shallowRef)();return(0,t.watchEffect)((function(){r.value=c(h(e),o)})),r}function g(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"div",r=(0,t.shallowRef)(null);return(0,t.watchEffect)((function(){var n=h(e);r.value=function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()?null:c(n,o)})),r}function p(e){return(0,t.computed)((function(){return h(e)}))}function h(e){return(0,t.unref)((0,t.unref)(e))}function N(){for(var e=arguments.length,n=new Array(e),o=0;function(){return void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](e):o","span")})),a=(0,r.computed)({get:function(){return function(){return void 0!==!i.modelValue&&null!==!i.modelValue&&(!i.modelValue)[Symbol.for("!")]?(!i.modelValue)[Symbol.for("!")]():!!i.modelValue}()},set:function(e){o("update:modelValue",e)}});return function(e,n){return(0,r.openBlock)(),(0,r.createElementBlock)("label",l,[(0,r.withDirectives)((0,r.createElementVNode)("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,r.isRef)(a)?a.value=e:null})},null,512),[[r.vModelCheckbox,(0,r.unref)(a)]]),((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(u))))])}}}),u=o(3744);const a=(0,u.Z)(i,[["__scopeId","data-v-43cf95d0"]]);var f=a},9905:function(e,n,o){"use strict";o.d(n,{Z:function(){return f}});var r=o(4865),t=o(1037),l=o(9266),i={class:"table"},u=(0,r.defineComponent)({setup:function(e){var n=(0,r.computed)((function(){return t.Z[l.ZP.theme].mergeAdjacent}));return function(e,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",i,[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["col",{mergeAdjacent:(0,r.unref)(n)}])},[(0,r.renderSlot)(e.$slots,"default")],2)])}}});const a=u;var f=a},274:function(e,n,o){"use strict";o.d(n,{Z:function(){return f}});var r=o(4865),t=o(1037),l=o(9266),i={class:"table"},u=(0,r.defineComponent)({setup:function(e){var n=(0,r.computed)((function(){return t.Z[l.ZP.theme].mergeAdjacent}));return function(e,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",i,[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["row",{mergeAdjacent:(0,r.unref)(n)}])},[(0,r.renderSlot)(e.$slots,"default")],2)])}}});const a=u;var f=a},264:function(e,n,o){"use strict";o.d(n,{Z:function(){return b}});var r=o(5082),t=(o(2526),o(1817),o(1539),o(4865)),l={key:0,class:"material-icons pinned"};function i(e,n,o,i,u,a){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:n[0]||(n[0]=function(n){return e.isHovered=!0}),onMouseleave:n[1]||(n[1]=function(n){return e.isHovered=!1}),onClickCapture:n[2]||(n[2]=function(){return e.togglePinned&&e.togglePinned.apply(e,arguments)})},[(0,t.renderSlot)(e.$slots,"default",{},void 0,!0),e.elementComp?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.elementComp),{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(t.Transition,{name:"fade"},{default:(0,t.withCtx)((function(){var n;return[e.isShown?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:(0,t.normalizeClass)(["tooltip",(0,r.Z)({top:e.unref(e.direction)===e.TooltipDirection.UP,left:e.unref(e.direction)===e.TooltipDirection.LEFT,right:e.unref(e.direction)===e.TooltipDirection.RIGHT,bottom:e.unref(e.direction)===e.TooltipDirection.DOWN},e.unref(e.classes))]),style:(0,t.normalizeStyle)([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},function(){return void 0!==(n=e.unref(e.style))&&null!==(n=e.unref(e.style))&&(n=e.unref(e.style))[Symbol.for("!==")]?(n=e.unref(e.style))[Symbol.for("!==")](null):null!==(n=e.unref(e.style))}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](void 0):void 0!==n}()?n:{}])},[e.showPin?((0,t.openBlock)(),(0,t.createElementBlock)("span",l,"push_pin")):(0,t.createCommentVNode)("",!0),e.comp?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.comp),{key:1})):(0,t.createCommentVNode)("",!0)],6)):(0,t.createCommentVNode)("",!0)]})),_:1})],34)}o(9653);var u=o(1037),a=o(6113),f=o(9266),c=o(1604),s=o(4096),m=(0,t.defineComponent)({props:{element:(0,c.P5)(Object),display:{type:(0,c.P5)(Object,String,Function),required:!0},style:(0,c.P5)(Object,String,Array),classes:(0,c.P5)(Object),direction:(0,c.P5)(Number),xoffset:(0,c.P5)(String),yoffset:(0,c.P5)(String),pinned:Object},setup:function(e){var n=(0,t.toRefs)(e),o=n.element,r=n.display,l=n.pinned,i=(0,t.ref)(!1),m=(0,t.computed)((function(){return((0,c.Uv)(l)||i.value)&&d.value})),d=(0,c.KO)(r),y=(0,t.shallowRef)(null);function b(e){var n=l;e.shiftKey&&n&&(n.value=function(){return void 0!==n.value&&null!==n.value&&n.value[Symbol.for("!")]?n.value[Symbol.for("!")]():!n.value}(),e.stopPropagation(),e.preventDefault())}(0,t.watchEffect)((function(){var e=(0,c.Uv)(o);y.value=function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}()?null:(0,c.MM)((0,a.tZ)((function(){return(0,c.sY)(e)})))}));var v=(0,t.computed)((function(){return(0,c.Uv)(l)&&u.Z[f.ZP.theme].showPin}));return{TooltipDirection:s.A,isHovered:i,isShown:m,comp:d,elementComp:y,unref:t.unref,togglePinned:b,showPin:v}}}),d=o(3744);const y=(0,d.Z)(m,[["render",i],["__scopeId","data-v-adb5f26e"]]);var b=y},7634:function(e){function n(e){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}n.keys=function(){return[]},n.resolve=n,n.id=7634,e.exports=n},6453:function(e){"use strict";e.exports=JSON.parse('{"title":"Profectus","id":"profectus-demo","author":"thepaperpilot","discordName":"The Paper Pilot Community","discordLink":"https://discord.gg/WzejVAx","versionNumber":"0.0","versionTitle":"Initial Commit","allowGoBack":true,"defaultShowSmall":false,"defaultDecimalsShown":2,"useHeader":true,"banner":null,"logo":"Logo.png","initialTabs":["main","c"],"maxTickLength":3600,"offlineLimit":1,"enablePausing":true}')}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var l=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(l.exports,l,l.exports,o),l.loaded=!0,l.exports}o.m=e,function(){var e=[];o.O=function(n,r,t,l){if(!r){var i=1/0;for(c=0;c=l)&&Object.keys(o.O).every((function(e){return o.O[e](r[a])}))?r.splice(a--,1):(u=!1,l0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[r,t,l]}}(),function(){o.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(n,{a:n}),n}}(),function(){o.d=function(e,n){for(var r in n)o.o(n,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.hmd=function(e){return e=Object.create(e),e.children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e}}(),function(){o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};o.O.j=function(n){return 0===e[n]};var n=function(n,r){var t,l,i=r[0],u=r[1],a=r[2],f=0;if(i.some((function(n){return 0!==e[n]}))){for(t in u)o.o(u,t)&&(o.m[t]=u[t]);if(a)var c=a(o)}for(n&&n(r);f")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:"feature-";return function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](c++):n+c++}()}function m(e){return e[i.mM]=!0,e}function d(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:r.None;return e?r.Visible:o}function y(e,n,o){void 0===e[n]&&function(){return void 0!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](void 0):void 0!=o}()&&(e[n]=o)}function b(e,n){var o=[],r=function e(r){Object.keys(r).forEach((function(i){var a=r[i];a&&"object"===(0,t.Z)(a)&&(a.type===n?o.push(a):function(){return a instanceof l.ZP!==void 0&&a instanceof l.ZP!==null&&(a instanceof l.ZP)[Symbol.for("!")]?(a instanceof l.ZP)[Symbol.for("!")]():!(a instanceof l.ZP)}()&&function(){return void 0!==(0,u.isRef)(a)&&null!==(0,u.isRef)(a)&&(0,u.isRef)(a)[Symbol.for("!")]?(0,u.isRef)(a)[Symbol.for("!")]():!(0,u.isRef)(a)}()&&e(a))}))};return r(e),o}(function(e){e[e["Visible"]=0]="Visible",e[e["Hidden"]=1]="Hidden",e[e["None"]=2]="None"})(r||(r={}))},4096:function(e,n,o){"use strict";o.d(n,{A:function(){return r},Z:function(){return f}});var r,t=o(2482),l=(o(2526),o(1817),o(1539),o(264)),i=o(6113),u=o(9583),a=o(4061);function f(e,n){n.pinnable&&(!function(){return"pinned"[Symbol.for("in")]?"pinned"[Symbol.for("in")](e):"pinned"in e}()?e.pinned=n.pinned=(0,a.ax)(!1):(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),n.pinnable=!1)),(0,u.yB)(n,"display"),(0,u.yB)(n,"classes"),(0,u.yB)(n,"style"),(0,u.yB)(n,"direction"),(0,i.Rh)(n,"direction",r.UP),(0,u.yB)(n,"xoffset"),(0,u.yB)(n,"yoffset");var o=e[i.wA];e[i.wA]=l.Z;var f=e[i.tj].bind(e);return e[i.tj]=function(){var e,n=this.display,r=this.classes,l=this.style,u=this.direction,a=this.xoffset,c=this.yoffset,s=this.pinned;return{element:(e={},(0,t.Z)(e,i.wA,o),(0,t.Z)(e,i.tj,f),e),display:n,classes:r,style:l,direction:u,xoffset:a,yoffset:c,pinned:s}}.bind(n),n}(function(e){e[e["UP"]=0]="UP",e[e["LEFT"]=1]="LEFT",e[e["RIGHT"]=2]="RIGHT",e[e["DOWN"]=3]="DOWN"})(r||(r={}))},7302:function(e,n,o){"use strict";o.r(n),o.d(n,{globalBus:function(){return s},startGameLoop:function(){return b}});var r=o(8534),t=(o(5666),o(2526),o(1817),o(1539),o(7042),o(5192),o(9653),o(8783),o(3948),o(6453)),l=o(5613),i=o(8111),u=o(4865),a=o(5967),f=o(9266),c=o(3032),s=(0,i.i)(),m=null,d=null;function y(){var e,n=Date.now(),o=function(){return n-a.Z.time!==void 0&&n-a.Z.time!==null&&(n-a.Z.time)[Symbol.for("/")]?(n-a.Z.time)[Symbol.for("/")](1e3):(n-a.Z.time)/1e3}();a.Z.time=n;var r=o;if(c.Z.lastTenTicks.push(r),function(){return void 0!==c.Z.lastTenTicks.length&&null!==c.Z.lastTenTicks.length&&c.Z.lastTenTicks.length[Symbol.for(">")]?c.Z.lastTenTicks.length[Symbol.for(">")](10):c.Z.lastTenTicks.length>10}()&&(c.Z.lastTenTicks=c.Z.lastTenTicks.slice(1)),!(function(){return void 0!==(e=d)&&null!==(e=d)&&(e=d)[Symbol.for("!==")]?(e=d)[Symbol.for("!==")](null):null!==(e=d)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.value&&function(){return void 0!==a.Z.keepGoing&&null!==a.Z.keepGoing&&a.Z.keepGoing[Symbol.for("!")]?a.Z.keepGoing[Symbol.for("!")]():!a.Z.keepGoing}())&&!c.Z.hasNaN&&(o=Math.max(o,0),0!==a.Z.devSpeed)){if(function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("!=")]?a.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=a.Z.offlineTime}()){if(l.ZP.gt(a.Z.offlineTime,function(){return void 0!==t.offlineLimit&&null!==t.offlineLimit&&t.offlineLimit[Symbol.for("*")]?t.offlineLimit[Symbol.for("*")](3600):3600*t.offlineLimit}())&&(a.Z.offlineTime=function(){return void 0!==t.offlineLimit&&null!==t.offlineLimit&&t.offlineLimit[Symbol.for("*")]?t.offlineLimit[Symbol.for("*")](3600):3600*t.offlineLimit}()),l.ZP.gt(a.Z.offlineTime,0)&&function(){return void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!==")]?a.Z.devSpeed[Symbol.for("!==")](0):0!==a.Z.devSpeed}()){var i=Math.max(function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("/")]?a.Z.offlineTime[Symbol.for("/")](10):a.Z.offlineTime/10}(),o);a.Z.offlineTime=function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("-")]?a.Z.offlineTime[Symbol.for("-")](i):a.Z.offlineTime-i}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](i):o+i}()}else 0===a.Z.devSpeed&&(a.Z.offlineTime=function(){return void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("+")]?a.Z.offlineTime[Symbol.for("+")](o):a.Z.offlineTime+o}());(function(){return void 0!==a.Z.offlineProd&&null!==a.Z.offlineProd&&a.Z.offlineProd[Symbol.for("!")]?a.Z.offlineProd[Symbol.for("!")]():!a.Z.offlineProd}()||l.ZP.lt(a.Z.offlineTime,0))&&(a.Z.offlineTime=null)}o=Math.min(o,t.maxTickLength),function(){return void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!=")]?a.Z.devSpeed[Symbol.for("!=")](void 0):void 0!=a.Z.devSpeed}()&&(o=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](a.Z.devSpeed):o*a.Z.devSpeed}()),function(){return void 0!==Number.isFinite(o)&&null!==Number.isFinite(o)&&Number.isFinite(o)[Symbol.for("!")]?Number.isFinite(o)[Symbol.for("!")]():!Number.isFinite(o)}()&&(o=1e308),l.ZP.eq(o,0)||(a.Z.timePlayed=function(){return void 0!==a.Z.timePlayed&&null!==a.Z.timePlayed&&a.Z.timePlayed[Symbol.for("+")]?a.Z.timePlayed[Symbol.for("+")](o):a.Z.timePlayed+o}(),function(){return void 0!==Number.isFinite(a.Z.timePlayed)&&null!==Number.isFinite(a.Z.timePlayed)&&Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]?Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]():!Number.isFinite(a.Z.timePlayed)}()&&(a.Z.timePlayed=1e308),s.emit("update",o,r),f.ZP.unthrottled?(requestAnimationFrame(y),function(){return void 0!==m&&null!==m&&m[Symbol.for("!=")]?m[Symbol.for("!=")](null):null!=m}()&&(clearInterval(m),m=null)):function(){return void 0!==m&&null!==m&&m[Symbol.for("==")]?m[Symbol.for("==")](null):null==m}()&&(m=setInterval(y,50)))}}function b(){return v.apply(this,arguments)}function v(){return v=(0,r.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then(o.bind(o,5412));case 2:d=e.sent.hasWon,(0,u.watch)(d,(function(e){e&&s.emit("gameWon")})),f.ZP.unthrottled?requestAnimationFrame(y):m=setInterval(y,50);case 5:case"end":return e.stop()}}),e)}))),v.apply(this,arguments)}},4061:function(e,n,o){"use strict";o.d(n,{n9:function(){return s},nY:function(){return m},ax:function(){return v}});var r=o(9584),t=o(3336),l=(o(2526),o(1817),o(1539),o(1703),o(9600),o(1249),o(7042),o(4916),o(3123),o(3210),o(4747),o(7941),o(6699),o(2222),o(7302)),i=o(5613),u=o(3273),a=o(3577),f=o(4865),c=o(9365),s=Symbol("PersistentState"),m=Symbol("DefaultValue"),d=Symbol("StackTrace"),y=Symbol("Deleted");function b(){var e;return(null===(e=(new Error).stack)||void 0===e?void 0:e.split("\n").slice(3,5).map((function(e){return e.trim()})).join("\n"))||""}function v(e){var n=(0,f.isRef)(e)?e:(0,f.ref)(e);return n[s]=n,n[m]=(0,f.isRef)(e)?e.value:e,n[d]=b(),n[y]=!1,0===c.addingLayers.length?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",n,function(){return"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](n[d]):"\nCreated at:\n"+n[d]}()):c.persistentRefs[c.addingLayers[function(){return void 0!==c.addingLayers.length&&null!==c.addingLayers.length&&c.addingLayers.length[Symbol.for("-")]?c.addingLayers.length[Symbol.for("-")](1):c.addingLayers.length-1}()]].add(n),n}l.globalBus.on("addLayer",(function(e,n){var o=[],l=function l(b){var v=arguments,S=function(){return void 0!==v.length&&null!==v.length&&v.length[Symbol.for(">")]?v.length[Symbol.for(">")](1):v.length>1}()&&function(){return void 0!==v[1]&&null!==v[1]&&v[1][Symbol.for("!==")]?v[1][Symbol.for("!==")](void 0):void 0!==v[1]}()?arguments[1]:[],g=!1;return Object.keys(b).forEach((function(v){var p=b[v];if(p&&"object"===(0,t.Z)(p))if(function(){return void 0!==s&&null!==s&&s[Symbol.for("in")]?s[Symbol.for("in")](p):s in p}()){if(g=!0,p[y])return void console.warn("Deleted persistent ref present in returned object. Ignoring...",p,function(){return"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](p[d]):"\nCreated at:\n"+p[d]}());c.persistentRefs[e.id].delete(function(){return void 0!==u.Le&&null!==u.Le&&u.Le[Symbol.for("in")]?u.Le[Symbol.for("in")](p):u.Le in p}()?p[u.Le]:p);var h=S.reduce((function(e,n){return function(){return n in e!==void 0&&n in e!==null&&(n in e)[Symbol.for("!")]?(n in e)[Symbol.for("!")]():!(n in e)}()&&(e[n]={}),e[n]}),n),N=h[v];h[v]=p[s],(0,f.isReactive)(h)?!function(){return void 0!==N&&null!==N&&N[Symbol.for("!=")]?N[Symbol.for("!=")](null):null!=N}()?h[v]=p[m]:h[v]=N:!function(){return void 0!==N&&null!==N&&N[Symbol.for("!=")]?N[Symbol.for("!=")](null):null!=N}()?h[v].value=p[m]:h[v].value=N}else if(function(){return p instanceof i.ZP!==void 0&&p instanceof i.ZP!==null&&(p instanceof i.ZP)[Symbol.for("!")]?(p instanceof i.ZP)[Symbol.for("!")]():!(p instanceof i.ZP)}()&&function(){return void 0!==(0,f.isRef)(p)&&null!==(0,f.isRef)(p)&&(0,f.isRef)(p)[Symbol.for("!")]?(0,f.isRef)(p)[Symbol.for("!")]():!(0,f.isRef)(p)}()&&function(){return void 0!==o.includes(p)&&null!==o.includes(p)&&o.includes(p)[Symbol.for("!")]?o.includes(p)[Symbol.for("!")]():!o.includes(p)}()){"symbol"===(0,t.Z)(p.type)&&o.push(p);var k=l(p,[].concat((0,r.Z)(S),[v]));k&&((0,a.kJ)(p)&&function(){return void 0!==(0,a.kJ)(b)&&null!==(0,a.kJ)(b)&&(0,a.kJ)(b)[Symbol.for("!")]?(0,a.kJ)(b)[Symbol.for("!")]():!(0,a.kJ)(b)}()?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.",function(){return void 0!==u.Le&&null!==u.Le&&u.Le[Symbol.for("in")]?u.Le[Symbol.for("in")](b):u.Le in b}()?b[u.Le]:b,v):g=!0)}})),g};l(e),c.persistentRefs[e.id].forEach((function(n){console.error("Created persistent ref in ".concat(e.id," without registering it to the layer! Make sure to include everything persistent in the returned object"),n,function(){return"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](n[d]):"\nCreated at:\n"+n[d]}())})),c.persistentRefs[e.id].clear()}))},5967:function(e,n,o){"use strict";o.d(n,{U:function(){return m}});var r,t=o(2482),l=o(9584),i=(o(2526),o(1817),o(1539),o(8862),o(2222),o(7556),o(1299),o(4858),o(5003),o(5613)),u=o(1349),a=o(3273),f=o(4865),c=o(3032),s=(0,f.reactive)({id:"",devSpeed:null,name:"",tabs:[],time:function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function m(e){return JSON.stringify(e,(function(e,n){return(0,f.unref)(n)}))}var d={get:function(e,n){if(n===a.Le||n===a.c4)return e[n];var o=e[a.Le][n];if(function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")]("value"):"value"!==n}()&&(0,u.PO)(o)&&function(){return o instanceof i.ZP!==void 0&&o instanceof i.ZP!==null&&(o instanceof i.ZP)[Symbol.for("!")]?(o instanceof i.ZP)[Symbol.for("!")]():!(o instanceof i.ZP)}()){if(function(){var r,t;return void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](null===(r=e[n])||void 0===r?void 0:r[a.Le]):o!==(null===(t=e[n])||void 0===t?void 0:t[a.Le])}()){var r,f=[].concat((0,l.Z)(e[a.c4]),[n]);e[n]=new Proxy((r={},(0,t.Z)(r,a.Le,o),(0,t.Z)(r,a.c4,f),r),d)}return e[n]}return o},set:function(e,n,o,r){if(function(){return void 0!==c.Z.hasNaN&&null!==c.Z.hasNaN&&c.Z.hasNaN[Symbol.for("!")]?c.Z.hasNaN[Symbol.for("!")]():!c.Z.hasNaN}()&&("number"===typeof o&&isNaN(o)||o instanceof i.ZP&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag)))){var t=e[a.Le][n];if(function(){return void 0!==("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&null!==("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]?("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]():!("number"===typeof t&&isNaN(t)||t instanceof i.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))}())throw s.autosave=!1,c.Z.hasNaN=!0,c.Z.NaNPath=[].concat((0,l.Z)(e[a.c4]),[n]),c.Z.NaNReceiver=r,console.error("Attempted to set NaN value",[].concat((0,l.Z)(e[a.c4]),[n]),e[a.Le]),"Attempted to set NaN value. See above for details"}return e[a.Le][n]=o,!0},ownKeys:function(e){return Reflect.ownKeys(e[a.Le])},has:function(e,n){return Reflect.has(e[a.Le],n)},getOwnPropertyDescriptor:function(e,n){return Object.getOwnPropertyDescriptor(e[a.Le],n)}};n["Z"]=window.player=new Proxy((r={},(0,t.Z)(r,a.Le,s),(0,t.Z)(r,a.c4,["player"]),r),d)},9266:function(e,n,o){"use strict";o.d(n,{ri:function(){return c},V$:function(){return s},QV:function(){return m},II:function(){return d},fw:function(){return y},t:function(){return b}});var r=o(3336),t=(o(7714),o(2801),o(1174),o(8862),o(2526),o(1817),o(1539),o(6453)),l=o(1037),i=o(7302),u=o(463),a=o(4865),f=(0,a.reactive)({active:"",saves:[],showTPS:!0,theme:l.b.Nordic,unthrottled:!1});function c(){try{var e=localStorage.getItem(t.id);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](""):""!==e}()){var n=JSON.parse(decodeURIComponent(escape(atob(e))));"object"===(0,r.Z)(n)&&Object.assign(f,n)}i.globalBus.emit("loadSettings",f)}catch(o){}}(0,a.watch)(f,(function(e){return localStorage.setItem(t.id,btoa(unescape(encodeURIComponent(JSON.stringify(e)))))}),{deep:!0}),n["ZP"]=window.settings=f;window.hardResetSettings=function(){var e={active:"",saves:[],showTPS:!0,theme:l.b.Nordic};i.globalBus.emit("loadSettings",e),Object.assign(f,e),(0,u.y6)()};var s=(0,a.reactive)([]);function m(e){s.push(e)}var d=(0,a.reactive)([]);function y(e){d.push(e)}var b=(0,a.reactive)([])},3032:function(e,n,o){"use strict";var r=o(4865);n["Z"]=window.state=(0,r.shallowReactive)({lastTenTicks:[],hasNaN:!1,NaNPath:[]})},6098:function(e,n,o){"use strict";var r=o(8534),t=(o(6992),o(8674),o(9601),o(7727),o(5666),o(4865)),l=(o(1249),o(6113)),i=o(1604),u=(o(7941),o(8309),o(2526),o(1817),o(1539),o(6699),o(2023),o(6453)),a=o(9365),f=o(5967);function c(e,n,o,r,l,i){var u=(0,t.resolveComponent)("Context");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"layer-container",style:(0,t.normalizeStyle)({"--layer-color":e.unref(e.color)})},[e.showGoBack?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,class:"goBack",onClick:n[0]||(n[0]=function(){return e.goBack&&e.goBack.apply(e,arguments)})},"←")):(0,t.createCommentVNode)("",!0),e.minimized.value?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"layer-tab minimized",onClick:n[1]||(n[1]=function(n){return e.minimized.value=!1})},[(0,t.createElementVNode)("div",null,(0,t.toDisplayString)(e.unref(e.name)),1)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:2,class:(0,t.normalizeClass)(["layer-tab",[{showGoBack:e.showGoBack},e.unref(e.classes)]]),style:(0,t.normalizeStyle)(e.unref(e.style))},[(0,t.createVNode)(u,{ref:"contextRef"},{default:(0,t.withCtx)((function(){return[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component)))]})),_:1},512)],6)),e.unref(e.minimizable)?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:3,class:"minimize",onClick:n[2]||(n[2]=function(n){return e.minimized.value=!0})}," ▼ ")):(0,t.createCommentVNode)("",!0)],4)}var s=o(6084),m=(o(9653),o(561),o(4048),o(5053)),d=(0,t.defineComponent)({components:{Context:m.Z},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:(0,i.P5)(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:(0,i.P5)(Number,String),required:!0},name:{type:(0,i.P5)(String),required:!0},color:(0,i.P5)(String),style:(0,i.P5)(String,Object,Array),classes:(0,i.P5)(Object),minimizable:(0,i.P5)(Boolean),nodes:{type:Object,required:!0}},setup:function(e){var n=(0,t.toRefs)(e),o=n.display,r=n.index,l=n.minimized,a=n.minWidth,c=n.tab,m=(0,i.vq)(o),d=(0,t.computed)((function(){return u.allowGoBack&&function(){return void 0!==r.value&&null!==r.value&&r.value[Symbol.for(">")]?r.value[Symbol.for(">")](0):r.value>0}()&&function(){return void 0!==l.value&&null!==l.value&&l.value[Symbol.for("!")]?l.value[Symbol.for("!")]():!l.value}()}));function y(){f.Z.tabs.splice((0,t.unref)(e.index),1/0)}(0,t.nextTick)((function(){return v(l.value,(0,t.unref)(a.value))})),(0,t.watch)([l,(0,i.o9)(a)],(function(e){var n=(0,s.Z)(e,2),o=n[0],r=n[1];return v(o,r)}));var b=(0,t.ref)(null);function v(e,n){var o="number"===typeof n||Number.isNaN(parseInt(n))?function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")]("px"):n+"px"}():n,r=c.value();(function(){return void 0!==r&&null!==r&&r[Symbol.for("!=")]?r[Symbol.for("!=")](void 0):void 0!=r})()&&(e?(r.style.flexGrow="0",r.style.flexShrink="0",r.style.width="60px",r.style.minWidth=r.style.flexBasis="",r.style.margin="0"):(r.style.flexGrow="",r.style.flexShrink="",r.style.width="",r.style.minWidth=r.style.flexBasis="".concat(o,"px"),r.style.margin=""))}return(0,t.watch)((function(){var e;return null===(e=b.value)||void 0===e?void 0:e.nodes}),(function(n){n&&(e.nodes.value=n)})),{component:m,showGoBack:d,contextRef:b,unref:t.unref,goBack:y}}}),y=o(3744);const b=(0,y.Z)(d,[["render",c],["__scopeId","data-v-66dc9e3e"]]);var v=b,S=o(6948),g=function(e){return(0,t.pushScopeId)("data-v-5f8298e6"),e=e(),(0,t.popScopeId)(),e},p=g((function(){return(0,t.createElementVNode)("h2",null,"Changelog",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),h=g((function(){return(0,t.createElementVNode)("details",{open:""},[(0,t.createElementVNode)("summary",null,[(0,t.createTextVNode)("v0.0 Initial Commit - "),(0,t.createElementVNode)("time",null,"2021-09-04")]),(0,t.createTextVNode)(" This is the first release :D "),(0,t.createElementVNode)("ul",null,[(0,t.createElementVNode)("li",{class:"feature"},"Did everything"),(0,t.createElementVNode)("li",{class:"fix"},"Had some fun"),(0,t.createElementVNode)("li",{class:"breaking"},"Removed everything"),(0,t.createElementVNode)("li",{class:"balancing"},"Created some bugs to fix later")])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),N=(0,t.defineComponent)({setup:function(e,n){var o=n.expose,r=(0,t.ref)(!1);return o({open:function(){r.value=!0}}),function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.value=e})},{header:(0,t.withCtx)((function(){return[p]})),body:(0,t.withCtx)((function(){return[h]})),_:1},8,["modelValue"])}}});const k=(0,y.Z)(N,[["__scopeId","data-v-5f8298e6"]]);var V=k,x=o(9266),M=o(5613),Z=function(e){return(0,t.pushScopeId)("data-v-3eb46986"),e=e(),(0,t.popScopeId)(),e},C={class:"info-modal-header"},w=["src","alt"],B={class:"info-modal-title"},P={key:0},E={key:0},T={key:0},F=Z((function(){return(0,t.createElementVNode)("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),I=Z((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),D=Z((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),R=["href"],O=Z((function(){return(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),_=Z((function(){return(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,t.createTextVNode)(" The Paper Pilot Community ")])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),j=Z((function(){return(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,t.createTextVNode)(" The Modding Tree ")])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),A=Z((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),U=(0,t.defineComponent)({props:{changelog:null},setup:function(e,n){var o=n.expose,r=e,a=u.title,c=u.logo,s=u.author,m=u.discordName,d=u.discordLink,y=u.versionNumber,b=u.versionTitle,v=(0,t.toRefs)(r),g=(0,t.ref)(!1),p=(0,t.computed)((function(){return(0,M.mr)(f.Z.timePlayed)})),h=(0,t.computed)((function(){return(0,i.MM)((0,l.tZ)((function(){return(0,t.createVNode)(t.Fragment,null,[x.II.map(i.sY)])})))}));function N(){var e;null===(e=(0,t.unref)(v.changelog))||void 0===e||e.open()}return o({open:function(){g.value=!0}}),function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return g.value=e})},{header:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",C,[(0,t.unref)(c)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,class:"info-modal-logo",src:(0,t.unref)(c),alt:(0,t.unref)(a)},null,8,w)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",B,[(0,t.createElementVNode)("h2",null,(0,t.toDisplayString)((0,t.unref)(a)),1),(0,t.createElementVNode)("h4",null,[(0,t.createTextVNode)(function(){return" v"[Symbol.for("+")]?" v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(y))):" v"+(0,t.toDisplayString)((0,t.unref)(y))}(),1),(0,t.unref)(b)?((0,t.openBlock)(),(0,t.createElementBlock)("span",P,function(){return": "[Symbol.for("+")]?": "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(b))):": "+(0,t.toDisplayString)((0,t.unref)(b))}(),1)):(0,t.createCommentVNode)("",!0)])])])]})),body:(0,t.withCtx)((function(e){var n=e.shown;return[n?((0,t.openBlock)(),(0,t.createElementBlock)("div",E,[(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)("div",T,function(){return"By "[Symbol.for("+")]?"By "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(s))):"By "+(0,t.toDisplayString)((0,t.unref)(s))}(),1)):(0,t.createCommentVNode)("",!0),F,I,(0,t.createElementVNode)("div",{class:"link",onClick:N},"Changelog"),D,(0,t.createElementVNode)("div",null,[function(){return void 0!==(0,t.unref)(d)&&null!==(0,t.unref)(d)&&(0,t.unref)(d)[Symbol.for("!==")]?(0,t.unref)(d)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,t.unref)(d)}()?((0,t.openBlock)(),(0,t.createElementBlock)("a",{key:0,href:(0,t.unref)(d),class:"info-modal-discord-link"},[O,(0,t.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(m))):" "+(0,t.toDisplayString)((0,t.unref)(m))}(),1)],8,R)):(0,t.createCommentVNode)("",!0)]),_,j,A,(0,t.createElementVNode)("div",null,function(){return"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(p))):"Time Played: "+(0,t.toDisplayString)((0,t.unref)(p))}(),1),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(h))))])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["modelValue"])}}});const q=(0,y.Z)(U,[["__scopeId","data-v-3eb46986"]]);var z=q,L=o(1037),G=o(1349),H=o(3525),W=o(9868),Y=o(264),K=function(e){return(0,t.pushScopeId)("data-v-85d7ae40"),e=e(),(0,t.popScopeId)(),e},J=K((function(){return(0,t.createElementVNode)("div",{class:"header"},[(0,t.createElementVNode)("h2",null,"Options")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Q=K((function(){return(0,t.createElementVNode)("hr",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),$=(0,t.defineComponent)({setup:function(e,n){var o=n.expose,r=(0,t.ref)(!1);o({open:function(){r.value=!0}});var a=Object.keys(L.Z).map((function(e){return{label:(0,G.IJ)(e),value:e}})),c=(0,t.computed)((function(){return(0,i.MM)((0,l.tZ)((function(){return(0,t.createVNode)(t.Fragment,null,[x.V$.map(i.sY)])})))})),s=(0,t.toRefs)(x.ZP),m=s.showTPS,d=s.theme,y=s.unthrottled,b=(0,t.toRefs)(f.Z),v=b.autosave,g=b.offlineProd,p=(0,t.computed)({get:function(){return 0===f.Z.devSpeed},set:function(e){f.Z.devSpeed=e?0:null}}),h=(0,l.tZ)((function(){return(0,t.createVNode)("span",null,[(0,t.createTextVNode)("Offline Production"),(0,t.createVNode)(Y.Z,{display:"Save-specific"},{default:function(){return[(0,t.createTextVNode)("*")]}})])})),N=(0,l.tZ)((function(){return(0,t.createVNode)("span",null,[(0,t.createTextVNode)("Autosave"),(0,t.createVNode)(Y.Z,{display:"Save-specific"},{default:function(){return[(0,t.createTextVNode)("*")]}})])})),k=(0,l.tZ)((function(){return(0,t.createVNode)("span",null,[(0,t.createTextVNode)("Pause game"),(0,t.createVNode)(Y.Z,{display:"Save-specific"},{default:function(){return[(0,t.createTextVNode)("*")]}})])}));return function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:r.value,"onUpdate:modelValue":n[6]||(n[6]=function(e){return r.value=e})},{header:(0,t.withCtx)((function(){return[J]})),body:(0,t.withCtx)((function(){return[(0,t.createVNode)(H.Z,{title:"Theme",options:(0,t.unref)(a),modelValue:(0,t.unref)(d),"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,t.isRef)(d)?d.value=e:null})},null,8,["options","modelValue"]),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(c)))),(0,t.createVNode)(W.Z,{title:"Show TPS",modelValue:(0,t.unref)(m),"onUpdate:modelValue":n[1]||(n[1]=function(e){return(0,t.isRef)(m)?m.value=e:null})},null,8,["modelValue"]),Q,(0,t.createVNode)(W.Z,{title:"Unthrottled",modelValue:(0,t.unref)(y),"onUpdate:modelValue":n[2]||(n[2]=function(e){return(0,t.isRef)(y)?y.value=e:null})},null,8,["modelValue"]),(0,t.createVNode)(W.Z,{title:(0,t.unref)(h),modelValue:(0,t.unref)(g),"onUpdate:modelValue":n[3]||(n[3]=function(e){return(0,t.isRef)(g)?g.value=e:null})},null,8,["title","modelValue"]),(0,t.createVNode)(W.Z,{title:(0,t.unref)(N),modelValue:(0,t.unref)(v),"onUpdate:modelValue":n[4]||(n[4]=function(e){return(0,t.isRef)(v)?v.value=e:null})},null,8,["title","modelValue"]),(0,t.unref)(u).enablePausing?((0,t.openBlock)(),(0,t.createBlock)(W.Z,{key:0,title:(0,t.unref)(k),modelValue:(0,t.unref)(p),"onUpdate:modelValue":n[5]||(n[5]=function(e){return(0,t.isRef)(p)?p.value=e:null})},null,8,["title","modelValue"])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["modelValue"])}}});const X=(0,y.Z)($,[["__scopeId","data-v-85d7ae40"]]);var ee=X,ne=o(5082),oe=o(3336),re=(o(7714),o(2801),o(1174),o(8862),o(3948),o(7042),o(2222),o(4747),o(7327),o(463)),te=o(4520),le={key:0},ie=["onClick","disabled"],ue={key:0},ae=["onClick"],fe=(0,t.defineComponent)({props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup:function(e,n){var o=n.emit,r=e,l=(0,t.toRefs)(r),i=(0,t.ref)(!1);function u(){(0,t.unref)(l.skipConfirm)?o("click"):(i.value&&o("click"),i.value=function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value}())}function a(){i.value=!1}return(0,t.watch)(i,(function(e){o("confirmingChanged",e)})),function(n,o){return(0,t.openBlock)(),(0,t.createElementBlock)("span",{class:(0,t.normalizeClass)(["container",{confirming:i.value}])},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)("span",le,"Are you sure?")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("button",{onClick:(0,t.withModifiers)(u,["stop"]),class:"button danger",disabled:e.disabled},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)("span",ue,"Yes")):(0,t.renderSlot)(n.$slots,"default",{key:1})],8,ie),i.value?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"button",onClick:(0,t.withModifiers)(a,["stop"])},"No",8,ae)):(0,t.createCommentVNode)("",!0)],2)}}});const ce=(0,y.Z)(fe,[["__scopeId","data-v-bf59fca4"]]);var se=ce,me=["onClick"],de=(0,t.defineComponent)({props:{left:{type:Boolean}},emits:["click"],setup:function(e,n){var o=n.emit,r=(0,t.ref)(!1),l=(0,t.ref)(null);function i(){o("click"),l.value&&clearTimeout(l.value),r.value=!1,(0,t.nextTick)((function(){r.value=!0,l.value=setTimeout((function(){return r.value=!1}),500)}))}return function(n,o){return(0,t.openBlock)(),(0,t.createElementBlock)("button",{onClick:(0,t.withModifiers)(i,["stop"]),class:(0,t.normalizeClass)(["feedback",{activated:r.value,left:e.left}])},[(0,t.renderSlot)(n.$slots,"default")],10,me)}}});const ye=(0,y.Z)(de,[["__scopeId","data-v-5bbcedd3"]]);var be=ye,ve=function(e){return(0,t.pushScopeId)("data-v-6a0cf7ac"),e=e(),(0,t.popScopeId)(),e},Se=ve((function(){return(0,t.createElementVNode)("div",{class:"handle material-icons"},"drag_handle",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),ge={key:0,class:"actions"},pe=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"content_paste",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),he=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"content_copy",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ne=[he],ke=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"edit",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ve=[ke],xe=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons",style:{margin:"-2px"}},"delete",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Me={key:1,class:"actions"},Ze=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"check",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ce=[Ze],we=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"close",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Be=[we],Pe={key:2,class:"details"},Ee={class:"save-version"},Te=ve((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Fe={key:0},Ie={key:3,class:"details"},De={key:4,class:"details error"},Re=ve((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Oe=(0,t.defineComponent)({props:{save:null},emits:["export","open","duplicate","delete","editName"],setup:function(e,n){var o=n.emit,r=e,l=(0,t.toRefs)(r),i=l.save,u=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=(0,t.ref)(!1),c=(0,t.ref)(!1),s=(0,t.ref)("");(0,t.watch)(a,(function(){return s.value=i.value.name||""}));var m=(0,t.computed)((function(){return i.value&&i.value.id===f.Z.id})),d=(0,t.computed)((function(){return m.value?f.Z.time:i.value&&i.value.time||0}));function y(){o("editName",s.value),a.value=!1}return function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["save",{active:(0,t.unref)(m)}])},[Se,function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",ge,[function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==c.value&&null!==c.value&&c.value[Symbol.for("!")]?c.value[Symbol.for("!")]():!c.value}()?((0,t.openBlock)(),(0,t.createBlock)(be,{key:0,onClick:n[0]||(n[0]=function(e){return o("export")}),class:"button",left:""},{default:(0,t.withCtx)((function(){return[pe]})),_:1})):(0,t.createCommentVNode)("",!0),function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==c.value&&null!==c.value&&c.value[Symbol.for("!")]?c.value[Symbol.for("!")]():!c.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,onClick:n[1]||(n[1]=function(e){return o("duplicate")}),class:"button"},Ne)):(0,t.createCommentVNode)("",!0),function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==c.value&&null!==c.value&&c.value[Symbol.for("!")]?c.value[Symbol.for("!")]():!c.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:2,onClick:n[2]||(n[2]=function(e){return a.value=function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()}),class:"button"},Ve)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(se,{disabled:(0,t.unref)(m),onClick:n[3]||(n[3]=function(e){return o("delete")}),onConfirmingChanged:n[4]||(n[4]=function(e){return c.value=e})},{default:(0,t.withCtx)((function(){return[xe]})),_:1},8,["disabled"])])):((0,t.openBlock)(),(0,t.createElementBlock)("div",Me,[(0,t.createElementVNode)("button",{onClick:y,class:"button"},Ce),(0,t.createElementVNode)("button",{onClick:n[5]||(n[5]=function(e){return a.value=function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()}),class:"button"},Be)])),function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Pe,[(0,t.createElementVNode)("button",{class:"button open",onClick:n[6]||(n[6]=function(e){return o("open")})},[(0,t.createElementVNode)("h3",null,(0,t.toDisplayString)((0,t.unref)(i).name),1)]),(0,t.createElementVNode)("span",Ee,function(){return"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(i).modVersion)):"v"+(0,t.toDisplayString)((0,t.unref)(i).modVersion)}(),1),Te,(0,t.unref)(d)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Fe,function(){return"Last played "[Symbol.for("+")]?"Last played "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(u).format((0,t.unref)(d)))):"Last played "+(0,t.toDisplayString)((0,t.unref)(u).format((0,t.unref)(d)))}(),1)):(0,t.createCommentVNode)("",!0)])):function(){return void 0!==(0,t.unref)(i).error&&null!==(0,t.unref)(i).error&&(0,t.unref)(i).error[Symbol.for("==")]?(0,t.unref)(i).error[Symbol.for("==")](void 0):void 0==(0,t.unref)(i).error}()&&a.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ie,[(0,t.createVNode)(te.Z,{modelValue:s.value,"onUpdate:modelValue":n[7]||(n[7]=function(e){return s.value=e}),class:"editname",onSubmit:y},null,8,["modelValue"])])):((0,t.openBlock)(),(0,t.createElementBlock)("div",De,[(0,t.createTextVNode)(function(){return" Error: Failed to load save with id "[Symbol.for("+")]?" Error: Failed to load save with id "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(i).id)):" Error: Failed to load save with id "+(0,t.toDisplayString)((0,t.unref)(i).id)}(),1),Re,(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(i).error),1)]))],2)}}});const _e=(0,y.Z)(Oe,[["__scopeId","data-v-6a0cf7ac"]]);var je=_e,Ae=o(9980),Ue=o.n(Ae),qe=function(e){return(0,t.pushScopeId)("data-v-7d95f59e"),e=e(),(0,t.popScopeId)(),e},ze=qe((function(){return(0,t.createElementVNode)("h2",null,"Saves Manager",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Le={class:"modal-footer"},Ge={class:"field"},He=qe((function(){return(0,t.createElementVNode)("span",{class:"field-title"},"Create Save",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),We={class:"field-buttons"},Ye={class:"footer"},Ke=qe((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Je=(0,t.defineComponent)({setup:function(e,n){var r=n.expose,l=(0,t.ref)(!1),i=(0,t.ref)(null);r({open:function(){l.value=!0}});var u=(0,t.ref)(!1),a=(0,t.ref)("");(0,t.watch)(a,(function(e){e?(0,t.nextTick)((function(){try{var n=JSON.parse(decodeURIComponent(escape(atob(e))));if(function(){return void 0!==(0,oe.Z)(n)&&null!==typeof n&&(0,oe.Z)(n)[Symbol.for("!==")]?(0,oe.Z)(n)[Symbol.for("!==")]("object"):"object"!==(0,oe.Z)(n)}())return void(u.value=!0);var o=(0,re.QI)();n.id=o,localStorage.setItem(o,btoa(unescape(encodeURIComponent(JSON.stringify(n))))),a.value="",u.value=!1,x.ZP.saves.push(o)}catch(r){u.value=!0}})):u.value=!1}));var c=o(7634),s=(0,t.ref)(c.keys().reduce((function(e,n){return e.push({label:n.slice(2,function(){return 4[Symbol.for("minus")]?4[Symbol.for("minus")]():-4}()),value:c(n).default}),e}),[])),m=(0,t.shallowReactive)({});function d(e){if(function(){return void 0!==m[e]&&null!==m[e]&&m[e][Symbol.for("==")]?m[e][Symbol.for("==")](null):null==m[e]}()){var n=localStorage.getItem(e);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}())m[e]={error:"Save doesn't exist in localStorage",id:e};else if("dW5kZWZpbmVk"===n)m[e]={error:"Save is undefined",id:e};else try{m[e]=(0,ne.Z)((0,ne.Z)({},JSON.parse(decodeURIComponent(escape(atob(n))))),{},{id:e})}catch(o){m[e]={error:o,id:e},console.warn("SavesManager: Failed to load info about save with id ".concat(e,":\n").concat(o,"\n").concat(n))}}return m[e]}(0,t.watch)(l,(function(e){e&&Object.keys(m).forEach((function(e){return function(){return void 0!==m&&null!==m&&m[Symbol.for("delete")]?m[Symbol.for("delete")]("key"):delete m.key}()}))}));var y=(0,t.computed)((function(){return x.ZP.saves.reduce((function(e,n){return e[n]=d(n),e}),{})}));function b(e){var n;n=f.Z.id===e?(0,re.a1)():btoa(unescape(encodeURIComponent(JSON.stringify(y.value[e]))));var o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),o.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(o)}function v(e){f.Z.id===e&&(0,re.a1)();var n=(0,ne.Z)((0,ne.Z)({},y.value[e]),{},{id:(0,re.QI)()});localStorage.setItem(n.id,btoa(unescape(encodeURIComponent(JSON.stringify(n))))),x.ZP.saves.push(n.id)}function g(e){x.ZP.saves=x.ZP.saves.filter((function(n){return function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](e):n!==e}()})),localStorage.removeItem(e),m[e]=void 0}function p(e){y.value[f.Z.id].time=f.Z.time,(0,re.a1)(),(0,re.uW)(y.value[e]),m[e]=void 0}function h(e){var n=JSON.parse(decodeURIComponent(escape(atob(e))));n.id=(0,re.QI)(),localStorage.setItem(n.id,btoa(unescape(encodeURIComponent(JSON.stringify(n))))),x.ZP.saves.push(n.id)}function N(e,n){var o=y.value[e];o&&(o.name=n,f.Z.id===e?(f.Z.name=n,(0,re.a1)()):(localStorage.setItem(e,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),m[e]=void 0))}return function(e,n){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{modelValue:l.value,"onUpdate:modelValue":n[4]||(n[4]=function(e){return l.value=e}),ref_key:"modal",ref:i},{header:(0,t.withCtx)((function(){return[ze]})),body:(0,t.withCtx)((function(e){var n=e.shown;return[n?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ue()),{key:0,list:(0,t.unref)(x.ZP).saves,handle:".handle",itemKey:function(e){return e}},{item:(0,t.withCtx)((function(e){var n=e.element;return[(0,t.createVNode)(je,{save:(0,t.unref)(y)[n],onOpen:function(e){return p(n)},onExport:function(e){return b(n)},onEditName:function(e){return N(n,e)},onDuplicate:function(e){return v(n)},onDelete:function(e){return g(n)}},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]})),_:1},8,["list","itemKey"])):(0,t.createCommentVNode)("",!0)]})),footer:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",Le,[(0,t.createVNode)(te.Z,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.value=e}),title:"Import Save",placeholder:"Paste your save here!",class:(0,t.normalizeClass)({importingFailed:u.value})},null,8,["modelValue","class"]),(0,t.createElementVNode)("div",Ge,[He,(0,t.createElementVNode)("div",We,[(0,t.createElementVNode)("button",{class:"button",onClick:n[1]||(n[1]=function(){return(0,t.unref)(re.xM)&&(0,t.unref)(re.xM).apply(void 0,arguments)})},"New Game"),function(){return void 0!==Object.keys((0,t.unref)(s)).length&&null!==Object.keys((0,t.unref)(s)).length&&Object.keys((0,t.unref)(s)).length[Symbol.for(">")]?Object.keys((0,t.unref)(s)).length[Symbol.for(">")](0):Object.keys((0,t.unref)(s)).length>0}()?((0,t.openBlock)(),(0,t.createBlock)(H.Z,{key:0,options:(0,t.unref)(s),modelValue:void 0,"onUpdate:modelValue":n[2]||(n[2]=function(e){return h(e)}),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,t.createCommentVNode)("",!0)])]),(0,t.createElementVNode)("div",Ye,[Ke,(0,t.createElementVNode)("button",{class:"button modal-default-button",onClick:n[3]||(n[3]=function(e){return l.value=!1})}," Close ")])])]})),_:1},8,["modelValue"])}}});const Qe=(0,y.Z)(Je,[["__scopeId","data-v-7d95f59e"]]);var $e=Qe,Xe=o(4096),en=function(e){return(0,t.pushScopeId)("data-v-71847eca"),e=e(),(0,t.popScopeId)(),e},nn=["src","alt"],on={key:1,class:"title"},rn=en((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),tn={class:"discord"},ln={class:"discord-links"},un={key:0},an=["href"],fn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),cn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),sn={href:"https://forums.moddingtree.com/",target:"_blank"},mn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),dn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),yn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),bn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),vn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Sn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),gn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),pn={href:"https://forums.moddingtree.com/",target:"_blank"},hn=en((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Nn={class:"discord"},kn={class:"discord-links"},Vn={key:0},xn=["href"],Mn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Zn=en((function(){return(0,t.createElementVNode)("li",null,[(0,t.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Cn=(0,t.defineComponent)({setup:function(e){var n=(0,t.ref)(null),o=(0,t.ref)(null),r=(0,t.ref)(null),l=(0,t.ref)(null),i=u.useHeader,a=u.banner,f=u.title,c=u.discordName,s=u.discordLink,m=u.versionNumber;function d(){window.open(s,"mywindow")}return function(e,u){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.unref)(i)?((0,t.openBlock)(),(0,t.createElementBlock)("div",(0,t.mergeProps)({key:0,class:"nav"},e.$attrs),[(0,t.unref)(a)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:(0,t.unref)(a),class:"banner",alt:(0,t.unref)(f)},null,8,nn)):((0,t.openBlock)(),(0,t.createElementBlock)("div",on,(0,t.toDisplayString)((0,t.unref)(f)),1)),(0,t.createElementVNode)("div",{onClick:u[0]||(u[0]=function(e){var n;return null===(n=l.value)||void 0===n?void 0:n.open()}),class:"version-container"},[(0,t.createVNode)(Y.Z,{display:"Changelog",direction:(0,t.unref)(Xe.A).DOWN,class:"version"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",null,function(){return"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(m))):"v"+(0,t.toDisplayString)((0,t.unref)(m))}(),1)]})),_:1},8,["direction"])]),rn,(0,t.createElementVNode)("div",tn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",ln,[function(){return void 0!==(0,t.unref)(s)&&null!==(0,t.unref)(s)&&(0,t.unref)(s)[Symbol.for("!==")]?(0,t.unref)(s)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,t.unref)(s)}()?((0,t.openBlock)(),(0,t.createElementBlock)("li",un,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,an)])):(0,t.createCommentVNode)("",!0),fn,cn])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",sn,[(0,t.createVNode)(Y.Z,{display:"Forums",direction:(0,t.unref)(Xe.A).DOWN,yoffset:"5px"},{default:(0,t.withCtx)((function(){return[mn]})),_:1},8,["direction"])])]),(0,t.createElementVNode)("div",{onClick:u[1]||(u[1]=function(e){var o;return null===(o=n.value)||void 0===o?void 0:o.open()})},[(0,t.createVNode)(Y.Z,{display:"Info",direction:(0,t.unref)(Xe.A).DOWN,class:"info"},{default:(0,t.withCtx)((function(){return[dn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[2]||(u[2]=function(e){var n;return null===(n=o.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Saves",direction:(0,t.unref)(Xe.A).DOWN,xoffset:"-20px"},{default:(0,t.withCtx)((function(){return[yn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[3]||(u[3]=function(e){var n;return null===(n=r.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Options",direction:(0,t.unref)(Xe.A).DOWN,xoffset:"-66px"},{default:(0,t.withCtx)((function(){return[bn]})),_:1},8,["direction"])])],16)):((0,t.openBlock)(),(0,t.createElementBlock)("div",(0,t.mergeProps)({key:1,class:"overlay-nav"},e.$attrs),[(0,t.createElementVNode)("div",{onClick:u[4]||(u[4]=function(e){var n;return null===(n=l.value)||void 0===n?void 0:n.open()}),class:"version-container"},[(0,t.createVNode)(Y.Z,{display:"Changelog",direction:(0,t.unref)(Xe.A).RIGHT,xoffset:"25%",class:"version"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",null,function(){return"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(m))):"v"+(0,t.toDisplayString)((0,t.unref)(m))}(),1)]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[5]||(u[5]=function(e){var n;return null===(n=o.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Saves",direction:(0,t.unref)(Xe.A).RIGHT},{default:(0,t.withCtx)((function(){return[vn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[6]||(u[6]=function(e){var n;return null===(n=r.value)||void 0===n?void 0:n.open()})},[(0,t.createVNode)(Y.Z,{display:"Options",direction:(0,t.unref)(Xe.A).RIGHT},{default:(0,t.withCtx)((function(){return[Sn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",{onClick:u[7]||(u[7]=function(e){var o;return null===(o=n.value)||void 0===o?void 0:o.open()})},[(0,t.createVNode)(Y.Z,{display:"Info",direction:(0,t.unref)(Xe.A).RIGHT},{default:(0,t.withCtx)((function(){return[gn]})),_:1},8,["direction"])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",pn,[(0,t.createVNode)(Y.Z,{display:"Forums",direction:(0,t.unref)(Xe.A).RIGHT,xoffset:"7px"},{default:(0,t.withCtx)((function(){return[hn]})),_:1},8,["direction"])])]),(0,t.createElementVNode)("div",Nn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",kn,[function(){return void 0!==(0,t.unref)(s)&&null!==(0,t.unref)(s)&&(0,t.unref)(s)[Symbol.for("!==")]?(0,t.unref)(s)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,t.unref)(s)}()?((0,t.openBlock)(),(0,t.createElementBlock)("li",Vn,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,xn)])):(0,t.createCommentVNode)("",!0),Mn,Zn])])],16)),(0,t.createVNode)(z,{ref_key:"info",ref:n,changelog:l.value},null,8,["changelog"]),(0,t.createVNode)($e,{ref_key:"savesManager",ref:o},null,512),(0,t.createVNode)(ee,{ref_key:"options",ref:r},null,512),(0,t.createVNode)(V,{ref_key:"changelog",ref:l},null,512)],64)}}});const wn=(0,y.Z)(Cn,[["__scopeId","data-v-71847eca"]]);var Bn=wn,Pn={class:"inner-tab"},En={key:1,class:"separator"},Tn=(0,t.defineComponent)({setup:function(e){var n=(0,t.toRef)(f.Z,"tabs"),o=(0,t.computed)((function(){return Object.keys(a.layers)})),r=u.useHeader;function l(e){var n=e.display,o=e.minimized,r=e.minWidth,t=e.name,l=e.color,i=e.style,u=e.classes,a=e.minimizable,f=e.nodes;return{display:n,minimized:o,minWidth:r,name:t,color:l,style:i,classes:u,minimizable:a,nodes:f}}return function(e,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["tabs-container",{useHeader:(0,t.unref)(r)}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(n),(function(i,u){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:u,class:"tab",ref_for:!0,ref:"tab-".concat(u)},[0===u&&function(){return void 0!==(0,t.unref)(r)&&null!==(0,t.unref)(r)&&(0,t.unref)(r)[Symbol.for("!")]?(0,t.unref)(r)[Symbol.for("!")]():!(0,t.unref)(r)}()?((0,t.openBlock)(),(0,t.createBlock)(Bn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Pn,[(0,t.unref)(o).includes(i)?((0,t.openBlock)(),(0,t.createBlock)(v,(0,t.mergeProps)({key:0},l((0,t.unref)(a.layers)[i]),{index:u,tab:function(){var n;return null===(n=e.$refs["tab-".concat(u)])||void 0===n?void 0:n[0]}}),null,16,["index","tab"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(i),{key:1,index:u},null,8,["index"]))]),function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")]((0,t.unref)(n).length-1):u!==(0,t.unref)(n).length-1}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",En)):(0,t.createCommentVNode)("",!0)])})),128))],2)}}});const Fn=(0,y.Z)(Tn,[["__scopeId","data-v-4fd7697b"]]);var In=Fn,Dn=o(5412),Rn=function(e){return(0,t.pushScopeId)("data-v-06188cc8"),e=e(),(0,t.popScopeId)(),e},On={class:"game-over-modal-header"},_n=["src","alt"],jn={class:"game-over-modal-title"},An=Rn((function(){return(0,t.createElementVNode)("h2",null,"Congratulations!",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Un={key:0},qn=Rn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),zn=Rn((function(){return(0,t.createElementVNode)("div",null," Please check the Discord to discuss the game or to check for new content updates! ",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ln=Rn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Gn=["href"],Hn=Rn((function(){return(0,t.createElementVNode)("span",{class:"material-icons game-over-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Wn=(0,t.defineComponent)({setup:function(e){var n=u.title,o=u.logo,r=u.discordName,l=u.discordLink,i=u.versionNumber,a=u.versionTitle,c=(0,t.computed)((function(){return(0,M.mr)(f.Z.timePlayed)})),s=(0,t.computed)((function(){return Dn.hasWon.value&&function(){return void 0!==f.Z.keepGoing&&null!==f.Z.keepGoing&&f.Z.keepGoing[Symbol.for("!")]?f.Z.keepGoing[Symbol.for("!")]():!f.Z.keepGoing}()})),m=(0,t.toRef)(f.Z,"autosave");function d(){f.Z.keepGoing=!0}function y(){(0,re.uW)((0,re.xM)())}return function(e,u){return(0,t.openBlock)(),(0,t.createBlock)(S.Z,{"model-value":(0,t.unref)(s)},{header:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",On,[(0,t.unref)(o)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,class:"game-over-modal-logo",src:(0,t.unref)(o),alt:(0,t.unref)(n)},null,8,_n)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",jn,[An,(0,t.createElementVNode)("h4",null,function(){return"You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": "!==void 0&&"You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": "!==null&&("You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": ")[Symbol.for("+")]?("You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": ")[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(a))):"You've beaten "+(0,t.toDisplayString)((0,t.unref)(n))+" v"+(0,t.toDisplayString)((0,t.unref)(i))+": "+(0,t.toDisplayString)((0,t.unref)(a))}(),1)])])]})),body:(0,t.withCtx)((function(e){var n=e.shown;return[n?((0,t.openBlock)(),(0,t.createElementBlock)("div",Un,[(0,t.createElementVNode)("div",null,function(){return"It took you "+(0,t.toDisplayString)((0,t.unref)(c))!==void 0&&"It took you "+(0,t.toDisplayString)((0,t.unref)(c))!==null&&("It took you "+(0,t.toDisplayString)((0,t.unref)(c)))[Symbol.for("+")]?("It took you "+(0,t.toDisplayString)((0,t.unref)(c)))[Symbol.for("+")](" to beat the game."):"It took you "+(0,t.toDisplayString)((0,t.unref)(c))+" to beat the game."}(),1),qn,zn,Ln,(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:(0,t.unref)(l),class:"game-over-modal-discord-link"},[Hn,(0,t.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(r))):" "+(0,t.toDisplayString)((0,t.unref)(r))}(),1)],8,Gn)]),(0,t.createVNode)(W.Z,{title:"Autosave",modelValue:(0,t.unref)(m),"onUpdate:modelValue":u[0]||(u[0]=function(e){return(0,t.isRef)(m)?m.value=e:null})},null,8,["modelValue"])])):(0,t.createCommentVNode)("",!0)]})),footer:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",{class:"game-over-footer"},[(0,t.createElementVNode)("button",{onClick:d,class:"button"},"Keep Going"),(0,t.createElementVNode)("button",{onClick:y,class:"button danger"},"Play Again")])]})),_:1},8,["model-value"])}}});const Yn=(0,y.Z)(Wn,[["__scopeId","data-v-06188cc8"]]);var Kn=Yn,Jn=(o(9600),o(3032)),Qn=function(e){return(0,t.pushScopeId)("data-v-5935214c"),e=e(),(0,t.popScopeId)(),e},$n=Qn((function(){return(0,t.createElementVNode)("div",{class:"nan-modal-header"},[(0,t.createElementVNode)("h2",null,"NaN value detected!")],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Xn={key:0},eo=Qn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),no=["href"],oo=Qn((function(){return(0,t.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),ro=Qn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),to={class:"nan-footer"},lo=(0,t.defineComponent)({setup:function(e){var n=u.discordName,o=u.discordLink,r=(0,t.toRef)(f.Z,"autosave"),l=(0,t.toRef)(Jn.Z,"hasNaN"),i=(0,t.ref)(null),a=(0,t.computed)((function(){var e;return null===(e=Jn.Z.NaNPath)||void 0===e?void 0:e.join(".")})),c=(0,t.computed)((function(){var e;return null===(e=Jn.Z.NaNPath)||void 0===e?void 0:e.slice(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())[0]})),s=(0,t.computed)((function(){return Jn.Z.NaNReceiver&&c.value?Jn.Z.NaNReceiver[c.value]:null})),m=(0,t.computed)({get:function(){return 0===f.Z.devSpeed},set:function(e){f.Z.devSpeed=e?null:0}});function d(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new M.ZP(0),Jn.Z.hasNaN=!1)}function y(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new M.ZP(1),Jn.Z.hasNaN=!1)}function b(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new M.ZP(NaN),Jn.Z.hasNaN=!1)}return function(e,f){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(S.Z,(0,t.mergeProps)({modelValue:(0,t.unref)(l),"onUpdate:modelValue":f[4]||(f[4]=function(e){return(0,t.isRef)(l)?l.value=e:null})},e.$attrs),{header:(0,t.withCtx)((function(){return[$n]})),body:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",null,[(0,t.createTextVNode)(function(){return' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a))!==void 0&&' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a))!==null&&(' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a)))[Symbol.for("+")]?(' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a)))[Symbol.for("+")]('" to NaN'):' Attempted to assign "'+(0,t.toDisplayString)((0,t.unref)(a))+'" to NaN'}(),1),(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)("span",Xn,function(){return(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s)))!==void 0&&(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s)))!==null&&((0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s))))[Symbol.for("+")]?((0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s))))[Symbol.for("+")](")"):(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(M.WU)((0,t.unref)(s)))+")"}(),1)):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(function(){return". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled")!==void 0&&". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled")!==null&&(". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled"))[Symbol.for("+")]?(". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled"))[Symbol.for("+")](". Check the console for more details, and consider sharing it with the developers on discord. "):". Auto-saving has been "+(0,t.toDisplayString)((0,t.unref)(r)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. "}(),1)]),eo,(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:(0,t.unref)(o),class:"nan-modal-discord-link"},[oo,(0,t.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,t.toDisplayString)((0,t.unref)(n))):" "+(0,t.toDisplayString)((0,t.unref)(n))}(),1)],8,no)]),ro,(0,t.createVNode)(W.Z,{title:"Autosave",modelValue:(0,t.unref)(r),"onUpdate:modelValue":f[0]||(f[0]=function(e){return(0,t.isRef)(r)?r.value=e:null})},null,8,["modelValue"]),(0,t.unref)(u).enablePausing?((0,t.openBlock)(),(0,t.createBlock)(W.Z,{key:0,title:"Pause game",modelValue:(0,t.unref)(m),"onUpdate:modelValue":f[1]||(f[1]=function(e){return(0,t.isRef)(m)?m.value=e:null})},null,8,["modelValue"])):(0,t.createCommentVNode)("",!0)]})),footer:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",to,[(0,t.createElementVNode)("button",{onClick:f[2]||(f[2]=function(e){var n;return null===(n=i.value)||void 0===n?void 0:n.open()}),class:"button"},"Open Saves Manager"),(0,t.createElementVNode)("button",{onClick:d,class:"button"},"Set to 0"),(0,t.createElementVNode)("button",{onClick:y,class:"button"},"Set to 1"),(0,t.unref)(s)&&(0,t.unref)(M.ZP).neq((0,t.unref)(s),0)&&(0,t.unref)(M.ZP).neq((0,t.unref)(s),1)?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,onClick:f[3]||(f[3]=function(e){return l.value=!1}),class:"button"}," Set to previous ")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("button",{onClick:b,class:"button danger"},"Ignore")])]})),_:1},16,["modelValue"]),(0,t.createVNode)($e,{ref_key:"savesManager",ref:i},null,512)],64)}}});const io=(0,y.Z)(lo,[["__scopeId","data-v-5935214c"]]);var uo=io,ao=(o(86),{key:0,class:"tpsDisplay"}),fo={key:0,class:"low"},co=(0,t.defineComponent)({setup:function(e){var n=(0,t.computed)((function(){return M.ZP.div(Jn.Z.lastTenTicks.length,Jn.Z.lastTenTicks.reduce((function(e,n){return function(){return void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](n):e+n}()}),0))})),o=(0,t.ref)([]);(0,t.watchEffect)((function(){o.value.push(Math.round(n.value.toNumber())),function(){return void 0!==o.value.length&&null!==o.value.length&&o.value.length[Symbol.for(">")]?o.value.length[Symbol.for(">")](10):o.value.length>10}()&&(o.value=o.value.slice(1))}));var r=(0,t.computed)((function(){return o.value.reduce((function(e,n){return M.ZP.max(e,n)}),0)})),l=(0,t.computed)((function(){return M.ZP.sub(n.value,r.value).gt(1)}));return function(e,o){return function(){return void 0!==(0,t.unref)(n).isNan()&&null!==(0,t.unref)(n).isNan()&&(0,t.unref)(n).isNan()[Symbol.for("!")]?(0,t.unref)(n).isNan()[Symbol.for("!")]():!(0,t.unref)(n).isNan()}()?((0,t.openBlock)(),(0,t.createElementBlock)("div",ao,[(0,t.createTextVNode)(function(){return" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n)))!==void 0&&" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n)))!==null&&(" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n))))[Symbol.for("+")]?(" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n))))[Symbol.for("+")](" "):" TPS: "+(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(n)))+" "}(),1),(0,t.createVNode)(t.Transition,{name:"fade"},{default:(0,t.withCtx)((function(){return[(0,t.unref)(l)?((0,t.openBlock)(),(0,t.createElementBlock)("span",fo,(0,t.toDisplayString)((0,t.unref)(M.Ht)((0,t.unref)(r))),1)):(0,t.createCommentVNode)("",!0)]})),_:1})])):(0,t.createCommentVNode)("",!0)}}});const so=(0,y.Z)(co,[["__scopeId","data-v-c0663118"]]);var mo=so,yo=(0,t.defineComponent)({setup:function(e){var n=u.useHeader,o=(0,t.computed)((function(){return L.Z[x.ZP.theme].variables})),r=(0,t.toRef)(x.ZP,"showTPS"),a=(0,t.computed)((function(){return(0,i.MM)((0,l.tZ)((function(){return(0,t.createVNode)(t.Fragment,null,[x.t.map(i.sY)])})))}));return function(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",{id:"modal-root",style:(0,t.normalizeStyle)((0,t.unref)(o))},null,4),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["app",{useHeader:(0,t.unref)(n)}]),style:(0,t.normalizeStyle)((0,t.unref)(o))},[(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createBlock)(Bn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(In),(0,t.unref)((0,t.unref)(r))?((0,t.openBlock)(),(0,t.createBlock)(mo,{key:1})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Kn),(0,t.createVNode)(uo),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(a))))],6)],64)}}});const bo=(0,y.Z)(yo,[["__scopeId","data-v-f13f28b6"]]);var vo=bo;if(document.title=u.title,""===u.id)throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame((0,r.Z)(regeneratorRuntime.mark((function e(){var n,r,l,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("%cMade in Profectus%c\nLearn more at www.moddingtree.com","font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),e.next=3,(0,re.zD)();case 3:return e.next=5,o(7302);case 5:n=e.sent,r=n.globalBus,l=n.startGameLoop,i=window.vue=(0,t.createApp)(vo),r.emit("setupVue",i),i.mount("#app"),l();case 12:case"end":return e.stop()}}),e)})))),window.projInfo=u},5613:function(e,n,o){"use strict";o.d(n,{ZP:function(){return Se},WU:function(){return se},mr:function(){return de},Ht:function(){return me}});o(2526),o(1817),o(1539),o(6977),o(4916),o(3123),o(5306),o(9653),o(86);var r,t,l,i,u,a,f,c,s,m,d,y=o(3087),b=o(2833),v=o(2482),S=o(3336),g=(o(658),o(2420),o(3689),o(5192),o(1703),o(9714),o(3210),o(2481),o(1354),o(4914),17),p=9e15,h=Math.log10(9e15),N=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](9e15):1/9e15}(),k=308,V=function(){return 324[Symbol.for("minus")]?324[Symbol.for("minus")]():-324}(),x=5,M=!0,Z=!1,C=function(){for(var e=[],n=function(){return void 0!==V&&null!==V&&V[Symbol.for("+")]?V[Symbol.for("+")](1):V+1}();function(){return void 0!==n&&null!==n&&n[Symbol.for("<=")]?n[Symbol.for("<=")](k):n<=k}();function(){return void 0!==n&&null!==n&&"object"===(0,S.Z)(n)&&n[Symbol.for("postfix-increment")]?n[Symbol.for("postfix-increment")]():n++}())e.push(Number(function(){return"1e"[Symbol.for("+")]?"1e"[Symbol.for("+")](n):"1e"+n}()));var o=323;return function(n){return e[function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](o):n+o}()]}}(),w=[2,Math.E,3,4,5,6,7,8,9,10],B=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],P=[[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.9194161097107025[Symbol.for("minus")]?.9194161097107025[Symbol.for("minus")]():-.9194161097107025}(),function(){return.8335625019330468[Symbol.for("minus")]?.8335625019330468[Symbol.for("minus")]():-.8335625019330468}(),function(){return.7425599821143978[Symbol.for("minus")]?.7425599821143978[Symbol.for("minus")]():-.7425599821143978}(),function(){return.6466611521029437[Symbol.for("minus")]?.6466611521029437[Symbol.for("minus")]():-.6466611521029437}(),function(){return.5462617907227869[Symbol.for("minus")]?.5462617907227869[Symbol.for("minus")]():-.5462617907227869}(),function(){return.4419033816638769[Symbol.for("minus")]?.4419033816638769[Symbol.for("minus")]():-.4419033816638769}(),function(){return.3342645487554494[Symbol.for("minus")]?.3342645487554494[Symbol.for("minus")]():-.3342645487554494}(),function(){return.224140440909962[Symbol.for("minus")]?.224140440909962[Symbol.for("minus")]():-.224140440909962}(),function(){return.11241087890006762[Symbol.for("minus")]?.11241087890006762[Symbol.for("minus")]():-.11241087890006762}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.90603157029014[Symbol.for("minus")]?.90603157029014[Symbol.for("minus")]():-.90603157029014}(),function(){return.80786507256596[Symbol.for("minus")]?.80786507256596[Symbol.for("minus")]():-.80786507256596}(),function(){return.7064666939634[Symbol.for("minus")]?.7064666939634[Symbol.for("minus")]():-.7064666939634}(),function(){return.60294836853664[Symbol.for("minus")]?.60294836853664[Symbol.for("minus")]():-.60294836853664}(),function(){return.49849837513117[Symbol.for("minus")]?.49849837513117[Symbol.for("minus")]():-.49849837513117}(),function(){return.39430303318768[Symbol.for("minus")]?.39430303318768[Symbol.for("minus")]():-.39430303318768}(),function(){return.29147201034755[Symbol.for("minus")]?.29147201034755[Symbol.for("minus")]():-.29147201034755}(),function(){return.19097820800866[Symbol.for("minus")]?.19097820800866[Symbol.for("minus")]():-.19097820800866}(),function(){return.09361896280296[Symbol.for("minus")]?.09361896280296[Symbol.for("minus")]():-.09361896280296}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.9021579584316141[Symbol.for("minus")]?.9021579584316141[Symbol.for("minus")]():-.9021579584316141}(),function(){return.8005762598234203[Symbol.for("minus")]?.8005762598234203[Symbol.for("minus")]():-.8005762598234203}(),function(){return.6964780623319391[Symbol.for("minus")]?.6964780623319391[Symbol.for("minus")]():-.6964780623319391}(),function(){return.5911906810998454[Symbol.for("minus")]?.5911906810998454[Symbol.for("minus")]():-.5911906810998454}(),function(){return.486050182576545[Symbol.for("minus")]?.486050182576545[Symbol.for("minus")]():-.486050182576545}(),function(){return.3823089430815083[Symbol.for("minus")]?.3823089430815083[Symbol.for("minus")]():-.3823089430815083}(),function(){return.28106046722897615[Symbol.for("minus")]?.28106046722897615[Symbol.for("minus")]():-.28106046722897615}(),function(){return.1831906535795894[Symbol.for("minus")]?.1831906535795894[Symbol.for("minus")]():-.1831906535795894}(),function(){return.08935809204418144[Symbol.for("minus")]?.08935809204418144[Symbol.for("minus")]():-.08935809204418144}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8917227442365535[Symbol.for("minus")]?.8917227442365535[Symbol.for("minus")]():-.8917227442365535}(),function(){return.781258746326964[Symbol.for("minus")]?.781258746326964[Symbol.for("minus")]():-.781258746326964}(),function(){return.6705130326902455[Symbol.for("minus")]?.6705130326902455[Symbol.for("minus")]():-.6705130326902455}(),function(){return.5612813129406509[Symbol.for("minus")]?.5612813129406509[Symbol.for("minus")]():-.5612813129406509}(),function(){return.4551067709033134[Symbol.for("minus")]?.4551067709033134[Symbol.for("minus")]():-.4551067709033134}(),function(){return.35319256652135966[Symbol.for("minus")]?.35319256652135966[Symbol.for("minus")]():-.35319256652135966}(),function(){return.2563741554088552[Symbol.for("minus")]?.2563741554088552[Symbol.for("minus")]():-.2563741554088552}(),function(){return.1651412821106526[Symbol.for("minus")]?.1651412821106526[Symbol.for("minus")]():-.1651412821106526}(),function(){return.0796919581982668[Symbol.for("minus")]?.0796919581982668[Symbol.for("minus")]():-.0796919581982668}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8843387974366064[Symbol.for("minus")]?.8843387974366064[Symbol.for("minus")]():-.8843387974366064}(),function(){return.7678744063886243[Symbol.for("minus")]?.7678744063886243[Symbol.for("minus")]():-.7678744063886243}(),function(){return.6529563724510552[Symbol.for("minus")]?.6529563724510552[Symbol.for("minus")]():-.6529563724510552}(),function(){return.5415870994657841[Symbol.for("minus")]?.5415870994657841[Symbol.for("minus")]():-.5415870994657841}(),function(){return.4352842206588936[Symbol.for("minus")]?.4352842206588936[Symbol.for("minus")]():-.4352842206588936}(),function(){return.33504449124791424[Symbol.for("minus")]?.33504449124791424[Symbol.for("minus")]():-.33504449124791424}(),function(){return.24138853420685147[Symbol.for("minus")]?.24138853420685147[Symbol.for("minus")]():-.24138853420685147}(),function(){return.15445285440944467[Symbol.for("minus")]?.15445285440944467[Symbol.for("minus")]():-.15445285440944467}(),function(){return.07409659641336663[Symbol.for("minus")]?.07409659641336663[Symbol.for("minus")]():-.07409659641336663}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8786709358426346[Symbol.for("minus")]?.8786709358426346[Symbol.for("minus")]():-.8786709358426346}(),function(){return.7577735191184886[Symbol.for("minus")]?.7577735191184886[Symbol.for("minus")]():-.7577735191184886}(),function(){return.6399546189952064[Symbol.for("minus")]?.6399546189952064[Symbol.for("minus")]():-.6399546189952064}(),function(){return.527284921869926[Symbol.for("minus")]?.527284921869926[Symbol.for("minus")]():-.527284921869926}(),function(){return.4211627631006314[Symbol.for("minus")]?.4211627631006314[Symbol.for("minus")]():-.4211627631006314}(),function(){return.3223479611761232[Symbol.for("minus")]?.3223479611761232[Symbol.for("minus")]():-.3223479611761232}(),function(){return.23107655627789858[Symbol.for("minus")]?.23107655627789858[Symbol.for("minus")]():-.23107655627789858}(),function(){return.1472057700818259[Symbol.for("minus")]?.1472057700818259[Symbol.for("minus")]():-.1472057700818259}(),function(){return.07035171210706326[Symbol.for("minus")]?.07035171210706326[Symbol.for("minus")]():-.07035171210706326}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8740862815291583[Symbol.for("minus")]?.8740862815291583[Symbol.for("minus")]():-.8740862815291583}(),function(){return.7497032990976209[Symbol.for("minus")]?.7497032990976209[Symbol.for("minus")]():-.7497032990976209}(),function(){return.6297119746181752[Symbol.for("minus")]?.6297119746181752[Symbol.for("minus")]():-.6297119746181752}(),function(){return.5161838335958787[Symbol.for("minus")]?.5161838335958787[Symbol.for("minus")]():-.5161838335958787}(),function(){return.41036238255751956[Symbol.for("minus")]?.41036238255751956[Symbol.for("minus")]():-.41036238255751956}(),function(){return.31277212146489963[Symbol.for("minus")]?.31277212146489963[Symbol.for("minus")]():-.31277212146489963}(),function(){return.2233976621705518[Symbol.for("minus")]?.2233976621705518[Symbol.for("minus")]():-.2233976621705518}(),function(){return.1418697367979619[Symbol.for("minus")]?.1418697367979619[Symbol.for("minus")]():-.1418697367979619}(),function(){return.06762117662323441[Symbol.for("minus")]?.06762117662323441[Symbol.for("minus")]():-.06762117662323441}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8702632331800649[Symbol.for("minus")]?.8702632331800649[Symbol.for("minus")]():-.8702632331800649}(),function(){return.7430366914122081[Symbol.for("minus")]?.7430366914122081[Symbol.for("minus")]():-.7430366914122081}(),function(){return.6213373075161548[Symbol.for("minus")]?.6213373075161548[Symbol.for("minus")]():-.6213373075161548}(),function(){return.5072025698095242[Symbol.for("minus")]?.5072025698095242[Symbol.for("minus")]():-.5072025698095242}(),function(){return.40171437727184167[Symbol.for("minus")]?.40171437727184167[Symbol.for("minus")]():-.40171437727184167}(),function(){return.30517930701410456[Symbol.for("minus")]?.30517930701410456[Symbol.for("minus")]():-.30517930701410456}(),function(){return.21736343968190863[Symbol.for("minus")]?.21736343968190863[Symbol.for("minus")]():-.21736343968190863}(),function(){return.137710238299109[Symbol.for("minus")]?.137710238299109[Symbol.for("minus")]():-.137710238299109}(),function(){return.06550774483471955[Symbol.for("minus")]?.06550774483471955[Symbol.for("minus")]():-.06550774483471955}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8670016295947213[Symbol.for("minus")]?.8670016295947213[Symbol.for("minus")]():-.8670016295947213}(),function(){return.7373984232432306[Symbol.for("minus")]?.7373984232432306[Symbol.for("minus")]():-.7373984232432306}(),function(){return.6143173985094293[Symbol.for("minus")]?.6143173985094293[Symbol.for("minus")]():-.6143173985094293}(),function(){return.49973884395492807[Symbol.for("minus")]?.49973884395492807[Symbol.for("minus")]():-.49973884395492807}(),function(){return.394584953527678[Symbol.for("minus")]?.394584953527678[Symbol.for("minus")]():-.394584953527678}(),function(){return.2989649949848695[Symbol.for("minus")]?.2989649949848695[Symbol.for("minus")]():-.2989649949848695}(),function(){return.21245647317021688[Symbol.for("minus")]?.21245647317021688[Symbol.for("minus")]():-.21245647317021688}(),function(){return.13434688362382652[Symbol.for("minus")]?.13434688362382652[Symbol.for("minus")]():-.13434688362382652}(),function(){return.0638072667348083[Symbol.for("minus")]?.0638072667348083[Symbol.for("minus")]():-.0638072667348083}(),0],[function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),function(){return.8641642839543857[Symbol.for("minus")]?.8641642839543857[Symbol.for("minus")]():-.8641642839543857}(),function(){return.732534623168535[Symbol.for("minus")]?.732534623168535[Symbol.for("minus")]():-.732534623168535}(),function(){return.6083127477059322[Symbol.for("minus")]?.6083127477059322[Symbol.for("minus")]():-.6083127477059322}(),function(){return.4934049257184696[Symbol.for("minus")]?.4934049257184696[Symbol.for("minus")]():-.4934049257184696}(),function(){return.3885773075899922[Symbol.for("minus")]?.3885773075899922[Symbol.for("minus")]():-.3885773075899922}(),function(){return.29376029055315767[Symbol.for("minus")]?.29376029055315767[Symbol.for("minus")]():-.29376029055315767}(),function(){return.2083678561173622[Symbol.for("minus")]?.2083678561173622[Symbol.for("minus")]():-.2083678561173622}(),function(){return.13155653399373268[Symbol.for("minus")]?.13155653399373268[Symbol.for("minus")]():-.13155653399373268}(),function(){return.062401588652553186[Symbol.for("minus")]?.062401588652553186[Symbol.for("minus")]():-.062401588652553186}(),0]],E=function(e){return A.fromValue_noAlloc(e)},T=function(e,n,o){return A.fromComponents(e,n,o)},F=function(e,n,o){return A.fromComponents_noNormalize(e,n,o)},I=function(e,n){var o=function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](1):n+1}(),r=Math.ceil(Math.log10(Math.abs(e))),t=function(){return void 0!==Math.round(e*Math.pow(10,o-r))&&null!==Math.round(e*Math.pow(10,o-r))&&Math.round(e*Math.pow(10,o-r))[Symbol.for("*")]?Math.round(e*Math.pow(10,o-r))[Symbol.for("*")](Math.pow(10,r-o)):Math.round(e*Math.pow(10,o-r))*Math.pow(10,r-o)}();return parseFloat(t.toFixed(Math.max(function(){return void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](r):o-r}(),0)))},D=function(e){return function(){return void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e))}()},R=function(e){if(function(){return void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e)}())return e;if(function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50}())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;var n=1;while(function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10}())n=function(){return void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](e):n*e}(),function(){void 0!==e&&null!==e&&"object"===(0,S.Z)(e)&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e}();e=function(){return void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1}();var o=.9189385332046727;o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e)}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e}();var r=function(){return void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e}(),t=e;return o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(12*t)):o+1/(12*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(360*t)):o+1/(360*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(1260*t)):o+1/(1260*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(1680*t)):o+1/(1680*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1/(1188*t)):o+1/(1188*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](691/(360360*t)):o+691/(360360*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](7/(1092*t)):o+7/(1092*t)}(),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("*")]?t[Symbol.for("*")](r):t*r}(),o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](3617/(122400*t)):o+3617/(122400*t)}(),function(){return void 0!==Math.exp(o)&&null!==Math.exp(o)&&Math.exp(o)[Symbol.for("/")]?Math.exp(o)[Symbol.for("/")](n):Math.exp(o)/n}()},O=.5671432904097838,_=function(e){var n,o,r=arguments,t=function(){return void 0!==r.length&&null!==r.length&&r.length[Symbol.for(">")]?r.length[Symbol.for(">")](1):r.length>1}()&&function(){return void 0!==r[1]&&null!==r[1]&&r[1][Symbol.for("!==")]?r[1][Symbol.for("!==")](void 0):void 0!==r[1]}()?arguments[1]:1e-10;if(function(){return void 0!==Number.isFinite(e)&&null!==Number.isFinite(e)&&Number.isFinite(e)[Symbol.for("!")]?Number.isFinite(e)[Symbol.for("!")]():!Number.isFinite(e)}())return e;if(0===e)return e;if(1===e)return O;n=function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10}()?0:function(){return void 0!==Math.log(e)&&null!==Math.log(e)&&Math.log(e)[Symbol.for("-")]?Math.log(e)[Symbol.for("-")](Math.log(Math.log(e))):Math.log(e)-Math.log(Math.log(e))}();for(var l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100}();function(){return void 0!==l&&null!==l&&"object"===(0,S.Z)(l)&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l}()){if(o=function(){return e*Math.exp(-n)+n*n!==void 0&&e*Math.exp(-n)+n*n!==null&&(e*Math.exp(-n)+n*n)[Symbol.for("/")]?(e*Math.exp(-n)+n*n)[Symbol.for("/")](n+1):(e*Math.exp(-n)+n*n)/(n+1)}(),function(){return void 0!==Math.abs(o-n)&&null!==Math.abs(o-n)&&Math.abs(o-n)[Symbol.for("<")]?Math.abs(o-n)[Symbol.for("<")](t*Math.abs(o)):Math.abs(o-n)")]?l.length[Symbol.for(">")](1):l.length>1}()&&function(){return void 0!==l[1]&&null!==l[1]&&l[1][Symbol.for("!==")]?l[1][Symbol.for("!==")](void 0):void 0!==l[1]}()?arguments[1]:1e-10;if(function(){return void 0!==Number.isFinite(e.mag)&&null!==Number.isFinite(e.mag)&&Number.isFinite(e.mag)[Symbol.for("!")]?Number.isFinite(e.mag)[Symbol.for("!")]():!Number.isFinite(e.mag)}())return e;if(e===A.dZero)return e;if(e===A.dOne)return E(O);A.abs(e);n=A.ln(e);for(var u=0;function(){return void 0!==u&&null!==u&&u[Symbol.for("<")]?u[Symbol.for("<")](100):u<100}();function(){return void 0!==u&&null!==u&&"object"===(0,S.Z)(u)&&u[Symbol.for("prefix-increment")]?u[Symbol.for("prefix-increment")]():++u}()){if(o=A.exp(function(){return void 0!==n&&null!==n&&n[Symbol.for("minus")]?n[Symbol.for("minus")]():-n}()),r=n.sub(e.mul(o)),t=n.sub(r.div(n.add(1).sub(n.add(2).mul(r).div(A.mul(2,n).add(2))))),A.abs(t.sub(n)).lt(A.abs(t).mul(i)))return t;n=t}throw Error("Iteration failed to converge: ".concat(e.toString()))}r=Symbol.for("+"),t=Symbol.for("-"),l=Symbol.for("*"),i=Symbol.for("/"),u=Symbol.for("minus"),a=Symbol.for("=="),f=Symbol.for(">"),c=Symbol.for("<"),s=Symbol.for(">="),m=Symbol.for("<="),d=Symbol.for("!=");var A=function(){function e(n){(0,y.Z)(this,e),(0,v.Z)(this,"sign",Number.NaN),(0,v.Z)(this,"mag",Number.NaN),(0,v.Z)(this,"layer",Number.NaN),n instanceof e||function(){return void 0!==n&&null!==n&&n[Symbol.for("!=")]?n[Symbol.for("!=")](null):null!=n}()&&"object"===(0,S.Z)(n)&&function(){return"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](n):"sign"in n}()&&function(){return"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](n):"mag"in n}()&&function(){return"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](n):"layer"in n}()?this.fromDecimal(n):"number"===typeof n?this.fromNumber(n):"string"===typeof n?this.fromString(n):(this.sign=0,this.layer=0,this.mag=0)}return(0,b.Z)(e,[{key:"m",get:function(){var e=this;if(0===this.sign)return 0;if(0===this.layer){var n,o=Math.floor(Math.log10(this.mag));return n=5e-324===this.mag?5:function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("/")]?e.mag[Symbol.for("/")](C(o)):e.mag/C(o)}(),function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](n):e.sign*n}()}if(1===this.layer){var r=function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("-")]?e.mag[Symbol.for("-")](Math.floor(e.mag)):e.mag-Math.floor(e.mag)}();return function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](Math.pow(10,r)):e.sign*Math.pow(10,r)}()}return this.sign},set:function(e){var n=this;!function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("<=")]?n.layer[Symbol.for("<=")](2):n.layer<=2}()?(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent)):this.fromMantissaExponent(e,this.e)}},{key:"e",get:function(){var e=this;return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor(function(){return void 0!==Math.sign(e.mag)&&null!==Math.sign(e.mag)&&Math.sign(e.mag)[Symbol.for("*")]?Math.sign(e.mag)[Symbol.for("*")](Math.pow(10,Math.abs(e.mag))):Math.sign(e.mag)*Math.pow(10,Math.abs(e.mag))}()):function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("*")]?e.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):e.mag*Number.POSITIVE_INFINITY}()},set:function(e){this.fromMantissaExponent(this.m,e)}},{key:"s",get:function(){return this.sign},set:function(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}},{key:"mantissa",get:function(){return this.m},set:function(e){this.m=e}},{key:"exponent",get:function(){return this.e},set:function(e){this.e=e}},{key:r,value:function(e){return this.add(e)}},{key:t,value:function(e){return this.sub(e)}},{key:l,value:function(e){return this.times(e)}},{key:i,value:function(e){return this.div(e)}},{key:u,value:function(){return this.neg()}},{key:a,value:function(e){return this.eq(e)}},{key:f,value:function(e){return this.gt(e)}},{key:c,value:function(e){return this.lt(e)}},{key:s,value:function(e){return this.gte(e)}},{key:m,value:function(e){return this.lte(e)}},{key:d,value:function(e){return this.neq(e)}},{key:"normalize",value:function(){var e=this;if(0===this.sign||0===this.mag&&0===this.layer)return this.sign=0,this.mag=0,this.layer=0,this;if(0===this.layer&&function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()&&(this.mag=function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag}(),this.sign=function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign}()),0===this.layer&&function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](N):e.mag=")]?n[Symbol.for(">=")](p):n>=p}())return e.layer=function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1}(),this.mag=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.log10(n)):o*Math.log10(n)}(),this;while(function(){return void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](h):n")]?e.layer[Symbol.for(">")](0):e.layer>0}())e.layer=function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("-")]?e.layer[Symbol.for("-")](1):e.layer-1}(),0===this.layer?this.mag=Math.pow(10,this.mag):(this.mag=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.pow(10,n)):o*Math.pow(10,n)}(),n=Math.abs(this.mag),o=Math.sign(this.mag));return 0===this.layer&&(!function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?0===this.mag&&(this.sign=0):(this.mag=function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag}(),this.sign=function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign}())),this}},{key:"fromComponents",value:function(e,n,o){return this.sign=e,this.layer=n,this.mag=o,this.normalize(),this}},{key:"fromComponents_noNormalize",value:function(e,n,o){return this.sign=e,this.layer=n,this.mag=o,this}},{key:"fromMantissaExponent",value:function(e,n){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=function(){return void 0!==n&&null!==n&&n[Symbol.for("+")]?n[Symbol.for("+")](Math.log10(e)):n+Math.log10(e)}(),this.normalize(),this}},{key:"fromMantissaExponent_noNormalize",value:function(e,n){return this.fromMantissaExponent(e,n),this}},{key:"fromDecimal",value:function(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}},{key:"fromNumber",value:function(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}},{key:"fromString",value:function(n){M?n=n.replace(",",""):Z&&(n=n.replace(",","."));var o=n.split("^^^");if(2===o.length){var r=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";"),i=1;if(2===l.length&&(i=parseFloat(l[1]),function(){return void 0!==isFinite(i)&&null!==isFinite(i)&&isFinite(i)[Symbol.for("!")]?isFinite(i)[Symbol.for("!")]():!isFinite(i)}()&&(i=1)),isFinite(r)&&isFinite(t)){var u=e.pentate(r,t,i);return this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this}}var a=n.split("^^");if(2===a.length){var f=parseFloat(a[0]),c=parseFloat(a[1]),s=a[1].split(";"),m=1;if(2===s.length&&(m=parseFloat(s[1]),function(){return void 0!==isFinite(m)&&null!==isFinite(m)&&isFinite(m)[Symbol.for("!")]?isFinite(m)[Symbol.for("!")]():!isFinite(m)}()&&(m=1)),isFinite(f)&&isFinite(c)){var d=e.tetrate(f,c,m);return this.sign=d.sign,this.layer=d.layer,this.mag=d.mag,this}}var y,b,v=n.split("^");if(2===v.length){var g=parseFloat(v[0]),p=parseFloat(v[1]);if(isFinite(g)&&isFinite(p)){var h=e.pow(g,p);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}}n=n.trim().toLowerCase();var N=n.split("pt");if(2===N.length){y=10,b=parseFloat(N[0]),N[1]=N[1].replace("(",""),N[1]=N[1].replace(")","");var k=parseFloat(N[1]);if(function(){return void 0!==isFinite(k)&&null!==isFinite(k)&&isFinite(k)[Symbol.for("!")]?isFinite(k)[Symbol.for("!")]():!isFinite(k)}()&&(k=1),isFinite(y)&&isFinite(b)){var V=e.tetrate(y,b,k);return this.sign=V.sign,this.layer=V.layer,this.mag=V.mag,this}}if(N=n.split("p"),2===N.length){y=10,b=parseFloat(N[0]),N[1]=N[1].replace("(",""),N[1]=N[1].replace(")","");var x=parseFloat(N[1]);if(function(){return void 0!==isFinite(x)&&null!==isFinite(x)&&isFinite(x)[Symbol.for("!")]?isFinite(x)[Symbol.for("!")]():!isFinite(x)}()&&(x=1),isFinite(y)&&isFinite(b)){var C=e.tetrate(y,b,x);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,this}}var w=n.split("e"),B=function(){return void 0!==w.length&&null!==w.length&&w.length[Symbol.for("-")]?w.length[Symbol.for("-")](1):w.length-1}();if(0===B){var P=parseFloat(n);if(isFinite(P))return this.fromNumber(P)}else if(1===B){var F=parseFloat(n);if(isFinite(F)&&function(){return void 0!==F&&null!==F&&F[Symbol.for("!==")]?F[Symbol.for("!==")](0):0!==F}())return this.fromNumber(F)}var I=n.split("e^");if(2===I.length){this.sign=1,function(){return void 0!==I[0].charAt(0)&&null!==I[0].charAt(0)&&I[0].charAt(0)[Symbol.for("==")]?I[0].charAt(0)[Symbol.for("==")]("-"):"-"==I[0].charAt(0)}()&&(this.sign=function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}());for(var R="",O=0;function(){return void 0!==O&&null!==O&&O[Symbol.for("<")]?O[Symbol.for("<")](I[1].length):O=")]?_[Symbol.for(">=")](43):_>=43}()&&function(){return void 0!==_&&null!==_&&_[Symbol.for("<=")]?_[Symbol.for("<=")](57):_<=57}()||101===_))return this.layer=parseFloat(R),this.mag=parseFloat(I[1].substr(function(){return void 0!==O&&null!==O&&O[Symbol.for("+")]?O[Symbol.for("+")](1):O+1}())),this.normalize(),this;R=function(){return void 0!==R&&null!==R&&R[Symbol.for("+")]?R[Symbol.for("+")](I[1].charAt(O)):R+I[1].charAt(O)}()}}if(function(){return void 0!==B&&null!==B&&B[Symbol.for("<")]?B[Symbol.for("<")](1):B<1}())return this.sign=0,this.layer=0,this.mag=0,this;var j=parseFloat(w[0]);if(0===j)return this.sign=0,this.layer=0,this.mag=0,this;var A=parseFloat(w[function(){return void 0!==w.length&&null!==w.length&&w.length[Symbol.for("-")]?w.length[Symbol.for("-")](1):w.length-1}()]);if(function(){return void 0!==B&&null!==B&&B[Symbol.for(">=")]?B[Symbol.for(">=")](2):B>=2}()){var U=parseFloat(w[function(){return void 0!==w.length&&null!==w.length&&w.length[Symbol.for("-")]?w.length[Symbol.for("-")](2):w.length-2}()]);isFinite(U)&&(A=function(){return void 0!==A&&null!==A&&A[Symbol.for("*")]?A[Symbol.for("*")](Math.sign(U)):A*Math.sign(U)}(),A=function(){return void 0!==A&&null!==A&&A[Symbol.for("+")]?A[Symbol.for("+")](D(U)):A+D(U)}())}if(function(){return void 0!==isFinite(j)&&null!==isFinite(j)&&isFinite(j)[Symbol.for("!")]?isFinite(j)[Symbol.for("!")]():!isFinite(j)}())this.sign="-"===w[0]?function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}():1,this.layer=B,this.mag=A;else if(1===B)this.sign=Math.sign(j),this.layer=1,this.mag=function(){return void 0!==A&&null!==A&&A[Symbol.for("+")]?A[Symbol.for("+")](Math.log10(Math.abs(j))):A+Math.log10(Math.abs(j))}();else{if(this.sign=Math.sign(j),this.layer=B,2===B){var q=e.mul(T(1,2,A),E(j));return this.sign=q.sign,this.layer=q.layer,this.mag=q.mag,this}this.mag=A}return this.normalize(),this}},{key:"fromValue",value:function(n){return n instanceof e||function(){return void 0!==n&&null!==n&&n[Symbol.for("!=")]?n[Symbol.for("!=")](null):null!=n}()&&"object"===(0,S.Z)(n)&&function(){return"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](n):"sign"in n}()&&function(){return"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](n):"mag"in n}()&&function(){return"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](n):"layer"in n}()?this.fromDecimal(n):"number"===typeof n?this.fromNumber(n):"string"===typeof n?this.fromString(n):(this.sign=0,this.layer=0,this.mag=0,this)}},{key:"toNumber",value:function(){var e=this;return function(){return void 0!==Number.isFinite(e.layer)&&null!==Number.isFinite(e.layer)&&Number.isFinite(e.layer)[Symbol.for("!")]?Number.isFinite(e.layer)[Symbol.for("!")]():!Number.isFinite(e.layer)}()?Number.NaN:0===this.layer?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}():1===this.layer?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](Math.pow(10,e.mag)):e.sign*Math.pow(10,e.mag)}():function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">")]?e.mag[Symbol.for(">")](0):e.mag>0}()?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for(">")]?e.sign[Symbol.for(">")](0):e.sign>0}()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}},{key:"mantissaWithDecimalPlaces",value:function(e){return isNaN(this.m)?Number.NaN:0===this.m?0:I(this.m,e)}},{key:"magnitudeWithDecimalPlaces",value:function(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:I(this.mag,e)}},{key:"toString",value:function(){var e=this;return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?1===this.sign?"Infinity":"-Infinity":0===this.layer?function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e21):e.mag<1e21}()&&function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">")]?e.mag[Symbol.for(">")](1e-7):e.mag>1e-7}()||0===this.mag?function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}().toString():function(){return e.m+"e"!==void 0&&e.m+"e"!==null&&(e.m+"e")[Symbol.for("+")]?(e.m+"e")[Symbol.for("+")](e.e):e.m+"e"+e.e}():1===this.layer?function(){return e.m+"e"!==void 0&&e.m+"e"!==null&&(e.m+"e")[Symbol.for("+")]?(e.m+"e")[Symbol.for("+")](e.e):e.m+"e"+e.e}():function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("<=")]?e.layer[Symbol.for("<=")](x):e.layer<=x}()?function(){return(-1===e.sign?"-":"")+"e".repeat(e.layer)!==void 0&&(-1===e.sign?"-":"")+"e".repeat(e.layer)!==null&&((-1===e.sign?"-":"")+"e".repeat(e.layer))[Symbol.for("+")]?((-1===e.sign?"-":"")+"e".repeat(e.layer))[Symbol.for("+")](e.mag):(-1===e.sign?"-":"")+"e".repeat(e.layer)+e.mag}():function(){return(-1===e.sign?"-":"")+"(e^"+e.layer+")"!==void 0&&(-1===e.sign?"-":"")+"(e^"+e.layer+")"!==null&&((-1===e.sign?"-":"")+"(e^"+e.layer+")")[Symbol.for("+")]?((-1===e.sign?"-":"")+"(e^"+e.layer+")")[Symbol.for("+")](e.mag):(-1===e.sign?"-":"")+"(e^"+e.layer+")"+e.mag}()}},{key:"toExponential",value:function(e){var n=this;return 0===this.layer?function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}().toExponential(e):this.toStringWithDecimalPlaces(e)}},{key:"toFixed",value:function(e){var n=this;return 0===this.layer?function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}().toFixed(e):this.toStringWithDecimalPlaces(e)}},{key:"toPrecision",value:function(e){var n=this;return function(){return void 0!==n.e&&null!==n.e&&n.e[Symbol.for("<=")]?n.e[Symbol.for("<=")](-7):n.e<=-7}()?this.toExponential(function(){return void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1}()):function(){return void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](n.e):e>n.e}()?this.toFixed(function(){return e-n.exponent!==void 0&&e-n.exponent!==null&&(e-n.exponent)[Symbol.for("-")]?(e-n.exponent)[Symbol.for("-")](1):e-n.exponent-1}()):this.toExponential(function(){return void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1}())}},{key:"valueOf",value:function(){return this.toString()}},{key:"toJSON",value:function(){return this.toString()}},{key:"toStringWithDecimalPlaces",value:function(e){var n=this;return 0===this.layer?function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](1e21):n.mag<1e21}()&&function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for(">")]?n.mag[Symbol.for(">")](1e-7):n.mag>1e-7}()||0===this.mag?function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}().toFixed(e):function(){return I(n.m,e)+"e"!==void 0&&I(n.m,e)+"e"!==null&&(I(n.m,e)+"e")[Symbol.for("+")]?(I(n.m,e)+"e")[Symbol.for("+")](I(n.e,e)):I(n.m,e)+"e"+I(n.e,e)}():1===this.layer?function(){return I(n.m,e)+"e"!==void 0&&I(n.m,e)+"e"!==null&&(I(n.m,e)+"e")[Symbol.for("+")]?(I(n.m,e)+"e")[Symbol.for("+")](I(n.e,e)):I(n.m,e)+"e"+I(n.e,e)}():function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("<=")]?n.layer[Symbol.for("<=")](x):n.layer<=x}()?function(){return(-1===n.sign?"-":"")+"e".repeat(n.layer)!==void 0&&(-1===n.sign?"-":"")+"e".repeat(n.layer)!==null&&((-1===n.sign?"-":"")+"e".repeat(n.layer))[Symbol.for("+")]?((-1===n.sign?"-":"")+"e".repeat(n.layer))[Symbol.for("+")](I(n.mag,e)):(-1===n.sign?"-":"")+"e".repeat(n.layer)+I(n.mag,e)}():function(){return(-1===n.sign?"-":"")+"(e^"+n.layer+")"!==void 0&&(-1===n.sign?"-":"")+"(e^"+n.layer+")"!==null&&((-1===n.sign?"-":"")+"(e^"+n.layer+")")[Symbol.for("+")]?((-1===n.sign?"-":"")+"(e^"+n.layer+")")[Symbol.for("+")](I(n.mag,e)):(-1===n.sign?"-":"")+"(e^"+n.layer+")"+I(n.mag,e)}()}},{key:"abs",value:function(){return F(0===this.sign?0:1,this.layer,this.mag)}},{key:"neg",value:function(){var e=this;return F(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign}(),this.layer,this.mag)}},{key:"negate",value:function(){return this.neg()}},{key:"negated",value:function(){return this.neg()}},{key:"sgn",value:function(){return this.sign}},{key:"round",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.round(this.mag)):this}},{key:"floor",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.floor(this.mag)):this}},{key:"ceil",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.ceil(this.mag)):this}},{key:"trunc",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dZero:0===this.layer?T(this.sign,0,Math.trunc(this.mag)):this}},{key:"add",value:function(n){var o,r,t=this,l=E(n);if(function(){return void 0!==Number.isFinite(t.layer)&&null!==Number.isFinite(t.layer)&&Number.isFinite(t.layer)[Symbol.for("!")]?Number.isFinite(t.layer)[Symbol.for("!")]():!Number.isFinite(t.layer)}())return this;if(function(){return void 0!==Number.isFinite(l.layer)&&null!==Number.isFinite(l.layer)&&Number.isFinite(l.layer)[Symbol.for("!")]?Number.isFinite(l.layer)[Symbol.for("!")]():!Number.isFinite(l.layer)}())return l;if(0===this.sign)return l;if(0===l.sign)return this;if(this.sign===function(){return void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("minus")]?l.sign[Symbol.for("minus")]():-l.sign}()&&this.layer===l.layer&&this.mag===l.mag)return F(0,0,0);if(function(){return void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for(">=")]?t.layer[Symbol.for(">=")](2):t.layer>=2}()||function(){return void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for(">=")]?l.layer[Symbol.for(">=")](2):l.layer>=2}())return this.maxabs(l);if(!function(){return void 0!==e.cmpabs(t,l)&&null!==e.cmpabs(t,l)&&e.cmpabs(t,l)[Symbol.for(">")]?e.cmpabs(t,l)[Symbol.for(">")](0):e.cmpabs(t,l)>0}()?(o=l,r=this):(o=this,r=l),0===o.layer&&0===r.layer)return E(function(){return o.sign*o.mag!==void 0&&o.sign*o.mag!==null&&(o.sign*o.mag)[Symbol.for("+")]?(o.sign*o.mag)[Symbol.for("+")](r.sign*r.mag):o.sign*o.mag+r.sign*r.mag}());var i=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("*")]?o.layer[Symbol.for("*")](Math.sign(o.mag)):o.layer*Math.sign(o.mag)}(),u=function(){return void 0!==r.layer&&null!==r.layer&&r.layer[Symbol.for("*")]?r.layer[Symbol.for("*")](Math.sign(r.mag)):r.layer*Math.sign(r.mag)}();if(function(){return i-u!==void 0&&i-u!==null&&(i-u)[Symbol.for(">=")]?(i-u)[Symbol.for(">=")](2):i-u>=2}())return o;if(0===i&&u===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()){if(function(){return void 0!==Math.abs(r.mag-Math.log10(o.mag))&&null!==Math.abs(r.mag-Math.log10(o.mag))&&Math.abs(r.mag-Math.log10(o.mag))[Symbol.for(">")]?Math.abs(r.mag-Math.log10(o.mag))[Symbol.for(">")](g):Math.abs(r.mag-Math.log10(o.mag))>g}())return o;var a=Math.pow(10,function(){return void 0!==Math.log10(o.mag)&&null!==Math.log10(o.mag)&&Math.log10(o.mag)[Symbol.for("-")]?Math.log10(o.mag)[Symbol.for("-")](r.mag):Math.log10(o.mag)-r.mag}()),f=function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("+")]?r.sign[Symbol.for("+")](o.sign*a):r.sign+o.sign*a}();return T(Math.sign(f),1,function(){return void 0!==r.mag&&null!==r.mag&&r.mag[Symbol.for("+")]?r.mag[Symbol.for("+")](Math.log10(Math.abs(f))):r.mag+Math.log10(Math.abs(f))}())}if(1===i&&0===u){if(function(){return void 0!==Math.abs(o.mag-Math.log10(r.mag))&&null!==Math.abs(o.mag-Math.log10(r.mag))&&Math.abs(o.mag-Math.log10(r.mag))[Symbol.for(">")]?Math.abs(o.mag-Math.log10(r.mag))[Symbol.for(">")](g):Math.abs(o.mag-Math.log10(r.mag))>g}())return o;var c=Math.pow(10,function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("-")]?o.mag[Symbol.for("-")](Math.log10(r.mag)):o.mag-Math.log10(r.mag)}()),s=function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("+")]?r.sign[Symbol.for("+")](o.sign*c):r.sign+o.sign*c}();return T(Math.sign(s),1,function(){return void 0!==Math.log10(r.mag)&&null!==Math.log10(r.mag)&&Math.log10(r.mag)[Symbol.for("+")]?Math.log10(r.mag)[Symbol.for("+")](Math.log10(Math.abs(s))):Math.log10(r.mag)+Math.log10(Math.abs(s))}())}if(function(){return void 0!==Math.abs(o.mag-r.mag)&&null!==Math.abs(o.mag-r.mag)&&Math.abs(o.mag-r.mag)[Symbol.for(">")]?Math.abs(o.mag-r.mag)[Symbol.for(">")](g):Math.abs(o.mag-r.mag)>g}())return o;var m=Math.pow(10,function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("-")]?o.mag[Symbol.for("-")](r.mag):o.mag-r.mag}()),d=function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("+")]?r.sign[Symbol.for("+")](o.sign*m):r.sign+o.sign*m}();return T(Math.sign(d),1,function(){return void 0!==r.mag&&null!==r.mag&&r.mag[Symbol.for("+")]?r.mag[Symbol.for("+")](Math.log10(Math.abs(d))):r.mag+Math.log10(Math.abs(d))}())}},{key:"plus",value:function(e){return this.add(e)}},{key:"sub",value:function(e){return this.add(E(e).neg())}},{key:"subtract",value:function(e){return this.sub(e)}},{key:"minus",value:function(e){return this.sub(e)}},{key:"mul",value:function(e){var n,o,r=this,t=E(e);if(function(){return void 0!==Number.isFinite(r.layer)&&null!==Number.isFinite(r.layer)&&Number.isFinite(r.layer)[Symbol.for("!")]?Number.isFinite(r.layer)[Symbol.for("!")]():!Number.isFinite(r.layer)}())return this;if(function(){return void 0!==Number.isFinite(t.layer)&&null!==Number.isFinite(t.layer)&&Number.isFinite(t.layer)[Symbol.for("!")]?Number.isFinite(t.layer)[Symbol.for("!")]():!Number.isFinite(t.layer)}())return t;if(0===this.sign||0===t.sign)return F(0,0,0);if(this.layer===t.layer&&this.mag===function(){return void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("minus")]?t.mag[Symbol.for("minus")]():-t.mag}())return F(function(){return void 0!==r.sign&&null!==r.sign&&r.sign[Symbol.for("*")]?r.sign[Symbol.for("*")](t.sign):r.sign*t.sign}(),0,1);if(function(){return void 0!==r.layer&&null!==r.layer&&r.layer[Symbol.for(">")]?r.layer[Symbol.for(">")](t.layer):r.layer>t.layer}()||function(){return void 0!==r.layer&&null!==r.layer&&r.layer[Symbol.for("==")]?r.layer[Symbol.for("==")](t.layer):r.layer==t.layer}()&&function(){return void 0!==Math.abs(r.mag)&&null!==Math.abs(r.mag)&&Math.abs(r.mag)[Symbol.for(">")]?Math.abs(r.mag)[Symbol.for(">")](Math.abs(t.mag)):Math.abs(r.mag)>Math.abs(t.mag)}()?(n=this,o=t):(n=t,o=this),0===n.layer&&0===o.layer)return E(function(){return n.sign*o.sign*n.mag!==void 0&&n.sign*o.sign*n.mag!==null&&(n.sign*o.sign*n.mag)[Symbol.for("*")]?(n.sign*o.sign*n.mag)[Symbol.for("*")](o.mag):n.sign*o.sign*n.mag*o.mag}());if(function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for(">=")]?n.layer[Symbol.for(">=")](3):n.layer>=3}()||function(){return n.layer-o.layer!==void 0&&n.layer-o.layer!==null&&(n.layer-o.layer)[Symbol.for(">=")]?(n.layer-o.layer)[Symbol.for(">=")](2):n.layer-o.layer>=2}())return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),n.layer,n.mag);if(1===n.layer&&0===o.layer)return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),1,function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("+")]?n.mag[Symbol.for("+")](Math.log10(o.mag)):n.mag+Math.log10(o.mag)}());if(1===n.layer&&1===o.layer)return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),1,function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("+")]?n.mag[Symbol.for("+")](o.mag):n.mag+o.mag}());if(2===n.layer&&1===o.layer){var l=T(Math.sign(n.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(n.mag)).add(T(Math.sign(o.mag),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1}(),Math.abs(o.mag)));return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),function(){return void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("+")]?l.layer[Symbol.for("+")](1):l.layer+1}(),function(){return void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("*")]?l.sign[Symbol.for("*")](l.mag):l.sign*l.mag}())}if(2===n.layer&&2===o.layer){var i=T(Math.sign(n.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(n.mag)).add(T(Math.sign(o.mag),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1}(),Math.abs(o.mag)));return T(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](o.sign):n.sign*o.sign}(),function(){return void 0!==i.layer&&null!==i.layer&&i.layer[Symbol.for("+")]?i.layer[Symbol.for("+")](1):i.layer+1}(),function(){return void 0!==i.sign&&null!==i.sign&&i.sign[Symbol.for("*")]?i.sign[Symbol.for("*")](i.mag):i.sign*i.mag}())}throw Error(function(){return"Bad arguments to mul: "+r+", "!==void 0&&"Bad arguments to mul: "+r+", "!==null&&("Bad arguments to mul: "+r+", ")[Symbol.for("+")]?("Bad arguments to mul: "+r+", ")[Symbol.for("+")](e):"Bad arguments to mul: "+r+", "+e}())}},{key:"multiply",value:function(e){return this.mul(e)}},{key:"times",value:function(e){return this.mul(e)}},{key:"div",value:function(e){var n=E(e);return this.mul(n.recip())}},{key:"divide",value:function(e){return this.div(e)}},{key:"divideBy",value:function(e){return this.div(e)}},{key:"dividedBy",value:function(e){return this.div(e)}},{key:"recip",value:function(){var n=this;return 0===this.mag?e.dNaN:0===this.layer?T(this.sign,0,function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](n.mag):1/n.mag}()):T(this.sign,this.layer,function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("minus")]?n.mag[Symbol.for("minus")]():-n.mag}())}},{key:"reciprocal",value:function(){return this.recip()}},{key:"reciprocate",value:function(){return this.recip()}},{key:"cmp",value:function(e){var n=this,o=E(e);return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for(">")]?n.sign[Symbol.for(">")](o.sign):n.sign>o.sign}()?1:function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<")]?n.sign[Symbol.for("<")](o.sign):n.sign")]?n.mag[Symbol.for(">")](0):n.mag>0}()?this.layer:function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("minus")]?n.layer[Symbol.for("minus")]():-n.layer}(),t=function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">")]?o.mag[Symbol.for(">")](0):o.mag>0}()?o.layer:function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("minus")]?o.layer[Symbol.for("minus")]():-o.layer}();return function(){return void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](t):r>t}()?1:function(){return void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](t):r")]?n.mag[Symbol.for(">")](o.mag):n.mag>o.mag}()?1:function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](o.mag):n.mag")]?n.cmpabs(o)[Symbol.for(">")](0):n.cmpabs(o)>0}()?o:this}},{key:"clamp",value:function(e,n){return this.max(e).min(n)}},{key:"clampMin",value:function(e){return this.max(e)}},{key:"clampMax",value:function(e){return this.min(e)}},{key:"cmp_tolerance",value:function(e,n){var o=E(e);return this.eq_tolerance(o,n)?0:this.cmp(o)}},{key:"compare_tolerance",value:function(e,n){return this.cmp_tolerance(e,n)}},{key:"eq_tolerance",value:function(e,n){var o=this,r=E(e);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&(n=1e-7),function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("!==")]?o.sign[Symbol.for("!==")](r.sign):o.sign!==r.sign}())return!1;if(function(){return void 0!==Math.abs(o.layer-r.layer)&&null!==Math.abs(o.layer-r.layer)&&Math.abs(o.layer-r.layer)[Symbol.for(">")]?Math.abs(o.layer-r.layer)[Symbol.for(">")](1):Math.abs(o.layer-r.layer)>1}())return!1;var t=this.mag,l=r.mag;return function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](r.layer):o.layer>r.layer}()&&(l=D(l)),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](r.layer):o.layer")]?n.layer[Symbol.for(">")](0):n.layer>0}()?T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag)):T(1,0,Math.log10(this.mag))}},{key:"log10",value:function(){var n=this;return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()?e.dNaN:function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for(">")]?n.layer[Symbol.for(">")](0):n.layer>0}()?T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag)):T(this.sign,0,Math.log10(this.mag))}},{key:"log",value:function(n){var o=this;return n=E(n),function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("<=")]?o.sign[Symbol.for("<=")](0):o.sign<=0}()||function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()||1===n.sign&&0===n.layer&&1===n.mag?e.dNaN:0===this.layer&&0===n.layer?T(this.sign,0,function(){return void 0!==Math.log(o.mag)&&null!==Math.log(o.mag)&&Math.log(o.mag)[Symbol.for("/")]?Math.log(o.mag)[Symbol.for("/")](Math.log(n.mag)):Math.log(o.mag)/Math.log(n.mag)}()):e.div(this.log10(),n.log10())}},{key:"log2",value:function(){var n=this;return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()?e.dNaN:0===this.layer?T(this.sign,0,Math.log2(this.mag)):1===this.layer?T(Math.sign(this.mag),0,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("*")]?Math.abs(n.mag)[Symbol.for("*")](3.321928094887362):3.321928094887362*Math.abs(n.mag)}()):2===this.layer?T(Math.sign(this.mag),1,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("+")]?Math.abs(n.mag)[Symbol.for("+")](.5213902276543247):Math.abs(n.mag)+.5213902276543247}()):T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag))}},{key:"ln",value:function(){var n=this;return function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("<=")]?n.sign[Symbol.for("<=")](0):n.sign<=0}()?e.dNaN:0===this.layer?T(this.sign,0,Math.log(this.mag)):1===this.layer?T(Math.sign(this.mag),0,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("*")]?Math.abs(n.mag)[Symbol.for("*")](2.302585092994046):2.302585092994046*Math.abs(n.mag)}()):2===this.layer?T(Math.sign(this.mag),1,function(){return void 0!==Math.abs(n.mag)&&null!==Math.abs(n.mag)&&Math.abs(n.mag)[Symbol.for("+")]?Math.abs(n.mag)[Symbol.for("+")](.36221568869946325):Math.abs(n.mag)+.36221568869946325}()):T(Math.sign(this.mag),function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),Math.abs(this.mag))}},{key:"logarithm",value:function(e){return this.log(e)}},{key:"pow",value:function(n){var o=E(n),r=this,t=o;if(0===r.sign)return t.eq(0)?F(1,0,1):r;if(1===r.sign&&0===r.layer&&1===r.mag)return r;if(0===t.sign)return F(1,0,1);if(1===t.sign&&0===t.layer&&1===t.mag)return r;var l=r.absLog10().mul(t).pow10();return this.sign===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()?1===function(){return void 0!==Math.abs(t.toNumber()%2)&&null!==Math.abs(t.toNumber()%2)&&Math.abs(t.toNumber()%2)[Symbol.for("%")]?Math.abs(t.toNumber()%2)[Symbol.for("%")](2):Math.abs(t.toNumber()%2)%2}()?l.neg():0===function(){return void 0!==Math.abs(t.toNumber()%2)&&null!==Math.abs(t.toNumber()%2)&&Math.abs(t.toNumber()%2)[Symbol.for("%")]?Math.abs(t.toNumber()%2)[Symbol.for("%")](2):Math.abs(t.toNumber()%2)%2}()?l:e.dNaN:l}},{key:"pow10",value:function(){var n=this;if(function(){return void 0!==Number.isFinite(n.layer)&&null!==Number.isFinite(n.layer)&&Number.isFinite(n.layer)[Symbol.for("!")]?Number.isFinite(n.layer)[Symbol.for("!")]():!Number.isFinite(n.layer)}()||function(){return void 0!==Number.isFinite(n.mag)&&null!==Number.isFinite(n.mag)&&Number.isFinite(n.mag)[Symbol.for("!")]?Number.isFinite(n.mag)[Symbol.for("!")]():!Number.isFinite(n.mag)}())return e.dNaN;var o=this;if(0===o.layer){var r=Math.pow(10,function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("*")]?o.sign[Symbol.for("*")](o.mag):o.sign*o.mag}());if(Number.isFinite(r)&&function(){return void 0!==Math.abs(r)&&null!==Math.abs(r)&&Math.abs(r)[Symbol.for(">=")]?Math.abs(r)[Symbol.for(">=")](.1):Math.abs(r)>=.1}())return T(1,0,r);if(0===o.sign)return e.dOne;o=F(o.sign,function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),Math.log10(o.mag))}return function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for(">")]?o.sign[Symbol.for(">")](0):o.sign>0}()&&function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">=")]?o.mag[Symbol.for(">=")](0):o.mag>=0}()?T(o.sign,function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),o.mag):function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("<")]?o.sign[Symbol.for("<")](0):o.sign<0}()&&function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">=")]?o.mag[Symbol.for(">=")](0):o.mag>=0}()?T(function(){return void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("minus")]?o.sign[Symbol.for("minus")]():-o.sign}(),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag}()):e.dOne}},{key:"pow_base",value:function(e){return E(e).pow(this)}},{key:"root",value:function(e){var n=E(e);return this.pow(n.recip())}},{key:"factorial",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()||0===this.layer?this.add(1).gamma():1===this.layer?e.exp(e.mul(this,e.ln(this).sub(1))):e.exp(this)}},{key:"gamma",value:function(){var n=this;if(function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}())return this.recip();if(0===this.layer){if(this.lt(F(1,0,24)))return E(R(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}()));var o=function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("-")]?n.mag[Symbol.for("-")](1):n.mag-1}(),r=.9189385332046727;r=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")]((o+.5)*Math.log(o)):r+(o+.5)*Math.log(o)}(),r=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](o):r-o}();var t=function(){return void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](o):o*o}(),l=o,i=function(){return 12[Symbol.for("*")]?12[Symbol.for("*")](l):12*l}(),u=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}(),a=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")](u):r+u}();if(a===r)return e.exp(r);if(r=a,l=function(){return void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t}(),i=function(){return 360[Symbol.for("*")]?360[Symbol.for("*")](l):360*l}(),u=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}(),a=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](u):r-u}(),a===r)return e.exp(r);r=a,l=function(){return void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t}(),i=function(){return 1260[Symbol.for("*")]?1260[Symbol.for("*")](l):1260*l}();var f=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}();return r=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")](f):r+f}(),l=function(){return void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t}(),i=function(){return 1680[Symbol.for("*")]?1680[Symbol.for("*")](l):1680*l}(),f=function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](i):1/i}(),r=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](f):r-f}(),e.exp(r)}return 1===this.layer?e.exp(e.mul(this,e.ln(this).sub(1))):e.exp(this)}},{key:"lngamma",value:function(){return this.gamma().ln()}},{key:"exp",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dOne:0===this.layer&&function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<=")]?n.mag[Symbol.for("<=")](709.7):n.mag<=709.7}()?E(Math.exp(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}())):0===this.layer?T(1,1,function(){return n.sign*Math.log10(Math.E)!==void 0&&n.sign*Math.log10(Math.E)!==null&&(n.sign*Math.log10(Math.E))[Symbol.for("*")]?(n.sign*Math.log10(Math.E))[Symbol.for("*")](n.mag):n.sign*Math.log10(Math.E)*n.mag}()):1===this.layer?T(1,2,function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](Math.log10(.4342944819032518)+n.mag):n.sign*(Math.log10(.4342944819032518)+n.mag)}()):T(1,function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("+")]?n.layer[Symbol.for("+")](1):n.layer+1}(),function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}())}},{key:"sqr",value:function(){return this.pow(2)}},{key:"sqrt",value:function(){var n=this;if(0===this.layer)return E(Math.sqrt(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}()));if(1===this.layer)return T(1,2,function(){return void 0!==Math.log10(n.mag)&&null!==Math.log10(n.mag)&&Math.log10(n.mag)[Symbol.for("-")]?Math.log10(n.mag)[Symbol.for("-")](.3010299956639812):Math.log10(n.mag)-.3010299956639812}());var o=e.div(F(this.sign,function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for("-")]?n.layer[Symbol.for("-")](1):n.layer-1}(),this.mag),F(1,0,2));return o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](1):o.layer+1}(),o.normalize(),o}},{key:"cube",value:function(){return this.pow(3)}},{key:"cbrt",value:function(){return this.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](3):1/3}())}},{key:"tetrate",value:function(){var n=arguments,o=this,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:2,t=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:F(1,0,1);if(1===r)return e.pow(this,t);if(0===r)return new e(t);if(this.eq(e.dOne))return e.dOne;if(this.eq(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()))return e.pow(this,t);if(r===Number.POSITIVE_INFINITY){var l=this.toNumber();if(function(){return void 0!==l&&null!==l&&l[Symbol.for("<=")]?l[Symbol.for("<=")](1.444667861009766):l<=1.444667861009766}()&&function(){return void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](.06598803584531254):l>=.06598803584531254}()){if(function(){return void 0!==l&&null!==l&&l[Symbol.for(">")]?l[Symbol.for(">")](1.444667861009099):l>1.444667861009099}())return new e(Math.E);var i=e.ln(this).neg();return i.lambertw().div(i)}return function(){return void 0!==l&&null!==l&&l[Symbol.for(">")]?l[Symbol.for(">")](1.444667861009766):l>1.444667861009766}()?new e(Number.POSITIVE_INFINITY):e.dNaN}if(this.eq(e.dZero)){var u=Math.abs(function(){return r+1!==void 0&&r+1!==null&&(r+1)[Symbol.for("%")]?(r+1)[Symbol.for("%")](2):(r+1)%2}());return function(){return void 0!==u&&null!==u&&u[Symbol.for(">")]?u[Symbol.for(">")](1):u>1}()&&(u=function(){return 2[Symbol.for("-")]?2[Symbol.for("-")](u):2-u}()),new e(u)}if(function(){return void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](0):r<0}())return e.iteratedlog(t,this,function(){return void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r}());t=E(t);var a=r;r=Math.trunc(r);var f=function(){return void 0!==a&&null!==a&&a[Symbol.for("-")]?a[Symbol.for("-")](r):a-r}();if(this.gt(e.dZero)&&this.lte(1.444667861009766)){r=Math.min(1e4,r);for(var c=0;function(){return void 0!==c&&null!==c&&c[Symbol.for("<")]?c[Symbol.for("<")](r):c")]?(t.layer-o.layer)[Symbol.for(">")](3):t.layer-o.layer>3}())return F(t.sign,function(){return void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("+")]?t.layer[Symbol.for("+")](r-d-1):t.layer+(r-d-1)}(),t.mag);if(function(){return void 0!==d&&null!==d&&d[Symbol.for(">")]?d[Symbol.for(">")](1e4):d>1e4}())return t}return t}},{key:"iteratedexp",value:function(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:2,o=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](1):e.length>1}()&&function(){return void 0!==e[1]&&null!==e[1]&&e[1][Symbol.for("!==")]?e[1][Symbol.for("!==")](void 0):void 0!==e[1]}()?arguments[1]:F(1,0,1);return this.tetrate(n,o)}},{key:"iteratedlog",value:function(){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:10,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:1;if(function(){return void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](0):r<0}())return e.tetrate(o,function(){return void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r}(),this);o=E(o);var t=E(this),l=r;r=Math.trunc(r);var i=function(){return void 0!==l&&null!==l&&l[Symbol.for("-")]?l[Symbol.for("-")](r):l-r}();if(function(){return t.layer-o.layer!==void 0&&t.layer-o.layer!==null&&(t.layer-o.layer)[Symbol.for(">")]?(t.layer-o.layer)[Symbol.for(">")](3):t.layer-o.layer>3}()){var u=Math.min(r,function(){return t.layer-o.layer!==void 0&&t.layer-o.layer!==null&&(t.layer-o.layer)[Symbol.for("-")]?(t.layer-o.layer)[Symbol.for("-")](3):t.layer-o.layer-3}());r=function(){return void 0!==r&&null!==r&&r[Symbol.for("-")]?r[Symbol.for("-")](u):r-u}(),t.layer=function(){return void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](u):t.layer-u}()}for(var a=0;function(){return void 0!==a&&null!==a&&a[Symbol.for("<")]?a[Symbol.for("<")](r):a")]?a[Symbol.for(">")](1e4):a>1e4}())return t}return function(){return void 0!==i&&null!==i&&i[Symbol.for(">")]?i[Symbol.for(">")](0):i>0}()&&function(){return void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](1):i<1}()&&(t=o.eq(10)?t.layeradd10(function(){return void 0!==i&&null!==i&&i[Symbol.for("minus")]?i[Symbol.for("minus")]():-i}()):t.layeradd(function(){return void 0!==i&&null!==i&&i[Symbol.for("minus")]?i[Symbol.for("minus")]():-i}(),o)),t}},{key:"slog",value:function(){var n=arguments,o=this,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:10;if(r=E(r),r.lte(e.dZero))return e.dNaN;if(r.eq(e.dOne))return e.dNaN;if(r.lt(e.dOne))return this.eq(e.dOne)?e.dZero:this.eq(e.dZero)?e.dNegOne:e.dNaN;if(function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0}()||this.eq(e.dZero))return e.dNegOne;var t=0,l=E(this);if(function(){return l.layer-r.layer!==void 0&&l.layer-r.layer!==null&&(l.layer-r.layer)[Symbol.for(">")]?(l.layer-r.layer)[Symbol.for(">")](3):l.layer-r.layer>3}()){var i=function(){return l.layer-r.layer!==void 0&&l.layer-r.layer!==null&&(l.layer-r.layer)[Symbol.for("-")]?(l.layer-r.layer)[Symbol.for("-")](3):l.layer-r.layer-3}();t=function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](i):t+i}(),l.layer=function(){return void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](i):l.layer-i}()}for(var u=0;function(){return void 0!==u&&null!==u&&u[Symbol.for("<")]?u[Symbol.for("<")](100):u<100}();function(){return void 0!==u&&null!==u&&"object"===(0,S.Z)(u)&&u[Symbol.for("prefix-increment")]?u[Symbol.for("prefix-increment")]():++u}())if(l.lt(e.dZero))l=e.pow(r,l),t=function(){return void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](1):t-1}();else{if(l.lte(e.dOne))return E(function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](e.slog_critical(r.toNumber(),l.toNumber())):t+e.slog_critical(r.toNumber(),l.toNumber())}());t=function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1):t+1}(),l=e.log(l,r)}return E(t)}},{key:"layeradd10",value:function(n){n=e.fromValue_noAlloc(n).toNumber();var o=E(this);if(function(){return void 0!==n&&null!==n&&n[Symbol.for(">=")]?n[Symbol.for(">=")](1):n>=1}()){(function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0})()&&function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](0):o.layer>0}()?(o.sign=0,o.mag=0,o.layer=0):o.sign===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()&&function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("==")]?o.layer[Symbol.for("==")](0):0==o.layer}()&&(o.sign=1,o.mag=function(){return void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag}());var r=Math.trunc(n);n=function(){return void 0!==n&&null!==n&&n[Symbol.for("-")]?n[Symbol.for("-")](r):n-r}(),o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](r):o.layer+r}()}if(function(){return void 0!==n&&null!==n&&n[Symbol.for("<=")]?n[Symbol.for("<=")](-1):n<=-1}()){var t=Math.trunc(n);if(n=function(){return void 0!==n&&null!==n&&n[Symbol.for("-")]?n[Symbol.for("-")](t):n-t}(),o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t}(),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0}())for(var l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100}();function(){return void 0!==l&&null!==l&&"object"===(0,S.Z)(l)&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l}()){if(function(){void 0!==o.layer&&null!==o.layer&&"object"===(0,S.Z)(o.layer)&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++}(),o.mag=Math.log10(o.mag),function(){return void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag)}())return 0===o.sign&&(o.sign=1),function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0}()&&(o.layer=0),o.normalize();if(function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](0):o.layer>=0}())break}}while(function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0}())(function(){void 0!==o.layer&&null!==o.layer&&"object"===(0,S.Z)(o.layer)&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag);return 0===o.sign&&(o.sign=1,0===o.mag&&function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](1):o.layer>=1}()&&(o.layer=function(){return void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1}(),o.mag=1)),o.normalize(),function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](0):0!==n}()?o.layeradd(n,10):o}},{key:"layeradd",value:function(n,o){var r=this.slog(o).toNumber(),t=function(){return void 0!==r&&null!==r&&r[Symbol.for("+")]?r[Symbol.for("+")](n):r+n}();return function(){return void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](0):t>=0}()?e.tetrate(o,t):function(){return void 0!==Number.isFinite(t)&&null!==Number.isFinite(t)&&Number.isFinite(t)[Symbol.for("!")]?Number.isFinite(t)[Symbol.for("!")]():!Number.isFinite(t)}()?e.dNaN:function(){return void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](-1):t>=-1}()?e.log(e.tetrate(o,function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1):t+1}()),o):e.log(e.log(e.tetrate(o,function(){return void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](2):t+2}()),o),o)}},{key:"lambertw",value:function(){var e=this;if(this.lt(function(){return.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499}()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}())return E(_(this.toNumber()));if(0===this.layer)return E(_(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}()));if(1===this.layer)return j(this);if(2===this.layer)return j(this);if(function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">=")]?e.layer[Symbol.for(">=")](3):e.layer>=3}())return F(this.sign,function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("-")]?e.layer[Symbol.for("-")](1):e.layer-1}(),this.mag);throw"Unhandled behavior in lambertw()"}},{key:"ssqrt",value:function(){var e=this;if(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("==")]?e.sign[Symbol.for("==")](1):1==e.sign}()&&function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">=")]?e.layer[Symbol.for(">=")](3):e.layer>=3}())return F(this.sign,function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("-")]?e.layer[Symbol.for("-")](1):e.layer-1}(),this.mag);var n=this.ln();return n.div(n.lambertw())}},{key:"pentate",value:function(){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0}()&&function(){return void 0!==n[0]&&null!==n[0]&&n[0][Symbol.for("!==")]?n[0][Symbol.for("!==")](void 0):void 0!==n[0]}()?arguments[0]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:F(1,0,1);r=E(r);var t=o;o=Math.trunc(o);var l=function(){return void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](o):t-o}();(function(){return void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l})()&&(r.eq(e.dOne)?(function(){void 0!==o&&null!==o&&"object"===(0,S.Z)(o)&&o[Symbol.for("prefix-increment")]?o[Symbol.for("prefix-increment")]():++o}(),r=new e(l)):r=this.eq(10)?r.layeradd10(l):r.layeradd(l,this));for(var i=0;function(){return void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](o):i")]?i[Symbol.for(">")](10):i>10}())return r}return r}},{key:"sin",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.sin(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(0,0,0)}},{key:"cos",value:function(){var n=this;return function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for("<")]?n.mag[Symbol.for("<")](0):n.mag<0}()?e.dOne:0===this.layer?E(Math.cos(function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.mag):n.sign*n.mag}())):F(0,0,0)}},{key:"tan",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.tan(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(0,0,0)}},{key:"asin",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.asin(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(Number.NaN,Number.NaN,Number.NaN)}},{key:"acos",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?E(Math.acos(this.toNumber())):0===this.layer?E(Math.acos(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):F(Number.NaN,Number.NaN,Number.NaN)}},{key:"atan",value:function(){var e=this;return function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](0):e.mag<0}()?this:0===this.layer?E(Math.atan(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag}())):E(Math.atan(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](Infinity):Infinity*e.sign}()))}},{key:"sinh",value:function(){return this.exp().sub(this.negate().exp()).div(2)}},{key:"cosh",value:function(){return this.exp().add(this.negate().exp()).div(2)}},{key:"tanh",value:function(){return this.sinh().div(this.cosh())}},{key:"asinh",value:function(){return e.ln(this.add(this.sqr().add(1).sqrt()))}},{key:"acosh",value:function(){return e.ln(this.add(this.sqr().sub(1).sqrt()))}},{key:"atanh",value:function(){return this.abs().gte(1)?F(Number.NaN,Number.NaN,Number.NaN):e.ln(this.add(1).div(E(1).sub(this))).div(2)}},{key:"ascensionPenalty",value:function(n){return 0===n?this:this.root(e.pow(10,n))}},{key:"egg",value:function(){return this.add(9)}},{key:"lessThanOrEqualTo",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for("<")]?n.cmp(e)[Symbol.for("<")](1):n.cmp(e)<1}()}},{key:"lessThan",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for("<")]?n.cmp(e)[Symbol.for("<")](0):n.cmp(e)<0}()}},{key:"greaterThanOrEqualTo",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for(">")]?n.cmp(e)[Symbol.for(">")](-1):n.cmp(e)>-1}()}},{key:"greaterThan",value:function(e){var n=this;return function(){return void 0!==n.cmp(e)&&null!==n.cmp(e)&&n.cmp(e)[Symbol.for(">")]?n.cmp(e)[Symbol.for(">")](0):n.cmp(e)>0}()}}],[{key:"fromComponents",value:function(n,o,r){return(new e).fromComponents(n,o,r)}},{key:"fromComponents_noNormalize",value:function(n,o,r){return(new e).fromComponents_noNormalize(n,o,r)}},{key:"fromMantissaExponent",value:function(n,o){return(new e).fromMantissaExponent(n,o)}},{key:"fromMantissaExponent_noNormalize",value:function(n,o){return(new e).fromMantissaExponent_noNormalize(n,o)}},{key:"fromDecimal",value:function(n){return(new e).fromDecimal(n)}},{key:"fromNumber",value:function(n){return(new e).fromNumber(n)}},{key:"fromString",value:function(n){return(new e).fromString(n)}},{key:"fromValue",value:function(n){return(new e).fromValue(n)}},{key:"fromValue_noAlloc",value:function(n){return n instanceof e?n:new e(n)}},{key:"abs",value:function(e){return E(e).abs()}},{key:"neg",value:function(e){return E(e).neg()}},{key:"negate",value:function(e){return E(e).neg()}},{key:"negated",value:function(e){return E(e).neg()}},{key:"sign",value:function(e){return E(e).sign}},{key:"sgn",value:function(e){return E(e).sign}},{key:"round",value:function(e){return E(e).round()}},{key:"floor",value:function(e){return E(e).floor()}},{key:"ceil",value:function(e){return E(e).ceil()}},{key:"trunc",value:function(e){return E(e).trunc()}},{key:"add",value:function(e,n){return E(e).add(n)}},{key:"plus",value:function(e,n){return E(e).add(n)}},{key:"sub",value:function(e,n){return E(e).sub(n)}},{key:"subtract",value:function(e,n){return E(e).sub(n)}},{key:"minus",value:function(e,n){return E(e).sub(n)}},{key:"mul",value:function(e,n){return E(e).mul(n)}},{key:"multiply",value:function(e,n){return E(e).mul(n)}},{key:"times",value:function(e,n){return E(e).mul(n)}},{key:"div",value:function(e,n){return E(e).div(n)}},{key:"divide",value:function(e,n){return E(e).div(n)}},{key:"recip",value:function(e){return E(e).recip()}},{key:"reciprocal",value:function(e){return E(e).recip()}},{key:"reciprocate",value:function(e){return E(e).reciprocate()}},{key:"cmp",value:function(e,n){return E(e).cmp(n)}},{key:"cmpabs",value:function(e,n){return E(e).cmpabs(n)}},{key:"compare",value:function(e,n){return E(e).cmp(n)}},{key:"isNaN",value:function(e){function n(n){return e.apply(this,arguments)}return n.toString=function(){return e.toString()},n}((function(e){return e=E(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}))},{key:"isFinite",value:function(e){function n(n){return e.apply(this,arguments)}return n.toString=function(){return e.toString()},n}((function(e){return e=E(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}))},{key:"eq",value:function(e,n){return E(e).eq(n)}},{key:"equals",value:function(e,n){return E(e).eq(n)}},{key:"neq",value:function(e,n){return E(e).neq(n)}},{key:"notEquals",value:function(e,n){return E(e).notEquals(n)}},{key:"lt",value:function(e,n){return E(e).lt(n)}},{key:"lte",value:function(e,n){return E(e).lte(n)}},{key:"gt",value:function(e,n){return E(e).gt(n)}},{key:"gte",value:function(e,n){return E(e).gte(n)}},{key:"max",value:function(e,n){return E(e).max(n)}},{key:"min",value:function(e,n){return E(e).min(n)}},{key:"minabs",value:function(e,n){return E(e).minabs(n)}},{key:"maxabs",value:function(e,n){return E(e).maxabs(n)}},{key:"clamp",value:function(e,n,o){return E(e).clamp(n,o)}},{key:"clampMin",value:function(e,n){return E(e).clampMin(n)}},{key:"clampMax",value:function(e,n){return E(e).clampMax(n)}},{key:"cmp_tolerance",value:function(e,n,o){return E(e).cmp_tolerance(n,o)}},{key:"compare_tolerance",value:function(e,n,o){return E(e).cmp_tolerance(n,o)}},{key:"eq_tolerance",value:function(e,n,o){return E(e).eq_tolerance(n,o)}},{key:"equals_tolerance",value:function(e,n,o){return E(e).eq_tolerance(n,o)}},{key:"neq_tolerance",value:function(e,n,o){return E(e).neq_tolerance(n,o)}},{key:"notEquals_tolerance",value:function(e,n,o){return E(e).notEquals_tolerance(n,o)}},{key:"lt_tolerance",value:function(e,n,o){return E(e).lt_tolerance(n,o)}},{key:"lte_tolerance",value:function(e,n,o){return E(e).lte_tolerance(n,o)}},{key:"gt_tolerance",value:function(e,n,o){return E(e).gt_tolerance(n,o)}},{key:"gte_tolerance",value:function(e,n,o){return E(e).gte_tolerance(n,o)}},{key:"pLog10",value:function(e){return E(e).pLog10()}},{key:"absLog10",value:function(e){return E(e).absLog10()}},{key:"log10",value:function(e){return E(e).log10()}},{key:"log",value:function(e,n){return E(e).log(n)}},{key:"log2",value:function(e){return E(e).log2()}},{key:"ln",value:function(e){return E(e).ln()}},{key:"logarithm",value:function(e,n){return E(e).logarithm(n)}},{key:"pow",value:function(e,n){return E(e).pow(n)}},{key:"pow10",value:function(e){return E(e).pow10()}},{key:"root",value:function(e,n){return E(e).root(n)}},{key:"factorial",value:function(e,n){return E(e).factorial()}},{key:"gamma",value:function(e,n){return E(e).gamma()}},{key:"lngamma",value:function(e,n){return E(e).lngamma()}},{key:"exp",value:function(e){return E(e).exp()}},{key:"sqr",value:function(e){return E(e).sqr()}},{key:"sqrt",value:function(e){return E(e).sqrt()}},{key:"cube",value:function(e){return E(e).cube()}},{key:"cbrt",value:function(e){return E(e).cbrt()}},{key:"tetrate",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:F(1,0,1);return E(e).tetrate(o,r)}},{key:"iteratedexp",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:F(1,0,1);return E(e).iteratedexp(o,r)}},{key:"iteratedlog",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:10,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:1;return E(e).iteratedlog(o,r)}},{key:"layeradd10",value:function(e,n){return E(e).layeradd10(n)}},{key:"layeradd",value:function(e,n){var o=arguments,r=function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()&&function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()?arguments[2]:10;return E(e).layeradd(n,r)}},{key:"slog",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:10;return E(e).slog(o)}},{key:"lambertw",value:function(e){return E(e).lambertw()}},{key:"ssqrt",value:function(e){return E(e).ssqrt()}},{key:"pentate",value:function(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:2,r=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:F(1,0,1);return E(e).pentate(o,r)}},{key:"affordGeometricSeries",value:function(e,n,o,r){return this.affordGeometricSeries_core(E(e),E(n),E(o),r)}},{key:"sumGeometricSeries",value:function(e,n,o,r){return this.sumGeometricSeries_core(e,E(n),E(o),r)}},{key:"affordArithmeticSeries",value:function(e,n,o,r){return this.affordArithmeticSeries_core(E(e),E(n),E(o),E(r))}},{key:"sumArithmeticSeries",value:function(e,n,o,r){return this.sumArithmeticSeries_core(E(e),E(n),E(o),E(r))}},{key:"efficiencyOfPurchase",value:function(e,n,o){return this.efficiencyOfPurchase_core(E(e),E(n),E(o))}},{key:"randomDecimalForTesting",value:function(e){if(function(){return 20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1}())return F(0,0,0);var n=function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.5):Math.random()>.5}()?1:function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}();if(function(){return 20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1}())return F(n,0,1);var o=Math.floor(function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](e+1):Math.random()*(e+1)}()),r=0===o?function(){return 616*Math.random()!==void 0&&616*Math.random()!==null&&(616*Math.random())[Symbol.for("-")]?(616*Math.random())[Symbol.for("-")](308):616*Math.random()-308}():function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](16):16*Math.random()}();(function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9})()&&(r=Math.trunc(r));var t=Math.pow(10,r);return function(){return void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9}()&&(t=Math.trunc(t)),T(n,o,t)}},{key:"affordGeometricSeries_core",value:function(n,o,r,t){var l=o.mul(r.pow(t));return e.floor(n.div(l).mul(r.sub(1)).add(1).log10().div(r.log10()))}},{key:"sumGeometricSeries_core",value:function(n,o,r,t){return o.mul(r.pow(t)).mul(e.sub(1,r.pow(n))).div(e.sub(1,r))}},{key:"affordArithmeticSeries_core",value:function(e,n,o,r){var t=n.add(r.mul(o)),l=t.sub(o.div(2)),i=l.pow(2);return l.neg().add(i.add(o.mul(e).mul(2)).sqrt()).div(o).floor()}},{key:"sumArithmeticSeries_core",value:function(e,n,o,r){var t=n.add(r.mul(o));return e.div(2).mul(t.mul(2).plus(e.sub(1).mul(o)))}},{key:"efficiencyOfPurchase_core",value:function(e,n,o){return e.div(n).add(e.div(o))}},{key:"slog_critical",value:function(n,o){return function(){return void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](10):n>10}()?function(){return void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1}():e.critical_section(n,o,P)}},{key:"tetrate_critical",value:function(n,o){return e.critical_section(n,o,B)}},{key:"critical_section",value:function(e,n,o){n=function(){return void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](10):10*n}(),function(){return void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](0):n<0}()&&(n=0),function(){return void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](10):n>10}()&&(n=10),function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](2):e<2}()&&(e=2),function(){return void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10}()&&(e=10);for(var r=0,t=0,l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](w.length):l")]?w[l+1][Symbol.for(">")](e):w[l+1]>e}()){var i=function(){return e-w[l]!==void 0&&e-w[l]!==null&&(e-w[l])[Symbol.for("/")]?(e-w[l])[Symbol.for("/")](w[l+1]-w[l]):(e-w[l])/(w[l+1]-w[l])}();r=function(){return o[l][Math.floor(n)]*(1-i)!==void 0&&o[l][Math.floor(n)]*(1-i)!==null&&(o[l][Math.floor(n)]*(1-i))[Symbol.for("+")]?(o[l][Math.floor(n)]*(1-i))[Symbol.for("+")](o[l+1][Math.floor(n)]*i):o[l][Math.floor(n)]*(1-i)+o[l+1][Math.floor(n)]*i}(),t=function(){return o[l][Math.ceil(n)]*(1-i)!==void 0&&o[l][Math.ceil(n)]*(1-i)!==null&&(o[l][Math.ceil(n)]*(1-i))[Symbol.for("+")]?(o[l][Math.ceil(n)]*(1-i))[Symbol.for("+")](o[l+1][Math.ceil(n)]*i):o[l][Math.ceil(n)]*(1-i)+o[l+1][Math.ceil(n)]*i}();break}}var u=function(){return void 0!==n&&null!==n&&n[Symbol.for("-")]?n[Symbol.for("-")](Math.floor(n)):n-Math.floor(n)}(),a=function(){return r*(1-u)!==void 0&&r*(1-u)!==null&&(r*(1-u))[Symbol.for("+")]?(r*(1-u))[Symbol.for("+")](t*u):r*(1-u)+t*u}();return a}}]),e}();(0,v.Z)(A,"dZero",F(0,0,0)),(0,v.Z)(A,"dOne",F(1,0,1)),(0,v.Z)(A,"dNegOne",F(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),0,1)),(0,v.Z)(A,"dTwo",F(1,0,2)),(0,v.Z)(A,"dTen",F(1,0,10)),(0,v.Z)(A,"dNaN",F(Number.NaN,Number.NaN,Number.NaN)),(0,v.Z)(A,"dInf",F(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,v.Z)(A,"dNegInf",F(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,v.Z)(A,"dNumberMax",T(1,0,Number.MAX_VALUE)),(0,v.Z)(A,"dNumberMin",T(1,0,Number.MIN_VALUE));var U=o(6453),q=A,z=new A(1);function L(e,n){var o=arguments,r=!function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()||!function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()||arguments[2],t=A.log10(e).floor(),l=A.div(e,A.pow(10,t));"10"===l.toStringWithDecimalPlaces(n)&&(l=z,t=t.add(1));var i=t.gte(1e9)?oe(t,Math.max(Math.max(n,3),U.defaultDecimalsShown)):t.gte(1e4)?G(t,0):t.toStringWithDecimalPlaces(0);return r?function(){return l.toStringWithDecimalPlaces(n)+"e"!==void 0&&l.toStringWithDecimalPlaces(n)+"e"!==null&&(l.toStringWithDecimalPlaces(n)+"e")[Symbol.for("+")]?(l.toStringWithDecimalPlaces(n)+"e")[Symbol.for("+")](i):l.toStringWithDecimalPlaces(n)+"e"+i}():function(){return"e"[Symbol.for("+")]?"e"[Symbol.for("+")](i):"e"+i}()}function G(e,n){if(null===e||void 0===e)return"NaN";if(e=new A(e),function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.001):e.mag<.001}())return(0).toFixed(n);var o=e.toStringWithDecimalPlaces(n),r=o.split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),function(){return void 0!==r.length&&null!==r.length&&r.length[Symbol.for("==")]?r.length[Symbol.for("==")](1):1==r.length}()?r[0]:function(){return r[0]+"."!==void 0&&r[0]+"."!==null&&(r[0]+".")[Symbol.for("+")]?(r[0]+".")[Symbol.for("+")](r[1]):r[0]+"."+r[1]}()}function H(e,n){return null===e||void 0===e?"NaN":(e=new A(e),function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e-4):e.mag<1e-4}()?(0).toFixed(n):(function(){return void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.1):e.mag<.1}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](0):0!==n}()&&(n=Math.max(Math.max(n,4),U.defaultDecimalsShown)),e.toStringWithDecimalPlaces(n)))}var W=new A("eeee1000"),Y=new A("e100000"),K=new A("e1000"),J=new A(1e9),Q=new A(1e6),$=new A(1e3),X=new A(.98),ee=new A(.001),ne=new A(0);function oe(e,n,o){var r;if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&(n=U.defaultDecimalsShown),o=function(){return void 0!==(r=o)&&null!==(r=o)&&(r=o)[Symbol.for("!==")]?(r=o)[Symbol.for("!==")](null):null!==(r=o)}()&&function(){return void 0!==r&&null!==r&&r[Symbol.for("!==")]?r[Symbol.for("!==")](void 0):void 0!==r}()?r:U.defaultShowSmall,e=new A(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0}())return function(){return"-"[Symbol.for("+")]?"-"[Symbol.for("+")](oe(e.neg(),n)):"-"+oe(e.neg(),n)}();if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(W)){var t=e.slog();return t.gte(Q)?function(){return"F"[Symbol.for("+")]?"F"[Symbol.for("+")](oe(t.floor())):"F"+oe(t.floor())}():function(){return A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](G(t.floor(),0)):A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"+G(t.floor(),0)}()}if(e.gte(Y))return L(e,0,!1);if(e.gte(K))return L(e,0);if(e.gte(J))return L(e,n);if(e.gte($))return G(e,0);if(e.gte(ee)||function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}())return H(e,n);if(e.eq(ne))return(0).toFixed(n);if(e=ue(e),e.lt(K)){var l=L(e,n);return l.replace(/([^(?:e|F)]*)$/,"-$1")}return function(){return void 0!==oe(e,n)&&null!==oe(e,n)&&oe(e,n)[Symbol.for("+")]?oe(e,n)[Symbol.for("+")]("⁻¹"):oe(e,n)+"⁻¹"}()}function re(e){return e=new A(e),function(){return void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0}()?function(){return"-"[Symbol.for("+")]?"-"[Symbol.for("+")](re(e.neg())):"-"+re(e.neg())}():e.gte(J)||e.lte(X)&&function(){return void 0!==e.eq(ne)&&null!==e.eq(ne)&&e.eq(ne)[Symbol.for("!")]?e.eq(ne)[Symbol.for("!")]():!e.eq(ne)}()?oe(e):oe(e,0)}function te(e){return A.lt(e,0)?function(){return"-"[Symbol.for("+")]?"-"[Symbol.for("+")](te(A.neg(e))):"-"+te(A.neg(e))}():A.gt(e,function(){return 2[Symbol.for("**")]?2[Symbol.for("**")](51):Math.pow(2,51)}())?function(){return void 0!==oe(A.div(e,31536e3))&&null!==oe(A.div(e,31536e3))&&oe(A.div(e,31536e3))[Symbol.for("+")]?oe(A.div(e,31536e3))[Symbol.for("+")]("y"):oe(A.div(e,31536e3))+"y"}():(e=new A(e).toNumber(),function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](60):e<60}()?function(){return void 0!==oe(e)&&null!==oe(e)&&oe(e)[Symbol.for("+")]?oe(e)[Symbol.for("+")]("s"):oe(e)+"s"}():function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](3600):e<3600}()?function(){return re(Math.floor(e/60))+"m "+oe(e%60)!==void 0&&re(Math.floor(e/60))+"m "+oe(e%60)!==null&&(re(Math.floor(e/60))+"m "+oe(e%60))[Symbol.for("+")]?(re(Math.floor(e/60))+"m "+oe(e%60))[Symbol.for("+")]("s"):re(Math.floor(e/60))+"m "+oe(e%60)+"s"}():function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](86400):e<86400}()?function(){return re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60)!==void 0&&re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60)!==null&&(re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60))[Symbol.for("+")]?(re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60))[Symbol.for("+")]("s"):re(Math.floor(e/3600))+"h "+re(Math.floor(e/60)%60)+"m "+re(e%60)+"s"}():function(){return void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](31536e3):e<31536e3}()?function(){return re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60)!==void 0&&re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60)!==null&&(re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60))[Symbol.for("+")]?(re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60))[Symbol.for("+")]("m"):re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h "+re(Math.floor(e/60)%60)+"m"}():function(){return re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)!==void 0&&re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)!==null&&(re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24))[Symbol.for("+")]?(re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24))[Symbol.for("+")]("h"):re(Math.floor(e/31536e3))+"y "+re(Math.floor(e/84600)%365)+"d "+re(Math.floor(e/3600)%24)+"h"}())}function le(e,n,o){e=new A(e);var r=e.toStringWithDecimalPlaces(n);return new A(r).gte(o)&&(r=A.sub(o,Math.pow(.1,n)).toStringWithDecimalPlaces(n)),r}function ie(e,n){return oe(e,n,!0)}function ue(e){var n=A.log10(e).ceil(),o=A.div(e,A.pow(10,n));return n=n.neg(),e=new A(10).pow(n).times(o),e}var ae=L,fe=G,ce=H,se=oe,me=re,de=te,ye=le,be=ie,ve=ue;window.Decimal=q,window.exponentialFormat=ae,window.commaFormat=fe,window.regularFormat=ce,window.format=se,window.formatWhole=me,window.formatTime=de,window.toPlaces=ye,window.formatSmall=be,window.invertOOM=ve;var Se=q},1349:function(e,n,o){"use strict";o.d(n,{IJ:function(){return r},PO:function(){return t},mf:function(){return l}});o(4916),o(5306),o(2526),o(1817),o(1539),o(7042);function r(e){var n=e.replace(/([A-Z])/g," $1");return n=function(){return void 0!==n.charAt(0).toUpperCase()&&null!==n.charAt(0).toUpperCase()&&n.charAt(0).toUpperCase()[Symbol.for("+")]?n.charAt(0).toUpperCase()[Symbol.for("+")](n.slice(1)):n.charAt(0).toUpperCase()+n.slice(1)}(),n}function t(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e){return"function"===typeof e}},9583:function(e,n,o){"use strict";o.d(n,{mM:function(){return l},yB:function(){return i},UI:function(){return u}});o(2526),o(1817),o(1539);var r=o(4865),t=o(1349),l=Symbol("DoNotCache");function i(e,n){var o=e[n];(0,t.mf)(o)&&0===o.length&&function(){return void 0!==o[l]&&null!==o[l]&&o[l][Symbol.for("!")]?o[l][Symbol.for("!")]():!o[l]}()&&(e[n]=(0,r.computed)(o.bind(e)))}function u(e){return(0,t.mf)(e)&&function(){return void 0!==e[l]&&null!==e[l]&&e[l][Symbol.for("!")]?e[l][Symbol.for("!")]():!e[l]}()&&(e=(0,r.computed)(e)),e}},3273:function(e,n,o){"use strict";o.d(n,{Le:function(){return r},c4:function(){return t},z2:function(){return l}});o(2526),o(1817),o(1539),o(4858),o(1299),o(7556),o(5003);var r=Symbol("ProxyState"),t=Symbol("ProxyPath");function l(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:{},t=o,l=!1;function i(){return function(){return void 0!==l&&null!==l&&l[Symbol.for("!")]?l[Symbol.for("!")]():!l}()&&(Object.assign(t,e(t)),l=!0),t}return new Proxy(t,{get:function(e,n){return n===r?i():i()[n]},set:function(e,n,o){return i()[n]=o,!0},has:function(e,n){return n===r||Reflect.has(i(),n)},ownKeys:function(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor:function(n,o){return function(){return void 0!==l&&null!==l&&l[Symbol.for("!")]?l[Symbol.for("!")]():!l}()&&(Object.assign(t,e(t)),l=!0),Object.getOwnPropertyDescriptor(n,o)}})}},463:function(e,n,o){"use strict";o.d(n,{a1:function(){return c},zD:function(){return s},xM:function(){return d},QI:function(){return y},uW:function(){return b},y6:function(){return S}});var r=o(3336),t=o(8534),l=(o(5666),o(2526),o(1817),o(1539),o(7042),o(7714),o(2801),o(1174),o(2222),o(8783),o(3948),o(4747),o(6453)),i=o(5967),u=o(9266),a=o(3273);function f(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:{};return Object.assign({id:"".concat(l.id,"-0"),name:"Default Save",tabs:l.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:l.id,modVersion:l.versionNumber,layers:{}},n)}function c(){var e=btoa(unescape(encodeURIComponent((0,i.U)(i.Z[a.Le]))));return localStorage.setItem(i.Z.id,e),e}function s(){return m.apply(this,arguments)}function m(){return m=(0,t.Z)(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if((0,u.ri)(),e.prev=1,n=localStorage.getItem(u.ZP.active),function(){return void 0!==function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&null!==function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()[Symbol.for("!")]?function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()[Symbol.for("!")]():!function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()}()){e.next=7;break}return e.next=6,b(d());case 6:return e.abrupt("return");case 7:if(o=JSON.parse(decodeURIComponent(escape(atob(n)))),function(){return void 0!==function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()&&null!==function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()&&function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()[Symbol.for("!")]?function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()[Symbol.for("!")]():!function(){return void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id}()}()){e.next=12;break}return e.next=11,b(d());case 11:return e.abrupt("return");case 12:return o.id=u.ZP.active,e.next=15,b(o);case 15:e.next=22;break;case 17:return e.prev=17,e.t0=e["catch"](1),console.error("Failed to load save. Falling back to new save.\n",e.t0),e.next=22,b(d());case 22:case"end":return e.stop()}}),e,null,[[1,17]])}))),m.apply(this,arguments)}function d(){var e=y(),n=f({id:e});return localStorage.setItem(e,btoa(unescape(encodeURIComponent((0,i.U)(n))))),u.ZP.saves.push(e),n}function y(){var e,n=0;do{e="".concat(l.id,"-").concat(function(){return void 0!==n&&null!==n&&"object"===(0,r.Z)(n)&&n[Symbol.for("postfix-increment")]?n[Symbol.for("postfix-increment")]():n++}())}while(localStorage.getItem(e));return e}function b(e){return v.apply(this,arguments)}function v(){return v=(0,t.Z)(regeneratorRuntime.mark((function e(n){var r,t,a,c,s,m,d,y;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.info("Loading save",n),e.next=3,Promise.resolve().then(o.bind(o,9365));case 3:return r=e.sent,t=r.layers,a=r.removeLayer,c=r.addLayer,e.next=9,Promise.resolve().then(o.bind(o,5412));case 9:for(y in s=e.sent,m=s.fixOldSave,d=s.getInitialLayers,t)a(t[y]);d(n).forEach((function(e){return c(e,n)})),n=f(n),n.offlineProd&&n.time&&(function(){return void 0!==n.offlineTime&&null!==n.offlineTime&&n.offlineTime[Symbol.for("==")]?n.offlineTime[Symbol.for("==")](void 0):void 0==n.offlineTime}()&&(n.offlineTime=0),n.offlineTime=function(){return void 0!==n.offlineTime&&null!==n.offlineTime&&n.offlineTime[Symbol.for("+")]?n.offlineTime[Symbol.for("+")]((Date.now()-n.time)/1e3):n.offlineTime+(Date.now()-n.time)/1e3}()),n.time=Date.now(),function(){return void 0!==n.modVersion&&null!==n.modVersion&&n.modVersion[Symbol.for("!==")]?n.modVersion[Symbol.for("!==")](l.versionNumber):n.modVersion!==l.versionNumber}()&&m(n.modVersion,n),Object.assign(i.Z,n),u.ZP.active=i.Z.id;case 20:case"end":return e.stop()}}),e)}))),v.apply(this,arguments)}setInterval((function(){i.Z.autosave&&c()}),1e3),window.onbeforeunload=function(){i.Z.autosave&&c()},window.save=c;var S=window.hardReset=(0,t.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,b(d());case 2:case"end":return e.stop()}}),e)})))},5246:function(e,n,o){"use strict";o(2526),o(1817),o(1539),o(4747),o(7327),o(2479);var r=o(9365),t=o(6591),l=o(1604),i=o(4865);e=o.hmd(e),n["Z"]=(0,i.defineComponent)({props:{style:(0,l.P5)(String,Object,Array),classes:(0,l.P5)(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup:function(n){var o=(0,i.ref)(null),l=new ResizeObserver(c),u=(0,i.inject)(r.NodesInjectionKey),a=(0,i.ref)(null);(0,i.onMounted)((function(){var r,u,f=a.value;(function(){return void 0!==f&&null!==f&&f[Symbol.for("!=")]?f[Symbol.for("!=")](null):null!=f})()&&(l.observe(f),o.value=new t.MxU({resizeTo:f,backgroundAlpha:0}),null===(u=a.value)||void 0===u||u.appendChild(o.value.view),n.onInit(o.value));c(),"apply"===(null===(r=e.hot)||void 0===r?void 0:r.status())&&n.onHotReload&&(0,i.nextTick)(n.onHotReload)})),(0,i.onBeforeUnmount)((function(){var e;null===(e=o.value)||void 0===e||e.destroy()}));var f=!0;function c(){f&&(f=!1,(0,i.nextTick)((function(){var e;(function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!=")]?a.value[Symbol.for("!=")](null):null!=a.value})()&&n.onContainerResized&&(Object.values(u.value).filter((function(e){return e})).forEach((function(e){return e.rect=e.element.getBoundingClientRect()})),n.onContainerResized(a.value.getBoundingClientRect()),null===(e=o.value)||void 0===e||e.resize());f=!0})))}return document.fonts.ready.then(c),{unref:i.unref,resizeListener:a}}})},5412:function(e,n,o){"use strict";o.r(n),o.d(n,{fixOldSave:function(){return yr},getInitialLayers:function(){return mr},hasWon:function(){return dr},main:function(){return sr}});var r=o(4865),t=(o(2526),o(1817),o(1539),function(e){return(0,r.pushScopeId)("data-v-07150322"),e=e(),(0,r.popScopeId)(),e}),l=t((function(){return(0,r.createElementVNode)("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[(0,r.createElementVNode)("g",{id:"P"},[(0,r.createElementVNode)("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),(0,r.createElementVNode)("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),(0,r.createElementVNode)("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),(0,r.createElementVNode)("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),(0,r.createElementVNode)("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),(0,r.createElementVNode)("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),(0,r.createElementVNode)("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())}));function i(e,n){return(0,r.openBlock)(),(0,r.createBlock)(r.Transition,{appear:""},{default:(0,r.withCtx)((function(){return[l]})),_:1})}var u=o(3744);const a={},f=(0,u.Z)(a,[["render",i],["__scopeId","data-v-07150322"]]);var c=f,s=(0,r.defineComponent)({props:{width:{default:"8px"},height:{default:"17px"}},setup:function(e){return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{style:(0,r.normalizeStyle)({width:e.width,height:e.height})},null,4)}}});const m=s;var d=m,y=o(6113),b=o(3336),v=(o(7268),o(86),o(5613)),S=o(7302),g=o(4061);function p(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"points",t=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:0,l=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](3):n.length>3}()&&function(){return void 0!==n[3]&&null!==n[3]&&n[3][Symbol.for("!==")]?n[3][Symbol.for("!==")](void 0):void 0!==n[3]}()?arguments[3]:void 0,i=(0,r.isRef)(e)?e:(0,g.ax)(e);return i.displayName=o,i.precision=t,i.small=l,i}function h(e){var n=(0,g.ax)(e.value);return(0,r.watch)(e,(function(e){v.ZP.gt(e,n.value)&&(n.value=e)})),n}function N(e){var n=(0,g.ax)(e.value);return(0,r.watch)(e,(function(e,o){v.ZP.gt(e,o)&&(n.value=v.ZP.add(n.value,v.ZP.sub(e,o)))})),n}var k=new v.ZP("10^^8"),V=new v.ZP("1e100");function x(e,n){var o=(0,r.ref)(0),t=(0,r.ref)(0),l=(0,r.ref)(0);S.globalBus.on("update",(function(n){if(t.value=0,v.ZP.lte(e.value,V))l.value=e.value;else{var r=e.value,i=l.value;if(l.value=r,v.ZP.gt(r,i))if(v.ZP.gte(r,k))r=v.ZP.slog(r,1e10),i=v.ZP.slog(i,1e10),o.value=r.sub(i).div(n),t.value=function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}();else while(v.ZP.div(r,i).log(10).div(n).gte("100")&&function(){return void 0!==t.value&&null!==t.value&&t.value[Symbol.for("<=")]?t.value[Symbol.for("<=")](5):t.value<=5}()&&v.ZP.gt(i,0))r=v.ZP.log10(r),i=v.ZP.log10(i),o.value=r.sub(i).div(n),function(){void 0!==t.value&&null!==t.value&&"object"===(0,b.Z)(t.value)&&t.value[Symbol.for("postfix-increment")]?t.value[Symbol.for("postfix-increment")]():t.value++}()}}));var i=(0,r.computed)((function(){return 0===t.value?n?function(){return(0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName!==void 0&&(0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName!==null&&((0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]?((0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]("/s"):(0,v.WU)(n.value,e.precision,e.small)+" "+e.displayName+"/s"}():"":function(){return(0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value)!==void 0&&(0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value)!==null&&((0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value))[Symbol.for("+")]?((0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value))[Symbol.for("+")]("s/sec"):(0,v.WU)(o.value)+" OOM"+(t.value<0?"^OOM":"^"+t.value)+"s/sec"}()}));return i}function M(e,n){var o=function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](null):null!==n}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](void 0):void 0!==n}()?n:e.value;return v.ZP.eq(e.precision,0)?(0,v.Ht)(o):(0,v.WU)(o,e.precision,e.small)}var Z=o(9584);o(4553),o(6699),o(2023),o(4747),o(7327),o(1249),o(2222);function C(e,n,o,t,l,i){var u=(0,r.resolveComponent)("Links");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.nodesComp))),e.leftNodesComp?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.leftNodesComp),{key:0})):(0,r.createCommentVNode)("",!0),e.rightNodesComp?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.rightNodesComp),{key:1})):(0,r.createCommentVNode)("",!0),e.branches?((0,r.openBlock)(),(0,r.createBlock)(u,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,r.createCommentVNode)("",!0)],64)}var w=o(1604),B=(o(2479),o(9365)),P=(o(9254),["x1","y1","x2","y2"]),E=(0,r.defineComponent)({props:{link:null,startNode:null,endNode:null,boundingRect:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,r.computed)((function(){var e=o.startNode.value.rect,n=o.boundingRect.value,r=n?{x:function(){return e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](n.x):e.x+e.width/2-n.x}(),y:function(){return e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](n.y):e.y+e.height/2-n.y}()}:{x:0,y:0};return o.link.value.offsetStart&&(r.x=function(){return void 0!==r.x&&null!==r.x&&r.x[Symbol.for("+")]?r.x[Symbol.for("+")](o.link.value.offsetStart.x):r.x+o.link.value.offsetStart.x}(),r.y=function(){return void 0!==r.y&&null!==r.y&&r.y[Symbol.for("+")]?r.y[Symbol.for("+")](o.link.value.offsetStart.y):r.y+o.link.value.offsetStart.y}()),r})),l=(0,r.computed)((function(){var e=o.endNode.value.rect,n=o.boundingRect.value,r=n?{x:function(){return e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](n.x):e.x+e.width/2-n.x}(),y:function(){return e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](n.y):e.y+e.height/2-n.y}()}:{x:0,y:0};return o.link.value.offsetEnd&&(r.x=function(){return void 0!==r.x&&null!==r.x&&r.x[Symbol.for("+")]?r.x[Symbol.for("+")](o.link.value.offsetEnd.x):r.x+o.link.value.offsetEnd.x}(),r.y=function(){return void 0!==r.y&&null!==r.y&&r.y[Symbol.for("+")]?r.y[Symbol.for("+")](o.link.value.offsetEnd.y):r.y+o.link.value.offsetEnd.y}()),r}));return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("line",(0,r.mergeProps)({"stroke-width":"15px",stroke:"white"},e.link,{x1:(0,r.unref)(t).x,y1:(0,r.unref)(t).y,x2:(0,r.unref)(l).x,y2:(0,r.unref)(l).y}),null,16,P)}}});const T=E;var F=T,I=(0,r.defineComponent)({props:{links:null},setup:function(e){var n,o=e,t=(0,r.toRef)(o,"links"),l=new ResizeObserver(c),i=(0,r.inject)(B.NodesInjectionKey),u=(0,r.ref)(null);(0,r.onMounted)((function(){var e=u.value;(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e})()&&l.observe(e)}));var a=!0,f=(0,r.ref)(null===(n=u.value)||void 0===n?void 0:n.getBoundingClientRect());function c(){(function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!=")]?u.value[Symbol.for("!=")](null):null!=u.value})()&&a&&(a=!1,(0,r.nextTick)((function(){var e;f.value=null===(e=u.value)||void 0===e?void 0:e.getBoundingClientRect(),Object.values(i.value).forEach((function(e){return e.rect=e.element.getBoundingClientRect()})),a=!0})))}document.fonts.ready.then(c);var s=(0,r.computed)((function(){var e,n=i.value;return function(){var o,r,l,i,u;return void 0!==(e=null===(o=t.value)||void 0===o?void 0:o.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))&&null!==(e=null===(r=t.value)||void 0===r?void 0:r.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))&&(e=null===(l=t.value)||void 0===l?void 0:l.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))[Symbol.for("!==")]?(e=null===(i=t.value)||void 0===i?void 0:i.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))[Symbol.for("!==")](null):null!==(e=null===(u=t.value)||void 0===u?void 0:u.filter((function(e){var o,r;return(null===(o=n[e.startNode.id])||void 0===o?void 0:o.rect)&&(null===(r=n[e.startNode.id])||void 0===r?void 0:r.rect)})))}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()?e:[]}));return function(e,n){return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.unref)(s)?((0,r.openBlock)(),(0,r.createElementBlock)("svg",(0,r.normalizeProps)((0,r.mergeProps)({key:0},e.$attrs)),[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(s),(function(e,n){return(0,r.openBlock)(),(0,r.createBlock)(F,{key:n,link:e,boundingRect:(0,r.unref)(f),startNode:(0,r.unref)(i)[e.startNode.id],endNode:(0,r.unref)(i)[e.endNode.id]},null,8,["link","boundingRect","startNode","endNode"])})),128))],16)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",{ref_key:"resizeListener",ref:u,class:"resize-listener"},null,512)],64)}}});const D=(0,u.Z)(I,[["__scopeId","data-v-e35b0402"]]);var R=D,O=(0,r.defineComponent)({props:{nodes:{type:(0,w.P5)(Array),required:!0},leftSideNodes:(0,w.P5)(Array),rightSideNodes:(0,w.P5)(Array),branches:(0,w.P5)(Array)},components:{Links:R},setup:function(e){var n=(0,r.toRefs)(e),o=n.nodes,t=n.leftSideNodes,l=n.rightSideNodes,i=(0,r.shallowRef)();(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);i.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[e.map((function(e){return(0,r.createVNode)("span",{class:"row tree-row",style:"margin: 50px auto;"},[e.map(w.qF)])}))])})))}));var u=(0,r.shallowRef)();(0,r.watchEffect)((function(){var e=(0,w.Uv)(t);u.value=e?(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",{class:"left-side-nodes small"},[e.map(w.qF)])}))):""}));var a=(0,r.shallowRef)();return(0,r.watchEffect)((function(){var e=(0,w.Uv)(l);a.value=e?(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",{class:"side-nodes small"},[e.map(w.qF)])}))):""})),{unref:r.unref,nodesComp:i,leftNodesComp:u,rightNodesComp:a}}});const _=(0,u.Z)(O,[["render",C],["__scopeId","data-v-aa87859c"]]);var j=_,A=o(5082);function U(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:(0,r.normalizeClass)((0,A.Z)({treeNode:!0,can:e.unref(e.canClick)},e.unref(e.classes)))},[(0,r.createElementVNode)("div",{onClick:n[0]||(n[0]=function(){return e.onClick&&e.onClick.apply(e,arguments)}),onMousedown:n[1]||(n[1]=function(){return e.start&&e.start.apply(e,arguments)}),onMouseleave:n[2]||(n[2]=function(){return e.stop&&e.stop.apply(e,arguments)}),onMouseup:n[3]||(n[3]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchstart:n[4]||(n[4]=function(){return e.start&&e.start.apply(e,arguments)}),onTouchend:n[5]||(n[5]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchcancel:n[6]||(n[6]=function(){return e.stop&&e.stop.apply(e,arguments)}),style:(0,r.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:"-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ".concat(e.unref(e.glowColor))},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[]])},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp))))],36),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}o(9653);var q=o(6084),z=(0,r.defineComponent)({props:{id:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,r.inject)(B.RegisterNodeInjectionKey),l=(0,r.inject)(B.UnregisterNodeInjectionKey),i=(0,r.ref)(null),u=(0,r.computed)((function(){return i.value&&i.value.parentElement}));return t&&l&&((0,r.watch)([u,o.id],(function(e,n){var o=(0,q.Z)(e,2),i=o[0],u=o[1],a=(0,q.Z)(n,2),f=a[0],c=a[1];f&&l((0,r.unref)(c)),i&&t(u,i)})),(0,r.onUnmounted)((function(){return l((0,r.unref)(o.id))}))),function(e,n){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"node",ref_key:"node",ref:i},null,512)}}});const L=(0,u.Z)(z,[["__scopeId","data-v-63ded336"]]);var G=L,H={key:0},W={key:0,class:"mark star"},Y=["src"],K=(0,r.defineComponent)({props:{mark:{type:[Boolean,String]}},setup:function(e){return function(n,o){return e.mark?((0,r.openBlock)(),(0,r.createElementBlock)("div",H,[!0===e.mark?((0,r.openBlock)(),(0,r.createElementBlock)("div",W)):((0,r.openBlock)(),(0,r.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,Y))])):(0,r.createCommentVNode)("",!0)}}});const J=(0,u.Z)(K,[["__scopeId","data-v-c476c56a"]]);var Q=J,$=(0,r.defineComponent)({props:{display:(0,w.P5)(Object,String,Function),visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),onClick:Function,onHold:Function,color:(0,w.P5)(String),glowColor:(0,w.P5)(String),canClick:{type:(0,w.P5)(Boolean),required:!0},mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Q,Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.onClick,t=n.onHold,l=n.display,i=(0,w.KO)(l),u=(0,w.ix)(o,t),a=u.start,f=u.stop;return{start:a,stop:f,comp:i,unref:r.unref,Visibility:y.EE,isCoercableComponent:w.RU}}});const X=(0,u.Z)($,[["render",U],["__scopeId","data-v-426d9bce"]]);var ee=X,ne=o(9583),oe=o(3273),re=Symbol("TreeNode"),te=Symbol("Tree");function le(e){return(0,oe.z2)((function(){var n=e();if(n.id=(0,y.QI)("treeNode-"),n.type=re,n[y.wA]=ee,(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,ne.yB)(n,"color"),(0,ne.yB)(n,"display"),(0,ne.yB)(n,"glowColor"),(0,ne.yB)(n,"classes"),(0,ne.yB)(n,"style"),(0,ne.yB)(n,"mark"),n.onClick){var o=n.onClick.bind(n);n.onClick=function(){(0,r.unref)(n.canClick)&&o()}}if(n.onHold){var t=n.onHold.bind(n);n.onHold=function(){(0,r.unref)(n.canClick)&&t()}}return n[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,r=this.classes,t=this.onClick,l=this.onHold,i=this.color,u=this.glowColor,a=this.canClick,f=this.mark,c=this.id;return{display:e,visibility:n,style:o,classes:r,onClick:t,onHold:l,color:i,glowColor:u,canClick:a,mark:f,id:c}},n}))}function ie(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("tree-"),n.type=te,n[y.wA]=j,n.isResetting=(0,r.ref)(!1),n.resettingNode=(0,r.shallowRef)(null),n.reset=function(e){var o,r,t=n;t.isResetting.value=!0,t.resettingNode.value=e,null===(o=t.resetPropagation)||void 0===o||o.call(t,t,e),null===(r=t.onReset)||void 0===r||r.call(t,e),t.isResetting.value=!1,t.resettingNode.value=null},n.links=(0,r.computed)((function(){var e,o=n;return function(){return void 0!==(e=(0,r.unref)(o.branches))&&null!==(e=(0,r.unref)(o.branches))&&(e=(0,r.unref)(o.branches))[Symbol.for("!==")]?(e=(0,r.unref)(o.branches))[Symbol.for("!==")](null):null!==(e=(0,r.unref)(o.branches))}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()?e:[]})),(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"nodes"),(0,ne.yB)(n,"leftSideNodes"),(0,ne.yB)(n,"rightSideNodes"),(0,ne.yB)(n,"branches"),n[y.tj]=function(){var e=this.nodes,n=this.leftSideNodes,o=this.rightSideNodes,r=this.branches;return{nodes:e,leftSideNodes:n,rightSideNodes:o,branches:r}},n}))}var ue=function(e,n){var o=[n],t=[n];(function(){return void 0!==e.branches&&null!==e.branches&&e.branches[Symbol.for("!=")]?e.branches[Symbol.for("!=")](null):null!=e.branches})()&&function(){var n=(0,r.unref)(e.branches),l=function(){var e=[];t.forEach((function(r){n.filter((function(e){return e.startNode===r||e.endNode===r})).map((function(e){return e.startNode===r?e.endNode:e.startNode})).filter((function(e){return function(){return void 0!==o.includes(e)&&null!==o.includes(e)&&o.includes(e)[Symbol.for("!")]?o.includes(e)[Symbol.for("!")]():!o.includes(e)}()})).forEach((function(n){var o;(function(){return void 0!==e.includes(n)&&null!==e.includes(n)&&e.includes(n)[Symbol.for("!")]?e.includes(n)[Symbol.for("!")]():!e.includes(n)})()&&(e.push(n),null===(o=n.reset)||void 0===o||o.reset())}))})),t=e,o.push.apply(o,(0,Z.Z)(t))};while(function(){return void 0!==t.length&&null!==t.length&&t.length[Symbol.for(">")]?t.length[Symbol.for(">")](0):t.length>0}())l()}()};function ae(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:null,t=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](2):n.length>2}()&&function(){return void 0!==n[2]&&null!==n[2]&&n[2][Symbol.for("!==")]?n[2][Symbol.for("!==")](void 0):void 0!==n[2]}()?arguments[2]:0,l=(0,ne.UI)(t);return(0,r.computed)((function(){return function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||v.ZP.gte(e.value,(0,r.unref)(l))?function(){return M(e)+" "!==void 0&&M(e)+" "!==null&&(M(e)+" ")[Symbol.for("+")]?(M(e)+" ")[Symbol.for("+")](e.displayName):M(e)+" "+e.displayName}():"Reach ".concat(v.ZP.eq(o.precision,0)?(0,v.Ht)((0,r.unref)(l)):(0,v.WU)((0,r.unref)(l),o.precision)," ").concat(o.displayName," to unlock (You have ").concat(v.ZP.eq(o.precision,0)?(0,v.Ht)(o.value):(0,v.WU)(o.value,o.precision),")")}))}var fe=o(5967),ce=o(2482),se=(o(8862),o(274)),me=o(264);function de(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&"url(".concat(e.image,")")||""},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[]]),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,achievement:!0,locked:function(){return void 0!==e.unref(e.earned)&&null!==e.unref(e.earned)&&e.unref(e.earned)[Symbol.for("!")]?e.unref(e.earned)[Symbol.for("!")]():!e.unref(e.earned)}(),bought:e.unref(e.earned)},e.unref(e.classes)))},[e.component?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var ye=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:(0,w.P5)(Object,String,Function),earned:{type:(0,w.P5)(Boolean),required:!0},image:(0,w.P5)(String),style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:G,MarkNode:Q},setup:function(e){var n=(0,r.toRefs)(e),o=n.display;return{component:(0,w.KO)(o),unref:r.unref,Visibility:y.EE}}});const be=(0,u.Z)(ye,[["render",de],["__scopeId","data-v-e3f32402"]]);var ve=be,Se=o(3002);o(343);function ge(){var e=arguments,n=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()&&function(){return void 0!==e[0]&&null!==e[0]&&e[0][Symbol.for("!==")]?e[0][Symbol.for("!==")](void 0):void 0!==e[0]}()?arguments[0]:"white",o=function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](1):e.length>1}()&&function(){return void 0!==e[1]&&null!==e[1]&&e[1][Symbol.for("!==")]?e[1][Symbol.for("!==")](void 0):void 0!==e[1]}()?arguments[1]:"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 ".concat(o," ").concat(n),zIndex:1}}function pe(){return ge("red","20px")}S.globalBus.on("setupVue",(function(e){return e.use(Se.ZP)}));var he=(0,Se.pm)(),Ne=Symbol("Achievement");function ke(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());if(o.id=(0,y.QI)("achievement-"),o.type=Ne,o[y.wA]=ve,o.earned=o[g.n9],o.complete=function(){o[g.n9].value=!0},(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"display"),(0,ne.yB)(o,"mark"),(0,ne.yB)(o,"image"),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"classes"),o[y.tj]=function(){var e=this.visibility,n=this.display,o=this.earned,t=this.image,l=this.style,i=this.classes,u=this.mark,a=this.id;return{visibility:e,display:n,earned:o,image:t,style:(0,r.unref)(l),classes:i,mark:u,id:a}},o.shouldEarn){var t=o;(0,r.watchEffect)((function(){var e,n;if(function(){return void 0!==t.earned.value&&null!==t.earned.value&&t.earned.value[Symbol.for("!")]?t.earned.value[Symbol.for("!")]():!t.earned.value}()&&(0,r.unref)(t.visibility)===y.EE.Visible&&function(){return void 0!==(e=t.shouldEarn)&&null!==(e=t.shouldEarn)&&(e=t.shouldEarn)[Symbol.for("!==")]?(e=t.shouldEarn)[Symbol.for("!==")](null):null!==(e=t.shouldEarn)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.call(t)&&(t.earned.value=!0,null===(n=t.onComplete)||void 0===n||n.call(t),t.display)){var o=(0,w.MM)((0,r.unref)(t.display));he.info((0,r.createVNode)("div",null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Achievement earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(o,null,null)])]))}}))}return o}),(0,g.ax)(!1))}o(9714),o(7042);function Ve(e,n,o,t,l,i){var u=(0,r.resolveComponent)("GridCell");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.rows),(function(n){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["row",{mergeAdjacent:e.mergeAdjacent}]),key:n},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.cols),(function(o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherCellProps(e.unref(e.cells)[function(){return 100*n!==void 0&&100*n!==null&&(100*n)[Symbol.for("+")]?(100*n)[Symbol.for("+")](o):100*n+o}()])),null,16)})),128))],2)})),128))],4)):(0,r.createCommentVNode)("",!0)}var xe=o(1037),Me=o(9266),Ze={key:0};function Ce(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,class:(0,r.normalizeClass)({feature:!0,tile:!0,can:e.unref(e.canClick),locked:function(){return void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick)}()}),style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),onClick:n[0]||(n[0]=function(){return e.onClick&&e.onClick.apply(e,arguments)}),onMousedown:n[1]||(n[1]=function(){return e.start&&e.start.apply(e,arguments)}),onMouseleave:n[2]||(n[2]=function(){return e.stop&&e.stop.apply(e,arguments)}),onMouseup:n[3]||(n[3]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchstart:n[4]||(n[4]=function(){return e.start&&e.start.apply(e,arguments)}),onTouchend:n[5]||(n[5]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchcancel:n[6]||(n[6]=function(){return e.stop&&e.stop.apply(e,arguments)})},[e.title?((0,r.openBlock)(),(0,r.createElementBlock)("div",Ze,[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.titleComponent)))])):(0,r.createCommentVNode)("",!0),((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component),{style:{"white-space":"pre-line"}})),(0,r.createVNode)(a,{id:e.id},null,8,["id"])],38)):(0,r.createCommentVNode)("",!0)}var we=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,w.P5)(Object,String,Function),required:!0},title:(0,w.P5)(Object,String,Function),style:(0,w.P5)(String,Object,Array),canClick:{type:(0,w.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.onClick,t=n.onHold,l=n.title,i=n.display,u=(0,w.ix)(o,t),a=u.start,f=u.stop,c=(0,w.KO)(l),s=(0,w.vq)(i);return{start:a,stop:f,titleComponent:c,component:s,Visibility:y.EE,unref:r.unref}}});const Be=(0,u.Z)(we,[["render",Ce],["__scopeId","data-v-b1182ac6"]]);var Pe=Be,Ee=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},rows:{type:(0,w.P5)(Number),required:!0},cols:{type:(0,w.P5)(Number),required:!0},cells:{type:(0,w.P5)(Object),required:!0}},components:{GridCell:Pe},setup:function(){var e=(0,r.computed)((function(){return xe.Z[Me.ZP.theme].mergeAdjacent}));function n(e){var n=e.visibility,o=e.onClick,r=e.onHold,t=e.display,l=e.title,i=e.style,u=e.canClick,a=e.id;return{visibility:n,onClick:o,onHold:r,display:t,title:l,style:i,canClick:u,id:a}}return{unref:r.unref,gatherCellProps:n,Visibility:y.EE,mergeAdjacent:e}}});const Te=(0,u.Z)(Ee,[["render",Ve]]);var Fe=Te,Ie=o(1349);Symbol("Grid");function De(e){return new Proxy({},Re(e))}function Re(e){var n=(0,r.computed)((function(){for(var n=[],o=1;function(){return void 0!==o&&null!==o&&o[Symbol.for("<=")]?o[Symbol.for("<=")]((0,r.unref)(e.rows)):o<=(0,r.unref)(e.rows)}();function(){return void 0!==o&&null!==o&&"object"===(0,b.Z)(o)&&o[Symbol.for("postfix-increment")]?o[Symbol.for("postfix-increment")]():o++}())for(var t=1;function(){return void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")]((0,r.unref)(e.cols)):t<=(0,r.unref)(e.cols)}();function(){return void 0!==t&&null!==t&&"object"===(0,b.Z)(t)&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++}())n.push(function(){return 100*o!==void 0&&100*o!==null&&(100*o)[Symbol.for("+")]?(100*o)[Symbol.for("+")](t):100*o+t}().toString());return n}));return{get:function(o,r){return"isProxy"===r||("symbol"===(0,b.Z)(r)?e[r]:function(){return void 0!==n.value.includes(r.toString())&&null!==n.value.includes(r.toString())&&n.value.includes(r.toString())[Symbol.for("!")]?n.value.includes(r.toString())[Symbol.for("!")]():!n.value.includes(r.toString())}()?void 0:(function(){return void 0!==o[r]&&null!==o[r]&&o[r][Symbol.for("==")]?o[r][Symbol.for("==")](null):null==o[r]}()&&(o[r]=new Proxy(e,Oe(r.toString()))),o[r]))},set:function(e,n,o){return console.warn("Cannot set grid cells",e,n,o),!1},ownKeys:function(){return n.value},has:function(e,o){return n.value.includes(o.toString())},getOwnPropertyDescriptor:function(e,o){if(n.value.includes(o.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function Oe(e){var n=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],o={};return{get:function(n,t,l){if("isProxy"===t)return!0;var i=n[t];return(0,Ie.mf)(i)?function(){return i.call(l,e,n.getState(e))}:function(){return void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i}()||"symbol"===(0,b.Z)(t)?i:(t=function(){return void 0!==t.slice(0,1).toUpperCase()&&null!==t.slice(0,1).toUpperCase()&&t.slice(0,1).toUpperCase()[Symbol.for("+")]?t.slice(0,1).toUpperCase()[Symbol.for("+")](t.slice(1)):t.slice(0,1).toUpperCase()+t.slice(1)}(),"startState"===t?i.call(l,e):(i=n["get".concat(t)],(0,Ie.mf)(i)?(function(){return t in o!==void 0&&t in o!==null&&(t in o)[Symbol.for("!")]?(t in o)[Symbol.for("!")]():!(t in o)}()&&(o[t]=(0,r.computed)((function(){return i.call(l,e,n.getState(e))}))),o[t].value):function(){return void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i}()?(0,r.unref)(i):(i=n["on".concat(t)],(0,Ie.mf)(i)?function(){return i.call(l,e,n.getState(e))}:function(){return void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i}()?i:n[t])))},set:function(n,o,r,t){return o="set".concat(function(){return void 0!==o.slice(0,1).toUpperCase()&&null!==o.slice(0,1).toUpperCase()&&o.slice(0,1).toUpperCase()[Symbol.for("+")]?o.slice(0,1).toUpperCase()[Symbol.for("+")](o.slice(1)):o.slice(0,1).toUpperCase()+o.slice(1)}()),function(){return void 0!==o&&null!==o&&o[Symbol.for("in")]?o[Symbol.for("in")](n):o in n}()&&(0,Ie.mf)(n[o])&&function(){return void 0!==n[o].length&&null!==n[o].length&&n[o].length[Symbol.for("<")]?n[o].length[Symbol.for("<")](3):n[o].length<3}()?(n[o].call(t,e,r),!0):(console.warn('No setter for "'.concat(o,'".'),n),!1)},ownKeys:function(){return n},has:function(e,o){return n.includes(o.toString())},getOwnPropertyDescriptor:function(e,o){if(n.includes(o.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function _e(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());if(o.id=(0,y.QI)("grid-"),o[y.wA]=Fe,o.getID=function(e){return function(){return o.id+"-"!==void 0&&o.id+"-"!==null&&(o.id+"-")[Symbol.for("+")]?(o.id+"-")[Symbol.for("+")](e):o.id+"-"+e}()},o.getState=function(e){var n=this;return function(){return void 0!==n[g.n9].value[e]&&null!==n[g.n9].value[e]&&n[g.n9].value[e][Symbol.for("!=")]?n[g.n9].value[e][Symbol.for("!=")](void 0):void 0!=n[g.n9].value[e]}()?this[g.n9].value[e]:this.cells[e].startState},o.setState=function(e,n){this[g.n9].value[e]=n},o.cells=De(o),(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"rows"),(0,ne.yB)(o,"cols"),(0,ne.yB)(o,"getVisibility"),(0,y.Rh)(o,"getVisibility",y.EE.Visible),(0,ne.yB)(o,"getCanClick"),(0,y.Rh)(o,"getCanClick",!0),(0,ne.yB)(o,"getStartState"),(0,ne.yB)(o,"getStyle"),(0,ne.yB)(o,"getClasses"),(0,ne.yB)(o,"getTitle"),(0,ne.yB)(o,"getDisplay"),o.onClick){var t=o.onClick.bind(o);o.onClick=function(e,n){(0,r.unref)(o.cells[e].canClick)&&t(e,n)}}if(o.onHold){var l=o.onHold.bind(o);o.onHold=function(e,n){(0,r.unref)(o.cells[e].canClick)&&l(e,n)}}return o[y.tj]=function(){var e=this.visibility,n=this.rows,o=this.cols,r=this.cells,t=this.id;return{visibility:e,rows:n,cols:o,cells:r,id:t}},o}),(0,g.ax)({}))}o(561);function je(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[]]),onClick:n[0]||(n[0]=function(){return e.onClick&&e.onClick.apply(e,arguments)}),onMousedown:n[1]||(n[1]=function(){return e.start&&e.start.apply(e,arguments)}),onMouseleave:n[2]||(n[2]=function(){return e.stop&&e.stop.apply(e,arguments)}),onMouseup:n[3]||(n[3]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchstart:n[4]||(n[4]=function(){return e.start&&e.start.apply(e,arguments)}),onTouchend:n[5]||(n[5]=function(){return e.stop&&e.stop.apply(e,arguments)}),onTouchcancel:n[6]||(n[6]=function(){return e.stop&&e.stop.apply(e,arguments)}),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:function(){return void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick)}(),small:e.small},e.unref(e.classes)))},[e.unref(e.comp)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],38)):(0,r.createCommentVNode)("",!0)}var Ae=(0,r.defineComponent)({props:{display:{type:(0,w.P5)(Object,String,Function),required:!0},visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(Object,String,Array),classes:(0,w.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,w.P5)(Boolean),required:!0},small:Boolean,mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:G,MarkNode:Q},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=n.onClick,l=n.onHold,i=(0,r.shallowRef)("");(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())i.value="";else if((0,w.RU)(e))i.value=(0,w.MM)(e);else{var n=(0,w.MM)(e.title||"","h3"),t=(0,w.MM)(e.description,"div");i.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",null,[e.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(n,null,null)]):null,(0,r.createVNode)(t,null,null)])})))}}));var u=(0,w.ix)(t,l),a=u.start,f=u.stop;return{start:a,stop:f,comp:i,Visibility:y.EE,unref:r.unref}}});const Ue=(0,u.Z)(Ae,[["render",je],["__scopeId","data-v-6b39988a"]]);var qe=Ue,ze=Symbol("Clickable");function Le(e){return(0,oe.z2)((function(){var n=e();if(n.id=(0,y.QI)("clickable-"),n.type=ze,n[y.wA]=qe,(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,ne.yB)(n,"classes"),(0,ne.yB)(n,"style"),(0,ne.yB)(n,"mark"),(0,ne.yB)(n,"display"),n.onClick){var o=n.onClick.bind(n);n.onClick=function(e){(0,r.unref)(n.canClick)&&o(e)}}if(n.onHold){var t=n.onHold.bind(n);n.onHold=function(){(0,r.unref)(n.canClick)&&t()}}return n[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,t=this.classes,l=this.onClick,i=this.onHold,u=this.canClick,a=this.small,f=this.mark,c=this.id;return{display:e,visibility:n,style:(0,r.unref)(o),classes:t,onClick:l,onHold:i,canClick:u,small:a,mark:f,id:c}},n}))}function Ge(e){return Le((function(){var n=e();(0,ne.yB)(n,"showNextAt"),(0,y.Rh)(n,"showNextAt",!0),(0,y.Rh)(n,"minimumGain",1),!function(){return void 0!==n.resetDescription&&null!==n.resetDescription&&n.resetDescription[Symbol.for("==")]?n.resetDescription[Symbol.for("==")](null):null==n.resetDescription}()?(0,ne.yB)(n,"resetDescription"):n.resetDescription=(0,r.computed)((function(){return v.ZP.lt(n.conversion.gainResource.value,1e3)?"Reset for ":""})),function(){return void 0!==n.display&&null!==n.display&&n.display[Symbol.for("==")]?n.display[Symbol.for("==")](null):null==n.display}()&&(n.display=(0,y.tZ)((function(){return(0,r.createVNode)("span",null,[(0,r.unref)(n.resetDescription),(0,r.createVNode)("b",null,[M(n.conversion.gainResource,v.ZP.max((0,r.unref)(n.conversion.actualGain),(0,r.unref)(n.minimumGain)))])," ",n.conversion.gainResource.displayName,(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),n.conversion.buyMax?"Next:":"Req:"," ",M(n.conversion.baseResource,n.conversion.buyMax||v.ZP.floor((0,r.unref)(n.conversion.actualGain)).neq(1)?(0,r.unref)(n.conversion.nextAt):(0,r.unref)(n.conversion.currentAt))," ",n.conversion.baseResource.displayName]),[[r.vShow,(0,r.unref)(n.showNextAt)]])])}))),function(){return void 0!==n.canClick&&null!==n.canClick&&n.canClick[Symbol.for("==")]?n.canClick[Symbol.for("==")](null):null==n.canClick}()&&(n.canClick=(0,r.computed)((function(){return v.ZP.gte((0,r.unref)(n.conversion.actualGain),(0,r.unref)(n.minimumGain))})));var o=n.onClick;return n.onClick=function(){(function(){return void 0!==(0,r.unref)(n.canClick)&&null!==(0,r.unref)(n.canClick)&&(0,r.unref)(n.canClick)[Symbol.for("!")]?(0,r.unref)(n.canClick)[Symbol.for("!")]():!(0,r.unref)(n.canClick)})()||(n.conversion.convert(),n.tree.reset(n.treeNode),null===o||void 0===o||o())},n}))}function He(e){return le((function(){var n=e();return(0,ne.yB)(n,"display"),(0,y.Rh)(n,"display",n.layerID),(0,ne.yB)(n,"append"),(0,A.Z)((0,A.Z)({},n),{},{display:n.layerID,onClick:(0,r.unref)(n.append)?function(){if(fe.Z.tabs.includes(n.layerID)){var e=fe.Z.tabs.lastIndexOf(n.layerID);fe.Z.tabs.splice(e,1)}else fe.Z.tabs.push(n.layerID)}:function(){fe.Z.tabs.splice(1,1,n.layerID)}})}))}function We(e){return(0,oe.z2)((function(){var n=e();return function(){return void 0!==n.currentGain&&null!==n.currentGain&&n.currentGain[Symbol.for("==")]?n.currentGain[Symbol.for("==")](null):null==n.currentGain}()&&(n.currentGain=(0,r.computed)((function(){var e=n.gainModifier?n.gainModifier.apply(n.scaling.currentGain(n)):n.scaling.currentGain(n);return e=v.ZP.floor(e).max(0),function(){return void 0!==(0,r.unref)(n.buyMax)&&null!==(0,r.unref)(n.buyMax)&&(0,r.unref)(n.buyMax)[Symbol.for("!")]?(0,r.unref)(n.buyMax)[Symbol.for("!")]():!(0,r.unref)(n.buyMax)}()&&(e=e.min(1)),e}))),function(){return void 0!==n.actualGain&&null!==n.actualGain&&n.actualGain[Symbol.for("==")]?n.actualGain[Symbol.for("==")](null):null==n.actualGain}()&&(n.actualGain=n.currentGain),function(){return void 0!==n.currentAt&&null!==n.currentAt&&n.currentAt[Symbol.for("==")]?n.currentAt[Symbol.for("==")](null):null==n.currentAt}()&&(n.currentAt=(0,r.computed)((function(){var e=n.scaling.currentAt(n);return n.roundUpCost&&(e=v.ZP.ceil(e)),e}))),function(){return void 0!==n.nextAt&&null!==n.nextAt&&n.nextAt[Symbol.for("==")]?n.nextAt[Symbol.for("==")](null):null==n.nextAt}()&&(n.nextAt=(0,r.computed)((function(){var e=n.scaling.nextAt(n);return n.roundUpCost&&(e=v.ZP.ceil(e)),e}))),function(){return void 0!==n.convert&&null!==n.convert&&n.convert[Symbol.for("==")]?n.convert[Symbol.for("==")](null):null==n.convert}()&&(n.convert=function(){n.gainResource.value=v.ZP.add(n.gainResource.value,(0,r.unref)(n.currentGain)),n.baseResource.value=0}),(0,ne.yB)(n,"currentGain"),(0,ne.yB)(n,"actualGain"),(0,ne.yB)(n,"currentAt"),(0,ne.yB)(n,"nextAt"),(0,ne.yB)(n,"buyMax"),(0,y.Rh)(n,"buyMax",!0),(0,ne.yB)(n,"roundUpCost"),(0,y.Rh)(n,"roundUpCost",!0),n}))}function Ye(e,n){return{currentGain:function(o){var t=v.ZP.div(o.baseResource.value,(0,r.unref)(e)).pow((0,r.unref)(n));return t.isNan()?new v.ZP(0):t},currentAt:function(o){var t=(0,r.unref)(o.currentGain);return o.gainModifier&&(t=o.gainModifier.revert(t)),t=v.ZP.max(0,t),v.ZP.root(t,(0,r.unref)(n)).times((0,r.unref)(e))},nextAt:function(o){var t=v.ZP.add((0,r.unref)(o.currentGain),1);return o.gainModifier&&(t=o.gainModifier.revert(t)),t=v.ZP.max(0,t),v.ZP.root(t,(0,r.unref)(n)).times((0,r.unref)(e)).max((0,r.unref)(e))}}}function Ke(e){return We(e)}function Je(e){return We((function(){var n=e();return(0,y.Rh)(n,"buyMax",!1),function(){return void 0!==n.currentGain&&null!==n.currentGain&&n.currentGain[Symbol.for("==")]?n.currentGain[Symbol.for("==")](null):null==n.currentGain}()&&(n.currentGain=(0,r.computed)((function(){var e=n.gainModifier?n.gainModifier.apply(n.scaling.currentGain(n)):n.scaling.currentGain(n);return e=v.ZP.floor(e).max(n.gainResource.value),function(){return void 0!==(0,r.unref)(n.buyMax)&&null!==(0,r.unref)(n.buyMax)&&(0,r.unref)(n.buyMax)[Symbol.for("!")]?(0,r.unref)(n.buyMax)[Symbol.for("!")]():!(0,r.unref)(n.buyMax)}()&&(e=e.min(v.ZP.add(n.gainResource.value,1))),e}))),function(){return void 0!==n.actualGain&&null!==n.actualGain&&n.actualGain[Symbol.for("==")]?n.actualGain[Symbol.for("==")](null):null==n.actualGain}()&&(n.actualGain=(0,r.computed)((function(){var e=v.ZP.sub(n.scaling.currentGain(n),n.gainResource.value).max(0);return function(){return void 0!==(0,r.unref)(n.buyMax)&&null!==(0,r.unref)(n.buyMax)&&(0,r.unref)(n.buyMax)[Symbol.for("!")]?(0,r.unref)(n.buyMax)[Symbol.for("!")]():!(0,r.unref)(n.buyMax)}()&&(e=e.min(1)),e}))),(0,y.Rh)(n,"convert",(function(){n.gainResource.value=n.gainModifier?n.gainModifier.apply((0,r.unref)(n.currentGain)):(0,r.unref)(n.currentGain),n.baseResource.value=0})),n}))}function Qe(e,n){var o=arguments,r=function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()&&function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()?arguments[2]:.5;return v.ZP.lte(e,n)?e:v.ZP.pow(e,r).times(v.ZP.pow(n,v.ZP.sub(1,r)))}function $e(e,n){var o=arguments,t=function(){return void 0!==o.length&&null!==o.length&&o.length[Symbol.for(">")]?o.length[Symbol.for(">")](2):o.length>2}()&&function(){return void 0!==o[2]&&null!==o[2]&&o[2][Symbol.for("!==")]?o[2][Symbol.for("!==")](void 0):void 0!==o[2]}()?arguments[2]:.5;return(0,A.Z)((0,A.Z)({},e),{},{currentGain:function(o){return Qe(e.currentGain(o),(0,r.unref)(n),(0,r.unref)(t))}})}var Xe=function(e){return(0,r.pushScopeId)("data-v-6447a93e"),e=e(),(0,r.popScopeId)(),e},en=Xe((function(){return(0,r.createElementVNode)("span",{class:"toggle"},"▼",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())}));function nn(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("CollapseTransition"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["infobox",(0,A.Z)({collapsed:e.unref(e.collapsed),stacked:e.stacked},e.unref(e.classes))]),style:(0,r.normalizeStyle)([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}])},[(0,r.createElementVNode)("button",{class:"title",style:(0,r.normalizeStyle)([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:n[0]||(n[0]=function(n){return e.collapsed.value=function(){return void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed)}()})},[en,((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.titleComponent)))],4),(0,r.createVNode)(a,null,{default:(0,r.withCtx)((function(){return[function(){return void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed)}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"body",style:(0,r.normalizeStyle)({backgroundColor:e.unref(e.color)})},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.bodyComponent),{style:(0,r.normalizeStyle)(e.unref(e.bodyStyle))},null,8,["style"]))],4)):(0,r.createCommentVNode)("",!0)]})),_:1}),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var on=o(423),rn=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:{type:(0,w.P5)(Object,String,Function),required:!0},title:{type:(0,w.P5)(Object,String,Function),required:!0},color:(0,w.P5)(String),collapsed:{type:Object,required:!0},style:(0,w.P5)(Object,String,Array),titleStyle:(0,w.P5)(Object,String,Array),bodyStyle:(0,w.P5)(Object,String,Array),classes:(0,w.P5)(Object),id:{type:String,required:!0}},components:{Node:G,CollapseTransition:on.Z},setup:function(e){var n=(0,r.toRefs)(e),o=n.title,t=n.display,l=(0,w.vq)(o),i=(0,w.vq)(t),u=(0,r.computed)((function(){return xe.Z[Me.ZP.theme].mergeAdjacent}));return{titleComponent:l,bodyComponent:i,stacked:u,unref:r.unref,Visibility:y.EE}}});const tn=(0,u.Z)(rn,[["render",nn],["__scopeId","data-v-6447a93e"]]);var ln=tn,un=Symbol("Infobox");function an(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());return o.id=(0,y.QI)("infobox-"),o.type=un,o[y.wA]=ln,o.collapsed=o[g.n9],(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"color"),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"titleStyle"),(0,ne.yB)(o,"bodyStyle"),(0,ne.yB)(o,"classes"),(0,ne.yB)(o,"title"),(0,ne.yB)(o,"display"),o[y.tj]=function(){var e=this.visibility,n=this.display,o=this.title,t=this.color,l=this.collapsed,i=this.style,u=this.titleStyle,a=this.bodyStyle,f=this.classes,c=this.id;return{visibility:e,display:n,title:o,color:t,collapsed:l,style:(0,r.unref)(i),titleStyle:u,bodyStyle:a,classes:f,id:c}},o}),(0,g.ax)(!1))}function fn(e,n,o,t,l,i){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{ref:"resizeListener",class:(0,r.normalizeClass)(["resize-listener",e.unref(e.classes)]),style:(0,r.normalizeStyle)(e.unref(e.style))},null,6)}var cn=o(5246);const sn=(0,u.Z)(cn.Z,[["render",fn],["__scopeId","data-v-4e1c0c10"]]);var mn=sn,dn=o(1845),yn=Symbol("Particles");function bn(e){return(0,oe.z2)((function(){var n,o=e();o.id=(0,y.QI)("particles-"),o.type=yn,o[y.wA]=mn,o.app=(0,r.shallowRef)(null),o.addEmitter=function(e){var n=o;return n.app.value?Promise.resolve(new dn.Q5(n.app.value.stage,e)):new Promise((function(n){t.push({resolve:n,config:e})}))};var t=[];function l(e){o.app.value=e,t.forEach((function(n){var o=n.resolve,r=n.config;return o(new dn.Q5(e.stage,r))})),t=[]}return o.onContainerResized=null===(n=o.onContainerResized)||void 0===n?void 0:n.bind(o),o[y.tj]=function(){var e=this.id,n=this.style,o=this.classes,t=this.onContainerResized,i=this.onHotReload;return{id:e,style:(0,r.unref)(n),classes:o,onContainerResized:t,onHotReload:i,onInit:l}},o}))}window.upgradeConfig=dn.oC;var vn=Symbol("Reset");function Sn(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("reset-"),n.type=vn,n.reset=function(){var e,o=function e(n){n&&"object"===(0,b.Z)(n)&&(!function(){return void 0!==g.n9&&null!==g.n9&&g.n9[Symbol.for("in")]?g.n9[Symbol.for("in")](n):g.n9 in n}()?function(){return n instanceof v.ZP!==void 0&&n instanceof v.ZP!==null&&(n instanceof v.ZP)[Symbol.for("!")]?(n instanceof v.ZP)[Symbol.for("!")]():!(n instanceof v.ZP)}()&&function(){return void 0!==(0,r.isRef)(n)&&null!==(0,r.isRef)(n)&&(0,r.isRef)(n)[Symbol.for("!")]?(0,r.isRef)(n)[Symbol.for("!")]():!(0,r.isRef)(n)}()&&Object.values(n).forEach((function(n){return e(n)})):n[g.n9].value=n[g.nY])};(0,r.unref)(n.thingsToReset).forEach(o),S.globalBus.emit("reset",n),null===(e=n.onReset)||void 0===e||e.call(n)},(0,ne.yB)(n,"thingsToReset"),n}))}var gn={};S.globalBus.on("removeLayer",(function(e){var n;null===(n=gn[e.id])||void 0===n||n.call(gn),gn[e.id]=void 0}));var pn=(0,r.defineComponent)({props:{resource:null,color:null},setup:function(e){var n=e,o=(0,r.computed)((function(){return M(n.resource)}));return function(n,t){return(0,r.openBlock)(),(0,r.createElementBlock)("h2",{style:(0,r.normalizeStyle)({color:e.color,"text-shadow":function(){return"0px 0px 10px "[Symbol.for("+")]?"0px 0px 10px "[Symbol.for("+")](e.color):"0px 0px 10px "+e.color}()})},(0,r.toDisplayString)((0,r.unref)(o)),5)}}});const hn=pn;var Nn=hn,kn={key:0},Vn={key:1},xn=(0,r.createTextVNode)(", "),Mn=(0,r.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),Zn=(0,r.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),Cn=(0,r.defineComponent)({props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,w.KO)(o.effectDisplay),l=(0,r.computed)((function(){return v.ZP.lt(o.resource.value,"1e1000")}));return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",null,[(0,r.unref)(l)?((0,r.openBlock)(),(0,r.createElementBlock)("span",kn,"You have ")):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(Nn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),(0,r.createTextVNode)(function(){return" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,r.toDisplayString)(e.resource.displayName)):" "+(0,r.toDisplayString)(e.resource.displayName)}(),1),(0,r.unref)(t)?((0,r.openBlock)(),(0,r.createElementBlock)("span",Vn,[xn,((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(t))))])):(0,r.createCommentVNode)("",!0),Mn,Zn])}}});const wn=Cn;var Bn=wn,Pn=o(4096);function En(e,n,o){var t=(0,ne.UI)(e),l=(0,ne.UI)(n),i=(0,ne.UI)(!!function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||o);return{apply:function(e){return v.ZP.add(e,(0,r.unref)(t))},revert:function(e){return v.ZP.sub(e,(0,r.unref)(t))},enabled:i,description:(0,y.tZ)((function(){return(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,r.createTextVNode)("+"),(0,v.WU)((0,r.unref)(t))]),(0,r.unref)(l)?(0,r.createVNode)("span",{class:"modifier-description"},[(0,w.qF)((0,r.unref)(l))]):null])}))}}function Tn(e,n,o){var t=(0,ne.UI)(e),l=(0,ne.UI)(n),i=(0,ne.UI)(!!function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||o);return{apply:function(e){return v.ZP.times(e,(0,r.unref)(t))},revert:function(e){return v.ZP.div(e,(0,r.unref)(t))},enabled:i,description:(0,y.tZ)((function(){return(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,r.createTextVNode)("x"),(0,v.WU)((0,r.unref)(t))]),(0,r.unref)(l)?(0,r.createVNode)("span",{class:"modifier-description"},[(0,w.qF)((0,r.unref)(l))]):null])}))}}function Fn(e,n,o){var t=(0,ne.UI)(e),l=(0,ne.UI)(n),i=(0,ne.UI)(!!function(){return void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o}()||o);return{apply:function(e){return v.ZP.pow(e,(0,r.unref)(t))},revert:function(e){return v.ZP.root(e,(0,r.unref)(t))},enabled:i,description:(0,y.tZ)((function(){return(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,r.createTextVNode)("^"),(0,v.WU)((0,r.unref)(t))]),(0,r.unref)(l)?(0,r.createVNode)("span",{class:"modifier-description"},[(0,w.qF)((0,r.unref)(l))]):null])}))}}function In(){for(var e=arguments.length,n=new Array(e),o=0;function(){return void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](e):o")]?n.filter((function(e){return(0,r.unref)(e.enabled)})).length[Symbol.for(">")](0):n.filter((function(e){return(0,r.unref)(e.enabled)})).length>0}()})),description:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[n.filter((function(e){return(0,r.unref)(e.enabled)})).map((function(e){return(0,r.unref)(e.description)})).filter((function(e){return e})).map(w.qF)])}))}}function Dn(e,n,o){var t=arguments,l=function(){return void 0!==t.length&&null!==t.length&&t.length[Symbol.for(">")]?t.length[Symbol.for(">")](3):t.length>3}()&&function(){return void 0!==t[3]&&null!==t[3]&&t[3][Symbol.for("!==")]?t[3][Symbol.for("!==")](void 0):void 0!==t[3]}()?arguments[3]:1,i=function(){return void 0!==t.length&&null!==t.length&&t.length[Symbol.for(">")]?t.length[Symbol.for(">")](4):t.length>4}()&&function(){return void 0!==t[4]&&null!==t[4]&&t[4][Symbol.for("!==")]?t[4][Symbol.for("!==")](void 0):void 0!==t[4]}()?arguments[4]:"";return(0,r.createVNode)("div",null,[(0,r.createVNode)("h3",null,[e,n?(0,r.createVNode)("span",{class:"subtitle"},[(0,r.createTextVNode)(" ("),n,(0,r.createTextVNode)(")")]):null]),(0,r.createVNode)("br",null,null),(0,r.createVNode)("div",{class:"modifier-container"},[(0,r.createVNode)("span",{class:"modifier-amount"},[(0,v.WU)(l),i]),(0,r.createVNode)("span",{class:"modifier-description"},[(0,r.createTextVNode)("Base")])]),(0,w.qF)((0,r.unref)(o.description)),(0,r.createVNode)("hr",null,null),(0,r.createTextVNode)("Total: "),(0,v.WU)(o.apply(l)),i])}var Rn={class:"field"},On={key:0,class:"field-title"},_n=["min","max"],jn=(0,r.defineComponent)({props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup:function(e,n){var o=n.emit,t=e,l=(0,r.toRefs)(t),i=(0,r.computed)({get:function(){return String((0,r.unref)(l.modelValue)||0)},set:function(e){o("update:modelValue",Number(e))}});return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",Rn,[e.title?((0,r.openBlock)(),(0,r.createElementBlock)("span",On,(0,r.toDisplayString)(e.title),1)):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(me.Z,{display:"".concat((0,r.unref)(i)),class:(0,r.normalizeClass)({fullWidth:function(){return void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title}()})},{default:(0,r.withCtx)((function(){return[(0,r.withDirectives)((0,r.createElementVNode)("input",{type:"range","onUpdate:modelValue":o[0]||(o[0]=function(e){return(0,r.isRef)(i)?i.value=e:null}),min:e.min,max:e.max},null,8,_n),[[r.vModelText,(0,r.unref)(i)]])]})),_:1},8,["display","class"])])}}});const An=(0,u.Z)(jn,[["__scopeId","data-v-20a0a34d"]]);var Un=An,qn=o(4520),zn=o(9868),Ln=o(9905),Gn=(0,r.defineComponent)({setup:function(e){var n=(0,r.ref)("0"),o=new ResizeObserver(l),t=(0,r.ref)(null);function l(){var e=t.value;if(!function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e}()){var o=0;while(e.previousSibling){var r=e.previousSibling;r.dataset&&function(){return"vSticky"[Symbol.for("in")]?"vSticky"[Symbol.for("in")](r.dataset):"vSticky"in r.dataset}()&&(o=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](r.offsetHeight):o+r.offsetHeight}()),e=r}n.value=function(){return void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]("px"):o+"px"}()}}return(0,r.nextTick)(l),document.fonts.ready.then(l),(0,r.onMounted)((function(){var e,n=null===(e=t.value)||void 0===e?void 0:e.parentElement;n&&o.observe(n)})),function(e,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"sticky",style:(0,r.normalizeStyle)({top:n.value}),ref_key:"element",ref:t,"data-v-sticky":""},[(0,r.renderSlot)(e.$slots,"default")],4)}}});const Hn=(0,u.Z)(Gn,[["__scopeId","data-v-6987dd96"]]);var Wn=Hn,Yn=(0,r.defineComponent)({props:{height:null},setup:function(e){return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vr",style:(0,r.normalizeStyle)({height:e.height})},null,4)}}});const Kn=(0,u.Z)(Yn,[["__scopeId","data-v-15f6e746"]]);var Jn=Kn,Qn=o(6948);function $n(e,n,o,t,l,i){var u,a,f,c,s,m,d,y=(0,r.resolveComponent)("MarkNode"),b=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{width:function(){return void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px"}(),height:function(){return void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px"}(),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),class:(0,r.normalizeClass)((0,A.Z)({bar:!0},e.unref(e.classes)))},[(0,r.createElementVNode)("div",{class:"overlayTextContainer border",style:(0,r.normalizeStyle)([{width:function(){return void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px"}(),height:function(){return void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px"}()},function(){return void 0!==(a=e.unref(e.borderStyle))&&null!==(a=e.unref(e.borderStyle))&&(a=e.unref(e.borderStyle))[Symbol.for("!==")]?(a=e.unref(e.borderStyle))[Symbol.for("!==")](null):null!==(a=e.unref(e.borderStyle))}()&&function(){return void 0!==a&&null!==a&&a[Symbol.for("!==")]?a[Symbol.for("!==")](void 0):void 0!==a}()?a:{}])},[e.component?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component),{key:0,class:"overlayText",style:(0,r.normalizeStyle)(e.unref(e.textStyle))},null,8,["style"])):(0,r.createCommentVNode)("",!0)],4),(0,r.createElementVNode)("div",{class:"border",style:(0,r.normalizeStyle)([{width:function(){return void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px"}(),height:function(){return void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px"}()},function(){return void 0!==(f=e.unref(e.style))&&null!==(f=e.unref(e.style))&&(f=e.unref(e.style))[Symbol.for("!==")]?(f=e.unref(e.style))[Symbol.for("!==")](null):null!==(f=e.unref(e.style))}()&&function(){return void 0!==f&&null!==f&&f[Symbol.for("!==")]?f[Symbol.for("!==")](void 0):void 0!==f}()?f:{},function(){return void 0!==(c=e.unref(e.baseStyle))&&null!==(c=e.unref(e.baseStyle))&&(c=e.unref(e.baseStyle))[Symbol.for("!==")]?(c=e.unref(e.baseStyle))[Symbol.for("!==")](null):null!==(c=e.unref(e.baseStyle))}()&&function(){return void 0!==c&&null!==c&&c[Symbol.for("!==")]?c[Symbol.for("!==")](void 0):void 0!==c}()?c:{},function(){return void 0!==(s=e.unref(e.borderStyle))&&null!==(s=e.unref(e.borderStyle))&&(s=e.unref(e.borderStyle))[Symbol.for("!==")]?(s=e.unref(e.borderStyle))[Symbol.for("!==")](null):null!==(s=e.unref(e.borderStyle))}()&&function(){return void 0!==s&&null!==s&&s[Symbol.for("!==")]?s[Symbol.for("!==")](void 0):void 0!==s}()?s:{}])},[(0,r.createElementVNode)("div",{class:"fill",style:(0,r.normalizeStyle)([e.barStyle,function(){return void 0!==(m=e.unref(e.style))&&null!==(m=e.unref(e.style))&&(m=e.unref(e.style))[Symbol.for("!==")]?(m=e.unref(e.style))[Symbol.for("!==")](null):null!==(m=e.unref(e.style))}()&&function(){return void 0!==m&&null!==m&&m[Symbol.for("!==")]?m[Symbol.for("!==")](void 0):void 0!==m}()?m:{},function(){return void 0!==(d=e.unref(e.fillStyle))&&null!==(d=e.unref(e.fillStyle))&&(d=e.unref(e.fillStyle))[Symbol.for("!==")]?(d=e.unref(e.fillStyle))[Symbol.for("!==")](null):null!==(d=e.unref(e.fillStyle))}()&&function(){return void 0!==d&&null!==d&&d[Symbol.for("!==")]?d[Symbol.for("!==")](void 0):void 0!==d}()?d:{}])},null,4)],4),(0,r.createVNode)(y,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(b,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var Xn=(0,r.defineComponent)({props:{progress:{type:(0,w.P5)(String,Object,Number),required:!0},width:{type:(0,w.P5)(Number),required:!0},height:{type:(0,w.P5)(Number),required:!0},direction:{type:(0,w.P5)(String),required:!0},display:(0,w.P5)(Object,String,Function),visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(Object,String,Array),classes:(0,w.P5)(Object),borderStyle:(0,w.P5)(Object,String,Array),textStyle:(0,w.P5)(Object,String,Array),baseStyle:(0,w.P5)(Object,String,Array),fillStyle:(0,w.P5)(Object,String,Array),mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Q,Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.progress,t=n.width,l=n.height,i=n.direction,u=n.display,a=(0,r.computed)((function(){var e=o.value instanceof v.ZP?o.value.toNumber():Number(o.value);return function(){return 1-Math.min(Math.max(e,0),1)!==void 0&&1-Math.min(Math.max(e,0),1)!==null&&(1-Math.min(Math.max(e,0),1))[Symbol.for("*")]?(1-Math.min(Math.max(e,0),1))[Symbol.for("*")](100):100*(1-Math.min(Math.max(e,0),1))}()})),f=(0,r.computed)((function(){var e={width:function(){return(0,w.Uv)(t)+.5!==void 0&&(0,w.Uv)(t)+.5!==null&&((0,w.Uv)(t)+.5)[Symbol.for("+")]?((0,w.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,w.Uv)(t)+.5+"px"}(),height:function(){return(0,w.Uv)(l)+.5!==void 0&&(0,w.Uv)(l)+.5!==null&&((0,w.Uv)(l)+.5)[Symbol.for("+")]?((0,w.Uv)(l)+.5)[Symbol.for("+")]("px"):(0,w.Uv)(l)+.5+"px"}()};switch((0,r.unref)(i)){case no.Up:e.clipPath="inset(".concat(a.value,"% 0% 0% 0%)"),e.width=function(){return(0,w.Uv)(t)+1!==void 0&&(0,w.Uv)(t)+1!==null&&((0,w.Uv)(t)+1)[Symbol.for("+")]?((0,w.Uv)(t)+1)[Symbol.for("+")]("px"):(0,w.Uv)(t)+1+"px"}();break;case no.Down:e.clipPath="inset(0% 0% ".concat(a.value,"% 0%)"),e.width=function(){return(0,w.Uv)(t)+1!==void 0&&(0,w.Uv)(t)+1!==null&&((0,w.Uv)(t)+1)[Symbol.for("+")]?((0,w.Uv)(t)+1)[Symbol.for("+")]("px"):(0,w.Uv)(t)+1+"px"}();break;case no.Right:e.clipPath="inset(0% ".concat(a.value,"% 0% 0%)");break;case no.Left:e.clipPath="inset(0% 0% 0% ".concat(a.value," + '%)");break;case no.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),c=(0,w.KO)(u);return{normalizedProgress:a,barStyle:f,component:c,unref:r.unref,Visibility:y.EE}}});const eo=(0,u.Z)(Xn,[["render",$n],["__scopeId","data-v-e6e3c366"]]);var no,oo=eo,ro=Symbol("Bar");function to(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("bar-"),n.type=ro,n[y.wA]=oo,(0,ne.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,ne.yB)(n,"width"),(0,ne.yB)(n,"height"),(0,ne.yB)(n,"direction"),(0,ne.yB)(n,"style"),(0,ne.yB)(n,"classes"),(0,ne.yB)(n,"borderStyle"),(0,ne.yB)(n,"baseStyle"),(0,ne.yB)(n,"textStyle"),(0,ne.yB)(n,"fillStyle"),(0,ne.yB)(n,"progress"),(0,ne.yB)(n,"display"),(0,ne.yB)(n,"mark"),n[y.tj]=function(){var e=this.progress,n=this.width,o=this.height,t=this.direction,l=this.display,i=this.visibility,u=this.style,a=this.classes,f=this.borderStyle,c=this.textStyle,s=this.baseStyle,m=this.fillStyle,d=this.mark,y=this.id;return{progress:e,width:n,height:o,direction:t,display:l,visibility:i,style:(0,r.unref)(u),classes:a,borderStyle:f,textStyle:c,baseStyle:s,fillStyle:m,mark:d,id:y}},n}))}(function(e){e["Up"]="Up",e["Down"]="Down",e["Left"]="Left",e["Right"]="Right",e["Default"]="Up"})(no||(no={}));var lo=Symbol("Buyable");function io(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());if(function(){return void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase}()&&(function(){return void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource}()||function(){return void 0!==o.cost&&null!==o.cost&&o.cost[Symbol.for("==")]?o.cost[Symbol.for("==")](null):null==o.cost}()))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",o),"Cannot create buyable without a canPurchase property or a resource and cost property";o.id=(0,y.QI)("buyable-"),o.type=lo,o[y.wA]=qe,o.amount=o[g.n9],o.canAfford=(0,r.computed)((function(){var e=o,n=(0,r.unref)(e.cost);return function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!=")]?n[Symbol.for("!=")](null):null!=n}()&&v.ZP.gte(e.resource.value,n)})),function(){return void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase}()&&(o.canPurchase=(0,r.computed)((function(){return(0,r.unref)(o.visibility)===y.EE.Visible&&(0,r.unref)(o.canAfford)&&v.ZP.lt(o.amount.value,(0,r.unref)(o.purchaseLimit))}))),o.maxed=(0,r.computed)((function(){return v.ZP.gte(o.amount.value,(0,r.unref)(o.purchaseLimit))})),(0,ne.yB)(o,"classes");var t=o.classes;o.classes=(0,r.computed)((function(){var e=(0,r.unref)(t)||{};return o.maxed.value&&(e.bought=!0),e})),(0,ne.yB)(o,"canPurchase"),o.canClick=o.canPurchase,o.onClick=o.purchase=function(){var e,n=o;if(!(function(){return void 0!==(0,r.unref)(n.canPurchase)&&null!==(0,r.unref)(n.canPurchase)&&(0,r.unref)(n.canPurchase)[Symbol.for("!")]?(0,r.unref)(n.canPurchase)[Symbol.for("!")]():!(0,r.unref)(n.canPurchase)}()||function(){return void 0!==n.cost&&null!==n.cost&&n.cost[Symbol.for("==")]?n.cost[Symbol.for("==")](null):null==n.cost}()||function(){return void 0!==n.resource&&null!==n.resource&&n.resource[Symbol.for("==")]?n.resource[Symbol.for("==")](null):null==n.resource}())){var t=(0,r.unref)(n.cost);n.resource.value=v.ZP.sub(n.resource.value,t),n.amount.value=v.ZP.add(n.amount.value,1),null===(e=this.onPurchase)||void 0===e||e.call(this,t)}},(0,ne.yB)(o,"display");var l=o.display;return o.display=(0,y.tZ)((function(){var e=(0,r.unref)(l);if((0,w.RU)(e)){var n=(0,w.MM)(e);return(0,r.createVNode)(n,null,null)}if(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e}()&&function(){return void 0!==o.cost&&null!==o.cost&&o.cost[Symbol.for("!=")]?o.cost[Symbol.for("!=")](null):null!=o.cost}()&&function(){return void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("!=")]?o.resource[Symbol.for("!=")](null):null!=o.resource}()){var t=o,i=(0,w.MM)(e.title||"","h3"),u=(0,w.MM)(e.description),a=(0,w.MM)(e.effectDisplay||""),f=(0,r.unref)(t.purchaseLimit)===v.ZP.dInf?(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Amount: "),(0,v.Ht)(t.amount.value)]):(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Amount: "),(0,v.Ht)(t.amount.value),(0,r.createTextVNode)(" /")," ",(0,v.Ht)((0,r.unref)(t.purchaseLimit))]);return(0,r.createVNode)("span",null,[e.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(i,null,null)]):null,(0,r.createVNode)(u,null,null),(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),f]),e.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Currently: "),(0,r.createVNode)(a,null,null)]):null,t.cost&&function(){return void 0!==t.maxed.value&&null!==t.maxed.value&&t.maxed.value[Symbol.for("!")]?t.maxed.value[Symbol.for("!")]():!t.maxed.value}()?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Cost: "),(0,v.WU)((0,r.unref)(t.cost)||0)," ",o.resource.displayName]):null])}return""})),(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"cost"),(0,ne.yB)(o,"resource"),(0,ne.yB)(o,"purchaseLimit"),(0,y.Rh)(o,"purchaseLimit",v.ZP.dInf),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"mark"),(0,ne.yB)(o,"small"),o[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,t=this.classes,l=this.onClick,i=this.canClick,u=this.small,a=this.mark,f=this.id;return{display:e,visibility:n,style:(0,r.unref)(o),classes:t,onClick:l,canClick:i,small:u,mark:a,id:f}},o}),(0,g.ax)(0))}o(9826),o(3577);var uo=["disabled"];function ao(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&function(){return void 0!==e.unref(e.maxed)&&null!==e.unref(e.maxed)&&e.unref(e.maxed)[Symbol.for("!")]?e.unref(e.maxed)[Symbol.for("!")]():!e.unref(e.maxed)}(),maxed:e.unref(e.maxed)},e.unref(e.classes)))},[(0,r.createElementVNode)("button",{class:"toggleChallenge",onClick:n[0]||(n[0]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),disabled:function(){return void 0!==e.unref(e.canStart)&&null!==e.unref(e.canStart)&&e.unref(e.canStart)[Symbol.for("!")]?e.unref(e.canStart)[Symbol.for("!")]():!e.unref(e.canStart)}()||e.unref(e.maxed)},(0,r.toDisplayString)(e.buttonText),9,uo),e.unref(e.comp)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var fo=(0,r.defineComponent)({props:{active:{type:(0,w.P5)(Boolean),required:!0},maxed:{type:(0,w.P5)(Boolean),required:!0},canComplete:{type:(0,w.P5)(Boolean),required:!0},display:(0,w.P5)(String,Object,Function),visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),completed:{type:(0,w.P5)(Boolean),required:!0},canStart:{type:(0,w.P5)(Boolean),required:!0},mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:Q,Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.active,t=n.maxed,l=n.canComplete,i=n.display,u=(0,r.computed)((function(){return o.value?l.value?"Finish":"Exit Early":t.value?"Completed":"Start"})),a=(0,r.shallowRef)(""),f=(0,r.computed)((function(){var e=(0,w.Uv)(o),n=(0,w.Uv)(l);return e?n?pe():ge():{}}));return(0,r.watchEffect)((function(){var e=(0,w.Uv)(i);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())a.value="";else if((0,w.RU)(e))a.value=(0,w.MM)(e);else{var n=(0,w.MM)(e.title||"","h3"),o=(0,w.MM)(e.description,"div"),t=(0,w.MM)(e.goal||""),l=(0,w.MM)(e.reward||""),u=(0,w.MM)(e.effectDisplay||"");a.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",null,[e.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(n,null,null)]):null,(0,r.createVNode)(o,null,null),e.goal?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Goal: "),(0,r.createVNode)(t,null,null)]):null,e.reward?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Reward: "),(0,r.createVNode)(l,null,null)]):null,e.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Currently: "),(0,r.createVNode)(u,null,null)]):null])})))}})),{buttonText:u,notifyStyle:f,comp:a,Visibility:y.EE,unref:r.unref}}});const co=(0,u.Z)(fo,[["render",ao],["__scopeId","data-v-5e580749"]]);var so=co,mo=Symbol("ChallengeType");function yo(e){var n=(0,g.ax)(0),o=(0,g.ax)(!1);return(0,oe.z2)((function(){var t=e();if(function(){return void 0!==t.canComplete&&null!==t.canComplete&&t.canComplete[Symbol.for("==")]?t.canComplete[Symbol.for("==")](null):null==t.canComplete}()&&(function(){return void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("==")]?t.resource[Symbol.for("==")](null):null==t.resource}()||function(){return void 0!==t.goal&&null!==t.goal&&t.goal[Symbol.for("==")]?t.goal[Symbol.for("==")](null):null==t.goal}()))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",t),"Cannot create challenge without a canComplete property or a resource and goal property";t.id=(0,y.QI)("challenge-"),t.type=mo,t[y.wA]=so,t.completions=n,t.active=o,t.completed=(0,r.computed)((function(){return v.ZP.gt(t.completions.value,0)})),t.maxed=(0,r.computed)((function(){return v.ZP.gte(t.completions.value,(0,r.unref)(t.completionLimit))})),t.toggle=function(){var e=t;if(e.active.value){var n,o;if((0,r.unref)(e.canComplete)&&function(){return void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value}()){var l,i=(0,r.unref)(e.canComplete);"boolean"===typeof i&&(i=1),e.completions.value=v.ZP.min(v.ZP.add(e.completions.value,i),(0,r.unref)(e.completionLimit)),null===(l=e.onComplete)||void 0===l||l.call(e)}e.active.value=!1,null===(n=e.onExit)||void 0===n||n.call(e),null===(o=e.reset)||void 0===o||o.reset()}else if((0,r.unref)(e.canStart)&&(0,r.unref)(e.visibility)===y.EE.Visible&&function(){return void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value}()){var u,a;null===(u=e.reset)||void 0===u||u.reset(),e.active.value=!0,null===(a=e.onEnter)||void 0===a||a.call(e)}},t.complete=function(e){var n,o,l,i=t,u=(0,r.unref)(i.canComplete);i.active.value&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](!1):!1!==u}()&&(!0===u||v.ZP.neq(0,u))&&function(){return void 0!==i.maxed.value&&null!==i.maxed.value&&i.maxed.value[Symbol.for("!")]?i.maxed.value[Symbol.for("!")]():!i.maxed.value}()&&("boolean"===typeof u&&(u=1),i.completions.value=v.ZP.min(v.ZP.add(i.completions.value,u),(0,r.unref)(i.completionLimit)),null===(n=i.onComplete)||void 0===n||n.call(i),function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e}()&&(i.active.value=!1,null===(o=i.onExit)||void 0===o||o.call(i),null===(l=i.reset)||void 0===l||l.reset()))},(0,ne.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible);var l=t.visibility;return t.visibility=(0,r.computed)((function(){return!0===Me.ZP.hideChallenges&&(0,r.unref)(t.maxed)?y.EE.None:(0,r.unref)(l)})),function(){return void 0!==t.canComplete&&null!==t.canComplete&&t.canComplete[Symbol.for("==")]?t.canComplete[Symbol.for("==")](null):null==t.canComplete}()&&(t.canComplete=(0,r.computed)((function(){var e=t;return!(function(){return void 0!==e.active.value&&null!==e.active.value&&e.active.value[Symbol.for("!")]?e.active.value[Symbol.for("!")]():!e.active.value}()||function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("==")]?e.resource[Symbol.for("==")](null):null==e.resource}()||function(){return void 0!==e.goal&&null!==e.goal&&e.goal[Symbol.for("==")]?e.goal[Symbol.for("==")](null):null==e.goal}())&&v.ZP.gte(e.resource.value,(0,r.unref)(e.goal))}))),function(){return void 0!==t.mark&&null!==t.mark&&t.mark[Symbol.for("==")]?t.mark[Symbol.for("==")](null):null==t.mark}()&&(t.mark=(0,r.computed)((function(){return v.ZP.gt((0,r.unref)(t.completionLimit),1)&&function(){return void 0!==!(0,r.unref)(t.maxed)&&null!==!(0,r.unref)(t.maxed)&&(!(0,r.unref)(t.maxed))[Symbol.for("!")]?(!(0,r.unref)(t.maxed))[Symbol.for("!")]():!!(0,r.unref)(t.maxed)}()}))),(0,ne.yB)(t,"canStart"),(0,y.Rh)(t,"canStart",!0),(0,ne.yB)(t,"canComplete"),(0,ne.yB)(t,"completionLimit"),(0,y.Rh)(t,"completionLimit",1),(0,ne.yB)(t,"mark"),(0,ne.yB)(t,"goal"),(0,ne.yB)(t,"classes"),(0,ne.yB)(t,"style"),(0,ne.yB)(t,"display"),function(){return void 0!==t.reset&&null!==t.reset&&t.reset[Symbol.for("!=")]?t.reset[Symbol.for("!=")](null):null!=t.reset}()&&S.globalBus.on("reset",(function(e){e===t.reset&&t.active.value&&t.toggle()})),t[y.tj]=function(){var e=this.active,n=this.maxed,o=this.canComplete,t=this.display,l=this.visibility,i=this.style,u=this.classes,a=this.completed,f=this.canStart,c=this.mark,s=this.id,m=this.toggle;return{active:e,maxed:n,canComplete:o,display:t,visibility:l,style:(0,r.unref)(i),classes:u,completed:a,canStart:f,mark:c,id:s,toggle:m}},t}))}S.globalBus.on("loadSettings",(function(e){(0,y.Rh)(e,"hideChallenges",!1)})),(0,Me.QV)((0,y.tZ)((function(){return(0,r.createVNode)(zn.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":function(e){return Me.ZP.hideChallenges=e},modelValue:Me.ZP.hideChallenges},null)})));var bo=(0,r.shallowReactive)({}),vo=Symbol("Hotkey");function So(e){return(0,oe.z2)((function(){var n=e();return n.type=vo,(0,ne.yB)(n,"enabled"),(0,y.Rh)(n,"enabled",!0),(0,ne.yB)(n,"description"),n}))}S.globalBus.on("addLayer",(function(e){(0,y.bD)(e,vo).forEach((function(e){bo[e.key]=e}))})),S.globalBus.on("removeLayer",(function(e){(0,y.bD)(e,vo).forEach((function(e){bo[e.key]=void 0}))})),document.onkeydown=function(e){var n;if("INPUT"!==(null===(n=e.target)||void 0===n?void 0:n.tagName)&&(!dr.value||!function(){return void 0!==fe.Z.keepGoing&&null!==fe.Z.keepGoing&&fe.Z.keepGoing[Symbol.for("!")]?fe.Z.keepGoing[Symbol.for("!")]():!fe.Z.keepGoing}())){var o=e.key;e.shiftKey&&(o=function(){return"shift+"[Symbol.for("+")]?"shift+"[Symbol.for("+")](o):"shift+"+o}()),e.ctrlKey&&(o=function(){return"ctrl+"[Symbol.for("+")]?"ctrl+"[Symbol.for("+")](o):"ctrl+"+o}());var t=bo[o];t&&(0,r.unref)(t.enabled)&&(e.preventDefault(),t.onPress())}},(0,Me.fw)((0,y.tZ)((function(){var e=Object.values(bo).filter((function(e){return(0,r.unref)(null===e||void 0===e?void 0:e.enabled)}));return 0===e.length?"":(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createVNode)("h4",null,[(0,r.createTextVNode)("Hotkeys")]),e.map((function(e){return(0,r.createVNode)("div",null,[null===e||void 0===e?void 0:e.key,(0,r.createTextVNode)(": "),null===e||void 0===e?void 0:e.description])}))])})));var go=Symbol("Links");function po(e){return(0,oe.z2)((function(){var n=e();return n.type=go,n[y.wA]=R,(0,ne.yB)(n,"links"),n[y.tj]=function(){var e=this.links;return{links:e}},n}))}var ho=o(3525);function No(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,milestone:!0,done:e.unref(e.earned)},e.unref(e.classes)))},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp)))),(0,r.createVNode)(a,{id:e.id},null,8,["id"])],6)):(0,r.createCommentVNode)("",!0)}var ko=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:{type:(0,w.P5)(String,Object,Function),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),earned:{type:(0,w.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:G},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=(0,r.shallowRef)("");return(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())t.value="";else if((0,w.RU)(e))t.value=(0,w.MM)(e);else{var n=(0,w.MM)(e.requirement,"h3"),l=(0,w.MM)(e.effectDisplay||"","b"),i=(0,w.MM)(e.optionsDisplay||"","span");t.value=(0,w.MM)((0,y.tZ)((function(){return(0,r.createVNode)("span",null,[(0,r.createVNode)(n,null,null),e.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createVNode)(l,null,null)]):null,e.optionsDisplay?(0,r.createVNode)("div",{class:"equal-spaced"},[(0,r.createVNode)(i,null,null)]):null])})))}})),{comp:t,unref:r.unref,Visibility:y.EE}}});const Vo=(0,u.Z)(ko,[["render",No],["__scopeId","data-v-0b660ac3"]]);var xo,Mo=Vo,Zo=(0,Se.pm)(),Co=Symbol("Milestone");function wo(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());o.id=(0,y.QI)("milestone-"),o.type=Co,o[y.wA]=Mo,o.earned=o[g.n9],o.complete=function(){o[g.n9].value=!0},(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible);var t=o.visibility;if(o.visibility=(0,r.computed)((function(){var e=(0,r.unref)(o.display);switch(Me.ZP.msDisplay){default:case xo.All:return(0,r.unref)(t);case xo.Configurable:return(0,r.unref)(o.earned)&&function(){return void 0!==(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)&&null!==(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)&&(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)[Symbol.for("!")]?(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)[Symbol.for("!")]():!(null!=e&&"object"==(0,b.Z)(e)&&"optionsDisplay"in e)}()?y.EE.None:(0,r.unref)(t);case xo.Incomplete:return(0,r.unref)(o.earned)?y.EE.None:(0,r.unref)(t);case xo.None:return y.EE.None}})),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"classes"),(0,ne.yB)(o,"display"),o[y.tj]=function(){var e=this.visibility,n=this.display,o=this.style,t=this.classes,l=this.earned,i=this.id;return{visibility:e,display:n,style:(0,r.unref)(o),classes:t,earned:l,id:i}},o.shouldEarn){var l=o;(0,r.watchEffect)((function(){var e,n;if(function(){return void 0!==l.earned.value&&null!==l.earned.value&&l.earned.value[Symbol.for("!")]?l.earned.value[Symbol.for("!")]():!l.earned.value}()&&(0,r.unref)(l.visibility)===y.EE.Visible&&function(){return void 0!==(e=l.shouldEarn)&&null!==(e=l.shouldEarn)&&(e=l.shouldEarn)[Symbol.for("!==")]?(e=l.shouldEarn)[Symbol.for("!==")](null):null!==(e=l.shouldEarn)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.call(l)&&(l.earned.value=!0,null===(n=l.onComplete)||void 0===n||n.call(l),l.display)){var o=(0,r.unref)(l.display),t=(0,w.MM)((0,w.RU)(o)?o:o.requirement);Zo((0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Milestone earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(t,null,null)])]))}}))}return o}),(0,g.ax)(!1))}(function(e){e["All"]="all",e["Configurable"]="configurable",e["Incomplete"]="incomplete",e["None"]="none"})(xo||(xo={})),S.globalBus.on("loadSettings",(function(e){(0,y.Rh)(e,"msDisplay",xo.All)}));var Bo=Object.values(xo).map((function(e){return{label:(0,Ie.IJ)(e),value:e}}));(0,Me.QV)((0,y.tZ)((function(){return(0,r.createVNode)(ho.Z,{title:"Show Milestones",options:Bo,"onUpdate:modelValue":function(e){return Me.ZP.msDisplay=e},modelValue:Me.ZP.msDisplay},null)})));var Po=(0,r.defineComponent)({props:{display:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=o.display,l=(0,w.vq)(t);return function(e,n){return(0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(l)))}}});const Eo=Po;var To=Eo,Fo=Symbol("Tab");function Io(e){return(0,oe.z2)((function(){var n=e();return n.id=(0,y.QI)("tab-"),n.type=Fo,n[y.wA]=To,n[y.tj]=function(){var e=this.display;return{display:e}},n}))}o(7941);function Do(e,n,o,t,l,i){var u;return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,onClick:n[0]||(n[0]=function(){return e.selectTab&&e.selectTab.apply(e,arguments)}),class:(0,r.normalizeClass)(["tabButton",(0,A.Z)({active:e.active},e.unref(e.classes))]),style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}])},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.component)))],6)):(0,r.createCommentVNode)("",!0)}var Ro=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},display:{type:(0,w.P5)(Object,String,Function),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),glowColor:(0,w.P5)(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup:function(e,n){var o=n.emit,t=(0,r.toRefs)(e),l=t.display,i=t.glowColor,u=t.floating,a=(0,w.vq)(l),f=(0,r.computed)((function(){var e=(0,w.Uv)(i);return function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?{}:(0,r.unref)(u)?ge(e):{boxShadow:"0px 9px 5px -6px ".concat(e)}}));function c(){o("selectTab")}return{selectTab:c,component:a,glowColorStyle:f,unref:r.unref,Visibility:y.EE}}});const Oo=(0,u.Z)(Ro,[["render",Do],["__scopeId","data-v-361380c0"]]);var _o=Oo;function jo(e,n,o,t,l,i){var u,a,f=(0,r.resolveComponent)("TabButton"),c=(0,r.resolveComponent)("Sticky");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["tab-family-container",(0,A.Z)((0,A.Z)({},e.unref(e.classes)),e.tabClasses)]),style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:[],function(){return void 0!==(a=e.tabStyle)&&null!==(a=e.tabStyle)&&(a=e.tabStyle)[Symbol.for("!==")]?(a=e.tabStyle)[Symbol.for("!==")](null):null!==(a=e.tabStyle)}()&&function(){return void 0!==a&&null!==a&&a[Symbol.for("!==")]?a[Symbol.for("!==")](void 0):void 0!==a}()?a:[]])},[(0,r.createVNode)(c,{class:"tab-buttons-container"},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["tab-buttons",{floating:e.floating}])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.tabs),(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(f,(0,r.mergeProps)({onSelectTab:function(n){return e.selected.value=o},floating:e.floating,key:o,active:e.unref(n.tab)===e.unref(e.activeTab)},e.gatherButtonProps(n)),null,16,["onSelectTab","floating","active"])})),128))],2)]})),_:1}),e.unref(e.activeTab)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,r.createCommentVNode)("",!0)],6)):(0,r.createCommentVNode)("",!0)}var Ao=(0,r.defineComponent)({props:{visibility:{type:(0,w.P5)(Number),required:!0},activeTab:{type:(0,w.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,w.P5)(Object),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object)},components:{Sticky:Wn,TabButton:_o},setup:function(e){var n=(0,r.toRefs)(e),o=n.activeTab,t=(0,r.computed)((function(){return xe.Z[Me.ZP.theme].floatingTabs})),l=(0,r.shallowRef)("");(0,r.watchEffect)((function(){var e=(0,w.Uv)(o);!function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}()?(0,w.RU)(e)?l.value=(0,w.MM)(e):l.value=(0,w.MM)((0,r.unref)(e.display)):l.value=""}));var i=(0,r.computed)((function(){var e=(0,w.Uv)(o),n=(0,w.RU)(e)||function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?void 0:(0,r.unref)(e.classes);return n})),u=(0,r.computed)((function(){var e=(0,w.Uv)(o);return(0,w.RU)(e)||function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?void 0:(0,r.unref)(e.style)}));function a(e){var n=e.display,o=e.style,r=e.classes,t=e.glowColor,l=e.visibility;return{display:n,style:o,classes:r,glowColor:t,visibility:l}}return{floating:t,tabClasses:i,tabStyle:u,Visibility:y.EE,component:l,gatherButtonProps:a,unref:r.unref}}});const Uo=(0,u.Z)(Ao,[["render",jo],["__scopeId","data-v-38d5b5f9"]]);var qo=Uo,zo=Symbol("TabButton"),Lo=Symbol("TabFamily");function Go(e,n){if(0===Object.keys(e).length)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";return(0,oe.z2)((function(o){var t=Object.assign(o,null===n||void 0===n?void 0:n());t.id=(0,y.QI)("tabFamily-"),t.type=Lo,t[y.wA]=qo,t.tabs=Object.keys(e).reduce((function(n,o){var r=e[o]();return r.type=zo,r[y.wA]=_o,(0,ne.yB)(r,"visibility"),(0,y.Rh)(r,"visibility",y.EE.Visible),(0,ne.yB)(r,"tab"),(0,ne.yB)(r,"display"),(0,ne.yB)(r,"classes"),(0,ne.yB)(r,"style"),(0,ne.yB)(r,"glowColor"),n[o]=r,n}),{}),t.selected=t[g.n9],t.activeTab=(0,r.computed)((function(){var e=(0,r.unref)(l.tabs);if(function(){return void 0!==t[g.n9].value&&null!==t[g.n9].value&&t[g.n9].value[Symbol.for("in")]?t[g.n9].value[Symbol.for("in")](e):t[g.n9].value in e}()&&(0,r.unref)(e[l[g.n9].value].visibility)===y.EE.Visible)return(0,r.unref)(e[l[g.n9].value].tab);var n=Object.values(e).find((function(e){return(0,r.unref)(e.visibility)===y.EE.Visible}));return n?(0,r.unref)(n.tab):null})),(0,ne.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,ne.yB)(t,"classes"),(0,ne.yB)(t,"style"),t[y.tj]=function(){var e=this.visibility,n=this.activeTab,o=this.selected,t=this.tabs,l=this.style,i=this.classes;return{visibility:e,activeTab:n,selected:o,tabs:t,style:(0,r.unref)(l),classes:i}};var l=t;return l}),(0,g.ax)(Object.keys(e)[0]))}var Ho=["disabled"];function Wo(e,n,o,t,l,i){var u,a=(0,r.resolveComponent)("MarkNode"),f=(0,r.resolveComponent)("Node");return function(){return void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None}()?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,style:(0,r.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},function(){return void 0!==(u=e.unref(e.style))&&null!==(u=e.unref(e.style))&&(u=e.unref(e.style))[Symbol.for("!==")]?(u=e.unref(e.style))[Symbol.for("!==")](null):null!==(u=e.unref(e.style))}()&&function(){return void 0!==u&&null!==u&&u[Symbol.for("!==")]?u[Symbol.for("!==")](void 0):void 0!==u}()?u:{}]),onClick:n[0]||(n[0]=function(){return e.purchase&&e.purchase.apply(e,arguments)}),class:(0,r.normalizeClass)((0,A.Z)({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:function(){return void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase)}(),bought:e.unref(e.bought)},e.unref(e.classes))),disabled:function(){return void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase)}()},[e.unref(e.component)?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(f,{id:e.id},null,8,["id"])],14,Ho)):(0,r.createCommentVNode)("",!0)}var Yo=(0,r.defineComponent)({props:{display:{type:(0,w.P5)(String,Object,Function),required:!0},visibility:{type:(0,w.P5)(Number),required:!0},style:(0,w.P5)(String,Object,Array),classes:(0,w.P5)(Object),resource:Object,cost:(0,w.P5)(String,Object,Number),canPurchase:{type:(0,w.P5)(Boolean),required:!0},bought:{type:(0,w.P5)(Boolean),required:!0},mark:(0,w.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:G,MarkNode:Q},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=n.cost,l=(0,r.shallowRef)("");return(0,r.watchEffect)((function(){var n=(0,w.Uv)(o);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}())l.value="";else if((0,w.RU)(n))l.value=(0,w.MM)(n);else{var i=(0,w.Uv)(t),u=(0,w.MM)(n.title||"","h3"),a=(0,w.MM)(n.description,"div"),f=(0,w.MM)(n.effectDisplay||"");l.value=(0,w.MM)((0,y.tZ)((function(){var o;return(0,r.createVNode)("span",null,[n.title?(0,r.createVNode)("div",null,[(0,r.createVNode)(u,null,null)]):null,(0,r.createVNode)(a,null,null),n.effectDisplay?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Currently: "),(0,r.createVNode)(f,null,null)]):null,function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource}()?(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Cost: "),e.resource&&M(e.resource,i)," ",null===(o=e.resource)||void 0===o?void 0:o.displayName]):null])})))}})),{component:l,unref:r.unref,Visibility:y.EE}}});const Ko=(0,u.Z)(Yo,[["render",Wo],["__scopeId","data-v-264c96b4"]]);var Jo=Ko,Qo=Symbol("Upgrade");function $o(e){return(0,oe.z2)((function(n){var o=Object.assign(n,e());return o.id=(0,y.QI)("upgrade-"),o.type=Qo,o[y.wA]=Jo,function(){return void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford}()&&(function(){return void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource}()||function(){return void 0!==o.cost&&null!==o.cost&&o.cost[Symbol.for("==")]?o.cost[Symbol.for("==")](null):null==o.cost}())&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",o),o.bought=o[g.n9],!function(){return void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford}()?(0,ne.yB)(o,"canAfford"):o.canAfford=(0,r.computed)((function(){var e=o;return function(){return void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource}()&&function(){return void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("!=")]?e.cost[Symbol.for("!=")](null):null!=e.cost}()&&v.ZP.gte(e.resource.value,(0,r.unref)(e.cost))})),o.canPurchase=(0,r.computed)((function(){return(0,r.unref)(o.visibility)===y.EE.Visible&&(0,r.unref)(o.canAfford)&&function(){return void 0!==(0,r.unref)(o.bought)&&null!==(0,r.unref)(o.bought)&&(0,r.unref)(o.bought)[Symbol.for("!")]?(0,r.unref)(o.bought)[Symbol.for("!")]():!(0,r.unref)(o.bought)}()})),o.purchase=function(){var e,n=o;(function(){return void 0!==(0,r.unref)(n.canPurchase)&&null!==(0,r.unref)(n.canPurchase)&&(0,r.unref)(n.canPurchase)[Symbol.for("!")]?(0,r.unref)(n.canPurchase)[Symbol.for("!")]():!(0,r.unref)(n.canPurchase)})()||(function(){return void 0!==n.resource&&null!==n.resource&&n.resource[Symbol.for("!=")]?n.resource[Symbol.for("!=")](null):null!=n.resource}()&&function(){return void 0!==n.cost&&null!==n.cost&&n.cost[Symbol.for("!=")]?n.cost[Symbol.for("!=")](null):null!=n.cost}()&&(n.resource.value=v.ZP.sub(n.resource.value,(0,r.unref)(n.cost))),n[g.n9].value=!0,null===(e=n.onPurchase)||void 0===e||e.call(n))},(0,ne.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,ne.yB)(o,"classes"),(0,ne.yB)(o,"style"),(0,ne.yB)(o,"display"),(0,ne.yB)(o,"mark"),(0,ne.yB)(o,"cost"),(0,ne.yB)(o,"resource"),o[y.tj]=function(){var e=this.display,n=this.visibility,o=this.style,t=this.classes,l=this.resource,i=this.cost,u=this.canPurchase,a=this.bought,f=this.mark,c=this.id,s=this.purchase;return{display:e,visibility:n,style:(0,r.unref)(o),classes:t,resource:l,cost:i,canPurchase:u,bought:a,mark:f,id:c,purchase:s}},o}),(0,g.ax)(!1))}function Xo(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&function(){return void 0!==(0,r.isVNode)(e)&&null!==(0,r.isVNode)(e)&&(0,r.isVNode)(e)[Symbol.for("!")]?(0,r.isVNode)(e)[Symbol.for("!")]():!(0,r.isVNode)(e)}()}var er="c",nr=(0,B.createLayer)(er,(function(){var e="#4BDC13",n="Candies",o=p(0,"lollipops"),t=h(o),l=(0,g.ax)(!1),i=(0,g.ax)("pointy"),u=(0,g.ax)(10),a=(0,g.ax)(new v.ZP(10)),f=(0,r.computed)((function(){return v.ZP.pow(o.value,.2)})),c=(0,r.computed)((function(){return v.ZP.times(o.value,10)})),s=an((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}})),m=wo((function(){return{shouldEarn:function(){return v.ZP.gte(t.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}})),b=wo((function(){return{visibility:function(){return(0,y.Kf)(m.earned.value)},shouldEarn:function(){return v.ZP.gte(t.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(zn.Z,{title:"beep","onUpdate:modelValue":function(e){return l.value=e},modelValue:l.value},null),(0,r.createVNode)(zn.Z,{title:"boop","onUpdate:modelValue":function(e){return ir.boop.value=e},modelValue:ir.boop.value},null)])}))},style:function(){return this.earned?{backgroundColor:"#1111DD"}:{}}}})),S=[m,b],N=yo((function(){return{title:"Fun",completionLimit:3,display:function(){return{description:"Makes the game 0% harder
".concat((0,v.Ht)(this.completions.value),"/").concat(this.completionLimit," completions"),goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:function(){return void 0!==(0,v.WU)(k.value)&&null!==(0,v.WU)(k.value)&&(0,v.WU)(k.value)[Symbol.for("+")]?(0,v.WU)(k.value)[Symbol.for("+")]("x"):(0,v.WU)(k.value)+"x"}()}},visibility:function(){return(0,y.Kf)(v.ZP.gt(t.value,0))},goal:20,resource:sr.points,onComplete:function(){console.log("hiii")},onEnter:function(){sr.points.value=0,sr.best.value=sr.points.value,sr.total.value=sr.points.value,console.log("So challenging")},onExit:function(){console.log("Sweet freedom!")},style:{height:"200px"}}})),k=(0,r.computed)((function(){return v.ZP.add(o.value,1).tetrate(.02)})),V=$o((function(){return{display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:o}})),x=$o((function(){return{display:function(){return{description:"Point generation is faster based on your unspent Lollipops",effectDisplay:"".concat((0,v.WU)(Z.value),"x")}},cost:1,resource:o,visibility:function(){return(0,y.Kf)(V.bought.value)}}})),Z=(0,r.computed)((function(){var e=v.ZP.add(o.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),C=$o((function(){return{visibility:function(){return(0,y.Kf)(x.bought.value)},canAfford:function(){return v.ZP.lt(sr.points.value,7)},onPurchase:function(){sr.points.value=v.ZP.add(sr.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style:function(){var e=this;return this.bought?{backgroundColor:"#1111dd"}:function(){return void 0!==e.canAfford&&null!==e.canAfford&&e.canAfford[Symbol.for("!")]?e.canAfford[Symbol.for("!")]():!e.canAfford}()?{backgroundColor:"#dd1111"}:{}}}})),B=$o((function(){return{resource:p(E.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}})),P=[V,x,C],E=io((function(){return{resource:o,cost:function(){var e=new v.ZP(this.amount.value);e.gte(25)&&(e=e.pow(2).div(25));var n=v.ZP.pow(2,e.pow(1.5));return n.floor()},display:function(){return{title:"Exhancers",description:"Adds ".concat((0,v.WU)(T.value)," things and multiplies stuff by ").concat((0,v.WU)(F.value),".")}},onPurchase:function(e){a.value=v.ZP.add(a.value,e)},style:{height:"222px"},purchaseLimit:4}})),T=(0,r.computed)((function(){return v.ZP.gte(E.amount.value,0)?v.ZP.pow(25,v.ZP.pow(E.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(E.amount.value,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()).pow(1.1))})),F=(0,r.computed)((function(){return v.ZP.gte(E.amount.value,0)?v.ZP.pow(25,v.ZP.pow(E.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(E.amount.value,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()).pow(1.1))})),I=(0,g.ax)(!1),D=(0,r.ref)(!1),R=Le((function(){return{small:!0,display:"Respec Thingies",onClick:function(){I.value&&function(){return void 0!==D.value&&null!==D.value&&D.value[Symbol.for("!")]?D.value[Symbol.for("!")]():!D.value}()?D.value=!0:(o.value=v.ZP.add(o.value,a.value),E.amount.value=0,sr.tree.reset(G))}}})),O=Le((function(){return{small:!0,display:"Sell One",onClick:function(){v.ZP.lte(E.amount.value,0)||(E.amount.value=v.ZP.sub(E.amount.value,1),o.value=v.ZP.add(o.value,E.cost.value),a.value=v.ZP.sub(a.value,E.cost.value))}}})),_=(0,y.tZ)((function(){return(0,r.createVNode)(Ln.Z,null,{default:function(){return[(0,r.createVNode)(se.Z,null,{default:function(){return[(0,r.createVNode)(zn.Z,{title:"Confirm","onUpdate:modelValue":function(e){return I.value=e},modelValue:I.value},null),(0,w._4)(R)]}}),(0,w._4)(E),(0,w._4)(O),(0,r.createVNode)(Qn.Z,{modelValue:D.value,"onUpdate:modelValue":function(e){return D.value=e}},{header:function(){return(0,r.createVNode)("h2",null,[(0,r.createTextVNode)("Confirm Respec")])},body:function(){return(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Are you sure? Respeccing these doesn't accomplish much")])},footer:function(){return(0,r.createVNode)("div",{class:"modal-default-footer"},[(0,r.createVNode)("div",{class:"modal-default-flex-grow"},null),(0,r.createVNode)("button",{class:"button modal-default-button",onClick:function(){return D.value=!1}},[(0,r.createTextVNode)("Cancel")]),(0,r.createVNode)("button",{class:"button modal-default-button danger",onClick:function(){R.onClick(),D.value=!1}},[(0,r.createTextVNode)("Respec")])])}})]}})})),j=to((function(){return{fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:no.Right,width:300,height:30,progress:function(){return v.ZP.add(sr.points.value,1).log(10).div(10).toNumber()},display:function(){return function(){return void 0!==(0,v.WU)(sr.points.value)&&null!==(0,v.WU)(sr.points.value)&&(0,v.WU)(sr.points.value)[Symbol.for("+")]?(0,v.WU)(sr.points.value)[Symbol.for("+")](" / 1e10 points"):(0,v.WU)(sr.points.value)+" / 1e10 points"}()}}})),A=to((function(){return{fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:no.Up,width:50,height:200,progress:function(){return v.ZP.div(sr.points.value,100)},display:function(){return function(){return void 0!==(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))&&null!==(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))&&(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))[Symbol.for("+")]?(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))[Symbol.for("+")]("%"):(0,v.Ht)(v.ZP.div(sr.points.value,1).min(100))+"%"}()}}})),U=to((function(){return{fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:no.Up,width:100,height:30,progress:function(){return v.ZP.div(o.value,50)}}})),q=Ke((function(){return{scaling:$e(Ye(10,.5),1e100,.5),baseResource:sr.points,gainResource:o,roundUpCost:!0,gainModifier:In(Fn(2,"Because I felt like it"),En(1,"Nice modifier"))}})),z=Sn((function(){return{thingsToReset:function(){return[nr]}}})),L=[So((function(){return{key:"c",description:"reset for lollipops or whatever",onPress:function(){H.canClick.value&&H.onClick()}}})),So((function(){return{key:"ctrl+c",description:"respec things",onPress:function(){R.onClick()}}}))],G=He((function(){return{layerID:er,color:e,reset:z,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip:function(){var e=M(o);return v.ZP.gt(E.amount.value,0)&&(e=function(){return void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")]("



".concat((0,v.Ht)(E.amount.value)," Exhancers
")):e+"



".concat((0,v.Ht)(E.amount.value)," Exhancers
")}()),e},style:{color:"#3325CC",textDecoration:"underline"}}}));(0,Pn.Z)(G,{display:ae(o),pinnable:!0});var H=Ge((function(){return{conversion:q,tree:sr.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}}));(0,Pn.Z)(H,{display:(0,y.tZ)((function(){return Dn("Modifiers","",q.gainModifier,q.scaling.currentGain(q))})),pinnable:!0,direction:Pn.A.DOWN,style:"width: 400px; text-align: left"});var W=le((function(){return{display:"TH",color:"#6d3678",canClick:function(){return v.ZP.gte(sr.points.value,10)},tooltip:"Thanos your points",onClick:function(){sr.points.value=v.ZP.div(sr.points.value,2),console.log("Thanos'd")},glowColor:function(){return v.ZP.eq(E.amount.value,1)?"orange":""}}})),Y=le((function(){return{display:"h",color:function(){return xe.Z[Me.ZP.theme].variables["--locked"]},tooltip:{display:(0,r.computed)((function(){return"Restore your points to ".concat((0,v.WU)(u.value))})),right:!0},canClick:function(){return v.ZP.lt(sr.points.value,u.value)},onClick:function(){sr.points.value=u.value}}})),K=le((function(){return{visibility:y.EE.Hidden}})),J=ie((function(){return{nodes:function(){return[[ir.treeNode,G],[W,K,Y]]},branches:function(){return[{startNode:ir.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:W},{startNode:W,endNode:Y}]}}})),Q=po((function(){return{links:[{startNode:Y,endNode:U,"stroke-width":"5px",stroke:"red",offsetEnd:{x:function(){return(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*U.progress.value.toNumber()):100*U.progress.value.toNumber()-50}(),y:0}}]}})),$=Go({first:function(){return{tab:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[w._4.apply(void 0,P),(0,w._4)(B),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("confirmed")])])})),display:"first"}},second:function(){return{tab:ir.display,display:"second"}}},(function(){return{style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}})),X=Go({mainTab:function(){return{tab:Io((function(){return{display:(0,y.tZ)((function(){var n;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(Bn,{resource:o,color:e,effectDisplay:"which are boosting waffles by ".concat((0,v.WU)(f.value)," and increasing the Ice Cream cap by ").concat((0,v.WU)(c.value))},null),(0,r.createVNode)(Wn,null,Xo(n=(0,w.sY)(H))?n:{default:function(){return[n]}}),(0,r.createVNode)(Nn,{resource:o,color:e},null),(0,r.createVNode)(d,{height:"5px"},null),(0,r.createVNode)("button",{onClick:function(){return console.log("yeet")}},[(0,r.createTextVNode)("'HI'")]),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Name your points!")]),(0,r.createVNode)(qn.Z,{modelValue:i.value,"onUpdate:modelValue":function(e){return i.value=e}},null),(0,r.createVNode)(Wn,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:function(){return[(0,r.createTextVNode)("I have "),M(sr.points),(0,r.createTextVNode)(" "),i.value,(0,r.createTextVNode)(" points!")]}}),(0,r.createVNode)("hr",null,null),w.Dy.apply(void 0,S),(0,r.createVNode)(d,null,null),w._4.apply(void 0,P),(0,w._4)(B),(0,w._4)(N)])}))}})),display:"main tab",glowColor:function(){return V.canPurchase.value||x.canPurchase.value||C.canPurchase.value||N.canComplete.value?"blue":""},style:{color:"orange"}}},thingies:function(){return{tab:Io((function(){return{style:function(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(_),(0,r.createVNode)(d,null,null),(0,r.createVNode)(se.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:function(){return[(0,r.createVNode)(zn.Z,{"onUpdate:modelValue":function(e){return l.value=e},modelValue:l.value},null),(0,r.createVNode)(d,{width:"30px",height:"10px"},null),(0,r.createVNode)("div",null,[(0,r.createVNode)("span",null,[(0,r.createTextVNode)("Beep")])]),(0,r.createVNode)(d,null,null),(0,r.createVNode)(Jn,{height:"200px"},null)]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)])}))}})),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}},jail:function(){return{tab:Io((function(){return{display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(s),(0,w.sY)(j),(0,r.createVNode)(d,null,null),(0,r.createVNode)(se.Z,null,{default:function(){return[(0,r.createVNode)(Ln.Z,{style:"background-color: #555555; padding: 15px"},{default:function(){return[(0,r.createVNode)("div",{style:"color: teal"},[(0,r.createTextVNode)("Sugar level:")]),(0,r.createVNode)(d,null,null),(0,w.sY)(A)]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)(Ln.Z,null,{default:function(){return[(0,r.createVNode)("div",null,[(0,r.createTextVNode)("idk")]),(0,r.createVNode)(d,{width:"0",height:"50px"},null),(0,w.sY)(U)]}})]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)("div",null,[(0,r.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,w.sY)(J)])}))}})),display:"jail"}},illuminati:function(){return{tab:Io((function(){return{display:(0,y.tZ)((function(){return(0,r.createVNode)("div",null,[(0,r.createVNode)("h1",null,[(0,r.createTextVNode)(" C O N F I R M E D ")]),(0,r.createVNode)(d,null,null),(0,w.sY)($),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Adjust how many points H gives you!")]),(0,r.createVNode)(Un,{"onUpdate:modelValue":function(e){return u.value=e},modelValue:u.value,min:1,max:30},null)])})),style:{backgroundColor:"#3325CC"}}})),visibility:function(){return(0,y.Kf)(C.bought.value)},display:"illuminati"}}});return{id:er,color:e,name:n,points:o,best:t,beep:l,thingy:i,otherThingy:u,spentOnBuyables:a,waffleBoost:f,icecreamCap:c,coolInfo:s,lollipopMilestones:S,funChallenge:N,funEffect:k,generatorUpgrade:V,lollipopMultiplierUpgrade:x,lollipopMultiplierEffect:Z,unlockIlluminatiUpgrade:C,quasiUpgrade:B,exhancers:E,respecBuyables:R,sellExhancer:O,bars:{tallBoi:A,longBoi:j,flatBoi:U},tree:J,g:W,h:Y,spook:K,conversion:q,reset:z,hotkeys:L,treeNode:G,resetButton:H,confirmRespec:I,minWidth:800,tabs:X,display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(X),(0,w.sY)(Q)])}))}})),or=nr,rr=JSON.parse('{"lifetime":{"min":0.5,"max":1},"ease":[{"s":0,"cp":0.329,"e":0.548},{"s":0.548,"cp":0.767,"e":0.876},{"s":0.876,"cp":0.985,"e":1}],"frequency":0.001,"emitterLifetime":0.1,"maxParticles":100,"addAtBack":true,"pos":{"x":0,"y":0},"emit":false,"behaviors":[{"type":"alpha","config":{"alpha":{"list":[{"time":0,"value":0.74},{"time":1,"value":0}]}}},{"type":"moveSpeed","config":{"speed":{"list":[{"time":0,"value":300},{"time":1,"value":0}]},"minMult":1}},{"type":"scale","config":{"scale":{"list":[{"time":0,"value":1},{"time":1,"value":0.25}]},"minMult":1}},{"type":"color","config":{"color":{"list":[{"time":0,"value":"#ffdfa0"},{"time":1,"value":"#100f0c"}]}}},{"type":"rotation","config":{"accel":0,"minSpeed":0,"maxSpeed":200,"minStart":0,"maxStart":360}},{"type":"textureRandom","config":{"textures":["/particle.png"]}},{"type":"spawnShape","config":{"type":"rect","data":{"x":0,"y":0,"w":0,"h":0}}}]}'),tr="f",lr=(0,B.createLayer)(tr,(function(){var e="#FE0102",n="Farms",o=p(0,"farm points"),t=(0,g.ax)(!1),l=an((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}})),i=(0,g.ax)("Start"),u=Le((function(){return{display:function(){return{title:"Clicky clicky!",description:function(){return"Current state:
"[Symbol.for("+")]?"Current state:
"[Symbol.for("+")](i.value):"Current state:
"+i.value}()}},initialState:"Start",canClick:function(){return function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!==")]?i.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==i.value}()},onClick:function(e){switch(i.value){case"Start":i.value="A new state!";break;case"A new state!":i.value="Keep going!";break;case"Keep going!":i.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":var n=function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e}()?void 0:function(){return"touches"[Symbol.for("in")]?"touches"[Symbol.for("in")](e):"touches"in e}()?e.touches[0]:e,o=Object.assign({},rr,{pos:{x:function(){var e,o,r,t,l,i,u,a,f,c,s;return void 0!==(null!==(e=null===n||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)&&null!==(null!==(o=null===n||void 0===n?void 0:n.clientX)&&void 0!==o?o:0)&&(null!==(r=null===n||void 0===n?void 0:n.clientX)&&void 0!==r?r:0)[Symbol.for("-")]?(null!==(t=null===n||void 0===n?void 0:n.clientX)&&void 0!==t?t:0)[Symbol.for("-")](null!==(l=null===(i=b.boundingRect)||void 0===i||null===(u=i.value)||void 0===u?void 0:u.left)&&void 0!==l?l:0):(null!==(a=null===n||void 0===n?void 0:n.clientX)&&void 0!==a?a:0)-(null!==(f=null===(c=b.boundingRect)||void 0===c||null===(s=c.value)||void 0===s?void 0:s.left)&&void 0!==f?f:0)}(),y:function(){var e,o,r,t,l,i,u,a,f,c,s;return void 0!==(null!==(e=null===n||void 0===n?void 0:n.clientY)&&void 0!==e?e:0)&&null!==(null!==(o=null===n||void 0===n?void 0:n.clientY)&&void 0!==o?o:0)&&(null!==(r=null===n||void 0===n?void 0:n.clientY)&&void 0!==r?r:0)[Symbol.for("-")]?(null!==(t=null===n||void 0===n?void 0:n.clientY)&&void 0!==t?t:0)[Symbol.for("-")](null!==(l=null===(i=b.boundingRect)||void 0===i||null===(u=i.value)||void 0===u?void 0:u.top)&&void 0!==l?l:0):(null!==(a=null===n||void 0===n?void 0:n.clientY)&&void 0!==a?a:0)-(null!==(f=null===(c=b.boundingRect)||void 0===c||null===(s=c.value)||void 0===s?void 0:s.top)&&void 0!==f?f:0)}()}});b.addEmitter(o).then((function(e){return e.playOnceAndDestroy()})),i.value="Borkened...";break;default:i.value="Start";break}},onHold:function(){console.log("Clickkkkk...")},style:function(){switch(i.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}}})),a=Le((function(){return{onClick:function(){(function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value})()&&(i.value="Start")},display:function(){return function(){return void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value}()?"Fix the clickable!":"Does nothing"},small:!0}})),f=Sn((function(){return{thingsToReset:function(){return[lr]}}})),c=Je((function(){return{scaling:Ye(10,.5),baseResource:sr.points,gainResource:o,modifyGainAmount:Tn(or.otherThingy)}})),s=He((function(){return{layerID:tr,color:e,reset:f,tooltip:function(){return s.canClick.value?"".concat(M(o)," ").concat(o.displayName):"This weird farmer dinosaur will only see you if you have at least 10 points. You only have ".concat(M(sr.points))},canClick:function(){return v.ZP.gte(sr.points.value,10)}}}));(0,Pn.Z)(s,{display:ae(o),pinnable:!0});var m=Ge((function(){return{conversion:c,tree:sr.tree,treeNode:s,display:(0,y.tZ)((function(){return m.conversion.buyMax?(0,r.createVNode)("span",null,[(0,r.createTextVNode)("Hi! I'm a "),(0,r.createVNode)("u",null,[(0,r.createTextVNode)("weird dinosaur")]),(0,r.createTextVNode)(" and I'll give you")," ",(0,r.createVNode)("b",null,[(0,v.Ht)(m.conversion.currentGain.value)]),(0,r.createTextVNode)(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",(0,v.Ht)(m.conversion.nextAt.value),(0,r.createTextVNode)(" points)")]):(0,r.createVNode)("span",null,[(0,r.createTextVNode)("Hi! I'm a "),(0,r.createVNode)("u",null,[(0,r.createTextVNode)("weird dinosaur")]),(0,r.createTextVNode)(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",(0,v.Ht)(m.conversion.nextAt.value),(0,r.createTextVNode)(" points)")])}))}})),b=bn((function(){return{boundingRect:(0,r.ref)(null),onContainerResized:function(e){this.boundingRect.value=e},style:"z-index: 2"}})),S=(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,w.sY)(l),(0,r.createVNode)(Bn,{resource:o,color:e},null),(0,w.sY)(m),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("You have "),(0,v.Ht)(c.baseResource.value),(0,r.createTextVNode)(" points")]),(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createVNode)("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Bork Bork!")])]),(0,r.createVNode)(d,null,null),(0,w._4)(a),(0,w._4)(u),(0,w.sY)(b)])}));return{id:tr,color:e,name:n,points:o,boop:t,coolInfo:l,clickable:u,clickableState:i,reset:f,conversion:c,treeNode:s,resetButton:m,display:S}})),ir=lr;function ur(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&function(){return void 0!==(0,r.isVNode)(e)&&null!==(0,r.isVNode)(e)&&(0,r.isVNode)(e)[Symbol.for("!")]?(0,r.isVNode)(e)[Symbol.for("!")]():!(0,r.isVNode)(e)}()}var ar="a",fr=(0,B.createLayer)(ar,(function(){var e="yellow",n="Achievements",o=p(0,"achievement power"),t=le((function(){return{display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick:function(){sr.showAchievements()}}})),l=ke((function(){return{image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,r.computed)((function(){return l.earned.value?"You did it!":"How did this happen?"})),shouldEarn:function(){return!0}}})),i=ke((function(){return{display:"Impossible!",tooltip:(0,r.computed)((function(){return i.earned.value?"HOW????":"Mwahahaha!"})),style:{color:"#04e050"}}})),u=ke((function(){return{display:"EIEIO",tooltip:"Get a farm point.\n\nReward: The dinosaur is now your friend (you can max Farm Points).",shouldEarn:function(){return v.ZP.gte(ir.points.value,1)},onComplete:function(){console.log("Bork bork bork!")}}})),a=[l,i,u],f=_e((function(){return{rows:2,cols:2,getStartState:function(e){return e},getStyle:function(e,n){return{backgroundColor:"#".concat(function(){return 1234*Number(n)!==void 0&&1234*Number(n)!==null&&(1234*Number(n))[Symbol.for("%")]?(1234*Number(n))[Symbol.for("%")](999999):1234*Number(n)%999999}())}},getTitle:function(e){var n=this,o="";return"101"===e?o="top":"102"===e?o="bottom":"201"===e?o="left":"202"===e&&(o="right"),(0,y.tZ)((function(){return(0,r.createVNode)(me.Z,(0,r.mergeProps)({display:JSON.stringify(n.cells[e].style)},(0,ce.Z)({},o,!0)),{default:function(){return[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Gridable #"),e])]}})}))},getDisplay:function(e,n){return String(n)},getCanClick:function(){return v.ZP.eq(sr.points.value,10)},onClick:function(e,n){this.cells[e].state=function(){return void 0!==Number(n)&&null!==Number(n)&&Number(n)[Symbol.for("+")]?Number(n)[Symbol.for("+")](1):Number(n)+1}()}}})),c=(0,y.tZ)((function(){var e,n,o;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(se.Z,null,{default:function(){return[(0,r.createVNode)(me.Z,{display:l.tooltip,bottom:!0},ur(e=(0,w.sY)(l))?e:{default:function(){return[e]}}),(0,r.createVNode)(me.Z,{display:i.tooltip,bottom:!0},ur(n=(0,w.sY)(i))?n:{default:function(){return[n]}}),(0,r.createVNode)(me.Z,{display:u.tooltip,bottom:!0},ur(o=(0,w.sY)(u))?o:{default:function(){return[o]}})]}}),(0,w._4)(f)])}));return{id:ar,color:e,name:n,points:o,achievements:a,grid:f,treeNode:t,display:c}})),cr=fr,sr=(0,B.createLayer)("main",(function(){var e=p(10),n=h(e),o=N(e),t=(0,r.computed)((function(){if(function(){return void 0!==or.generatorUpgrade.bought.value&&null!==or.generatorUpgrade.bought.value&&or.generatorUpgrade.bought.value[Symbol.for("!")]?or.generatorUpgrade.bought.value[Symbol.for("!")]():!or.generatorUpgrade.bought.value}())return new v.ZP(0);var e=new v.ZP(3.19);return or.lollipopMultiplierUpgrade.bought.value&&(e=e.times(or.lollipopMultiplierEffect.value)),e}));S.globalBus.on("update",(function(n){e.value=v.ZP.add(e.value,v.ZP.times(t.value,n))}));var l=x(e,t),i=(0,B.setupLayerModal)(cr),u=i.openModal,a=i.modal,f=ie((function(){return{nodes:[[or.treeNode],[ir.treeNode,or.spook]],leftSideNodes:[cr.treeNode,or.h],branches:[{startNode:ir.treeNode,endNode:or.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset:function(){e.value=(0,r.toRaw)(this.resettingNode.value)===(0,r.toRaw)(or.treeNode)?0:10,n.value=e.value,o.value=e.value},resetPropagation:ue}}));return{name:"Tree",display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[0===fe.Z.devSpeed?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Game Paused")]):null,fe.Z.devSpeed&&function(){return void 0!==fe.Z.devSpeed&&null!==fe.Z.devSpeed&&fe.Z.devSpeed[Symbol.for("!==")]?fe.Z.devSpeed[Symbol.for("!==")](1):1!==fe.Z.devSpeed}()?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Dev Speed: "),(0,v.WU)(fe.Z.devSpeed||0),(0,r.createTextVNode)("x")]):null,function(){return void 0!==fe.Z.offlineTime&&null!==fe.Z.offlineTime&&fe.Z.offlineTime[Symbol.for("!=")]?fe.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=fe.Z.offlineTime}()?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Offline Time: "),(0,v.mr)(fe.Z.offlineTime||0)]):null,(0,r.createVNode)("div",null,[v.ZP.lt(e.value,"1e1000")?(0,r.createVNode)("span",null,[(0,r.createTextVNode)("You have ")]):null,(0,r.createVNode)("h2",null,[(0,v.WU)(e.value)]),v.ZP.lt(e.value,"1e1e6")?(0,r.createVNode)("span",null,[(0,r.createTextVNode)(" points")]):null]),v.ZP.gt(t.value,0)?(0,r.createVNode)("div",null,[(0,r.createTextVNode)("("),l.value,(0,r.createTextVNode)(")")]):null,(0,r.createVNode)(d,null,null),(0,r.createVNode)("button",{onClick:u},[(0,r.createTextVNode)("open achievements")]),(0,w.sY)(a),(0,w.sY)(f),(0,r.createVNode)(c,{height:"200px",style:"margin: 10px auto; display: block"},null)])})),points:e,best:n,total:o,oomps:l,tree:f,showAchievements:u}})),mr=function(e){return[sr,ir,or,cr]},dr=(0,r.computed)((function(){return v.ZP.gt(sr.points.value,25)}));function yr(e,n){}},9365:function(e,n,o){"use strict";o.r(n),o.d(n,{RegisterNodeInjectionKey:function(){return m},UnregisterNodeInjectionKey:function(){return d},NodesInjectionKey:function(){return y},layers:function(){return b},persistentRefs:function(){return v},addingLayers:function(){return S},createLayer:function(){return g},addLayer:function(){return p},getLayer:function(){return h},removeLayer:function(){return N},reloadLayer:function(){return k},setupLayerModal:function(){return V}});var r=o(4865),t=(o(2526),o(1817),o(1539),o(189),o(8783),o(3948),o(8309),o(4747),o(2479),o(6948)),l=o(6113),i=o(9583),u=o(3273),a=o(8111),f=o(7302),c=o(4061),s=o(5967),m=Symbol("RegisterNode"),d=Symbol("UnregisterNode"),y=Symbol("Nodes"),b={};window.layers=b;var v={},S=[];function g(e,n){return(0,u.z2)((function(){var o={},t=o.emitter=(0,a.i)();if(o.on=t.on.bind(t),o.emit=t.emit.bind(t),o.nodes=(0,r.ref)({}),o.id=e,S.push(e),v[e]=new Set,o.minimized=(0,c.ax)(!1),Object.assign(o,n.call(o)),function(){return void 0!==S[S.length-1]&&null!==S[S.length-1]&&S[S.length-1][Symbol.for("==")]?S[S.length-1][Symbol.for("==")](null):null==S[S.length-1]}()||function(){return void 0!==S[S.length-1]&&null!==S[S.length-1]&&S[S.length-1][Symbol.for("!==")]?S[S.length-1][Symbol.for("!==")](e):S[S.length-1]!==e}())throw"Adding layers stack in invalid state. This should not happen\nStack: ".concat(S,"\nTrying to pop ").concat(o.id);return S.pop(),(0,i.yB)(o,"color"),(0,i.yB)(o,"display"),(0,i.yB)(o,"name"),(0,l.Rh)(o,"name",o.id),(0,i.yB)(o,"minWidth"),(0,l.Rh)(o,"minWidth",600),(0,i.yB)(o,"minimizable"),(0,l.Rh)(o,"minimizable",!0),o}))}function p(e,n){console.info("Adding layer",e.id),b[e.id]?console.error("Attempted to add layer with same ID as existing layer",e.id,b[e.id]):((0,l.Rh)(n,"layers",{}),function(){return void 0!==n.layers[e.id]&&null!==n.layers[e.id]&&n.layers[e.id][Symbol.for("==")]?n.layers[e.id][Symbol.for("==")](null):null==n.layers[e.id]}()&&(n.layers[e.id]={}),b[e.id]=e,f.globalBus.emit("addLayer",e,n.layers[e.id]))}function h(e){return b[e]}function N(e){console.info("Removing layer",e.id),f.globalBus.emit("removeLayer",e),b[e.id]=void 0}function k(e){N(e),p(e,s.Z)}function V(e){var n=(0,r.ref)(!1);return{openModal:function(){return n.value=!0},modal:(0,l.tZ)((function(){return(0,r.createVNode)(t.Z,{modelValue:n.value,"onUpdate:modelValue":function(e){return n.value=e}},{header:function(){return(0,r.createVNode)("h2",null,[(0,r.unref)(e.name)])},body:(0,r.unref)(e.display)})}))}}f.globalBus.on("update",(function(e){Object.values(b).forEach((function(n){null===n||void 0===n||n.emit("preUpdate",e)})),Object.values(b).forEach((function(n){null===n||void 0===n||n.emit("update",e)})),Object.values(b).forEach((function(n){null===n||void 0===n||n.emit("postUpdate",e)}))}))},1604:function(e,n,o){"use strict";o.d(n,{MM:function(){return c},sY:function(){return s},_4:function(){return m},Dy:function(){return d},qF:function(){return y},RU:function(){return b},ix:function(){return v},vq:function(){return S},KO:function(){return g},o9:function(){return p},Uv:function(){return h},P5:function(){return N}});var r=o(3336),t=o(4865),l=(o(2526),o(1817),o(1539),o(3210),o(2222),o(1249),o(7327),o(7042),o(6699),o(2023),o(9905)),i=o(274),u=o(6113),a=o(9583);function f(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&function(){return void 0!==(0,t.isVNode)(e)&&null!==(0,t.isVNode)(e)&&(0,t.isVNode)(e)[Symbol.for("!")]?(0,t.isVNode)(e)[Symbol.for("!")]():!(0,t.isVNode)(e)}()}function c(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"span";return"function"===typeof e?(0,t.defineComponent)({render:e}):"string"===typeof e?function(){return void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0}()?(e=e.trim(),function(){return void 0!==e.charAt(0)&&null!==e.charAt(0)&&e.charAt(0)[Symbol.for("!==")]?e.charAt(0)[Symbol.for("!==")]("<"):"<"!==e.charAt(0)}()&&(e="<".concat(o,">").concat(e,"")),(0,t.defineComponent)({template:e})):(0,t.defineComponent)({render:function(){return{}}}):e}function s(e){if(b(e))return"function"===typeof e?e():c(e);var n=e[u.wA];return(0,t.createVNode)(n,e[u.tj](),null)}function m(){for(var e,n=arguments.length,o=new Array(n),l=0;function(){return void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](n):l")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"div",r=(0,t.shallowRef)();return(0,t.watchEffect)((function(){r.value=c(h(e),o)})),r}function g(e){var n=arguments,o=function(){return void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](1):n.length>1}()&&function(){return void 0!==n[1]&&null!==n[1]&&n[1][Symbol.for("!==")]?n[1][Symbol.for("!==")](void 0):void 0!==n[1]}()?arguments[1]:"div",r=(0,t.shallowRef)(null);return(0,t.watchEffect)((function(){var n=h(e);r.value=function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}()?null:c(n,o)})),r}function p(e){return(0,t.computed)((function(){return h(e)}))}function h(e){return(0,t.unref)((0,t.unref)(e))}function N(){for(var e=arguments.length,n=new Array(e),o=0;function(){return void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](e):o","span")})),a=(0,r.computed)({get:function(){return function(){return void 0!==!i.modelValue&&null!==!i.modelValue&&(!i.modelValue)[Symbol.for("!")]?(!i.modelValue)[Symbol.for("!")]():!!i.modelValue}()},set:function(e){o("update:modelValue",e)}});return function(e,n){return(0,r.openBlock)(),(0,r.createElementBlock)("label",l,[(0,r.withDirectives)((0,r.createElementVNode)("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,r.isRef)(a)?a.value=e:null})},null,512),[[r.vModelCheckbox,(0,r.unref)(a)]]),((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(u))))])}}}),u=o(3744);const a=(0,u.Z)(i,[["__scopeId","data-v-43cf95d0"]]);var f=a},9905:function(e,n,o){"use strict";o.d(n,{Z:function(){return f}});var r=o(4865),t=o(1037),l=o(9266),i={class:"table"},u=(0,r.defineComponent)({setup:function(e){var n=(0,r.computed)((function(){return t.Z[l.ZP.theme].mergeAdjacent}));return function(e,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",i,[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["col",{mergeAdjacent:(0,r.unref)(n)}])},[(0,r.renderSlot)(e.$slots,"default")],2)])}}});const a=u;var f=a},274:function(e,n,o){"use strict";o.d(n,{Z:function(){return f}});var r=o(4865),t=o(1037),l=o(9266),i={class:"table"},u=(0,r.defineComponent)({setup:function(e){var n=(0,r.computed)((function(){return t.Z[l.ZP.theme].mergeAdjacent}));return function(e,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",i,[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["row",{mergeAdjacent:(0,r.unref)(n)}])},[(0,r.renderSlot)(e.$slots,"default")],2)])}}});const a=u;var f=a},264:function(e,n,o){"use strict";o.d(n,{Z:function(){return b}});var r=o(5082),t=(o(2526),o(1817),o(1539),o(4865)),l={key:0,class:"material-icons pinned"};function i(e,n,o,i,u,a){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:n[0]||(n[0]=function(n){return e.isHovered=!0}),onMouseleave:n[1]||(n[1]=function(n){return e.isHovered=!1}),onClickCapture:n[2]||(n[2]=function(){return e.togglePinned&&e.togglePinned.apply(e,arguments)})},[(0,t.renderSlot)(e.$slots,"default",{},void 0,!0),e.elementComp?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.elementComp),{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(t.Transition,{name:"fade"},{default:(0,t.withCtx)((function(){var n;return[e.isShown?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:(0,t.normalizeClass)(["tooltip",(0,r.Z)({top:e.unref(e.direction)===e.TooltipDirection.UP,left:e.unref(e.direction)===e.TooltipDirection.LEFT,right:e.unref(e.direction)===e.TooltipDirection.RIGHT,bottom:e.unref(e.direction)===e.TooltipDirection.DOWN},e.unref(e.classes))]),style:(0,t.normalizeStyle)([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},function(){return void 0!==(n=e.unref(e.style))&&null!==(n=e.unref(e.style))&&(n=e.unref(e.style))[Symbol.for("!==")]?(n=e.unref(e.style))[Symbol.for("!==")](null):null!==(n=e.unref(e.style))}()&&function(){return void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](void 0):void 0!==n}()?n:{}])},[e.showPin?((0,t.openBlock)(),(0,t.createElementBlock)("span",l,"push_pin")):(0,t.createCommentVNode)("",!0),e.comp?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.comp),{key:1})):(0,t.createCommentVNode)("",!0)],6)):(0,t.createCommentVNode)("",!0)]})),_:1})],34)}o(9653);var u=o(1037),a=o(6113),f=o(9266),c=o(1604),s=o(4096),m=(0,t.defineComponent)({props:{element:(0,c.P5)(Object),display:{type:(0,c.P5)(Object,String,Function),required:!0},style:(0,c.P5)(Object,String,Array),classes:(0,c.P5)(Object),direction:(0,c.P5)(Number),xoffset:(0,c.P5)(String),yoffset:(0,c.P5)(String),pinned:Object},setup:function(e){var n=(0,t.toRefs)(e),o=n.element,r=n.display,l=n.pinned,i=(0,t.ref)(!1),m=(0,t.computed)((function(){return((0,c.Uv)(l)||i.value)&&d.value})),d=(0,c.KO)(r),y=(0,t.shallowRef)(null);function b(e){var n=l;e.shiftKey&&n&&(n.value=function(){return void 0!==n.value&&null!==n.value&&n.value[Symbol.for("!")]?n.value[Symbol.for("!")]():!n.value}(),e.stopPropagation(),e.preventDefault())}(0,t.watchEffect)((function(){var e=(0,c.Uv)(o);y.value=function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}()?null:(0,c.MM)((0,a.tZ)((function(){return(0,c.sY)(e)})))}));var v=(0,t.computed)((function(){return(0,c.Uv)(l)&&u.Z[f.ZP.theme].showPin}));return{TooltipDirection:s.A,isHovered:i,isShown:m,comp:d,elementComp:y,unref:t.unref,togglePinned:b,showPin:v}}}),d=o(3744);const y=(0,d.Z)(m,[["render",i],["__scopeId","data-v-adb5f26e"]]);var b=y},7634:function(e){function n(e){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}n.keys=function(){return[]},n.resolve=n,n.id=7634,e.exports=n},6453:function(e){"use strict";e.exports=JSON.parse('{"title":"Profectus","id":"profectus-demo","author":"thepaperpilot","discordName":"The Paper Pilot Community","discordLink":"https://discord.gg/WzejVAx","versionNumber":"0.0","versionTitle":"Initial Commit","allowGoBack":true,"defaultShowSmall":false,"defaultDecimalsShown":2,"useHeader":true,"banner":null,"logo":"Logo.png","initialTabs":["main","c"],"maxTickLength":3600,"offlineLimit":1,"enablePausing":true}')}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var l=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(l.exports,l,l.exports,o),l.loaded=!0,l.exports}o.m=e,function(){var e=[];o.O=function(n,r,t,l){if(!r){var i=1/0;for(c=0;c=l)&&Object.keys(o.O).every((function(e){return o.O[e](r[a])}))?r.splice(a--,1):(u=!1,l0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[r,t,l]}}(),function(){o.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(n,{a:n}),n}}(),function(){o.d=function(e,n){for(var r in n)o.o(n,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.hmd=function(e){return e=Object.create(e),e.children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e}}(),function(){o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};o.O.j=function(n){return 0===e[n]};var n=function(n,r){var t,l,i=r[0],u=r[1],a=r[2],f=0;if(i.some((function(n){return 0!==e[n]}))){for(t in u)o.o(u,t)&&(o.m[t]=u[t]);if(a)var c=a(o)}for(n&&n(r);f {}\n}\n\nconst defaultTheme: Theme = {\n variables: {\n \"--foreground\": \"#dfdfdf\",\n \"--background\": \"#0f0f0f\",\n \"--feature-foreground\": \"#eee\",\n \"--tooltip-background\": \"rgba(0, 0, 0, 0.75)\",\n \"--raised-background\": \"#0f0f0f\",\n \"--points\": \"#ffffff\",\n \"--locked\": \"#bf8f8f\",\n \"--highlighted\": \"#333\",\n \"--bought\": \"#77bf5f\",\n \"--danger\": \"rgb(220, 53, 69)\",\n \"--link\": \"#02f2f2\",\n \"--outline\": \"#dfdfdf\",\n \"--accent1\": \"#627a82\",\n \"--accent2\": \"#658262\",\n \"--accent3\": \"#7c6282\",\n\n \"--border-radius\": \"15px\",\n \"--modal-border\": \"solid 2px var(--color)\",\n \"--feature-margin\": \"0px\"\n },\n floatingTabs: true,\n mergeAdjacent: true,\n showPin: true\n};\n\nexport enum Themes {\n Classic = \"classic\",\n Paper = \"paper\",\n Nordic = \"nordic\",\n Aqua = \"aqua\"\n}\n\nexport default {\n classic: defaultTheme,\n paper: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--background\": \"#2a323d\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#333c4a\",\n \"--locked\": \"#3a3e45\",\n \"--bought\": \"#5C8A58\",\n \"--outline\": \"#333c4a\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n // Based on https://www.nordtheme.com\n nordic: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#D8DEE9\",\n \"--background\": \"#2E3440\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#3B4252\",\n \"--points\": \"#E5E9F0\",\n \"--locked\": \"#4c566a\",\n \"--highlighted\": \"#434c5e\",\n \"--bought\": \"#8FBCBB\",\n \"--danger\": \"#D08770\",\n \"--link\": \"#88C0D0\",\n \"--outline\": \"#3B4252\",\n \"--accent1\": \"#B48EAD\",\n \"--accent2\": \"#A3BE8C\",\n \"--accent3\": \"#EBCB8B\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"solid 2px #3B4252\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n aqua: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#bfdfff\",\n \"--background\": \"#001f3f\",\n \"--tooltip-background\": \"rgba(0, 15, 31, 0.75)\",\n \"--raised-background\": \"#001f3f\",\n \"--points\": \"#dfefff\",\n \"--locked\": \"#c4a7b3\",\n \"--outline\": \"#bfdfff\"\n }\n } as Theme\n} as Record;\n","import { DefaultValue } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { DoNotCache, ProcessedComputable } from \"util/computed\";\nimport { CSSProperties, DefineComponent, isRef } from \"vue\";\n\nexport const Component = Symbol(\"Component\");\nexport const GatherProps = Symbol(\"GatherProps\");\n\nexport type JSXFunction = (() => JSX.Element) & { [DoNotCache]: true };\nexport type CoercableComponent = string | DefineComponent | JSXFunction;\nexport type StyleValue = string | CSSProperties | Array;\n\n// TODO if importing .vue components in .tsx can become type safe,\n// this type can probably be safely removed\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type GenericComponent = DefineComponent;\n\nexport type FeatureComponent = Omit<\n {\n [K in keyof T]: T[K] extends ProcessedComputable ? S : T[K];\n },\n typeof Component | typeof DefaultValue\n>;\n\nexport type Replace = S & Omit;\n\nexport type OptionsFunc> = () => T & ThisType & Partial;\n\nlet id = 0;\n// Get a unique ID to allow a feature to be found for creating branches\n// and any other uses requiring unique identifiers for each feature\n// IDs are gauranteed unique, but should not be saved as they are not\n// guaranteed to be persistent through updates and such\nexport function getUniqueID(prefix = \"feature-\"): string {\n return prefix + id++;\n}\n\nexport enum Visibility {\n Visible,\n Hidden,\n None\n}\n\nexport function jsx(func: () => JSX.Element | \"\"): JSXFunction {\n (func as Partial)[DoNotCache] = true;\n return func as JSXFunction;\n}\n\nexport function showIf(condition: boolean, otherwise = Visibility.None): Visibility {\n return condition ? Visibility.Visible : otherwise;\n}\n\nexport function setDefault(\n object: T,\n key: K,\n value: T[K]\n): asserts object is Exclude & Required> {\n if (object[key] === undefined && value != undefined) {\n object[key] = value;\n }\n}\n\nexport function findFeatures(obj: Record, type: symbol): unknown[] {\n const objects: unknown[] = [];\n const handleObject = (obj: Record) => {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if ((value as Record).type === type) {\n objects.push(value);\n } else if (!(value instanceof Decimal) && !isRef(value)) {\n handleObject(value as Record);\n }\n }\n });\n };\n handleObject(obj);\n return objects;\n}\n","import TooltipComponent from \"./Tooltip.vue\";\nimport {\n CoercableComponent,\n Component,\n GatherProps,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { VueFeature } from \"util/vue\";\nimport { Ref } from \"vue\";\nimport { persistent } from \"game/persistence\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport enum TooltipDirection {\n UP,\n LEFT,\n RIGHT,\n DOWN\n}\n\nexport interface TooltipOptions {\n pinnable?: boolean;\n display: Computable;\n classes?: Computable>;\n style?: Computable;\n direction?: Computable;\n xoffset?: Computable;\n yoffset?: Computable;\n}\n\nexport interface BaseTooltip {\n pinned?: Ref;\n}\n\nexport type Tooltip = Replace<\n T & BaseTooltip,\n {\n pinnable: T[\"pinnable\"] extends undefined ? false : T[\"pinnable\"];\n pinned: T[\"pinnable\"] extends true ? Ref : undefined;\n display: GetComputableType;\n classes: GetComputableType;\n style: GetComputableType;\n direction: GetComputableTypeWithDefault;\n xoffset: GetComputableType;\n yoffset: GetComputableType;\n }\n>;\n\nexport type GenericTooltip = Replace<\n Tooltip,\n {\n pinnable: boolean;\n pinned: Ref | undefined;\n direction: ProcessedComputable;\n }\n>;\n\nexport function addTooltip(\n element: VueFeature,\n options: T & ThisType> & Partial\n): Tooltip {\n if (options.pinnable) {\n if (\"pinned\" in element) {\n console.error(\n \"Cannot add pinnable tooltip to element that already has a property called 'pinned'\"\n );\n options.pinnable = false;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element as any).pinned = options.pinned = persistent(false);\n }\n }\n\n processComputable(options as T, \"display\");\n processComputable(options as T, \"classes\");\n processComputable(options as T, \"style\");\n processComputable(options as T, \"direction\");\n setDefault(options, \"direction\", TooltipDirection.UP);\n processComputable(options as T, \"xoffset\");\n processComputable(options as T, \"yoffset\");\n\n const elementComponent = element[Component];\n element[Component] = TooltipComponent;\n const elementGratherProps = element[GatherProps].bind(element);\n element[GatherProps] = function gatherTooltipProps(this: GenericTooltip) {\n const { display, classes, style, direction, xoffset, yoffset, pinned } = this;\n return {\n element: {\n [Component]: elementComponent,\n [GatherProps]: elementGratherProps\n },\n display,\n classes,\n style,\n direction,\n xoffset,\n yoffset,\n pinned\n };\n }.bind(options as GenericTooltip);\n\n return options as unknown as Tooltip;\n}\n","import projInfo from \"data/projInfo.json\";\nimport Decimal from \"util/bignum\";\nimport { createNanoEvents } from \"nanoevents\";\nimport { App, Ref, watch } from \"vue\";\nimport { GenericLayer } from \"./layers\";\nimport player from \"./player\";\nimport settings, { Settings } from \"./settings\";\nimport state from \"./state\";\n\nexport interface GlobalEvents {\n addLayer: (layer: GenericLayer, saveData: Record) => void;\n removeLayer: (layer: GenericLayer) => void;\n update: (diff: number, trueDiff: number) => void;\n loadSettings: (settings: Partial) => void;\n gameWon: VoidFunction;\n setupVue: (vue: App) => void;\n}\n\nexport const globalBus = createNanoEvents();\n\nlet intervalID: number | null = null;\n\n// Not imported immediately due to dependency cycles\n// This gets set during startGameLoop(), and will only be used in the update function\nlet hasWon: null | Ref = null;\n\nfunction update() {\n const now = Date.now();\n let diff = (now - player.time) / 1e3;\n player.time = now;\n const trueDiff = diff;\n\n state.lastTenTicks.push(trueDiff);\n if (state.lastTenTicks.length > 10) {\n state.lastTenTicks = state.lastTenTicks.slice(1);\n }\n\n // Stop here if the game is paused on the win screen\n if (hasWon?.value && !player.keepGoing) {\n return;\n }\n // Stop here if the player had a NaN value\n if (state.hasNaN) {\n return;\n }\n\n diff = Math.max(diff, 0);\n\n if (player.devSpeed === 0) {\n return;\n }\n\n // Add offline time if any\n if (player.offlineTime != undefined) {\n if (Decimal.gt(player.offlineTime, projInfo.offlineLimit * 3600)) {\n player.offlineTime = projInfo.offlineLimit * 3600;\n }\n if (Decimal.gt(player.offlineTime, 0) && player.devSpeed !== 0) {\n const offlineDiff = Math.max(player.offlineTime / 10, diff);\n player.offlineTime = player.offlineTime - offlineDiff;\n diff += offlineDiff;\n } else if (player.devSpeed === 0) {\n player.offlineTime += diff;\n }\n if (!player.offlineProd || Decimal.lt(player.offlineTime, 0)) {\n player.offlineTime = null;\n }\n }\n\n // Cap at max tick length\n diff = Math.min(diff, projInfo.maxTickLength);\n\n // Apply dev speed\n if (player.devSpeed != undefined) {\n diff *= player.devSpeed;\n }\n\n if (!Number.isFinite(diff)) {\n diff = 1e308;\n }\n\n // Update\n if (Decimal.eq(diff, 0)) {\n return;\n }\n\n player.timePlayed += diff;\n if (!Number.isFinite(player.timePlayed)) {\n player.timePlayed = 1e308;\n }\n globalBus.emit(\"update\", diff, trueDiff);\n\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n if (intervalID != null) {\n clearInterval(intervalID);\n intervalID = null;\n }\n } else if (intervalID == null) {\n intervalID = setInterval(update, 50);\n }\n}\n\nexport async function startGameLoop() {\n hasWon = (await import(\"data/projEntry\")).hasWon;\n watch(hasWon, hasWon => {\n if (hasWon) {\n globalBus.emit(\"gameWon\");\n }\n });\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n } else {\n intervalID = setInterval(update, 50);\n }\n}\n","import { globalBus } from \"game/events\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { ProxyState } from \"util/proxies\";\nimport { isArray } from \"@vue/shared\";\nimport { isReactive, isRef, Ref, ref } from \"vue\";\nimport { addingLayers, GenericLayer, persistentRefs } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\nexport const StackTrace = Symbol(\"StackTrace\");\nexport const Deleted = Symbol(\"Deleted\");\n\n// Note: This is a union of things that should be safely stringifiable without needing\n// special processes for knowing what to load them in as\n// - Decimals aren't allowed because we'd need to know to parse them back.\n// - DecimalSources are allowed because the string is a valid value for them\nexport type State =\n | string\n | number\n | boolean\n | DecimalSource\n | { [key: string]: State }\n | { [key: number]: State };\n\nexport type Persistent = Ref & {\n [PersistentState]: Ref;\n [DefaultValue]: T;\n [StackTrace]: string;\n [Deleted]: boolean;\n};\n\nfunction getStackTrace() {\n return (\n new Error().stack\n ?.split(\"\\n\")\n .slice(3, 5)\n .map(line => line.trim())\n .join(\"\\n\") || \"\"\n );\n}\n\nexport function persistent(defaultValue: T | Ref): Persistent {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref(defaultValue) as unknown)\n ) as Persistent;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n persistent[StackTrace] = getStackTrace();\n persistent[Deleted] = false;\n\n if (addingLayers.length === 0) {\n console.warn(\n \"Creating a persistent ref outside of a layer. This is not officially supported\",\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].add(persistent);\n }\n\n return persistent as Persistent;\n}\n\nexport function deletePersistent(persistent: Persistent) {\n if (addingLayers.length === 0) {\n console.warn(\"Deleting a persistent ref outside of a layer. Ignoring...\", persistent);\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].delete(persistent);\n }\n persistent[Deleted] = true;\n}\n\nglobalBus.on(\"addLayer\", (layer: GenericLayer, saveData: Record) => {\n const features: { type: typeof Symbol }[] = [];\n const handleObject = (obj: Record, path: string[] = []): boolean => {\n let foundPersistent = false;\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if (PersistentState in value) {\n foundPersistent = true;\n if ((value as Persistent)[Deleted]) {\n console.warn(\n \"Deleted persistent ref present in returned object. Ignoring...\",\n value,\n \"\\nCreated at:\\n\" + (value as Persistent)[StackTrace]\n );\n return;\n }\n persistentRefs[layer.id].delete(\n ProxyState in value\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((value as any)[ProxyState] as Persistent)\n : (value as Persistent)\n );\n\n // Construct save path if it doesn't exist\n const persistentState = path.reduce>((acc, curr) => {\n if (!(curr in acc)) {\n acc[curr] = {};\n }\n return acc[curr] as Record;\n }, saveData);\n\n // Cache currently saved value\n const savedValue = persistentState[key];\n // Add ref to save data\n persistentState[key] = (value as Persistent)[PersistentState];\n // Load previously saved value\n if (isReactive(persistentState)) {\n if (savedValue != null) {\n persistentState[key] = savedValue;\n } else {\n persistentState[key] = (value as Persistent)[DefaultValue];\n }\n } else {\n if (savedValue != null) {\n (persistentState[key] as Ref).value = savedValue;\n } else {\n (persistentState[key] as Ref).value = (value as Persistent)[\n DefaultValue\n ];\n }\n }\n } else if (\n !(value instanceof Decimal) &&\n !isRef(value) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !features.includes(value as { type: typeof Symbol })\n ) {\n if (typeof (value as { type: typeof Symbol }).type === \"symbol\") {\n features.push(value as { type: typeof Symbol });\n }\n\n // Continue traversing\n const foundPersistentInChild = handleObject(value as Record, [\n ...path,\n key\n ]);\n\n // Show warning for persistent values inside arrays\n // TODO handle arrays better\n if (foundPersistentInChild) {\n if (isArray(value) && !isArray(obj)) {\n console.warn(\n \"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.\",\n ProxyState in obj\n ? (obj as Record)[ProxyState]\n : obj,\n key\n );\n } else {\n foundPersistent = true;\n }\n }\n }\n }\n });\n return foundPersistent;\n };\n handleObject(layer);\n persistentRefs[layer.id].forEach(persistent => {\n console.error(\n `Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n });\n persistentRefs[layer.id].clear();\n});\n","import Decimal from \"util/bignum\";\nimport { isPlainObject } from \"util/common\";\nimport { ProxiedWithState, ProxyPath, ProxyState } from \"util/proxies\";\nimport { reactive, unref } from \"vue\";\nimport transientState from \"./state\";\n\nexport interface PlayerData {\n id: string;\n devSpeed: number | null;\n name: string;\n tabs: Array;\n time: number;\n autosave: boolean;\n offlineProd: boolean;\n offlineTime: number | null;\n timePlayed: number;\n keepGoing: boolean;\n modID: string;\n modVersion: string;\n layers: Record>;\n}\n\nexport type Player = ProxiedWithState;\n\nconst state = reactive({\n id: \"\",\n devSpeed: null,\n name: \"\",\n tabs: [],\n time: -1,\n autosave: true,\n offlineProd: true,\n offlineTime: null,\n timePlayed: 0,\n keepGoing: false,\n modID: \"\",\n modVersion: \"\",\n layers: {}\n});\n\nexport function stringifySave(player: PlayerData): string {\n return JSON.stringify(player, (key, value) => unref(value));\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst playerHandler: ProxyHandler> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Record, key: PropertyKey): any {\n if (key === ProxyState || key === ProxyPath) {\n return target[key];\n }\n\n const value = target[ProxyState][key];\n if (key !== \"value\" && isPlainObject(value) && !(value instanceof Decimal)) {\n if (value !== target[key]?.[ProxyState]) {\n const path = [...target[ProxyPath], key];\n target[key] = new Proxy({ [ProxyState]: value, [ProxyPath]: path }, playerHandler);\n }\n return target[key];\n }\n\n return value;\n },\n set(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target: Record,\n property: PropertyKey,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any,\n receiver: ProxyConstructor\n ): boolean {\n if (\n !transientState.hasNaN &&\n ((typeof value === \"number\" && isNaN(value)) ||\n (value instanceof Decimal &&\n (isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag))))\n ) {\n const currentValue = target[ProxyState][property];\n if (\n !(\n (typeof currentValue === \"number\" && isNaN(currentValue)) ||\n (currentValue instanceof Decimal &&\n (isNaN(currentValue.sign) ||\n isNaN(currentValue.layer) ||\n isNaN(currentValue.mag)))\n )\n ) {\n state.autosave = false;\n transientState.hasNaN = true;\n transientState.NaNPath = [...target[ProxyPath], property];\n transientState.NaNReceiver = receiver as unknown as Record;\n console.error(\n `Attempted to set NaN value`,\n [...target[ProxyPath], property],\n target[ProxyState]\n );\n throw \"Attempted to set NaN value. See above for details\";\n }\n }\n target[ProxyState][property] = value;\n return true;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ownKeys(target: Record) {\n return Reflect.ownKeys(target[ProxyState]);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n has(target: Record, key: string) {\n return Reflect.has(target[ProxyState], key);\n },\n getOwnPropertyDescriptor(target, key) {\n return Object.getOwnPropertyDescriptor(target[ProxyState], key);\n }\n};\nexport default window.player = new Proxy(\n { [ProxyState]: state, [ProxyPath]: [\"player\"] },\n playerHandler\n) as Player;\n","import projInfo from \"data/projInfo.json\";\nimport { Themes } from \"data/themes\";\nimport { CoercableComponent } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { hardReset } from \"util/save\";\nimport { reactive, watch } from \"vue\";\n\nexport interface Settings {\n active: string;\n saves: string[];\n showTPS: boolean;\n theme: Themes;\n unthrottled: boolean;\n}\n\nconst state = reactive>({\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic,\n unthrottled: false\n});\n\nwatch(\n state,\n state =>\n localStorage.setItem(\n projInfo.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(state))))\n ),\n { deep: true }\n);\nexport default window.settings = state as Settings;\n\nexport function loadSettings(): void {\n try {\n const item: string | null = localStorage.getItem(projInfo.id);\n if (item != null && item !== \"\") {\n const settings = JSON.parse(decodeURIComponent(escape(atob(item))));\n if (typeof settings === \"object\") {\n Object.assign(state, settings);\n }\n }\n globalBus.emit(\"loadSettings\", state);\n // eslint-disable-next-line no-empty\n } catch {}\n}\n\nexport const hardResetSettings = (window.hardResetSettings = () => {\n const settings = {\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic\n };\n globalBus.emit(\"loadSettings\", settings);\n Object.assign(state, settings);\n hardReset();\n});\n\nexport const settingFields: CoercableComponent[] = reactive([]);\nexport function registerSettingField(component: CoercableComponent) {\n settingFields.push(component);\n}\n\nexport const infoComponents: CoercableComponent[] = reactive([]);\nexport function registerInfoComponent(component: CoercableComponent) {\n infoComponents.push(component);\n}\n\nexport const gameComponents: CoercableComponent[] = reactive([]);\nexport function registerGameComponent(component: CoercableComponent) {\n gameComponents.push(component);\n}\n","import { shallowReactive } from \"vue\";\n\nexport interface Transient {\n lastTenTicks: number[];\n hasNaN: boolean;\n NaNPath?: string[];\n NaNReceiver?: Record;\n}\n\nexport default window.state = shallowReactive({\n lastTenTicks: [],\n hasNaN: false,\n NaNPath: []\n});\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Context = _resolveComponent(\"Context\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"layer-container\",\n style: _normalizeStyle({ '--layer-color': _ctx.unref(_ctx.color) })\n }, [\n (_ctx.showGoBack)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"goBack\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.goBack && _ctx.goBack(...args)))\n }, \"←\"))\n : _createCommentVNode(\"\", true),\n (_ctx.minimized.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"layer-tab minimized\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.minimized.value = false))\n }, [\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.unref(_ctx.name)), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: _normalizeClass([\"layer-tab\", [{ showGoBack: _ctx.showGoBack }, _ctx.unref(_ctx.classes)]]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, [\n _createVNode(_component_Context, { ref: \"contextRef\" }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ]),\n _: 1\n }, 512)\n ], 6)),\n (_ctx.unref(_ctx.minimizable))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 3,\n class: \"minimize\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.minimized.value = true))\n }, \" ▼ \"))\n : _createCommentVNode(\"\", true)\n ], 4))\n}","\nimport projInfo from \"data/projInfo.json\";\nimport { CoercableComponent, StyleValue } from \"features/feature\";\nimport { FeatureNode } from \"game/layers\";\nimport { Persistent } from \"game/persistence\";\nimport player from \"game/player\";\nimport { computeComponent, processedPropType, wrapRef } from \"util/vue\";\nimport { computed, defineComponent, nextTick, PropType, Ref, ref, toRefs, unref, watch } from \"vue\";\nimport Context from \"./Context.vue\";\n\nexport default defineComponent({\n components: { Context },\n props: {\n index: {\n type: Number,\n required: true\n },\n tab: {\n type: Function as PropType<() => HTMLElement | undefined>,\n required: true\n },\n display: {\n type: processedPropType(Object, String, Function),\n required: true\n },\n minimized: {\n type: Object as PropType>,\n required: true\n },\n minWidth: {\n type: processedPropType(Number, String),\n required: true\n },\n name: {\n type: processedPropType(String),\n required: true\n },\n color: processedPropType(String),\n style: processedPropType(String, Object, Array),\n classes: processedPropType>(Object),\n minimizable: processedPropType(Boolean),\n nodes: {\n type: Object as PropType>>,\n required: true\n }\n },\n setup(props) {\n const { display, index, minimized, minWidth, tab } = toRefs(props);\n\n const component = computeComponent(display);\n const showGoBack = computed(\n () => projInfo.allowGoBack && index.value > 0 && !minimized.value\n );\n\n function goBack() {\n player.tabs.splice(unref(props.index), Infinity);\n }\n\n nextTick(() => updateTab(minimized.value, unref(minWidth.value)));\n watch([minimized, wrapRef(minWidth)], ([minimized, minWidth]) =>\n updateTab(minimized, minWidth)\n );\n\n const contextRef = ref(null);\n watch(\n () => contextRef.value?.nodes,\n nodes => {\n if (nodes) {\n props.nodes.value = nodes;\n }\n }\n );\n\n function updateTab(minimized: boolean, minWidth: number | string) {\n const width =\n typeof minWidth === \"number\" || Number.isNaN(parseInt(minWidth))\n ? minWidth + \"px\"\n : minWidth;\n const tabValue = tab.value();\n if (tabValue != undefined) {\n if (minimized) {\n tabValue.style.flexGrow = \"0\";\n tabValue.style.flexShrink = \"0\";\n tabValue.style.width = \"60px\";\n tabValue.style.minWidth = tabValue.style.flexBasis = \"\";\n tabValue.style.margin = \"0\";\n } else {\n tabValue.style.flexGrow = \"\";\n tabValue.style.flexShrink = \"\";\n tabValue.style.width = \"\";\n tabValue.style.minWidth = tabValue.style.flexBasis = `${width}px`;\n tabValue.style.margin = \"\";\n }\n }\n }\n\n return {\n component,\n showGoBack,\n contextRef,\n unref,\n goBack\n };\n }\n});\n","import { render } from \"./Layer.vue?vue&type=template&id=66dc9e3e&scoped=true&ts=true\"\nimport script from \"./Layer.vue?vue&type=script&lang=ts\"\nexport * from \"./Layer.vue?vue&type=script&lang=ts\"\n\nimport \"./Layer.vue?vue&type=style&index=0&id=66dc9e3e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-66dc9e3e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5f8298e6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Changelog\", -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"details\", { open: \"\" }, [\n /*#__PURE__*/_createElementVNode(\"summary\", null, [\n /*#__PURE__*/_createTextVNode(\"v0.0 Initial Commit - \"),\n /*#__PURE__*/_createElementVNode(\"time\", null, \"2021-09-04\")\n ]),\n /*#__PURE__*/_createTextVNode(\" This is the first release :D \"),\n /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"feature\" }, \"Did everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"fix\" }, \"Had some fun\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"breaking\" }, \"Removed everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"balancing\" }, \"Created some bugs to fix later\")\n ])\n], -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Changelog.vue?vue&type=style&index=0&id=5f8298e6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5f8298e6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eb46986\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"info-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"info-modal-title\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_10 = [\"href\"]\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Paper Pilot Community \")\n ])\n], -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Modding Tree \")\n ])\n], -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport type Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport { infoComponents } from \"game/settings\";\nimport { formatTime } from \"util/bignum\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs, unref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n changelog: null\n },\n setup(__props: any, { expose }) {\n\nconst _props = __props as { changelog: typeof Changelog | null }\n\nconst { title, logo, author, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\n\nconst props = toRefs(_props);\n\nconst isOpen = ref(false);\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\n\nconst infoComponent = computed(() => {\n return coerceComponent(jsx(() => <>{infoComponents.map(render)}));\n});\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nfunction openChangelog() {\n unref(props.changelog)?.open();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"info-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"h2\", null, _toDisplayString(_unref(title)), 1),\n _createElementVNode(\"h4\", null, [\n _createTextVNode(\" v\" + _toDisplayString(_unref(versionNumber)), 1),\n (_unref(versionTitle))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \": \" + _toDisplayString(_unref(versionTitle)), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n (_unref(author))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"By \" + _toDisplayString(_unref(author)), 1))\n : _createCommentVNode(\"\", true),\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", {\n class: \"link\",\n onClick: openChangelog\n }, \"Changelog\"),\n _hoisted_9,\n _createElementVNode(\"div\", null, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: _unref(discordLink),\n class: \"info-modal-discord-link\"\n }, [\n _hoisted_11,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_10))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_12,\n _hoisted_13,\n _hoisted_14,\n _createElementVNode(\"div\", null, \"Time Played: \" + _toDisplayString(_unref(timePlayed)), 1),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(infoComponent))))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Info.vue?vue&type=style&index=0&id=3eb46986&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eb46986\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, isRef as _isRef, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85d7ae40\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"Options\")\n], -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport rawThemes from \"data/themes\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport settings, { settingFields } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst themes = Object.keys(rawThemes).map(theme => ({\n label: camelToTitle(theme),\n value: theme\n}));\n\nconst settingFieldsComponent = computed(() => {\n return coerceComponent(jsx(() => <>{settingFields.map(render)}));\n});\n\nconst { showTPS, theme, unthrottled } = toRefs(settings);\nconst { autosave, offlineProd } = toRefs(player);\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? 0 : null;\n }\n});\n\nconst offlineProdTitle = jsx(() => (\n \n Offline Production*\n \n));\nconst autosaveTitle = jsx(() => (\n \n Autosave*\n \n));\nconst isPausedTitle = jsx(() => (\n \n Pause game*\n \n));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createVNode(Select, {\n title: \"Theme\",\n options: _unref(themes),\n modelValue: _unref(theme),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(theme) ? (theme).value = $event : null))\n }, null, 8, [\"options\", \"modelValue\"]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(settingFieldsComponent)))),\n _createVNode(Toggle, {\n title: \"Show TPS\",\n modelValue: _unref(showTPS),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(showTPS) ? (showTPS).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _hoisted_2,\n _createVNode(Toggle, {\n title: \"Unthrottled\",\n modelValue: _unref(unthrottled),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(unthrottled) ? (unthrottled).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(offlineProdTitle),\n modelValue: _unref(offlineProd),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_isRef(offlineProd) ? (offlineProd).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(autosaveTitle),\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: _unref(isPausedTitle),\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Options.vue?vue&type=style&index=0&id=85d7ae40&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85d7ae40\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, withModifiers as _withModifiers, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bf59fca4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = [\"onClick\", \"disabled\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"onClick\"]\n\nimport { ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n disabled: { type: Boolean },\n skipConfirm: { type: Boolean }\n },\n emits: [\"click\", \"confirmingChanged\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n (e: \"confirmingChanged\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n disabled?: boolean;\n skipConfirm?: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isConfirming = ref(false);\n\nwatch(isConfirming, isConfirming => {\n emit(\"confirmingChanged\", isConfirming);\n});\n\nfunction click() {\n if (unref(props.skipConfirm)) {\n emit(\"click\");\n return;\n }\n if (isConfirming.value) {\n emit(\"click\");\n }\n isConfirming.value = !isConfirming.value;\n}\n\nfunction cancel() {\n isConfirming.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"container\", { confirming: isConfirming.value }])\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"Are you sure?\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: \"button danger\",\n disabled: __props.disabled\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Yes\"))\n : _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n ], 8, _hoisted_2),\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"button\",\n onClick: _withModifiers(cancel, [\"stop\"])\n }, \"No\", 8, _hoisted_4))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DangerButton.vue?vue&type=style&index=0&id=bf59fca4&scoped=true&lang=css\"\nimport \"./DangerButton.vue?vue&type=style&index=1&id=bf59fca4&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-bf59fca4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bbcedd3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { nextTick, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n left: { type: Boolean }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\n\n\n\nconst activated = ref(false);\nconst activatedTimeout = ref(null);\n\nfunction click() {\n emit(\"click\");\n\n // Give feedback to user\n if (activatedTimeout.value) {\n clearTimeout(activatedTimeout.value);\n }\n activated.value = false;\n nextTick(() => {\n activated.value = true;\n activatedTimeout.value = setTimeout(() => (activated.value = false), 500);\n });\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: _normalizeClass([\"feedback\", { activated: activated.value, left: __props.left }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 10, _hoisted_1))\n}\n}\n\n})","import script from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./FeedbackButton.vue?vue&type=style&index=0&id=5bbcedd3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bbcedd3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6a0cf7ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"handle material-icons\" }, \"drag_handle\", -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"actions\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_paste\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_copy\", -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"edit\", -1))\nconst _hoisted_7 = [\n _hoisted_6\n]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"material-icons\",\n style: {\"margin\":\"-2px\"}\n}, \"delete\", -1))\nconst _hoisted_9 = {\n key: 1,\n class: \"actions\"\n}\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"check\", -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"close\", -1))\nconst _hoisted_13 = [\n _hoisted_12\n]\nconst _hoisted_14 = {\n key: 2,\n class: \"details\"\n}\nconst _hoisted_15 = { class: \"save-version\" }\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_17 = { key: 0 }\nconst _hoisted_18 = {\n key: 3,\n class: \"details\"\n}\nconst _hoisted_19 = {\n key: 4,\n class: \"details error\"\n}\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport player from \"game/player\";\nimport { computed, ref, toRefs, watch } from \"vue\";\nimport DangerButton from \"./fields/DangerButton.vue\";\nimport FeedbackButton from \"./fields/FeedbackButton.vue\";\nimport Text from \"./fields/Text.vue\";\nimport { LoadablePlayerData } from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n save: null\n },\n emits: [\"export\", \"open\", \"duplicate\", \"delete\", \"editName\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"export\"): void;\n (e: \"open\"): void;\n (e: \"duplicate\"): void;\n (e: \"delete\"): void;\n (e: \"editName\", name: string): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n save: LoadablePlayerData;\n}\n\n\nconst { save } = toRefs(_props);\n\n\nconst dateFormat = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n});\n\nconst isEditing = ref(false);\nconst isConfirming = ref(false);\nconst newName = ref(\"\");\n\nwatch(isEditing, () => (newName.value = save.value.name || \"\"));\n\nconst isActive = computed(() => save.value && save.value.id === player.id);\nconst currentTime = computed(() =>\n isActive.value ? player.time : (save.value && save.value.time) || 0\n);\n\nfunction changeName() {\n emit(\"editName\", newName.value);\n isEditing.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"save\", { active: _unref(isActive) }])\n }, [\n _hoisted_1,\n (!isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createBlock(FeedbackButton, {\n key: 0,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('export'))),\n class: \"button\",\n left: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('duplicate'))),\n class: \"button\"\n }, _hoisted_5))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 2,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_7))\n : _createCommentVNode(\"\", true),\n _createVNode(DangerButton, {\n disabled: _unref(isActive),\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('delete'))),\n onConfirmingChanged: _cache[4] || (_cache[4] = value => (isConfirming.value = value))\n }, {\n default: _withCtx(() => [\n _hoisted_8\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n _createElementVNode(\"button\", {\n onClick: changeName,\n class: \"button\"\n }, _hoisted_11),\n _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_13)\n ])),\n (_unref(save).error == undefined && !isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"button\", {\n class: \"button open\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emit('open')))\n }, [\n _createElementVNode(\"h3\", null, _toDisplayString(_unref(save).name), 1)\n ]),\n _createElementVNode(\"span\", _hoisted_15, \"v\" + _toDisplayString(_unref(save).modVersion), 1),\n _hoisted_16,\n (_unref(currentTime))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, \"Last played \" + _toDisplayString(_unref(dateFormat).format(_unref(currentTime))), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : (_unref(save).error == undefined && isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _createVNode(Text, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((newName).value = $event)),\n class: \"editname\",\n onSubmit: changeName\n }, null, 8, [\"modelValue\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createTextVNode(\" Error: Failed to load save with id \" + _toDisplayString(_unref(save).id), 1),\n _hoisted_20,\n _createTextVNode(_toDisplayString(_unref(save).error), 1)\n ]))\n ], 2))\n}\n}\n\n})","import script from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Save.vue?vue&type=style&index=0&id=6a0cf7ac&scoped=true&lang=css\"\nimport \"./Save.vue?vue&type=style&index=1&id=6a0cf7ac&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6a0cf7ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7d95f59e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Saves Manager\", -1))\nconst _hoisted_2 = { class: \"modal-footer\" }\nconst _hoisted_3 = { class: \"field\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"field-title\" }, \"Create Save\", -1))\nconst _hoisted_5 = { class: \"field-buttons\" }\nconst _hoisted_6 = { class: \"footer\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\"} }, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport player, { PlayerData } from \"game/player\";\nimport settings from \"game/settings\";\nimport { getUniqueID, loadSave, save, newSave } from \"util/save\";\nimport {\n ComponentPublicInstance,\n computed,\n nextTick,\n ref,\n shallowReactive,\n unref,\n watch\n} from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Text from \"./fields/Text.vue\";\nimport Save from \"./Save.vue\";\nimport Draggable from \"vuedraggable\";\n\nexport type LoadablePlayerData = Omit, \"id\"> & { id: string; error?: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\nconst modal = ref | null>(null);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst importingFailed = ref(false);\nconst saveToImport = ref(\"\");\n\nwatch(saveToImport, save => {\n if (save) {\n nextTick(() => {\n try {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (typeof playerData !== \"object\") {\n importingFailed.value = true;\n return;\n }\n const id = getUniqueID();\n playerData.id = id;\n localStorage.setItem(\n id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n saveToImport.value = \"\";\n importingFailed.value = false;\n\n settings.saves.push(id);\n } catch (e) {\n importingFailed.value = true;\n }\n });\n } else {\n importingFailed.value = false;\n }\n});\n\nlet bankContext = require.context(\"raw-loader!../../saves\", true, /\\.txt$/);\nlet bank = ref(\n bankContext.keys().reduce((acc: Array<{ label: string; value: string }>, curr) => {\n // .slice(2, -4) strips the leading ./ and the trailing .txt\n acc.push({\n label: curr.slice(2, -4),\n value: bankContext(curr).default\n });\n return acc;\n }, [])\n);\n\nconst cachedSaves = shallowReactive>({});\nfunction getCachedSave(id: string) {\n if (cachedSaves[id] == null) {\n const save = localStorage.getItem(id);\n if (save == null) {\n cachedSaves[id] = { error: `Save doesn't exist in localStorage`, id };\n } else if (save === \"dW5kZWZpbmVk\") {\n cachedSaves[id] = { error: `Save is undefined`, id };\n } else {\n try {\n cachedSaves[id] = { ...JSON.parse(decodeURIComponent(escape(atob(save)))), id };\n } catch (error) {\n cachedSaves[id] = { error, id };\n console.warn(\n `SavesManager: Failed to load info about save with id ${id}:\\n${error}\\n${save}`\n );\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return cachedSaves[id]!;\n}\n// Wipe cache whenever the modal is opened\nwatch(isOpen, isOpen => {\n if (isOpen) {\n Object.keys(cachedSaves).forEach(key => delete cachedSaves[key]);\n }\n});\n\nconst saves = computed(() =>\n settings.saves.reduce((acc: Record, curr: string) => {\n acc[curr] = getCachedSave(curr);\n return acc;\n }, {})\n);\n\nfunction exportSave(id: string) {\n let saveToExport;\n if (player.id === id) {\n saveToExport = save();\n } else {\n saveToExport = btoa(unescape(encodeURIComponent(JSON.stringify(saves.value[id]))));\n }\n\n // Put on clipboard. Using the clipboard API asks for permissions and stuff\n const el = document.createElement(\"textarea\");\n el.value = saveToExport;\n document.body.appendChild(el);\n el.select();\n el.setSelectionRange(0, 99999);\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n}\n\nfunction duplicateSave(id: string) {\n if (player.id === id) {\n save();\n }\n\n const playerData = { ...saves.value[id], id: getUniqueID() };\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction deleteSave(id: string) {\n settings.saves = settings.saves.filter((save: string) => save !== id);\n localStorage.removeItem(id);\n cachedSaves[id] = undefined;\n}\n\nfunction openSave(id: string) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n saves.value[player.id]!.time = player.time;\n save();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n loadSave(saves.value[id]!);\n // Delete cached version in case of opening it again\n cachedSaves[id] = undefined;\n}\n\nfunction newFromPreset(preset: string) {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(preset))));\n playerData.id = getUniqueID();\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction editSave(id: string, newName: string) {\n const currSave = saves.value[id];\n if (currSave) {\n currSave.name = newName;\n if (player.id === id) {\n player.name = newName;\n save();\n } else {\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(JSON.stringify(currSave)))));\n cachedSaves[id] = undefined;\n }\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((isOpen).value = $event)),\n ref_key: \"modal\",\n ref: modal\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createBlock(_unref(Draggable), {\n key: 0,\n list: _unref(settings).saves,\n handle: \".handle\",\n itemKey: (save) => save\n }, {\n item: _withCtx(({ element }) => [\n _createVNode(Save, {\n save: _unref(saves)[element],\n onOpen: ($event: any) => (openSave(element)),\n onExport: ($event: any) => (exportSave(element)),\n onEditName: name => editSave(element, name),\n onDuplicate: ($event: any) => (duplicateSave(element)),\n onDelete: ($event: any) => (deleteSave(element))\n }, null, 8, [\"save\", \"onOpen\", \"onExport\", \"onEditName\", \"onDuplicate\", \"onDelete\"])\n ]),\n _: 1\n }, 8, [\"list\", \"itemKey\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Text, {\n modelValue: saveToImport.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((saveToImport).value = $event)),\n title: \"Import Save\",\n placeholder: \"Paste your save here!\",\n class: _normalizeClass({ importingFailed: importingFailed.value })\n }, null, 8, [\"modelValue\", \"class\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"button\", {\n class: \"button\",\n onClick: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_unref(newSave) && _unref(newSave)(...args)))\n }, \"New Game\"),\n (Object.keys(_unref(bank)).length > 0)\n ? (_openBlock(), _createBlock(Select, {\n key: 0,\n options: _unref(bank),\n modelValue: undefined,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = preset => newFromPreset(preset as string)),\n closeOnSelect: \"\",\n placeholder: \"Select preset\",\n class: \"presets\"\n }, null, 8, [\"options\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (isOpen.value = false))\n }, \" Close \")\n ])\n ])\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SavesManager.vue?vue&type=style&index=0&id=7d95f59e&scoped=true&lang=css\"\nimport \"./SavesManager.vue?vue&type=style&index=1&id=7d95f59e&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7d95f59e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71847eca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"alt\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"title\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\",\"cursor\":\"unset\"} }, null, -1))\nconst _hoisted_4 = { class: \"discord\" }\nconst _hoisted_5 = { class: \"discord-links\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = [\"href\"]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\nconst _hoisted_10 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_18 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_20 = { class: \"discord\" }\nconst _hoisted_21 = { class: \"discord-links\" }\nconst _hoisted_22 = { key: 0 }\nconst _hoisted_23 = [\"href\"]\nconst _hoisted_24 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\n\nimport Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { ComponentPublicInstance, ref } from \"vue\";\nimport Info from \"./Info.vue\";\nimport Options from \"./Options.vue\";\nimport SavesManager from \"./SavesManager.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { TooltipDirection } from \"features/tooltips/tooltip\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst info = ref | null>(null);\nconst savesManager = ref | null>(null);\nconst options = ref | null>(null);\n// For some reason Info won't accept the changelog unless I do this:\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst changelog = ref | null>(null);\n\nconst { useHeader, banner, title, discordName, discordLink, versionNumber } = projInfo;\n\nfunction openDiscord() {\n window.open(discordLink, \"mywindow\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(useHeader))\n ? (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 0,\n class: \"nav\"\n }, _ctx.$attrs), [\n (_unref(banner))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: _unref(banner),\n class: \"banner\",\n alt: _unref(title)\n }, null, 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _toDisplayString(_unref(title)), 1)),\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_5, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_6, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_7)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_8,\n _hoisted_9\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_10, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).DOWN,\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ], 16))\n : (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 1,\n class: \"overlay-nav\"\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_21, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_22, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_23)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_24,\n _hoisted_25\n ])\n ])\n ], 16)),\n _createVNode(Info, {\n ref_key: \"info\",\n ref: info,\n changelog: changelog.value\n }, null, 8, [\"changelog\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512),\n _createVNode(Options, {\n ref_key: \"options\",\n ref: options\n }, null, 512),\n _createVNode(Changelog, {\n ref_key: \"changelog\",\n ref: changelog\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Nav.vue?vue&type=style&index=0&id=71847eca&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-71847eca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4fd7697b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"inner-tab\" }\nconst _hoisted_2 = {\n key: 1,\n class: \"separator\"\n}\n\nimport projInfo from \"data/projInfo.json\";\nimport { GenericLayer, layers } from \"game/layers\";\nimport player from \"game/player\";\nimport { computed, toRef } from \"vue\";\nimport Layer from \"./Layer.vue\";\nimport Nav from \"./Nav.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tabs = toRef(player, \"tabs\");\nconst layerKeys = computed(() => Object.keys(layers));\nconst useHeader = projInfo.useHeader;\n\nfunction gatherLayerProps(layer: GenericLayer) {\n const { display, minimized, minWidth, name, color, style, classes, minimizable, nodes } = layer;\n return { display, minimized, minWidth, name, color, style, classes, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs-container\", { useHeader: _unref(useHeader) }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(tabs), (tab, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: index,\n class: \"tab\",\n ref_for: true,\n ref: `tab-${index}`\n }, [\n (index === 0 && !_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(layerKeys).includes(tab))\n ? (_openBlock(), _createBlock(Layer, _mergeProps({ key: 0 }, gatherLayerProps(_unref(layers)[tab]!), {\n index: index,\n tab: () => ((_ctx.$refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])\n }), null, 16, [\"index\", \"tab\"]))\n : (_openBlock(), _createBlock(_resolveDynamicComponent(tab), {\n key: 1,\n index: index\n }, null, 8, [\"index\"]))\n ]),\n (index !== _unref(tabs).length - 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ], 2))\n}\n}\n\n})","import script from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Game.vue?vue&type=style&index=0&id=4fd7697b&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=4fd7697b&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4fd7697b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-06188cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"game-over-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"game-over-modal-title\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Congratulations!\", -1))\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Please check the Discord to discuss the game or to check for new content updates! \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = [\"href\"]\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons game-over-modal-discord\" }, \"discord\", -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { hasWon } from \"data/projEntry\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport { formatTime } from \"util/bignum\";\nimport { loadSave, newSave } from \"util/save\";\nimport { computed, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { title, logo, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\nconst isOpen = computed(() => hasWon.value && !player.keepGoing);\nconst autosave = toRef(player, \"autosave\");\n\nfunction keepGoing() {\n player.keepGoing = true;\n}\n\nfunction playAgain() {\n loadSave(newSave());\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, { \"model-value\": _unref(isOpen) }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"game-over-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"h4\", null, \"You've beaten \" + _toDisplayString(_unref(title)) + \" v\" + _toDisplayString(_unref(versionNumber)) + \": \" + _toDisplayString(_unref(versionTitle)), 1)\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", null, \"It took you \" + _toDisplayString(_unref(timePlayed)) + \" to beat the game.\", 1),\n _hoisted_6,\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"game-over-modal-discord-link\"\n }, [\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_9)\n ]),\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", { class: \"game-over-footer\" }, [\n _createElementVNode(\"button\", {\n onClick: keepGoing,\n class: \"button\"\n }, \"Keep Going\"),\n _createElementVNode(\"button\", {\n onClick: playAgain,\n class: \"button danger\"\n }, \"Play Again\")\n ])\n ]),\n _: 1\n }, 8, [\"model-value\"]))\n}\n}\n\n})","import script from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GameOverScreen.vue?vue&type=style&index=0&id=06188cc8&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-06188cc8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, createBlock as _createBlock, mergeProps as _mergeProps, withCtx as _withCtx, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5935214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"nan-modal-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"NaN value detected!\")\n], -1))\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_4 = [\"href\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons nan-modal-discord\" }, \"discord\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = { class: \"nan-footer\" }\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { ComponentPublicInstance, computed, ref, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport SavesManager from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { discordName, discordLink } = projInfo;\nconst autosave = toRef(player, \"autosave\");\nconst hasNaN = toRef(state, \"hasNaN\");\nconst savesManager = ref | null>(null);\n\nconst path = computed(() => state.NaNPath?.join(\".\"));\nconst property = computed(() => state.NaNPath?.slice(-1)[0]);\nconst previous = computed(() => {\n if (state.NaNReceiver && property.value) {\n return state.NaNReceiver[property.value] as DecimalSource;\n }\n return null;\n});\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? null : 0;\n }\n});\n\nfunction setZero() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(0);\n state.hasNaN = false;\n }\n}\n\nfunction setOne() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(1);\n state.hasNaN = false;\n }\n}\n\nfunction ignore() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(NaN);\n state.hasNaN = false;\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(Modal, _mergeProps({\n modelValue: _unref(hasNaN),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(hasNaN) ? (hasNaN).value = $event : null))\n }, _ctx.$attrs), {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createElementVNode(\"div\", null, [\n _createTextVNode(\" Attempted to assign \\\"\" + _toDisplayString(_unref(path)) + \"\\\" to NaN\", 1),\n (_unref(previous))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(\" \") + \"(previously \" + _toDisplayString(_unref(format)(_unref(previous))) + \")\", 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\". Auto-saving has been \" + _toDisplayString(_unref(autosave) ? \"enabled\" : \"disabled\") + \". Check the console for more details, and consider sharing it with the developers on discord. \", 1)\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"nan-modal-discord-link\"\n }, [\n _hoisted_5,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_4)\n ]),\n _hoisted_6,\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: \"Pause game\",\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open())),\n class: \"button\"\n }, \"Open Saves Manager\"),\n _createElementVNode(\"button\", {\n onClick: setZero,\n class: \"button\"\n }, \"Set to 0\"),\n _createElementVNode(\"button\", {\n onClick: setOne,\n class: \"button\"\n }, \"Set to 1\"),\n (_unref(previous) && _unref(Decimal).neq(_unref(previous), 0) && _unref(Decimal).neq(_unref(previous), 1))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (hasNaN.value = false)),\n class: \"button\"\n }, \" Set to previous \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: ignore,\n class: \"button danger\"\n }, \"Ignore\")\n ])\n ]),\n _: 1\n }, 16, [\"modelValue\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./NaNScreen.vue?vue&type=style&index=0&id=5935214c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5935214c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c0663118\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"tpsDisplay\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"low\"\n}\n\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { computed, ref, watchEffect } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tps = computed(() =>\n Decimal.div(\n state.lastTenTicks.length,\n state.lastTenTicks.reduce((acc, curr) => acc + curr, 0)\n )\n);\n\nconst lastTenFPS = ref([]);\nwatchEffect(() => {\n lastTenFPS.value.push(Math.round(tps.value.toNumber()));\n if (lastTenFPS.value.length > 10) {\n lastTenFPS.value = lastTenFPS.value.slice(1);\n }\n});\n\nconst low = computed(() =>\n lastTenFPS.value.reduce((acc, curr) => Decimal.max(acc, curr), 0)\n);\n\nconst showLow = computed(() => Decimal.sub(tps.value, low.value).gt(1));\n\nreturn (_ctx: any,_cache: any) => {\n return (!_unref(tps).isNan())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createTextVNode(\" TPS: \" + _toDisplayString(_unref(formatWhole)(_unref(tps))) + \" \", 1),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_unref(showLow))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(_unref(formatWhole)(_unref(low))), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./TPS.vue?vue&type=style&index=0&id=c0663118&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c0663118\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { jsx } from \"features/feature\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, toRef, unref } from \"vue\";\nimport Game from \"./components/Game.vue\";\nimport GameOverScreen from \"./components/GameOverScreen.vue\";\nimport NaNScreen from \"./components/NaNScreen.vue\";\nimport Nav from \"./components/Nav.vue\";\nimport TPS from \"./components/TPS.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport themes from \"./data/themes\";\nimport settings, { gameComponents } from \"./game/settings\";\nimport \"./main.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst useHeader = projInfo.useHeader;\nconst theme = computed(() => themes[settings.theme].variables);\nconst showTPS = toRef(settings, \"showTPS\");\n\nconst gameComponent = computed(() => {\n return coerceComponent(jsx(() => <>{gameComponents.map(render)}));\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n id: \"modal-root\",\n style: _normalizeStyle(_unref(theme))\n }, null, 4),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"app\", { useHeader: _unref(useHeader) }]),\n style: _normalizeStyle(_unref(theme))\n }, [\n (_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(Game),\n (unref(_unref(showTPS)))\n ? (_openBlock(), _createBlock(TPS, { key: 1 }))\n : _createCommentVNode(\"\", true),\n _createVNode(GameOverScreen),\n _createVNode(NaNScreen),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(gameComponent))))\n ], 6)\n ], 64))\n}\n}\n\n})","import script from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./App.vue?vue&type=style&index=0&id=f13f28b6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f13f28b6\"]])\n\nexport default __exports__","import { App as VueApp, createApp } from \"vue\";\nimport App from \"./App.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport { GenericLayer } from \"./game/layers\";\nimport { PlayerData } from \"./game/player\";\nimport { Settings } from \"./game/settings\";\nimport { Transient } from \"./game/state\";\nimport Decimal, { DecimalSource } from \"./util/bignum\";\nimport { load } from \"./util/save\";\n\ndocument.title = projInfo.title;\nif (projInfo.id === \"\") {\n throw \"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json\";\n}\n\ndeclare global {\n interface Window {\n vue: VueApp;\n save: VoidFunction;\n hardReset: VoidFunction;\n hardResetSettings: VoidFunction;\n layers: Record | undefined>;\n player: PlayerData;\n state: Transient;\n settings: Settings;\n Decimal: typeof Decimal;\n exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;\n commaFormat: (num: DecimalSource, precision: number) => string;\n regularFormat: (num: DecimalSource, precision: number) => string;\n format: (num: DecimalSource, precision?: number, small?: boolean) => string;\n formatWhole: (num: DecimalSource) => string;\n formatTime: (s: number) => string;\n toPlaces: (x: DecimalSource, precision: number, maxAccepted: DecimalSource) => string;\n formatSmall: (x: DecimalSource, precision?: number) => string;\n invertOOM: (x: DecimalSource) => Decimal;\n projInfo: typeof projInfo;\n }\n}\n\nrequestAnimationFrame(async () => {\n console.log(\n \"%cMade in Profectus%c\\nLearn more at www.moddingtree.com\",\n \"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;\",\n \"padding: 4px;\"\n );\n await load();\n const { globalBus, startGameLoop } = await require(\"./game/events\");\n\n // Create Vue\n const vue = (window.vue = createApp(App));\n globalBus.emit(\"setupVue\", vue);\n vue.mount(\"#app\");\n\n startGameLoop();\n});\n\nwindow.projInfo = projInfo;\n","/* eslint-disable @typescript-eslint/no-this-alias */\nexport type CompareResult = -1 | 0 | 1;\n\nconst MAX_SIGNIFICANT_DIGITS = 17; //Maximum number of digits of precision to assume in Number\n\nconst EXP_LIMIT = 9e15; //If we're ABOVE this value, increase a layer. (9e15 is close to the largest integer that can fit in a Number.)\n\nconst LAYER_DOWN: number = Math.log10(9e15);\n\nconst FIRST_NEG_LAYER = 1 / 9e15; //At layer 0, smaller non-zero numbers than this become layer 1 numbers with negative mag. After that the pattern continues as normal.\n\nconst NUMBER_EXP_MAX = 308; //The largest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst NUMBER_EXP_MIN = -324; //The smallest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst MAX_ES_IN_A_ROW = 5; //For default toString behaviour, when to swap from eee... to (e^n) syntax.\n\nconst IGNORE_COMMAS = true;\nconst COMMAS_ARE_DECIMAL_POINTS = false;\n\nconst powerOf10 = (function() {\n // We need this lookup table because Math.pow(10, exponent)\n // when exponent's absolute value is large is slightly inaccurate.\n // You can fix it with the power of math... or just make a lookup table.\n // Faster AND simpler\n const powersOf10: number[] = [];\n\n for (let i = NUMBER_EXP_MIN + 1; i <= NUMBER_EXP_MAX; i++) {\n powersOf10.push(Number(\"1e\" + i));\n }\n\n const indexOf0InPowersOf10 = 323;\n return function(power: number) {\n return powersOf10[power + indexOf0InPowersOf10];\n };\n})();\n\n//tetration/slog to real height stuff\n//background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\nconst critical_headers = [2, Math.E, 3, 4, 5, 6, 7, 8, 9, 10];\nconst critical_tetr_values = [\n [\n // Base 2\n 1,\n 1.0891168053867777,\n 1.1789745164521264,\n 1.2701428397304229,\n 1.3632066654400328,\n 1.4587804913784246,\n 1.557523817412741,\n 1.660158301473385,\n 1.767487542936873,\n 1.8804205225512542,\n 2\n ],\n [\n // Base E\n 1, //0.0\n 1.1121114330934, //0.1\n 1.23103892493161, //0.2\n 1.35838369631113, //0.3\n 1.49605193039935, //0.4\n 1.64635423375119, //0.5\n 1.81213853570186, //0.6\n 1.99697132461829, //0.7\n 2.20538955455724, //0.8\n 2.44325744833852, //0.9\n Math.E //1.0\n ],\n [\n // Base 3\n 1,\n 1.1187738849693603,\n 1.2464963939368214,\n 1.38527004705667,\n 1.5376664685821402,\n 1.7068895236551784,\n 1.897001227148399,\n 2.1132403089001035,\n 2.362480153784171,\n 2.6539010333870774,\n 3\n ],\n [\n // Base 4\n 1,\n 1.1367350847096405,\n 1.2889510672956703,\n 1.4606478703324786,\n 1.6570295196661111,\n 1.8850062585672889,\n 2.1539465047453485,\n 2.476829779693097,\n 2.872061932789197,\n 3.3664204535587183,\n 4\n ],\n [\n // Base 5\n 1,\n 1.1494592900767588,\n 1.319708228183931,\n 1.5166291280087583,\n 1.748171114438024,\n 2.0253263297298045,\n 2.3636668498288547,\n 2.7858359149579424,\n 3.3257226212448145,\n 4.035730287722532,\n 5\n ],\n [\n // Base 6\n 1,\n 1.159225940787673,\n 1.343712473580932,\n 1.5611293155111927,\n 1.8221199554561318,\n 2.14183924486326,\n 2.542468319282638,\n 3.0574682501653316,\n 3.7390572020926873,\n 4.6719550537360774,\n 6\n ],\n [\n // Base 7\n 1,\n 1.1670905356972596,\n 1.3632807444991446,\n 1.5979222279405536,\n 1.8842640123816674,\n 2.2416069644878687,\n 2.69893426559423,\n 3.3012632110403577,\n 4.121250340630164,\n 5.281493033448316,\n 7\n ],\n [\n // Base 8\n 1,\n 1.1736630594087796,\n 1.379783782386201,\n 1.6292821855668218,\n 1.9378971836180754,\n 2.3289975651071977,\n 2.8384347394720835,\n 3.5232708454565906,\n 4.478242031114584,\n 5.868592169644505,\n 8\n ],\n [\n // Base 9\n 1,\n 1.1793017514670474,\n 1.394054150657457,\n 1.65664127441059,\n 1.985170999970283,\n 2.4069682290577457,\n 2.9647310119960752,\n 3.7278665320924946,\n 4.814462547283592,\n 6.436522247411611,\n 9\n ],\n [\n // Base 10\n 1,\n 1.18422737399915,\n 1.4066113788546144,\n 1.680911177655277,\n 2.027492094355525,\n 2.4775152854601967,\n 3.080455730250329,\n 3.918234505962507,\n 5.1332705696484595,\n 6.9878696918072905,\n 10\n ]\n];\nconst critical_slog_values = [\n [\n // Base 2\n -1,\n -0.9194161097107025,\n -0.8335625019330468,\n -0.7425599821143978,\n -0.6466611521029437,\n -0.5462617907227869,\n -0.4419033816638769,\n -0.3342645487554494,\n -0.224140440909962,\n -0.11241087890006762,\n 0\n ],\n [\n // Base E\n -1, //0.0\n -0.90603157029014, //0.1\n -0.80786507256596, //0.2\n -0.7064666939634, //0.3\n -0.60294836853664, //0.4\n -0.49849837513117, //0.5\n -0.39430303318768, //0.6\n -0.29147201034755, //0.7\n -0.19097820800866, //0.8\n -0.09361896280296, //0.9\n 0 //1.0\n ],\n [\n // Base 3\n -1,\n -0.9021579584316141,\n -0.8005762598234203,\n -0.6964780623319391,\n -0.5911906810998454,\n -0.486050182576545,\n -0.3823089430815083,\n -0.28106046722897615,\n -0.1831906535795894,\n -0.08935809204418144,\n 0\n ],\n [\n // Base 4\n -1,\n -0.8917227442365535,\n -0.781258746326964,\n -0.6705130326902455,\n -0.5612813129406509,\n -0.4551067709033134,\n -0.35319256652135966,\n -0.2563741554088552,\n -0.1651412821106526,\n -0.0796919581982668,\n 0\n ],\n [\n // Base 5\n -1,\n -0.8843387974366064,\n -0.7678744063886243,\n -0.6529563724510552,\n -0.5415870994657841,\n -0.4352842206588936,\n -0.33504449124791424,\n -0.24138853420685147,\n -0.15445285440944467,\n -0.07409659641336663,\n 0\n ],\n [\n // Base 6\n -1,\n -0.8786709358426346,\n -0.7577735191184886,\n -0.6399546189952064,\n -0.527284921869926,\n -0.4211627631006314,\n -0.3223479611761232,\n -0.23107655627789858,\n -0.1472057700818259,\n -0.07035171210706326,\n 0\n ],\n [\n // Base 7\n -1,\n -0.8740862815291583,\n -0.7497032990976209,\n -0.6297119746181752,\n -0.5161838335958787,\n -0.41036238255751956,\n -0.31277212146489963,\n -0.2233976621705518,\n -0.1418697367979619,\n -0.06762117662323441,\n 0\n ],\n [\n // Base 8\n -1,\n -0.8702632331800649,\n -0.7430366914122081,\n -0.6213373075161548,\n -0.5072025698095242,\n -0.40171437727184167,\n -0.30517930701410456,\n -0.21736343968190863,\n -0.137710238299109,\n -0.06550774483471955,\n 0\n ],\n [\n // Base 9\n -1,\n -0.8670016295947213,\n -0.7373984232432306,\n -0.6143173985094293,\n -0.49973884395492807,\n -0.394584953527678,\n -0.2989649949848695,\n -0.21245647317021688,\n -0.13434688362382652,\n -0.0638072667348083,\n 0\n ],\n [\n // Base 10\n -1,\n -0.8641642839543857,\n -0.732534623168535,\n -0.6083127477059322,\n -0.4934049257184696,\n -0.3885773075899922,\n -0.29376029055315767,\n -0.2083678561173622,\n -0.13155653399373268,\n -0.062401588652553186,\n 0\n ]\n];\n\nconst D = function D(value: DecimalSource): Decimal {\n return Decimal.fromValue_noAlloc(value);\n};\n\nconst FC = function(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents(sign, layer, mag);\n};\n\nconst FC_NN = function FC_NN(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents_noNormalize(sign, layer, mag);\n};\n\nconst ME = function ME(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent(mantissa, exponent);\n};\n\nconst ME_NN = function ME_NN(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent_noNormalize(mantissa, exponent);\n};\n\nconst decimalPlaces = function decimalPlaces(value: number, places: number): number {\n const len = places + 1;\n const numDigits = Math.ceil(Math.log10(Math.abs(value)));\n const rounded =\n Math.round(value * Math.pow(10, len - numDigits)) * Math.pow(10, numDigits - len);\n return parseFloat(rounded.toFixed(Math.max(len - numDigits, 0)));\n};\n\nconst f_maglog10 = function(n: number) {\n return Math.sign(n) * Math.log10(Math.abs(n));\n};\n\n//from HyperCalc source code\nconst f_gamma = function(n: number) {\n if (!isFinite(n)) {\n return n;\n }\n if (n < -50) {\n if (n === Math.trunc(n)) {\n return Number.NEGATIVE_INFINITY;\n }\n return 0;\n }\n\n let scal1 = 1;\n while (n < 10) {\n scal1 = scal1 * n;\n ++n;\n }\n\n n -= 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (n + 0.5) * Math.log(n);\n l = l - n;\n const n2 = n * n;\n let np = n;\n l = l + 1 / (12 * np);\n np = np * n2;\n l = l + 1 / (360 * np);\n np = np * n2;\n l = l + 1 / (1260 * np);\n np = np * n2;\n l = l + 1 / (1680 * np);\n np = np * n2;\n l = l + 1 / (1188 * np);\n np = np * n2;\n l = l + 691 / (360360 * np);\n np = np * n2;\n l = l + 7 / (1092 * np);\n np = np * n2;\n l = l + 3617 / (122400 * np);\n\n return Math.exp(l) / scal1;\n};\n\nconst _twopi = 6.2831853071795864769252842; // 2*pi\nconst _EXPN1 = 0.36787944117144232159553; // exp(-1)\nconst OMEGA = 0.56714329040978387299997; // W(1, 0)\n//from https://math.stackexchange.com/a/465183\n// The evaluation can become inaccurate very close to the branch point\nconst f_lambertw = function(z: number, tol = 1e-10): number {\n let w;\n let wn;\n\n if (!Number.isFinite(z)) {\n return z;\n }\n if (z === 0) {\n return z;\n }\n if (z === 1) {\n return OMEGA;\n }\n\n if (z < 10) {\n w = 0;\n } else {\n w = Math.log(z) - Math.log(Math.log(z));\n }\n\n for (let i = 0; i < 100; ++i) {\n wn = (z * Math.exp(-w) + w * w) / (w + 1);\n if (Math.abs(wn - w) < tol * Math.abs(wn)) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Number.NaN;\n};\n\n//from https://github.com/scipy/scipy/blob/8dba340293fe20e62e173bdf2c10ae208286692f/scipy/special/lambertw.pxd\n// The evaluation can become inaccurate very close to the branch point\n// at ``-1/e``. In some corner cases, `lambertw` might currently\n// fail to converge, or can end up on the wrong branch.\nfunction d_lambertw(z: Decimal, tol = 1e-10): Decimal {\n let w;\n let ew, wew, wewz, wn;\n\n if (!Number.isFinite(z.mag)) {\n return z;\n }\n if (z === Decimal.dZero) {\n return z;\n }\n if (z === Decimal.dOne) {\n //Split out this case because the asymptotic series blows up\n return D(OMEGA);\n }\n\n const absz = Decimal.abs(z);\n //Get an initial guess for Halley's method\n w = Decimal.ln(z);\n\n //Halley's method; see 5.9 in [1]\n\n for (let i = 0; i < 100; ++i) {\n ew = Decimal.exp(-w);\n wewz = w.sub(z.mul(ew));\n wn = w.sub(\n wewz.div(\n w.add(1).sub(\n w\n .add(2)\n .mul(wewz)\n .div(Decimal.mul(2, w).add(2))\n )\n )\n );\n if (Decimal.abs(wn.sub(w)).lt(Decimal.abs(wn).mul(tol))) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Decimal.dNaN;\n}\n\nexport type DecimalSource = Decimal | number | string;\n\n/**\n * The Decimal's value is simply mantissa * 10^exponent.\n */\nexport default class Decimal {\n public static readonly dZero = FC_NN(0, 0, 0);\n public static readonly dOne = FC_NN(1, 0, 1);\n public static readonly dNegOne = FC_NN(-1, 0, 1);\n public static readonly dTwo = FC_NN(1, 0, 2);\n public static readonly dTen = FC_NN(1, 0, 10);\n public static readonly dNaN = FC_NN(Number.NaN, Number.NaN, Number.NaN);\n public static readonly dInf = FC_NN(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n public static readonly dNegInf = FC_NN(-1, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n public static readonly dNumberMax = FC(1, 0, Number.MAX_VALUE);\n public static readonly dNumberMin = FC(1, 0, Number.MIN_VALUE);\n\n public sign: number = Number.NaN;\n public mag: number = Number.NaN;\n public layer: number = Number.NaN;\n\n constructor(value?: DecimalSource) {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n this.fromDecimal(value);\n } else if (typeof value === \"number\") {\n this.fromNumber(value);\n } else if (typeof value === \"string\") {\n this.fromString(value);\n } else {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n }\n }\n\n get m(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n const exp = Math.floor(Math.log10(this.mag));\n //handle special case 5e-324\n let man;\n if (this.mag === 5e-324) {\n man = 5;\n } else {\n man = this.mag / powerOf10(exp);\n }\n return this.sign * man;\n } else if (this.layer === 1) {\n const residue = this.mag - Math.floor(this.mag);\n return this.sign * Math.pow(10, residue);\n } else {\n //mantissa stops being relevant past 1e9e15 / ee15.954\n return this.sign;\n }\n }\n\n set m(value: number) {\n if (this.layer <= 2) {\n this.fromMantissaExponent(value, this.e);\n } else {\n //don't even pretend mantissa is meaningful\n this.sign = Math.sign(value);\n if (this.sign === 0) {\n this.layer === 0;\n this.exponent === 0;\n }\n }\n }\n\n get e(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n return Math.floor(Math.log10(this.mag));\n } else if (this.layer === 1) {\n return Math.floor(this.mag);\n } else if (this.layer === 2) {\n return Math.floor(Math.sign(this.mag) * Math.pow(10, Math.abs(this.mag)));\n } else {\n return this.mag * Number.POSITIVE_INFINITY;\n }\n }\n set e(value: number) {\n this.fromMantissaExponent(this.m, value);\n }\n\n get s(): number {\n return this.sign;\n }\n set s(value: number) {\n if (value === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n } else {\n this.sign = value;\n }\n }\n\n // Object.defineProperty(Decimal.prototype, \"mantissa\", {\n get mantissa(): number {\n return this.m;\n }\n\n set mantissa(value: number) {\n this.m = value;\n }\n\n get exponent(): number {\n return this.e;\n }\n set exponent(value: number) {\n this.e = value;\n }\n\n public static fromComponents(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents(sign, layer, mag);\n }\n\n public static fromComponents_noNormalize(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents_noNormalize(sign, layer, mag);\n }\n\n public static fromMantissaExponent(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent(mantissa, exponent);\n }\n\n public static fromMantissaExponent_noNormalize(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent_noNormalize(mantissa, exponent);\n }\n\n public static fromDecimal(value: Decimal): Decimal {\n return new Decimal().fromDecimal(value);\n }\n\n public static fromNumber(value: number): Decimal {\n return new Decimal().fromNumber(value);\n }\n\n public static fromString(value: string): Decimal {\n return new Decimal().fromString(value);\n }\n\n public static fromValue(value: DecimalSource): Decimal {\n return new Decimal().fromValue(value);\n }\n\n public static fromValue_noAlloc(value: DecimalSource): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n }\n\n public static abs(value: DecimalSource): Decimal {\n return D(value).abs();\n }\n\n public static neg(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negate(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negated(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static sign(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static sgn(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static round(value: DecimalSource): Decimal {\n return D(value).round();\n }\n\n public static floor(value: DecimalSource): Decimal {\n return D(value).floor();\n }\n\n public static ceil(value: DecimalSource): Decimal {\n return D(value).ceil();\n }\n\n public static trunc(value: DecimalSource): Decimal {\n return D(value).trunc();\n }\n\n public static add(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static plus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static sub(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static subtract(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static minus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static mul(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static multiply(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static times(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static div(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static divide(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static recip(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocal(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocate(value: DecimalSource): Decimal {\n return D(value).reciprocate();\n }\n\n public static cmp(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static cmpabs(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmpabs(other);\n }\n\n public static compare(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static isNaN(value: DecimalSource): boolean {\n value = D(value);\n return isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag);\n }\n\n public static isFinite(value: DecimalSource): boolean {\n value = D(value);\n return isFinite(value.sign) && isFinite(value.layer) && isFinite(value.mag);\n }\n\n public static eq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static equals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static neq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).neq(other);\n }\n\n public static notEquals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).notEquals(other);\n }\n\n public static lt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lt(other);\n }\n\n public static lte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lte(other);\n }\n\n public static gt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gt(other);\n }\n\n public static gte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gte(other);\n }\n\n public static max(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).max(other);\n }\n\n public static min(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).min(other);\n }\n\n public static minabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).minabs(other);\n }\n\n public static maxabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).maxabs(other);\n }\n\n public static clamp(value: DecimalSource, min: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clamp(min, max);\n }\n\n public static clampMin(value: DecimalSource, min: DecimalSource): Decimal {\n return D(value).clampMin(min);\n }\n\n public static clampMax(value: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clampMax(max);\n }\n\n public static cmp_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static compare_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static eq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static equals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static neq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).neq_tolerance(other, tolerance);\n }\n\n public static notEquals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).notEquals_tolerance(other, tolerance);\n }\n\n public static lt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lt_tolerance(other, tolerance);\n }\n\n public static lte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lte_tolerance(other, tolerance);\n }\n\n public static gt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gt_tolerance(other, tolerance);\n }\n\n public static gte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gte_tolerance(other, tolerance);\n }\n\n public static pLog10(value: DecimalSource): Decimal {\n return D(value).pLog10();\n }\n\n public static absLog10(value: DecimalSource): Decimal {\n return D(value).absLog10();\n }\n\n public static log10(value: DecimalSource): Decimal {\n return D(value).log10();\n }\n\n public static log(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).log(base);\n }\n\n public static log2(value: DecimalSource): Decimal {\n return D(value).log2();\n }\n\n public static ln(value: DecimalSource): Decimal {\n return D(value).ln();\n }\n\n public static logarithm(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).logarithm(base);\n }\n\n public static pow(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).pow(other);\n }\n\n public static pow10(value: DecimalSource): Decimal {\n return D(value).pow10();\n }\n\n public static root(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).root(other);\n }\n\n public static factorial(value: DecimalSource, _other?: never): Decimal {\n return D(value).factorial();\n }\n\n public static gamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).gamma();\n }\n\n public static lngamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).lngamma();\n }\n\n public static exp(value: DecimalSource): Decimal {\n return D(value).exp();\n }\n\n public static sqr(value: DecimalSource): Decimal {\n return D(value).sqr();\n }\n\n public static sqrt(value: DecimalSource): Decimal {\n return D(value).sqrt();\n }\n\n public static cube(value: DecimalSource): Decimal {\n return D(value).cube();\n }\n\n public static cbrt(value: DecimalSource): Decimal {\n return D(value).cbrt();\n }\n\n public static tetrate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).tetrate(height, payload);\n }\n\n public static iteratedexp(value: DecimalSource, height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return D(value).iteratedexp(height, payload);\n }\n\n public static iteratedlog(value: DecimalSource, base: DecimalSource = 10, times = 1): Decimal {\n return D(value).iteratedlog(base, times);\n }\n\n public static layeradd10(value: DecimalSource, diff: DecimalSource): Decimal {\n return D(value).layeradd10(diff);\n }\n\n public static layeradd(value: DecimalSource, diff: number, base = 10): Decimal {\n return D(value).layeradd(diff, base);\n }\n\n public static slog(value: DecimalSource, base = 10): Decimal {\n return D(value).slog(base);\n }\n\n public static lambertw(value: DecimalSource): Decimal {\n return D(value).lambertw();\n }\n\n public static ssqrt(value: DecimalSource): Decimal {\n return D(value).ssqrt();\n }\n\n public static pentate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).pentate(height, payload);\n }\n\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something\n * with exponentially increasing cost each purchase (start at priceStart,\n * multiply by priceRatio, already own currentOwned), how much of it can you buy?\n * Adapted from Trimps source code.\n */\n\n public static affordGeometricSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordGeometricSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceRatio),\n currentOwned\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it multiplies by priceRatio each purchase?\n */\n\n public static sumGeometricSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumGeometricSeries_core(numItems, D(priceStart), D(priceRatio), currentOwned);\n }\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something with additively\n * increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned),\n * how much of it can you buy?\n */\n\n public static affordArithmeticSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordArithmeticSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it adds priceAdd each purchase?\n * Adapted from http://www.mathwords.com/a/arithmetic_series.htm\n */\n\n public static sumArithmeticSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumArithmeticSeries_core(\n D(numItems),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * When comparing two purchases that cost (resource) and increase your resource/sec by (deltaRpS),\n * the lowest efficiency score is the better one to purchase.\n * From Frozen Cookies:\n * http://cookieclicker.wikia.com/wiki/Frozen_Cookies_(JavaScript_Add-on)#Efficiency.3F_What.27s_that.3F\n */\n\n public static efficiencyOfPurchase(\n cost: DecimalSource,\n currentRpS: DecimalSource,\n deltaRpS: DecimalSource\n ): Decimal {\n return this.efficiencyOfPurchase_core(D(cost), D(currentRpS), D(deltaRpS));\n }\n\n public static randomDecimalForTesting(maxLayers: number): Decimal {\n // NOTE: This doesn't follow any kind of sane random distribution, so use this for testing purposes only.\n //5% of the time, return 0\n if (Math.random() * 20 < 1) {\n return FC_NN(0, 0, 0);\n }\n\n const randomsign = Math.random() > 0.5 ? 1 : -1;\n\n //5% of the time, return 1 or -1\n if (Math.random() * 20 < 1) {\n return FC_NN(randomsign, 0, 1);\n }\n\n //pick a random layer\n const layer = Math.floor(Math.random() * (maxLayers + 1));\n\n let randomexp = layer === 0 ? Math.random() * 616 - 308 : Math.random() * 16;\n //10% of the time, make it a simple power of 10\n if (Math.random() > 0.9) {\n randomexp = Math.trunc(randomexp);\n }\n let randommag = Math.pow(10, randomexp);\n //10% of the time, trunc mag\n if (Math.random() > 0.9) {\n randommag = Math.trunc(randommag);\n }\n return FC(randomsign, layer, randommag);\n }\n\n public static affordGeometricSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n const actualStart = priceStart.mul(priceRatio.pow(currentOwned));\n return Decimal.floor(\n resourcesAvailable\n .div(actualStart)\n .mul(priceRatio.sub(1))\n .add(1)\n .log10()\n .div(priceRatio.log10())\n );\n }\n\n public static sumGeometricSeries_core(\n numItems: DecimalSource,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n return priceStart\n .mul(priceRatio.pow(currentOwned))\n .mul(Decimal.sub(1, priceRatio.pow(numItems)))\n .div(Decimal.sub(1, priceRatio));\n }\n\n public static affordArithmeticSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n // n = (-(a-d/2) + sqrt((a-d/2)^2+2dS))/d\n // where a is actualStart, d is priceAdd and S is resourcesAvailable\n // then floor it and you're done!\n const actualStart = priceStart.add(currentOwned.mul(priceAdd));\n const b = actualStart.sub(priceAdd.div(2));\n const b2 = b.pow(2);\n return b\n .neg()\n .add(b2.add(priceAdd.mul(resourcesAvailable).mul(2)).sqrt())\n .div(priceAdd)\n .floor();\n }\n\n public static sumArithmeticSeries_core(\n numItems: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n const actualStart = priceStart.add(currentOwned.mul(priceAdd)); // (n/2)*(2*a+(n-1)*d)\n\n return numItems.div(2).mul(actualStart.mul(2).plus(numItems.sub(1).mul(priceAdd)));\n }\n\n public static efficiencyOfPurchase_core(\n cost: Decimal,\n currentRpS: Decimal,\n deltaRpS: Decimal\n ): Decimal {\n return cost.div(currentRpS).add(cost.div(deltaRpS));\n }\n\n public [Symbol.for(\"+\")](other: DecimalSource): DecimalSource {\n return this.add(other);\n }\n\n public [Symbol.for(\"-\")](other: DecimalSource): DecimalSource {\n return this.sub(other);\n }\n\n public [Symbol.for(\"*\")](other: DecimalSource): DecimalSource {\n return this.times(other);\n }\n\n public [Symbol.for(\"/\")](other: DecimalSource): DecimalSource {\n return this.div(other);\n }\n\n public [Symbol.for(\"minus\")](): DecimalSource {\n return this.neg();\n }\n\n public [Symbol.for(\"==\")](other: DecimalSource): boolean {\n return this.eq(other);\n }\n\n public [Symbol.for(\">\")](other: DecimalSource): boolean {\n return this.gt(other);\n }\n\n public [Symbol.for(\"<\")](other: DecimalSource): boolean {\n return this.lt(other);\n }\n\n public [Symbol.for(\">=\")](other: DecimalSource): boolean {\n return this.gte(other);\n }\n\n public [Symbol.for(\"<=\")](other: DecimalSource): boolean {\n return this.lte(other);\n }\n\n public [Symbol.for(\"!=\")](other: DecimalSource): boolean {\n return this.neq(other);\n }\n\n public normalize(): this {\n /*\n PSEUDOCODE:\n Whenever we are partially 0 (sign is 0 or mag and layer is 0), make it fully 0.\n Whenever we are at or hit layer 0, extract sign from negative mag.\n If layer === 0 and mag < FIRST_NEG_LAYER (1/9e15), shift to 'first negative layer' (add layer, log10 mag).\n While abs(mag) > EXP_LIMIT (9e15), layer += 1, mag = maglog10(mag).\n While abs(mag) < LAYER_DOWN (15.954) and layer > 0, layer -= 1, mag = pow(10, mag).\n\n When we're done, all of the following should be true OR one of the numbers is not IsFinite OR layer is not IsInteger (error state):\n Any 0 is totally zero (0, 0, 0).\n Anything layer 0 has mag 0 OR mag > 1/9e15 and < 9e15.\n Anything layer 1 or higher has abs(mag) >= 15.954 and < 9e15.\n We will assume in calculations that all Decimals are either erroneous or satisfy these criteria. (Otherwise: Garbage in, garbage out.)\n */\n if (this.sign === 0 || (this.mag === 0 && this.layer === 0)) {\n this.sign = 0;\n this.mag = 0;\n this.layer = 0;\n return this;\n }\n\n if (this.layer === 0 && this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n }\n\n //Handle shifting from layer 0 to negative layers.\n if (this.layer === 0 && this.mag < FIRST_NEG_LAYER) {\n this.layer += 1;\n this.mag = Math.log10(this.mag);\n return this;\n }\n\n let absmag = Math.abs(this.mag);\n let signmag = Math.sign(this.mag);\n\n if (absmag >= EXP_LIMIT) {\n this.layer += 1;\n this.mag = signmag * Math.log10(absmag);\n return this;\n } else {\n while (absmag < LAYER_DOWN && this.layer > 0) {\n this.layer -= 1;\n if (this.layer === 0) {\n this.mag = Math.pow(10, this.mag);\n } else {\n this.mag = signmag * Math.pow(10, absmag);\n absmag = Math.abs(this.mag);\n signmag = Math.sign(this.mag);\n }\n }\n if (this.layer === 0) {\n if (this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n } else if (this.mag === 0) {\n //excessive rounding can give us all zeroes\n this.sign = 0;\n }\n }\n }\n\n return this;\n }\n\n public fromComponents(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n\n this.normalize();\n return this;\n }\n\n public fromComponents_noNormalize(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n return this;\n }\n\n public fromMantissaExponent(mantissa: number, exponent: number): this {\n this.layer = 1;\n this.sign = Math.sign(mantissa);\n mantissa = Math.abs(mantissa);\n this.mag = exponent + Math.log10(mantissa);\n\n this.normalize();\n return this;\n }\n\n public fromMantissaExponent_noNormalize(mantissa: number, exponent: number): this {\n //The idea of 'normalizing' a break_infinity.js style Decimal doesn't really apply. So just do the same thing.\n this.fromMantissaExponent(mantissa, exponent);\n return this;\n }\n\n public fromDecimal(value: Decimal): this {\n this.sign = value.sign;\n this.layer = value.layer;\n this.mag = value.mag;\n return this;\n }\n\n public fromNumber(value: number): this {\n this.mag = Math.abs(value);\n this.sign = Math.sign(value);\n this.layer = 0;\n this.normalize();\n return this;\n }\n\n public fromString(value: string): Decimal {\n if (IGNORE_COMMAS) {\n value = value.replace(\",\", \"\");\n } else if (COMMAS_ARE_DECIMAL_POINTS) {\n value = value.replace(\",\", \".\");\n }\n\n //Handle x^^^y format.\n const pentationparts = value.split(\"^^^\");\n if (pentationparts.length === 2) {\n const base = parseFloat(pentationparts[0]);\n const height = parseFloat(pentationparts[1]);\n const heightparts = pentationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.pentate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^^y format.\n const tetrationparts = value.split(\"^^\");\n if (tetrationparts.length === 2) {\n const base = parseFloat(tetrationparts[0]);\n const height = parseFloat(tetrationparts[1]);\n const heightparts = tetrationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^y format.\n const powparts = value.split(\"^\");\n if (powparts.length === 2) {\n const base = parseFloat(powparts[0]);\n const exponent = parseFloat(powparts[1]);\n if (isFinite(base) && isFinite(exponent)) {\n const result = Decimal.pow(base, exponent);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle various cases involving it being a Big Number.\n value = value.trim().toLowerCase();\n\n //handle X PT Y format.\n let base;\n let height;\n let ptparts = value.split(\"pt\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //handle XpY format (it's the same thing just with p).\n ptparts = value.split(\"p\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n const parts = value.split(\"e\");\n const ecount = parts.length - 1;\n\n //Handle numbers that are exactly floats (0 or 1 es).\n if (ecount === 0) {\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt)) {\n return this.fromNumber(numberAttempt);\n }\n } else if (ecount === 1) {\n //Very small numbers (\"2e-3000\" and so on) may look like valid floats but round to 0.\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt) && numberAttempt !== 0) {\n return this.fromNumber(numberAttempt);\n }\n }\n\n //Handle new (e^N)X format.\n const newparts = value.split(\"e^\");\n if (newparts.length === 2) {\n this.sign = 1;\n if (newparts[0].charAt(0) == \"-\") {\n this.sign = -1;\n }\n let layerstring = \"\";\n for (let i = 0; i < newparts[1].length; ++i) {\n const chrcode = newparts[1].charCodeAt(i);\n if ((chrcode >= 43 && chrcode <= 57) || chrcode === 101) {\n //is \"0\" to \"9\" or \"+\" or \"-\" or \".\" or \"e\" (or \",\" or \"/\")\n layerstring += newparts[1].charAt(i);\n } //we found the end of the layer count\n else {\n this.layer = parseFloat(layerstring);\n this.mag = parseFloat(newparts[1].substr(i + 1));\n this.normalize();\n return this;\n }\n }\n }\n\n if (ecount < 1) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n const mantissa = parseFloat(parts[0]);\n if (mantissa === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n let exponent = parseFloat(parts[parts.length - 1]);\n //handle numbers like AeBeC and AeeeeBeC\n if (ecount >= 2) {\n const me = parseFloat(parts[parts.length - 2]);\n if (isFinite(me)) {\n exponent *= Math.sign(me);\n exponent += f_maglog10(me);\n }\n }\n\n //Handle numbers written like eee... (N es) X\n if (!isFinite(mantissa)) {\n this.sign = parts[0] === \"-\" ? -1 : 1;\n this.layer = ecount;\n this.mag = exponent;\n }\n //Handle numbers written like XeY\n else if (ecount === 1) {\n this.sign = Math.sign(mantissa);\n this.layer = 1;\n //Example: 2e10 is equal to 10^log10(2e10) which is equal to 10^(10+log10(2))\n this.mag = exponent + Math.log10(Math.abs(mantissa));\n }\n //Handle numbers written like Xeee... (N es) Y\n else {\n this.sign = Math.sign(mantissa);\n this.layer = ecount;\n if (ecount === 2) {\n const result = Decimal.mul(FC(1, 2, exponent), D(mantissa));\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n } else {\n //at eee and above, mantissa is too small to be recognizable!\n this.mag = exponent;\n }\n }\n\n this.normalize();\n return this;\n }\n\n public fromValue(value: DecimalSource): Decimal {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n return this.fromDecimal(value);\n }\n\n if (typeof value === \"number\") {\n return this.fromNumber(value);\n }\n\n if (typeof value === \"string\") {\n return this.fromString(value);\n }\n\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n\n public toNumber(): number {\n if (!Number.isFinite(this.layer)) {\n return Number.NaN;\n }\n if (this.layer === 0) {\n return this.sign * this.mag;\n } else if (this.layer === 1) {\n return this.sign * Math.pow(10, this.mag);\n } //overflow for any normalized Decimal\n else {\n return this.mag > 0\n ? this.sign > 0\n ? Number.POSITIVE_INFINITY\n : Number.NEGATIVE_INFINITY\n : 0;\n }\n }\n\n public mantissaWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.m)) {\n return Number.NaN;\n }\n\n if (this.m === 0) {\n return 0;\n }\n\n return decimalPlaces(this.m, places);\n }\n\n public magnitudeWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.mag)) {\n return Number.NaN;\n }\n\n if (this.mag === 0) {\n return 0;\n }\n\n return decimalPlaces(this.mag, places);\n }\n\n public toString(): string {\n if (isNaN(this.layer) || isNaN(this.sign) || isNaN(this.mag)) {\n return \"NaN\";\n }\n if (this.mag === Number.POSITIVE_INFINITY || this.layer === Number.POSITIVE_INFINITY) {\n return this.sign === 1 ? \"Infinity\" : \"-Infinity\";\n }\n\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toString();\n }\n return this.m + \"e\" + this.e;\n } else if (this.layer === 1) {\n return this.m + \"e\" + this.e;\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (this.sign === -1 ? \"-\" : \"\") + \"e\".repeat(this.layer) + this.mag;\n } else {\n return (this.sign === -1 ? \"-\" : \"\") + \"(e^\" + this.layer + \")\" + this.mag;\n }\n }\n }\n\n public toExponential(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toExponential(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toFixed(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toPrecision(places: number): string {\n if (this.e <= -7) {\n return this.toExponential(places - 1);\n }\n\n if (places > this.e) {\n return this.toFixed(places - this.exponent - 1);\n }\n\n return this.toExponential(places - 1);\n }\n\n public valueOf(): string {\n return this.toString();\n }\n\n public toJSON(): string {\n return this.toString();\n }\n\n public toStringWithDecimalPlaces(places: number): string {\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else if (this.layer === 1) {\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"e\".repeat(this.layer) +\n decimalPlaces(this.mag, places)\n );\n } else {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"(e^\" +\n this.layer +\n \")\" +\n decimalPlaces(this.mag, places)\n );\n }\n }\n }\n\n public abs(): Decimal {\n return FC_NN(this.sign === 0 ? 0 : 1, this.layer, this.mag);\n }\n\n public neg(): Decimal {\n return FC_NN(-this.sign, this.layer, this.mag);\n }\n\n public negate(): Decimal {\n return this.neg();\n }\n\n public negated(): Decimal {\n return this.neg();\n }\n\n // public sign () {\n // return this.sign;\n // }\n\n public sgn(): number {\n return this.sign;\n }\n\n public round(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.round(this.mag));\n }\n return this;\n }\n\n public floor(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.floor(this.mag));\n }\n return this;\n }\n\n public ceil(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.ceil(this.mag));\n }\n return this;\n }\n\n public trunc(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.trunc(this.mag));\n }\n return this;\n }\n\n public add(value: DecimalSource): this | Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return the other number.\n if (this.sign === 0) {\n return decimal;\n }\n if (decimal.sign === 0) {\n return this;\n }\n\n //Special case - Adding a number to its negation produces 0, no matter how large.\n if (\n this.sign === -decimal.sign &&\n this.layer === decimal.layer &&\n this.mag === decimal.mag\n ) {\n return FC_NN(0, 0, 0);\n }\n\n let a;\n let b;\n\n //Special case: If one of the numbers is layer 2 or higher, just take the bigger number.\n if (this.layer >= 2 || decimal.layer >= 2) {\n return this.maxabs(decimal);\n }\n\n if (Decimal.cmpabs(this, decimal) > 0) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * a.mag + b.sign * b.mag);\n }\n\n const layera = a.layer * Math.sign(a.mag);\n const layerb = b.layer * Math.sign(b.mag);\n\n //If one of the numbers is 2+ layers higher than the other, just take the bigger number.\n if (layera - layerb >= 2) {\n return a;\n }\n\n if (layera === 0 && layerb === -1) {\n if (Math.abs(b.mag - Math.log10(a.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, Math.log10(a.mag) - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n }\n\n if (layera === 1 && layerb === 0) {\n if (Math.abs(a.mag - Math.log10(b.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - Math.log10(b.mag));\n const mantissa = b.sign + a.sign * magdiff;\n return FC(\n Math.sign(mantissa),\n 1,\n Math.log10(b.mag) + Math.log10(Math.abs(mantissa))\n );\n }\n }\n\n if (Math.abs(a.mag - b.mag) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n\n throw Error(\"Bad arguments to add: \" + this + \", \" + value);\n }\n\n public plus(value: DecimalSource): Decimal {\n return this.add(value);\n }\n\n public sub(value: DecimalSource): Decimal {\n return this.add(D(value).neg());\n }\n\n public subtract(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public minus(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public mul(value: DecimalSource): Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return 0.\n if (this.sign === 0 || decimal.sign === 0) {\n return FC_NN(0, 0, 0);\n }\n\n //Special case - Multiplying a number by its own reciprocal yields +/- 1, no matter how large.\n if (this.layer === decimal.layer && this.mag === -decimal.mag) {\n return FC_NN(this.sign * decimal.sign, 0, 1);\n }\n\n let a;\n let b;\n\n //Which number is bigger in terms of its multiplicative distance from 1?\n if (\n this.layer > decimal.layer ||\n (this.layer == decimal.layer && Math.abs(this.mag) > Math.abs(decimal.mag))\n ) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * b.sign * a.mag * b.mag);\n }\n\n //Special case: If one of the numbers is layer 3 or higher or one of the numbers is 2+ layers bigger than the other, just take the bigger number.\n if (a.layer >= 3 || a.layer - b.layer >= 2) {\n return FC(a.sign * b.sign, a.layer, a.mag);\n }\n\n if (a.layer === 1 && b.layer === 0) {\n return FC(a.sign * b.sign, 1, a.mag + Math.log10(b.mag));\n }\n\n if (a.layer === 1 && b.layer === 1) {\n return FC(a.sign * b.sign, 1, a.mag + b.mag);\n }\n\n if (a.layer === 2 && b.layer === 1) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n if (a.layer === 2 && b.layer === 2) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n throw Error(\"Bad arguments to mul: \" + this + \", \" + value);\n }\n\n public multiply(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public times(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public div(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.mul(decimal.recip());\n }\n\n public divide(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public divideBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public dividedBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public recip(): Decimal {\n if (this.mag === 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, 1 / this.mag);\n } else {\n return FC(this.sign, this.layer, -this.mag);\n }\n }\n\n public reciprocal(): Decimal {\n return this.recip();\n }\n\n public reciprocate(): Decimal {\n return this.recip();\n }\n\n /**\n * -1 for less than value, 0 for equals value, 1 for greater than value\n */\n public cmp(value: DecimalSource): CompareResult {\n const decimal = D(value);\n if (this.sign > decimal.sign) {\n return 1;\n }\n if (this.sign < decimal.sign) {\n return -1;\n }\n return (this.sign * this.cmpabs(value)) as CompareResult;\n }\n\n public cmpabs(value: DecimalSource): CompareResult {\n const decimal = D(value);\n const layera = this.mag > 0 ? this.layer : -this.layer;\n const layerb = decimal.mag > 0 ? decimal.layer : -decimal.layer;\n if (layera > layerb) {\n return 1;\n }\n if (layera < layerb) {\n return -1;\n }\n if (this.mag > decimal.mag) {\n return 1;\n }\n if (this.mag < decimal.mag) {\n return -1;\n }\n return 0;\n }\n\n public compare(value: DecimalSource): CompareResult {\n return this.cmp(value);\n }\n\n public isNan(): boolean {\n return isNaN(this.sign) || isNaN(this.layer) || isNaN(this.mag);\n }\n\n public isFinite(): boolean {\n return isFinite(this.sign) && isFinite(this.layer) && isFinite(this.mag);\n }\n\n public eq(value: DecimalSource): boolean {\n const decimal = D(value);\n return (\n this.sign === decimal.sign && this.layer === decimal.layer && this.mag === decimal.mag\n );\n }\n\n public equals(value: DecimalSource): boolean {\n return this.eq(value);\n }\n\n public neq(value: DecimalSource): boolean {\n return !this.eq(value);\n }\n\n public notEquals(value: DecimalSource): boolean {\n return this.neq(value);\n }\n\n public lt(value: DecimalSource): boolean {\n return this.cmp(value) === -1;\n }\n\n public lte(value: DecimalSource): boolean {\n return !this.gt(value);\n }\n\n public gt(value: DecimalSource): boolean {\n return this.cmp(value) === 1;\n }\n\n public gte(value: DecimalSource): boolean {\n return !this.lt(value);\n }\n\n public max(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.lt(decimal) ? decimal : this;\n }\n\n public min(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.gt(decimal) ? decimal : this;\n }\n\n public maxabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) < 0 ? decimal : this;\n }\n\n public minabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) > 0 ? decimal : this;\n }\n\n public clamp(min: DecimalSource, max: DecimalSource): Decimal {\n return this.max(min).min(max);\n }\n\n public clampMin(min: DecimalSource): Decimal {\n return this.max(min);\n }\n\n public clampMax(max: DecimalSource): Decimal {\n return this.min(max);\n }\n\n public cmp_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) ? 0 : this.cmp(decimal);\n }\n\n public compare_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n return this.cmp_tolerance(value, tolerance);\n }\n\n /**\n * Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments.\n * For example, if you put in 1e-9, then any number closer to the\n * larger number than (larger number)*1e-9 will be considered equal.\n */\n public eq_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value); // https://stackoverflow.com/a/33024979\n if (tolerance == null) {\n tolerance = 1e-7;\n }\n //Numbers that are too far away are never close.\n if (this.sign !== decimal.sign) {\n return false;\n }\n if (Math.abs(this.layer - decimal.layer) > 1) {\n return false;\n }\n // return abs(a-b) <= tolerance * max(abs(a), abs(b))\n let magA = this.mag;\n let magB = decimal.mag;\n if (this.layer > decimal.layer) {\n magB = f_maglog10(magB);\n }\n if (this.layer < decimal.layer) {\n magA = f_maglog10(magA);\n }\n return Math.abs(magA - magB) <= tolerance * Math.max(Math.abs(magA), Math.abs(magB));\n }\n\n public equals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.eq_tolerance(value, tolerance);\n }\n\n public neq_tolerance(value: DecimalSource, tolerance: number): boolean {\n return !this.eq_tolerance(value, tolerance);\n }\n\n public notEquals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.neq_tolerance(value, tolerance);\n }\n\n public lt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.lt(decimal);\n }\n\n public lte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.lt(decimal);\n }\n\n public gt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.gt(decimal);\n }\n\n public gte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.gt(decimal);\n }\n\n public pLog10(): Decimal {\n if (this.lt(Decimal.dZero)) {\n return Decimal.dZero;\n }\n return this.log10();\n }\n\n public absLog10(): Decimal {\n if (this.sign === 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(1, 0, Math.log10(this.mag));\n }\n }\n\n public log10(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(this.sign, 0, Math.log10(this.mag));\n }\n }\n\n public log(base: DecimalSource): Decimal {\n base = D(base);\n if (this.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign === 1 && base.layer === 0 && base.mag === 1) {\n return Decimal.dNaN;\n } else if (this.layer === 0 && base.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag) / Math.log(base.mag));\n }\n\n return Decimal.div(this.log10(), base.log10());\n }\n\n public log2(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log2(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 3.321928094887362); //log2(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.5213902276543247); //-log10(log10(2))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public ln(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 2.302585092994046); //ln(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.36221568869946325); //log10(log10(e))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public logarithm(base: DecimalSource): Decimal {\n return this.log(base);\n }\n\n public pow(value: DecimalSource): Decimal {\n const decimal = D(value);\n const a = this;\n const b = decimal;\n\n //special case: if a is 0, then return 0 (UNLESS b is 0, then return 1)\n if (a.sign === 0) {\n return b.eq(0) ? FC_NN(1, 0, 1) : a;\n }\n //special case: if a is 1, then return 1\n if (a.sign === 1 && a.layer === 0 && a.mag === 1) {\n return a;\n }\n //special case: if b is 0, then return 1\n if (b.sign === 0) {\n return FC_NN(1, 0, 1);\n }\n //special case: if b is 1, then return a\n if (b.sign === 1 && b.layer === 0 && b.mag === 1) {\n return a;\n }\n\n const result = a\n .absLog10()\n .mul(b)\n .pow10();\n\n if (this.sign === -1) {\n if (Math.abs(b.toNumber() % 2) % 2 === 1) {\n return result.neg();\n } else if (Math.abs(b.toNumber() % 2) % 2 === 0) {\n return result;\n }\n return Decimal.dNaN;\n }\n\n return result;\n }\n\n public pow10(): Decimal {\n /*\n There are four cases we need to consider:\n 1) positive sign, positive mag (e15, ee15): +1 layer (e.g. 10^15 becomes e15, 10^e15 becomes ee15)\n 2) negative sign, positive mag (-e15, -ee15): +1 layer but sign and mag sign are flipped (e.g. 10^-15 becomes e-15, 10^-e15 becomes ee-15)\n 3) positive sign, negative mag (e-15, ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n 4) negative sign, negative mag (-e-15, -ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n */\n\n if (!Number.isFinite(this.layer) || !Number.isFinite(this.mag)) {\n return Decimal.dNaN;\n }\n\n let a = this;\n\n //handle layer 0 case - if no precision is lost just use Math.pow, else promote one layer\n if (a.layer === 0) {\n const newmag = Math.pow(10, a.sign * a.mag);\n if (Number.isFinite(newmag) && Math.abs(newmag) >= 0.1) {\n return FC(1, 0, newmag);\n } else {\n if (a.sign === 0) {\n return Decimal.dOne;\n } else {\n a = FC_NN(a.sign, a.layer + 1, Math.log10(a.mag)) as this;\n }\n }\n }\n\n //handle all 4 layer 1+ cases individually\n if (a.sign > 0 && a.mag >= 0) {\n return FC(a.sign, a.layer + 1, a.mag);\n }\n if (a.sign < 0 && a.mag >= 0) {\n return FC(-a.sign, a.layer + 1, -a.mag);\n }\n //both the negative mag cases are identical: one +/- rounding error\n return Decimal.dOne;\n }\n\n public pow_base(value: DecimalSource): Decimal {\n return D(value).pow(this);\n }\n\n public root(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.pow(decimal.recip());\n }\n\n public factorial(): Decimal {\n if (this.mag < 0) {\n return this.add(1).gamma();\n } else if (this.layer === 0) {\n return this.add(1).gamma();\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n //from HyperCalc source code\n public gamma(): Decimal {\n if (this.mag < 0) {\n return this.recip();\n } else if (this.layer === 0) {\n if (this.lt(FC_NN(1, 0, 24))) {\n return D(f_gamma(this.sign * this.mag));\n }\n\n const t = this.mag - 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (t + 0.5) * Math.log(t);\n l = l - t;\n const n2 = t * t;\n let np = t;\n let lm = 12 * np;\n let adj = 1 / lm;\n let l2 = l + adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 360 * np;\n adj = 1 / lm;\n l2 = l - adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 1260 * np;\n let lt = 1 / lm;\n l = l + lt;\n np = np * n2;\n lm = 1680 * np;\n lt = 1 / lm;\n l = l - lt;\n return Decimal.exp(l);\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n public lngamma(): Decimal {\n return this.gamma().ln();\n }\n\n public exp(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0 && this.mag <= 709.7) {\n return D(Math.exp(this.sign * this.mag));\n } else if (this.layer === 0) {\n return FC(1, 1, this.sign * Math.log10(Math.E) * this.mag);\n } else if (this.layer === 1) {\n return FC(1, 2, this.sign * (Math.log10(0.4342944819032518) + this.mag));\n } else {\n return FC(1, this.layer + 1, this.sign * this.mag);\n }\n }\n\n public sqr(): Decimal {\n return this.pow(2);\n }\n\n public sqrt(): Decimal {\n if (this.layer === 0) {\n return D(Math.sqrt(this.sign * this.mag));\n } else if (this.layer === 1) {\n return FC(1, 2, Math.log10(this.mag) - 0.3010299956639812);\n } else {\n const result = Decimal.div(FC_NN(this.sign, this.layer - 1, this.mag), FC_NN(1, 0, 2));\n result.layer += 1;\n result.normalize();\n return result;\n }\n }\n\n public cube(): Decimal {\n return this.pow(3);\n }\n\n public cbrt(): Decimal {\n return this.pow(1 / 3);\n }\n\n //Tetration/tetrate: The result of exponentiating 'this' to 'this' 'height' times in a row. https://en.wikipedia.org/wiki/Tetration\n //If payload != 1, then this is 'iterated exponentiation', the result of exping (payload) to base (this) (height) times. https://andydude.github.io/tetration/archives/tetration2/ident.html\n //Works with negative and positive real heights.\n public tetrate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n //x^^1 == x\n if (height === 1) {\n return Decimal.pow(this, payload);\n }\n //x^^0 == 1\n if (height === 0) {\n return new Decimal(payload);\n }\n //1^^x == 1\n if (this.eq(Decimal.dOne)) {\n return Decimal.dOne;\n }\n //-1^^x == -1\n if (this.eq(-1)) {\n return Decimal.pow(this, payload);\n }\n\n if (height === Number.POSITIVE_INFINITY) {\n const this_num = this.toNumber();\n //within the convergence range?\n if (this_num <= 1.44466786100976613366 && this_num >= 0.06598803584531253708) {\n //hotfix for the very edge of the number range not being handled properly\n if (this_num > 1.444667861009099) {\n return new Decimal(Math.E);\n }\n //Formula for infinite height power tower.\n const negln = Decimal.ln(this).neg();\n return negln.lambertw().div(negln);\n } else if (this_num > 1.44466786100976613366) {\n //explodes to infinity\n return new Decimal(Number.POSITIVE_INFINITY);\n } else {\n //0.06598803584531253708 > this_num >= 0: never converges\n //this_num < 0: quickly becomes a complex number\n return Decimal.dNaN;\n }\n }\n\n //0^^x oscillates if we define 0^0 == 1 (which in javascript land we do), since then 0^^1 is 0, 0^^2 is 1, 0^^3 is 0, etc. payload is ignored\n //using the linear approximation for height (TODO: don't know a better way to calculate it ATM, but it wouldn't surprise me if it's just NaN)\n if (this.eq(Decimal.dZero)) {\n let result = Math.abs((height + 1) % 2);\n if (result > 1) {\n result = 2 - result;\n }\n return new Decimal(result);\n }\n\n if (height < 0) {\n return Decimal.iteratedlog(payload, this, -height);\n }\n\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n if (this.gt(Decimal.dZero) && this.lte(1.44466786100976613366)) {\n //similar to 0^^n, flip-flops between two values, converging slowly (or if it's below 0.06598803584531253708, never. so once again, the fractional part at the end will be a linear approximation (TODO: again pending knowledge of how to approximate better, although tbh I think it should in reality just be NaN)\n height = Math.min(10000, height);\n for (let i = 0; i < height; ++i) {\n const old_payload: Decimal = payload;\n payload = this.pow(payload);\n //stop early if we converge\n if (old_payload.eq(payload)) {\n return payload;\n }\n }\n if (fracheight != 0) {\n const next_payload = this.pow(payload);\n return payload.mul(1 - fracheight).add(next_payload.mul(fracheight));\n }\n return payload;\n }\n //TODO: base < 0, but it's hard for me to reason about (probably all non-integer heights are NaN automatically?)\n\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (this.gt(10)) {\n payload = this.pow(fracheight);\n } else {\n payload = D(Decimal.tetrate_critical(this.toNumber(), fracheight));\n //TODO: until the critical section grid can handle numbers below 2, scale them to the base\n //TODO: maybe once the critical section grid has very large bases, this math can be appropriate for them too? I'll think about it\n if (this.lt(2)) {\n payload = payload\n .sub(1)\n .mul(this.minus(1))\n .plus(1);\n }\n }\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.pow(payload);\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //shortcut\n if (payload.layer - this.layer > 3) {\n return FC_NN(payload.sign, payload.layer + (height - i - 1), payload.mag);\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return payload;\n }\n }\n return payload;\n }\n\n //iteratedexp/iterated exponentiation: - all cases handled in tetrate, so just call it\n public iteratedexp(height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return this.tetrate(height, payload);\n }\n\n //iterated log/repeated log: The result of applying log(base) 'times' times in a row. Approximately equal to subtracting (times) from the number's slog representation. Equivalent to tetrating to a negative height.\n //Works with negative and positive real heights.\n public iteratedlog(base: DecimalSource = 10, times = 1): Decimal {\n if (times < 0) {\n return Decimal.tetrate(base, -times, this);\n }\n\n base = D(base);\n let result = D(this);\n const fulltimes = times;\n times = Math.trunc(times);\n const fraction = fulltimes - times;\n if (result.layer - base.layer > 3) {\n const layerloss = Math.min(times, result.layer - base.layer - 3);\n times -= layerloss;\n result.layer -= layerloss;\n }\n\n for (let i = 0; i < times; ++i) {\n result = result.log(base);\n //bail if we're NaN\n if (!isFinite(result.layer) || !isFinite(result.mag)) {\n return result.normalize();\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return result;\n }\n }\n\n //handle fractional part\n if (fraction > 0 && fraction < 1) {\n if (base.eq(10)) {\n result = result.layeradd10(-fraction);\n } else {\n result = result.layeradd(-fraction, base);\n }\n }\n\n return result;\n }\n\n //Super-logarithm, one of tetration's inverses, tells you what size power tower you'd have to tetrate base to to get number. By definition, will never be higher than 1.8e308 in break_eternity.js, since a power tower 1.8e308 numbers tall is the largest representable number.\n // https://en.wikipedia.org/wiki/Super-logarithm\n public slog(base: DecimalSource = 10): Decimal {\n base = D(base);\n\n //special cases:\n //slog base 0 or lower is NaN\n if (base.lte(Decimal.dZero)) {\n return Decimal.dNaN;\n }\n //slog base 1 is NaN\n if (base.eq(Decimal.dOne)) {\n return Decimal.dNaN;\n }\n //need to handle these small, wobbling bases specially\n if (base.lt(Decimal.dOne)) {\n if (this.eq(Decimal.dOne)) {\n return Decimal.dZero;\n }\n if (this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n //0 < this < 1: ambiguous (happens multiple times)\n //this < 0: impossible (as far as I can tell)\n //this > 1: partially complex (http://myweb.astate.edu/wpaulsen/tetcalc/tetcalc.html base 0.25 for proof)\n return Decimal.dNaN;\n }\n //slog_n(0) is -1\n if (this.mag < 0 || this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n\n let result = 0;\n let copy = D(this);\n if (copy.layer - base.layer > 3) {\n const layerloss = copy.layer - base.layer - 3;\n result += layerloss;\n copy.layer -= layerloss;\n }\n\n for (let i = 0; i < 100; ++i) {\n if (copy.lt(Decimal.dZero)) {\n copy = Decimal.pow(base, copy);\n result -= 1;\n } else if (copy.lte(Decimal.dOne)) {\n return D(result + Decimal.slog_critical(base.toNumber(), copy.toNumber()));\n } else {\n result += 1;\n copy = Decimal.log(copy, base);\n }\n }\n return D(result);\n }\n\n //background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\n public static slog_critical(base: number, height: number): number {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (base > 10) {\n return height - 1;\n }\n return Decimal.critical_section(base, height, critical_slog_values);\n }\n\n public static tetrate_critical(base: number, height: number): number {\n return Decimal.critical_section(base, height, critical_tetr_values);\n }\n\n public static critical_section(base: number, height: number, grid: number[][]): number {\n //this part is simple at least, since it's just 0.1 to 0.9\n height *= 10;\n if (height < 0) {\n height = 0;\n }\n if (height > 10) {\n height = 10;\n }\n //have to do this complicated song and dance since one of the critical_headers is Math.E, and in the future I'd like 1.5 as well\n if (base < 2) {\n base = 2;\n }\n if (base > 10) {\n base = 10;\n }\n let lower = 0;\n let upper = 0;\n //basically, if we're between bases, we interpolate each bases' relevant values together\n //then we interpolate based on what the fractional height is.\n //accuracy could be improved by doing a non-linear interpolation (maybe), by adding more bases and heights (definitely) but this is AFAIK the best you can get without running some pari.gp or mathematica program to calculate exact values\n for (let i = 0; i < critical_headers.length; ++i) {\n if (critical_headers[i] == base) {\n // exact match\n lower = grid[i][Math.floor(height)];\n upper = grid[i][Math.ceil(height)];\n break;\n } else if (critical_headers[i] < base && critical_headers[i + 1] > base) {\n // interpolate between this and the next\n const basefrac =\n (base - critical_headers[i]) / (critical_headers[i + 1] - critical_headers[i]);\n lower =\n grid[i][Math.floor(height)] * (1 - basefrac) +\n grid[i + 1][Math.floor(height)] * basefrac;\n upper =\n grid[i][Math.ceil(height)] * (1 - basefrac) +\n grid[i + 1][Math.ceil(height)] * basefrac;\n break;\n }\n }\n const frac = height - Math.floor(height);\n const result = lower * (1 - frac) + upper * frac;\n return result;\n }\n\n //Function for adding/removing layers from a Decimal, even fractional layers (e.g. its slog10 representation).\n //Moved this over to use the same critical section as tetrate/slog.\n public layeradd10(diff: DecimalSource): Decimal {\n diff = Decimal.fromValue_noAlloc(diff).toNumber();\n const result = D(this);\n if (diff >= 1) {\n //bug fix: if result is very smol (mag < 0, layer > 0) turn it into 0 first\n if (result.mag < 0 && result.layer > 0) {\n result.sign = 0;\n result.mag = 0;\n result.layer = 0;\n } else if (result.sign === -1 && result.layer == 0) {\n //bug fix - for stuff like -3.layeradd10(1) we need to move the sign to the mag\n result.sign = 1;\n result.mag = -result.mag;\n }\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n }\n if (diff <= -1) {\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n if (result.layer < 0) {\n for (let i = 0; i < 100; ++i) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n if (!isFinite(result.mag)) {\n //another bugfix: if we hit -Infinity mag, then we should return negative infinity, not 0. 0.layeradd10(-1) h its this\n if (result.sign === 0) {\n result.sign = 1;\n }\n //also this, for 0.layeradd10(-2)\n if (result.layer < 0) {\n result.layer = 0;\n }\n return result.normalize();\n }\n if (result.layer >= 0) {\n break;\n }\n }\n }\n }\n\n while (result.layer < 0) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n }\n //bugfix: before we normalize: if we started with 0, we now need to manually fix a layer ourselves!\n if (result.sign === 0) {\n result.sign = 1;\n if (result.mag === 0 && result.layer >= 1) {\n result.layer -= 1;\n result.mag = 1;\n }\n }\n result.normalize();\n\n //layeradd10: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 10 and iterated log base 10. Also equivalent to adding a fractional amount to the number's layer in its break_eternity.js representation.\n if (diff !== 0) {\n return result.layeradd(diff, 10); //safe, only calls positive height 1 payload tetration, slog and log\n }\n\n return result;\n }\n\n //layeradd: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 'base' and iterated log base 'base'.\n public layeradd(diff: number, base: DecimalSource): Decimal {\n const slogthis = this.slog(base).toNumber();\n const slogdest = slogthis + diff;\n if (slogdest >= 0) {\n return Decimal.tetrate(base, slogdest);\n } else if (!Number.isFinite(slogdest)) {\n return Decimal.dNaN;\n } else if (slogdest >= -1) {\n return Decimal.log(Decimal.tetrate(base, slogdest + 1), base);\n } else {\n return Decimal.log(Decimal.log(Decimal.tetrate(base, slogdest + 2), base), base);\n }\n }\n\n //The Lambert W function, also called the omega function or product logarithm, is the solution W(x) === x*e^x.\n // https://en.wikipedia.org/wiki/Lambert_W_function\n //Some special values, for testing: https://en.wikipedia.org/wiki/Lambert_W_function#Special_values\n public lambertw(): Decimal {\n if (this.lt(-0.3678794411710499)) {\n throw Error(\"lambertw is unimplemented for results less than -1, sorry!\");\n } else if (this.mag < 0) {\n return D(f_lambertw(this.toNumber()));\n } else if (this.layer === 0) {\n return D(f_lambertw(this.sign * this.mag));\n } else if (this.layer === 1) {\n return d_lambertw(this);\n } else if (this.layer === 2) {\n return d_lambertw(this);\n }\n if (this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n\n throw \"Unhandled behavior in lambertw()\";\n }\n\n //The super square-root function - what number, tetrated to height 2, equals this?\n //Other sroots are possible to calculate probably through guess and check methods, this one is easy though.\n // https://en.wikipedia.org/wiki/Tetration#Super-root\n public ssqrt(): Decimal {\n if (this.sign == 1 && this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n const lnx = this.ln();\n return lnx.div(lnx.lambertw());\n }\n /*\n\nUnit tests for tetrate/iteratedexp/iteratedlog/layeradd10/layeradd/slog:\n(note: these won't be exactly precise with the new slog implementation, but that's okay)\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var expected = first+both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(-both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n var expected = first+both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(-both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar tetrateonly = Decimal.tetrate(10, first);\nvar tetrateandlog = Decimal.tetrate(10, first+both).iteratedlog(10, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first);\nvar tetrateandlog = Decimal.tetrate(base, first+both).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first, base);\nvar tetrateandlog = Decimal.tetrate(base, first+both, base).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.random()*100);\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.exp(Math.random()*100));\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n var b = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.add(b).toNumber();\n if (Number.isFinite(c) && !Decimal.eq_tolerance(c, a.toNumber()+b.toNumber()))\n {\n console.log(a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 100; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.mul(b).toNumber();\n if (Number.isFinite(c) && Number.isFinite(a.toNumber()) && Number.isFinite(b.toNumber()) && a.toNumber() != 0 && b.toNumber() != 0 && c != 0 && !Decimal.eq_tolerance(c, a.toNumber()*b.toNumber()))\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n else if (!Decimal.mul(a.recip(), b.recip()).eq_tolerance(Decimal.mul(a, b).recip()))\n {\n console.log(\"Test 3: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5 && a.sign !== 0) { a = a.recip(); }\n if (Math.random() > 0.5 && b.sign !== 0) { b = b.recip(); }\n var c = a.pow(b);\n var d = a.root(b.recip());\n var e = a.pow(b.recip());\n var f = a.root(b);\n\n if (!c.eq_tolerance(d) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n if (!e.eq_tolerance(f) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 2: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Math.round(Math.random()*18-9);\n var b = Math.round(Math.random()*100-50);\n var c = Math.round(Math.random()*18-9);\n var d = Math.round(Math.random()*100-50);\n console.log(\"Decimal.pow(Decimal.fromMantissaExponent(\" + a + \", \" + b + \"), Decimal.fromMantissaExponent(\" + c + \", \" + d + \")).toString()\");\n}\n\n*/\n\n //Pentation/pentate: The result of tetrating 'height' times in a row. An absurdly strong operator - Decimal.pentate(2, 4.28) and Decimal.pentate(10, 2.37) are already too huge for break_eternity.js!\n // https://en.wikipedia.org/wiki/Pentation\n public pentate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n //I have no idea if this is a meaningful approximation for pentation to continuous heights, but it is monotonic and continuous.\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n ++height;\n payload = new Decimal(fracheight);\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.tetrate(payload.toNumber());\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //give up after 10 iterations if nothing is happening\n if (i > 10) {\n return payload;\n }\n }\n\n return payload;\n }\n\n // trig functions!\n public sin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.sin(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public cos(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0) {\n return D(Math.cos(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public tan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.tan(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public asin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.asin(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public acos(): Decimal {\n if (this.mag < 0) {\n return D(Math.acos(this.toNumber()));\n }\n if (this.layer === 0) {\n return D(Math.acos(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public atan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.atan(this.sign * this.mag));\n }\n return D(Math.atan(this.sign * 1.8e308));\n }\n\n public sinh(): Decimal {\n return this.exp()\n .sub(this.negate().exp())\n .div(2);\n }\n\n public cosh(): Decimal {\n return this.exp()\n .add(this.negate().exp())\n .div(2);\n }\n\n public tanh(): Decimal {\n return this.sinh().div(this.cosh());\n }\n\n public asinh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .add(1)\n .sqrt()\n )\n );\n }\n\n public acosh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .sub(1)\n .sqrt()\n )\n );\n }\n\n public atanh(): Decimal {\n if (this.abs().gte(1)) {\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n return Decimal.ln(this.add(1).div(D(1).sub(this))).div(2);\n }\n\n /**\n * Joke function from Realm Grinder\n */\n public ascensionPenalty(ascensions: DecimalSource): Decimal {\n if (ascensions === 0) {\n return this;\n }\n\n return this.root(Decimal.pow(10, ascensions));\n }\n\n /**\n * Joke function from Cookie Clicker. It's 'egg'\n */\n public egg(): Decimal {\n return this.add(9);\n }\n\n public lessThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) < 1;\n }\n\n public lessThan(other: DecimalSource): boolean {\n return this.cmp(other) < 0;\n }\n\n public greaterThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) > -1;\n }\n\n public greaterThan(other: DecimalSource): boolean {\n return this.cmp(other) > 0;\n }\n\n // return Decimal;\n}\n\n// return Decimal;\n","import Decimal, { DecimalSource } from \"lib/break_eternity\";\nimport projInfo from \"data/projInfo.json\";\n\nexport default Decimal;\n\nconst decimalOne = new Decimal(1);\n\nexport function exponentialFormat(num: DecimalSource, precision: number, mantissa = true): string {\n let e = Decimal.log10(num).floor();\n let m = Decimal.div(num, Decimal.pow(10, e));\n if (m.toStringWithDecimalPlaces(precision) === \"10\") {\n m = decimalOne;\n e = e.add(1);\n }\n const eString = e.gte(1e9)\n ? format(e, Math.max(Math.max(precision, 3), projInfo.defaultDecimalsShown))\n : e.gte(10000)\n ? commaFormat(e, 0)\n : e.toStringWithDecimalPlaces(0);\n if (mantissa) {\n return m.toStringWithDecimalPlaces(precision) + \"e\" + eString;\n } else {\n return \"e\" + eString;\n }\n}\n\nexport function commaFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.001) {\n return (0).toFixed(precision);\n }\n const init = num.toStringWithDecimalPlaces(precision);\n const portions = init.split(\".\");\n portions[0] = portions[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1,\");\n if (portions.length == 1) return portions[0];\n return portions[0] + \".\" + portions[1];\n}\n\nexport function regularFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.0001) {\n return (0).toFixed(precision);\n }\n if (num.mag < 0.1 && precision !== 0) {\n precision = Math.max(Math.max(precision, 4), projInfo.defaultDecimalsShown);\n }\n return num.toStringWithDecimalPlaces(precision);\n}\n\nconst eeee1000 = new Decimal(\"eeee1000\");\nconst e100000 = new Decimal(\"e100000\");\nconst e1000 = new Decimal(\"e1000\");\nconst e9 = new Decimal(1e9);\nconst e6 = new Decimal(1e6);\nconst e3 = new Decimal(1e3);\nconst nearOne = new Decimal(0.98);\nconst thousandth = new Decimal(0.001);\nconst zero = new Decimal(0);\nexport function format(num: DecimalSource, precision?: number, small?: boolean): string {\n if (precision == null) precision = projInfo.defaultDecimalsShown;\n small = small ?? projInfo.defaultShowSmall;\n num = new Decimal(num);\n if (isNaN(num.sign) || isNaN(num.layer) || isNaN(num.mag)) {\n return \"NaN\";\n }\n if (num.sign < 0) {\n return \"-\" + format(num.neg(), precision);\n }\n if (num.mag === Number.POSITIVE_INFINITY) {\n return \"Infinity\";\n }\n if (num.gte(eeee1000)) {\n const slog = num.slog();\n if (slog.gte(e6)) {\n return \"F\" + format(slog.floor());\n } else {\n return (\n Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) +\n \"F\" +\n commaFormat(slog.floor(), 0)\n );\n }\n } else if (num.gte(e100000)) {\n return exponentialFormat(num, 0, false);\n } else if (num.gte(e1000)) {\n return exponentialFormat(num, 0);\n } else if (num.gte(e9)) {\n return exponentialFormat(num, precision);\n } else if (num.gte(e3)) {\n return commaFormat(num, 0);\n } else if (num.gte(thousandth) || !small) {\n return regularFormat(num, precision);\n } else if (num.eq(zero)) {\n return (0).toFixed(precision);\n }\n\n num = invertOOM(num);\n if (num.lt(e1000)) {\n const val = exponentialFormat(num, precision);\n return val.replace(/([^(?:e|F)]*)$/, \"-$1\");\n } else {\n return format(num, precision) + \"⁻¹\";\n }\n}\n\nexport function formatWhole(num: DecimalSource): string {\n num = new Decimal(num);\n if (num.sign < 0) {\n return \"-\" + formatWhole(num.neg());\n }\n if (num.gte(e9)) {\n return format(num);\n }\n if (num.lte(nearOne) && !num.eq(zero)) {\n return format(num);\n }\n return format(num, 0);\n}\n\nexport function formatTime(seconds: DecimalSource): string {\n if (Decimal.lt(seconds, 0)) {\n return \"-\" + formatTime(Decimal.neg(seconds));\n }\n if (Decimal.gt(seconds, 2 ** 51)) {\n // integer precision limit\n return format(Decimal.div(seconds, 31536000)) + \"y\";\n }\n seconds = new Decimal(seconds).toNumber();\n if (seconds < 60) {\n return format(seconds) + \"s\";\n } else if (seconds < 3600) {\n return formatWhole(Math.floor(seconds / 60)) + \"m \" + format(seconds % 60) + \"s\";\n } else if (seconds < 86400) {\n return (\n formatWhole(Math.floor(seconds / 3600)) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m \" +\n formatWhole(seconds % 60) +\n \"s\"\n );\n } else if (seconds < 31536000) {\n return (\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m\"\n );\n } else {\n return (\n formatWhole(Math.floor(seconds / 31536000)) +\n \"y \" +\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h\"\n );\n }\n}\n\nexport function toPlaces(x: DecimalSource, precision: number, maxAccepted: DecimalSource): string {\n x = new Decimal(x);\n let result = x.toStringWithDecimalPlaces(precision);\n if (new Decimal(result).gte(maxAccepted)) {\n result = Decimal.sub(maxAccepted, Math.pow(0.1, precision)).toStringWithDecimalPlaces(\n precision\n );\n }\n return result;\n}\n\n// Will also display very small numbers\nexport function formatSmall(x: DecimalSource, precision?: number): string {\n return format(x, precision, true);\n}\n\nexport function invertOOM(x: DecimalSource): Decimal {\n let e = Decimal.log10(x).ceil();\n const m = Decimal.div(x, Decimal.pow(10, e));\n e = e.neg();\n x = new Decimal(10).pow(e).times(m);\n\n return x;\n}\n","// Import Decimal and numberUtils from a different file to globally change which big num library gets used\n// This way switching out big number libraries just needs to happen here, not every file that needs big numbers\nimport { DecimalSource as RawDecimalSource } from \"lib/break_eternity\";\nimport Decimal, * as numberUtils from \"util/break_eternity\";\n\nexport const {\n exponentialFormat,\n commaFormat,\n regularFormat,\n format,\n formatWhole,\n formatTime,\n toPlaces,\n formatSmall,\n invertOOM\n} = numberUtils;\n\nexport type DecimalSource = RawDecimalSource;\n\nwindow.Decimal = Decimal;\nwindow.exponentialFormat = exponentialFormat;\nwindow.commaFormat = commaFormat;\nwindow.regularFormat = regularFormat;\nwindow.format = format;\nwindow.formatWhole = formatWhole;\nwindow.formatTime = formatTime;\nwindow.toPlaces = toPlaces;\nwindow.formatSmall = formatSmall;\nwindow.invertOOM = invertOOM;\n\nexport default Decimal;\n","// Reference:\n// https://stackoverflow.com/questions/7225407/convert-camelcasetext-to-sentence-case-text\nexport function camelToTitle(camel: string): string {\n let title = camel.replace(/([A-Z])/g, \" $1\");\n title = title.charAt(0).toUpperCase() + title.slice(1);\n return title;\n}\n\nexport function isPlainObject(object: unknown): boolean {\n return Object.prototype.toString.call(object) === \"[object Object]\";\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(func: unknown): func is Function {\n return typeof func === \"function\";\n}\n","import { computed, Ref } from \"vue\";\nimport { isFunction } from \"./common\";\n\nexport const DoNotCache = Symbol(\"DoNotCache\");\n\nexport type Computable = T | Ref | (() => T);\nexport type ProcessedComputable = T | Ref;\nexport type GetComputableType = T extends { [DoNotCache]: true }\n ? T\n : T extends () => infer S\n ? Ref\n : undefined extends T\n ? undefined\n : T;\nexport type GetComputableTypeWithDefault = undefined extends T\n ? S\n : GetComputableType>;\nexport type UnwrapComputableType = T extends Ref ? S : T extends () => infer S ? S : T;\n\nexport type ComputableKeysOf = Pick<\n T,\n {\n [K in keyof T]: T[K] extends Computable ? K : never;\n }[keyof T]\n>;\n\n// TODO fix the typing of this function, such that casting isn't necessary and can be used to\n// detect if a createX function is validly written\nexport function processComputable>(\n obj: T,\n key: S\n): asserts obj is T & { [K in S]: ProcessedComputable> } {\n const computable = obj[key];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(computable) && computable.length === 0 && !(computable as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj[key] = computed(computable.bind(obj));\n }\n}\n\nexport function convertComputable(obj: Computable): ProcessedComputable {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(obj) && !(obj as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj = computed(obj);\n }\n return obj as ProcessedComputable;\n}\n","import Decimal from \"./bignum\";\n\nexport const ProxyState = Symbol(\"ProxyState\");\nexport const ProxyPath = Symbol(\"ProxyPath\");\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ProxiedWithState = NonNullable extends Record\n ? NonNullable extends Decimal\n ? T\n : {\n [K in keyof T]: ProxiedWithState;\n } & {\n [ProxyState]: T;\n [ProxyPath]: string[];\n }\n : T;\n\n// Takes a function that returns an object and pretends to be that object\n// Note that the object is lazily calculated\nexport function createLazyProxy(\n objectFunc: (baseObject: S) => T & S,\n baseObject: S = {} as S\n): T {\n const obj: S & Partial = baseObject;\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return obj as S & T;\n }\n\n return new Proxy(obj, {\n get(target, key) {\n if (key === ProxyState) {\n return calculateObj();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (calculateObj() as any)[key];\n },\n set(target, key, value) {\n // TODO give warning about this? It should only be done with caution\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (calculateObj() as any)[key] = value;\n return true;\n },\n has(target, key) {\n if (key === ProxyState) {\n return true;\n }\n return Reflect.has(calculateObj(), key);\n },\n ownKeys() {\n return Reflect.ownKeys(calculateObj());\n },\n getOwnPropertyDescriptor(target, key) {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as S & T;\n}\n","import projInfo from \"data/projInfo.json\";\nimport player, { Player, PlayerData, stringifySave } from \"game/player\";\nimport settings, { loadSettings } from \"game/settings\";\nimport { ProxyState } from \"./proxies\";\n\nexport function setupInitialStore(player: Partial = {}): Player {\n return Object.assign(\n {\n id: `${projInfo.id}-0`,\n name: \"Default Save\",\n tabs: projInfo.initialTabs.slice(),\n time: Date.now(),\n autosave: true,\n offlineProd: true,\n offlineTime: 0,\n timePlayed: 0,\n keepGoing: false,\n modID: projInfo.id,\n modVersion: projInfo.versionNumber,\n layers: {}\n },\n player\n ) as Player;\n}\n\nexport function save(): string {\n const stringifiedSave = btoa(unescape(encodeURIComponent(stringifySave(player[ProxyState]))));\n localStorage.setItem(player.id, stringifiedSave);\n return stringifiedSave;\n}\n\nexport async function load(): Promise {\n // Load global settings\n loadSettings();\n\n try {\n const save = localStorage.getItem(settings.active);\n if (save == null) {\n await loadSave(newSave());\n return;\n }\n const player = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (player.modID !== projInfo.id) {\n await loadSave(newSave());\n return;\n }\n player.id = settings.active;\n await loadSave(player);\n } catch (e) {\n console.error(\"Failed to load save. Falling back to new save.\\n\", e);\n await loadSave(newSave());\n }\n}\n\nexport function newSave(): PlayerData {\n const id = getUniqueID();\n const player = setupInitialStore({ id });\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(stringifySave(player)))));\n\n settings.saves.push(id);\n\n return player;\n}\n\nexport function getUniqueID(): string {\n let id,\n i = 0;\n do {\n id = `${projInfo.id}-${i++}`;\n } while (localStorage.getItem(id));\n return id;\n}\n\nexport async function loadSave(playerObj: Partial): Promise {\n console.info(\"Loading save\", playerObj);\n const { layers, removeLayer, addLayer } = await import(\"game/layers\");\n const { fixOldSave, getInitialLayers } = await import(\"data/projEntry\");\n\n for (const layer in layers) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n removeLayer(layers[layer]!);\n }\n getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));\n\n playerObj = setupInitialStore(playerObj);\n if (playerObj.offlineProd && playerObj.time) {\n if (playerObj.offlineTime == undefined) playerObj.offlineTime = 0;\n playerObj.offlineTime += (Date.now() - playerObj.time) / 1000;\n }\n playerObj.time = Date.now();\n if (playerObj.modVersion !== projInfo.versionNumber) {\n fixOldSave(playerObj.modVersion, playerObj);\n }\n\n Object.assign(player, playerObj);\n settings.active = player.id;\n}\n\nsetInterval(() => {\n if (player.autosave) {\n save();\n }\n}, 1000);\nwindow.onbeforeunload = () => {\n if (player.autosave) {\n save();\n }\n};\nwindow.save = save;\nexport const hardReset = (window.hardReset = async () => {\n await loadSave(newSave());\n});\n","\nimport { StyleValue } from \"features/feature\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { Application } from \"pixi.js\";\nimport { processedPropType } from \"util/vue\";\nimport {\n defineComponent,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n PropType,\n ref,\n unref\n} from \"vue\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n style: processedPropType(String, Object, Array),\n classes: processedPropType>(Object),\n onInit: {\n type: Function as PropType<(app: Application) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>,\n onHotReload: Function as PropType\n },\n setup(props) {\n const app = ref(null);\n\n const resizeObserver = new ResizeObserver(updateBounds);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const nodes = inject(NodesInjectionKey)!;\n\n const resizeListener = ref(null);\n\n onMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n app.value = new Application({\n resizeTo: resListener,\n backgroundAlpha: 0\n });\n resizeListener.value?.appendChild(app.value.view);\n props.onInit(app.value as Application);\n }\n updateBounds();\n if (module.hot?.status() === \"apply\" && props.onHotReload) {\n nextTick(props.onHotReload);\n }\n });\n onBeforeUnmount(() => {\n app.value?.destroy();\n });\n\n let isDirty = true;\n function updateBounds() {\n if (isDirty) {\n isDirty = false;\n nextTick(() => {\n if (resizeListener.value != null && props.onContainerResized) {\n // TODO don't overlap with Links.vue\n (Object.values(nodes.value).filter(n => n) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n app.value?.resize();\n }\n isDirty = true;\n });\n }\n }\n document.fonts.ready.then(updateBounds);\n\n return {\n unref,\n resizeListener\n };\n }\n});\n","\n\n\n","import { render } from \"./Profectus.vue?vue&type=template&id=07150322&scoped=true\"\nconst script = {}\n\nimport \"./Profectus.vue?vue&type=style&index=0&id=07150322&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-07150322\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n width: { default: \"8px\" },\n height: { default: \"17px\" }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n style: _normalizeStyle({ width: __props.width, height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport { computed, ComputedRef, isRef, ref, Ref, watch } from \"vue\";\nimport { globalBus } from \"game/events\";\nimport { State, persistent } from \"game/persistence\";\n\nexport interface Resource extends Ref {\n displayName: string;\n precision: number;\n small?: boolean;\n}\n\nexport function createResource(\n defaultValue: T | Ref,\n displayName = \"points\",\n precision = 0,\n small = undefined\n): Resource {\n const resource: Partial> = isRef(defaultValue)\n ? defaultValue\n : persistent(defaultValue);\n resource.displayName = displayName;\n resource.precision = precision;\n resource.small = small;\n return resource as Resource;\n}\n\nexport function trackBest(resource: Resource): Ref {\n const best = persistent(resource.value);\n watch(resource, amount => {\n if (Decimal.gt(amount, best.value)) {\n best.value = amount;\n }\n });\n return best;\n}\n\nexport function trackTotal(resource: Resource): Ref {\n const total = persistent(resource.value);\n watch(resource, (amount, prevAmount) => {\n if (Decimal.gt(amount, prevAmount)) {\n total.value = Decimal.add(total.value, Decimal.sub(amount, prevAmount));\n }\n });\n return total;\n}\n\nconst tetra8 = new Decimal(\"10^^8\");\nconst e100 = new Decimal(\"1e100\");\nexport function trackOOMPS(\n resource: Resource,\n pointGain?: ComputedRef\n): Ref {\n const oomps = ref(0);\n const oompsMag = ref(0);\n const lastPoints = ref(0);\n\n globalBus.on(\"update\", diff => {\n oompsMag.value = 0;\n if (Decimal.lte(resource.value, e100)) {\n lastPoints.value = resource.value;\n return;\n }\n\n let curr = resource.value;\n let prev = lastPoints.value;\n lastPoints.value = curr;\n if (Decimal.gt(curr, prev)) {\n if (Decimal.gte(curr, tetra8)) {\n curr = Decimal.slog(curr, 1e10);\n prev = Decimal.slog(prev, 1e10);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value = -1;\n } else {\n while (\n Decimal.div(curr, prev).log(10).div(diff).gte(\"100\") &&\n oompsMag.value <= 5 &&\n Decimal.gt(prev, 0)\n ) {\n curr = Decimal.log10(curr);\n prev = Decimal.log10(prev);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value++;\n }\n }\n }\n });\n\n const oompsString = computed(() => {\n if (oompsMag.value === 0) {\n return pointGain\n ? format(pointGain.value, resource.precision, resource.small) +\n \" \" +\n resource.displayName +\n \"/s\"\n : \"\";\n }\n return (\n format(oomps.value) +\n \" OOM\" +\n (oompsMag.value < 0 ? \"^OOM\" : \"^\" + oompsMag.value) +\n \"s/sec\"\n );\n });\n return oompsString;\n}\n\nexport function displayResource(resource: Resource, overrideAmount?: DecimalSource): string {\n const amount = overrideAmount ?? resource.value;\n if (Decimal.eq(resource.precision, 0)) {\n return formatWhole(amount);\n }\n return format(amount, resource.precision, resource.small);\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.nodesComp))),\n (_ctx.leftNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.leftNodesComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_ctx.rightNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.rightNodesComp), { key: 1 }))\n : _createCommentVNode(\"\", true),\n (_ctx.branches)\n ? (_openBlock(), _createBlock(_component_Links, {\n key: 2,\n links: _ctx.unref(_ctx.branches)\n }, null, 8, [\"links\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode } from \"game/layers\";\nimport { computed, toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n link: null,\n startNode: null,\n endNode: null,\n boundingRect: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n link: Link;\n startNode: FeatureNode;\n endNode: FeatureNode;\n boundingRect: DOMRect | undefined;\n}\n\n\nconst props = toRefs(_props);\n\nconst startPosition = computed(() => {\n const rect = props.startNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetStart) {\n position.x += props.link.value.offsetStart.x;\n position.y += props.link.value.offsetStart.y;\n }\n return position;\n});\n\nconst endPosition = computed(() => {\n const rect = props.endNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetEnd) {\n position.x += props.link.value.offsetEnd.x;\n position.y += props.link.value.offsetEnd.y;\n }\n return position;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"line\", _mergeProps({\n \"stroke-width\": \"15px\",\n stroke: \"white\"\n }, __props.link, {\n x1: _unref(startPosition).x,\n y1: _unref(startPosition).y,\n x2: _unref(endPosition).x,\n y2: _unref(endPosition).y\n }), null, 16, _hoisted_1))\n}\n}\n\n})","import script from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { computed, inject, nextTick, onMounted, ref, toRef } from \"vue\";\nimport LinkVue from \"./Link.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n links: null\n },\n setup(__props: any) {\n\nconst _props = __props as { links?: Link[] }\n\n\nconst links = toRef(_props, \"links\");\n\nconst resizeObserver = new ResizeObserver(updateNodes);\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst nodes = inject(NodesInjectionKey)!;\n\nconst resizeListener = ref(null);\n\nonMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n }\n});\n\nlet isDirty = true;\nlet boundingRect = ref(resizeListener.value?.getBoundingClientRect());\nfunction updateNodes() {\n if (resizeListener.value != null && isDirty) {\n isDirty = false;\n nextTick(() => {\n boundingRect.value = resizeListener.value?.getBoundingClientRect();\n (Object.values(nodes.value) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n isDirty = true;\n });\n }\n}\ndocument.fonts.ready.then(updateNodes);\n\nconst validLinks = computed(() => {\n const n = nodes.value;\n return (\n links.value?.filter(link => n[link.startNode.id]?.rect && n[link.startNode.id]?.rect) ?? []\n );\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(validLinks))\n ? (_openBlock(), _createElementBlock(\"svg\", _normalizeProps(_mergeProps({ key: 0 }, _ctx.$attrs)), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(validLinks), (link, index) => {\n return (_openBlock(), _createBlock(LinkVue, {\n key: index,\n link: link,\n boundingRect: _unref(boundingRect),\n startNode: _unref(nodes)[link.startNode.id]!,\n endNode: _unref(nodes)[link.endNode.id]!\n }, null, 8, [\"link\", \"boundingRect\", \"startNode\", \"endNode\"]))\n }), 128))\n ], 16))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n ref_key: \"resizeListener\",\n ref: resizeListener,\n class: \"resize-listener\"\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Links.vue?vue&type=style&index=0&id=e35b0402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e35b0402\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { coerceComponent, processedPropType, renderJSX, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, watchEffect } from \"vue\";\nimport Links from \"features/links/Links.vue\";\nimport { jsx } from \"features/feature\";\n\nexport default defineComponent({\n props: {\n nodes: {\n type: processedPropType(Array),\n required: true\n },\n leftSideNodes: processedPropType(Array),\n rightSideNodes: processedPropType(Array),\n branches: processedPropType(Array)\n },\n components: { Links },\n setup(props) {\n const { nodes, leftSideNodes, rightSideNodes } = toRefs(props);\n\n const nodesComp = shallowRef();\n watchEffect(() => {\n const currNodes = unwrapRef(nodes);\n nodesComp.value = coerceComponent(\n jsx(() => (\n <>\n {currNodes.map(row => (\n \n {row.map(renderJSX)}\n \n ))}\n \n ))\n );\n });\n\n const leftNodesComp = shallowRef();\n watchEffect(() => {\n const currNodes = unwrapRef(leftSideNodes);\n leftNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => (\n {currNodes.map(renderJSX)}\n ))\n )\n : \"\";\n });\n\n const rightNodesComp = shallowRef();\n watchEffect(() => {\n const currNodes = unwrapRef(rightSideNodes);\n rightNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => {currNodes.map(renderJSX)})\n )\n : \"\";\n });\n\n return {\n unref,\n nodesComp,\n leftNodesComp,\n rightNodesComp\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=aa87859c&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=tsx\"\nexport * from \"./Tree.vue?vue&type=script&lang=tsx\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=aa87859c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-aa87859c\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({ visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined }),\n class: _normalizeClass({\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n style: _normalizeStyle([\n {\n backgroundColor: _ctx.unref(_ctx.color),\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${_ctx.unref(\n _ctx.glowColor\n )}`\n },\n _ctx.unref(_ctx.style) ?? []\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp))))\n ], 36),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { RegisterNodeInjectionKey, UnregisterNodeInjectionKey } from \"game/layers\";\nimport { computed, inject, onUnmounted, ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n id: null\n },\n setup(__props: any) {\n\nconst _props = __props as { id: string }\n\n\nconst props = toRefs(_props);\n\nconst register = inject(RegisterNodeInjectionKey);\nconst unregister = inject(UnregisterNodeInjectionKey);\n\nconst node = ref(null);\nconst parentNode = computed(() => node.value && node.value.parentElement);\n\nif (register && unregister) {\n watch([parentNode, props.id], ([newNode, newID], [prevNode, prevID]) => {\n if (prevNode) {\n unregister(unref(prevID));\n }\n if (newNode) {\n register(newID, newNode);\n }\n });\n\n onUnmounted(() => unregister(unref(props.id)));\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"node\",\n ref_key: \"node\",\n ref: node\n }, null, 512))\n}\n}\n\n})","import script from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Node.vue?vue&type=style&index=0&id=63ded336&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-63ded336\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c476c56a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = {\n key: 0,\n class: \"mark star\"\n}\nconst _hoisted_3 = [\"src\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n mark: { type: [Boolean, String] }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (__props.mark)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.mark === true)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"img\", {\n key: 1,\n class: \"mark\",\n src: __props.mark\n }, null, 8, _hoisted_3))\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./MarkNode.vue?vue&type=style&index=0&id=c476c56a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c476c56a\"]])\n\nexport default __exports__","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType(Object, String, Function),\n visibility: {\n type: processedPropType(Number),\n required: true\n },\n style: processedPropType(String, Object, Array),\n classes: processedPropType>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType,\n color: processedPropType(String),\n glowColor: processedPropType(String),\n canClick: {\n type: processedPropType(Boolean),\n required: true\n },\n mark: processedPropType(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { onClick, onHold, display } = toRefs(props);\n\n const comp = computeOptionalComponent(display);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n unref,\n Visibility,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=426d9bce&scoped=true&ts=true\"\nimport script from \"./TreeNode.vue?vue&type=script&lang=ts\"\nexport * from \"./TreeNode.vue?vue&type=script&lang=ts\"\n\nimport \"./TreeNode.vue?vue&type=style&index=0&id=426d9bce&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-426d9bce\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Link } from \"features/links/links\";\nimport { GenericReset } from \"features/reset\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport TreeNodeComponent from \"features/trees/TreeNode.vue\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n convertComputable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, ref, Ref, shallowRef, unref } from \"vue\";\n\nexport const TreeNodeType = Symbol(\"TreeNode\");\nexport const TreeType = Symbol(\"Tree\");\n\nexport interface TreeNodeOptions {\n visibility?: Computable;\n canClick?: Computable;\n color?: Computable;\n display?: Computable;\n glowColor?: Computable;\n classes?: Computable>;\n style?: Computable;\n mark?: Computable;\n reset?: GenericReset;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseTreeNode {\n id: string;\n type: typeof TreeNodeType;\n [Component]: typeof TreeNodeComponent;\n [GatherProps]: () => Record;\n}\n\nexport type TreeNode = Replace<\n T & BaseTreeNode,\n {\n visibility: GetComputableTypeWithDefault;\n canClick: GetComputableTypeWithDefault;\n color: GetComputableType;\n display: GetComputableType;\n glowColor: GetComputableType;\n classes: GetComputableType;\n style: GetComputableType;\n mark: GetComputableType;\n }\n>;\n\nexport type GenericTreeNode = Replace<\n TreeNode,\n {\n visibility: ProcessedComputable;\n canClick: ProcessedComputable;\n }\n>;\n\nexport function createTreeNode(\n optionsFunc: OptionsFunc, BaseTreeNode>\n): TreeNode {\n return createLazyProxy(() => {\n const treeNode = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n treeNode[Component] = TreeNodeComponent;\n\n processComputable(treeNode as T, \"visibility\");\n setDefault(treeNode, \"visibility\", Visibility.Visible);\n processComputable(treeNode as T, \"canClick\");\n setDefault(treeNode, \"canClick\", true);\n processComputable(treeNode as T, \"color\");\n processComputable(treeNode as T, \"display\");\n processComputable(treeNode as T, \"glowColor\");\n processComputable(treeNode as T, \"classes\");\n processComputable(treeNode as T, \"style\");\n processComputable(treeNode as T, \"mark\");\n\n if (treeNode.onClick) {\n const onClick = treeNode.onClick.bind(treeNode);\n treeNode.onClick = function () {\n if (unref(treeNode.canClick)) {\n onClick();\n }\n };\n }\n if (treeNode.onHold) {\n const onHold = treeNode.onHold.bind(treeNode);\n treeNode.onHold = function () {\n if (unref(treeNode.canClick)) {\n onHold();\n }\n };\n }\n\n treeNode[GatherProps] = function (this: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n };\n };\n\n return treeNode as unknown as TreeNode;\n });\n}\n\nexport interface TreeBranch extends Omit {\n startNode: GenericTreeNode;\n endNode: GenericTreeNode;\n}\n\nexport interface TreeOptions {\n visibility?: Computable;\n nodes: Computable;\n leftSideNodes?: Computable;\n rightSideNodes?: Computable;\n branches?: Computable;\n resetPropagation?: ResetPropagation;\n onReset?: (node: GenericTreeNode) => void;\n}\n\nexport interface BaseTree {\n id: string;\n links: Ref;\n reset: (node: GenericTreeNode) => void;\n isResetting: Ref;\n resettingNode: Ref;\n type: typeof TreeType;\n [Component]: typeof TreeComponent;\n [GatherProps]: () => Record;\n}\n\nexport type Tree = Replace<\n T & BaseTree,\n {\n visibility: GetComputableTypeWithDefault;\n nodes: GetComputableType;\n leftSideNodes: GetComputableType;\n rightSideNodes: GetComputableType;\n branches: GetComputableType;\n }\n>;\n\nexport type GenericTree = Replace<\n Tree,\n {\n visibility: ProcessedComputable;\n }\n>;\n\nexport function createTree(\n optionsFunc: OptionsFunc, BaseTree>\n): Tree {\n return createLazyProxy(() => {\n const tree = optionsFunc();\n tree.id = getUniqueID(\"tree-\");\n tree.type = TreeType;\n tree[Component] = TreeComponent;\n\n tree.isResetting = ref(false);\n tree.resettingNode = shallowRef(null);\n\n tree.reset = function (node) {\n const genericTree = tree as GenericTree;\n genericTree.isResetting.value = true;\n genericTree.resettingNode.value = node;\n genericTree.resetPropagation?.(genericTree, node);\n genericTree.onReset?.(node);\n genericTree.isResetting.value = false;\n genericTree.resettingNode.value = null;\n };\n tree.links = computed(() => {\n const genericTree = tree as GenericTree;\n return unref(genericTree.branches) ?? [];\n });\n\n processComputable(tree as T, \"visibility\");\n setDefault(tree, \"visibility\", Visibility.Visible);\n processComputable(tree as T, \"nodes\");\n processComputable(tree as T, \"leftSideNodes\");\n processComputable(tree as T, \"rightSideNodes\");\n processComputable(tree as T, \"branches\");\n\n tree[GatherProps] = function (this: GenericTree) {\n const { nodes, leftSideNodes, rightSideNodes, branches } = this;\n return { nodes, leftSideNodes, rightSideNodes, branches };\n };\n\n return tree as unknown as Tree;\n });\n}\n\nexport type ResetPropagation = {\n (tree: GenericTree, resettingNode: GenericTreeNode): void;\n};\n\nexport const defaultResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) - 1;\n for (let x = row; x >= 0; x--) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const invertedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) + 1;\n for (let x = row; x < nodes.length; x++) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const branchedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const visitedNodes = [resettingNode];\n let currentNodes = [resettingNode];\n if (tree.branches != null) {\n const branches = unref(tree.branches);\n while (currentNodes.length > 0) {\n const nextNodes: GenericTreeNode[] = [];\n currentNodes.forEach(node => {\n branches\n .filter(branch => branch.startNode === node || branch.endNode === node)\n .map(branch => {\n if (branch.startNode === node) {\n return branch.endNode;\n }\n return branch.startNode;\n })\n .filter(node => !visitedNodes.includes(node))\n .forEach(node => {\n // Check here instead of in the filter because this check's results may\n // change as we go through each node\n if (!nextNodes.includes(node)) {\n nextNodes.push(node);\n node.reset?.reset();\n }\n });\n });\n currentNodes = nextNodes;\n visitedNodes.push(...currentNodes);\n }\n }\n};\n\nexport function createResourceTooltip(\n resource: Resource,\n requiredResource: Resource | null = null,\n requirement: Computable = 0\n): Ref {\n const req = convertComputable(requirement);\n return computed(() => {\n if (requiredResource == null || Decimal.gte(resource.value, unref(req))) {\n return displayResource(resource) + \" \" + resource.displayName;\n }\n return `Reach ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(unref(req))\n : format(unref(req), requiredResource.precision)\n } ${requiredResource.displayName} to unlock (You have ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(requiredResource.value)\n : format(requiredResource.value, requiredResource.precision)\n })`;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined,\n backgroundImage: (_ctx.earned && _ctx.image && `url(${_ctx.image})`) || ''\n },\n _ctx.unref(_ctx.style) ?? []\n ]),\n class: _normalizeClass({\n feature: true,\n achievement: true,\n locked: !_ctx.unref(_ctx.earned),\n bought: _ctx.unref(_ctx.earned),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType } from \"util/vue\";\nimport { defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport \"components/common/features.css\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType(Number),\n required: true\n },\n display: processedPropType(Object, String, Function),\n earned: {\n type: processedPropType(Boolean),\n required: true\n },\n image: processedPropType(String),\n style: processedPropType(String, Object, Array),\n classes: processedPropType>(Object),\n mark: processedPropType(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display } = toRefs(props);\n\n return {\n component: computeOptionalComponent(display),\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Achievement.vue?vue&type=template&id=e3f32402&scoped=true&ts=true\"\nimport script from \"./Achievement.vue?vue&type=script&lang=ts\"\nexport * from \"./Achievement.vue?vue&type=script&lang=ts\"\n\nimport \"./Achievement.vue?vue&type=style&index=0&id=e3f32402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e3f32402\"]])\n\nexport default __exports__","import { globalBus } from \"game/events\";\nimport Toast from \"vue-toastification\";\nimport \"vue-toastification/dist/index.css\";\n\nglobalBus.on(\"setupVue\", vue => vue.use(Toast));\n\nexport function getNotifyStyle(color = \"white\", strength = \"8px\") {\n return {\n transform: \"scale(1.05, 1.05)\",\n borderColor: \"rgba(0, 0, 0, 0.125)\",\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${strength} ${color}`,\n zIndex: 1\n };\n}\n\nexport function getHighNotifyStyle() {\n return getNotifyStyle(\"red\", \"20px\");\n}\n","import AchievementComponent from \"features/achievements/Achievement.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent } from \"util/vue\";\nimport { Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const AchievementType = Symbol(\"Achievement\");\n\nexport interface AchievementOptions {\n visibility?: Computable;\n shouldEarn?: () => boolean;\n display?: Computable;\n mark?: Computable;\n image?: Computable;\n style?: Computable;\n classes?: Computable>;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseAchievement extends Persistent {\n id: string;\n earned: Ref;\n complete: VoidFunction;\n type: typeof AchievementType;\n [Component]: typeof AchievementComponent;\n [GatherProps]: () => Record;\n}\n\nexport type Achievement = Replace<\n T & BaseAchievement,\n {\n visibility: GetComputableTypeWithDefault;\n display: GetComputableType;\n mark: GetComputableType;\n image: GetComputableType;\n style: GetComputableType;\n classes: GetComputableType;\n }\n>;\n\nexport type GenericAchievement = Replace<\n Achievement,\n {\n visibility: ProcessedComputable;\n }\n>;\n\nexport function createAchievement(\n optionsFunc: OptionsFunc, BaseAchievement>\n): Achievement {\n return createLazyProxy(persistent => {\n const achievement = Object.assign(persistent, optionsFunc());\n achievement.id = getUniqueID(\"achievement-\");\n achievement.type = AchievementType;\n achievement[Component] = AchievementComponent;\n\n achievement.earned = achievement[PersistentState];\n achievement.complete = function () {\n achievement[PersistentState].value = true;\n };\n\n processComputable(achievement as T, \"visibility\");\n setDefault(achievement, \"visibility\", Visibility.Visible);\n processComputable(achievement as T, \"display\");\n processComputable(achievement as T, \"mark\");\n processComputable(achievement as T, \"image\");\n processComputable(achievement as T, \"style\");\n processComputable(achievement as T, \"classes\");\n\n achievement[GatherProps] = function (this: GenericAchievement) {\n const { visibility, display, earned, image, style, classes, mark, id } = this;\n return { visibility, display, earned, image, style: unref(style), classes, mark, id };\n };\n\n if (achievement.shouldEarn) {\n const genericAchievement = achievement as GenericAchievement;\n watchEffect(() => {\n if (\n !genericAchievement.earned.value &&\n unref(genericAchievement.visibility) === Visibility.Visible &&\n genericAchievement.shouldEarn?.()\n ) {\n genericAchievement.earned.value = true;\n genericAchievement.onComplete?.();\n if (genericAchievement.display) {\n const Display = coerceComponent(unref(genericAchievement.display));\n toast.info(\n
\n

Achievement earned!

\n
\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n
\n
\n );\n }\n }\n });\n }\n\n return achievement as unknown as Achievement;\n }, persistent(false));\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_GridCell = _resolveComponent(\"GridCell\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n }),\n class: \"table\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rows), (row) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _ctx.mergeAdjacent }]),\n key: row\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.cols), (col) => {\n return (_openBlock(), _createBlock(_component_GridCell, _mergeProps({ key: col }, _ctx.gatherCellProps(_ctx.unref(_ctx.cells)[row * 100 + col])), null, 16))\n }), 128))\n ], 2))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n}","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b1182ac6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: _normalizeClass({ feature: true, tile: true, can: _ctx.unref(_ctx.canClick), locked: !_ctx.unref(_ctx.canClick) }),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args)))\n }, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { style: {\"white-space\":\"pre-line\"} })),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeComponent,\n computeOptionalComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType(Number),\n required: true\n },\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType,\n display: {\n type: processedPropType(Object, String, Function),\n required: true\n },\n title: processedPropType(Object, String, Function),\n style: processedPropType(String, Object, Array),\n canClick: {\n type: processedPropType(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { onClick, onHold, title, display } = toRefs(props);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n const titleComponent = computeOptionalComponent(title);\n const component = computeComponent(display);\n\n return {\n start,\n stop,\n titleComponent,\n component,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./GridCell.vue?vue&type=template&id=b1182ac6&scoped=true&ts=true\"\nimport script from \"./GridCell.vue?vue&type=script&lang=ts\"\nexport * from \"./GridCell.vue?vue&type=script&lang=ts\"\n\nimport \"./GridCell.vue?vue&type=style&index=0&id=b1182ac6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b1182ac6\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport { Visibility } from \"features/feature\";\nimport { GridCell } from \"features/grids/grid\";\nimport settings from \"game/settings\";\nimport { processedPropType } from \"util/vue\";\nimport { computed, defineComponent, unref } from \"vue\";\nimport GridCellVue from \"./GridCell.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType(Number),\n required: true\n },\n rows: {\n type: processedPropType(Number),\n required: true\n },\n cols: {\n type: processedPropType(Number),\n required: true\n },\n cells: {\n type: processedPropType>(Object),\n required: true\n }\n },\n components: { GridCell: GridCellVue },\n setup() {\n const mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\n function gatherCellProps(cell: GridCell) {\n const { visibility, onClick, onHold, display, title, style, canClick, id } = cell;\n return { visibility, onClick, onHold, display, title, style, canClick, id };\n }\n\n return { unref, gatherCellProps, Visibility, mergeAdjacent };\n }\n});\n","import { render } from \"./Grid.vue?vue&type=template&id=4f6b6717&ts=true\"\nimport script from \"./Grid.vue?vue&type=script&lang=ts\"\nexport * from \"./Grid.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import GridComponent from \"features/grids/Grid.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { State, Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const GridType = Symbol(\"Grid\");\n\nexport type CellComputable = Computable | ((id: string | number, state: State) => T);\n\nfunction createGridProxy(grid: GenericGrid): Record {\n return new Proxy({}, getGridHandler(grid)) as Record;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getGridHandler(grid: GenericGrid): ProxyHandler> {\n const keys = computed(() => {\n const keys = [];\n for (let row = 1; row <= unref(grid.rows); row++) {\n for (let col = 1; col <= unref(grid.cols); col++) {\n keys.push((row * 100 + col).toString());\n }\n }\n return keys;\n });\n return {\n get(target: Record, key: PropertyKey) {\n if (key === \"isProxy\") {\n return true;\n }\n\n if (typeof key === \"symbol\") {\n return (grid as never)[key];\n }\n\n if (!keys.value.includes(key.toString())) {\n return undefined;\n }\n\n if (target[key] == null) {\n target[key] = new Proxy(\n grid,\n getCellHandler(key.toString())\n ) as unknown as GridCell;\n }\n\n return target[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record, key: PropertyKey, value: any) {\n console.warn(\"Cannot set grid cells\", target, key, value);\n return false;\n },\n ownKeys() {\n return keys.value;\n },\n has(target: Record, key: PropertyKey) {\n return keys.value.includes(key.toString());\n },\n getOwnPropertyDescriptor(target: Record, key: PropertyKey) {\n if (keys.value.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nfunction getCellHandler(id: string): ProxyHandler {\n const keys = [\n \"id\",\n \"visibility\",\n \"canClick\",\n \"startState\",\n \"state\",\n \"style\",\n \"classes\",\n \"title\",\n \"display\",\n \"onClick\",\n \"onHold\"\n ];\n const cache: Record> = {};\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target, key, receiver): any {\n if (key === \"isProxy\") {\n return true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let prop = (target as any)[key];\n\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n }\n if (prop != undefined || typeof key === \"symbol\") {\n return prop;\n }\n\n key = key.slice(0, 1).toUpperCase() + key.slice(1);\n\n if (key === \"startState\") {\n return prop.call(receiver, id);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`get${key}`];\n if (isFunction(prop)) {\n if (!(key in cache)) {\n cache[key] = computed(() => prop.call(receiver, id, target.getState(id)));\n }\n return cache[key].value;\n } else if (prop != undefined) {\n return unref(prop);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`on${key}`];\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n } else if (prop != undefined) {\n return prop;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record, key: string, value: any, receiver: typeof Proxy): boolean {\n key = `set${key.slice(0, 1).toUpperCase() + key.slice(1)}`;\n if (key in target && isFunction(target[key]) && target[key].length < 3) {\n target[key].call(receiver, id, value);\n return true;\n } else {\n console.warn(`No setter for \"${key}\".`, target);\n return false;\n }\n },\n ownKeys() {\n return keys;\n },\n has(target, key) {\n return keys.includes(key.toString());\n },\n getOwnPropertyDescriptor(target, key) {\n if (keys.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nexport interface GridCell {\n id: string;\n visibility: Visibility;\n canClick: boolean;\n startState: State;\n state: State;\n style?: StyleValue;\n classes?: Record;\n title?: CoercableComponent;\n display: CoercableComponent;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface GridOptions {\n visibility?: Computable;\n rows: Computable;\n cols: Computable;\n getVisibility?: CellComputable;\n getCanClick?: CellComputable;\n getStartState: Computable | ((id: string | number) => State);\n getStyle?: CellComputable;\n getClasses?: CellComputable>;\n getTitle?: CellComputable;\n getDisplay: CellComputable;\n onClick?: (id: string | number, state: State, e?: MouseEvent | TouchEvent) => void;\n onHold?: (id: string | number, state: State) => void;\n}\n\nexport interface BaseGrid extends Persistent> {\n id: string;\n getID: (id: string | number, state: State) => string;\n getState: (id: string | number) => State;\n setState: (id: string | number, state: State) => void;\n cells: Record;\n type: typeof GridType;\n [Component]: typeof GridComponent;\n [GatherProps]: () => Record;\n}\n\nexport type Grid = Replace<\n T & BaseGrid,\n {\n visibility: GetComputableTypeWithDefault;\n rows: GetComputableType;\n cols: GetComputableType;\n getVisibility: GetComputableTypeWithDefault;\n getCanClick: GetComputableTypeWithDefault;\n getStartState: GetComputableType;\n getStyle: GetComputableType;\n getClasses: GetComputableType;\n getTitle: GetComputableType;\n getDisplay: GetComputableType;\n }\n>;\n\nexport type GenericGrid = Replace<\n Grid,\n {\n visibility: ProcessedComputable;\n getVisibility: ProcessedComputable;\n getCanClick: ProcessedComputable;\n }\n>;\n\nexport function createGrid(\n optionsFunc: OptionsFunc, BaseGrid>\n): Grid {\n return createLazyProxy(persistent => {\n const grid = Object.assign(persistent, optionsFunc());\n grid.id = getUniqueID(\"grid-\");\n grid[Component] = GridComponent;\n\n grid.getID = function (this: GenericGrid, cell: string | number) {\n return grid.id + \"-\" + cell;\n };\n grid.getState = function (this: GenericGrid, cell: string | number) {\n if (this[PersistentState].value[cell] != undefined) {\n return this[PersistentState].value[cell];\n }\n return this.cells[cell].startState;\n };\n grid.setState = function (this: GenericGrid, cell: string | number, state: State) {\n this[PersistentState].value[cell] = state;\n };\n\n grid.cells = createGridProxy(grid as GenericGrid);\n\n processComputable(grid as T, \"visibility\");\n setDefault(grid, \"visibility\", Visibility.Visible);\n processComputable(grid as T, \"rows\");\n processComputable(grid as T, \"cols\");\n processComputable(grid as T, \"getVisibility\");\n setDefault(grid, \"getVisibility\", Visibility.Visible);\n processComputable(grid as T, \"getCanClick\");\n setDefault(grid, \"getCanClick\", true);\n processComputable(grid as T, \"getStartState\");\n processComputable(grid as T, \"getStyle\");\n processComputable(grid as T, \"getClasses\");\n processComputable(grid as T, \"getTitle\");\n processComputable(grid as T, \"getDisplay\");\n\n if (grid.onClick) {\n const onClick = grid.onClick.bind(grid);\n grid.onClick = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onClick(id, state);\n }\n };\n }\n if (grid.onHold) {\n const onHold = grid.onHold.bind(grid);\n grid.onHold = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onHold(id, state);\n }\n };\n }\n\n grid[GatherProps] = function (this: GenericGrid) {\n const { visibility, rows, cols, cells, id } = this;\n return { visibility, rows, cols, cells, id };\n };\n\n return grid as unknown as Grid;\n }, persistent({}));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n _ctx.unref(_ctx.style) ?? []\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n class: _normalizeClass({\n feature: true,\n clickable: true,\n can: _ctx.unref(_ctx.canClick),\n locked: !_ctx.unref(_ctx.canClick),\n small: _ctx.small,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { GenericClickable } from \"features/clickables/clickable\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport {\n coerceComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType>(\n Object,\n String,\n Function\n ),\n required: true\n },\n visibility: {\n type: processedPropType(Number),\n required: true\n },\n style: processedPropType(Object, String, Array),\n classes: processedPropType>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType,\n canClick: {\n type: processedPropType(Boolean),\n required: true\n },\n small: Boolean,\n mark: processedPropType(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, onClick, onHold } = toRefs(props);\n\n const comp = shallowRef(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n comp.value = coerceComponent(\n jsx(() => (\n \n {currDisplay.title ? (\n
\n \n </div>\n ) : null}\n <Description />\n </span>\n ))\n );\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Clickable.vue?vue&type=template&id=6b39988a&scoped=true&ts=true\"\nimport script from \"./Clickable.vue?vue&type=script&lang=tsx\"\nexport * from \"./Clickable.vue?vue&type=script&lang=tsx\"\n\nimport \"./Clickable.vue?vue&type=style&index=0&id=6b39988a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6b39988a\"]])\n\nexport default __exports__","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericLayer } from \"game/layers\";\nimport { Unsubscribe } from \"nanoevents\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, unref } from \"vue\";\n\nexport const ClickableType = Symbol(\"Clickable\");\n\nexport interface ClickableOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n }\n >;\n small?: boolean;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseClickable {\n id: string;\n type: typeof ClickableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Clickable<T extends ClickableOptions> = Replace<\n T & BaseClickable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericClickable = Replace<\n Clickable<ClickableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createClickable<T extends ClickableOptions>(\n optionsFunc: OptionsFunc<T, Clickable<T>, BaseClickable>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable = optionsFunc();\n clickable.id = getUniqueID(\"clickable-\");\n clickable.type = ClickableType;\n clickable[Component] = ClickableComponent;\n\n processComputable(clickable as T, \"visibility\");\n setDefault(clickable, \"visibility\", Visibility.Visible);\n processComputable(clickable as T, \"canClick\");\n setDefault(clickable, \"canClick\", true);\n processComputable(clickable as T, \"classes\");\n processComputable(clickable as T, \"style\");\n processComputable(clickable as T, \"mark\");\n processComputable(clickable as T, \"display\");\n\n if (clickable.onClick) {\n const onClick = clickable.onClick.bind(clickable);\n clickable.onClick = function (e) {\n if (unref(clickable.canClick)) {\n onClick(e);\n }\n };\n }\n if (clickable.onHold) {\n const onHold = clickable.onHold.bind(clickable);\n clickable.onHold = function () {\n if (unref(clickable.canClick)) {\n onHold();\n }\n };\n }\n\n clickable[GatherProps] = function (this: GenericClickable) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return clickable as unknown as Clickable<T>;\n });\n}\n\nexport function setupAutoClick(\n layer: GenericLayer,\n clickable: GenericClickable,\n autoActive: Computable<boolean> = true\n): Unsubscribe {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return layer.on(\"update\", () => {\n if (unref(isActive) && unref(clickable.canClick)) {\n clickable.onClick?.();\n }\n });\n}\n","import {\n Clickable,\n ClickableOptions,\n createClickable,\n GenericClickable\n} from \"features/clickables/clickable\";\nimport { GenericConversion } from \"features/conversion\";\nimport { CoercableComponent, jsx, OptionsFunc, Replace, setDefault } from \"features/feature\";\nimport { displayResource } from \"features/resources/resource\";\nimport {\n createTreeNode,\n GenericTree,\n GenericTreeNode,\n TreeNode,\n TreeNodeOptions\n} from \"features/trees/tree\";\nimport player from \"game/player\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { computed, Ref, unref } from \"vue\";\n\nexport interface ResetButtonOptions extends ClickableOptions {\n conversion: GenericConversion;\n tree: GenericTree;\n treeNode: GenericTreeNode;\n resetDescription?: Computable<string>;\n showNextAt?: Computable<boolean>;\n display?: Computable<CoercableComponent>;\n canClick?: Computable<boolean>;\n minimumGain?: Computable<DecimalSource>;\n}\n\nexport type ResetButton<T extends ResetButtonOptions> = Replace<\n Clickable<T>,\n {\n resetDescription: GetComputableTypeWithDefault<T[\"resetDescription\"], Ref<string>>;\n showNextAt: GetComputableTypeWithDefault<T[\"showNextAt\"], true>;\n display: GetComputableTypeWithDefault<T[\"display\"], Ref<JSX.Element>>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], Ref<boolean>>;\n minimumGain: GetComputableTypeWithDefault<T[\"minimumGain\"], 1>;\n onClick: VoidFunction;\n }\n>;\n\nexport type GenericResetButton = Replace<\n GenericClickable & ResetButton<ResetButtonOptions>,\n {\n resetDescription: ProcessedComputable<string>;\n showNextAt: ProcessedComputable<boolean>;\n display: ProcessedComputable<CoercableComponent>;\n canClick: ProcessedComputable<boolean>;\n minimumGain: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n optionsFunc: OptionsFunc<T>\n): ResetButton<T> {\n return createClickable(() => {\n const resetButton = optionsFunc();\n\n processComputable(resetButton as T, \"showNextAt\");\n setDefault(resetButton, \"showNextAt\", true);\n setDefault(resetButton, \"minimumGain\", 1);\n\n if (resetButton.resetDescription == null) {\n resetButton.resetDescription = computed(() =>\n Decimal.lt(resetButton.conversion.gainResource.value, 1e3) ? \"Reset for \" : \"\"\n );\n } else {\n processComputable(resetButton as T, \"resetDescription\");\n }\n\n if (resetButton.display == null) {\n resetButton.display = jsx(() => (\n <span>\n {unref(resetButton.resetDescription as ProcessedComputable<string>)}\n <b>\n {displayResource(\n resetButton.conversion.gainResource,\n Decimal.max(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n {resetButton.conversion.buyMax ? \"Next:\" : \"Req:\"}{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n resetButton.conversion.buyMax ||\n Decimal.floor(unref(resetButton.conversion.actualGain)).neq(1)\n ? unref(resetButton.conversion.nextAt)\n : unref(resetButton.conversion.currentAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gte(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n );\n }\n\n const onClick = resetButton.onClick;\n resetButton.onClick = function () {\n if (!unref(resetButton.canClick)) {\n return;\n }\n resetButton.conversion.convert();\n resetButton.tree.reset(resetButton.treeNode);\n onClick?.();\n };\n\n return resetButton;\n }) as unknown as ResetButton<T>;\n}\n\nexport interface LayerTreeNodeOptions extends TreeNodeOptions {\n layerID: string;\n color: Computable<string>; // marking as required\n display?: Computable<string>;\n append?: Computable<boolean>;\n}\nexport type LayerTreeNode<T extends LayerTreeNodeOptions> = Replace<\n TreeNode<T>,\n {\n display: GetComputableTypeWithDefault<T[\"display\"], T[\"layerID\"]>;\n append: GetComputableType<T[\"append\"]>;\n }\n>;\nexport type GenericLayerTreeNode = Replace<\n LayerTreeNode<LayerTreeNodeOptions>,\n {\n display: ProcessedComputable<string>;\n append?: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createLayerTreeNode<T extends LayerTreeNodeOptions>(\n optionsFunc: OptionsFunc<T>\n): LayerTreeNode<T> {\n return createTreeNode(() => {\n const options = optionsFunc();\n processComputable(options as T, \"display\");\n setDefault(options, \"display\", options.layerID);\n processComputable(options as T, \"append\");\n return {\n ...options,\n display: options.layerID,\n onClick: unref((options as unknown as GenericLayerTreeNode).append)\n ? function () {\n if (player.tabs.includes(options.layerID)) {\n const index = player.tabs.lastIndexOf(options.layerID);\n player.tabs.splice(index, 1);\n } else {\n player.tabs.push(options.layerID);\n }\n }\n : function () {\n player.tabs.splice(1, 1, options.layerID);\n }\n };\n }) as unknown as LayerTreeNode<T>;\n}\n","import { GenericLayer } from \"game/layers\";\nimport { Modifier } from \"game/modifiers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, isRef, Ref, unref } from \"vue\";\nimport { OptionsFunc, Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: Computable<DecimalSource>;\n actualGain?: Computable<DecimalSource>;\n currentAt?: Computable<DecimalSource>;\n nextAt?: Computable<DecimalSource>;\n baseResource: Resource;\n gainResource: Resource;\n buyMax?: Computable<boolean>;\n roundUpCost?: Computable<boolean>;\n convert?: VoidFunction;\n gainModifier?: Modifier;\n}\n\nexport interface BaseConversion {\n convert: VoidFunction;\n}\n\nexport type Conversion<T extends ConversionOptions> = Replace<\n T & BaseConversion,\n {\n currentGain: GetComputableTypeWithDefault<T[\"currentGain\"], Ref<DecimalSource>>;\n actualGain: GetComputableTypeWithDefault<T[\"actualGain\"], Ref<DecimalSource>>;\n currentAt: GetComputableTypeWithDefault<T[\"currentAt\"], Ref<DecimalSource>>;\n nextAt: GetComputableTypeWithDefault<T[\"nextAt\"], Ref<DecimalSource>>;\n buyMax: GetComputableTypeWithDefault<T[\"buyMax\"], true>;\n roundUpCost: GetComputableTypeWithDefault<T[\"roundUpCost\"], true>;\n }\n>;\n\nexport type GenericConversion = Replace<\n Conversion<ConversionOptions>,\n {\n currentGain: ProcessedComputable<DecimalSource>;\n actualGain: ProcessedComputable<DecimalSource>;\n currentAt: ProcessedComputable<DecimalSource>;\n nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: OptionsFunc<T, Conversion<T>, BaseConversion>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = conversion.currentGain;\n }\n if (conversion.currentAt == null) {\n conversion.currentAt = computed(() => {\n let current = conversion.scaling.currentAt(conversion as GenericConversion);\n if (conversion.roundUpCost) current = Decimal.ceil(current);\n return current;\n });\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() => {\n let next = conversion.scaling.nextAt(conversion as GenericConversion);\n if (conversion.roundUpCost) next = Decimal.ceil(next);\n return next;\n });\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n unref((conversion as GenericConversion).currentGain)\n );\n // TODO just subtract cost?\n conversion.baseResource.value = 0;\n };\n }\n\n processComputable(conversion as T, \"currentGain\");\n processComputable(conversion as T, \"actualGain\");\n processComputable(conversion as T, \"currentAt\");\n processComputable(conversion as T, \"nextAt\");\n processComputable(conversion as T, \"buyMax\");\n setDefault(conversion, \"buyMax\", true);\n processComputable(conversion as T, \"roundUpCost\");\n setDefault(conversion, \"roundUpCost\", true);\n\n return conversion as unknown as Conversion<T>;\n });\n}\n\nexport type ScalingFunction = {\n currentGain: (conversion: GenericConversion) => DecimalSource;\n currentAt: (conversion: GenericConversion) => DecimalSource;\n nextAt: (conversion: GenericConversion) => DecimalSource;\n};\n\n// Gain formula is (baseResource - base) * coefficient\n// e.g. if base is 10 and coefficient is 0.5, 10 points makes 1 gain, 12 points is 2\nexport function createLinearScaling(\n base: DecimalSource | Ref<DecimalSource>,\n coefficient: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n if (Decimal.lt(conversion.baseResource.value, unref(base))) {\n return 0;\n }\n\n return Decimal.sub(conversion.baseResource.value, unref(base))\n .sub(1)\n .times(unref(coefficient))\n .add(1);\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.times(current, unref(coefficient)).add(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.times(next, unref(coefficient)).add(unref(base)).max(unref(base));\n }\n };\n}\n\n// Gain formula is (baseResource / base) ^ exponent\n// e.g. if exponent is 0.5 and base is 10, then having 10 points makes gain 1, and 40 points is 2\nexport function createPolynomialScaling(\n base: DecimalSource | Ref<DecimalSource>,\n exponent: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n const gain = Decimal.div(conversion.baseResource.value, unref(base)).pow(\n unref(exponent)\n );\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n return gain;\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.root(current, unref(exponent)).times(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.root(next, unref(exponent)).times(unref(base)).max(unref(base));\n }\n };\n}\n\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(() => {\n const conversion: S = optionsFunc();\n\n setDefault(conversion, \"buyMax\", false);\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(conversion.gainResource.value);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(Decimal.add(conversion.gainResource.value, 1));\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = computed(() => {\n let gain = Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n ).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.gainModifier\n ? conversion.gainModifier.apply(\n unref((conversion as GenericConversion).currentGain)\n )\n : unref((conversion as GenericConversion).currentGain);\n // TODO just subtract cost?\n // Maybe by adding a cost function to scaling and nextAt just calls the cost function\n // with 1 + currentGain\n conversion.baseResource.value = 0;\n });\n\n return conversion;\n });\n}\n\nexport function setupPassiveGeneration(\n layer: GenericLayer,\n conversion: GenericConversion,\n rate: ProcessedComputable<DecimalSource> = 1\n): void {\n layer.on(\"preUpdate\", diff => {\n const currRate = isRef(rate) ? rate.value : rate;\n if (Decimal.neq(currRate, 0)) {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n Decimal.times(currRate, diff).times(unref(conversion.currentGain))\n );\n }\n });\n}\n\nfunction softcap(\n value: DecimalSource,\n cap: DecimalSource,\n power: DecimalSource = 0.5\n): DecimalSource {\n if (Decimal.lte(value, cap)) {\n return value;\n } else {\n return Decimal.pow(value, power).times(Decimal.pow(cap, Decimal.sub(1, power)));\n }\n}\n\nexport function addSoftcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>,\n power: ProcessedComputable<DecimalSource> = 0.5\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion =>\n softcap(scaling.currentGain(conversion), unref(cap), unref(power))\n };\n}\n\nexport function addHardcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion => Decimal.min(scaling.currentGain(conversion), unref(cap))\n };\n}\n","import { createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6447a93e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"toggle\" }, \"▼\", -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_CollapseTransition = _resolveComponent(\"CollapseTransition\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"infobox\", { collapsed: _ctx.unref(_ctx.collapsed), stacked: _ctx.stacked, ..._ctx.unref(_ctx.classes) }]),\n style: _normalizeStyle([\n {\n borderColor: _ctx.unref(_ctx.color),\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n _createElementVNode(\"button\", {\n class: \"title\",\n style: _normalizeStyle([{ backgroundColor: _ctx.unref(_ctx.color) }, _ctx.unref(_ctx.titleStyle) || []]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.collapsed.value = !_ctx.unref(_ctx.collapsed)))\n }, [\n _hoisted_1,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ], 4),\n _createVNode(_component_CollapseTransition, null, {\n default: _withCtx(() => [\n (!_ctx.unref(_ctx.collapsed))\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"body\",\n style: _normalizeStyle({ backgroundColor: _ctx.unref(_ctx.color) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.bodyComponent), {\n style: _normalizeStyle(_ctx.unref(_ctx.bodyStyle))\n }, null, 8, [\"style\"]))\n ], 4))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Node from \"components/Node.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport settings from \"game/settings\";\nimport { computeComponent, processedPropType } from \"util/vue\";\nimport CollapseTransition from \"@ivanv/vue-collapse-transition/src/CollapseTransition.vue\";\nimport { computed, defineComponent, PropType, Ref, StyleValue, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n color: processedPropType<string>(String),\n collapsed: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n titleStyle: processedPropType<StyleValue>(Object, String, Array),\n bodyStyle: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n CollapseTransition\n },\n setup(props) {\n const { title, display } = toRefs(props);\n\n const titleComponent = computeComponent(title);\n const bodyComponent = computeComponent(display);\n const stacked = computed(() => themes[settings.theme].mergeAdjacent);\n\n return {\n titleComponent,\n bodyComponent,\n stacked,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Infobox.vue?vue&type=template&id=6447a93e&scoped=true&ts=true\"\nimport script from \"./Infobox.vue?vue&type=script&lang=ts\"\nexport * from \"./Infobox.vue?vue&type=script&lang=ts\"\n\nimport \"./Infobox.vue?vue&type=style&index=0&id=6447a93e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6447a93e\"]])\n\nexport default __exports__","import InfoboxComponent from \"features/infoboxes/Infobox.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Ref, unref } from \"vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const InfoboxType = Symbol(\"Infobox\");\n\nexport interface InfoboxOptions {\n visibility?: Computable<Visibility>;\n color?: Computable<string>;\n style?: Computable<StyleValue>;\n titleStyle?: Computable<StyleValue>;\n bodyStyle?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n title: Computable<CoercableComponent>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseInfobox extends Persistent<boolean> {\n id: string;\n collapsed: Ref<boolean>;\n type: typeof InfoboxType;\n [Component]: typeof InfoboxComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Infobox<T extends InfoboxOptions> = Replace<\n T & BaseInfobox,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n color: GetComputableType<T[\"color\"]>;\n style: GetComputableType<T[\"style\"]>;\n titleStyle: GetComputableType<T[\"titleStyle\"]>;\n bodyStyle: GetComputableType<T[\"bodyStyle\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n title: GetComputableType<T[\"title\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericInfobox = Replace<\n Infobox<InfoboxOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createInfobox<T extends InfoboxOptions>(\n optionsFunc: OptionsFunc<T, Infobox<T>, BaseInfobox>\n): Infobox<T> {\n return createLazyProxy(persistent => {\n const infobox = Object.assign(persistent, optionsFunc());\n infobox.id = getUniqueID(\"infobox-\");\n infobox.type = InfoboxType;\n infobox[Component] = InfoboxComponent;\n\n infobox.collapsed = infobox[PersistentState];\n\n processComputable(infobox as T, \"visibility\");\n setDefault(infobox, \"visibility\", Visibility.Visible);\n processComputable(infobox as T, \"color\");\n processComputable(infobox as T, \"style\");\n processComputable(infobox as T, \"titleStyle\");\n processComputable(infobox as T, \"bodyStyle\");\n processComputable(infobox as T, \"classes\");\n processComputable(infobox as T, \"title\");\n processComputable(infobox as T, \"display\");\n\n infobox[GatherProps] = function (this: GenericInfobox) {\n const {\n visibility,\n display,\n title,\n color,\n collapsed,\n style,\n titleStyle,\n bodyStyle,\n classes,\n id\n } = this;\n return {\n visibility,\n display,\n title,\n color,\n collapsed,\n style: unref(style),\n titleStyle,\n bodyStyle,\n classes,\n id\n };\n };\n\n return infobox as unknown as Infobox<T>;\n }, persistent<boolean>(false));\n}\n","import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n ref: \"resizeListener\",\n class: _normalizeClass([\"resize-listener\", _ctx.unref(_ctx.classes)]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, null, 6))\n}","import { render } from \"./Particles.vue?vue&type=template&id=4e1c0c10&scoped=true&ts=true\"\nimport script from \"./Particles.vue?vue&type=script&lang=tsx\"\nexport * from \"./Particles.vue?vue&type=script&lang=tsx\"\n\nimport \"./Particles.vue?vue&type=style&index=0&id=4e1c0c10&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4e1c0c10\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Ref, shallowRef, unref } from \"vue\";\nimport {\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Application } from \"pixi.js\";\nimport { Emitter, EmitterConfigV3, upgradeConfig } from \"@pixi/particle-emitter\";\nimport { Computable, GetComputableType } from \"util/computed\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n onContainerResized?: (boundingRect: DOMRect) => void;\n onHotReload?: VoidFunction;\n}\n\nexport interface BaseParticles {\n id: string;\n app: Ref<null | Application>;\n addEmitter: (config: EmitterConfigV3) => Promise<Emitter>;\n type: typeof ParticlesType;\n [Component]: typeof ParticlesComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Particles<T extends ParticlesOptions> = Replace<\n T & BaseParticles,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n }\n>;\n\nexport type GenericParticles = Particles<ParticlesOptions>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: OptionsFunc<T, Particles<T>, BaseParticles>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.app = shallowRef(null);\n particles.addEmitter = (config: EmitterConfigV3): Promise<Emitter> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.app.value) {\n return Promise.resolve(new Emitter(genericParticles.app.value.stage, config));\n }\n return new Promise<Emitter>(resolve => {\n emittersToAdd.push({ resolve, config });\n });\n };\n\n let emittersToAdd: {\n resolve: (value: Emitter | PromiseLike<Emitter>) => void;\n config: EmitterConfigV3;\n }[] = [];\n\n function onInit(app: Application) {\n (particles as GenericParticles).app.value = app;\n emittersToAdd.forEach(({ resolve, config }) => resolve(new Emitter(app.stage, config)));\n emittersToAdd = [];\n }\n\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, style, classes, onContainerResized, onHotReload } = this;\n return {\n id,\n style: unref(style),\n classes,\n onContainerResized,\n onHotReload,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n\ndeclare global {\n interface Window {\n upgradeConfig: typeof upgradeConfig;\n }\n}\nwindow.upgradeConfig = upgradeConfig;\n","import { OptionsFunc, getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport { DefaultValue, Persistent, persistent, PersistentState } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { Computable, GetComputableType, processComputable } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Unsubscribe } from \"nanoevents\";\nimport { isRef, unref } from \"vue\";\n\nexport const ResetType = Symbol(\"Reset\");\n\nexport interface ResetOptions {\n thingsToReset: Computable<Record<string, unknown>[]>;\n onReset?: VoidFunction;\n}\n\nexport interface BaseReset {\n id: string;\n reset: VoidFunction;\n type: typeof ResetType;\n}\n\nexport type Reset<T extends ResetOptions> = Replace<\n T & BaseReset,\n {\n thingsToReset: GetComputableType<T[\"thingsToReset\"]>;\n }\n>;\n\nexport type GenericReset = Reset<ResetOptions>;\n\nexport function createReset<T extends ResetOptions>(\n optionsFunc: OptionsFunc<T, Reset<T>, BaseReset>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset = optionsFunc();\n reset.id = getUniqueID(\"reset-\");\n reset.type = ResetType;\n\n reset.reset = function () {\n const handleObject = (obj: unknown) => {\n if (obj && typeof obj === \"object\") {\n if (PersistentState in obj) {\n (obj as Persistent)[PersistentState].value = (obj as Persistent)[\n DefaultValue\n ];\n } else if (!(obj instanceof Decimal) && !isRef(obj)) {\n Object.values(obj).forEach(obj =>\n handleObject(obj as Record<string, unknown>)\n );\n }\n }\n };\n unref((reset as GenericReset).thingsToReset).forEach(handleObject);\n globalBus.emit(\"reset\", reset as GenericReset);\n reset.onReset?.();\n };\n\n processComputable(reset as T, \"thingsToReset\");\n\n return reset as unknown as Reset<T>;\n });\n}\n\nconst listeners: Record<string, Unsubscribe | undefined> = {};\nexport function trackResetTime(layer: GenericLayer, reset: GenericReset): Persistent<Decimal> {\n const resetTime = persistent<Decimal>(new Decimal(0));\n listeners[layer.id] = layer.on(\"preUpdate\", diff => {\n resetTime.value = Decimal.add(resetTime.value, diff);\n });\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === reset) {\n resetTime.value = new Decimal(0);\n }\n });\n return resetTime;\n}\nglobalBus.on(\"removeLayer\", layer => {\n // unsubscribe from preUpdate\n listeners[layer.id]?.();\n listeners[layer.id] = undefined;\n});\n\ndeclare module \"game/events\" {\n interface GlobalEvents {\n reset: (reset: GenericReset) => void;\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n resource: Resource;\n color: string;\n}\n\n\n\nconst amount = computed(() => displayResource(props.resource));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"h2\", {\n style: _normalizeStyle({ color: __props.color, 'text-shadow': '0px 0px 10px ' + __props.color })\n }, _toDisplayString(_unref(amount)), 5))\n}\n}\n\n})","import script from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = { key: 1 }\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\", \")\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\n\nimport { CoercableComponent } from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport Decimal from \"util/bignum\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { computed, Ref, StyleValue, toRefs } from \"vue\";\nimport ResourceVue from \"features/resources/Resource.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null,\n classes: null,\n style: null,\n effectDisplay: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n resource: Resource;\n color?: string;\n classes?: Record<string, boolean>;\n style?: StyleValue;\n effectDisplay?: CoercableComponent;\n}\n\n\nconst props = toRefs(_props);\n\nconst effectComponent = computeOptionalComponent(\n props.effectDisplay as Ref<CoercableComponent | undefined>\n);\n\nconst showPrefix = computed(() => {\n return Decimal.lt(props.resource.value, \"1e1000\");\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (_unref(showPrefix))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"You have \"))\n : _createCommentVNode(\"\", true),\n _createVNode(ResourceVue, {\n resource: __props.resource,\n color: __props.color || 'white'\n }, null, 8, [\"resource\", \"color\"]),\n _createTextVNode(\" \" + _toDisplayString(__props.resource.displayName), 1),\n (_unref(effectComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _hoisted_3,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(effectComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_4,\n _hoisted_5\n ]))\n}\n}\n\n})","import script from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { CoercableComponent, jsx } from \"features/feature\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { Computable, convertComputable, ProcessedComputable } from \"util/computed\";\nimport { renderJSX } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/modifiers.css\";\n\nexport interface Modifier {\n apply: (gain: DecimalSource) => DecimalSource;\n revert: (gain: DecimalSource) => DecimalSource;\n enabled: ProcessedComputable<boolean>;\n description?: ProcessedComputable<CoercableComponent>;\n}\n\nexport function createAdditiveModifier(\n addend: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedAddend = convertComputable(addend);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.add(gain, unref(processedAddend)),\n revert: gain => Decimal.sub(gain, unref(processedAddend)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">+{format(unref(processedAddend))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createMultiplicativeModifier(\n multiplier: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedMultiplier = convertComputable(multiplier);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.times(gain, unref(processedMultiplier)),\n revert: gain => Decimal.div(gain, unref(processedMultiplier)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">x{format(unref(processedMultiplier))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createExponentialModifier(\n exponent: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedExponent = convertComputable(exponent);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.pow(gain, unref(processedExponent)),\n revert: gain => Decimal.root(gain, unref(processedExponent)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">^{format(unref(processedExponent))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createSequentialModifier(...modifiers: Modifier[]): Required<Modifier> {\n return {\n apply: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduceRight((gain, modifier) => modifier.revert(gain), gain),\n enabled: computed(() => modifiers.filter(m => unref(m.enabled)).length > 0),\n description: jsx(() => (\n <>\n {(\n modifiers\n .filter(m => unref(m.enabled))\n .map(m => unref(m.description))\n .filter(d => d) as CoercableComponent[]\n ).map(renderJSX)}\n </>\n ))\n };\n}\n\nexport function createModifierSection(\n title: string,\n subtitle: string,\n modifier: Required<Modifier>,\n base: DecimalSource = 1,\n unit = \"\"\n) {\n return (\n <div>\n <h3>\n {title}\n {subtitle ? <span class=\"subtitle\"> ({subtitle})</span> : null}\n </h3>\n <br />\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {format(base)}\n {unit}\n </span>\n <span class=\"modifier-description\">Base</span>\n </div>\n {renderJSX(unref(modifier.description))}\n <hr />\n Total: {format(modifier.apply(base))}\n {unit}\n </div>\n );\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, isRef as _isRef, vModelText as _vModelText, createElementVNode as _createElementVNode, withDirectives as _withDirectives, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-20a0a34d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_3 = [\"min\", \"max\"]\n\nimport { computed, toRefs, unref } from \"vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n min: null,\n max: null\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: number): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: string;\n modelValue?: number;\n min?: number;\n max?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst value = computed({\n get() {\n return String(unref(props.modelValue) || 0);\n },\n set(value: string) {\n emit(\"update:modelValue\", Number(value));\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.title)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(__props.title), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(Tooltip, {\n display: `${_unref(value)}`,\n class: _normalizeClass({ fullWidth: !__props.title })\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"range\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n min: __props.min,\n max: __props.max\n }, null, 8, _hoisted_3), [\n [_vModelText, _unref(value)]\n ])\n ]),\n _: 1\n }, 8, [\"display\", \"class\"])\n ]))\n}\n}\n\n})","import script from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Slider.vue?vue&type=style&index=0&id=20a0a34d&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-20a0a34d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { nextTick, onMounted, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst top = ref(\"0\");\nconst observer = new ResizeObserver(updateTop);\nconst element = ref<HTMLElement | null>(null);\n\nfunction updateTop() {\n let el = element.value;\n if (el == undefined) {\n return;\n }\n\n let newTop = 0;\n while (el.previousSibling) {\n const sibling = el.previousSibling as HTMLElement;\n if (sibling.dataset && \"vSticky\" in sibling.dataset) {\n newTop += sibling.offsetHeight;\n }\n el = sibling;\n }\n top.value = newTop + \"px\";\n}\n\nnextTick(updateTop);\ndocument.fonts.ready.then(updateTop);\n\nonMounted(() => {\n const el = element.value?.parentElement;\n if (el) {\n observer.observe(el);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"sticky\",\n style: _normalizeStyle({ top: top.value }),\n ref_key: \"element\",\n ref: element,\n \"data-v-sticky\": \"\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n}\n}\n\n})","import script from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Sticky.vue?vue&type=style&index=0&id=6987dd96&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6987dd96\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n height: null\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"vr\",\n style: _normalizeStyle({ height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./VerticalRule.vue?vue&type=style&index=0&id=15f6e746&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15f6e746\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n width: _ctx.unref(_ctx.width) + 'px',\n height: _ctx.unref(_ctx.height) + 'px',\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n bar: true,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"overlayTextContainer border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), {\n key: 0,\n class: \"overlayText\",\n style: _normalizeStyle(_ctx.unref(_ctx.textStyle))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.style) ?? {},\n _ctx.unref(_ctx.baseStyle) ?? {},\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n _createElementVNode(\"div\", {\n class: \"fill\",\n style: _normalizeStyle([_ctx.barStyle, _ctx.unref(_ctx.style) ?? {}, _ctx.unref(_ctx.fillStyle) ?? {}])\n }, null, 4)\n ], 4),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { Direction } from \"./bar\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, CSSProperties, defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n progress: {\n type: processedPropType<DecimalSource>(String, Object, Number),\n required: true\n },\n width: {\n type: processedPropType<number>(Number),\n required: true\n },\n height: {\n type: processedPropType<number>(Number),\n required: true\n },\n direction: {\n type: processedPropType<Direction>(String),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n borderStyle: processedPropType<StyleValue>(Object, String, Array),\n textStyle: processedPropType<StyleValue>(Object, String, Array),\n baseStyle: processedPropType<StyleValue>(Object, String, Array),\n fillStyle: processedPropType<StyleValue>(Object, String, Array),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { progress, width, height, direction, display } = toRefs(props);\n\n const normalizedProgress = computed(() => {\n let progressNumber =\n progress.value instanceof Decimal\n ? progress.value.toNumber()\n : Number(progress.value);\n return (1 - Math.min(Math.max(progressNumber, 0), 1)) * 100;\n });\n\n const barStyle = computed(() => {\n const barStyle: Partial<CSSProperties> = {\n width: unwrapRef(width) + 0.5 + \"px\",\n height: unwrapRef(height) + 0.5 + \"px\"\n };\n switch (unref(direction)) {\n case Direction.Up:\n barStyle.clipPath = `inset(${normalizedProgress.value}% 0% 0% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Down:\n barStyle.clipPath = `inset(0% 0% ${normalizedProgress.value}% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Right:\n barStyle.clipPath = `inset(0% ${normalizedProgress.value}% 0% 0%)`;\n break;\n case Direction.Left:\n barStyle.clipPath = `inset(0% 0% 0% ${normalizedProgress.value} + '%)`;\n break;\n case Direction.Default:\n barStyle.clipPath = \"inset(0% 50% 0% 0%)\";\n break;\n }\n return barStyle;\n });\n\n const component = computeOptionalComponent(display);\n\n return {\n normalizedProgress,\n barStyle,\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Bar.vue?vue&type=template&id=e6e3c366&scoped=true&ts=true\"\nimport script from \"./Bar.vue?vue&type=script&lang=ts\"\nexport * from \"./Bar.vue?vue&type=script&lang=ts\"\n\nimport \"./Bar.vue?vue&type=style&index=0&id=e6e3c366&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e6e3c366\"]])\n\nexport default __exports__","import BarComponent from \"features/bars/Bar.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { unref } from \"vue\";\n\nexport const BarType = Symbol(\"Bar\");\n\nexport enum Direction {\n Up = \"Up\",\n Down = \"Down\",\n Left = \"Left\",\n Right = \"Right\",\n Default = \"Up\"\n}\n\nexport interface BarOptions {\n visibility?: Computable<Visibility>;\n width: Computable<number>;\n height: Computable<number>;\n direction: Computable<Direction>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n borderStyle?: Computable<StyleValue>;\n baseStyle?: Computable<StyleValue>;\n textStyle?: Computable<StyleValue>;\n fillStyle?: Computable<StyleValue>;\n progress: Computable<DecimalSource>;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n}\n\nexport interface BaseBar {\n id: string;\n type: typeof BarType;\n [Component]: typeof BarComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Bar<T extends BarOptions> = Replace<\n T & BaseBar,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n width: GetComputableType<T[\"width\"]>;\n height: GetComputableType<T[\"height\"]>;\n direction: GetComputableType<T[\"direction\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n borderStyle: GetComputableType<T[\"borderStyle\"]>;\n baseStyle: GetComputableType<T[\"baseStyle\"]>;\n textStyle: GetComputableType<T[\"textStyle\"]>;\n fillStyle: GetComputableType<T[\"fillStyle\"]>;\n progress: GetComputableType<T[\"progress\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericBar = Replace<\n Bar<BarOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createBar<T extends BarOptions>(\n optionsFunc: OptionsFunc<T, Bar<T>, BaseBar>\n): Bar<T> {\n return createLazyProxy(() => {\n const bar = optionsFunc();\n bar.id = getUniqueID(\"bar-\");\n bar.type = BarType;\n bar[Component] = BarComponent;\n\n processComputable(bar as T, \"visibility\");\n setDefault(bar, \"visibility\", Visibility.Visible);\n processComputable(bar as T, \"width\");\n processComputable(bar as T, \"height\");\n processComputable(bar as T, \"direction\");\n processComputable(bar as T, \"style\");\n processComputable(bar as T, \"classes\");\n processComputable(bar as T, \"borderStyle\");\n processComputable(bar as T, \"baseStyle\");\n processComputable(bar as T, \"textStyle\");\n processComputable(bar as T, \"fillStyle\");\n processComputable(bar as T, \"progress\");\n processComputable(bar as T, \"display\");\n processComputable(bar as T, \"mark\");\n\n bar[GatherProps] = function (this: GenericBar) {\n const {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style,\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n } = this;\n return {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style: unref(style),\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n };\n };\n\n return bar as unknown as Bar<T>;\n });\n}\n","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport { Resource } from \"features/resources/resource\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref } from \"vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"./feature\";\n\nexport const BuyableType = Symbol(\"Buyable\");\n\nexport type BuyableDisplay =\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n };\n\nexport interface BuyableOptions {\n visibility?: Computable<Visibility>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canPurchase?: Computable<boolean>;\n purchaseLimit?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n small?: Computable<boolean>;\n display?: Computable<BuyableDisplay>;\n onPurchase?: (cost: DecimalSource) => void;\n}\n\nexport interface BaseBuyable extends Persistent<DecimalSource> {\n id: string;\n amount: Ref<DecimalSource>;\n maxed: Ref<boolean>;\n canAfford: Ref<boolean>;\n canClick: ProcessedComputable<boolean>;\n onClick: VoidFunction;\n purchase: VoidFunction;\n type: typeof BuyableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Buyable<T extends BuyableOptions> = Replace<\n T & BaseBuyable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n cost: GetComputableType<T[\"cost\"]>;\n resource: GetComputableType<T[\"resource\"]>;\n canPurchase: GetComputableTypeWithDefault<T[\"canPurchase\"], Ref<boolean>>;\n purchaseLimit: GetComputableTypeWithDefault<T[\"purchaseLimit\"], Decimal>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n small: GetComputableType<T[\"small\"]>;\n display: Ref<CoercableComponent>;\n }\n>;\n\nexport type GenericBuyable = Replace<\n Buyable<BuyableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n purchaseLimit: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createBuyable<T extends BuyableOptions>(\n optionsFunc: OptionsFunc<T, Buyable<T>, BaseBuyable>\n): Buyable<T> {\n return createLazyProxy(persistent => {\n const buyable = Object.assign(persistent, optionsFunc());\n\n if (buyable.canPurchase == null && (buyable.resource == null || buyable.cost == null)) {\n console.warn(\n \"Cannot create buyable without a canPurchase property or a resource and cost property\",\n buyable\n );\n throw \"Cannot create buyable without a canPurchase property or a resource and cost property\";\n }\n\n buyable.id = getUniqueID(\"buyable-\");\n buyable.type = BuyableType;\n buyable[Component] = ClickableComponent;\n\n buyable.amount = buyable[PersistentState];\n buyable.canAfford = computed(() => {\n const genericBuyable = buyable as GenericBuyable;\n const cost = unref(genericBuyable.cost);\n return (\n genericBuyable.resource != null &&\n cost != null &&\n Decimal.gte(genericBuyable.resource.value, cost)\n );\n });\n if (buyable.canPurchase == null) {\n buyable.canPurchase = computed(\n () =>\n unref((buyable as GenericBuyable).visibility) === Visibility.Visible &&\n unref((buyable as GenericBuyable).canAfford) &&\n Decimal.lt(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n }\n buyable.maxed = computed(() =>\n Decimal.gte(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n processComputable(buyable as T, \"classes\");\n const classes = buyable.classes as ProcessedComputable<Record<string, boolean>> | undefined;\n buyable.classes = computed(() => {\n const currClasses = unref(classes) || {};\n if ((buyable as GenericBuyable).maxed.value) {\n currClasses.bought = true;\n }\n return currClasses;\n });\n processComputable(buyable as T, \"canPurchase\");\n buyable.canClick = buyable.canPurchase as ProcessedComputable<boolean>;\n buyable.onClick = buyable.purchase = function () {\n const genericBuyable = buyable as GenericBuyable;\n if (\n !unref(genericBuyable.canPurchase) ||\n genericBuyable.cost == null ||\n genericBuyable.resource == null\n ) {\n return;\n }\n const cost = unref(genericBuyable.cost);\n genericBuyable.resource.value = Decimal.sub(genericBuyable.resource.value, cost);\n genericBuyable.amount.value = Decimal.add(genericBuyable.amount.value, 1);\n this.onPurchase?.(cost);\n };\n processComputable(buyable as T, \"display\");\n const display = buyable.display;\n buyable.display = jsx(() => {\n // TODO once processComputable types correctly, remove this \"as X\"\n const currDisplay = unref(display) as BuyableDisplay;\n if (isCoercableComponent(currDisplay)) {\n const CurrDisplay = coerceComponent(currDisplay);\n return <CurrDisplay />;\n }\n if (currDisplay != null && buyable.cost != null && buyable.resource != null) {\n const genericBuyable = buyable as GenericBuyable;\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description);\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n const amountDisplay =\n unref(genericBuyable.purchaseLimit) === Decimal.dInf ? (\n <>Amount: {formatWhole(genericBuyable.amount.value)}</>\n ) : (\n <>\n Amount: {formatWhole(genericBuyable.amount.value)} /{\" \"}\n {formatWhole(unref(genericBuyable.purchaseLimit))}\n </>\n );\n\n return (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n <div>\n <br />\n {amountDisplay}\n </div>\n {currDisplay.effectDisplay ? (\n <div>\n <br />\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {genericBuyable.cost && !genericBuyable.maxed.value ? (\n <div>\n <br />\n Cost: {format(unref(genericBuyable.cost) || 0)}{\" \"}\n {buyable.resource.displayName}\n </div>\n ) : null}\n </span>\n );\n }\n return \"\";\n });\n\n processComputable(buyable as T, \"visibility\");\n setDefault(buyable, \"visibility\", Visibility.Visible);\n processComputable(buyable as T, \"cost\");\n processComputable(buyable as T, \"resource\");\n processComputable(buyable as T, \"purchaseLimit\");\n setDefault(buyable, \"purchaseLimit\", Decimal.dInf);\n processComputable(buyable as T, \"style\");\n processComputable(buyable as T, \"mark\");\n processComputable(buyable as T, \"small\");\n\n buyable[GatherProps] = function (this: GenericBuyable) {\n const { display, visibility, style, classes, onClick, canClick, small, mark, id } =\n this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return buyable as unknown as Buyable<T>;\n }, persistent<DecimalSource>(0));\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e580749\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.notifyStyle,\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n feature: true,\n challenge: true,\n done: _ctx.unref(_ctx.completed),\n canStart: _ctx.unref(_ctx.canStart) && !_ctx.unref(_ctx.maxed),\n maxed: _ctx.unref(_ctx.maxed),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"button\", {\n class: \"toggleChallenge\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.toggle && _ctx.toggle(...args))),\n disabled: !_ctx.unref(_ctx.canStart) || _ctx.unref(_ctx.maxed)\n }, _toDisplayString(_ctx.buttonText), 9, _hoisted_1),\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { GenericChallenge } from \"features/challenges/challenge\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { getHighNotifyStyle, getNotifyStyle } from \"game/notifications\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n active: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n maxed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canComplete: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n display: processedPropType<UnwrapRef<GenericChallenge[\"display\"]>>(\n String,\n Object,\n Function\n ),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n completed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canStart: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n toggle: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { active, maxed, canComplete, display } = toRefs(props);\n\n const buttonText = computed(() => {\n if (active.value) {\n return canComplete.value ? \"Finish\" : \"Exit Early\";\n }\n if (maxed.value) {\n return \"Completed\";\n }\n return \"Start\";\n });\n\n const comp = shallowRef<Component | string>(\"\");\n\n const notifyStyle = computed(() => {\n const currActive = unwrapRef(active);\n const currCanComplete = unwrapRef(canComplete);\n if (currActive) {\n if (currCanComplete) {\n return getHighNotifyStyle();\n }\n return getNotifyStyle();\n }\n return {};\n });\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const Goal = coerceComponent(currDisplay.goal || \"\");\n const Reward = coerceComponent(currDisplay.reward || \"\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.goal ? (\n <div>\n <br />\n Goal: <Goal />\n </div>\n ) : null}\n {currDisplay.reward ? (\n <div>\n <br />\n Reward: <Reward />\n </div>\n ) : null}\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n buttonText,\n notifyStyle,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Challenge.vue?vue&type=template&id=5e580749&scoped=true&ts=true\"\nimport script from \"./Challenge.vue?vue&type=script&lang=tsx\"\nexport * from \"./Challenge.vue?vue&type=script&lang=tsx\"\n\nimport \"./Challenge.vue?vue&type=style&index=0&id=5e580749&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5e580749\"]])\n\nexport default __exports__","import { isArray } from \"@vue/shared\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport ChallengeComponent from \"features/challenges/Challenge.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericReset } from \"features/reset\";\nimport { Resource } from \"features/resources/resource\";\nimport { globalBus } from \"game/events\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref, watch, WatchStopHandle } from \"vue\";\n\nexport const ChallengeType = Symbol(\"ChallengeType\");\n\nexport interface ChallengeOptions {\n visibility?: Computable<Visibility>;\n canStart?: Computable<boolean>;\n reset?: GenericReset;\n canComplete?: Computable<boolean | DecimalSource>;\n completionLimit?: Computable<DecimalSource>;\n mark?: Computable<boolean | string>;\n resource?: Resource;\n goal?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n goal?: CoercableComponent;\n reward?: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n onExit?: VoidFunction;\n onEnter?: VoidFunction;\n}\n\nexport interface BaseChallenge {\n id: string;\n completions: Persistent<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: Persistent<boolean>;\n toggle: VoidFunction;\n complete: (remainInChallenge?: boolean) => void;\n type: typeof ChallengeType;\n [Component]: typeof ChallengeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Challenge<T extends ChallengeOptions> = Replace<\n T & BaseChallenge,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canStart: GetComputableTypeWithDefault<T[\"canStart\"], true>;\n canComplete: GetComputableTypeWithDefault<T[\"canComplete\"], Ref<boolean>>;\n completionLimit: GetComputableTypeWithDefault<T[\"completionLimit\"], 1>;\n mark: GetComputableTypeWithDefault<T[\"mark\"], Ref<boolean>>;\n goal: GetComputableType<T[\"goal\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericChallenge = Replace<\n Challenge<ChallengeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canStart: ProcessedComputable<boolean>;\n canComplete: ProcessedComputable<boolean | DecimalSource>;\n completionLimit: ProcessedComputable<DecimalSource>;\n mark: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createChallenge<T extends ChallengeOptions>(\n optionsFunc: OptionsFunc<T, Challenge<T>, BaseChallenge>\n): Challenge<T> {\n const completions = persistent(0);\n const active = persistent(false);\n return createLazyProxy(() => {\n const challenge = optionsFunc();\n\n if (\n challenge.canComplete == null &&\n (challenge.resource == null || challenge.goal == null)\n ) {\n console.warn(\n \"Cannot create challenge without a canComplete property or a resource and goal property\",\n challenge\n );\n throw \"Cannot create challenge without a canComplete property or a resource and goal property\";\n }\n\n challenge.id = getUniqueID(\"challenge-\");\n challenge.type = ChallengeType;\n challenge[Component] = ChallengeComponent;\n\n challenge.completions = completions;\n challenge.active = active;\n challenge.completed = computed(() =>\n Decimal.gt((challenge as GenericChallenge).completions.value, 0)\n );\n challenge.maxed = computed(() =>\n Decimal.gte(\n (challenge as GenericChallenge).completions.value,\n unref((challenge as GenericChallenge).completionLimit)\n )\n );\n challenge.toggle = function () {\n const genericChallenge = challenge as GenericChallenge;\n if (genericChallenge.active.value) {\n if (unref(genericChallenge.canComplete) && !genericChallenge.maxed.value) {\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n }\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n } else if (\n unref(genericChallenge.canStart) &&\n unref(genericChallenge.visibility) === Visibility.Visible &&\n !genericChallenge.maxed.value\n ) {\n genericChallenge.reset?.reset();\n genericChallenge.active.value = true;\n genericChallenge.onEnter?.();\n }\n };\n challenge.complete = function (remainInChallenge?: boolean) {\n const genericChallenge = challenge as GenericChallenge;\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (\n genericChallenge.active.value &&\n completions !== false &&\n (completions === true || Decimal.neq(0, completions)) &&\n !genericChallenge.maxed.value\n ) {\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n if (remainInChallenge !== true) {\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n }\n }\n };\n processComputable(challenge as T, \"visibility\");\n setDefault(challenge, \"visibility\", Visibility.Visible);\n const visibility = challenge.visibility as ProcessedComputable<Visibility>;\n challenge.visibility = computed(() => {\n if (settings.hideChallenges === true && unref(challenge.maxed)) {\n return Visibility.None;\n }\n return unref(visibility);\n });\n if (challenge.canComplete == null) {\n challenge.canComplete = computed(() => {\n const genericChallenge = challenge as GenericChallenge;\n if (\n !genericChallenge.active.value ||\n genericChallenge.resource == null ||\n genericChallenge.goal == null\n ) {\n return false;\n }\n return Decimal.gte(genericChallenge.resource.value, unref(genericChallenge.goal));\n });\n }\n if (challenge.mark == null) {\n challenge.mark = computed(\n () =>\n Decimal.gt(unref((challenge as GenericChallenge).completionLimit), 1) &&\n !!unref(challenge.maxed)\n );\n }\n\n processComputable(challenge as T, \"canStart\");\n setDefault(challenge, \"canStart\", true);\n processComputable(challenge as T, \"canComplete\");\n processComputable(challenge as T, \"completionLimit\");\n setDefault(challenge, \"completionLimit\", 1);\n processComputable(challenge as T, \"mark\");\n processComputable(challenge as T, \"goal\");\n processComputable(challenge as T, \"classes\");\n processComputable(challenge as T, \"style\");\n processComputable(challenge as T, \"display\");\n\n if (challenge.reset != null) {\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === challenge.reset && (challenge.active as Ref<boolean>).value) {\n (challenge.toggle as VoidFunction)();\n }\n });\n }\n\n challenge[GatherProps] = function (this: GenericChallenge) {\n const {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style,\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n } = this;\n return {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style: unref(style),\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n };\n };\n\n return challenge as unknown as Challenge<T>;\n });\n}\n\nexport function setupAutoComplete(\n challenge: GenericChallenge,\n autoActive: Computable<boolean> = true,\n exitOnComplete = true\n): WatchStopHandle {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return watch([challenge.canComplete, isActive], ([canComplete, isActive]) => {\n if (canComplete && isActive) {\n challenge.complete(!exitOnComplete);\n }\n });\n}\n\nexport function createActiveChallenge(\n challenges: GenericChallenge[]\n): Ref<GenericChallenge | undefined> {\n return computed(() => challenges.find(challenge => challenge.active.value));\n}\n\nexport function isAnyChallengeActive(\n challenges: GenericChallenge[] | Ref<GenericChallenge | undefined>\n): Ref<boolean> {\n if (isArray(challenges)) {\n challenges = createActiveChallenge(challenges);\n }\n return computed(() => (challenges as Ref<GenericChallenge | undefined>).value != null);\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n hideChallenges: boolean;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"hideChallenges\", false);\n});\n\nregisterSettingField(\n jsx(() => (\n <Toggle\n title=\"Hide Maxed Challenges\"\n onUpdate:modelValue={value => (settings.hideChallenges = value)}\n modelValue={settings.hideChallenges}\n />\n ))\n);\n","import { hasWon } from \"data/projEntry\";\nimport { globalBus } from \"game/events\";\nimport player from \"game/player\";\nimport { registerInfoComponent } from \"game/settings\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n GetComputableType,\n ProcessedComputable,\n processComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { shallowReactive, unref } from \"vue\";\nimport { OptionsFunc, findFeatures, jsx, Replace, setDefault } from \"./feature\";\n\nexport const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});\nexport const HotkeyType = Symbol(\"Hotkey\");\n\nexport interface HotkeyOptions {\n enabled?: Computable<boolean>;\n key: string;\n description: Computable<string>;\n onPress: VoidFunction;\n}\n\nexport interface BaseHotkey {\n type: typeof HotkeyType;\n}\n\nexport type Hotkey<T extends HotkeyOptions> = Replace<\n T & BaseHotkey,\n {\n enabled: GetComputableTypeWithDefault<T[\"enabled\"], true>;\n description: GetComputableType<T[\"description\"]>;\n }\n>;\n\nexport type GenericHotkey = Replace<\n Hotkey<HotkeyOptions>,\n {\n enabled: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createHotkey<T extends HotkeyOptions>(\n optionsFunc: OptionsFunc<T, Hotkey<T>, BaseHotkey>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey = optionsFunc();\n hotkey.type = HotkeyType;\n\n processComputable(hotkey as T, \"enabled\");\n setDefault(hotkey, \"enabled\", true);\n processComputable(hotkey as T, \"description\");\n\n return hotkey as unknown as Hotkey<T>;\n });\n}\n\nglobalBus.on(\"addLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = hotkey;\n });\n});\n\nglobalBus.on(\"removeLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = undefined;\n });\n});\n\ndocument.onkeydown = function (e) {\n if ((e.target as HTMLElement | null)?.tagName === \"INPUT\") {\n return;\n }\n if (hasWon.value && !player.keepGoing) {\n return;\n }\n let key = e.key;\n if (e.shiftKey) {\n key = \"shift+\" + key;\n }\n if (e.ctrlKey) {\n key = \"ctrl+\" + key;\n }\n const hotkey = hotkeys[key];\n if (hotkey && unref(hotkey.enabled)) {\n e.preventDefault();\n hotkey.onPress();\n }\n};\n\nregisterInfoComponent(\n jsx(() => {\n const keys = Object.values(hotkeys).filter(hotkey => unref(hotkey?.enabled));\n if (keys.length === 0) {\n return \"\";\n }\n return (\n <div>\n <br />\n <h4>Hotkeys</h4>\n {keys.map(hotkey => (\n <div>\n {hotkey?.key}: {hotkey?.description}\n </div>\n ))}\n </div>\n );\n })\n);\n","import LinksComponent from \"./Links.vue\";\nimport { Component, OptionsFunc, GatherProps, Replace } from \"features/feature\";\nimport { Position } from \"game/layers\";\nimport {\n Computable,\n GetComputableType,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { SVGAttributes } from \"vue\";\n\nexport const LinksType = Symbol(\"Links\");\n\nexport interface Link extends SVGAttributes {\n startNode: { id: string };\n endNode: { id: string };\n offsetStart?: Position;\n offsetEnd?: Position;\n}\n\nexport interface LinksOptions {\n links?: Computable<Link[]>;\n}\n\nexport interface BaseLinks {\n type: typeof LinksType;\n [Component]: typeof LinksComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Links<T extends LinksOptions> = Replace<\n T & BaseLinks,\n {\n links: GetComputableType<T[\"links\"]>;\n }\n>;\n\nexport type GenericLinks = Replace<\n Links<LinksOptions>,\n {\n links: ProcessedComputable<Link[]>;\n }\n>;\n\nexport function createLinks<T extends LinksOptions>(\n optionsFunc: OptionsFunc<T, Links<T>, BaseLinks>\n): Links<T> {\n return createLazyProxy(() => {\n const links = optionsFunc();\n links.type = LinksType;\n links[Component] = LinksComponent;\n\n processComputable(links as T, \"links\");\n\n links[GatherProps] = function (this: GenericLinks) {\n const { links } = this;\n return {\n links\n };\n };\n\n return links as unknown as Links<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({ feature: true, milestone: true, done: _ctx.unref(_ctx.earned), ..._ctx.unref(_ctx.classes) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)))),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { GenericMilestone } from \"features/milestones/milestone\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, UnwrapRef, watchEffect } from \"vue\";\nimport Node from \"../../components/Node.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<UnwrapRef<GenericMilestone[\"display\"]>>(\n String,\n Object,\n Function\n ),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { display } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Requirement = coerceComponent(currDisplay.requirement, \"h3\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\", \"b\");\n const OptionsDisplay = coerceComponent(currDisplay.optionsDisplay || \"\", \"span\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n <Requirement />\n {currDisplay.effectDisplay ? (\n <div>\n <EffectDisplay />\n </div>\n ) : null}\n {currDisplay.optionsDisplay ? (\n <div class=\"equal-spaced\">\n <OptionsDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n comp,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Milestone.vue?vue&type=template&id=0b660ac3&scoped=true&ts=true\"\nimport script from \"./Milestone.vue?vue&type=script&lang=tsx\"\nexport * from \"./Milestone.vue?vue&type=script&lang=tsx\"\n\nimport \"./Milestone.vue?vue&type=style&index=0&id=0b660ac3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0b660ac3\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport MilestoneComponent from \"features/milestones/Milestone.vue\";\nimport { globalBus } from \"game/events\";\nimport \"game/notifications\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const MilestoneType = Symbol(\"Milestone\");\n\nexport enum MilestoneDisplay {\n All = \"all\",\n //Last = \"last\",\n Configurable = \"configurable\",\n Incomplete = \"incomplete\",\n None = \"none\"\n}\n\nexport interface MilestoneOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n display?: Computable<\n | CoercableComponent\n | {\n requirement: CoercableComponent;\n effectDisplay?: CoercableComponent;\n optionsDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseMilestone extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof MilestoneType;\n [Component]: typeof MilestoneComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Milestone<T extends MilestoneOptions> = Replace<\n T & BaseMilestone,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericMilestone = Replace<\n Milestone<MilestoneOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createMilestone<T extends MilestoneOptions>(\n optionsFunc: OptionsFunc<T, Milestone<T>, BaseMilestone>\n): Milestone<T> {\n return createLazyProxy(persistent => {\n const milestone = Object.assign(persistent, optionsFunc());\n milestone.id = getUniqueID(\"milestone-\");\n milestone.type = MilestoneType;\n milestone[Component] = MilestoneComponent;\n\n milestone.earned = milestone[PersistentState];\n milestone.complete = function () {\n milestone[PersistentState].value = true;\n };\n\n processComputable(milestone as T, \"visibility\");\n setDefault(milestone, \"visibility\", Visibility.Visible);\n const visibility = milestone.visibility as ProcessedComputable<Visibility>;\n milestone.visibility = computed(() => {\n const display = unref((milestone as GenericMilestone).display);\n switch (settings.msDisplay) {\n default:\n case MilestoneDisplay.All:\n return unref(visibility);\n case MilestoneDisplay.Configurable:\n if (\n unref(milestone.earned) &&\n !(\n display != null &&\n typeof display == \"object\" &&\n \"optionsDisplay\" in (display as Record<string, unknown>)\n )\n ) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.Incomplete:\n if (unref(milestone.earned)) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.None:\n return Visibility.None;\n }\n });\n\n processComputable(milestone as T, \"style\");\n processComputable(milestone as T, \"classes\");\n processComputable(milestone as T, \"display\");\n\n milestone[GatherProps] = function (this: GenericMilestone) {\n const { visibility, display, style, classes, earned, id } = this;\n return { visibility, display, style: unref(style), classes, earned, id };\n };\n\n if (milestone.shouldEarn) {\n const genericMilestone = milestone as GenericMilestone;\n watchEffect(() => {\n if (\n !genericMilestone.earned.value &&\n unref(genericMilestone.visibility) === Visibility.Visible &&\n genericMilestone.shouldEarn?.()\n ) {\n genericMilestone.earned.value = true;\n genericMilestone.onComplete?.();\n if (genericMilestone.display) {\n const display = unref(genericMilestone.display);\n const Display = coerceComponent(\n isCoercableComponent(display) ? display : display.requirement\n );\n toast(\n <>\n <h3>Milestone earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </>\n );\n }\n }\n });\n }\n\n return milestone as unknown as Milestone<T>;\n }, persistent<boolean>(false));\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n msDisplay: MilestoneDisplay;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"msDisplay\", MilestoneDisplay.All);\n});\n\nconst msDisplayOptions = Object.values(MilestoneDisplay).map(option => ({\n label: camelToTitle(option),\n value: option\n}));\n\nregisterSettingField(\n jsx(() => (\n <Select\n title=\"Show Milestones\"\n options={msDisplayOptions}\n onUpdate:modelValue={value => (settings.msDisplay = value as MilestoneDisplay)}\n modelValue={settings.msDisplay}\n />\n ))\n);\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CoercableComponent } from \"features/feature\";\nimport { computeComponent } from \"util/vue\";\nimport { toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n display: null\n },\n setup(__props: any) {\n\nconst _props = __props as { display: CoercableComponent }\n\n\nconst { display } = toRefs(_props);\nconst component = computeComponent(display);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n}\n}\n\n})","import script from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport TabComponent from \"features/tabs/Tab.vue\";\nimport { Computable, GetComputableType } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const TabType = Symbol(\"Tab\");\n\nexport interface TabOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseTab {\n id: string;\n type: typeof TabType;\n [Component]: typeof TabComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tab<T extends TabOptions> = Replace<\n T & BaseTab,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericTab = Tab<TabOptions>;\n\nexport function createTab<T extends TabOptions>(\n optionsFunc: OptionsFunc<T, Tab<T>, BaseTab>\n): Tab<T> {\n return createLazyProxy(() => {\n const tab = optionsFunc();\n tab.id = getUniqueID(\"tab-\");\n tab.type = TabType;\n tab[Component] = TabComponent;\n\n tab[GatherProps] = function (this: GenericTab) {\n const { display } = this;\n return { display };\n };\n\n return tab as unknown as Tab<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.selectTab && _ctx.selectTab(...args))),\n class: _normalizeClass([\"tabButton\", {\n active: _ctx.active,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.glowColorStyle,\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { getNotifyStyle } from \"game/notifications\";\nimport { computeComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n glowColor: processedPropType<string>(String),\n active: Boolean,\n floating: Boolean\n },\n emits: [\"selectTab\"],\n setup(props, { emit }) {\n const { display, glowColor, floating } = toRefs(props);\n\n const component = computeComponent(display);\n\n const glowColorStyle = computed(() => {\n const color = unwrapRef(glowColor);\n if (!color) {\n return {};\n }\n if (unref(floating)) {\n return getNotifyStyle(color);\n }\n return { boxShadow: `0px 9px 5px -6px ${color}` };\n });\n\n function selectTab() {\n emit(\"selectTab\");\n }\n\n return {\n selectTab,\n component,\n glowColorStyle,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./TabButton.vue?vue&type=template&id=361380c0&scoped=true&ts=true\"\nimport script from \"./TabButton.vue?vue&type=script&lang=ts\"\nexport * from \"./TabButton.vue?vue&type=script&lang=ts\"\n\nimport \"./TabButton.vue?vue&type=style&index=0&id=361380c0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-361380c0\"]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TabButton = _resolveComponent(\"TabButton\")!\n const _component_Sticky = _resolveComponent(\"Sticky\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tab-family-container\", { ..._ctx.unref(_ctx.classes), ..._ctx.tabClasses }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? [],\n _ctx.tabStyle ?? []\n ])\n }, [\n _createVNode(_component_Sticky, { class: \"tab-buttons-container\" }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tab-buttons\", { floating: _ctx.floating }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.tabs), (button, id) => {\n return (_openBlock(), _createBlock(_component_TabButton, _mergeProps({\n onSelectTab: ($event: any) => (_ctx.selected.value = id),\n floating: _ctx.floating,\n key: id,\n active: _ctx.unref(button.tab) === _ctx.unref(_ctx.activeTab)\n }, _ctx.gatherButtonProps(button)), null, 16, [\"onSelectTab\", \"floating\", \"active\"]))\n }), 128))\n ], 2)\n ]),\n _: 1\n }),\n (_ctx.unref(_ctx.activeTab))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Sticky from \"components/layout/Sticky.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { GenericTab } from \"features/tabs/tab\";\nimport TabButton from \"features/tabs/TabButton.vue\";\nimport { GenericTabButton } from \"features/tabs/tabFamily\";\nimport settings from \"game/settings\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n Ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n activeTab: {\n type: processedPropType<GenericTab | CoercableComponent | null>(Object),\n required: true\n },\n selected: {\n type: Object as PropType<Ref<string>>,\n required: true\n },\n tabs: {\n type: processedPropType<Record<string, GenericTabButton>>(Object),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object)\n },\n components: {\n Sticky,\n TabButton\n },\n setup(props) {\n const { activeTab } = toRefs(props);\n\n const floating = computed(() => {\n return themes[settings.theme].floatingTabs;\n });\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currActiveTab = unwrapRef(activeTab);\n if (currActiveTab == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currActiveTab)) {\n component.value = coerceComponent(currActiveTab);\n return;\n }\n component.value = coerceComponent(unref(currActiveTab.display));\n });\n\n const tabClasses = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n const tabClasses =\n isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.classes);\n return tabClasses;\n });\n\n const tabStyle = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n return isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.style);\n });\n\n function gatherButtonProps(button: GenericTabButton) {\n const { display, style, classes, glowColor, visibility } = button;\n return { display, style, classes, glowColor, visibility };\n }\n\n return {\n floating,\n tabClasses,\n tabStyle,\n Visibility,\n component,\n gatherButtonProps,\n unref\n };\n }\n});\n","import { render } from \"./TabFamily.vue?vue&type=template&id=38d5b5f9&scoped=true&ts=true\"\nimport script from \"./TabFamily.vue?vue&type=script&lang=ts\"\nexport * from \"./TabFamily.vue?vue&type=script&lang=ts\"\n\nimport \"./TabFamily.vue?vue&type=style&index=0&id=38d5b5f9&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-38d5b5f9\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport TabButtonComponent from \"features/tabs/TabButton.vue\";\nimport TabFamilyComponent from \"features/tabs/TabFamily.vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { GenericTab } from \"./tab\";\n\nexport const TabButtonType = Symbol(\"TabButton\");\nexport const TabFamilyType = Symbol(\"TabFamily\");\n\nexport interface TabButtonOptions {\n visibility?: Computable<Visibility>;\n tab: Computable<GenericTab | CoercableComponent>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n glowColor?: Computable<string>;\n}\n\nexport interface BaseTabButton {\n type: typeof TabButtonType;\n [Component]: typeof TabButtonComponent;\n}\n\nexport type TabButton<T extends TabButtonOptions> = Replace<\n T & BaseTabButton,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tab: GetComputableType<T[\"tab\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n }\n>;\n\nexport type GenericTabButton = Replace<\n TabButton<TabButtonOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport interface TabFamilyOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\n tabs: Record<string, TabButtonOptions>;\n activeTab: Ref<GenericTab | CoercableComponent | null>;\n selected: Ref<string>;\n type: typeof TabFamilyType;\n [Component]: typeof TabFamilyComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TabFamily<T extends TabFamilyOptions> = Replace<\n T & BaseTabFamily,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tabs: Record<string, GenericTabButton>;\n }\n>;\n\nexport type GenericTabFamily = Replace<\n TabFamily<TabFamilyOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTabFamily<T extends TabFamilyOptions>(\n tabs: Record<string, () => TabButtonOptions>,\n optionsFunc?: OptionsFunc<T, TabFamily<T>, BaseTabFamily>\n): TabFamily<T> {\n if (Object.keys(tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\");\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n return createLazyProxy(persistent => {\n const tabFamily = Object.assign(persistent, optionsFunc?.());\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n tabFamily.tabs = Object.keys(tabs).reduce<Record<string, GenericTabButton>>(\n (parsedTabs, tab) => {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabs[tab]();\n tabButton.type = TabButtonType;\n tabButton[Component] = TabButtonComponent;\n\n processComputable(tabButton as TabButtonOptions, \"visibility\");\n setDefault(tabButton, \"visibility\", Visibility.Visible);\n processComputable(tabButton as TabButtonOptions, \"tab\");\n processComputable(tabButton as TabButtonOptions, \"display\");\n processComputable(tabButton as TabButtonOptions, \"classes\");\n processComputable(tabButton as TabButtonOptions, \"style\");\n processComputable(tabButton as TabButtonOptions, \"glowColor\");\n parsedTabs[tab] = tabButton as GenericTabButton;\n return parsedTabs;\n },\n {}\n );\n tabFamily.selected = tabFamily[PersistentState];\n tabFamily.activeTab = computed(() => {\n const tabs = unref(processedTabFamily.tabs);\n if (\n tabFamily[PersistentState].value in tabs &&\n unref(tabs[processedTabFamily[PersistentState].value].visibility) ===\n Visibility.Visible\n ) {\n return unref(tabs[processedTabFamily[PersistentState].value].tab);\n }\n const firstTab = Object.values(tabs).find(\n tab => unref(tab.visibility) === Visibility.Visible\n );\n if (firstTab) {\n return unref(firstTab.tab);\n }\n return null;\n });\n\n processComputable(tabFamily as T, \"visibility\");\n setDefault(tabFamily, \"visibility\", Visibility.Visible);\n processComputable(tabFamily as T, \"classes\");\n processComputable(tabFamily as T, \"style\");\n\n tabFamily[GatherProps] = function (this: GenericTabFamily) {\n const { visibility, activeTab, selected, tabs, style, classes } = this;\n return { visibility, activeTab, selected, tabs, style: unref(style), classes };\n };\n\n // This is necessary because board.types is different from T and TabFamily\n const processedTabFamily = tabFamily as unknown as TabFamily<T>;\n return processedTabFamily;\n }, persistent(Object.keys(tabs)[0]));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-264c96b4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.purchase && _ctx.purchase(...args))),\n class: _normalizeClass({\n feature: true,\n upgrade: true,\n can: _ctx.unref(_ctx.canPurchase),\n locked: !_ctx.unref(_ctx.canPurchase),\n bought: _ctx.unref(_ctx.bought),\n ..._ctx.unref(_ctx.classes)\n }),\n disabled: !_ctx.unref(_ctx.canPurchase)\n }, [\n (_ctx.unref(_ctx.component))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { GenericUpgrade } from \"features/upgrades/upgrade\";\nimport { DecimalSource } from \"util/bignum\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericUpgrade[\"display\"]>>(String, Object, Function),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n resource: Object as PropType<Resource>,\n cost: processedPropType<DecimalSource>(String, Object, Number),\n canPurchase: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n bought: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n purchase: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, cost } = toRefs(props);\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n component.value = coerceComponent(currDisplay);\n return;\n }\n const currCost = unwrapRef(cost);\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n component.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {props.resource != null ? (\n <>\n <br />\n Cost: {props.resource &&\n displayResource(props.resource, currCost)}{\" \"}\n {props.resource?.displayName}\n </>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Upgrade.vue?vue&type=template&id=264c96b4&scoped=true&ts=true\"\nimport script from \"./Upgrade.vue?vue&type=script&lang=tsx\"\nexport * from \"./Upgrade.vue?vue&type=script&lang=tsx\"\n\nimport \"./Upgrade.vue?vue&type=style&index=0&id=264c96b4&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-264c96b4\"]])\n\nexport default __exports__","import UpgradeComponent from \"features/upgrades/Upgrade.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n findFeatures,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport { GenericLayer } from \"game/layers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\n\nexport const UpgradeType = Symbol(\"Upgrade\");\n\nexport interface UpgradeOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n mark?: Computable<boolean | string>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canAfford?: Computable<boolean>;\n onPurchase?: VoidFunction;\n}\n\nexport interface BaseUpgrade extends Persistent<boolean> {\n id: string;\n bought: Ref<boolean>;\n canPurchase: Ref<boolean>;\n purchase: VoidFunction;\n type: typeof UpgradeType;\n [Component]: typeof UpgradeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Upgrade<T extends UpgradeOptions> = Replace<\n T & BaseUpgrade,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n cost: GetComputableType<T[\"cost\"]>;\n canAfford: GetComputableTypeWithDefault<T[\"canAfford\"], Ref<boolean>>;\n }\n>;\n\nexport type GenericUpgrade = Replace<\n Upgrade<UpgradeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createUpgrade<T extends UpgradeOptions>(\n optionsFunc: OptionsFunc<T, Upgrade<T>, BaseUpgrade>\n): Upgrade<T> {\n return createLazyProxy(persistent => {\n const upgrade = Object.assign(persistent, optionsFunc());\n upgrade.id = getUniqueID(\"upgrade-\");\n upgrade.type = UpgradeType;\n upgrade[Component] = UpgradeComponent;\n\n if (upgrade.canAfford == null && (upgrade.resource == null || upgrade.cost == null)) {\n console.warn(\n \"Error: can't create upgrade without a canAfford property or a resource and cost property\",\n upgrade\n );\n }\n\n upgrade.bought = upgrade[PersistentState];\n if (upgrade.canAfford == null) {\n upgrade.canAfford = computed(() => {\n const genericUpgrade = upgrade as GenericUpgrade;\n return (\n genericUpgrade.resource != null &&\n genericUpgrade.cost != null &&\n Decimal.gte(genericUpgrade.resource.value, unref(genericUpgrade.cost))\n );\n });\n } else {\n processComputable(upgrade as T, \"canAfford\");\n }\n upgrade.canPurchase = computed(\n () =>\n unref((upgrade as GenericUpgrade).visibility) === Visibility.Visible &&\n unref((upgrade as GenericUpgrade).canAfford) &&\n !unref(upgrade.bought)\n );\n upgrade.purchase = function () {\n const genericUpgrade = upgrade as GenericUpgrade;\n if (!unref(genericUpgrade.canPurchase)) {\n return;\n }\n if (genericUpgrade.resource != null && genericUpgrade.cost != null) {\n genericUpgrade.resource.value = Decimal.sub(\n genericUpgrade.resource.value,\n unref(genericUpgrade.cost)\n );\n }\n genericUpgrade[PersistentState].value = true;\n genericUpgrade.onPurchase?.();\n };\n\n processComputable(upgrade as T, \"visibility\");\n setDefault(upgrade, \"visibility\", Visibility.Visible);\n processComputable(upgrade as T, \"classes\");\n processComputable(upgrade as T, \"style\");\n processComputable(upgrade as T, \"display\");\n processComputable(upgrade as T, \"mark\");\n processComputable(upgrade as T, \"cost\");\n processComputable(upgrade as T, \"resource\");\n\n upgrade[GatherProps] = function (this: GenericUpgrade) {\n const {\n display,\n visibility,\n style,\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n };\n };\n\n return upgrade as unknown as Upgrade<T>;\n }, persistent<boolean>(false));\n}\n\nexport function setupAutoPurchase(\n layer: GenericLayer,\n autoActive: Computable<boolean>,\n upgrades: GenericUpgrade[] = []\n): void {\n upgrades = upgrades || findFeatures(layer, UpgradeType);\n const isAutoActive = isFunction(autoActive) ? computed(autoActive) : autoActive;\n layer.on(\"update\", () => {\n if (unref(isAutoActive)) {\n upgrades.forEach(upgrade => upgrade.purchase());\n }\n });\n}\n","import Slider from \"components/fields/Slider.vue\";\nimport Text from \"components/fields/Text.vue\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport Column from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport Sticky from \"components/layout/Sticky.vue\";\nimport VerticalRule from \"components/layout/VerticalRule.vue\";\nimport Modal from \"components/Modal.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport themes from \"data/themes\";\nimport { createBar, Direction } from \"features/bars/bar\";\nimport { createBuyable } from \"features/buyable\";\nimport { createChallenge } from \"features/challenges/challenge\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport {\n addSoftcap,\n createCumulativeConversion,\n createPolynomialScaling\n} from \"features/conversion\";\nimport { jsx, showIf, Visibility } from \"features/feature\";\nimport { createHotkey } from \"features/hotkey\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createLinks } from \"features/links/links\";\nimport { createMilestone } from \"features/milestones/milestone\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource, trackBest } from \"features/resources/resource\";\nimport Resource from \"features/resources/Resource.vue\";\nimport { createTab } from \"features/tabs/tab\";\nimport { createTabFamily } from \"features/tabs/tabFamily\";\nimport { addTooltip, TooltipDirection } from \"features/tooltips/tooltip\";\nimport {\n createResourceTooltip,\n createTree,\n createTreeNode,\n GenericTreeNode,\n TreeBranch\n} from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\nimport {\n createAdditiveModifier,\n createExponentialModifier,\n createModifierSection,\n createSequentialModifier\n} from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal, { format, formatWhole } from \"util/bignum\";\nimport { render, renderCol, renderRow } from \"util/vue\";\nimport { computed, ComputedRef, ref } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"c\";\nconst layer = createLayer(id, () => {\n const color = \"#4BDC13\";\n const name = \"Candies\";\n const points = createResource<DecimalSource>(0, \"lollipops\");\n const best = trackBest(points);\n const beep = persistent<boolean>(false);\n const thingy = persistent<string>(\"pointy\");\n const otherThingy = persistent<number>(10);\n const spentOnBuyables = persistent(new Decimal(10));\n\n const waffleBoost = computed(() => Decimal.pow(points.value, 0.2));\n const icecreamCap = computed(() => Decimal.times(points.value, 10));\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" },\n color: \"rgb(75, 220, 19)\"\n }));\n\n const lollipopMilestone3 = createMilestone(() => ({\n shouldEarn() {\n return Decimal.gte(best.value, 3);\n },\n display: {\n requirement: \"3 Lollipops\",\n effectDisplay: \"Unlock the next milestone\"\n }\n }));\n const lollipopMilestone4 = createMilestone(() => ({\n visibility() {\n return showIf(lollipopMilestone3.earned.value);\n },\n shouldEarn() {\n return Decimal.gte(best.value, 4);\n },\n display: {\n requirement: \"4 Lollipops\",\n effectDisplay: \"You can toggle beep and boop (which do nothing)\",\n optionsDisplay: jsx(() => (\n <>\n <Toggle\n title=\"beep\"\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Toggle\n title=\"boop\"\n onUpdate:modelValue={value => (f.boop.value = value)}\n modelValue={f.boop.value}\n />\n </>\n ))\n },\n style() {\n if (this.earned) {\n return { backgroundColor: \"#1111DD\" };\n }\n return {};\n }\n }));\n const lollipopMilestones = [lollipopMilestone3, lollipopMilestone4];\n\n const funChallenge = createChallenge(() => ({\n title: \"Fun\",\n completionLimit: 3,\n display() {\n return {\n description: `Makes the game 0% harder<br>${formatWhole(this.completions.value)}/${\n this.completionLimit\n } completions`,\n goal: \"Have 20 points I guess\",\n reward: \"Says hi\",\n effectDisplay: format(funEffect.value) + \"x\"\n };\n },\n visibility() {\n return showIf(Decimal.gt(best.value, 0));\n },\n goal: 20,\n resource: main.points,\n onComplete() {\n console.log(\"hiii\");\n },\n onEnter() {\n main.points.value = 0;\n main.best.value = main.points.value;\n main.total.value = main.points.value;\n console.log(\"So challenging\");\n },\n onExit() {\n console.log(\"Sweet freedom!\");\n },\n style: {\n height: \"200px\"\n }\n }));\n const funEffect = computed(() => Decimal.add(points.value, 1).tetrate(0.02));\n\n const generatorUpgrade = createUpgrade(() => ({\n display: {\n title: \"Generator of Genericness\",\n description: \"Gain 1 point every second\"\n },\n cost: 1,\n resource: points\n }));\n const lollipopMultiplierUpgrade = createUpgrade(() => ({\n display: () => ({\n description: \"Point generation is faster based on your unspent Lollipops\",\n effectDisplay: `${format(lollipopMultiplierEffect.value)}x`\n }),\n cost: 1,\n resource: points,\n visibility: () => showIf(generatorUpgrade.bought.value)\n }));\n const lollipopMultiplierEffect = computed(() => {\n let ret = Decimal.add(points.value, 1).pow(0.5);\n if (ret.gte(\"1e20000000\")) ret = ret.sqrt().times(\"1e10000000\");\n return ret;\n });\n const unlockIlluminatiUpgrade = createUpgrade(() => ({\n visibility() {\n return showIf(lollipopMultiplierUpgrade.bought.value);\n },\n canAfford() {\n return Decimal.lt(main.points.value, 7);\n },\n onPurchase() {\n main.points.value = Decimal.add(main.points.value, 7);\n },\n display:\n \"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.\",\n style() {\n if (this.bought) {\n return { backgroundColor: \"#1111dd\" };\n }\n if (!this.canAfford) {\n return { backgroundColor: \"#dd1111\" };\n }\n return {};\n }\n }));\n const quasiUpgrade = createUpgrade(() => ({\n resource: createResource(exhancers.amount, \"Exhancers\", 0),\n cost: 3,\n display: {\n title: \"This upgrade doesn't exist\",\n description: \"Or does it?\"\n }\n }));\n const upgrades = [generatorUpgrade, lollipopMultiplierUpgrade, unlockIlluminatiUpgrade];\n\n const exhancers = createBuyable(() => ({\n resource: points,\n cost() {\n let x = new Decimal(this.amount.value);\n if (x.gte(25)) {\n x = x.pow(2).div(25);\n }\n const cost = Decimal.pow(2, x.pow(1.5));\n return cost.floor();\n },\n display() {\n return {\n title: \"Exhancers\",\n description: `Adds ${format(\n thingEffect.value\n )} things and multiplies stuff by ${format(stuffEffect.value)}.`\n };\n },\n onPurchase(cost) {\n spentOnBuyables.value = Decimal.add(spentOnBuyables.value, cost);\n },\n style: { height: \"222px\" },\n purchaseLimit: 4\n }));\n // The following need redundant ComputedRef<Decimal> type annotations because otherwise the ts\n // interpreter thinks exhancers are cyclically referenced\n const thingEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const stuffEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const confirmRespec = persistent<boolean>(false);\n const confirming = ref(false);\n const respecBuyables = createClickable(() => ({\n small: true,\n display: \"Respec Thingies\",\n onClick() {\n if (confirmRespec.value && !confirming.value) {\n confirming.value = true;\n return;\n }\n\n points.value = Decimal.add(points.value, spentOnBuyables.value);\n exhancers.amount.value = 0;\n main.tree.reset(treeNode);\n }\n }));\n const sellExhancer = createClickable(() => ({\n small: true,\n display: \"Sell One\",\n onClick() {\n if (Decimal.lte(exhancers.amount.value, 0)) {\n return;\n }\n exhancers.amount.value = Decimal.sub(exhancers.amount.value, 1);\n points.value = Decimal.add(points.value, exhancers.cost.value);\n spentOnBuyables.value = Decimal.sub(spentOnBuyables.value, exhancers.cost.value);\n }\n }));\n const buyablesDisplay = jsx(() => (\n <Column>\n <Row>\n <Toggle\n title=\"Confirm\"\n onUpdate:modelValue={value => (confirmRespec.value = value)}\n modelValue={confirmRespec.value}\n />\n {renderRow(respecBuyables)}\n </Row>\n {renderRow(exhancers)}\n {renderRow(sellExhancer)}\n <Modal\n modelValue={confirming.value}\n onUpdate:modelValue={value => (confirming.value = value)}\n v-slots={{\n header: () => <h2>Confirm Respec</h2>,\n body: () => <>Are you sure? Respeccing these doesn't accomplish much</>,\n footer: () => (\n <div class=\"modal-default-footer\">\n <div class=\"modal-default-flex-grow\"></div>\n <button\n class=\"button modal-default-button\"\n onClick={() => (confirming.value = false)}\n >\n Cancel\n </button>\n <button\n class=\"button modal-default-button danger\"\n onClick={() => {\n respecBuyables.onClick();\n confirming.value = false;\n }}\n >\n Respec\n </button>\n </div>\n )\n }}\n />\n </Column>\n ));\n\n const longBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FFFFFF\" },\n baseStyle: { backgroundColor: \"#696969\" },\n textStyle: { color: \"#04e050\" },\n direction: Direction.Right,\n width: 300,\n height: 30,\n progress() {\n return Decimal.add(main.points.value, 1).log(10).div(10).toNumber();\n },\n display() {\n return format(main.points.value) + \" / 1e10 points\";\n }\n }));\n const tallBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#4BEC13\" },\n baseStyle: { backgroundColor: \"#000000\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n borderStyle: { borderWidth: \"7px\" },\n direction: Direction.Up,\n width: 50,\n height: 200,\n progress() {\n return Decimal.div(main.points.value, 100);\n },\n display() {\n return formatWhole(Decimal.div(main.points.value, 1).min(100)) + \"%\";\n }\n }));\n const flatBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FE0102\" },\n baseStyle: { backgroundColor: \"#222222\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n direction: Direction.Up,\n width: 100,\n height: 30,\n progress() {\n return Decimal.div(points.value, 50);\n }\n }));\n\n const conversion = createCumulativeConversion(() => ({\n scaling: addSoftcap(createPolynomialScaling(10, 0.5), 1e100, 0.5),\n baseResource: main.points,\n gainResource: points,\n roundUpCost: true,\n gainModifier: createSequentialModifier(\n createExponentialModifier(2, \"Because I felt like it\"),\n createAdditiveModifier(1, \"Nice modifier\")\n )\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const hotkeys = [\n createHotkey(() => ({\n key: \"c\",\n description: \"reset for lollipops or whatever\",\n onPress() {\n if (resetButton.canClick.value) {\n resetButton.onClick();\n }\n }\n })),\n createHotkey(() => ({\n key: \"ctrl+c\",\n description: \"respec things\",\n onPress() {\n respecBuyables.onClick();\n }\n }))\n ];\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n mark: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n tooltip() {\n let tooltip = displayResource(points);\n if (Decimal.gt(exhancers.amount.value, 0)) {\n tooltip += `<br><i><br><br><br>${formatWhole(\n exhancers.amount.value\n )} Exhancers</i>`;\n }\n return tooltip;\n },\n style: {\n color: \"#3325CC\",\n textDecoration: \"underline\"\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n style: {\n color: \"#AA66AA\"\n },\n resetDescription: \"Melt your points into \"\n }));\n addTooltip(resetButton, {\n display: jsx(() =>\n createModifierSection(\n \"Modifiers\",\n \"\",\n conversion.gainModifier,\n conversion.scaling.currentGain(conversion)\n )\n ),\n pinnable: true,\n direction: TooltipDirection.DOWN,\n style: \"width: 400px; text-align: left\"\n });\n\n const g = createTreeNode(() => ({\n display: \"TH\",\n color: \"#6d3678\",\n canClick() {\n return Decimal.gte(main.points.value, 10);\n },\n tooltip: \"Thanos your points\",\n onClick() {\n main.points.value = Decimal.div(main.points.value, 2);\n console.log(\"Thanos'd\");\n },\n glowColor() {\n if (Decimal.eq(exhancers.amount.value, 1)) {\n return \"orange\";\n }\n return \"\";\n }\n }));\n const h = createTreeNode(() => ({\n display: \"h\",\n color() {\n return themes[settings.theme].variables[\"--locked\"];\n },\n tooltip: {\n display: computed(() => `Restore your points to ${format(otherThingy.value)}`),\n right: true\n },\n canClick() {\n return Decimal.lt(main.points.value, otherThingy.value);\n },\n onClick() {\n main.points.value = otherThingy.value;\n }\n }));\n const spook = createTreeNode(() => ({\n visibility: Visibility.Hidden\n }));\n const tree = createTree(() => ({\n nodes(): GenericTreeNode[][] {\n return [\n [f.treeNode, treeNode],\n [g, spook, h]\n ];\n },\n branches(): TreeBranch[] {\n return [\n {\n startNode: f.treeNode,\n endNode: treeNode,\n \"stroke-width\": \"25px\",\n stroke: \"green\",\n style: {\n filter: \"blur(5px)\"\n }\n },\n { startNode: treeNode, endNode: g },\n { startNode: g, endNode: h }\n ];\n }\n }));\n\n const links = createLinks(() => ({\n links: [\n {\n startNode: h,\n endNode: flatBoi,\n \"stroke-width\": \"5px\",\n stroke: \"red\",\n offsetEnd: { x: -50 + 100 * flatBoi.progress.value.toNumber(), y: 0 }\n }\n ]\n }));\n\n const illuminatiTabs = createTabFamily(\n {\n first: () => ({\n tab: jsx(() => (\n <>\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n <div>confirmed</div>\n </>\n )),\n display: \"first\"\n }),\n second: () => ({\n tab: f.display,\n display: \"second\"\n })\n },\n () => ({\n style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n })\n );\n\n const tabs = createTabFamily({\n mainTab: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n <MainDisplay\n resource={points}\n color={color}\n effectDisplay={`which are boosting waffles by ${format(\n waffleBoost.value\n )} and increasing the Ice Cream cap by ${format(icecreamCap.value)}`}\n />\n <Sticky>{render(resetButton)}</Sticky>\n <Resource resource={points} color={color} />\n <Spacer height=\"5px\" />\n <button onClick={() => console.log(\"yeet\")}>'HI'</button>\n <div>Name your points!</div>\n <Text\n modelValue={thingy.value}\n onUpdate:modelValue={value => (thingy.value = value)}\n />\n <Sticky style=\"color: red; font-size: 32px; font-family: Comic Sans MS;\">\n I have {displayResource(main.points)} {thingy.value} points!\n </Sticky>\n <hr />\n {renderCol(...lollipopMilestones)}\n <Spacer />\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n {renderRow(funChallenge)}\n </>\n ))\n })),\n display: \"main tab\",\n glowColor() {\n if (\n generatorUpgrade.canPurchase.value ||\n lollipopMultiplierUpgrade.canPurchase.value ||\n unlockIlluminatiUpgrade.canPurchase.value ||\n funChallenge.canComplete.value\n ) {\n return \"blue\";\n }\n return \"\";\n },\n style: { color: \"orange\" }\n }),\n thingies: () => ({\n tab: createTab(() => ({\n style() {\n return { backgroundColor: \"#222222\", \"--background\": \"#222222\" };\n },\n display: jsx(() => (\n <>\n {render(buyablesDisplay)}\n <Spacer />\n <Row style=\"width: 600px; height: 350px; background-color: green; border-style: solid;\">\n <Toggle\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Spacer width=\"30px\" height=\"10px\" />\n <div>\n <span>Beep</span>\n </div>\n <Spacer />\n <VerticalRule height=\"200px\" />\n </Row>\n <Spacer />\n <img src=\"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\" />\n </>\n ))\n })),\n glowColor: \"white\",\n display: \"thingies\",\n style: { borderColor: \"orange\" }\n }),\n jail: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n {render(coolInfo)}\n {render(longBoi)}\n <Spacer />\n <Row>\n <Column style=\"background-color: #555555; padding: 15px\">\n <div style=\"color: teal\">Sugar level:</div>\n <Spacer />\n {render(tallBoi)}\n </Column>\n <Spacer />\n <Column>\n <div>idk</div>\n <Spacer width=\"0\" height=\"50px\" />\n {render(flatBoi)}\n </Column>\n </Row>\n <Spacer />\n <div>It's jail because \"bars\"! So funny! Ha ha!</div>\n {render(tree)}\n </>\n ))\n })),\n display: \"jail\"\n }),\n illuminati: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n // This should really just be <> and </>, however for some reason the\n // typescript interpreter can't figure out this layer and f.tsx otherwise\n <div>\n <h1> C O N F I R M E D </h1>\n <Spacer />\n {render(illuminatiTabs)}\n <div>Adjust how many points H gives you!</div>\n <Slider\n onUpdate:modelValue={value => (otherThingy.value = value)}\n modelValue={otherThingy.value}\n min={1}\n max={30}\n />\n </div>\n )),\n style: {\n backgroundColor: \"#3325CC\"\n }\n })),\n visibility() {\n return showIf(unlockIlluminatiUpgrade.bought.value);\n },\n display: \"illuminati\"\n })\n });\n\n return {\n id,\n color,\n name,\n points,\n best,\n beep,\n thingy,\n otherThingy,\n spentOnBuyables,\n waffleBoost,\n icecreamCap,\n coolInfo,\n lollipopMilestones,\n funChallenge,\n funEffect,\n generatorUpgrade,\n lollipopMultiplierUpgrade,\n lollipopMultiplierEffect,\n unlockIlluminatiUpgrade,\n quasiUpgrade,\n exhancers,\n respecBuyables,\n sellExhancer,\n bars: { tallBoi, longBoi, flatBoi },\n tree,\n g,\n h,\n spook,\n conversion,\n reset,\n hotkeys,\n treeNode,\n resetButton,\n confirmRespec,\n minWidth: 800,\n tabs,\n display: jsx(() => (\n <>\n {render(tabs)}\n {render(links)}\n </>\n ))\n };\n});\n\nexport default layer;\n","import Spacer from \"components/layout/Spacer.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport { createPolynomialScaling, createIndependentConversion } from \"features/conversion\";\nimport { jsx } from \"features/feature\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createParticles } from \"features/particles/particles\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource } from \"features/resources/resource\";\nimport { addTooltip } from \"features/tooltips/tooltip\";\nimport { createResourceTooltip } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { createMultiplicativeModifier } from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { ref } from \"vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst id = \"f\";\nconst layer = createLayer(id, () => {\n const color = \"#FE0102\";\n const name = \"Farms\";\n const points = createResource<DecimalSource>(0, \"farm points\");\n const boop = persistent<boolean>(false);\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" }\n }));\n\n const clickableState = persistent<string>(\"Start\");\n const clickable = createClickable(() => ({\n display() {\n return {\n title: \"Clicky clicky!\",\n description: \"Current state:<br>\" + clickableState.value\n };\n },\n initialState: \"Start\",\n canClick() {\n return clickableState.value !== \"Borkened...\";\n },\n onClick(e) {\n switch (clickableState.value) {\n case \"Start\":\n clickableState.value = \"A new state!\";\n break;\n case \"A new state!\":\n clickableState.value = \"Keep going!\";\n break;\n case \"Keep going!\":\n clickableState.value = \"Maybe that's a bit too far...\";\n break;\n case \"Maybe that's a bit too far...\":\n const pos = e == undefined ? undefined : \"touches\" in e ? e.touches[0] : e;\n const confettiParticles = Object.assign({}, confetti, {\n pos: {\n x: (pos?.clientX ?? 0) - (particles.boundingRect?.value?.left ?? 0),\n y: (pos?.clientY ?? 0) - (particles.boundingRect?.value?.top ?? 0)\n }\n });\n particles.addEmitter(confettiParticles).then(e => e.playOnceAndDestroy());\n clickableState.value = \"Borkened...\";\n break;\n default:\n clickableState.value = \"Start\";\n break;\n }\n },\n onHold() {\n console.log(\"Clickkkkk...\");\n },\n style() {\n switch (clickableState.value) {\n case \"Start\":\n return { \"background-color\": \"green\" };\n case \"A new state!\":\n return { \"background-color\": \"yellow\" };\n case \"Keep going!\":\n return { \"background-color\": \"orange\" };\n case \"Maybe that's a bit too far...\":\n return { \"background-color\": \"red\" };\n default:\n return {};\n }\n }\n }));\n\n const resetClickable = createClickable(() => ({\n onClick() {\n if (clickableState.value == \"Borkened...\") {\n clickableState.value = \"Start\";\n }\n },\n display() {\n return clickableState.value == \"Borkened...\" ? \"Fix the clickable!\" : \"Does nothing\";\n },\n small: true\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const conversion = createIndependentConversion(() => ({\n scaling: createPolynomialScaling(10, 0.5),\n baseResource: main.points,\n gainResource: points,\n modifyGainAmount: createMultiplicativeModifier(c.otherThingy)\n }));\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n tooltip() {\n if (treeNode.canClick.value) {\n return `${displayResource(points)} ${points.displayName}`;\n }\n return `This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${displayResource(\n main.points\n )}`;\n },\n canClick() {\n return Decimal.gte(main.points.value, 10);\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n display: jsx(() => {\n if (resetButton.conversion.buyMax) {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you{\" \"}\n <b>{formatWhole(resetButton.conversion.currentGain.value)}</b> Farm Points\n in exchange for all of your points and lollipops! (You'll get another one at{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n } else {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange\n for all of your points and lollipops! (At least{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n }\n })\n }));\n\n const particles = createParticles(() => ({\n boundingRect: ref<null | DOMRect>(null),\n onContainerResized(boundingRect) {\n this.boundingRect.value = boundingRect;\n },\n style: \"z-index: 2\"\n }));\n\n const tab = jsx(() => (\n <>\n {render(coolInfo)}\n <MainDisplay resource={points} color={color} />\n {render(resetButton)}\n <div>You have {formatWhole(conversion.baseResource.value)} points</div>\n <div>\n <br />\n <img src=\"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390\" />\n <div>Bork Bork!</div>\n </div>\n <Spacer />\n {renderRow(resetClickable)}\n {renderRow(clickable)}\n {render(particles)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n boop,\n coolInfo,\n clickable,\n clickableState,\n reset,\n conversion,\n treeNode,\n resetButton,\n display: tab\n };\n});\n\nexport default layer;\n","import Row from \"components/layout/Row.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { main } from \"data/projEntry\";\nimport { createAchievement } from \"features/achievements/achievement\";\nimport { jsx } from \"features/feature\";\nimport { createGrid } from \"features/grids/grid\";\nimport { createResource } from \"features/resources/resource\";\nimport { createTreeNode } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { computed } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"a\";\nconst layer = createLayer(id, () => {\n const color = \"yellow\";\n const name = \"Achievements\";\n const points = createResource<DecimalSource>(0, \"achievement power\");\n\n const treeNode = createTreeNode(() => ({\n display: \"A\",\n color,\n tooltip: {\n display: \"Achievements\",\n right: true\n },\n onClick() {\n main.showAchievements();\n }\n }));\n\n const ach1 = createAchievement(() => ({\n image: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n display: \"Get me!\",\n tooltip: computed(() => {\n if (ach1.earned.value) {\n return \"You did it!\";\n }\n return \"How did this happen?\";\n }),\n shouldEarn: () => true\n }));\n const ach2 = createAchievement(() => ({\n display: \"Impossible!\",\n tooltip: computed(() => {\n if (ach2.earned.value) {\n return \"HOW????\";\n }\n return \"Mwahahaha!\";\n }),\n style: { color: \"#04e050\" }\n }));\n const ach3 = createAchievement(() => ({\n display: \"EIEIO\",\n tooltip:\n \"Get a farm point.\\n\\nReward: The dinosaur is now your friend (you can max Farm Points).\",\n shouldEarn: function () {\n return Decimal.gte(f.points.value, 1);\n },\n onComplete() {\n console.log(\"Bork bork bork!\");\n }\n }));\n const achievements = [ach1, ach2, ach3];\n\n const grid = createGrid(() => ({\n rows: 2,\n cols: 2,\n getStartState(id) {\n return id;\n },\n getStyle(id, state) {\n return { backgroundColor: `#${(Number(state) * 1234) % 999999}` };\n },\n // TODO display should return an object\n getTitle(id) {\n let direction = \"\";\n if (id === \"101\") {\n direction = \"top\";\n } else if (id === \"102\") {\n direction = \"bottom\";\n } else if (id === \"201\") {\n direction = \"left\";\n } else if (id === \"202\") {\n direction = \"right\";\n }\n return jsx(() => (\n <Tooltip display={JSON.stringify(this.cells[id].style)} {...{ [direction]: true }}>\n <h3>Gridable #{id}</h3>\n </Tooltip>\n ));\n },\n getDisplay(id, state) {\n return String(state);\n },\n getCanClick() {\n return Decimal.eq(main.points.value, 10);\n },\n onClick(id, state) {\n this.cells[id].state = Number(state) + 1;\n }\n }));\n\n const display = jsx(() => (\n <>\n <Row>\n <Tooltip display={ach1.tooltip} bottom>\n {render(ach1)}\n </Tooltip>\n <Tooltip display={ach2.tooltip} bottom>\n {render(ach2)}\n </Tooltip>\n <Tooltip display={ach3.tooltip} bottom>\n {render(ach3)}\n </Tooltip>\n </Row>\n {renderRow(grid)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n achievements,\n grid,\n treeNode,\n display\n };\n});\n\nexport default layer;\n","import Profectus from \"components/Profectus.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport { jsx } from \"features/feature\";\nimport { createResource, trackBest, trackOOMPS, trackTotal } from \"features/resources/resource\";\nimport { branchedResetPropagation, createTree, GenericTree } from \"features/trees/tree\";\nimport { globalBus } from \"game/events\";\nimport { createLayer, GenericLayer, setupLayerModal } from \"game/layers\";\nimport player, { PlayerData } from \"game/player\";\nimport Decimal, { DecimalSource, format, formatTime } from \"util/bignum\";\nimport { render } from \"util/vue\";\nimport { computed, toRaw } from \"vue\";\nimport a from \"./layers/aca/a\";\nimport c from \"./layers/aca/c\";\nimport f from \"./layers/aca/f\";\n\n/**\n * @hidden\n */\nexport const main = createLayer(\"main\", () => {\n const points = createResource<DecimalSource>(10);\n const best = trackBest(points);\n const total = trackTotal(points);\n\n const pointGain = computed(() => {\n if (!c.generatorUpgrade.bought.value) return new Decimal(0);\n let gain = new Decimal(3.19);\n if (c.lollipopMultiplierUpgrade.bought.value)\n gain = gain.times(c.lollipopMultiplierEffect.value);\n return gain;\n });\n globalBus.on(\"update\", diff => {\n points.value = Decimal.add(points.value, Decimal.times(pointGain.value, diff));\n });\n const oomps = trackOOMPS(points, pointGain);\n\n const { openModal, modal } = setupLayerModal(a);\n\n // Note: Casting as generic tree to avoid recursive type definitions\n const tree = createTree(() => ({\n nodes: [[c.treeNode], [f.treeNode, c.spook]],\n leftSideNodes: [a.treeNode, c.h],\n branches: [\n {\n startNode: f.treeNode,\n endNode: c.treeNode,\n stroke: \"blue\",\n \"stroke-width\": \"25px\",\n style: {\n filter: \"blur(5px)\"\n }\n }\n ],\n onReset() {\n points.value = toRaw(this.resettingNode.value) === toRaw(c.treeNode) ? 0 : 10;\n best.value = points.value;\n total.value = points.value;\n },\n resetPropagation: branchedResetPropagation\n })) as GenericTree;\n\n // Note: layers don't _need_ a reference to everything,\n // but I'd recommend it over trying to remember what does and doesn't need to be included.\n // Officially all you need are anything with persistency or that you want to access elsewhere\n return {\n name: \"Tree\",\n display: jsx(() => (\n <>\n {player.devSpeed === 0 ? <div>Game Paused</div> : null}\n {player.devSpeed && player.devSpeed !== 1 ? (\n <div>Dev Speed: {format(player.devSpeed || 0)}x</div>\n ) : null}\n {player.offlineTime != undefined ? (\n <div>Offline Time: {formatTime(player.offlineTime || 0)}</div>\n ) : null}\n <div>\n {Decimal.lt(points.value, \"1e1000\") ? <span>You have </span> : null}\n <h2>{format(points.value)}</h2>\n {Decimal.lt(points.value, \"1e1e6\") ? <span> points</span> : null}\n </div>\n {Decimal.gt(pointGain.value, 0) ? <div>({oomps.value})</div> : null}\n <Spacer />\n <button onClick={openModal}>open achievements</button>\n {render(modal)}\n {render(tree)}\n <Profectus height=\"200px\" style=\"margin: 10px auto; display: block\" />\n </>\n )),\n points,\n best,\n total,\n oomps,\n tree,\n showAchievements: openModal\n };\n});\n\nexport const getInitialLayers = (\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars */\n player: Partial<PlayerData>\n): Array<GenericLayer> => [main, f, c, a];\n\nexport const hasWon = computed(() => {\n return Decimal.gt(main.points.value, 25);\n});\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport function fixOldSave(\n oldVersion: string | undefined,\n player: Partial<PlayerData>\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n): void {}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import Modal from \"components/Modal.vue\";\nimport {\n CoercableComponent,\n OptionsFunc,\n jsx,\n JSXFunction,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { createNanoEvents, Emitter } from \"nanoevents\";\nimport { InjectionKey, Ref, ref, unref } from \"vue\";\nimport { globalBus } from \"./events\";\nimport { Persistent, persistent } from \"./persistence\";\nimport player from \"./player\";\n\nexport interface FeatureNode {\n rect: DOMRect;\n observer: MutationObserver;\n element: HTMLElement;\n}\n\nexport const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =\n Symbol(\"RegisterNode\");\nexport const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =\n Symbol(\"UnregisterNode\");\nexport const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =\n Symbol(\"Nodes\");\n\nexport interface LayerEvents {\n // Generation\n preUpdate: (diff: number) => void;\n // Actions (e.g. automation)\n update: (diff: number) => void;\n // Effects (e.g. milestones)\n postUpdate: (diff: number) => void;\n}\n\nexport const layers: Record<string, Readonly<GenericLayer> | undefined> = {};\nwindow.layers = layers;\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--layer-color\"?: string;\n }\n}\n\nexport interface Position {\n x: number;\n y: number;\n}\n\nexport interface LayerOptions {\n color?: Computable<string>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n name?: Computable<string>;\n minimizable?: Computable<boolean>;\n forceHideGoBack?: Computable<boolean>;\n minWidth?: Computable<number | string>;\n}\n\nexport interface BaseLayer {\n id: string;\n minimized: Persistent<boolean>;\n emitter: Emitter<LayerEvents>;\n on: OmitThisParameter<Emitter<LayerEvents>[\"on\"]>;\n emit: <K extends keyof LayerEvents>(event: K, ...args: Parameters<LayerEvents[K]>) => void;\n nodes: Ref<Record<string, FeatureNode | undefined>>;\n}\n\nexport type Layer<T extends LayerOptions> = Replace<\n T & BaseLayer,\n {\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n name: GetComputableTypeWithDefault<T[\"name\"], string>;\n minWidth: GetComputableTypeWithDefault<T[\"minWidth\"], 600>;\n minimizable: GetComputableTypeWithDefault<T[\"minimizable\"], true>;\n forceHideGoBack: GetComputableType<T[\"forceHideGoBack\"]>;\n }\n>;\n\nexport type GenericLayer = Replace<\n Layer<LayerOptions>,\n {\n name: ProcessedComputable<string>;\n minWidth: ProcessedComputable<number>;\n minimizable: ProcessedComputable<boolean>;\n }\n>;\n\nexport const persistentRefs: Record<string, Set<Persistent>> = {};\nexport const addingLayers: string[] = [];\nexport function createLayer<T extends LayerOptions>(\n id: string,\n optionsFunc: OptionsFunc<T, BaseLayer, BaseLayer>\n): Layer<T> {\n return createLazyProxy(() => {\n const layer = {} as T & Partial<BaseLayer>;\n const emitter = (layer.emitter = createNanoEvents<LayerEvents>());\n layer.on = emitter.on.bind(emitter);\n layer.emit = emitter.emit.bind(emitter);\n layer.nodes = ref({});\n layer.id = id;\n\n addingLayers.push(id);\n persistentRefs[id] = new Set();\n layer.minimized = persistent(false);\n Object.assign(layer, optionsFunc.call(layer));\n if (\n addingLayers[addingLayers.length - 1] == null ||\n addingLayers[addingLayers.length - 1] !== id\n ) {\n throw `Adding layers stack in invalid state. This should not happen\\nStack: ${addingLayers}\\nTrying to pop ${layer.id}`;\n }\n addingLayers.pop();\n\n processComputable(layer as T, \"color\");\n processComputable(layer as T, \"display\");\n processComputable(layer as T, \"name\");\n setDefault(layer, \"name\", layer.id);\n processComputable(layer as T, \"minWidth\");\n setDefault(layer, \"minWidth\", 600);\n processComputable(layer as T, \"minimizable\");\n setDefault(layer, \"minimizable\", true);\n\n return layer as unknown as Layer<T>;\n });\n}\n\nexport function addLayer(\n layer: GenericLayer,\n player: { layers?: Record<string, Record<string, unknown>> }\n): void {\n console.info(\"Adding layer\", layer.id);\n if (layers[layer.id]) {\n console.error(\n \"Attempted to add layer with same ID as existing layer\",\n layer.id,\n layers[layer.id]\n );\n return;\n }\n\n setDefault(player, \"layers\", {});\n if (player.layers[layer.id] == null) {\n player.layers[layer.id] = {};\n }\n layers[layer.id] = layer;\n\n globalBus.emit(\"addLayer\", layer, player.layers[layer.id]);\n}\n\nexport function getLayer<T extends GenericLayer>(layerID: string): T {\n return layers[layerID] as T;\n}\n\nexport function removeLayer(layer: GenericLayer): void {\n console.info(\"Removing layer\", layer.id);\n globalBus.emit(\"removeLayer\", layer);\n\n layers[layer.id] = undefined;\n}\n\nexport function reloadLayer(layer: GenericLayer): void {\n removeLayer(layer);\n\n // Re-create layer\n addLayer(layer, player);\n}\n\nexport function setupLayerModal(layer: GenericLayer): {\n openModal: VoidFunction;\n modal: JSXFunction;\n} {\n const showModal = ref(false);\n return {\n openModal: () => (showModal.value = true),\n modal: jsx(() => (\n <Modal\n modelValue={showModal.value}\n onUpdate:modelValue={value => (showModal.value = value)}\n v-slots={{\n header: () => <h2>{unref(layer.name)}</h2>,\n body: unref(layer.display)\n }}\n />\n ))\n };\n}\n\nglobalBus.on(\"update\", function updateLayers(diff) {\n Object.values(layers).forEach(layer => {\n layer?.emit(\"preUpdate\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"update\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"postUpdate\", diff);\n });\n});\n","import Col from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport {\n CoercableComponent,\n Component as ComponentKey,\n GatherProps,\n GenericComponent,\n JSXFunction,\n Visibility\n} from \"features/feature\";\nimport {\n Component,\n computed,\n ComputedRef,\n DefineComponent,\n defineComponent,\n isRef,\n onUnmounted,\n PropType,\n ref,\n Ref,\n ShallowRef,\n shallowRef,\n unref,\n watchEffect\n} from \"vue\";\nimport { DoNotCache, ProcessedComputable } from \"./computed\";\n\nexport function coerceComponent(\n component: CoercableComponent,\n defaultWrapper = \"span\"\n): DefineComponent {\n if (typeof component === \"function\") {\n return defineComponent({ render: component });\n }\n if (typeof component === \"string\") {\n if (component.length > 0) {\n component = component.trim();\n if (component.charAt(0) !== \"<\") {\n component = `<${defaultWrapper}>${component}</${defaultWrapper}>`;\n }\n\n return defineComponent({ template: component });\n }\n return defineComponent({ render: () => ({}) });\n }\n return component;\n}\n\nexport type VueFeature = {\n [ComponentKey]: GenericComponent;\n [GatherProps]: () => Record<string, unknown>;\n};\n\nexport function render(object: VueFeature | CoercableComponent): JSX.Element | DefineComponent {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n return coerceComponent(object);\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRow(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(render)}</Row>;\n}\n\nexport function renderCol(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(render)}</Col>;\n}\n\nexport function renderJSX(object: VueFeature | CoercableComponent): JSX.Element {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n if (typeof object === \"string\") {\n return <>{object}</>;\n }\n // TODO why is object typed as never?\n const Comp = object as DefineComponent;\n return <Comp />;\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRowJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(renderJSX)}</Row>;\n}\n\nexport function renderColJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(renderJSX)}</Col>;\n}\n\nexport function isCoercableComponent(component: unknown): component is CoercableComponent {\n if (typeof component === \"string\") {\n return true;\n } else if (typeof component === \"object\") {\n if (component == null) {\n return false;\n }\n return \"render\" in component || \"component\" in component;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } else if (typeof component === \"function\" && (component as any)[DoNotCache] === true) {\n return true;\n }\n return false;\n}\n\nexport function setupHoldToClick(\n onClick?: Ref<((e?: MouseEvent | TouchEvent) => void) | undefined>,\n onHold?: Ref<VoidFunction | undefined>\n): {\n start: (e: MouseEvent | TouchEvent) => void;\n stop: VoidFunction;\n handleHolding: VoidFunction;\n} {\n const interval = ref<null | number>(null);\n const event = ref<MouseEvent | TouchEvent | undefined>(undefined);\n\n function start(e: MouseEvent | TouchEvent) {\n if (!interval.value) {\n interval.value = setInterval(handleHolding, 250);\n }\n event.value = e;\n }\n function stop() {\n if (interval.value) {\n clearInterval(interval.value);\n interval.value = null;\n }\n }\n function handleHolding() {\n if (onHold && onHold.value) {\n onHold.value();\n } else if (onClick && onClick.value) {\n onClick.value(event.value);\n }\n }\n\n onUnmounted(stop);\n\n return { start, stop, handleHolding };\n}\n\nexport function getFirstFeature<T extends { visibility: ProcessedComputable<Visibility> }>(\n features: T[],\n filter: (feature: T) => boolean\n): { firstFeature: Ref<T | undefined>; hiddenFeatures: Ref<T[]> } {\n const filteredFeatures = computed(() =>\n features.filter(\n feature => unref(feature.visibility) === Visibility.Visible && filter(feature)\n )\n );\n return {\n firstFeature: computed(() => filteredFeatures.value[0]),\n hiddenFeatures: computed(() => filteredFeatures.value.slice(1))\n };\n}\n\nexport function computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\"> {\n const comp = shallowRef<Component | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\" | null> {\n const comp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(component);\n comp.value = currComponent == null ? null : coerceComponent(currComponent, defaultWrapper);\n });\n return comp;\n}\n\nexport function wrapRef<T>(ref: Ref<ProcessedComputable<T>>): ComputedRef<T> {\n return computed(() => unwrapRef(ref));\n}\n\nexport function unwrapRef<T>(ref: Ref<ProcessedComputable<T>>): T {\n return unref<T>(unref(ref));\n}\n\nexport function setRefValue<T>(ref: Ref<T | Ref<T>>, value: T) {\n if (isRef(ref.value)) {\n ref.value.value = value;\n } else {\n ref.value = value;\n }\n}\n\nexport type PropTypes =\n | typeof Boolean\n | typeof String\n | typeof Number\n | typeof Function\n | typeof Object\n | typeof Array;\n// TODO Unfortunately, the typescript engine gives up on typing completely when you use this method,\n// Even though it has the same typing as when doing it manually\nexport function processedPropType<T>(...types: PropTypes[]): PropType<ProcessedComputable<T>> {\n if (!types.includes(Object)) {\n types.push(Object);\n }\n return types as PropType<ProcessedComputable<T>>;\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot } from \"vue\"\n\nimport {\n RegisterNodeInjectionKey,\n UnregisterNodeInjectionKey,\n NodesInjectionKey,\n FeatureNode\n} from \"game/layers\";\nimport { nextTick, provide, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst nodes = ref<Record<string, FeatureNode | undefined>>({});\n\nexpose({ nodes });\n\nconst observerOptions = {\n attributes: true,\n childList: true,\n subtree: false\n};\n\nprovide(RegisterNodeInjectionKey, (id, element) => {\n const observer = new MutationObserver(() => updateNode(id));\n observer.observe(element, observerOptions);\n nodes.value[id] = { element, observer, rect: element.getBoundingClientRect() };\n nextTick(() => updateNode(id));\n});\nprovide(UnregisterNodeInjectionKey, id => {\n nodes.value[id]?.observer.disconnect();\n nodes.value[id] = undefined;\n});\nprovide(NodesInjectionKey, nodes);\n\nfunction updateNode(id: string) {\n const node = nodes.value[id];\n if (node == null) {\n return;\n }\n node.rect = node.element.getBoundingClientRect();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return _renderSlot(_ctx.$slots, \"default\")\n}\n}\n\n})","import script from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withModifiers as _withModifiers, mergeProps as _mergeProps, withDirectives as _withDirectives, Transition as _Transition, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"onPointerdown\"]\nconst _hoisted_2 = { class: \"modal-wrapper\" }\nconst _hoisted_3 = { class: \"modal-container\" }\nconst _hoisted_4 = { class: \"modal-header\" }\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\" default header \")\nconst _hoisted_6 = { class: \"modal-body\" }\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" default body \")\nconst _hoisted_8 = { class: \"modal-footer\" }\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"modal-default-flex-grow\" }, null, -1)\n\nimport { FeatureNode } from \"game/layers\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Context from \"./Context.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { expose, emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n modelValue: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isOpen = computed(() => props.modelValue || isAnimating.value);\nfunction close() {\n emit(\"update:modelValue\", false);\n}\n\nconst isAnimating = ref(false);\n\nconst contextRef = ref<typeof Context | null>(null);\nconst nodes = computed<Record<string, FeatureNode | undefined> | null>(\n () => contextRef.value?.nodes ?? null\n);\n\nexpose({ isOpen, nodes });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"#modal-root\" }, [\n _createVNode(_Transition, {\n name: \"modal\",\n onBeforeEnter: _cache[0] || (_cache[0] = ($event: any) => (isAnimating.value = true)),\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (isAnimating.value = false))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", _mergeProps({\n class: \"modal-mask\",\n onPointerdown: _withModifiers(close, [\"self\"])\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"header\", { shown: _unref(isOpen) }, () => [\n _hoisted_5\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(Context, {\n ref_key: \"contextRef\",\n ref: contextRef\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"body\", { shown: _unref(isOpen) }, () => [\n _hoisted_7\n ])\n ]),\n _: 3\n }, 512)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _renderSlot(_ctx.$slots, \"footer\", { shown: _unref(isOpen) }, () => [\n _createElementVNode(\"div\", { class: \"modal-default-footer\" }, [\n _hoisted_9,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: close\n }, \" Close \")\n ])\n ])\n ])\n ])\n ])\n ], 16, _hoisted_1), [\n [_vShow, __props.modelValue]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","import script from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=d02c1f40&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\n\nimport \"components/common/fields.css\";\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { ref, toRef, watch } from \"vue\";\nimport VueNextSelect from \"vue-next-select\";\nimport \"vue-next-select/dist/index.css\";\n\nexport type SelectOption = { label: string; value: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n options: null,\n placeholder: null,\n closeOnSelect: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: unknown): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: unknown;\n options: SelectOption[];\n placeholder?: string;\n closeOnSelect?: boolean;\n}\n\n\n\n\nconst titleComponent = computeOptionalComponent(toRef(props, \"title\"), \"span\");\n\nconst value = ref<SelectOption | undefined>(\n props.options.find(option => option.value === props.modelValue)\n);\nwatch(toRef(props, \"modelValue\"), modelValue => {\n if (value.value?.value !== modelValue) {\n value.value = props.options.find(option => option.value === modelValue);\n }\n});\n\nfunction onUpdate(value: SelectOption) {\n emit(\"update:modelValue\", value.value);\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(VueNextSelect), {\n options: __props.options,\n modelValue: value.value,\n \"onUpdate:modelValue\": [\n _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onUpdate\n ],\n min: 1,\n \"label-by\": \"label\",\n placeholder: __props.placeholder,\n \"close-on-select\": __props.closeOnSelect\n }, null, 8, [\"options\", \"modelValue\", \"placeholder\", \"close-on-select\"])\n ]))\n}\n}\n\n})","import script from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=0f1110ed&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, isRef as _isRef, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, createElementVNode as _createElementVNode, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8bda704a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onSubmit\"]\nconst _hoisted_2 = { class: \"field\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_4 = [\"placeholder\"]\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, onMounted, ref, toRefs, unref } from \"vue\";\nimport VueTextareaAutosize from \"vue-textarea-autosize\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n textArea: { type: Boolean },\n placeholder: null,\n maxHeight: null\n },\n emits: [\"update:modelValue\", \"submit\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: string): void;\n (e: \"submit\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: CoercableComponent;\n modelValue?: string;\n textArea?: boolean;\n placeholder?: string;\n maxHeight?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst titleComponent = computed(\n () => props.title?.value && coerceComponent(unref(props.title.value), \"span\")\n);\n\nconst field = ref<HTMLElement | null>(null);\nonMounted(() => {\n field.value?.focus();\n});\n\nconst value = computed({\n get() {\n return unref(props.modelValue) || \"\";\n },\n set(value: string) {\n emit(\"update:modelValue\", value);\n }\n});\n\nfunction submit() {\n emit(\"submit\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"form\", {\n onSubmit: _withModifiers(submit, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n (__props.textArea)\n ? (_openBlock(), _createBlock(_unref(VueTextareaAutosize), {\n key: 1,\n modelValue: _unref(value),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n maxHeight: __props.maxHeight,\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 8, [\"modelValue\", \"placeholder\", \"maxHeight\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"input\", {\n key: 2,\n type: \"text\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n class: _normalizeClass({ fullWidth: !__props.title }),\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 42, _hoisted_4)), [\n [_vModelText, _unref(value)]\n ])\n ])\n ], 40, _hoisted_1))\n}\n}\n\n})","import script from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Text.vue?vue&type=style&index=0&id=8bda704a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8bda704a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, isRef as _isRef, vModelCheckbox as _vModelCheckbox, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43cf95d0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: boolean;\n}\n\n\n\n\nconst component = computed(() => coerceComponent(unref(props.title) || \"<span></span>\", \"span\"));\n\nconst value = computed({\n get() {\n return !!props.modelValue;\n },\n set(value: boolean) {\n emit(\"update:modelValue\", value);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"checkbox\",\n class: \"toggle\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null))\n }, null, 512), [\n [_vModelCheckbox, _unref(value)]\n ]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n ]))\n}\n}\n\n})","import script from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Toggle.vue?vue&type=style&index=0&id=43cf95d0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43cf95d0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"col\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-adb5f26e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"material-icons pinned\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tooltip-container\", { shown: _ctx.isShown }]),\n onMouseenter: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHovered = true)),\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHovered = false)),\n onClickCapture: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.togglePinned && _ctx.togglePinned(...args)))\n }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, true),\n (_ctx.elementComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.elementComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_ctx.isShown)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tooltip\", {\n top: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.UP,\n left: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.LEFT,\n right: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.RIGHT,\n bottom: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.DOWN,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_ctx.showPin)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"push_pin\"))\n : _createCommentVNode(\"\", true),\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 1 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport themes from \"data/themes\";\nimport { CoercableComponent, jsx, StyleValue } from \"features/feature\";\nimport { Persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport {\n coerceComponent,\n computeOptionalComponent,\n processedPropType,\n render,\n unwrapRef,\n VueFeature\n} from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\nimport { TooltipDirection } from \"./tooltip\";\n\nexport default defineComponent({\n props: {\n element: processedPropType<VueFeature>(Object),\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n direction: processedPropType<TooltipDirection>(Number),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n pinned: Object as PropType<Persistent<boolean>>\n },\n setup(props) {\n const { element, display, pinned } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(pinned) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n const elementComp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(element);\n elementComp.value =\n currComponent == null\n ? null\n : coerceComponent(jsx(() => render(currComponent) as JSX.Element));\n });\n\n function togglePinned(e: MouseEvent) {\n const isPinned = pinned as unknown as Persistent<boolean> | undefined; // Vue typing :/\n if (e.shiftKey && isPinned) {\n isPinned.value = !isPinned.value;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n const showPin = computed(() => unwrapRef(pinned) && themes[settings.theme].showPin);\n\n return {\n TooltipDirection,\n isHovered,\n isShown,\n comp,\n elementComp,\n unref,\n togglePinned,\n showPin\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=adb5f26e&scoped=true&ts=true\"\nimport script from \"./Tooltip.vue?vue&type=script&lang=ts\"\nexport * from \"./Tooltip.vue?vue&type=script&lang=ts\"\n\nimport \"./Tooltip.vue?vue&type=style&index=0&id=adb5f26e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-adb5f26e\"]])\n\nexport default __exports__","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 7634;\nmodule.exports = webpackEmptyContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkprofectus\"] = self[\"webpackChunkprofectus\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(6098); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["Themes","defaultTheme","variables","floatingTabs","mergeAdjacent","showPin","classic","paper","nordic","aqua","Visibility","Component","Symbol","GatherProps","id","getUniqueID","prefix","jsx","func","showIf","condition","otherwise","None","Visible","setDefault","object","key","value","undefined","findFeatures","obj","type","objects","handleObject","Object","keys","forEach","push","isRef","TooltipDirection","addTooltip","element","options","pinnable","pinned","console","error","UP","elementComponent","elementGratherProps","bind","display","this","classes","style","direction","xoffset","yoffset","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","startGameLoop","watch","PersistentState","DefaultValue","StackTrace","Deleted","getStackTrace","Error","stack","split","slice","map","line","trim","join","persistent","defaultValue","ref","addingLayers","warn","persistentRefs","add","layer","saveData","features","path","foundPersistent","delete","persistentState","reduce","acc","curr","savedValue","isReactive","includes","foundPersistentInChild","clear","state","reactive","devSpeed","name","tabs","time","autosave","offlineProd","offlineTime","timePlayed","keepGoing","modID","modVersion","layers","stringifySave","player","JSON","stringify","unref","playerHandler","get","target","Proxy","set","property","receiver","isNaN","sign","mag","currentValue","ownKeys","Reflect","has","getOwnPropertyDescriptor","window","active","saves","showTPS","theme","unthrottled","loadSettings","item","localStorage","getItem","settings","parse","decodeURIComponent","escape","atob","assign","setItem","btoa","unescape","encodeURIComponent","deep","hardResetSettings","settingFields","registerSettingField","component","infoComponents","registerInfoComponent","gameComponents","shallowReactive","lastTenTicks","hasNaN","NaNPath","render","_ctx","_cache","$props","$setup","$data","$options","_component_Context","class","color","showGoBack","onClick","goBack","minimized","$event","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","width","parseInt","tabValue","flexGrow","flexShrink","flexBasis","margin","__exports__","_withScopeId","n","_hoisted_1","_hoisted_2","open","__props","expose","isOpen","Modal","modelValue","header","body","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","href","_hoisted_13","_hoisted_14","changelog","_props","title","logo","author","discordName","discordLink","versionNumber","versionTitle","infoComponent","openChangelog","src","alt","shown","themes","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","Toggle","enablePausing","disabled","skipConfirm","emits","isConfirming","click","cancel","confirming","$slots","left","activated","activatedTimeout","clearTimeout","setTimeout","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","save","dateFormat","Intl","DateTimeFormat","year","month","day","hour","minute","second","isEditing","newName","isActive","currentTime","changeName","FeedbackButton","DangerButton","onConfirmingChanged","format","Text","onSubmit","modal","importingFailed","saveToImport","playerData","e","bankContext","bank","cachedSaves","getCachedSave","exportSave","saveToExport","el","document","createElement","appendChild","select","setSelectionRange","execCommand","removeChild","duplicateSave","deleteSave","removeItem","openSave","newFromPreset","preset","editSave","currSave","ref_key","list","handle","itemKey","Save","onOpen","onExport","onEditName","onDuplicate","onDelete","footer","placeholder","length","closeOnSelect","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","info","savesManager","useHeader","banner","openDiscord","$attrs","Tooltip","DOWN","RIGHT","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","ref_for","Nav","Layer","$refs","playAgain","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","gameComponent","Game","TPS","GameOverScreen","NaNScreen","log","vue","createApp","App","mount","MAX_SIGNIFICANT_DIGITS","EXP_LIMIT","LAYER_DOWN","log10","FIRST_NEG_LAYER","NUMBER_EXP_MAX","NUMBER_EXP_MIN","MAX_ES_IN_A_ROW","IGNORE_COMMAS","COMMAS_ARE_DECIMAL_POINTS","powerOf10","powersOf10","i","for","indexOf0InPowersOf10","power","critical_headers","E","critical_tetr_values","critical_slog_values","D","Decimal","fromValue_noAlloc","FC","fromComponents","FC_NN","fromComponents_noNormalize","decimalPlaces","places","len","numDigits","ceil","abs","rounded","pow","parseFloat","toFixed","f_maglog10","f_gamma","trunc","NEGATIVE_INFINITY","scal1","l","n2","np","exp","OMEGA","f_lambertw","z","w","wn","tol","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","lt","fromDecimal","fromNumber","fromString","man","floor","residue","exponent","fromMantissaExponent","POSITIVE_INFINITY","m","other","times","neg","eq","gte","lte","absmag","signmag","normalize","mantissa","replace","pentationparts","heightparts","payload","result","pentate","tetrationparts","tetrate","base","height","powparts","toLowerCase","ptparts","parts","ecount","numberAttempt","newparts","charAt","layerstring","chrcode","charCodeAt","substr","me","repeat","toExponential","toStringWithDecimalPlaces","a","b","decimal","maxabs","cmpabs","layera","layerb","magdiff","newmag","recip","dNaN","cmp","tolerance","eq_tolerance","cmp_tolerance","magA","magB","neq_tolerance","log2","absLog10","pow10","gamma","t","lm","adj","l2","sqrt","this_num","negln","lambertw","iteratedlog","oldheight","fracheight","old_payload","next_payload","tetrate_critical","minus","plus","layeradd10","layeradd","fulltimes","fraction","layerloss","dNegOne","copy","slog_critical","slogthis","slog","slogdest","lnx","sin","cos","tan","asin","acos","atan","negate","sinh","cosh","sqr","ascensions","root","fromMantissaExponent_noNormalize","fromValue","reciprocate","notEquals","minabs","clamp","clampMin","clampMax","notEquals_tolerance","lt_tolerance","lte_tolerance","gt_tolerance","gte_tolerance","pLog10","logarithm","_other","factorial","lngamma","cube","cbrt","iteratedexp","ssqrt","resourcesAvailable","priceStart","priceRatio","currentOwned","affordGeometricSeries_core","numItems","sumGeometricSeries_core","priceAdd","affordArithmeticSeries_core","sumArithmeticSeries_core","cost","currentRpS","deltaRpS","efficiencyOfPurchase_core","maxLayers","random","randomsign","randomexp","randommag","actualStart","b2","critical_section","grid","lower","upper","basefrac","frac","MAX_VALUE","MIN_VALUE","decimalOne","exponentialFormat","num","precision","eString","defaultDecimalsShown","commaFormat","init","portions","regularFormat","eeee1000","e100000","e1000","e9","e6","e3","nearOne","thousandth","zero","small","defaultShowSmall","invertOOM","val","formatWhole","formatTime","seconds","toPlaces","x","maxAccepted","formatSmall","camelToTitle","camel","toUpperCase","isPlainObject","prototype","call","isFunction","DoNotCache","processComputable","computable","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","baseObject","calculated","calculateObj","setupInitialStore","stringifiedSave","load","loadSave","newSave","playerObj","removeLayer","addLayer","fixOldSave","getInitialLayers","onbeforeunload","hardReset","onInit","onContainerResized","onHotReload","app","resizeObserver","ResizeObserver","updateBounds","inject","NodesInjectionKey","resizeListener","onMounted","resListener","observe","resizeTo","backgroundAlpha","view","module","hot","status","onBeforeUnmount","destroy","isDirty","values","filter","node","rect","getBoundingClientRect","resize","fonts","ready","then","xmlns","viewBox","d","appear","script","createResource","displayName","resource","trackBest","best","amount","trackTotal","total","prevAmount","tetra8","e100","trackOOMPS","pointGain","oomps","oompsMag","lastPoints","prev","oompsString","displayResource","overrideAmount","_component_Links","nodesComp","leftNodesComp","rightNodesComp","branches","links","link","startNode","endNode","boundingRect","startPosition","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","updateNodes","validLinks","Link","leftSideNodes","rightSideNodes","Links","shallowRef","currNodes","row","_component_MarkNode","_component_Node","visibility","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","onHold","MarkNode","Node","isCoercableComponent","TreeNodeType","TreeType","createTreeNode","optionsFunc","TreeNode","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","createResourceTooltip","requiredResource","requirement","req","backgroundImage","earned","image","feature","achievement","locked","bought","getNotifyStyle","strength","transform","borderColor","zIndex","getHighNotifyStyle","use","toast","AchievementType","createAchievement","Achievement","complete","shouldEarn","genericAchievement","onComplete","Display","_component_GridCell","rows","cols","col","gatherCellProps","cells","tile","titleComponent","GridCell","cell","createGridProxy","getGridHandler","getCellHandler","configurable","enumerable","writable","cache","prop","getState","createGrid","Grid","getID","startState","setState","clickable","currDisplay","Title","Description","description","ClickableType","createClickable","Clickable","createResetButton","resetButton","resetDescription","conversion","gainResource","actualGain","minimumGain","buyMax","baseResource","nextAt","currentAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","currentGain","gain","gainModifier","apply","scaling","current","roundUpCost","next","createPolynomialScaling","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","ParticlesType","createParticles","particles","Particles","addEmitter","config","genericParticles","Promise","resolve","stage","emittersToAdd","upgradeConfig","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","createAdditiveModifier","addend","enabled","processedAddend","processedDescription","processedEnabled","createMultiplicativeModifier","multiplier","processedMultiplier","createExponentialModifier","processedExponent","createSequentialModifier","modifiers","modifier","reduceRight","createModifierSection","subtitle","unit","fullWidth","top","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","normalizedProgress","progressNumber","Direction","Up","clipPath","Down","Right","Left","Default","BarType","createBar","Bar","BuyableType","createBuyable","buyable","canPurchase","canAfford","genericBuyable","purchaseLimit","maxed","currClasses","purchase","onPurchase","CurrDisplay","EffectDisplay","amountDisplay","notifyStyle","challenge","done","completed","canStart","toggle","buttonText","canComplete","currActive","currCanComplete","Goal","goal","Reward","reward","ChallengeType","createChallenge","completions","Challenge","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","shiftKey","ctrlKey","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","OptionsDisplay","optionsDisplay","MilestoneDisplay","MilestoneType","createMilestone","Milestone","All","Configurable","Incomplete","genericMilestone","msDisplayOptions","option","TabType","createTab","Tab","selectTab","glowColorStyle","floating","_component_TabButton","_component_Sticky","tabClasses","tabStyle","button","onSelectTab","selected","activeTab","gatherButtonProps","Sticky","TabButton","currActiveTab","TabButtonType","TabFamilyType","createTabFamily","tabFamily","TabFamily","parsedTabs","tabButton","processedTabFamily","firstTab","find","upgrade","currCost","UpgradeType","createUpgrade","Upgrade","genericUpgrade","createLayer","points","beep","thingy","otherThingy","spentOnBuyables","waffleBoost","icecreamCap","coolInfo","lollipopMilestone3","lollipopMilestone4","f","boop","lollipopMilestones","funChallenge","funEffect","main","generatorUpgrade","lollipopMultiplierUpgrade","lollipopMultiplierEffect","ret","unlockIlluminatiUpgrade","quasiUpgrade","exhancers","upgrades","thingEffect","stuffEffect","confirmRespec","respecBuyables","sellExhancer","buyablesDisplay","longBoi","tallBoi","textShadow","borderWidth","flatBoi","tooltip","textDecoration","g","h","right","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","confettiParticles","clientX","clientY","playOnceAndDestroy","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","setupLayerModal","openModal","toRaw","showAchievements","oldVersion","emitter","on","Set","pop","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","renderJSX","Comp","setupHoldToClick","interval","event","handleHolding","computeComponent","unwrapRef","computeOptionalComponent","currComponent","wrapRef","processedPropType","types","observerOptions","attributes","childList","subtree","updateNode","provide","MutationObserver","disconnect","isAnimating","close","to","onBeforeEnter","onAfterLeave","onPointerdown","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","isShown","onMouseenter","isHovered","onClickCapture","togglePinned","elementComp","LEFT","bottom","isPinned","stopPropagation","webpackEmptyContext","code","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","definition","o","defineProperty","globalThis","hmd","create","children","hasOwnProperty","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app-legacy.9714db0a.js.map b/js/app-legacy.9714db0a.js.map deleted file mode 100644 index 1e58a6b..0000000 --- a/js/app-legacy.9714db0a.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/app-legacy.9714db0a.js","mappings":"yFA4DYA,E,UA3BNC,EAAsB,CACxBC,UAAW,CACP,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,OACxB,uBAAwB,sBACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,gBAAiB,OACjB,WAAY,UACZ,WAAY,mBACZ,SAAU,UACV,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UAEb,kBAAmB,OACnB,iBAAkB,yBAClB,mBAAoB,OAExBC,cAAc,EACdC,eAAe,EACfC,SAAS,IAGb,SAAYL,GACR,uBACA,mBACA,qBACA,kBAJJ,CAAYA,IAAAA,EAAM,KAOlB,QACIM,QAASL,EACTM,OAAO,kBACAN,GADF,IAEDC,WAAW,kBACJD,EAAaC,WADX,IAEL,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,UACb,kBAAmB,MACnB,iBAAkB,GAClB,mBAAoB,QAExBC,cAAc,IAGlBK,QAAQ,kBACDP,GADD,IAEFC,WAAW,kBACJD,EAAaC,WADX,IAEL,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,gBAAiB,UACjB,WAAY,UACZ,WAAY,UACZ,SAAU,UACV,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,kBAAmB,MACnB,iBAAkB,oBAClB,mBAAoB,QAExBC,cAAc,IAEl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AAmBjtC,KAAO2sC,EAAqB9rC,KAAK,KAAMosC,EAAmBjtC,KAAKa,KAAKosC,I,GC/CvF,IAAIE,EAAsBvC,EAAoBM,OAAE3rC,EAAW,CAAC,MAAM,WAAa,OAAOqrC,EAAoB,SAC1GuC,EAAsBvC,EAAoBM,EAAEiC,I","sources":["webpack://profectus/./src/data/themes.ts","webpack://profectus/./src/features/feature.ts","webpack://profectus/./src/features/tooltips/tooltip.ts","webpack://profectus/./src/game/events.ts","webpack://profectus/./src/game/persistence.ts","webpack://profectus/./src/game/player.ts","webpack://profectus/./src/game/settings.ts","webpack://profectus/./src/game/state.ts","webpack://profectus/./src/components/Layer.vue?55f8","webpack://profectus/./src/components/Layer.vue?ea1e","webpack://profectus/./src/components/Layer.vue","webpack://profectus/./src/data/Changelog.vue?6b26","webpack://profectus/./src/data/Changelog.vue","webpack://profectus/./src/components/Info.vue?962a","webpack://profectus/./src/components/Info.vue","webpack://profectus/./src/components/Options.vue?ba84","webpack://profectus/./src/components/Options.vue","webpack://profectus/./src/components/fields/DangerButton.vue?bf6c","webpack://profectus/./src/components/fields/DangerButton.vue","webpack://profectus/./src/components/fields/FeedbackButton.vue?2dba","webpack://profectus/./src/components/fields/FeedbackButton.vue","webpack://profectus/./src/components/Save.vue?548a","webpack://profectus/./src/components/Save.vue","webpack://profectus/./src/components/SavesManager.vue?f8a3","webpack://profectus/./src/components/SavesManager.vue","webpack://profectus/./src/components/Nav.vue?b4a5","webpack://profectus/./src/components/Nav.vue","webpack://profectus/./src/components/Game.vue?fa24","webpack://profectus/./src/components/Game.vue","webpack://profectus/./src/components/GameOverScreen.vue?ee8d","webpack://profectus/./src/components/GameOverScreen.vue","webpack://profectus/./src/components/NaNScreen.vue?4f64","webpack://profectus/./src/components/NaNScreen.vue","webpack://profectus/./src/components/TPS.vue?e36e","webpack://profectus/./src/components/TPS.vue","webpack://profectus/./src/App.vue?94f9","webpack://profectus/./src/App.vue","webpack://profectus/./src/main.ts","webpack://profectus/./src/lib/break_eternity.ts","webpack://profectus/./src/util/break_eternity.ts","webpack://profectus/./src/util/bignum.ts","webpack://profectus/./src/util/common.ts","webpack://profectus/./src/util/computed.ts","webpack://profectus/./src/util/proxies.ts","webpack://profectus/./src/util/save.ts","webpack://profectus/./src/features/particles/Particles.vue?11ca","webpack://profectus/./src/components/Profectus.vue","webpack://profectus/./src/components/Profectus.vue?94a9","webpack://profectus/./src/components/layout/Spacer.vue?e0bd","webpack://profectus/./src/components/layout/Spacer.vue","webpack://profectus/./src/features/resources/resource.ts","webpack://profectus/./src/features/trees/Tree.vue?d942","webpack://profectus/./src/features/links/Link.vue?f30b","webpack://profectus/./src/features/links/Link.vue","webpack://profectus/./src/features/links/Links.vue?7529","webpack://profectus/./src/features/links/Links.vue","webpack://profectus/./src/features/trees/Tree.vue?698b","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/TreeNode.vue?a4eb","webpack://profectus/./src/components/Node.vue?6bf5","webpack://profectus/./src/components/Node.vue","webpack://profectus/./src/components/MarkNode.vue?acb3","webpack://profectus/./src/components/MarkNode.vue","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?3070","webpack://profectus/./src/features/achievements/Achievement.vue?dcde","webpack://profectus/./src/features/achievements/Achievement.vue","webpack://profectus/./src/game/notifications.ts","webpack://profectus/./src/features/achievements/achievement.tsx","webpack://profectus/./src/features/grids/Grid.vue?6522","webpack://profectus/./src/features/grids/GridCell.vue?534f","webpack://profectus/./src/features/grids/GridCell.vue?58b8","webpack://profectus/./src/features/grids/GridCell.vue","webpack://profectus/./src/features/grids/Grid.vue?3299","webpack://profectus/./src/features/grids/Grid.vue","webpack://profectus/./src/features/grids/grid.ts","webpack://profectus/./src/features/clickables/Clickable.vue?3312","webpack://profectus/./src/features/clickables/Clickable.vue?22aa","webpack://profectus/./src/features/clickables/Clickable.vue","webpack://profectus/./src/features/clickables/clickable.ts","webpack://profectus/./src/data/common.tsx","webpack://profectus/./src/features/conversion.ts","webpack://profectus/./src/features/infoboxes/Infobox.vue?b869","webpack://profectus/./src/features/infoboxes/Infobox.vue?c704","webpack://profectus/./src/features/infoboxes/Infobox.vue","webpack://profectus/./src/features/infoboxes/infobox.ts","webpack://profectus/./src/features/particles/Particles.vue?8e41","webpack://profectus/./src/features/particles/Particles.vue","webpack://profectus/./src/features/particles/particles.tsx","webpack://profectus/./src/features/reset.ts","webpack://profectus/./src/features/resources/Resource.vue?0822","webpack://profectus/./src/features/resources/Resource.vue","webpack://profectus/./src/features/resources/MainDisplay.vue?8bde","webpack://profectus/./src/features/resources/MainDisplay.vue","webpack://profectus/./src/game/modifiers.tsx","webpack://profectus/./src/components/fields/Slider.vue?f27e","webpack://profectus/./src/components/fields/Slider.vue","webpack://profectus/./src/components/layout/Sticky.vue?32f6","webpack://profectus/./src/components/layout/Sticky.vue","webpack://profectus/./src/components/layout/VerticalRule.vue?aaf3","webpack://profectus/./src/components/layout/VerticalRule.vue","webpack://profectus/./src/features/bars/Bar.vue?b455","webpack://profectus/./src/features/bars/Bar.vue?da91","webpack://profectus/./src/features/bars/Bar.vue","webpack://profectus/./src/features/bars/bar.ts","webpack://profectus/./src/features/buyable.tsx","webpack://profectus/./src/features/challenges/Challenge.vue?43ae","webpack://profectus/./src/features/challenges/Challenge.vue?5ee1","webpack://profectus/./src/features/challenges/Challenge.vue","webpack://profectus/./src/features/challenges/challenge.tsx","webpack://profectus/./src/features/hotkey.tsx","webpack://profectus/./src/features/links/links.ts","webpack://profectus/./src/features/milestones/Milestone.vue?08ca","webpack://profectus/./src/features/milestones/Milestone.vue?d607","webpack://profectus/./src/features/milestones/Milestone.vue","webpack://profectus/./src/features/milestones/milestone.tsx","webpack://profectus/./src/features/tabs/Tab.vue?50ee","webpack://profectus/./src/features/tabs/Tab.vue","webpack://profectus/./src/features/tabs/tab.ts","webpack://profectus/./src/features/tabs/TabButton.vue?4c84","webpack://profectus/./src/features/tabs/TabButton.vue?a3c5","webpack://profectus/./src/features/tabs/TabButton.vue","webpack://profectus/./src/features/tabs/TabFamily.vue?e12a","webpack://profectus/./src/features/tabs/TabFamily.vue?2385","webpack://profectus/./src/features/tabs/TabFamily.vue","webpack://profectus/./src/features/tabs/tabFamily.ts","webpack://profectus/./src/features/upgrades/Upgrade.vue?4075","webpack://profectus/./src/features/upgrades/Upgrade.vue?4a14","webpack://profectus/./src/features/upgrades/Upgrade.vue","webpack://profectus/./src/features/upgrades/upgrade.ts","webpack://profectus/./src/data/layers/aca/c.tsx","webpack://profectus/./src/data/layers/aca/f.tsx","webpack://profectus/./src/data/layers/aca/a.tsx","webpack://profectus/./src/data/projEntry.tsx","webpack://profectus/./src/game/layers.tsx","webpack://profectus/./src/util/vue.tsx","webpack://profectus/./src/components/Context.vue?2f6e","webpack://profectus/./src/components/Context.vue","webpack://profectus/./src/components/Modal.vue?1099","webpack://profectus/./src/components/Modal.vue","webpack://profectus/./src/components/fields/Select.vue?c5ab","webpack://profectus/./src/components/fields/Select.vue","webpack://profectus/./src/components/fields/Text.vue?ba89","webpack://profectus/./src/components/fields/Text.vue","webpack://profectus/./src/components/fields/Toggle.vue?20df","webpack://profectus/./src/components/fields/Toggle.vue","webpack://profectus/./src/components/layout/Column.vue?cbbe","webpack://profectus/./src/components/layout/Column.vue","webpack://profectus/./src/components/layout/Row.vue?506d","webpack://profectus/./src/components/layout/Row.vue","webpack://profectus/./src/features/tooltips/Tooltip.vue?8920","webpack://profectus/./src/features/tooltips/Tooltip.vue?9cc7","webpack://profectus/./src/features/tooltips/Tooltip.vue","webpack://profectus/|/\\.txt$/","webpack://profectus/webpack/bootstrap","webpack://profectus/webpack/runtime/chunk loaded","webpack://profectus/webpack/runtime/compat get default export","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/harmony module decorator","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/node module decorator","webpack://profectus/webpack/runtime/jsonp chunk loading","webpack://profectus/webpack/startup"],"sourcesContent":["export interface ThemeVars {\n \"--foreground\": string;\n \"--background\": string;\n \"--feature-foreground\": string;\n \"--tooltip-background\": string;\n \"--raised-background\": string;\n \"--points\": string;\n \"--locked\": string;\n \"--highlighted\": string;\n \"--bought\": string;\n \"--danger\": string;\n \"--link\": string;\n \"--outline\": string;\n \"--accent1\": string;\n \"--accent2\": string;\n \"--accent3\": string;\n \"--border-radius\": string;\n \"--modal-border\": string;\n \"--feature-margin\": string;\n}\n\nexport interface Theme {\n variables: ThemeVars;\n floatingTabs: boolean;\n mergeAdjacent: boolean;\n showPin: boolean;\n}\n\ndeclare module \"@vue/runtime-dom\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface CSSProperties extends Partial<ThemeVars> {}\n}\n\nconst defaultTheme: Theme = {\n variables: {\n \"--foreground\": \"#dfdfdf\",\n \"--background\": \"#0f0f0f\",\n \"--feature-foreground\": \"#eee\",\n \"--tooltip-background\": \"rgba(0, 0, 0, 0.75)\",\n \"--raised-background\": \"#0f0f0f\",\n \"--points\": \"#ffffff\",\n \"--locked\": \"#bf8f8f\",\n \"--highlighted\": \"#333\",\n \"--bought\": \"#77bf5f\",\n \"--danger\": \"rgb(220, 53, 69)\",\n \"--link\": \"#02f2f2\",\n \"--outline\": \"#dfdfdf\",\n \"--accent1\": \"#627a82\",\n \"--accent2\": \"#658262\",\n \"--accent3\": \"#7c6282\",\n\n \"--border-radius\": \"15px\",\n \"--modal-border\": \"solid 2px var(--color)\",\n \"--feature-margin\": \"0px\"\n },\n floatingTabs: true,\n mergeAdjacent: true,\n showPin: true\n};\n\nexport enum Themes {\n Classic = \"classic\",\n Paper = \"paper\",\n Nordic = \"nordic\",\n Aqua = \"aqua\"\n}\n\nexport default {\n classic: defaultTheme,\n paper: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--background\": \"#2a323d\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#333c4a\",\n \"--locked\": \"#3a3e45\",\n \"--bought\": \"#5C8A58\",\n \"--outline\": \"#333c4a\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n // Based on https://www.nordtheme.com\n nordic: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#D8DEE9\",\n \"--background\": \"#2E3440\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#3B4252\",\n \"--points\": \"#E5E9F0\",\n \"--locked\": \"#4c566a\",\n \"--highlighted\": \"#434c5e\",\n \"--bought\": \"#8FBCBB\",\n \"--danger\": \"#D08770\",\n \"--link\": \"#88C0D0\",\n \"--outline\": \"#3B4252\",\n \"--accent1\": \"#B48EAD\",\n \"--accent2\": \"#A3BE8C\",\n \"--accent3\": \"#EBCB8B\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"solid 2px #3B4252\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n aqua: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#bfdfff\",\n \"--background\": \"#001f3f\",\n \"--tooltip-background\": \"rgba(0, 15, 31, 0.75)\",\n \"--raised-background\": \"#001f3f\",\n \"--points\": \"#dfefff\",\n \"--locked\": \"#c4a7b3\",\n \"--outline\": \"#bfdfff\"\n }\n } as Theme\n} as Record<Themes, Theme>;\n","import { DefaultValue } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { DoNotCache, ProcessedComputable } from \"util/computed\";\nimport { CSSProperties, DefineComponent, isRef } from \"vue\";\n\nexport const Component = Symbol(\"Component\");\nexport const GatherProps = Symbol(\"GatherProps\");\n\nexport type JSXFunction = (() => JSX.Element) & { [DoNotCache]: true };\nexport type CoercableComponent = string | DefineComponent | JSXFunction;\nexport type StyleValue = string | CSSProperties | Array<string | CSSProperties>;\n\n// TODO if importing .vue components in .tsx can become type safe,\n// this type can probably be safely removed\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type GenericComponent = DefineComponent<any, any, any>;\n\nexport type FeatureComponent<T> = Omit<\n {\n [K in keyof T]: T[K] extends ProcessedComputable<infer S> ? S : T[K];\n },\n typeof Component | typeof DefaultValue\n>;\n\nexport type Replace<T, S> = S & Omit<T, keyof S>;\n\nexport type OptionsFunc<T, S = T, R = Record<string, unknown>> = () => T & ThisType<S> & Partial<R>;\n\nlet id = 0;\n// Get a unique ID to allow a feature to be found for creating branches\n// and any other uses requiring unique identifiers for each feature\n// IDs are gauranteed unique, but should not be saved as they are not\n// guaranteed to be persistent through updates and such\nexport function getUniqueID(prefix = \"feature-\"): string {\n return prefix + id++;\n}\n\nexport enum Visibility {\n Visible,\n Hidden,\n None\n}\n\nexport function jsx(func: () => JSX.Element | \"\"): JSXFunction {\n (func as Partial<JSXFunction>)[DoNotCache] = true;\n return func as JSXFunction;\n}\n\nexport function showIf(condition: boolean, otherwise = Visibility.None): Visibility {\n return condition ? Visibility.Visible : otherwise;\n}\n\nexport function setDefault<T, K extends keyof T>(\n object: T,\n key: K,\n value: T[K]\n): asserts object is Exclude<T, K> & Required<Pick<T, K>> {\n if (object[key] === undefined && value != undefined) {\n object[key] = value;\n }\n}\n\nexport function findFeatures(obj: Record<string, unknown>, type: symbol): unknown[] {\n const objects: unknown[] = [];\n const handleObject = (obj: Record<string, unknown>) => {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if ((value as Record<string, unknown>).type === type) {\n objects.push(value);\n } else if (!(value instanceof Decimal) && !isRef(value)) {\n handleObject(value as Record<string, unknown>);\n }\n }\n });\n };\n handleObject(obj);\n return objects;\n}\n","import TooltipComponent from \"./Tooltip.vue\";\nimport {\n CoercableComponent,\n Component,\n GatherProps,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { VueFeature } from \"util/vue\";\nimport { Ref } from \"vue\";\nimport { persistent } from \"game/persistence\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport enum TooltipDirection {\n UP,\n LEFT,\n RIGHT,\n DOWN\n}\n\nexport interface TooltipOptions {\n pinnable?: boolean;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n direction?: Computable<TooltipDirection>;\n xoffset?: Computable<string>;\n yoffset?: Computable<string>;\n}\n\nexport interface BaseTooltip {\n pinned?: Ref<boolean>;\n}\n\nexport type Tooltip<T extends TooltipOptions> = Replace<\n T & BaseTooltip,\n {\n pinnable: T[\"pinnable\"] extends undefined ? false : T[\"pinnable\"];\n pinned: T[\"pinnable\"] extends true ? Ref<boolean> : undefined;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n direction: GetComputableTypeWithDefault<T[\"direction\"], TooltipDirection.UP>;\n xoffset: GetComputableType<T[\"xoffset\"]>;\n yoffset: GetComputableType<T[\"yoffset\"]>;\n }\n>;\n\nexport type GenericTooltip = Replace<\n Tooltip<TooltipOptions>,\n {\n pinnable: boolean;\n pinned: Ref<boolean> | undefined;\n direction: ProcessedComputable<TooltipDirection>;\n }\n>;\n\nexport function addTooltip<T extends TooltipOptions>(\n element: VueFeature,\n options: T & ThisType<Tooltip<T>> & Partial<BaseTooltip>\n): Tooltip<T> {\n if (options.pinnable) {\n if (\"pinned\" in element) {\n console.error(\n \"Cannot add pinnable tooltip to element that already has a property called 'pinned'\"\n );\n options.pinnable = false;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element as any).pinned = options.pinned = persistent<boolean>(false);\n }\n }\n\n processComputable(options as T, \"display\");\n processComputable(options as T, \"classes\");\n processComputable(options as T, \"style\");\n processComputable(options as T, \"direction\");\n setDefault(options, \"direction\", TooltipDirection.UP);\n processComputable(options as T, \"xoffset\");\n processComputable(options as T, \"yoffset\");\n\n const elementComponent = element[Component];\n element[Component] = TooltipComponent;\n const elementGratherProps = element[GatherProps].bind(element);\n element[GatherProps] = function gatherTooltipProps(this: GenericTooltip) {\n const { display, classes, style, direction, xoffset, yoffset, pinned } = this;\n return {\n element: {\n [Component]: elementComponent,\n [GatherProps]: elementGratherProps\n },\n display,\n classes,\n style,\n direction,\n xoffset,\n yoffset,\n pinned\n };\n }.bind(options as GenericTooltip);\n\n return options as unknown as Tooltip<T>;\n}\n","import projInfo from \"data/projInfo.json\";\nimport Decimal from \"util/bignum\";\nimport { createNanoEvents } from \"nanoevents\";\nimport { App, Ref, watch } from \"vue\";\nimport { GenericLayer } from \"./layers\";\nimport player from \"./player\";\nimport settings, { Settings } from \"./settings\";\nimport state from \"./state\";\n\nexport interface GlobalEvents {\n addLayer: (layer: GenericLayer, saveData: Record<string, unknown>) => void;\n removeLayer: (layer: GenericLayer) => void;\n update: (diff: number, trueDiff: number) => void;\n loadSettings: (settings: Partial<Settings>) => void;\n gameWon: VoidFunction;\n setupVue: (vue: App) => void;\n}\n\nexport const globalBus = createNanoEvents<GlobalEvents>();\n\nlet intervalID: number | null = null;\n\n// Not imported immediately due to dependency cycles\n// This gets set during startGameLoop(), and will only be used in the update function\nlet hasWon: null | Ref<boolean> = null;\n\nfunction update() {\n const now = Date.now();\n let diff = (now - player.time) / 1e3;\n player.time = now;\n const trueDiff = diff;\n\n state.lastTenTicks.push(trueDiff);\n if (state.lastTenTicks.length > 10) {\n state.lastTenTicks = state.lastTenTicks.slice(1);\n }\n\n // Stop here if the game is paused on the win screen\n if (hasWon?.value && !player.keepGoing) {\n return;\n }\n // Stop here if the player had a NaN value\n if (state.hasNaN) {\n return;\n }\n\n diff = Math.max(diff, 0);\n\n if (player.devSpeed === 0) {\n return;\n }\n\n // Add offline time if any\n if (player.offlineTime != undefined) {\n if (Decimal.gt(player.offlineTime, projInfo.offlineLimit * 3600)) {\n player.offlineTime = projInfo.offlineLimit * 3600;\n }\n if (Decimal.gt(player.offlineTime, 0) && player.devSpeed !== 0) {\n const offlineDiff = Math.max(player.offlineTime / 10, diff);\n player.offlineTime = player.offlineTime - offlineDiff;\n diff += offlineDiff;\n } else if (player.devSpeed === 0) {\n player.offlineTime += diff;\n }\n if (!player.offlineProd || Decimal.lt(player.offlineTime, 0)) {\n player.offlineTime = null;\n }\n }\n\n // Cap at max tick length\n diff = Math.min(diff, projInfo.maxTickLength);\n\n // Apply dev speed\n if (player.devSpeed != undefined) {\n diff *= player.devSpeed;\n }\n\n if (!Number.isFinite(diff)) {\n diff = 1e308;\n }\n\n // Update\n if (Decimal.eq(diff, 0)) {\n return;\n }\n\n player.timePlayed += diff;\n if (!Number.isFinite(player.timePlayed)) {\n player.timePlayed = 1e308;\n }\n globalBus.emit(\"update\", diff, trueDiff);\n\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n if (intervalID != null) {\n clearInterval(intervalID);\n intervalID = null;\n }\n } else if (intervalID == null) {\n intervalID = setInterval(update, 50);\n }\n}\n\nexport async function startGameLoop() {\n hasWon = (await import(\"data/projEntry\")).hasWon;\n watch(hasWon, hasWon => {\n if (hasWon) {\n globalBus.emit(\"gameWon\");\n }\n });\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n } else {\n intervalID = setInterval(update, 50);\n }\n}\n","import { globalBus } from \"game/events\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { ProxyState } from \"util/proxies\";\nimport { isArray } from \"@vue/shared\";\nimport { isReactive, isRef, Ref, ref } from \"vue\";\nimport { addingLayers, GenericLayer, persistentRefs } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\nexport const StackTrace = Symbol(\"StackTrace\");\nexport const Deleted = Symbol(\"Deleted\");\n\n// Note: This is a union of things that should be safely stringifiable without needing\n// special processes for knowing what to load them in as\n// - Decimals aren't allowed because we'd need to know to parse them back.\n// - DecimalSources are allowed because the string is a valid value for them\nexport type State =\n | string\n | number\n | boolean\n | DecimalSource\n | { [key: string]: State }\n | { [key: number]: State };\n\nexport type Persistent<T extends State = State> = Ref<T> & {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n [StackTrace]: string;\n [Deleted]: boolean;\n};\n\nfunction getStackTrace() {\n return (\n new Error().stack\n ?.split(\"\\n\")\n .slice(3, 5)\n .map(line => line.trim())\n .join(\"\\n\") || \"\"\n );\n}\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): Persistent<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as Persistent<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n persistent[StackTrace] = getStackTrace();\n persistent[Deleted] = false;\n\n if (addingLayers.length === 0) {\n console.warn(\n \"Creating a persistent ref outside of a layer. This is not officially supported\",\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].add(persistent);\n }\n\n return persistent as Persistent<T>;\n}\n\nexport function deletePersistent(persistent: Persistent) {\n if (addingLayers.length === 0) {\n console.warn(\"Deleting a persistent ref outside of a layer. Ignoring...\", persistent);\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].delete(persistent);\n }\n persistent[Deleted] = true;\n}\n\nglobalBus.on(\"addLayer\", (layer: GenericLayer, saveData: Record<string, unknown>) => {\n const features: { type: typeof Symbol }[] = [];\n const handleObject = (obj: Record<string, unknown>, path: string[] = []): boolean => {\n let foundPersistent = false;\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if (PersistentState in value) {\n foundPersistent = true;\n if ((value as Persistent)[Deleted]) {\n console.warn(\n \"Deleted persistent ref present in returned object. Ignoring...\",\n value,\n \"\\nCreated at:\\n\" + (value as Persistent)[StackTrace]\n );\n return;\n }\n persistentRefs[layer.id].delete(\n ProxyState in value\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((value as any)[ProxyState] as Persistent)\n : (value as Persistent)\n );\n\n // Construct save path if it doesn't exist\n const persistentState = path.reduce<Record<string, unknown>>((acc, curr) => {\n if (!(curr in acc)) {\n acc[curr] = {};\n }\n return acc[curr] as Record<string, unknown>;\n }, saveData);\n\n // Cache currently saved value\n const savedValue = persistentState[key];\n // Add ref to save data\n persistentState[key] = (value as Persistent)[PersistentState];\n // Load previously saved value\n if (isReactive(persistentState)) {\n if (savedValue != null) {\n persistentState[key] = savedValue;\n } else {\n persistentState[key] = (value as Persistent)[DefaultValue];\n }\n } else {\n if (savedValue != null) {\n (persistentState[key] as Ref<unknown>).value = savedValue;\n } else {\n (persistentState[key] as Ref<unknown>).value = (value as Persistent)[\n DefaultValue\n ];\n }\n }\n } else if (\n !(value instanceof Decimal) &&\n !isRef(value) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !features.includes(value as { type: typeof Symbol })\n ) {\n if (typeof (value as { type: typeof Symbol }).type === \"symbol\") {\n features.push(value as { type: typeof Symbol });\n }\n\n // Continue traversing\n const foundPersistentInChild = handleObject(value as Record<string, unknown>, [\n ...path,\n key\n ]);\n\n // Show warning for persistent values inside arrays\n // TODO handle arrays better\n if (foundPersistentInChild) {\n if (isArray(value) && !isArray(obj)) {\n console.warn(\n \"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.\",\n ProxyState in obj\n ? (obj as Record<PropertyKey, unknown>)[ProxyState]\n : obj,\n key\n );\n } else {\n foundPersistent = true;\n }\n }\n }\n }\n });\n return foundPersistent;\n };\n handleObject(layer);\n persistentRefs[layer.id].forEach(persistent => {\n console.error(\n `Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n });\n persistentRefs[layer.id].clear();\n});\n","import Decimal from \"util/bignum\";\nimport { isPlainObject } from \"util/common\";\nimport { ProxiedWithState, ProxyPath, ProxyState } from \"util/proxies\";\nimport { reactive, unref } from \"vue\";\nimport transientState from \"./state\";\n\nexport interface PlayerData {\n id: string;\n devSpeed: number | null;\n name: string;\n tabs: Array<string>;\n time: number;\n autosave: boolean;\n offlineProd: boolean;\n offlineTime: number | null;\n timePlayed: number;\n keepGoing: boolean;\n modID: string;\n modVersion: string;\n layers: Record<string, Record<string, unknown>>;\n}\n\nexport type Player = ProxiedWithState<PlayerData>;\n\nconst state = reactive<PlayerData>({\n id: \"\",\n devSpeed: null,\n name: \"\",\n tabs: [],\n time: -1,\n autosave: true,\n offlineProd: true,\n offlineTime: null,\n timePlayed: 0,\n keepGoing: false,\n modID: \"\",\n modVersion: \"\",\n layers: {}\n});\n\nexport function stringifySave(player: PlayerData): string {\n return JSON.stringify(player, (key, value) => unref(value));\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst playerHandler: ProxyHandler<Record<PropertyKey, any>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Record<PropertyKey, any>, key: PropertyKey): any {\n if (key === ProxyState || key === ProxyPath) {\n return target[key];\n }\n\n const value = target[ProxyState][key];\n if (key !== \"value\" && isPlainObject(value) && !(value instanceof Decimal)) {\n if (value !== target[key]?.[ProxyState]) {\n const path = [...target[ProxyPath], key];\n target[key] = new Proxy({ [ProxyState]: value, [ProxyPath]: path }, playerHandler);\n }\n return target[key];\n }\n\n return value;\n },\n set(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target: Record<PropertyKey, any>,\n property: PropertyKey,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any,\n receiver: ProxyConstructor\n ): boolean {\n if (\n !transientState.hasNaN &&\n ((typeof value === \"number\" && isNaN(value)) ||\n (value instanceof Decimal &&\n (isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag))))\n ) {\n const currentValue = target[ProxyState][property];\n if (\n !(\n (typeof currentValue === \"number\" && isNaN(currentValue)) ||\n (currentValue instanceof Decimal &&\n (isNaN(currentValue.sign) ||\n isNaN(currentValue.layer) ||\n isNaN(currentValue.mag)))\n )\n ) {\n state.autosave = false;\n transientState.hasNaN = true;\n transientState.NaNPath = [...target[ProxyPath], property];\n transientState.NaNReceiver = receiver as unknown as Record<string, unknown>;\n console.error(\n `Attempted to set NaN value`,\n [...target[ProxyPath], property],\n target[ProxyState]\n );\n throw \"Attempted to set NaN value. See above for details\";\n }\n }\n target[ProxyState][property] = value;\n return true;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ownKeys(target: Record<PropertyKey, any>) {\n return Reflect.ownKeys(target[ProxyState]);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n has(target: Record<PropertyKey, any>, key: string) {\n return Reflect.has(target[ProxyState], key);\n },\n getOwnPropertyDescriptor(target, key) {\n return Object.getOwnPropertyDescriptor(target[ProxyState], key);\n }\n};\nexport default window.player = new Proxy(\n { [ProxyState]: state, [ProxyPath]: [\"player\"] },\n playerHandler\n) as Player;\n","import projInfo from \"data/projInfo.json\";\nimport { Themes } from \"data/themes\";\nimport { CoercableComponent } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { hardReset } from \"util/save\";\nimport { reactive, watch } from \"vue\";\n\nexport interface Settings {\n active: string;\n saves: string[];\n showTPS: boolean;\n theme: Themes;\n unthrottled: boolean;\n}\n\nconst state = reactive<Partial<Settings>>({\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic,\n unthrottled: false\n});\n\nwatch(\n state,\n state =>\n localStorage.setItem(\n projInfo.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(state))))\n ),\n { deep: true }\n);\nexport default window.settings = state as Settings;\n\nexport function loadSettings(): void {\n try {\n const item: string | null = localStorage.getItem(projInfo.id);\n if (item != null && item !== \"\") {\n const settings = JSON.parse(decodeURIComponent(escape(atob(item))));\n if (typeof settings === \"object\") {\n Object.assign(state, settings);\n }\n }\n globalBus.emit(\"loadSettings\", state);\n // eslint-disable-next-line no-empty\n } catch {}\n}\n\nexport const hardResetSettings = (window.hardResetSettings = () => {\n const settings = {\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic\n };\n globalBus.emit(\"loadSettings\", settings);\n Object.assign(state, settings);\n hardReset();\n});\n\nexport const settingFields: CoercableComponent[] = reactive([]);\nexport function registerSettingField(component: CoercableComponent) {\n settingFields.push(component);\n}\n\nexport const infoComponents: CoercableComponent[] = reactive([]);\nexport function registerInfoComponent(component: CoercableComponent) {\n infoComponents.push(component);\n}\n\nexport const gameComponents: CoercableComponent[] = reactive([]);\nexport function registerGameComponent(component: CoercableComponent) {\n gameComponents.push(component);\n}\n","import { shallowReactive } from \"vue\";\n\nexport interface Transient {\n lastTenTicks: number[];\n hasNaN: boolean;\n NaNPath?: string[];\n NaNReceiver?: Record<string, unknown>;\n}\n\nexport default window.state = shallowReactive<Transient>({\n lastTenTicks: [],\n hasNaN: false,\n NaNPath: []\n});\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Context = _resolveComponent(\"Context\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"layer-container\",\n style: _normalizeStyle({ '--layer-color': _ctx.unref(_ctx.color) })\n }, [\n (_ctx.showGoBack)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"goBack\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.goBack && _ctx.goBack(...args)))\n }, \"←\"))\n : _createCommentVNode(\"\", true),\n (_ctx.minimized.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"layer-tab minimized\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.minimized.value = false))\n }, [\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.unref(_ctx.name)), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: _normalizeClass([\"layer-tab\", [{ showGoBack: _ctx.showGoBack }, _ctx.unref(_ctx.classes)]]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, [\n _createVNode(_component_Context, { ref: \"contextRef\" }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ]),\n _: 1\n }, 512)\n ], 6)),\n (_ctx.unref(_ctx.minimizable))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 3,\n class: \"minimize\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.minimized.value = true))\n }, \" ▼ \"))\n : _createCommentVNode(\"\", true)\n ], 4))\n}","\nimport projInfo from \"data/projInfo.json\";\nimport { CoercableComponent, StyleValue } from \"features/feature\";\nimport { FeatureNode } from \"game/layers\";\nimport { Persistent } from \"game/persistence\";\nimport player from \"game/player\";\nimport { computeComponent, processedPropType, wrapRef } from \"util/vue\";\nimport { computed, defineComponent, nextTick, PropType, Ref, ref, toRefs, unref, watch } from \"vue\";\nimport Context from \"./Context.vue\";\n\nexport default defineComponent({\n components: { Context },\n props: {\n index: {\n type: Number,\n required: true\n },\n tab: {\n type: Function as PropType<() => HTMLElement | undefined>,\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n minimized: {\n type: Object as PropType<Persistent<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number | string>(Number, String),\n required: true\n },\n name: {\n type: processedPropType<string>(String),\n required: true\n },\n color: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n minimizable: processedPropType<boolean>(Boolean),\n nodes: {\n type: Object as PropType<Ref<Record<string, FeatureNode | undefined>>>,\n required: true\n }\n },\n setup(props) {\n const { display, index, minimized, minWidth, tab } = toRefs(props);\n\n const component = computeComponent(display);\n const showGoBack = computed(\n () => projInfo.allowGoBack && index.value > 0 && !minimized.value\n );\n\n function goBack() {\n player.tabs.splice(unref(props.index), Infinity);\n }\n\n nextTick(() => updateTab(minimized.value, unref(minWidth.value)));\n watch([minimized, wrapRef(minWidth)], ([minimized, minWidth]) =>\n updateTab(minimized, minWidth)\n );\n\n const contextRef = ref<typeof Context | null>(null);\n watch(\n () => contextRef.value?.nodes,\n nodes => {\n if (nodes) {\n props.nodes.value = nodes;\n }\n }\n );\n\n function updateTab(minimized: boolean, minWidth: number | string) {\n const width =\n typeof minWidth === \"number\" || Number.isNaN(parseInt(minWidth))\n ? minWidth + \"px\"\n : minWidth;\n const tabValue = tab.value();\n if (tabValue != undefined) {\n if (minimized) {\n tabValue.style.flexGrow = \"0\";\n tabValue.style.flexShrink = \"0\";\n tabValue.style.width = \"60px\";\n tabValue.style.minWidth = tabValue.style.flexBasis = \"\";\n tabValue.style.margin = \"0\";\n } else {\n tabValue.style.flexGrow = \"\";\n tabValue.style.flexShrink = \"\";\n tabValue.style.width = \"\";\n tabValue.style.minWidth = tabValue.style.flexBasis = `${width}px`;\n tabValue.style.margin = \"\";\n }\n }\n }\n\n return {\n component,\n showGoBack,\n contextRef,\n unref,\n goBack\n };\n }\n});\n","import { render } from \"./Layer.vue?vue&type=template&id=66dc9e3e&scoped=true&ts=true\"\nimport script from \"./Layer.vue?vue&type=script&lang=ts\"\nexport * from \"./Layer.vue?vue&type=script&lang=ts\"\n\nimport \"./Layer.vue?vue&type=style&index=0&id=66dc9e3e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-66dc9e3e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5f8298e6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Changelog\", -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"details\", { open: \"\" }, [\n /*#__PURE__*/_createElementVNode(\"summary\", null, [\n /*#__PURE__*/_createTextVNode(\"v0.0 Initial Commit - \"),\n /*#__PURE__*/_createElementVNode(\"time\", null, \"2021-09-04\")\n ]),\n /*#__PURE__*/_createTextVNode(\" This is the first release :D \"),\n /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"feature\" }, \"Did everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"fix\" }, \"Had some fun\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"breaking\" }, \"Removed everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"balancing\" }, \"Created some bugs to fix later\")\n ])\n], -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Changelog.vue?vue&type=style&index=0&id=5f8298e6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5f8298e6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eb46986\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"info-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"info-modal-title\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_10 = [\"href\"]\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Paper Pilot Community \")\n ])\n], -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Modding Tree \")\n ])\n], -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport type Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport { infoComponents } from \"game/settings\";\nimport { formatTime } from \"util/bignum\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs, unref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n changelog: null\n },\n setup(__props: any, { expose }) {\n\nconst _props = __props as { changelog: typeof Changelog | null }\n\nconst { title, logo, author, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\n\nconst props = toRefs(_props);\n\nconst isOpen = ref(false);\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\n\nconst infoComponent = computed(() => {\n return coerceComponent(jsx(() => <>{infoComponents.map(render)}</>));\n});\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nfunction openChangelog() {\n unref(props.changelog)?.open();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"info-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"h2\", null, _toDisplayString(_unref(title)), 1),\n _createElementVNode(\"h4\", null, [\n _createTextVNode(\" v\" + _toDisplayString(_unref(versionNumber)), 1),\n (_unref(versionTitle))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \": \" + _toDisplayString(_unref(versionTitle)), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n (_unref(author))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"By \" + _toDisplayString(_unref(author)), 1))\n : _createCommentVNode(\"\", true),\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", {\n class: \"link\",\n onClick: openChangelog\n }, \"Changelog\"),\n _hoisted_9,\n _createElementVNode(\"div\", null, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: _unref(discordLink),\n class: \"info-modal-discord-link\"\n }, [\n _hoisted_11,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_10))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_12,\n _hoisted_13,\n _hoisted_14,\n _createElementVNode(\"div\", null, \"Time Played: \" + _toDisplayString(_unref(timePlayed)), 1),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(infoComponent))))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Info.vue?vue&type=style&index=0&id=3eb46986&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eb46986\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, isRef as _isRef, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85d7ae40\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"Options\")\n], -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport rawThemes from \"data/themes\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport settings, { settingFields } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst themes = Object.keys(rawThemes).map(theme => ({\n label: camelToTitle(theme),\n value: theme\n}));\n\nconst settingFieldsComponent = computed(() => {\n return coerceComponent(jsx(() => <>{settingFields.map(render)}</>));\n});\n\nconst { showTPS, theme, unthrottled } = toRefs(settings);\nconst { autosave, offlineProd } = toRefs(player);\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? 0 : null;\n }\n});\n\nconst offlineProdTitle = jsx(() => (\n <span>\n Offline Production<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst autosaveTitle = jsx(() => (\n <span>\n Autosave<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst isPausedTitle = jsx(() => (\n <span>\n Pause game<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createVNode(Select, {\n title: \"Theme\",\n options: _unref(themes),\n modelValue: _unref(theme),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(theme) ? (theme).value = $event : null))\n }, null, 8, [\"options\", \"modelValue\"]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(settingFieldsComponent)))),\n _createVNode(Toggle, {\n title: \"Show TPS\",\n modelValue: _unref(showTPS),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(showTPS) ? (showTPS).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _hoisted_2,\n _createVNode(Toggle, {\n title: \"Unthrottled\",\n modelValue: _unref(unthrottled),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(unthrottled) ? (unthrottled).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(offlineProdTitle),\n modelValue: _unref(offlineProd),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_isRef(offlineProd) ? (offlineProd).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(autosaveTitle),\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: _unref(isPausedTitle),\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Options.vue?vue&type=style&index=0&id=85d7ae40&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85d7ae40\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, withModifiers as _withModifiers, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bf59fca4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = [\"onClick\", \"disabled\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"onClick\"]\n\nimport { ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n disabled: { type: Boolean },\n skipConfirm: { type: Boolean }\n },\n emits: [\"click\", \"confirmingChanged\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n (e: \"confirmingChanged\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n disabled?: boolean;\n skipConfirm?: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isConfirming = ref(false);\n\nwatch(isConfirming, isConfirming => {\n emit(\"confirmingChanged\", isConfirming);\n});\n\nfunction click() {\n if (unref(props.skipConfirm)) {\n emit(\"click\");\n return;\n }\n if (isConfirming.value) {\n emit(\"click\");\n }\n isConfirming.value = !isConfirming.value;\n}\n\nfunction cancel() {\n isConfirming.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"container\", { confirming: isConfirming.value }])\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"Are you sure?\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: \"button danger\",\n disabled: __props.disabled\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Yes\"))\n : _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n ], 8, _hoisted_2),\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"button\",\n onClick: _withModifiers(cancel, [\"stop\"])\n }, \"No\", 8, _hoisted_4))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DangerButton.vue?vue&type=style&index=0&id=bf59fca4&scoped=true&lang=css\"\nimport \"./DangerButton.vue?vue&type=style&index=1&id=bf59fca4&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-bf59fca4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bbcedd3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { nextTick, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n left: { type: Boolean }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\n\n\n\nconst activated = ref(false);\nconst activatedTimeout = ref<number | null>(null);\n\nfunction click() {\n emit(\"click\");\n\n // Give feedback to user\n if (activatedTimeout.value) {\n clearTimeout(activatedTimeout.value);\n }\n activated.value = false;\n nextTick(() => {\n activated.value = true;\n activatedTimeout.value = setTimeout(() => (activated.value = false), 500);\n });\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: _normalizeClass([\"feedback\", { activated: activated.value, left: __props.left }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 10, _hoisted_1))\n}\n}\n\n})","import script from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./FeedbackButton.vue?vue&type=style&index=0&id=5bbcedd3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bbcedd3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6a0cf7ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"handle material-icons\" }, \"drag_handle\", -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"actions\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_paste\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_copy\", -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"edit\", -1))\nconst _hoisted_7 = [\n _hoisted_6\n]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"material-icons\",\n style: {\"margin\":\"-2px\"}\n}, \"delete\", -1))\nconst _hoisted_9 = {\n key: 1,\n class: \"actions\"\n}\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"check\", -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"close\", -1))\nconst _hoisted_13 = [\n _hoisted_12\n]\nconst _hoisted_14 = {\n key: 2,\n class: \"details\"\n}\nconst _hoisted_15 = { class: \"save-version\" }\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_17 = { key: 0 }\nconst _hoisted_18 = {\n key: 3,\n class: \"details\"\n}\nconst _hoisted_19 = {\n key: 4,\n class: \"details error\"\n}\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport player from \"game/player\";\nimport { computed, ref, toRefs, watch } from \"vue\";\nimport DangerButton from \"./fields/DangerButton.vue\";\nimport FeedbackButton from \"./fields/FeedbackButton.vue\";\nimport Text from \"./fields/Text.vue\";\nimport { LoadablePlayerData } from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n save: null\n },\n emits: [\"export\", \"open\", \"duplicate\", \"delete\", \"editName\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"export\"): void;\n (e: \"open\"): void;\n (e: \"duplicate\"): void;\n (e: \"delete\"): void;\n (e: \"editName\", name: string): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n save: LoadablePlayerData;\n}\n\n\nconst { save } = toRefs(_props);\n\n\nconst dateFormat = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n});\n\nconst isEditing = ref(false);\nconst isConfirming = ref(false);\nconst newName = ref(\"\");\n\nwatch(isEditing, () => (newName.value = save.value.name || \"\"));\n\nconst isActive = computed(() => save.value && save.value.id === player.id);\nconst currentTime = computed(() =>\n isActive.value ? player.time : (save.value && save.value.time) || 0\n);\n\nfunction changeName() {\n emit(\"editName\", newName.value);\n isEditing.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"save\", { active: _unref(isActive) }])\n }, [\n _hoisted_1,\n (!isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createBlock(FeedbackButton, {\n key: 0,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('export'))),\n class: \"button\",\n left: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('duplicate'))),\n class: \"button\"\n }, _hoisted_5))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 2,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_7))\n : _createCommentVNode(\"\", true),\n _createVNode(DangerButton, {\n disabled: _unref(isActive),\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('delete'))),\n onConfirmingChanged: _cache[4] || (_cache[4] = value => (isConfirming.value = value))\n }, {\n default: _withCtx(() => [\n _hoisted_8\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n _createElementVNode(\"button\", {\n onClick: changeName,\n class: \"button\"\n }, _hoisted_11),\n _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_13)\n ])),\n (_unref(save).error == undefined && !isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"button\", {\n class: \"button open\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emit('open')))\n }, [\n _createElementVNode(\"h3\", null, _toDisplayString(_unref(save).name), 1)\n ]),\n _createElementVNode(\"span\", _hoisted_15, \"v\" + _toDisplayString(_unref(save).modVersion), 1),\n _hoisted_16,\n (_unref(currentTime))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, \"Last played \" + _toDisplayString(_unref(dateFormat).format(_unref(currentTime))), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : (_unref(save).error == undefined && isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _createVNode(Text, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((newName).value = $event)),\n class: \"editname\",\n onSubmit: changeName\n }, null, 8, [\"modelValue\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createTextVNode(\" Error: Failed to load save with id \" + _toDisplayString(_unref(save).id), 1),\n _hoisted_20,\n _createTextVNode(_toDisplayString(_unref(save).error), 1)\n ]))\n ], 2))\n}\n}\n\n})","import script from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Save.vue?vue&type=style&index=0&id=6a0cf7ac&scoped=true&lang=css\"\nimport \"./Save.vue?vue&type=style&index=1&id=6a0cf7ac&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6a0cf7ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7d95f59e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Saves Manager\", -1))\nconst _hoisted_2 = { class: \"modal-footer\" }\nconst _hoisted_3 = { class: \"field\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"field-title\" }, \"Create Save\", -1))\nconst _hoisted_5 = { class: \"field-buttons\" }\nconst _hoisted_6 = { class: \"footer\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\"} }, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport player, { PlayerData } from \"game/player\";\nimport settings from \"game/settings\";\nimport { getUniqueID, loadSave, save, newSave } from \"util/save\";\nimport {\n ComponentPublicInstance,\n computed,\n nextTick,\n ref,\n shallowReactive,\n unref,\n watch\n} from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Text from \"./fields/Text.vue\";\nimport Save from \"./Save.vue\";\nimport Draggable from \"vuedraggable\";\n\nexport type LoadablePlayerData = Omit<Partial<PlayerData>, \"id\"> & { id: string; error?: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\nconst modal = ref<ComponentPublicInstance<typeof Modal> | null>(null);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst importingFailed = ref(false);\nconst saveToImport = ref(\"\");\n\nwatch(saveToImport, save => {\n if (save) {\n nextTick(() => {\n try {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (typeof playerData !== \"object\") {\n importingFailed.value = true;\n return;\n }\n const id = getUniqueID();\n playerData.id = id;\n localStorage.setItem(\n id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n saveToImport.value = \"\";\n importingFailed.value = false;\n\n settings.saves.push(id);\n } catch (e) {\n importingFailed.value = true;\n }\n });\n } else {\n importingFailed.value = false;\n }\n});\n\nlet bankContext = require.context(\"raw-loader!../../saves\", true, /\\.txt$/);\nlet bank = ref(\n bankContext.keys().reduce((acc: Array<{ label: string; value: string }>, curr) => {\n // .slice(2, -4) strips the leading ./ and the trailing .txt\n acc.push({\n label: curr.slice(2, -4),\n value: bankContext(curr).default\n });\n return acc;\n }, [])\n);\n\nconst cachedSaves = shallowReactive<Record<string, LoadablePlayerData | undefined>>({});\nfunction getCachedSave(id: string) {\n if (cachedSaves[id] == null) {\n const save = localStorage.getItem(id);\n if (save == null) {\n cachedSaves[id] = { error: `Save doesn't exist in localStorage`, id };\n } else if (save === \"dW5kZWZpbmVk\") {\n cachedSaves[id] = { error: `Save is undefined`, id };\n } else {\n try {\n cachedSaves[id] = { ...JSON.parse(decodeURIComponent(escape(atob(save)))), id };\n } catch (error) {\n cachedSaves[id] = { error, id };\n console.warn(\n `SavesManager: Failed to load info about save with id ${id}:\\n${error}\\n${save}`\n );\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return cachedSaves[id]!;\n}\n// Wipe cache whenever the modal is opened\nwatch(isOpen, isOpen => {\n if (isOpen) {\n Object.keys(cachedSaves).forEach(key => delete cachedSaves[key]);\n }\n});\n\nconst saves = computed(() =>\n settings.saves.reduce((acc: Record<string, LoadablePlayerData>, curr: string) => {\n acc[curr] = getCachedSave(curr);\n return acc;\n }, {})\n);\n\nfunction exportSave(id: string) {\n let saveToExport;\n if (player.id === id) {\n saveToExport = save();\n } else {\n saveToExport = btoa(unescape(encodeURIComponent(JSON.stringify(saves.value[id]))));\n }\n\n // Put on clipboard. Using the clipboard API asks for permissions and stuff\n const el = document.createElement(\"textarea\");\n el.value = saveToExport;\n document.body.appendChild(el);\n el.select();\n el.setSelectionRange(0, 99999);\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n}\n\nfunction duplicateSave(id: string) {\n if (player.id === id) {\n save();\n }\n\n const playerData = { ...saves.value[id], id: getUniqueID() };\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction deleteSave(id: string) {\n settings.saves = settings.saves.filter((save: string) => save !== id);\n localStorage.removeItem(id);\n cachedSaves[id] = undefined;\n}\n\nfunction openSave(id: string) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n saves.value[player.id]!.time = player.time;\n save();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n loadSave(saves.value[id]!);\n // Delete cached version in case of opening it again\n cachedSaves[id] = undefined;\n}\n\nfunction newFromPreset(preset: string) {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(preset))));\n playerData.id = getUniqueID();\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction editSave(id: string, newName: string) {\n const currSave = saves.value[id];\n if (currSave) {\n currSave.name = newName;\n if (player.id === id) {\n player.name = newName;\n save();\n } else {\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(JSON.stringify(currSave)))));\n cachedSaves[id] = undefined;\n }\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((isOpen).value = $event)),\n ref_key: \"modal\",\n ref: modal\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createBlock(_unref(Draggable), {\n key: 0,\n list: _unref(settings).saves,\n handle: \".handle\",\n itemKey: (save) => save\n }, {\n item: _withCtx(({ element }) => [\n _createVNode(Save, {\n save: _unref(saves)[element],\n onOpen: ($event: any) => (openSave(element)),\n onExport: ($event: any) => (exportSave(element)),\n onEditName: name => editSave(element, name),\n onDuplicate: ($event: any) => (duplicateSave(element)),\n onDelete: ($event: any) => (deleteSave(element))\n }, null, 8, [\"save\", \"onOpen\", \"onExport\", \"onEditName\", \"onDuplicate\", \"onDelete\"])\n ]),\n _: 1\n }, 8, [\"list\", \"itemKey\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Text, {\n modelValue: saveToImport.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((saveToImport).value = $event)),\n title: \"Import Save\",\n placeholder: \"Paste your save here!\",\n class: _normalizeClass({ importingFailed: importingFailed.value })\n }, null, 8, [\"modelValue\", \"class\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"button\", {\n class: \"button\",\n onClick: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_unref(newSave) && _unref(newSave)(...args)))\n }, \"New Game\"),\n (Object.keys(_unref(bank)).length > 0)\n ? (_openBlock(), _createBlock(Select, {\n key: 0,\n options: _unref(bank),\n modelValue: undefined,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = preset => newFromPreset(preset as string)),\n closeOnSelect: \"\",\n placeholder: \"Select preset\",\n class: \"presets\"\n }, null, 8, [\"options\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (isOpen.value = false))\n }, \" Close \")\n ])\n ])\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SavesManager.vue?vue&type=style&index=0&id=7d95f59e&scoped=true&lang=css\"\nimport \"./SavesManager.vue?vue&type=style&index=1&id=7d95f59e&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7d95f59e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71847eca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"alt\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"title\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\",\"cursor\":\"unset\"} }, null, -1))\nconst _hoisted_4 = { class: \"discord\" }\nconst _hoisted_5 = { class: \"discord-links\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = [\"href\"]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\nconst _hoisted_10 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_18 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_20 = { class: \"discord\" }\nconst _hoisted_21 = { class: \"discord-links\" }\nconst _hoisted_22 = { key: 0 }\nconst _hoisted_23 = [\"href\"]\nconst _hoisted_24 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\n\nimport Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { ComponentPublicInstance, ref } from \"vue\";\nimport Info from \"./Info.vue\";\nimport Options from \"./Options.vue\";\nimport SavesManager from \"./SavesManager.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { TooltipDirection } from \"features/tooltips/tooltip\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst info = ref<ComponentPublicInstance<typeof Info> | null>(null);\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\nconst options = ref<ComponentPublicInstance<typeof Options> | null>(null);\n// For some reason Info won't accept the changelog unless I do this:\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst changelog = ref<ComponentPublicInstance<any> | null>(null);\n\nconst { useHeader, banner, title, discordName, discordLink, versionNumber } = projInfo;\n\nfunction openDiscord() {\n window.open(discordLink, \"mywindow\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(useHeader))\n ? (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 0,\n class: \"nav\"\n }, _ctx.$attrs), [\n (_unref(banner))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: _unref(banner),\n class: \"banner\",\n alt: _unref(title)\n }, null, 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _toDisplayString(_unref(title)), 1)),\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_5, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_6, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_7)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_8,\n _hoisted_9\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_10, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).DOWN,\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ], 16))\n : (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 1,\n class: \"overlay-nav\"\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_21, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_22, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_23)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_24,\n _hoisted_25\n ])\n ])\n ], 16)),\n _createVNode(Info, {\n ref_key: \"info\",\n ref: info,\n changelog: changelog.value\n }, null, 8, [\"changelog\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512),\n _createVNode(Options, {\n ref_key: \"options\",\n ref: options\n }, null, 512),\n _createVNode(Changelog, {\n ref_key: \"changelog\",\n ref: changelog\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Nav.vue?vue&type=style&index=0&id=71847eca&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-71847eca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4fd7697b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"inner-tab\" }\nconst _hoisted_2 = {\n key: 1,\n class: \"separator\"\n}\n\nimport projInfo from \"data/projInfo.json\";\nimport { GenericLayer, layers } from \"game/layers\";\nimport player from \"game/player\";\nimport { computed, toRef } from \"vue\";\nimport Layer from \"./Layer.vue\";\nimport Nav from \"./Nav.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tabs = toRef(player, \"tabs\");\nconst layerKeys = computed(() => Object.keys(layers));\nconst useHeader = projInfo.useHeader;\n\nfunction gatherLayerProps(layer: GenericLayer) {\n const { display, minimized, minWidth, name, color, style, classes, minimizable, nodes } = layer;\n return { display, minimized, minWidth, name, color, style, classes, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs-container\", { useHeader: _unref(useHeader) }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(tabs), (tab, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: index,\n class: \"tab\",\n ref_for: true,\n ref: `tab-${index}`\n }, [\n (index === 0 && !_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(layerKeys).includes(tab))\n ? (_openBlock(), _createBlock(Layer, _mergeProps({ key: 0 }, gatherLayerProps(_unref(layers)[tab]!), {\n index: index,\n tab: () => ((_ctx.$refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])\n }), null, 16, [\"index\", \"tab\"]))\n : (_openBlock(), _createBlock(_resolveDynamicComponent(tab), {\n key: 1,\n index: index\n }, null, 8, [\"index\"]))\n ]),\n (index !== _unref(tabs).length - 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ], 2))\n}\n}\n\n})","import script from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Game.vue?vue&type=style&index=0&id=4fd7697b&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=4fd7697b&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4fd7697b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-06188cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"game-over-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"game-over-modal-title\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Congratulations!\", -1))\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Please check the Discord to discuss the game or to check for new content updates! \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = [\"href\"]\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons game-over-modal-discord\" }, \"discord\", -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { hasWon } from \"data/projEntry\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport { formatTime } from \"util/bignum\";\nimport { loadSave, newSave } from \"util/save\";\nimport { computed, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { title, logo, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\nconst isOpen = computed(() => hasWon.value && !player.keepGoing);\nconst autosave = toRef(player, \"autosave\");\n\nfunction keepGoing() {\n player.keepGoing = true;\n}\n\nfunction playAgain() {\n loadSave(newSave());\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, { \"model-value\": _unref(isOpen) }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"game-over-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"h4\", null, \"You've beaten \" + _toDisplayString(_unref(title)) + \" v\" + _toDisplayString(_unref(versionNumber)) + \": \" + _toDisplayString(_unref(versionTitle)), 1)\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", null, \"It took you \" + _toDisplayString(_unref(timePlayed)) + \" to beat the game.\", 1),\n _hoisted_6,\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"game-over-modal-discord-link\"\n }, [\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_9)\n ]),\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", { class: \"game-over-footer\" }, [\n _createElementVNode(\"button\", {\n onClick: keepGoing,\n class: \"button\"\n }, \"Keep Going\"),\n _createElementVNode(\"button\", {\n onClick: playAgain,\n class: \"button danger\"\n }, \"Play Again\")\n ])\n ]),\n _: 1\n }, 8, [\"model-value\"]))\n}\n}\n\n})","import script from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GameOverScreen.vue?vue&type=style&index=0&id=06188cc8&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-06188cc8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, createBlock as _createBlock, mergeProps as _mergeProps, withCtx as _withCtx, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5935214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"nan-modal-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"NaN value detected!\")\n], -1))\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_4 = [\"href\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons nan-modal-discord\" }, \"discord\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = { class: \"nan-footer\" }\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { ComponentPublicInstance, computed, ref, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport SavesManager from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { discordName, discordLink } = projInfo;\nconst autosave = toRef(player, \"autosave\");\nconst hasNaN = toRef(state, \"hasNaN\");\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\n\nconst path = computed(() => state.NaNPath?.join(\".\"));\nconst property = computed(() => state.NaNPath?.slice(-1)[0]);\nconst previous = computed<DecimalSource | null>(() => {\n if (state.NaNReceiver && property.value) {\n return state.NaNReceiver[property.value] as DecimalSource;\n }\n return null;\n});\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? null : 0;\n }\n});\n\nfunction setZero() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(0);\n state.hasNaN = false;\n }\n}\n\nfunction setOne() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(1);\n state.hasNaN = false;\n }\n}\n\nfunction ignore() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(NaN);\n state.hasNaN = false;\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(Modal, _mergeProps({\n modelValue: _unref(hasNaN),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(hasNaN) ? (hasNaN).value = $event : null))\n }, _ctx.$attrs), {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createElementVNode(\"div\", null, [\n _createTextVNode(\" Attempted to assign \\\"\" + _toDisplayString(_unref(path)) + \"\\\" to NaN\", 1),\n (_unref(previous))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(\" \") + \"(previously \" + _toDisplayString(_unref(format)(_unref(previous))) + \")\", 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\". Auto-saving has been \" + _toDisplayString(_unref(autosave) ? \"enabled\" : \"disabled\") + \". Check the console for more details, and consider sharing it with the developers on discord. \", 1)\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"nan-modal-discord-link\"\n }, [\n _hoisted_5,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_4)\n ]),\n _hoisted_6,\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: \"Pause game\",\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open())),\n class: \"button\"\n }, \"Open Saves Manager\"),\n _createElementVNode(\"button\", {\n onClick: setZero,\n class: \"button\"\n }, \"Set to 0\"),\n _createElementVNode(\"button\", {\n onClick: setOne,\n class: \"button\"\n }, \"Set to 1\"),\n (_unref(previous) && _unref(Decimal).neq(_unref(previous), 0) && _unref(Decimal).neq(_unref(previous), 1))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (hasNaN.value = false)),\n class: \"button\"\n }, \" Set to previous \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: ignore,\n class: \"button danger\"\n }, \"Ignore\")\n ])\n ]),\n _: 1\n }, 16, [\"modelValue\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./NaNScreen.vue?vue&type=style&index=0&id=5935214c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5935214c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c0663118\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"tpsDisplay\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"low\"\n}\n\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { computed, ref, watchEffect } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tps = computed(() =>\n Decimal.div(\n state.lastTenTicks.length,\n state.lastTenTicks.reduce((acc, curr) => acc + curr, 0)\n )\n);\n\nconst lastTenFPS = ref<number[]>([]);\nwatchEffect(() => {\n lastTenFPS.value.push(Math.round(tps.value.toNumber()));\n if (lastTenFPS.value.length > 10) {\n lastTenFPS.value = lastTenFPS.value.slice(1);\n }\n});\n\nconst low = computed(() =>\n lastTenFPS.value.reduce<DecimalSource>((acc, curr) => Decimal.max(acc, curr), 0)\n);\n\nconst showLow = computed(() => Decimal.sub(tps.value, low.value).gt(1));\n\nreturn (_ctx: any,_cache: any) => {\n return (!_unref(tps).isNan())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createTextVNode(\" TPS: \" + _toDisplayString(_unref(formatWhole)(_unref(tps))) + \" \", 1),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_unref(showLow))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(_unref(formatWhole)(_unref(low))), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./TPS.vue?vue&type=style&index=0&id=c0663118&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c0663118\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { jsx } from \"features/feature\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, toRef, unref } from \"vue\";\nimport Game from \"./components/Game.vue\";\nimport GameOverScreen from \"./components/GameOverScreen.vue\";\nimport NaNScreen from \"./components/NaNScreen.vue\";\nimport Nav from \"./components/Nav.vue\";\nimport TPS from \"./components/TPS.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport themes from \"./data/themes\";\nimport settings, { gameComponents } from \"./game/settings\";\nimport \"./main.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst useHeader = projInfo.useHeader;\nconst theme = computed(() => themes[settings.theme].variables);\nconst showTPS = toRef(settings, \"showTPS\");\n\nconst gameComponent = computed(() => {\n return coerceComponent(jsx(() => <>{gameComponents.map(render)}</>));\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n id: \"modal-root\",\n style: _normalizeStyle(_unref(theme))\n }, null, 4),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"app\", { useHeader: _unref(useHeader) }]),\n style: _normalizeStyle(_unref(theme))\n }, [\n (_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(Game),\n (unref(_unref(showTPS)))\n ? (_openBlock(), _createBlock(TPS, { key: 1 }))\n : _createCommentVNode(\"\", true),\n _createVNode(GameOverScreen),\n _createVNode(NaNScreen),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(gameComponent))))\n ], 6)\n ], 64))\n}\n}\n\n})","import script from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./App.vue?vue&type=style&index=0&id=f13f28b6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f13f28b6\"]])\n\nexport default __exports__","import { App as VueApp, createApp } from \"vue\";\nimport App from \"./App.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport { GenericLayer } from \"./game/layers\";\nimport { PlayerData } from \"./game/player\";\nimport { Settings } from \"./game/settings\";\nimport { Transient } from \"./game/state\";\nimport Decimal, { DecimalSource } from \"./util/bignum\";\nimport { load } from \"./util/save\";\n\ndocument.title = projInfo.title;\nif (projInfo.id === \"\") {\n throw \"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json\";\n}\n\ndeclare global {\n interface Window {\n vue: VueApp;\n save: VoidFunction;\n hardReset: VoidFunction;\n hardResetSettings: VoidFunction;\n layers: Record<string, Readonly<GenericLayer> | undefined>;\n player: PlayerData;\n state: Transient;\n settings: Settings;\n Decimal: typeof Decimal;\n exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;\n commaFormat: (num: DecimalSource, precision: number) => string;\n regularFormat: (num: DecimalSource, precision: number) => string;\n format: (num: DecimalSource, precision?: number, small?: boolean) => string;\n formatWhole: (num: DecimalSource) => string;\n formatTime: (s: number) => string;\n toPlaces: (x: DecimalSource, precision: number, maxAccepted: DecimalSource) => string;\n formatSmall: (x: DecimalSource, precision?: number) => string;\n invertOOM: (x: DecimalSource) => Decimal;\n projInfo: typeof projInfo;\n }\n}\n\nrequestAnimationFrame(async () => {\n console.log(\n \"%cMade in Profectus%c\\nLearn more at www.moddingtree.com\",\n \"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;\",\n \"padding: 4px;\"\n );\n await load();\n const { globalBus, startGameLoop } = await require(\"./game/events\");\n\n // Create Vue\n const vue = (window.vue = createApp(App));\n globalBus.emit(\"setupVue\", vue);\n vue.mount(\"#app\");\n\n startGameLoop();\n});\n\nwindow.projInfo = projInfo;\n","/* eslint-disable @typescript-eslint/no-this-alias */\nexport type CompareResult = -1 | 0 | 1;\n\nconst MAX_SIGNIFICANT_DIGITS = 17; //Maximum number of digits of precision to assume in Number\n\nconst EXP_LIMIT = 9e15; //If we're ABOVE this value, increase a layer. (9e15 is close to the largest integer that can fit in a Number.)\n\nconst LAYER_DOWN: number = Math.log10(9e15);\n\nconst FIRST_NEG_LAYER = 1 / 9e15; //At layer 0, smaller non-zero numbers than this become layer 1 numbers with negative mag. After that the pattern continues as normal.\n\nconst NUMBER_EXP_MAX = 308; //The largest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst NUMBER_EXP_MIN = -324; //The smallest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst MAX_ES_IN_A_ROW = 5; //For default toString behaviour, when to swap from eee... to (e^n) syntax.\n\nconst IGNORE_COMMAS = true;\nconst COMMAS_ARE_DECIMAL_POINTS = false;\n\nconst powerOf10 = (function() {\n // We need this lookup table because Math.pow(10, exponent)\n // when exponent's absolute value is large is slightly inaccurate.\n // You can fix it with the power of math... or just make a lookup table.\n // Faster AND simpler\n const powersOf10: number[] = [];\n\n for (let i = NUMBER_EXP_MIN + 1; i <= NUMBER_EXP_MAX; i++) {\n powersOf10.push(Number(\"1e\" + i));\n }\n\n const indexOf0InPowersOf10 = 323;\n return function(power: number) {\n return powersOf10[power + indexOf0InPowersOf10];\n };\n})();\n\n//tetration/slog to real height stuff\n//background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\nconst critical_headers = [2, Math.E, 3, 4, 5, 6, 7, 8, 9, 10];\nconst critical_tetr_values = [\n [\n // Base 2\n 1,\n 1.0891168053867777,\n 1.1789745164521264,\n 1.2701428397304229,\n 1.3632066654400328,\n 1.4587804913784246,\n 1.557523817412741,\n 1.660158301473385,\n 1.767487542936873,\n 1.8804205225512542,\n 2\n ],\n [\n // Base E\n 1, //0.0\n 1.1121114330934, //0.1\n 1.23103892493161, //0.2\n 1.35838369631113, //0.3\n 1.49605193039935, //0.4\n 1.64635423375119, //0.5\n 1.81213853570186, //0.6\n 1.99697132461829, //0.7\n 2.20538955455724, //0.8\n 2.44325744833852, //0.9\n Math.E //1.0\n ],\n [\n // Base 3\n 1,\n 1.1187738849693603,\n 1.2464963939368214,\n 1.38527004705667,\n 1.5376664685821402,\n 1.7068895236551784,\n 1.897001227148399,\n 2.1132403089001035,\n 2.362480153784171,\n 2.6539010333870774,\n 3\n ],\n [\n // Base 4\n 1,\n 1.1367350847096405,\n 1.2889510672956703,\n 1.4606478703324786,\n 1.6570295196661111,\n 1.8850062585672889,\n 2.1539465047453485,\n 2.476829779693097,\n 2.872061932789197,\n 3.3664204535587183,\n 4\n ],\n [\n // Base 5\n 1,\n 1.1494592900767588,\n 1.319708228183931,\n 1.5166291280087583,\n 1.748171114438024,\n 2.0253263297298045,\n 2.3636668498288547,\n 2.7858359149579424,\n 3.3257226212448145,\n 4.035730287722532,\n 5\n ],\n [\n // Base 6\n 1,\n 1.159225940787673,\n 1.343712473580932,\n 1.5611293155111927,\n 1.8221199554561318,\n 2.14183924486326,\n 2.542468319282638,\n 3.0574682501653316,\n 3.7390572020926873,\n 4.6719550537360774,\n 6\n ],\n [\n // Base 7\n 1,\n 1.1670905356972596,\n 1.3632807444991446,\n 1.5979222279405536,\n 1.8842640123816674,\n 2.2416069644878687,\n 2.69893426559423,\n 3.3012632110403577,\n 4.121250340630164,\n 5.281493033448316,\n 7\n ],\n [\n // Base 8\n 1,\n 1.1736630594087796,\n 1.379783782386201,\n 1.6292821855668218,\n 1.9378971836180754,\n 2.3289975651071977,\n 2.8384347394720835,\n 3.5232708454565906,\n 4.478242031114584,\n 5.868592169644505,\n 8\n ],\n [\n // Base 9\n 1,\n 1.1793017514670474,\n 1.394054150657457,\n 1.65664127441059,\n 1.985170999970283,\n 2.4069682290577457,\n 2.9647310119960752,\n 3.7278665320924946,\n 4.814462547283592,\n 6.436522247411611,\n 9\n ],\n [\n // Base 10\n 1,\n 1.18422737399915,\n 1.4066113788546144,\n 1.680911177655277,\n 2.027492094355525,\n 2.4775152854601967,\n 3.080455730250329,\n 3.918234505962507,\n 5.1332705696484595,\n 6.9878696918072905,\n 10\n ]\n];\nconst critical_slog_values = [\n [\n // Base 2\n -1,\n -0.9194161097107025,\n -0.8335625019330468,\n -0.7425599821143978,\n -0.6466611521029437,\n -0.5462617907227869,\n -0.4419033816638769,\n -0.3342645487554494,\n -0.224140440909962,\n -0.11241087890006762,\n 0\n ],\n [\n // Base E\n -1, //0.0\n -0.90603157029014, //0.1\n -0.80786507256596, //0.2\n -0.7064666939634, //0.3\n -0.60294836853664, //0.4\n -0.49849837513117, //0.5\n -0.39430303318768, //0.6\n -0.29147201034755, //0.7\n -0.19097820800866, //0.8\n -0.09361896280296, //0.9\n 0 //1.0\n ],\n [\n // Base 3\n -1,\n -0.9021579584316141,\n -0.8005762598234203,\n -0.6964780623319391,\n -0.5911906810998454,\n -0.486050182576545,\n -0.3823089430815083,\n -0.28106046722897615,\n -0.1831906535795894,\n -0.08935809204418144,\n 0\n ],\n [\n // Base 4\n -1,\n -0.8917227442365535,\n -0.781258746326964,\n -0.6705130326902455,\n -0.5612813129406509,\n -0.4551067709033134,\n -0.35319256652135966,\n -0.2563741554088552,\n -0.1651412821106526,\n -0.0796919581982668,\n 0\n ],\n [\n // Base 5\n -1,\n -0.8843387974366064,\n -0.7678744063886243,\n -0.6529563724510552,\n -0.5415870994657841,\n -0.4352842206588936,\n -0.33504449124791424,\n -0.24138853420685147,\n -0.15445285440944467,\n -0.07409659641336663,\n 0\n ],\n [\n // Base 6\n -1,\n -0.8786709358426346,\n -0.7577735191184886,\n -0.6399546189952064,\n -0.527284921869926,\n -0.4211627631006314,\n -0.3223479611761232,\n -0.23107655627789858,\n -0.1472057700818259,\n -0.07035171210706326,\n 0\n ],\n [\n // Base 7\n -1,\n -0.8740862815291583,\n -0.7497032990976209,\n -0.6297119746181752,\n -0.5161838335958787,\n -0.41036238255751956,\n -0.31277212146489963,\n -0.2233976621705518,\n -0.1418697367979619,\n -0.06762117662323441,\n 0\n ],\n [\n // Base 8\n -1,\n -0.8702632331800649,\n -0.7430366914122081,\n -0.6213373075161548,\n -0.5072025698095242,\n -0.40171437727184167,\n -0.30517930701410456,\n -0.21736343968190863,\n -0.137710238299109,\n -0.06550774483471955,\n 0\n ],\n [\n // Base 9\n -1,\n -0.8670016295947213,\n -0.7373984232432306,\n -0.6143173985094293,\n -0.49973884395492807,\n -0.394584953527678,\n -0.2989649949848695,\n -0.21245647317021688,\n -0.13434688362382652,\n -0.0638072667348083,\n 0\n ],\n [\n // Base 10\n -1,\n -0.8641642839543857,\n -0.732534623168535,\n -0.6083127477059322,\n -0.4934049257184696,\n -0.3885773075899922,\n -0.29376029055315767,\n -0.2083678561173622,\n -0.13155653399373268,\n -0.062401588652553186,\n 0\n ]\n];\n\nconst D = function D(value: DecimalSource): Decimal {\n return Decimal.fromValue_noAlloc(value);\n};\n\nconst FC = function(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents(sign, layer, mag);\n};\n\nconst FC_NN = function FC_NN(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents_noNormalize(sign, layer, mag);\n};\n\nconst ME = function ME(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent(mantissa, exponent);\n};\n\nconst ME_NN = function ME_NN(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent_noNormalize(mantissa, exponent);\n};\n\nconst decimalPlaces = function decimalPlaces(value: number, places: number): number {\n const len = places + 1;\n const numDigits = Math.ceil(Math.log10(Math.abs(value)));\n const rounded =\n Math.round(value * Math.pow(10, len - numDigits)) * Math.pow(10, numDigits - len);\n return parseFloat(rounded.toFixed(Math.max(len - numDigits, 0)));\n};\n\nconst f_maglog10 = function(n: number) {\n return Math.sign(n) * Math.log10(Math.abs(n));\n};\n\n//from HyperCalc source code\nconst f_gamma = function(n: number) {\n if (!isFinite(n)) {\n return n;\n }\n if (n < -50) {\n if (n === Math.trunc(n)) {\n return Number.NEGATIVE_INFINITY;\n }\n return 0;\n }\n\n let scal1 = 1;\n while (n < 10) {\n scal1 = scal1 * n;\n ++n;\n }\n\n n -= 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (n + 0.5) * Math.log(n);\n l = l - n;\n const n2 = n * n;\n let np = n;\n l = l + 1 / (12 * np);\n np = np * n2;\n l = l + 1 / (360 * np);\n np = np * n2;\n l = l + 1 / (1260 * np);\n np = np * n2;\n l = l + 1 / (1680 * np);\n np = np * n2;\n l = l + 1 / (1188 * np);\n np = np * n2;\n l = l + 691 / (360360 * np);\n np = np * n2;\n l = l + 7 / (1092 * np);\n np = np * n2;\n l = l + 3617 / (122400 * np);\n\n return Math.exp(l) / scal1;\n};\n\nconst _twopi = 6.2831853071795864769252842; // 2*pi\nconst _EXPN1 = 0.36787944117144232159553; // exp(-1)\nconst OMEGA = 0.56714329040978387299997; // W(1, 0)\n//from https://math.stackexchange.com/a/465183\n// The evaluation can become inaccurate very close to the branch point\nconst f_lambertw = function(z: number, tol = 1e-10): number {\n let w;\n let wn;\n\n if (!Number.isFinite(z)) {\n return z;\n }\n if (z === 0) {\n return z;\n }\n if (z === 1) {\n return OMEGA;\n }\n\n if (z < 10) {\n w = 0;\n } else {\n w = Math.log(z) - Math.log(Math.log(z));\n }\n\n for (let i = 0; i < 100; ++i) {\n wn = (z * Math.exp(-w) + w * w) / (w + 1);\n if (Math.abs(wn - w) < tol * Math.abs(wn)) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Number.NaN;\n};\n\n//from https://github.com/scipy/scipy/blob/8dba340293fe20e62e173bdf2c10ae208286692f/scipy/special/lambertw.pxd\n// The evaluation can become inaccurate very close to the branch point\n// at ``-1/e``. In some corner cases, `lambertw` might currently\n// fail to converge, or can end up on the wrong branch.\nfunction d_lambertw(z: Decimal, tol = 1e-10): Decimal {\n let w;\n let ew, wew, wewz, wn;\n\n if (!Number.isFinite(z.mag)) {\n return z;\n }\n if (z === Decimal.dZero) {\n return z;\n }\n if (z === Decimal.dOne) {\n //Split out this case because the asymptotic series blows up\n return D(OMEGA);\n }\n\n const absz = Decimal.abs(z);\n //Get an initial guess for Halley's method\n w = Decimal.ln(z);\n\n //Halley's method; see 5.9 in [1]\n\n for (let i = 0; i < 100; ++i) {\n ew = Decimal.exp(-w);\n wewz = w.sub(z.mul(ew));\n wn = w.sub(\n wewz.div(\n w.add(1).sub(\n w\n .add(2)\n .mul(wewz)\n .div(Decimal.mul(2, w).add(2))\n )\n )\n );\n if (Decimal.abs(wn.sub(w)).lt(Decimal.abs(wn).mul(tol))) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Decimal.dNaN;\n}\n\nexport type DecimalSource = Decimal | number | string;\n\n/**\n * The Decimal's value is simply mantissa * 10^exponent.\n */\nexport default class Decimal {\n public static readonly dZero = FC_NN(0, 0, 0);\n public static readonly dOne = FC_NN(1, 0, 1);\n public static readonly dNegOne = FC_NN(-1, 0, 1);\n public static readonly dTwo = FC_NN(1, 0, 2);\n public static readonly dTen = FC_NN(1, 0, 10);\n public static readonly dNaN = FC_NN(Number.NaN, Number.NaN, Number.NaN);\n public static readonly dInf = FC_NN(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n public static readonly dNegInf = FC_NN(-1, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n public static readonly dNumberMax = FC(1, 0, Number.MAX_VALUE);\n public static readonly dNumberMin = FC(1, 0, Number.MIN_VALUE);\n\n public sign: number = Number.NaN;\n public mag: number = Number.NaN;\n public layer: number = Number.NaN;\n\n constructor(value?: DecimalSource) {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n this.fromDecimal(value);\n } else if (typeof value === \"number\") {\n this.fromNumber(value);\n } else if (typeof value === \"string\") {\n this.fromString(value);\n } else {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n }\n }\n\n get m(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n const exp = Math.floor(Math.log10(this.mag));\n //handle special case 5e-324\n let man;\n if (this.mag === 5e-324) {\n man = 5;\n } else {\n man = this.mag / powerOf10(exp);\n }\n return this.sign * man;\n } else if (this.layer === 1) {\n const residue = this.mag - Math.floor(this.mag);\n return this.sign * Math.pow(10, residue);\n } else {\n //mantissa stops being relevant past 1e9e15 / ee15.954\n return this.sign;\n }\n }\n\n set m(value: number) {\n if (this.layer <= 2) {\n this.fromMantissaExponent(value, this.e);\n } else {\n //don't even pretend mantissa is meaningful\n this.sign = Math.sign(value);\n if (this.sign === 0) {\n this.layer === 0;\n this.exponent === 0;\n }\n }\n }\n\n get e(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n return Math.floor(Math.log10(this.mag));\n } else if (this.layer === 1) {\n return Math.floor(this.mag);\n } else if (this.layer === 2) {\n return Math.floor(Math.sign(this.mag) * Math.pow(10, Math.abs(this.mag)));\n } else {\n return this.mag * Number.POSITIVE_INFINITY;\n }\n }\n set e(value: number) {\n this.fromMantissaExponent(this.m, value);\n }\n\n get s(): number {\n return this.sign;\n }\n set s(value: number) {\n if (value === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n } else {\n this.sign = value;\n }\n }\n\n // Object.defineProperty(Decimal.prototype, \"mantissa\", {\n get mantissa(): number {\n return this.m;\n }\n\n set mantissa(value: number) {\n this.m = value;\n }\n\n get exponent(): number {\n return this.e;\n }\n set exponent(value: number) {\n this.e = value;\n }\n\n public static fromComponents(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents(sign, layer, mag);\n }\n\n public static fromComponents_noNormalize(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents_noNormalize(sign, layer, mag);\n }\n\n public static fromMantissaExponent(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent(mantissa, exponent);\n }\n\n public static fromMantissaExponent_noNormalize(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent_noNormalize(mantissa, exponent);\n }\n\n public static fromDecimal(value: Decimal): Decimal {\n return new Decimal().fromDecimal(value);\n }\n\n public static fromNumber(value: number): Decimal {\n return new Decimal().fromNumber(value);\n }\n\n public static fromString(value: string): Decimal {\n return new Decimal().fromString(value);\n }\n\n public static fromValue(value: DecimalSource): Decimal {\n return new Decimal().fromValue(value);\n }\n\n public static fromValue_noAlloc(value: DecimalSource): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n }\n\n public static abs(value: DecimalSource): Decimal {\n return D(value).abs();\n }\n\n public static neg(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negate(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negated(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static sign(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static sgn(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static round(value: DecimalSource): Decimal {\n return D(value).round();\n }\n\n public static floor(value: DecimalSource): Decimal {\n return D(value).floor();\n }\n\n public static ceil(value: DecimalSource): Decimal {\n return D(value).ceil();\n }\n\n public static trunc(value: DecimalSource): Decimal {\n return D(value).trunc();\n }\n\n public static add(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static plus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static sub(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static subtract(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static minus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static mul(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static multiply(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static times(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static div(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static divide(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static recip(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocal(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocate(value: DecimalSource): Decimal {\n return D(value).reciprocate();\n }\n\n public static cmp(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static cmpabs(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmpabs(other);\n }\n\n public static compare(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static isNaN(value: DecimalSource): boolean {\n value = D(value);\n return isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag);\n }\n\n public static isFinite(value: DecimalSource): boolean {\n value = D(value);\n return isFinite(value.sign) && isFinite(value.layer) && isFinite(value.mag);\n }\n\n public static eq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static equals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static neq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).neq(other);\n }\n\n public static notEquals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).notEquals(other);\n }\n\n public static lt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lt(other);\n }\n\n public static lte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lte(other);\n }\n\n public static gt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gt(other);\n }\n\n public static gte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gte(other);\n }\n\n public static max(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).max(other);\n }\n\n public static min(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).min(other);\n }\n\n public static minabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).minabs(other);\n }\n\n public static maxabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).maxabs(other);\n }\n\n public static clamp(value: DecimalSource, min: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clamp(min, max);\n }\n\n public static clampMin(value: DecimalSource, min: DecimalSource): Decimal {\n return D(value).clampMin(min);\n }\n\n public static clampMax(value: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clampMax(max);\n }\n\n public static cmp_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static compare_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static eq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static equals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static neq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).neq_tolerance(other, tolerance);\n }\n\n public static notEquals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).notEquals_tolerance(other, tolerance);\n }\n\n public static lt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lt_tolerance(other, tolerance);\n }\n\n public static lte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lte_tolerance(other, tolerance);\n }\n\n public static gt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gt_tolerance(other, tolerance);\n }\n\n public static gte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gte_tolerance(other, tolerance);\n }\n\n public static pLog10(value: DecimalSource): Decimal {\n return D(value).pLog10();\n }\n\n public static absLog10(value: DecimalSource): Decimal {\n return D(value).absLog10();\n }\n\n public static log10(value: DecimalSource): Decimal {\n return D(value).log10();\n }\n\n public static log(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).log(base);\n }\n\n public static log2(value: DecimalSource): Decimal {\n return D(value).log2();\n }\n\n public static ln(value: DecimalSource): Decimal {\n return D(value).ln();\n }\n\n public static logarithm(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).logarithm(base);\n }\n\n public static pow(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).pow(other);\n }\n\n public static pow10(value: DecimalSource): Decimal {\n return D(value).pow10();\n }\n\n public static root(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).root(other);\n }\n\n public static factorial(value: DecimalSource, _other?: never): Decimal {\n return D(value).factorial();\n }\n\n public static gamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).gamma();\n }\n\n public static lngamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).lngamma();\n }\n\n public static exp(value: DecimalSource): Decimal {\n return D(value).exp();\n }\n\n public static sqr(value: DecimalSource): Decimal {\n return D(value).sqr();\n }\n\n public static sqrt(value: DecimalSource): Decimal {\n return D(value).sqrt();\n }\n\n public static cube(value: DecimalSource): Decimal {\n return D(value).cube();\n }\n\n public static cbrt(value: DecimalSource): Decimal {\n return D(value).cbrt();\n }\n\n public static tetrate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).tetrate(height, payload);\n }\n\n public static iteratedexp(value: DecimalSource, height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return D(value).iteratedexp(height, payload);\n }\n\n public static iteratedlog(value: DecimalSource, base: DecimalSource = 10, times = 1): Decimal {\n return D(value).iteratedlog(base, times);\n }\n\n public static layeradd10(value: DecimalSource, diff: DecimalSource): Decimal {\n return D(value).layeradd10(diff);\n }\n\n public static layeradd(value: DecimalSource, diff: number, base = 10): Decimal {\n return D(value).layeradd(diff, base);\n }\n\n public static slog(value: DecimalSource, base = 10): Decimal {\n return D(value).slog(base);\n }\n\n public static lambertw(value: DecimalSource): Decimal {\n return D(value).lambertw();\n }\n\n public static ssqrt(value: DecimalSource): Decimal {\n return D(value).ssqrt();\n }\n\n public static pentate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).pentate(height, payload);\n }\n\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something\n * with exponentially increasing cost each purchase (start at priceStart,\n * multiply by priceRatio, already own currentOwned), how much of it can you buy?\n * Adapted from Trimps source code.\n */\n\n public static affordGeometricSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordGeometricSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceRatio),\n currentOwned\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it multiplies by priceRatio each purchase?\n */\n\n public static sumGeometricSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumGeometricSeries_core(numItems, D(priceStart), D(priceRatio), currentOwned);\n }\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something with additively\n * increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned),\n * how much of it can you buy?\n */\n\n public static affordArithmeticSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordArithmeticSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it adds priceAdd each purchase?\n * Adapted from http://www.mathwords.com/a/arithmetic_series.htm\n */\n\n public static sumArithmeticSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumArithmeticSeries_core(\n D(numItems),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * When comparing two purchases that cost (resource) and increase your resource/sec by (deltaRpS),\n * the lowest efficiency score is the better one to purchase.\n * From Frozen Cookies:\n * http://cookieclicker.wikia.com/wiki/Frozen_Cookies_(JavaScript_Add-on)#Efficiency.3F_What.27s_that.3F\n */\n\n public static efficiencyOfPurchase(\n cost: DecimalSource,\n currentRpS: DecimalSource,\n deltaRpS: DecimalSource\n ): Decimal {\n return this.efficiencyOfPurchase_core(D(cost), D(currentRpS), D(deltaRpS));\n }\n\n public static randomDecimalForTesting(maxLayers: number): Decimal {\n // NOTE: This doesn't follow any kind of sane random distribution, so use this for testing purposes only.\n //5% of the time, return 0\n if (Math.random() * 20 < 1) {\n return FC_NN(0, 0, 0);\n }\n\n const randomsign = Math.random() > 0.5 ? 1 : -1;\n\n //5% of the time, return 1 or -1\n if (Math.random() * 20 < 1) {\n return FC_NN(randomsign, 0, 1);\n }\n\n //pick a random layer\n const layer = Math.floor(Math.random() * (maxLayers + 1));\n\n let randomexp = layer === 0 ? Math.random() * 616 - 308 : Math.random() * 16;\n //10% of the time, make it a simple power of 10\n if (Math.random() > 0.9) {\n randomexp = Math.trunc(randomexp);\n }\n let randommag = Math.pow(10, randomexp);\n //10% of the time, trunc mag\n if (Math.random() > 0.9) {\n randommag = Math.trunc(randommag);\n }\n return FC(randomsign, layer, randommag);\n }\n\n public static affordGeometricSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n const actualStart = priceStart.mul(priceRatio.pow(currentOwned));\n return Decimal.floor(\n resourcesAvailable\n .div(actualStart)\n .mul(priceRatio.sub(1))\n .add(1)\n .log10()\n .div(priceRatio.log10())\n );\n }\n\n public static sumGeometricSeries_core(\n numItems: DecimalSource,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n return priceStart\n .mul(priceRatio.pow(currentOwned))\n .mul(Decimal.sub(1, priceRatio.pow(numItems)))\n .div(Decimal.sub(1, priceRatio));\n }\n\n public static affordArithmeticSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n // n = (-(a-d/2) + sqrt((a-d/2)^2+2dS))/d\n // where a is actualStart, d is priceAdd and S is resourcesAvailable\n // then floor it and you're done!\n const actualStart = priceStart.add(currentOwned.mul(priceAdd));\n const b = actualStart.sub(priceAdd.div(2));\n const b2 = b.pow(2);\n return b\n .neg()\n .add(b2.add(priceAdd.mul(resourcesAvailable).mul(2)).sqrt())\n .div(priceAdd)\n .floor();\n }\n\n public static sumArithmeticSeries_core(\n numItems: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n const actualStart = priceStart.add(currentOwned.mul(priceAdd)); // (n/2)*(2*a+(n-1)*d)\n\n return numItems.div(2).mul(actualStart.mul(2).plus(numItems.sub(1).mul(priceAdd)));\n }\n\n public static efficiencyOfPurchase_core(\n cost: Decimal,\n currentRpS: Decimal,\n deltaRpS: Decimal\n ): Decimal {\n return cost.div(currentRpS).add(cost.div(deltaRpS));\n }\n\n public [Symbol.for(\"+\")](other: DecimalSource): DecimalSource {\n return this.add(other);\n }\n\n public [Symbol.for(\"-\")](other: DecimalSource): DecimalSource {\n return this.sub(other);\n }\n\n public [Symbol.for(\"*\")](other: DecimalSource): DecimalSource {\n return this.times(other);\n }\n\n public [Symbol.for(\"/\")](other: DecimalSource): DecimalSource {\n return this.div(other);\n }\n\n public [Symbol.for(\"minus\")](): DecimalSource {\n return this.neg();\n }\n\n public [Symbol.for(\"==\")](other: DecimalSource): boolean {\n return this.eq(other);\n }\n\n public [Symbol.for(\">\")](other: DecimalSource): boolean {\n return this.gt(other);\n }\n\n public [Symbol.for(\"<\")](other: DecimalSource): boolean {\n return this.lt(other);\n }\n\n public [Symbol.for(\">=\")](other: DecimalSource): boolean {\n return this.gte(other);\n }\n\n public [Symbol.for(\"<=\")](other: DecimalSource): boolean {\n return this.lte(other);\n }\n\n public [Symbol.for(\"!=\")](other: DecimalSource): boolean {\n return this.neq(other);\n }\n\n public normalize(): this {\n /*\n PSEUDOCODE:\n Whenever we are partially 0 (sign is 0 or mag and layer is 0), make it fully 0.\n Whenever we are at or hit layer 0, extract sign from negative mag.\n If layer === 0 and mag < FIRST_NEG_LAYER (1/9e15), shift to 'first negative layer' (add layer, log10 mag).\n While abs(mag) > EXP_LIMIT (9e15), layer += 1, mag = maglog10(mag).\n While abs(mag) < LAYER_DOWN (15.954) and layer > 0, layer -= 1, mag = pow(10, mag).\n\n When we're done, all of the following should be true OR one of the numbers is not IsFinite OR layer is not IsInteger (error state):\n Any 0 is totally zero (0, 0, 0).\n Anything layer 0 has mag 0 OR mag > 1/9e15 and < 9e15.\n Anything layer 1 or higher has abs(mag) >= 15.954 and < 9e15.\n We will assume in calculations that all Decimals are either erroneous or satisfy these criteria. (Otherwise: Garbage in, garbage out.)\n */\n if (this.sign === 0 || (this.mag === 0 && this.layer === 0)) {\n this.sign = 0;\n this.mag = 0;\n this.layer = 0;\n return this;\n }\n\n if (this.layer === 0 && this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n }\n\n //Handle shifting from layer 0 to negative layers.\n if (this.layer === 0 && this.mag < FIRST_NEG_LAYER) {\n this.layer += 1;\n this.mag = Math.log10(this.mag);\n return this;\n }\n\n let absmag = Math.abs(this.mag);\n let signmag = Math.sign(this.mag);\n\n if (absmag >= EXP_LIMIT) {\n this.layer += 1;\n this.mag = signmag * Math.log10(absmag);\n return this;\n } else {\n while (absmag < LAYER_DOWN && this.layer > 0) {\n this.layer -= 1;\n if (this.layer === 0) {\n this.mag = Math.pow(10, this.mag);\n } else {\n this.mag = signmag * Math.pow(10, absmag);\n absmag = Math.abs(this.mag);\n signmag = Math.sign(this.mag);\n }\n }\n if (this.layer === 0) {\n if (this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n } else if (this.mag === 0) {\n //excessive rounding can give us all zeroes\n this.sign = 0;\n }\n }\n }\n\n return this;\n }\n\n public fromComponents(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n\n this.normalize();\n return this;\n }\n\n public fromComponents_noNormalize(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n return this;\n }\n\n public fromMantissaExponent(mantissa: number, exponent: number): this {\n this.layer = 1;\n this.sign = Math.sign(mantissa);\n mantissa = Math.abs(mantissa);\n this.mag = exponent + Math.log10(mantissa);\n\n this.normalize();\n return this;\n }\n\n public fromMantissaExponent_noNormalize(mantissa: number, exponent: number): this {\n //The idea of 'normalizing' a break_infinity.js style Decimal doesn't really apply. So just do the same thing.\n this.fromMantissaExponent(mantissa, exponent);\n return this;\n }\n\n public fromDecimal(value: Decimal): this {\n this.sign = value.sign;\n this.layer = value.layer;\n this.mag = value.mag;\n return this;\n }\n\n public fromNumber(value: number): this {\n this.mag = Math.abs(value);\n this.sign = Math.sign(value);\n this.layer = 0;\n this.normalize();\n return this;\n }\n\n public fromString(value: string): Decimal {\n if (IGNORE_COMMAS) {\n value = value.replace(\",\", \"\");\n } else if (COMMAS_ARE_DECIMAL_POINTS) {\n value = value.replace(\",\", \".\");\n }\n\n //Handle x^^^y format.\n const pentationparts = value.split(\"^^^\");\n if (pentationparts.length === 2) {\n const base = parseFloat(pentationparts[0]);\n const height = parseFloat(pentationparts[1]);\n const heightparts = pentationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.pentate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^^y format.\n const tetrationparts = value.split(\"^^\");\n if (tetrationparts.length === 2) {\n const base = parseFloat(tetrationparts[0]);\n const height = parseFloat(tetrationparts[1]);\n const heightparts = tetrationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^y format.\n const powparts = value.split(\"^\");\n if (powparts.length === 2) {\n const base = parseFloat(powparts[0]);\n const exponent = parseFloat(powparts[1]);\n if (isFinite(base) && isFinite(exponent)) {\n const result = Decimal.pow(base, exponent);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle various cases involving it being a Big Number.\n value = value.trim().toLowerCase();\n\n //handle X PT Y format.\n let base;\n let height;\n let ptparts = value.split(\"pt\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //handle XpY format (it's the same thing just with p).\n ptparts = value.split(\"p\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n const parts = value.split(\"e\");\n const ecount = parts.length - 1;\n\n //Handle numbers that are exactly floats (0 or 1 es).\n if (ecount === 0) {\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt)) {\n return this.fromNumber(numberAttempt);\n }\n } else if (ecount === 1) {\n //Very small numbers (\"2e-3000\" and so on) may look like valid floats but round to 0.\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt) && numberAttempt !== 0) {\n return this.fromNumber(numberAttempt);\n }\n }\n\n //Handle new (e^N)X format.\n const newparts = value.split(\"e^\");\n if (newparts.length === 2) {\n this.sign = 1;\n if (newparts[0].charAt(0) == \"-\") {\n this.sign = -1;\n }\n let layerstring = \"\";\n for (let i = 0; i < newparts[1].length; ++i) {\n const chrcode = newparts[1].charCodeAt(i);\n if ((chrcode >= 43 && chrcode <= 57) || chrcode === 101) {\n //is \"0\" to \"9\" or \"+\" or \"-\" or \".\" or \"e\" (or \",\" or \"/\")\n layerstring += newparts[1].charAt(i);\n } //we found the end of the layer count\n else {\n this.layer = parseFloat(layerstring);\n this.mag = parseFloat(newparts[1].substr(i + 1));\n this.normalize();\n return this;\n }\n }\n }\n\n if (ecount < 1) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n const mantissa = parseFloat(parts[0]);\n if (mantissa === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n let exponent = parseFloat(parts[parts.length - 1]);\n //handle numbers like AeBeC and AeeeeBeC\n if (ecount >= 2) {\n const me = parseFloat(parts[parts.length - 2]);\n if (isFinite(me)) {\n exponent *= Math.sign(me);\n exponent += f_maglog10(me);\n }\n }\n\n //Handle numbers written like eee... (N es) X\n if (!isFinite(mantissa)) {\n this.sign = parts[0] === \"-\" ? -1 : 1;\n this.layer = ecount;\n this.mag = exponent;\n }\n //Handle numbers written like XeY\n else if (ecount === 1) {\n this.sign = Math.sign(mantissa);\n this.layer = 1;\n //Example: 2e10 is equal to 10^log10(2e10) which is equal to 10^(10+log10(2))\n this.mag = exponent + Math.log10(Math.abs(mantissa));\n }\n //Handle numbers written like Xeee... (N es) Y\n else {\n this.sign = Math.sign(mantissa);\n this.layer = ecount;\n if (ecount === 2) {\n const result = Decimal.mul(FC(1, 2, exponent), D(mantissa));\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n } else {\n //at eee and above, mantissa is too small to be recognizable!\n this.mag = exponent;\n }\n }\n\n this.normalize();\n return this;\n }\n\n public fromValue(value: DecimalSource): Decimal {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n return this.fromDecimal(value);\n }\n\n if (typeof value === \"number\") {\n return this.fromNumber(value);\n }\n\n if (typeof value === \"string\") {\n return this.fromString(value);\n }\n\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n\n public toNumber(): number {\n if (!Number.isFinite(this.layer)) {\n return Number.NaN;\n }\n if (this.layer === 0) {\n return this.sign * this.mag;\n } else if (this.layer === 1) {\n return this.sign * Math.pow(10, this.mag);\n } //overflow for any normalized Decimal\n else {\n return this.mag > 0\n ? this.sign > 0\n ? Number.POSITIVE_INFINITY\n : Number.NEGATIVE_INFINITY\n : 0;\n }\n }\n\n public mantissaWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.m)) {\n return Number.NaN;\n }\n\n if (this.m === 0) {\n return 0;\n }\n\n return decimalPlaces(this.m, places);\n }\n\n public magnitudeWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.mag)) {\n return Number.NaN;\n }\n\n if (this.mag === 0) {\n return 0;\n }\n\n return decimalPlaces(this.mag, places);\n }\n\n public toString(): string {\n if (isNaN(this.layer) || isNaN(this.sign) || isNaN(this.mag)) {\n return \"NaN\";\n }\n if (this.mag === Number.POSITIVE_INFINITY || this.layer === Number.POSITIVE_INFINITY) {\n return this.sign === 1 ? \"Infinity\" : \"-Infinity\";\n }\n\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toString();\n }\n return this.m + \"e\" + this.e;\n } else if (this.layer === 1) {\n return this.m + \"e\" + this.e;\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (this.sign === -1 ? \"-\" : \"\") + \"e\".repeat(this.layer) + this.mag;\n } else {\n return (this.sign === -1 ? \"-\" : \"\") + \"(e^\" + this.layer + \")\" + this.mag;\n }\n }\n }\n\n public toExponential(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toExponential(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toFixed(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toPrecision(places: number): string {\n if (this.e <= -7) {\n return this.toExponential(places - 1);\n }\n\n if (places > this.e) {\n return this.toFixed(places - this.exponent - 1);\n }\n\n return this.toExponential(places - 1);\n }\n\n public valueOf(): string {\n return this.toString();\n }\n\n public toJSON(): string {\n return this.toString();\n }\n\n public toStringWithDecimalPlaces(places: number): string {\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else if (this.layer === 1) {\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"e\".repeat(this.layer) +\n decimalPlaces(this.mag, places)\n );\n } else {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"(e^\" +\n this.layer +\n \")\" +\n decimalPlaces(this.mag, places)\n );\n }\n }\n }\n\n public abs(): Decimal {\n return FC_NN(this.sign === 0 ? 0 : 1, this.layer, this.mag);\n }\n\n public neg(): Decimal {\n return FC_NN(-this.sign, this.layer, this.mag);\n }\n\n public negate(): Decimal {\n return this.neg();\n }\n\n public negated(): Decimal {\n return this.neg();\n }\n\n // public sign () {\n // return this.sign;\n // }\n\n public sgn(): number {\n return this.sign;\n }\n\n public round(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.round(this.mag));\n }\n return this;\n }\n\n public floor(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.floor(this.mag));\n }\n return this;\n }\n\n public ceil(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.ceil(this.mag));\n }\n return this;\n }\n\n public trunc(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.trunc(this.mag));\n }\n return this;\n }\n\n public add(value: DecimalSource): this | Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return the other number.\n if (this.sign === 0) {\n return decimal;\n }\n if (decimal.sign === 0) {\n return this;\n }\n\n //Special case - Adding a number to its negation produces 0, no matter how large.\n if (\n this.sign === -decimal.sign &&\n this.layer === decimal.layer &&\n this.mag === decimal.mag\n ) {\n return FC_NN(0, 0, 0);\n }\n\n let a;\n let b;\n\n //Special case: If one of the numbers is layer 2 or higher, just take the bigger number.\n if (this.layer >= 2 || decimal.layer >= 2) {\n return this.maxabs(decimal);\n }\n\n if (Decimal.cmpabs(this, decimal) > 0) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * a.mag + b.sign * b.mag);\n }\n\n const layera = a.layer * Math.sign(a.mag);\n const layerb = b.layer * Math.sign(b.mag);\n\n //If one of the numbers is 2+ layers higher than the other, just take the bigger number.\n if (layera - layerb >= 2) {\n return a;\n }\n\n if (layera === 0 && layerb === -1) {\n if (Math.abs(b.mag - Math.log10(a.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, Math.log10(a.mag) - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n }\n\n if (layera === 1 && layerb === 0) {\n if (Math.abs(a.mag - Math.log10(b.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - Math.log10(b.mag));\n const mantissa = b.sign + a.sign * magdiff;\n return FC(\n Math.sign(mantissa),\n 1,\n Math.log10(b.mag) + Math.log10(Math.abs(mantissa))\n );\n }\n }\n\n if (Math.abs(a.mag - b.mag) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n\n throw Error(\"Bad arguments to add: \" + this + \", \" + value);\n }\n\n public plus(value: DecimalSource): Decimal {\n return this.add(value);\n }\n\n public sub(value: DecimalSource): Decimal {\n return this.add(D(value).neg());\n }\n\n public subtract(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public minus(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public mul(value: DecimalSource): Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return 0.\n if (this.sign === 0 || decimal.sign === 0) {\n return FC_NN(0, 0, 0);\n }\n\n //Special case - Multiplying a number by its own reciprocal yields +/- 1, no matter how large.\n if (this.layer === decimal.layer && this.mag === -decimal.mag) {\n return FC_NN(this.sign * decimal.sign, 0, 1);\n }\n\n let a;\n let b;\n\n //Which number is bigger in terms of its multiplicative distance from 1?\n if (\n this.layer > decimal.layer ||\n (this.layer == decimal.layer && Math.abs(this.mag) > Math.abs(decimal.mag))\n ) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * b.sign * a.mag * b.mag);\n }\n\n //Special case: If one of the numbers is layer 3 or higher or one of the numbers is 2+ layers bigger than the other, just take the bigger number.\n if (a.layer >= 3 || a.layer - b.layer >= 2) {\n return FC(a.sign * b.sign, a.layer, a.mag);\n }\n\n if (a.layer === 1 && b.layer === 0) {\n return FC(a.sign * b.sign, 1, a.mag + Math.log10(b.mag));\n }\n\n if (a.layer === 1 && b.layer === 1) {\n return FC(a.sign * b.sign, 1, a.mag + b.mag);\n }\n\n if (a.layer === 2 && b.layer === 1) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n if (a.layer === 2 && b.layer === 2) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n throw Error(\"Bad arguments to mul: \" + this + \", \" + value);\n }\n\n public multiply(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public times(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public div(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.mul(decimal.recip());\n }\n\n public divide(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public divideBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public dividedBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public recip(): Decimal {\n if (this.mag === 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, 1 / this.mag);\n } else {\n return FC(this.sign, this.layer, -this.mag);\n }\n }\n\n public reciprocal(): Decimal {\n return this.recip();\n }\n\n public reciprocate(): Decimal {\n return this.recip();\n }\n\n /**\n * -1 for less than value, 0 for equals value, 1 for greater than value\n */\n public cmp(value: DecimalSource): CompareResult {\n const decimal = D(value);\n if (this.sign > decimal.sign) {\n return 1;\n }\n if (this.sign < decimal.sign) {\n return -1;\n }\n return (this.sign * this.cmpabs(value)) as CompareResult;\n }\n\n public cmpabs(value: DecimalSource): CompareResult {\n const decimal = D(value);\n const layera = this.mag > 0 ? this.layer : -this.layer;\n const layerb = decimal.mag > 0 ? decimal.layer : -decimal.layer;\n if (layera > layerb) {\n return 1;\n }\n if (layera < layerb) {\n return -1;\n }\n if (this.mag > decimal.mag) {\n return 1;\n }\n if (this.mag < decimal.mag) {\n return -1;\n }\n return 0;\n }\n\n public compare(value: DecimalSource): CompareResult {\n return this.cmp(value);\n }\n\n public isNan(): boolean {\n return isNaN(this.sign) || isNaN(this.layer) || isNaN(this.mag);\n }\n\n public isFinite(): boolean {\n return isFinite(this.sign) && isFinite(this.layer) && isFinite(this.mag);\n }\n\n public eq(value: DecimalSource): boolean {\n const decimal = D(value);\n return (\n this.sign === decimal.sign && this.layer === decimal.layer && this.mag === decimal.mag\n );\n }\n\n public equals(value: DecimalSource): boolean {\n return this.eq(value);\n }\n\n public neq(value: DecimalSource): boolean {\n return !this.eq(value);\n }\n\n public notEquals(value: DecimalSource): boolean {\n return this.neq(value);\n }\n\n public lt(value: DecimalSource): boolean {\n return this.cmp(value) === -1;\n }\n\n public lte(value: DecimalSource): boolean {\n return !this.gt(value);\n }\n\n public gt(value: DecimalSource): boolean {\n return this.cmp(value) === 1;\n }\n\n public gte(value: DecimalSource): boolean {\n return !this.lt(value);\n }\n\n public max(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.lt(decimal) ? decimal : this;\n }\n\n public min(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.gt(decimal) ? decimal : this;\n }\n\n public maxabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) < 0 ? decimal : this;\n }\n\n public minabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) > 0 ? decimal : this;\n }\n\n public clamp(min: DecimalSource, max: DecimalSource): Decimal {\n return this.max(min).min(max);\n }\n\n public clampMin(min: DecimalSource): Decimal {\n return this.max(min);\n }\n\n public clampMax(max: DecimalSource): Decimal {\n return this.min(max);\n }\n\n public cmp_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) ? 0 : this.cmp(decimal);\n }\n\n public compare_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n return this.cmp_tolerance(value, tolerance);\n }\n\n /**\n * Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments.\n * For example, if you put in 1e-9, then any number closer to the\n * larger number than (larger number)*1e-9 will be considered equal.\n */\n public eq_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value); // https://stackoverflow.com/a/33024979\n if (tolerance == null) {\n tolerance = 1e-7;\n }\n //Numbers that are too far away are never close.\n if (this.sign !== decimal.sign) {\n return false;\n }\n if (Math.abs(this.layer - decimal.layer) > 1) {\n return false;\n }\n // return abs(a-b) <= tolerance * max(abs(a), abs(b))\n let magA = this.mag;\n let magB = decimal.mag;\n if (this.layer > decimal.layer) {\n magB = f_maglog10(magB);\n }\n if (this.layer < decimal.layer) {\n magA = f_maglog10(magA);\n }\n return Math.abs(magA - magB) <= tolerance * Math.max(Math.abs(magA), Math.abs(magB));\n }\n\n public equals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.eq_tolerance(value, tolerance);\n }\n\n public neq_tolerance(value: DecimalSource, tolerance: number): boolean {\n return !this.eq_tolerance(value, tolerance);\n }\n\n public notEquals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.neq_tolerance(value, tolerance);\n }\n\n public lt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.lt(decimal);\n }\n\n public lte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.lt(decimal);\n }\n\n public gt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.gt(decimal);\n }\n\n public gte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.gt(decimal);\n }\n\n public pLog10(): Decimal {\n if (this.lt(Decimal.dZero)) {\n return Decimal.dZero;\n }\n return this.log10();\n }\n\n public absLog10(): Decimal {\n if (this.sign === 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(1, 0, Math.log10(this.mag));\n }\n }\n\n public log10(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(this.sign, 0, Math.log10(this.mag));\n }\n }\n\n public log(base: DecimalSource): Decimal {\n base = D(base);\n if (this.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign === 1 && base.layer === 0 && base.mag === 1) {\n return Decimal.dNaN;\n } else if (this.layer === 0 && base.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag) / Math.log(base.mag));\n }\n\n return Decimal.div(this.log10(), base.log10());\n }\n\n public log2(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log2(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 3.321928094887362); //log2(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.5213902276543247); //-log10(log10(2))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public ln(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 2.302585092994046); //ln(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.36221568869946325); //log10(log10(e))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public logarithm(base: DecimalSource): Decimal {\n return this.log(base);\n }\n\n public pow(value: DecimalSource): Decimal {\n const decimal = D(value);\n const a = this;\n const b = decimal;\n\n //special case: if a is 0, then return 0 (UNLESS b is 0, then return 1)\n if (a.sign === 0) {\n return b.eq(0) ? FC_NN(1, 0, 1) : a;\n }\n //special case: if a is 1, then return 1\n if (a.sign === 1 && a.layer === 0 && a.mag === 1) {\n return a;\n }\n //special case: if b is 0, then return 1\n if (b.sign === 0) {\n return FC_NN(1, 0, 1);\n }\n //special case: if b is 1, then return a\n if (b.sign === 1 && b.layer === 0 && b.mag === 1) {\n return a;\n }\n\n const result = a\n .absLog10()\n .mul(b)\n .pow10();\n\n if (this.sign === -1) {\n if (Math.abs(b.toNumber() % 2) % 2 === 1) {\n return result.neg();\n } else if (Math.abs(b.toNumber() % 2) % 2 === 0) {\n return result;\n }\n return Decimal.dNaN;\n }\n\n return result;\n }\n\n public pow10(): Decimal {\n /*\n There are four cases we need to consider:\n 1) positive sign, positive mag (e15, ee15): +1 layer (e.g. 10^15 becomes e15, 10^e15 becomes ee15)\n 2) negative sign, positive mag (-e15, -ee15): +1 layer but sign and mag sign are flipped (e.g. 10^-15 becomes e-15, 10^-e15 becomes ee-15)\n 3) positive sign, negative mag (e-15, ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n 4) negative sign, negative mag (-e-15, -ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n */\n\n if (!Number.isFinite(this.layer) || !Number.isFinite(this.mag)) {\n return Decimal.dNaN;\n }\n\n let a = this;\n\n //handle layer 0 case - if no precision is lost just use Math.pow, else promote one layer\n if (a.layer === 0) {\n const newmag = Math.pow(10, a.sign * a.mag);\n if (Number.isFinite(newmag) && Math.abs(newmag) >= 0.1) {\n return FC(1, 0, newmag);\n } else {\n if (a.sign === 0) {\n return Decimal.dOne;\n } else {\n a = FC_NN(a.sign, a.layer + 1, Math.log10(a.mag)) as this;\n }\n }\n }\n\n //handle all 4 layer 1+ cases individually\n if (a.sign > 0 && a.mag >= 0) {\n return FC(a.sign, a.layer + 1, a.mag);\n }\n if (a.sign < 0 && a.mag >= 0) {\n return FC(-a.sign, a.layer + 1, -a.mag);\n }\n //both the negative mag cases are identical: one +/- rounding error\n return Decimal.dOne;\n }\n\n public pow_base(value: DecimalSource): Decimal {\n return D(value).pow(this);\n }\n\n public root(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.pow(decimal.recip());\n }\n\n public factorial(): Decimal {\n if (this.mag < 0) {\n return this.add(1).gamma();\n } else if (this.layer === 0) {\n return this.add(1).gamma();\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n //from HyperCalc source code\n public gamma(): Decimal {\n if (this.mag < 0) {\n return this.recip();\n } else if (this.layer === 0) {\n if (this.lt(FC_NN(1, 0, 24))) {\n return D(f_gamma(this.sign * this.mag));\n }\n\n const t = this.mag - 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (t + 0.5) * Math.log(t);\n l = l - t;\n const n2 = t * t;\n let np = t;\n let lm = 12 * np;\n let adj = 1 / lm;\n let l2 = l + adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 360 * np;\n adj = 1 / lm;\n l2 = l - adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 1260 * np;\n let lt = 1 / lm;\n l = l + lt;\n np = np * n2;\n lm = 1680 * np;\n lt = 1 / lm;\n l = l - lt;\n return Decimal.exp(l);\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n public lngamma(): Decimal {\n return this.gamma().ln();\n }\n\n public exp(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0 && this.mag <= 709.7) {\n return D(Math.exp(this.sign * this.mag));\n } else if (this.layer === 0) {\n return FC(1, 1, this.sign * Math.log10(Math.E) * this.mag);\n } else if (this.layer === 1) {\n return FC(1, 2, this.sign * (Math.log10(0.4342944819032518) + this.mag));\n } else {\n return FC(1, this.layer + 1, this.sign * this.mag);\n }\n }\n\n public sqr(): Decimal {\n return this.pow(2);\n }\n\n public sqrt(): Decimal {\n if (this.layer === 0) {\n return D(Math.sqrt(this.sign * this.mag));\n } else if (this.layer === 1) {\n return FC(1, 2, Math.log10(this.mag) - 0.3010299956639812);\n } else {\n const result = Decimal.div(FC_NN(this.sign, this.layer - 1, this.mag), FC_NN(1, 0, 2));\n result.layer += 1;\n result.normalize();\n return result;\n }\n }\n\n public cube(): Decimal {\n return this.pow(3);\n }\n\n public cbrt(): Decimal {\n return this.pow(1 / 3);\n }\n\n //Tetration/tetrate: The result of exponentiating 'this' to 'this' 'height' times in a row. https://en.wikipedia.org/wiki/Tetration\n //If payload != 1, then this is 'iterated exponentiation', the result of exping (payload) to base (this) (height) times. https://andydude.github.io/tetration/archives/tetration2/ident.html\n //Works with negative and positive real heights.\n public tetrate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n //x^^1 == x\n if (height === 1) {\n return Decimal.pow(this, payload);\n }\n //x^^0 == 1\n if (height === 0) {\n return new Decimal(payload);\n }\n //1^^x == 1\n if (this.eq(Decimal.dOne)) {\n return Decimal.dOne;\n }\n //-1^^x == -1\n if (this.eq(-1)) {\n return Decimal.pow(this, payload);\n }\n\n if (height === Number.POSITIVE_INFINITY) {\n const this_num = this.toNumber();\n //within the convergence range?\n if (this_num <= 1.44466786100976613366 && this_num >= 0.06598803584531253708) {\n //hotfix for the very edge of the number range not being handled properly\n if (this_num > 1.444667861009099) {\n return new Decimal(Math.E);\n }\n //Formula for infinite height power tower.\n const negln = Decimal.ln(this).neg();\n return negln.lambertw().div(negln);\n } else if (this_num > 1.44466786100976613366) {\n //explodes to infinity\n return new Decimal(Number.POSITIVE_INFINITY);\n } else {\n //0.06598803584531253708 > this_num >= 0: never converges\n //this_num < 0: quickly becomes a complex number\n return Decimal.dNaN;\n }\n }\n\n //0^^x oscillates if we define 0^0 == 1 (which in javascript land we do), since then 0^^1 is 0, 0^^2 is 1, 0^^3 is 0, etc. payload is ignored\n //using the linear approximation for height (TODO: don't know a better way to calculate it ATM, but it wouldn't surprise me if it's just NaN)\n if (this.eq(Decimal.dZero)) {\n let result = Math.abs((height + 1) % 2);\n if (result > 1) {\n result = 2 - result;\n }\n return new Decimal(result);\n }\n\n if (height < 0) {\n return Decimal.iteratedlog(payload, this, -height);\n }\n\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n if (this.gt(Decimal.dZero) && this.lte(1.44466786100976613366)) {\n //similar to 0^^n, flip-flops between two values, converging slowly (or if it's below 0.06598803584531253708, never. so once again, the fractional part at the end will be a linear approximation (TODO: again pending knowledge of how to approximate better, although tbh I think it should in reality just be NaN)\n height = Math.min(10000, height);\n for (let i = 0; i < height; ++i) {\n const old_payload: Decimal = payload;\n payload = this.pow(payload);\n //stop early if we converge\n if (old_payload.eq(payload)) {\n return payload;\n }\n }\n if (fracheight != 0) {\n const next_payload = this.pow(payload);\n return payload.mul(1 - fracheight).add(next_payload.mul(fracheight));\n }\n return payload;\n }\n //TODO: base < 0, but it's hard for me to reason about (probably all non-integer heights are NaN automatically?)\n\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (this.gt(10)) {\n payload = this.pow(fracheight);\n } else {\n payload = D(Decimal.tetrate_critical(this.toNumber(), fracheight));\n //TODO: until the critical section grid can handle numbers below 2, scale them to the base\n //TODO: maybe once the critical section grid has very large bases, this math can be appropriate for them too? I'll think about it\n if (this.lt(2)) {\n payload = payload\n .sub(1)\n .mul(this.minus(1))\n .plus(1);\n }\n }\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.pow(payload);\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //shortcut\n if (payload.layer - this.layer > 3) {\n return FC_NN(payload.sign, payload.layer + (height - i - 1), payload.mag);\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return payload;\n }\n }\n return payload;\n }\n\n //iteratedexp/iterated exponentiation: - all cases handled in tetrate, so just call it\n public iteratedexp(height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return this.tetrate(height, payload);\n }\n\n //iterated log/repeated log: The result of applying log(base) 'times' times in a row. Approximately equal to subtracting (times) from the number's slog representation. Equivalent to tetrating to a negative height.\n //Works with negative and positive real heights.\n public iteratedlog(base: DecimalSource = 10, times = 1): Decimal {\n if (times < 0) {\n return Decimal.tetrate(base, -times, this);\n }\n\n base = D(base);\n let result = D(this);\n const fulltimes = times;\n times = Math.trunc(times);\n const fraction = fulltimes - times;\n if (result.layer - base.layer > 3) {\n const layerloss = Math.min(times, result.layer - base.layer - 3);\n times -= layerloss;\n result.layer -= layerloss;\n }\n\n for (let i = 0; i < times; ++i) {\n result = result.log(base);\n //bail if we're NaN\n if (!isFinite(result.layer) || !isFinite(result.mag)) {\n return result.normalize();\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return result;\n }\n }\n\n //handle fractional part\n if (fraction > 0 && fraction < 1) {\n if (base.eq(10)) {\n result = result.layeradd10(-fraction);\n } else {\n result = result.layeradd(-fraction, base);\n }\n }\n\n return result;\n }\n\n //Super-logarithm, one of tetration's inverses, tells you what size power tower you'd have to tetrate base to to get number. By definition, will never be higher than 1.8e308 in break_eternity.js, since a power tower 1.8e308 numbers tall is the largest representable number.\n // https://en.wikipedia.org/wiki/Super-logarithm\n public slog(base: DecimalSource = 10): Decimal {\n base = D(base);\n\n //special cases:\n //slog base 0 or lower is NaN\n if (base.lte(Decimal.dZero)) {\n return Decimal.dNaN;\n }\n //slog base 1 is NaN\n if (base.eq(Decimal.dOne)) {\n return Decimal.dNaN;\n }\n //need to handle these small, wobbling bases specially\n if (base.lt(Decimal.dOne)) {\n if (this.eq(Decimal.dOne)) {\n return Decimal.dZero;\n }\n if (this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n //0 < this < 1: ambiguous (happens multiple times)\n //this < 0: impossible (as far as I can tell)\n //this > 1: partially complex (http://myweb.astate.edu/wpaulsen/tetcalc/tetcalc.html base 0.25 for proof)\n return Decimal.dNaN;\n }\n //slog_n(0) is -1\n if (this.mag < 0 || this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n\n let result = 0;\n let copy = D(this);\n if (copy.layer - base.layer > 3) {\n const layerloss = copy.layer - base.layer - 3;\n result += layerloss;\n copy.layer -= layerloss;\n }\n\n for (let i = 0; i < 100; ++i) {\n if (copy.lt(Decimal.dZero)) {\n copy = Decimal.pow(base, copy);\n result -= 1;\n } else if (copy.lte(Decimal.dOne)) {\n return D(result + Decimal.slog_critical(base.toNumber(), copy.toNumber()));\n } else {\n result += 1;\n copy = Decimal.log(copy, base);\n }\n }\n return D(result);\n }\n\n //background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\n public static slog_critical(base: number, height: number): number {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (base > 10) {\n return height - 1;\n }\n return Decimal.critical_section(base, height, critical_slog_values);\n }\n\n public static tetrate_critical(base: number, height: number): number {\n return Decimal.critical_section(base, height, critical_tetr_values);\n }\n\n public static critical_section(base: number, height: number, grid: number[][]): number {\n //this part is simple at least, since it's just 0.1 to 0.9\n height *= 10;\n if (height < 0) {\n height = 0;\n }\n if (height > 10) {\n height = 10;\n }\n //have to do this complicated song and dance since one of the critical_headers is Math.E, and in the future I'd like 1.5 as well\n if (base < 2) {\n base = 2;\n }\n if (base > 10) {\n base = 10;\n }\n let lower = 0;\n let upper = 0;\n //basically, if we're between bases, we interpolate each bases' relevant values together\n //then we interpolate based on what the fractional height is.\n //accuracy could be improved by doing a non-linear interpolation (maybe), by adding more bases and heights (definitely) but this is AFAIK the best you can get without running some pari.gp or mathematica program to calculate exact values\n for (let i = 0; i < critical_headers.length; ++i) {\n if (critical_headers[i] == base) {\n // exact match\n lower = grid[i][Math.floor(height)];\n upper = grid[i][Math.ceil(height)];\n break;\n } else if (critical_headers[i] < base && critical_headers[i + 1] > base) {\n // interpolate between this and the next\n const basefrac =\n (base - critical_headers[i]) / (critical_headers[i + 1] - critical_headers[i]);\n lower =\n grid[i][Math.floor(height)] * (1 - basefrac) +\n grid[i + 1][Math.floor(height)] * basefrac;\n upper =\n grid[i][Math.ceil(height)] * (1 - basefrac) +\n grid[i + 1][Math.ceil(height)] * basefrac;\n break;\n }\n }\n const frac = height - Math.floor(height);\n const result = lower * (1 - frac) + upper * frac;\n return result;\n }\n\n //Function for adding/removing layers from a Decimal, even fractional layers (e.g. its slog10 representation).\n //Moved this over to use the same critical section as tetrate/slog.\n public layeradd10(diff: DecimalSource): Decimal {\n diff = Decimal.fromValue_noAlloc(diff).toNumber();\n const result = D(this);\n if (diff >= 1) {\n //bug fix: if result is very smol (mag < 0, layer > 0) turn it into 0 first\n if (result.mag < 0 && result.layer > 0) {\n result.sign = 0;\n result.mag = 0;\n result.layer = 0;\n } else if (result.sign === -1 && result.layer == 0) {\n //bug fix - for stuff like -3.layeradd10(1) we need to move the sign to the mag\n result.sign = 1;\n result.mag = -result.mag;\n }\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n }\n if (diff <= -1) {\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n if (result.layer < 0) {\n for (let i = 0; i < 100; ++i) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n if (!isFinite(result.mag)) {\n //another bugfix: if we hit -Infinity mag, then we should return negative infinity, not 0. 0.layeradd10(-1) h its this\n if (result.sign === 0) {\n result.sign = 1;\n }\n //also this, for 0.layeradd10(-2)\n if (result.layer < 0) {\n result.layer = 0;\n }\n return result.normalize();\n }\n if (result.layer >= 0) {\n break;\n }\n }\n }\n }\n\n while (result.layer < 0) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n }\n //bugfix: before we normalize: if we started with 0, we now need to manually fix a layer ourselves!\n if (result.sign === 0) {\n result.sign = 1;\n if (result.mag === 0 && result.layer >= 1) {\n result.layer -= 1;\n result.mag = 1;\n }\n }\n result.normalize();\n\n //layeradd10: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 10 and iterated log base 10. Also equivalent to adding a fractional amount to the number's layer in its break_eternity.js representation.\n if (diff !== 0) {\n return result.layeradd(diff, 10); //safe, only calls positive height 1 payload tetration, slog and log\n }\n\n return result;\n }\n\n //layeradd: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 'base' and iterated log base 'base'.\n public layeradd(diff: number, base: DecimalSource): Decimal {\n const slogthis = this.slog(base).toNumber();\n const slogdest = slogthis + diff;\n if (slogdest >= 0) {\n return Decimal.tetrate(base, slogdest);\n } else if (!Number.isFinite(slogdest)) {\n return Decimal.dNaN;\n } else if (slogdest >= -1) {\n return Decimal.log(Decimal.tetrate(base, slogdest + 1), base);\n } else {\n return Decimal.log(Decimal.log(Decimal.tetrate(base, slogdest + 2), base), base);\n }\n }\n\n //The Lambert W function, also called the omega function or product logarithm, is the solution W(x) === x*e^x.\n // https://en.wikipedia.org/wiki/Lambert_W_function\n //Some special values, for testing: https://en.wikipedia.org/wiki/Lambert_W_function#Special_values\n public lambertw(): Decimal {\n if (this.lt(-0.3678794411710499)) {\n throw Error(\"lambertw is unimplemented for results less than -1, sorry!\");\n } else if (this.mag < 0) {\n return D(f_lambertw(this.toNumber()));\n } else if (this.layer === 0) {\n return D(f_lambertw(this.sign * this.mag));\n } else if (this.layer === 1) {\n return d_lambertw(this);\n } else if (this.layer === 2) {\n return d_lambertw(this);\n }\n if (this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n\n throw \"Unhandled behavior in lambertw()\";\n }\n\n //The super square-root function - what number, tetrated to height 2, equals this?\n //Other sroots are possible to calculate probably through guess and check methods, this one is easy though.\n // https://en.wikipedia.org/wiki/Tetration#Super-root\n public ssqrt(): Decimal {\n if (this.sign == 1 && this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n const lnx = this.ln();\n return lnx.div(lnx.lambertw());\n }\n /*\n\nUnit tests for tetrate/iteratedexp/iteratedlog/layeradd10/layeradd/slog:\n(note: these won't be exactly precise with the new slog implementation, but that's okay)\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var expected = first+both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(-both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n var expected = first+both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(-both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar tetrateonly = Decimal.tetrate(10, first);\nvar tetrateandlog = Decimal.tetrate(10, first+both).iteratedlog(10, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first);\nvar tetrateandlog = Decimal.tetrate(base, first+both).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first, base);\nvar tetrateandlog = Decimal.tetrate(base, first+both, base).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.random()*100);\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.exp(Math.random()*100));\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n var b = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.add(b).toNumber();\n if (Number.isFinite(c) && !Decimal.eq_tolerance(c, a.toNumber()+b.toNumber()))\n {\n console.log(a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 100; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.mul(b).toNumber();\n if (Number.isFinite(c) && Number.isFinite(a.toNumber()) && Number.isFinite(b.toNumber()) && a.toNumber() != 0 && b.toNumber() != 0 && c != 0 && !Decimal.eq_tolerance(c, a.toNumber()*b.toNumber()))\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n else if (!Decimal.mul(a.recip(), b.recip()).eq_tolerance(Decimal.mul(a, b).recip()))\n {\n console.log(\"Test 3: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5 && a.sign !== 0) { a = a.recip(); }\n if (Math.random() > 0.5 && b.sign !== 0) { b = b.recip(); }\n var c = a.pow(b);\n var d = a.root(b.recip());\n var e = a.pow(b.recip());\n var f = a.root(b);\n\n if (!c.eq_tolerance(d) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n if (!e.eq_tolerance(f) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 2: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Math.round(Math.random()*18-9);\n var b = Math.round(Math.random()*100-50);\n var c = Math.round(Math.random()*18-9);\n var d = Math.round(Math.random()*100-50);\n console.log(\"Decimal.pow(Decimal.fromMantissaExponent(\" + a + \", \" + b + \"), Decimal.fromMantissaExponent(\" + c + \", \" + d + \")).toString()\");\n}\n\n*/\n\n //Pentation/pentate: The result of tetrating 'height' times in a row. An absurdly strong operator - Decimal.pentate(2, 4.28) and Decimal.pentate(10, 2.37) are already too huge for break_eternity.js!\n // https://en.wikipedia.org/wiki/Pentation\n public pentate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n //I have no idea if this is a meaningful approximation for pentation to continuous heights, but it is monotonic and continuous.\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n ++height;\n payload = new Decimal(fracheight);\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.tetrate(payload.toNumber());\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //give up after 10 iterations if nothing is happening\n if (i > 10) {\n return payload;\n }\n }\n\n return payload;\n }\n\n // trig functions!\n public sin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.sin(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public cos(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0) {\n return D(Math.cos(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public tan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.tan(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public asin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.asin(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public acos(): Decimal {\n if (this.mag < 0) {\n return D(Math.acos(this.toNumber()));\n }\n if (this.layer === 0) {\n return D(Math.acos(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public atan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.atan(this.sign * this.mag));\n }\n return D(Math.atan(this.sign * 1.8e308));\n }\n\n public sinh(): Decimal {\n return this.exp()\n .sub(this.negate().exp())\n .div(2);\n }\n\n public cosh(): Decimal {\n return this.exp()\n .add(this.negate().exp())\n .div(2);\n }\n\n public tanh(): Decimal {\n return this.sinh().div(this.cosh());\n }\n\n public asinh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .add(1)\n .sqrt()\n )\n );\n }\n\n public acosh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .sub(1)\n .sqrt()\n )\n );\n }\n\n public atanh(): Decimal {\n if (this.abs().gte(1)) {\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n return Decimal.ln(this.add(1).div(D(1).sub(this))).div(2);\n }\n\n /**\n * Joke function from Realm Grinder\n */\n public ascensionPenalty(ascensions: DecimalSource): Decimal {\n if (ascensions === 0) {\n return this;\n }\n\n return this.root(Decimal.pow(10, ascensions));\n }\n\n /**\n * Joke function from Cookie Clicker. It's 'egg'\n */\n public egg(): Decimal {\n return this.add(9);\n }\n\n public lessThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) < 1;\n }\n\n public lessThan(other: DecimalSource): boolean {\n return this.cmp(other) < 0;\n }\n\n public greaterThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) > -1;\n }\n\n public greaterThan(other: DecimalSource): boolean {\n return this.cmp(other) > 0;\n }\n\n // return Decimal;\n}\n\n// return Decimal;\n","import Decimal, { DecimalSource } from \"lib/break_eternity\";\nimport projInfo from \"data/projInfo.json\";\n\nexport default Decimal;\n\nconst decimalOne = new Decimal(1);\n\nexport function exponentialFormat(num: DecimalSource, precision: number, mantissa = true): string {\n let e = Decimal.log10(num).floor();\n let m = Decimal.div(num, Decimal.pow(10, e));\n if (m.toStringWithDecimalPlaces(precision) === \"10\") {\n m = decimalOne;\n e = e.add(1);\n }\n const eString = e.gte(1e9)\n ? format(e, Math.max(Math.max(precision, 3), projInfo.defaultDecimalsShown))\n : e.gte(10000)\n ? commaFormat(e, 0)\n : e.toStringWithDecimalPlaces(0);\n if (mantissa) {\n return m.toStringWithDecimalPlaces(precision) + \"e\" + eString;\n } else {\n return \"e\" + eString;\n }\n}\n\nexport function commaFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.001) {\n return (0).toFixed(precision);\n }\n const init = num.toStringWithDecimalPlaces(precision);\n const portions = init.split(\".\");\n portions[0] = portions[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1,\");\n if (portions.length == 1) return portions[0];\n return portions[0] + \".\" + portions[1];\n}\n\nexport function regularFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.0001) {\n return (0).toFixed(precision);\n }\n if (num.mag < 0.1 && precision !== 0) {\n precision = Math.max(Math.max(precision, 4), projInfo.defaultDecimalsShown);\n }\n return num.toStringWithDecimalPlaces(precision);\n}\n\nconst eeee1000 = new Decimal(\"eeee1000\");\nconst e100000 = new Decimal(\"e100000\");\nconst e1000 = new Decimal(\"e1000\");\nconst e9 = new Decimal(1e9);\nconst e6 = new Decimal(1e6);\nconst e3 = new Decimal(1e3);\nconst nearOne = new Decimal(0.98);\nconst thousandth = new Decimal(0.001);\nconst zero = new Decimal(0);\nexport function format(num: DecimalSource, precision?: number, small?: boolean): string {\n if (precision == null) precision = projInfo.defaultDecimalsShown;\n small = small ?? projInfo.defaultShowSmall;\n num = new Decimal(num);\n if (isNaN(num.sign) || isNaN(num.layer) || isNaN(num.mag)) {\n return \"NaN\";\n }\n if (num.sign < 0) {\n return \"-\" + format(num.neg(), precision);\n }\n if (num.mag === Number.POSITIVE_INFINITY) {\n return \"Infinity\";\n }\n if (num.gte(eeee1000)) {\n const slog = num.slog();\n if (slog.gte(e6)) {\n return \"F\" + format(slog.floor());\n } else {\n return (\n Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) +\n \"F\" +\n commaFormat(slog.floor(), 0)\n );\n }\n } else if (num.gte(e100000)) {\n return exponentialFormat(num, 0, false);\n } else if (num.gte(e1000)) {\n return exponentialFormat(num, 0);\n } else if (num.gte(e9)) {\n return exponentialFormat(num, precision);\n } else if (num.gte(e3)) {\n return commaFormat(num, 0);\n } else if (num.gte(thousandth) || !small) {\n return regularFormat(num, precision);\n } else if (num.eq(zero)) {\n return (0).toFixed(precision);\n }\n\n num = invertOOM(num);\n if (num.lt(e1000)) {\n const val = exponentialFormat(num, precision);\n return val.replace(/([^(?:e|F)]*)$/, \"-$1\");\n } else {\n return format(num, precision) + \"⁻¹\";\n }\n}\n\nexport function formatWhole(num: DecimalSource): string {\n num = new Decimal(num);\n if (num.sign < 0) {\n return \"-\" + formatWhole(num.neg());\n }\n if (num.gte(e9)) {\n return format(num);\n }\n if (num.lte(nearOne) && !num.eq(zero)) {\n return format(num);\n }\n return format(num, 0);\n}\n\nexport function formatTime(seconds: DecimalSource): string {\n if (Decimal.lt(seconds, 0)) {\n return \"-\" + formatTime(Decimal.neg(seconds));\n }\n if (Decimal.gt(seconds, 2 ** 51)) {\n // integer precision limit\n return format(Decimal.div(seconds, 31536000)) + \"y\";\n }\n seconds = new Decimal(seconds).toNumber();\n if (seconds < 60) {\n return format(seconds) + \"s\";\n } else if (seconds < 3600) {\n return formatWhole(Math.floor(seconds / 60)) + \"m \" + format(seconds % 60) + \"s\";\n } else if (seconds < 86400) {\n return (\n formatWhole(Math.floor(seconds / 3600)) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m \" +\n formatWhole(seconds % 60) +\n \"s\"\n );\n } else if (seconds < 31536000) {\n return (\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m\"\n );\n } else {\n return (\n formatWhole(Math.floor(seconds / 31536000)) +\n \"y \" +\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h\"\n );\n }\n}\n\nexport function toPlaces(x: DecimalSource, precision: number, maxAccepted: DecimalSource): string {\n x = new Decimal(x);\n let result = x.toStringWithDecimalPlaces(precision);\n if (new Decimal(result).gte(maxAccepted)) {\n result = Decimal.sub(maxAccepted, Math.pow(0.1, precision)).toStringWithDecimalPlaces(\n precision\n );\n }\n return result;\n}\n\n// Will also display very small numbers\nexport function formatSmall(x: DecimalSource, precision?: number): string {\n return format(x, precision, true);\n}\n\nexport function invertOOM(x: DecimalSource): Decimal {\n let e = Decimal.log10(x).ceil();\n const m = Decimal.div(x, Decimal.pow(10, e));\n e = e.neg();\n x = new Decimal(10).pow(e).times(m);\n\n return x;\n}\n","// Import Decimal and numberUtils from a different file to globally change which big num library gets used\n// This way switching out big number libraries just needs to happen here, not every file that needs big numbers\nimport { DecimalSource as RawDecimalSource } from \"lib/break_eternity\";\nimport Decimal, * as numberUtils from \"util/break_eternity\";\n\nexport const {\n exponentialFormat,\n commaFormat,\n regularFormat,\n format,\n formatWhole,\n formatTime,\n toPlaces,\n formatSmall,\n invertOOM\n} = numberUtils;\n\nexport type DecimalSource = RawDecimalSource;\n\nwindow.Decimal = Decimal;\nwindow.exponentialFormat = exponentialFormat;\nwindow.commaFormat = commaFormat;\nwindow.regularFormat = regularFormat;\nwindow.format = format;\nwindow.formatWhole = formatWhole;\nwindow.formatTime = formatTime;\nwindow.toPlaces = toPlaces;\nwindow.formatSmall = formatSmall;\nwindow.invertOOM = invertOOM;\n\nexport default Decimal;\n","// Reference:\n// https://stackoverflow.com/questions/7225407/convert-camelcasetext-to-sentence-case-text\nexport function camelToTitle(camel: string): string {\n let title = camel.replace(/([A-Z])/g, \" $1\");\n title = title.charAt(0).toUpperCase() + title.slice(1);\n return title;\n}\n\nexport function isPlainObject(object: unknown): boolean {\n return Object.prototype.toString.call(object) === \"[object Object]\";\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(func: unknown): func is Function {\n return typeof func === \"function\";\n}\n","import { computed, Ref } from \"vue\";\nimport { isFunction } from \"./common\";\n\nexport const DoNotCache = Symbol(\"DoNotCache\");\n\nexport type Computable<T> = T | Ref<T> | (() => T);\nexport type ProcessedComputable<T> = T | Ref<T>;\nexport type GetComputableType<T> = T extends { [DoNotCache]: true }\n ? T\n : T extends () => infer S\n ? Ref<S>\n : undefined extends T\n ? undefined\n : T;\nexport type GetComputableTypeWithDefault<T, S> = undefined extends T\n ? S\n : GetComputableType<NonNullable<T>>;\nexport type UnwrapComputableType<T> = T extends Ref<infer S> ? S : T extends () => infer S ? S : T;\n\nexport type ComputableKeysOf<T> = Pick<\n T,\n {\n [K in keyof T]: T[K] extends Computable<unknown> ? K : never;\n }[keyof T]\n>;\n\n// TODO fix the typing of this function, such that casting isn't necessary and can be used to\n// detect if a createX function is validly written\nexport function processComputable<T, S extends keyof ComputableKeysOf<T>>(\n obj: T,\n key: S\n): asserts obj is T & { [K in S]: ProcessedComputable<UnwrapComputableType<T[S]>> } {\n const computable = obj[key];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(computable) && computable.length === 0 && !(computable as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj[key] = computed(computable.bind(obj));\n }\n}\n\nexport function convertComputable<T>(obj: Computable<T>): ProcessedComputable<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(obj) && !(obj as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj = computed(obj);\n }\n return obj as ProcessedComputable<T>;\n}\n","import Decimal from \"./bignum\";\n\nexport const ProxyState = Symbol(\"ProxyState\");\nexport const ProxyPath = Symbol(\"ProxyPath\");\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ProxiedWithState<T> = NonNullable<T> extends Record<PropertyKey, any>\n ? NonNullable<T> extends Decimal\n ? T\n : {\n [K in keyof T]: ProxiedWithState<T[K]>;\n } & {\n [ProxyState]: T;\n [ProxyPath]: string[];\n }\n : T;\n\n// Takes a function that returns an object and pretends to be that object\n// Note that the object is lazily calculated\nexport function createLazyProxy<T extends object, S>(\n objectFunc: (baseObject: S) => T & S,\n baseObject: S = {} as S\n): T {\n const obj: S & Partial<T> = baseObject;\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return obj as S & T;\n }\n\n return new Proxy(obj, {\n get(target, key) {\n if (key === ProxyState) {\n return calculateObj();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (calculateObj() as any)[key];\n },\n set(target, key, value) {\n // TODO give warning about this? It should only be done with caution\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (calculateObj() as any)[key] = value;\n return true;\n },\n has(target, key) {\n if (key === ProxyState) {\n return true;\n }\n return Reflect.has(calculateObj(), key);\n },\n ownKeys() {\n return Reflect.ownKeys(calculateObj());\n },\n getOwnPropertyDescriptor(target, key) {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as S & T;\n}\n","import projInfo from \"data/projInfo.json\";\nimport player, { Player, PlayerData, stringifySave } from \"game/player\";\nimport settings, { loadSettings } from \"game/settings\";\nimport { ProxyState } from \"./proxies\";\n\nexport function setupInitialStore(player: Partial<PlayerData> = {}): Player {\n return Object.assign(\n {\n id: `${projInfo.id}-0`,\n name: \"Default Save\",\n tabs: projInfo.initialTabs.slice(),\n time: Date.now(),\n autosave: true,\n offlineProd: true,\n offlineTime: 0,\n timePlayed: 0,\n keepGoing: false,\n modID: projInfo.id,\n modVersion: projInfo.versionNumber,\n layers: {}\n },\n player\n ) as Player;\n}\n\nexport function save(): string {\n const stringifiedSave = btoa(unescape(encodeURIComponent(stringifySave(player[ProxyState]))));\n localStorage.setItem(player.id, stringifiedSave);\n return stringifiedSave;\n}\n\nexport async function load(): Promise<void> {\n // Load global settings\n loadSettings();\n\n try {\n const save = localStorage.getItem(settings.active);\n if (save == null) {\n await loadSave(newSave());\n return;\n }\n const player = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (player.modID !== projInfo.id) {\n await loadSave(newSave());\n return;\n }\n player.id = settings.active;\n await loadSave(player);\n } catch (e) {\n console.error(\"Failed to load save. Falling back to new save.\\n\", e);\n await loadSave(newSave());\n }\n}\n\nexport function newSave(): PlayerData {\n const id = getUniqueID();\n const player = setupInitialStore({ id });\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(stringifySave(player)))));\n\n settings.saves.push(id);\n\n return player;\n}\n\nexport function getUniqueID(): string {\n let id,\n i = 0;\n do {\n id = `${projInfo.id}-${i++}`;\n } while (localStorage.getItem(id));\n return id;\n}\n\nexport async function loadSave(playerObj: Partial<PlayerData>): Promise<void> {\n console.info(\"Loading save\", playerObj);\n const { layers, removeLayer, addLayer } = await import(\"game/layers\");\n const { fixOldSave, getInitialLayers } = await import(\"data/projEntry\");\n\n for (const layer in layers) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n removeLayer(layers[layer]!);\n }\n getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));\n\n playerObj = setupInitialStore(playerObj);\n if (playerObj.offlineProd && playerObj.time) {\n if (playerObj.offlineTime == undefined) playerObj.offlineTime = 0;\n playerObj.offlineTime += (Date.now() - playerObj.time) / 1000;\n }\n playerObj.time = Date.now();\n if (playerObj.modVersion !== projInfo.versionNumber) {\n fixOldSave(playerObj.modVersion, playerObj);\n }\n\n Object.assign(player, playerObj);\n settings.active = player.id;\n}\n\nsetInterval(() => {\n if (player.autosave) {\n save();\n }\n}, 1000);\nwindow.onbeforeunload = () => {\n if (player.autosave) {\n save();\n }\n};\nwindow.save = save;\nexport const hardReset = (window.hardReset = async () => {\n await loadSave(newSave());\n});\n","\nimport { StyleValue } from \"features/feature\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { Application } from \"pixi.js\";\nimport { processedPropType } from \"util/vue\";\nimport {\n defineComponent,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n PropType,\n ref,\n unref\n} from \"vue\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onInit: {\n type: Function as PropType<(app: Application) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>,\n onHotReload: Function as PropType<VoidFunction>\n },\n setup(props) {\n const app = ref<null | Application>(null);\n\n const resizeObserver = new ResizeObserver(updateBounds);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const nodes = inject(NodesInjectionKey)!;\n\n const resizeListener = ref<HTMLElement | null>(null);\n\n onMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n app.value = new Application({\n resizeTo: resListener,\n backgroundAlpha: 0\n });\n resizeListener.value?.appendChild(app.value.view);\n props.onInit(app.value as Application);\n }\n updateBounds();\n if (module.hot?.status() === \"apply\" && props.onHotReload) {\n nextTick(props.onHotReload);\n }\n });\n onBeforeUnmount(() => {\n app.value?.destroy();\n });\n\n let isDirty = true;\n function updateBounds() {\n if (isDirty) {\n isDirty = false;\n nextTick(() => {\n if (resizeListener.value != null && props.onContainerResized) {\n // TODO don't overlap with Links.vue\n (Object.values(nodes.value).filter(n => n) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n app.value?.resize();\n }\n isDirty = true;\n });\n }\n }\n document.fonts.ready.then(updateBounds);\n\n return {\n unref,\n resizeListener\n };\n }\n});\n","<template>\n <transition appear>\n <svg\n id=\"eaRe02fYmMp1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 228 521\"\n shape-rendering=\"geometricPrecision\"\n text-rendering=\"geometricPrecision\"\n >\n <g id=\"P\">\n <path\n d=\"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 10;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"trunk\"\n class=\"svg-elem-1\"\n ></path>\n <path\n d=\"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine2\"\n class=\"svg-elem-2\"\n ></path>\n <path\n d=\"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine4\"\n class=\"svg-elem-3\"\n ></path>\n <path\n d=\"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine3\"\n class=\"svg-elem-4\"\n ></path>\n <path\n d=\"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine1\"\n class=\"svg-elem-5\"\n ></path>\n <path\n d=\"M 21,47.8775 38.674,131\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine2\"\n class=\"svg-elem-6\"\n ></path>\n <path\n d=\"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine1\"\n class=\"svg-elem-7\"\n ></path>\n </g>\n </svg>\n </transition>\n</template>\n\n<style scoped>\nsvg {\n background: #2e3440;\n}\n\n/***************************************************\n * Generated by SVG Artista on 1/7/2022, 4:39:47 PM\n * MIT license (https://opensource.org/licenses/MIT)\n * W. https://svgartista.net\n **************************************************/\n\nsvg .svg-elem-1 {\n stroke-dashoffset: 2648.758056640625px;\n stroke-dasharray: 1324.3790283203125px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0s;\n}\n\nsvg.v-enter-from .svg-elem-1,\nsvg.v-leave-to .svg-elem-1 {\n stroke-dashoffset: 1324.3790283203125px;\n}\n\nsvg .svg-elem-2 {\n stroke-dashoffset: 680.4000854492188px;\n stroke-dasharray: 340.2000427246094px;\n transition: stroke-dashoffset 1s ease-out 0.4s;\n}\n\nsvg.v-enter-from .svg-elem-2,\nsvg.v-leave-to .svg-elem-2 {\n stroke-dashoffset: 340.2000427246094px;\n}\n\nsvg .svg-elem-3 {\n stroke-dashoffset: 76.21031951904297px;\n stroke-dasharray: 38.105159759521484px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-3,\nsvg.v-leave-to .svg-elem-3 {\n stroke-dashoffset: 38.105159759521484px;\n}\n\nsvg .svg-elem-4 {\n stroke-dashoffset: 175.18072509765625px;\n stroke-dasharray: 87.59036254882812px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0.36s;\n}\n\nsvg.v-enter-from .svg-elem-4,\nsvg.v-leave-to .svg-elem-4 {\n stroke-dashoffset: 87.59036254882812px;\n}\n\nsvg .svg-elem-5 {\n stroke-dashoffset: 671.9447021484375px;\n stroke-dasharray: 335.97235107421875px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-5,\nsvg.v-leave-to .svg-elem-5 {\n stroke-dashoffset: 335.97235107421875px;\n}\n\nsvg .svg-elem-6 {\n stroke-dashoffset: 173.96141052246094px;\n stroke-dasharray: 86.98070526123047px;\n transition: stroke-dashoffset 1s ease-out 1s;\n}\n\nsvg.v-enter-from .svg-elem-6,\nsvg.v-leave-to .svg-elem-6 {\n stroke-dashoffset: 86.98070526123047px;\n}\n\nsvg .svg-elem-7 {\n stroke-dashoffset: 172.99151611328125px;\n stroke-dasharray: 86.49575805664062px;\n transition: stroke-dashoffset 1s ease-out 0.85s;\n}\n\nsvg.v-enter-from .svg-elem-7,\nsvg.v-leave-to .svg-elem-7 {\n stroke-dashoffset: 86.49575805664062px;\n}\n</style>\n","import { render } from \"./Profectus.vue?vue&type=template&id=07150322&scoped=true\"\nconst script = {}\n\nimport \"./Profectus.vue?vue&type=style&index=0&id=07150322&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-07150322\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n width: { default: \"8px\" },\n height: { default: \"17px\" }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n style: _normalizeStyle({ width: __props.width, height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport { computed, ComputedRef, isRef, ref, Ref, watch } from \"vue\";\nimport { globalBus } from \"game/events\";\nimport { State, persistent } from \"game/persistence\";\n\nexport interface Resource<T = DecimalSource> extends Ref<T> {\n displayName: string;\n precision: number;\n small?: boolean;\n}\n\nexport function createResource<T extends State>(\n defaultValue: T | Ref<T>,\n displayName = \"points\",\n precision = 0,\n small = undefined\n): Resource<T> {\n const resource: Partial<Resource<T>> = isRef(defaultValue)\n ? defaultValue\n : persistent(defaultValue);\n resource.displayName = displayName;\n resource.precision = precision;\n resource.small = small;\n return resource as Resource<T>;\n}\n\nexport function trackBest(resource: Resource): Ref<DecimalSource> {\n const best = persistent(resource.value);\n watch(resource, amount => {\n if (Decimal.gt(amount, best.value)) {\n best.value = amount;\n }\n });\n return best;\n}\n\nexport function trackTotal(resource: Resource): Ref<DecimalSource> {\n const total = persistent(resource.value);\n watch(resource, (amount, prevAmount) => {\n if (Decimal.gt(amount, prevAmount)) {\n total.value = Decimal.add(total.value, Decimal.sub(amount, prevAmount));\n }\n });\n return total;\n}\n\nconst tetra8 = new Decimal(\"10^^8\");\nconst e100 = new Decimal(\"1e100\");\nexport function trackOOMPS(\n resource: Resource,\n pointGain?: ComputedRef<DecimalSource>\n): Ref<string> {\n const oomps = ref<DecimalSource>(0);\n const oompsMag = ref(0);\n const lastPoints = ref<DecimalSource>(0);\n\n globalBus.on(\"update\", diff => {\n oompsMag.value = 0;\n if (Decimal.lte(resource.value, e100)) {\n lastPoints.value = resource.value;\n return;\n }\n\n let curr = resource.value;\n let prev = lastPoints.value;\n lastPoints.value = curr;\n if (Decimal.gt(curr, prev)) {\n if (Decimal.gte(curr, tetra8)) {\n curr = Decimal.slog(curr, 1e10);\n prev = Decimal.slog(prev, 1e10);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value = -1;\n } else {\n while (\n Decimal.div(curr, prev).log(10).div(diff).gte(\"100\") &&\n oompsMag.value <= 5 &&\n Decimal.gt(prev, 0)\n ) {\n curr = Decimal.log10(curr);\n prev = Decimal.log10(prev);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value++;\n }\n }\n }\n });\n\n const oompsString = computed(() => {\n if (oompsMag.value === 0) {\n return pointGain\n ? format(pointGain.value, resource.precision, resource.small) +\n \" \" +\n resource.displayName +\n \"/s\"\n : \"\";\n }\n return (\n format(oomps.value) +\n \" OOM\" +\n (oompsMag.value < 0 ? \"^OOM\" : \"^\" + oompsMag.value) +\n \"s/sec\"\n );\n });\n return oompsString;\n}\n\nexport function displayResource(resource: Resource, overrideAmount?: DecimalSource): string {\n const amount = overrideAmount ?? resource.value;\n if (Decimal.eq(resource.precision, 0)) {\n return formatWhole(amount);\n }\n return format(amount, resource.precision, resource.small);\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.nodesComp))),\n (_ctx.leftNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.leftNodesComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_ctx.rightNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.rightNodesComp), { key: 1 }))\n : _createCommentVNode(\"\", true),\n (_ctx.branches)\n ? (_openBlock(), _createBlock(_component_Links, {\n key: 2,\n links: _ctx.unref(_ctx.branches)\n }, null, 8, [\"links\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode } from \"game/layers\";\nimport { computed, toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n link: null,\n startNode: null,\n endNode: null,\n boundingRect: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n link: Link;\n startNode: FeatureNode;\n endNode: FeatureNode;\n boundingRect: DOMRect | undefined;\n}\n\n\nconst props = toRefs(_props);\n\nconst startPosition = computed(() => {\n const rect = props.startNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetStart) {\n position.x += props.link.value.offsetStart.x;\n position.y += props.link.value.offsetStart.y;\n }\n return position;\n});\n\nconst endPosition = computed(() => {\n const rect = props.endNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetEnd) {\n position.x += props.link.value.offsetEnd.x;\n position.y += props.link.value.offsetEnd.y;\n }\n return position;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"line\", _mergeProps({\n \"stroke-width\": \"15px\",\n stroke: \"white\"\n }, __props.link, {\n x1: _unref(startPosition).x,\n y1: _unref(startPosition).y,\n x2: _unref(endPosition).x,\n y2: _unref(endPosition).y\n }), null, 16, _hoisted_1))\n}\n}\n\n})","import script from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { computed, inject, nextTick, onMounted, ref, toRef } from \"vue\";\nimport LinkVue from \"./Link.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n links: null\n },\n setup(__props: any) {\n\nconst _props = __props as { links?: Link[] }\n\n\nconst links = toRef(_props, \"links\");\n\nconst resizeObserver = new ResizeObserver(updateNodes);\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst nodes = inject(NodesInjectionKey)!;\n\nconst resizeListener = ref<Element | null>(null);\n\nonMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n }\n});\n\nlet isDirty = true;\nlet boundingRect = ref(resizeListener.value?.getBoundingClientRect());\nfunction updateNodes() {\n if (resizeListener.value != null && isDirty) {\n isDirty = false;\n nextTick(() => {\n boundingRect.value = resizeListener.value?.getBoundingClientRect();\n (Object.values(nodes.value) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n isDirty = true;\n });\n }\n}\ndocument.fonts.ready.then(updateNodes);\n\nconst validLinks = computed(() => {\n const n = nodes.value;\n return (\n links.value?.filter(link => n[link.startNode.id]?.rect && n[link.startNode.id]?.rect) ?? []\n );\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(validLinks))\n ? (_openBlock(), _createElementBlock(\"svg\", _normalizeProps(_mergeProps({ key: 0 }, _ctx.$attrs)), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(validLinks), (link, index) => {\n return (_openBlock(), _createBlock(LinkVue, {\n key: index,\n link: link,\n boundingRect: _unref(boundingRect),\n startNode: _unref(nodes)[link.startNode.id]!,\n endNode: _unref(nodes)[link.endNode.id]!\n }, null, 8, [\"link\", \"boundingRect\", \"startNode\", \"endNode\"]))\n }), 128))\n ], 16))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n ref_key: \"resizeListener\",\n ref: resizeListener,\n class: \"resize-listener\"\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Links.vue?vue&type=style&index=0&id=e35b0402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e35b0402\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { coerceComponent, processedPropType, renderJSX, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, watchEffect } from \"vue\";\nimport Links from \"features/links/Links.vue\";\nimport { jsx } from \"features/feature\";\n\nexport default defineComponent({\n props: {\n nodes: {\n type: processedPropType<GenericTreeNode[][]>(Array),\n required: true\n },\n leftSideNodes: processedPropType<GenericTreeNode[]>(Array),\n rightSideNodes: processedPropType<GenericTreeNode[]>(Array),\n branches: processedPropType<TreeBranch[]>(Array)\n },\n components: { Links },\n setup(props) {\n const { nodes, leftSideNodes, rightSideNodes } = toRefs(props);\n\n const nodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(nodes);\n nodesComp.value = coerceComponent(\n jsx(() => (\n <>\n {currNodes.map(row => (\n <span class=\"row\">{row.map(renderJSX)}</span>\n ))}\n </>\n ))\n );\n });\n\n const leftNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(leftSideNodes);\n leftNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => (\n <span class=\"left-side-nodes small\">{currNodes.map(renderJSX)}</span>\n ))\n )\n : \"\";\n });\n\n const rightNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(rightSideNodes);\n rightNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => <span class=\"side-nodes small\">{currNodes.map(renderJSX)}</span>)\n )\n : \"\";\n });\n\n return {\n unref,\n nodesComp,\n leftNodesComp,\n rightNodesComp\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=51e99c22&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=tsx\"\nexport * from \"./Tree.vue?vue&type=script&lang=tsx\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=51e99c22&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-51e99c22\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({ visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined }),\n class: _normalizeClass({\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n style: _normalizeStyle([\n {\n backgroundColor: _ctx.unref(_ctx.color),\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${_ctx.unref(\n _ctx.glowColor\n )}`\n },\n _ctx.unref(_ctx.style) ?? []\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp))))\n ], 36),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { RegisterNodeInjectionKey, UnregisterNodeInjectionKey } from \"game/layers\";\nimport { computed, inject, onUnmounted, ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n id: null\n },\n setup(__props: any) {\n\nconst _props = __props as { id: string }\n\n\nconst props = toRefs(_props);\n\nconst register = inject(RegisterNodeInjectionKey);\nconst unregister = inject(UnregisterNodeInjectionKey);\n\nconst node = ref<HTMLElement | null>(null);\nconst parentNode = computed(() => node.value && node.value.parentElement);\n\nif (register && unregister) {\n watch([parentNode, props.id], ([newNode, newID], [prevNode, prevID]) => {\n if (prevNode) {\n unregister(unref(prevID));\n }\n if (newNode) {\n register(newID, newNode);\n }\n });\n\n onUnmounted(() => unregister(unref(props.id)));\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"node\",\n ref_key: \"node\",\n ref: node\n }, null, 512))\n}\n}\n\n})","import script from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Node.vue?vue&type=style&index=0&id=63ded336&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-63ded336\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c476c56a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = {\n key: 0,\n class: \"mark star\"\n}\nconst _hoisted_3 = [\"src\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n mark: { type: [Boolean, String] }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (__props.mark)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.mark === true)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"img\", {\n key: 1,\n class: \"mark\",\n src: __props.mark\n }, null, 8, _hoisted_3))\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./MarkNode.vue?vue&type=style&index=0&id=c476c56a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c476c56a\"]])\n\nexport default __exports__","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n color: processedPropType<string>(String),\n glowColor: processedPropType<string>(String),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { onClick, onHold, display } = toRefs(props);\n\n const comp = computeOptionalComponent(display);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n unref,\n Visibility,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=426d9bce&scoped=true&ts=true\"\nimport script from \"./TreeNode.vue?vue&type=script&lang=ts\"\nexport * from \"./TreeNode.vue?vue&type=script&lang=ts\"\n\nimport \"./TreeNode.vue?vue&type=style&index=0&id=426d9bce&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-426d9bce\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Link } from \"features/links/links\";\nimport { GenericReset } from \"features/reset\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport TreeNodeComponent from \"features/trees/TreeNode.vue\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n convertComputable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, ref, Ref, shallowRef, unref } from \"vue\";\n\nexport const TreeNodeType = Symbol(\"TreeNode\");\nexport const TreeType = Symbol(\"Tree\");\n\nexport interface TreeNodeOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n color?: Computable<string>;\n display?: Computable<CoercableComponent>;\n glowColor?: Computable<string>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n reset?: GenericReset;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseTreeNode {\n id: string;\n type: typeof TreeNodeType;\n [Component]: typeof TreeNodeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TreeNode<T extends TreeNodeOptions> = Replace<\n T & BaseTreeNode,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericTreeNode = Replace<\n TreeNode<TreeNodeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createTreeNode<T extends TreeNodeOptions>(\n optionsFunc: OptionsFunc<T, TreeNode<T>, BaseTreeNode>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n treeNode[Component] = TreeNodeComponent;\n\n processComputable(treeNode as T, \"visibility\");\n setDefault(treeNode, \"visibility\", Visibility.Visible);\n processComputable(treeNode as T, \"canClick\");\n setDefault(treeNode, \"canClick\", true);\n processComputable(treeNode as T, \"color\");\n processComputable(treeNode as T, \"display\");\n processComputable(treeNode as T, \"glowColor\");\n processComputable(treeNode as T, \"classes\");\n processComputable(treeNode as T, \"style\");\n processComputable(treeNode as T, \"mark\");\n\n if (treeNode.onClick) {\n const onClick = treeNode.onClick.bind(treeNode);\n treeNode.onClick = function () {\n if (unref(treeNode.canClick)) {\n onClick();\n }\n };\n }\n if (treeNode.onHold) {\n const onHold = treeNode.onHold.bind(treeNode);\n treeNode.onHold = function () {\n if (unref(treeNode.canClick)) {\n onHold();\n }\n };\n }\n\n treeNode[GatherProps] = function (this: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n };\n };\n\n return treeNode as unknown as TreeNode<T>;\n });\n}\n\nexport interface TreeBranch extends Omit<Link, \"startNode\" | \"endNode\"> {\n startNode: GenericTreeNode;\n endNode: GenericTreeNode;\n}\n\nexport interface TreeOptions {\n visibility?: Computable<Visibility>;\n nodes: Computable<GenericTreeNode[][]>;\n leftSideNodes?: Computable<GenericTreeNode[]>;\n rightSideNodes?: Computable<GenericTreeNode[]>;\n branches?: Computable<TreeBranch[]>;\n resetPropagation?: ResetPropagation;\n onReset?: (node: GenericTreeNode) => void;\n}\n\nexport interface BaseTree {\n id: string;\n links: Ref<Link[]>;\n reset: (node: GenericTreeNode) => void;\n isResetting: Ref<boolean>;\n resettingNode: Ref<GenericTreeNode | null>;\n type: typeof TreeType;\n [Component]: typeof TreeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tree<T extends TreeOptions> = Replace<\n T & BaseTree,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n nodes: GetComputableType<T[\"nodes\"]>;\n leftSideNodes: GetComputableType<T[\"leftSideNodes\"]>;\n rightSideNodes: GetComputableType<T[\"rightSideNodes\"]>;\n branches: GetComputableType<T[\"branches\"]>;\n }\n>;\n\nexport type GenericTree = Replace<\n Tree<TreeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTree<T extends TreeOptions>(\n optionsFunc: OptionsFunc<T, Tree<T>, BaseTree>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree = optionsFunc();\n tree.id = getUniqueID(\"tree-\");\n tree.type = TreeType;\n tree[Component] = TreeComponent;\n\n tree.isResetting = ref(false);\n tree.resettingNode = shallowRef(null);\n\n tree.reset = function (node) {\n const genericTree = tree as GenericTree;\n genericTree.isResetting.value = true;\n genericTree.resettingNode.value = node;\n genericTree.resetPropagation?.(genericTree, node);\n genericTree.onReset?.(node);\n genericTree.isResetting.value = false;\n genericTree.resettingNode.value = null;\n };\n tree.links = computed(() => {\n const genericTree = tree as GenericTree;\n return unref(genericTree.branches) ?? [];\n });\n\n processComputable(tree as T, \"visibility\");\n setDefault(tree, \"visibility\", Visibility.Visible);\n processComputable(tree as T, \"nodes\");\n processComputable(tree as T, \"leftSideNodes\");\n processComputable(tree as T, \"rightSideNodes\");\n processComputable(tree as T, \"branches\");\n\n tree[GatherProps] = function (this: GenericTree) {\n const { nodes, leftSideNodes, rightSideNodes, branches } = this;\n return { nodes, leftSideNodes, rightSideNodes, branches };\n };\n\n return tree as unknown as Tree<T>;\n });\n}\n\nexport type ResetPropagation = {\n (tree: GenericTree, resettingNode: GenericTreeNode): void;\n};\n\nexport const defaultResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) - 1;\n for (let x = row; x >= 0; x--) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const invertedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) + 1;\n for (let x = row; x < nodes.length; x++) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const branchedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const visitedNodes = [resettingNode];\n let currentNodes = [resettingNode];\n if (tree.branches != null) {\n const branches = unref(tree.branches);\n while (currentNodes.length > 0) {\n const nextNodes: GenericTreeNode[] = [];\n currentNodes.forEach(node => {\n branches\n .filter(branch => branch.startNode === node || branch.endNode === node)\n .map(branch => {\n if (branch.startNode === node) {\n return branch.endNode;\n }\n return branch.startNode;\n })\n .filter(node => !visitedNodes.includes(node))\n .forEach(node => {\n // Check here instead of in the filter because this check's results may\n // change as we go through each node\n if (!nextNodes.includes(node)) {\n nextNodes.push(node);\n node.reset?.reset();\n }\n });\n });\n currentNodes = nextNodes;\n visitedNodes.push(...currentNodes);\n }\n }\n};\n\nexport function createResourceTooltip(\n resource: Resource,\n requiredResource: Resource | null = null,\n requirement: Computable<DecimalSource> = 0\n): Ref<string> {\n const req = convertComputable(requirement);\n return computed(() => {\n if (requiredResource == null || Decimal.gte(resource.value, unref(req))) {\n return displayResource(resource) + \" \" + resource.displayName;\n }\n return `Reach ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(unref(req))\n : format(unref(req), requiredResource.precision)\n } ${requiredResource.displayName} to unlock (You have ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(requiredResource.value)\n : format(requiredResource.value, requiredResource.precision)\n })`;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined,\n backgroundImage: (_ctx.earned && _ctx.image && `url(${_ctx.image})`) || ''\n },\n _ctx.unref(_ctx.style) ?? []\n ]),\n class: _normalizeClass({\n feature: true,\n achievement: true,\n locked: !_ctx.unref(_ctx.earned),\n bought: _ctx.unref(_ctx.earned),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType } from \"util/vue\";\nimport { defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport \"components/common/features.css\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n image: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display } = toRefs(props);\n\n return {\n component: computeOptionalComponent(display),\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Achievement.vue?vue&type=template&id=e3f32402&scoped=true&ts=true\"\nimport script from \"./Achievement.vue?vue&type=script&lang=ts\"\nexport * from \"./Achievement.vue?vue&type=script&lang=ts\"\n\nimport \"./Achievement.vue?vue&type=style&index=0&id=e3f32402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e3f32402\"]])\n\nexport default __exports__","import { globalBus } from \"game/events\";\nimport Toast from \"vue-toastification\";\nimport \"vue-toastification/dist/index.css\";\n\nglobalBus.on(\"setupVue\", vue => vue.use(Toast));\n\nexport function getNotifyStyle(color = \"white\", strength = \"8px\") {\n return {\n transform: \"scale(1.05, 1.05)\",\n borderColor: \"rgba(0, 0, 0, 0.125)\",\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${strength} ${color}`,\n zIndex: 1\n };\n}\n\nexport function getHighNotifyStyle() {\n return getNotifyStyle(\"red\", \"20px\");\n}\n","import AchievementComponent from \"features/achievements/Achievement.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent } from \"util/vue\";\nimport { Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const AchievementType = Symbol(\"Achievement\");\n\nexport interface AchievementOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n image?: Computable<string>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseAchievement extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof AchievementType;\n [Component]: typeof AchievementComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Achievement<T extends AchievementOptions> = Replace<\n T & BaseAchievement,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n image: GetComputableType<T[\"image\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n }\n>;\n\nexport type GenericAchievement = Replace<\n Achievement<AchievementOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createAchievement<T extends AchievementOptions>(\n optionsFunc: OptionsFunc<T, Achievement<T>, BaseAchievement>\n): Achievement<T> {\n return createLazyProxy(persistent => {\n const achievement = Object.assign(persistent, optionsFunc());\n achievement.id = getUniqueID(\"achievement-\");\n achievement.type = AchievementType;\n achievement[Component] = AchievementComponent;\n\n achievement.earned = achievement[PersistentState];\n achievement.complete = function () {\n achievement[PersistentState].value = true;\n };\n\n processComputable(achievement as T, \"visibility\");\n setDefault(achievement, \"visibility\", Visibility.Visible);\n processComputable(achievement as T, \"display\");\n processComputable(achievement as T, \"mark\");\n processComputable(achievement as T, \"image\");\n processComputable(achievement as T, \"style\");\n processComputable(achievement as T, \"classes\");\n\n achievement[GatherProps] = function (this: GenericAchievement) {\n const { visibility, display, earned, image, style, classes, mark, id } = this;\n return { visibility, display, earned, image, style: unref(style), classes, mark, id };\n };\n\n if (achievement.shouldEarn) {\n const genericAchievement = achievement as GenericAchievement;\n watchEffect(() => {\n if (\n !genericAchievement.earned.value &&\n unref(genericAchievement.visibility) === Visibility.Visible &&\n genericAchievement.shouldEarn?.()\n ) {\n genericAchievement.earned.value = true;\n genericAchievement.onComplete?.();\n if (genericAchievement.display) {\n const Display = coerceComponent(unref(genericAchievement.display));\n toast.info(\n <div>\n <h3>Achievement earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </div>\n );\n }\n }\n });\n }\n\n return achievement as unknown as Achievement<T>;\n }, persistent<boolean>(false));\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_GridCell = _resolveComponent(\"GridCell\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n }),\n class: \"table\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rows), (row) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _ctx.mergeAdjacent }]),\n key: row\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.cols), (col) => {\n return (_openBlock(), _createBlock(_component_GridCell, _mergeProps({ key: col }, _ctx.gatherCellProps(_ctx.unref(_ctx.cells)[row * 100 + col])), null, 16))\n }), 128))\n ], 2))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n}","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b1182ac6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: _normalizeClass({ feature: true, tile: true, can: _ctx.unref(_ctx.canClick), locked: !_ctx.unref(_ctx.canClick) }),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args)))\n }, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { style: {\"white-space\":\"pre-line\"} })),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeComponent,\n computeOptionalComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: processedPropType<CoercableComponent>(Object, String, Function),\n style: processedPropType<StyleValue>(String, Object, Array),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { onClick, onHold, title, display } = toRefs(props);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n const titleComponent = computeOptionalComponent(title);\n const component = computeComponent(display);\n\n return {\n start,\n stop,\n titleComponent,\n component,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./GridCell.vue?vue&type=template&id=b1182ac6&scoped=true&ts=true\"\nimport script from \"./GridCell.vue?vue&type=script&lang=ts\"\nexport * from \"./GridCell.vue?vue&type=script&lang=ts\"\n\nimport \"./GridCell.vue?vue&type=style&index=0&id=b1182ac6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b1182ac6\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport { Visibility } from \"features/feature\";\nimport { GridCell } from \"features/grids/grid\";\nimport settings from \"game/settings\";\nimport { processedPropType } from \"util/vue\";\nimport { computed, defineComponent, unref } from \"vue\";\nimport GridCellVue from \"./GridCell.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n rows: {\n type: processedPropType<number>(Number),\n required: true\n },\n cols: {\n type: processedPropType<number>(Number),\n required: true\n },\n cells: {\n type: processedPropType<Record<string, GridCell>>(Object),\n required: true\n }\n },\n components: { GridCell: GridCellVue },\n setup() {\n const mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\n function gatherCellProps(cell: GridCell) {\n const { visibility, onClick, onHold, display, title, style, canClick, id } = cell;\n return { visibility, onClick, onHold, display, title, style, canClick, id };\n }\n\n return { unref, gatherCellProps, Visibility, mergeAdjacent };\n }\n});\n","import { render } from \"./Grid.vue?vue&type=template&id=4f6b6717&ts=true\"\nimport script from \"./Grid.vue?vue&type=script&lang=ts\"\nexport * from \"./Grid.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import GridComponent from \"features/grids/Grid.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { State, Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const GridType = Symbol(\"Grid\");\n\nexport type CellComputable<T> = Computable<T> | ((id: string | number, state: State) => T);\n\nfunction createGridProxy(grid: GenericGrid): Record<string | number, GridCell> {\n return new Proxy({}, getGridHandler(grid)) as Record<string | number, GridCell>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getGridHandler(grid: GenericGrid): ProxyHandler<Record<string | number, GridCell>> {\n const keys = computed(() => {\n const keys = [];\n for (let row = 1; row <= unref(grid.rows); row++) {\n for (let col = 1; col <= unref(grid.cols); col++) {\n keys.push((row * 100 + col).toString());\n }\n }\n return keys;\n });\n return {\n get(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (key === \"isProxy\") {\n return true;\n }\n\n if (typeof key === \"symbol\") {\n return (grid as never)[key];\n }\n\n if (!keys.value.includes(key.toString())) {\n return undefined;\n }\n\n if (target[key] == null) {\n target[key] = new Proxy(\n grid,\n getCellHandler(key.toString())\n ) as unknown as GridCell;\n }\n\n return target[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string | number, GridCell>, key: PropertyKey, value: any) {\n console.warn(\"Cannot set grid cells\", target, key, value);\n return false;\n },\n ownKeys() {\n return keys.value;\n },\n has(target: Record<string | number, GridCell>, key: PropertyKey) {\n return keys.value.includes(key.toString());\n },\n getOwnPropertyDescriptor(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (keys.value.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nfunction getCellHandler(id: string): ProxyHandler<GenericGrid> {\n const keys = [\n \"id\",\n \"visibility\",\n \"canClick\",\n \"startState\",\n \"state\",\n \"style\",\n \"classes\",\n \"title\",\n \"display\",\n \"onClick\",\n \"onHold\"\n ];\n const cache: Record<string, Ref<unknown>> = {};\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target, key, receiver): any {\n if (key === \"isProxy\") {\n return true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let prop = (target as any)[key];\n\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n }\n if (prop != undefined || typeof key === \"symbol\") {\n return prop;\n }\n\n key = key.slice(0, 1).toUpperCase() + key.slice(1);\n\n if (key === \"startState\") {\n return prop.call(receiver, id);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`get${key}`];\n if (isFunction(prop)) {\n if (!(key in cache)) {\n cache[key] = computed(() => prop.call(receiver, id, target.getState(id)));\n }\n return cache[key].value;\n } else if (prop != undefined) {\n return unref(prop);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`on${key}`];\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n } else if (prop != undefined) {\n return prop;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string, any>, key: string, value: any, receiver: typeof Proxy): boolean {\n key = `set${key.slice(0, 1).toUpperCase() + key.slice(1)}`;\n if (key in target && isFunction(target[key]) && target[key].length < 3) {\n target[key].call(receiver, id, value);\n return true;\n } else {\n console.warn(`No setter for \"${key}\".`, target);\n return false;\n }\n },\n ownKeys() {\n return keys;\n },\n has(target, key) {\n return keys.includes(key.toString());\n },\n getOwnPropertyDescriptor(target, key) {\n if (keys.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nexport interface GridCell {\n id: string;\n visibility: Visibility;\n canClick: boolean;\n startState: State;\n state: State;\n style?: StyleValue;\n classes?: Record<string, boolean>;\n title?: CoercableComponent;\n display: CoercableComponent;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface GridOptions {\n visibility?: Computable<Visibility>;\n rows: Computable<number>;\n cols: Computable<number>;\n getVisibility?: CellComputable<Visibility>;\n getCanClick?: CellComputable<boolean>;\n getStartState: Computable<State> | ((id: string | number) => State);\n getStyle?: CellComputable<StyleValue>;\n getClasses?: CellComputable<Record<string, boolean>>;\n getTitle?: CellComputable<CoercableComponent>;\n getDisplay: CellComputable<CoercableComponent>;\n onClick?: (id: string | number, state: State, e?: MouseEvent | TouchEvent) => void;\n onHold?: (id: string | number, state: State) => void;\n}\n\nexport interface BaseGrid extends Persistent<Record<string | number, State>> {\n id: string;\n getID: (id: string | number, state: State) => string;\n getState: (id: string | number) => State;\n setState: (id: string | number, state: State) => void;\n cells: Record<string | number, GridCell>;\n type: typeof GridType;\n [Component]: typeof GridComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Grid<T extends GridOptions> = Replace<\n T & BaseGrid,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n rows: GetComputableType<T[\"rows\"]>;\n cols: GetComputableType<T[\"cols\"]>;\n getVisibility: GetComputableTypeWithDefault<T[\"getVisibility\"], Visibility.Visible>;\n getCanClick: GetComputableTypeWithDefault<T[\"getCanClick\"], true>;\n getStartState: GetComputableType<T[\"getStartState\"]>;\n getStyle: GetComputableType<T[\"getStyle\"]>;\n getClasses: GetComputableType<T[\"getClasses\"]>;\n getTitle: GetComputableType<T[\"getTitle\"]>;\n getDisplay: GetComputableType<T[\"getDisplay\"]>;\n }\n>;\n\nexport type GenericGrid = Replace<\n Grid<GridOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n getVisibility: ProcessedComputable<Visibility>;\n getCanClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createGrid<T extends GridOptions>(\n optionsFunc: OptionsFunc<T, Grid<T>, BaseGrid>\n): Grid<T> {\n return createLazyProxy(persistent => {\n const grid = Object.assign(persistent, optionsFunc());\n grid.id = getUniqueID(\"grid-\");\n grid[Component] = GridComponent;\n\n grid.getID = function (this: GenericGrid, cell: string | number) {\n return grid.id + \"-\" + cell;\n };\n grid.getState = function (this: GenericGrid, cell: string | number) {\n if (this[PersistentState].value[cell] != undefined) {\n return this[PersistentState].value[cell];\n }\n return this.cells[cell].startState;\n };\n grid.setState = function (this: GenericGrid, cell: string | number, state: State) {\n this[PersistentState].value[cell] = state;\n };\n\n grid.cells = createGridProxy(grid as GenericGrid);\n\n processComputable(grid as T, \"visibility\");\n setDefault(grid, \"visibility\", Visibility.Visible);\n processComputable(grid as T, \"rows\");\n processComputable(grid as T, \"cols\");\n processComputable(grid as T, \"getVisibility\");\n setDefault(grid, \"getVisibility\", Visibility.Visible);\n processComputable(grid as T, \"getCanClick\");\n setDefault(grid, \"getCanClick\", true);\n processComputable(grid as T, \"getStartState\");\n processComputable(grid as T, \"getStyle\");\n processComputable(grid as T, \"getClasses\");\n processComputable(grid as T, \"getTitle\");\n processComputable(grid as T, \"getDisplay\");\n\n if (grid.onClick) {\n const onClick = grid.onClick.bind(grid);\n grid.onClick = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onClick(id, state);\n }\n };\n }\n if (grid.onHold) {\n const onHold = grid.onHold.bind(grid);\n grid.onHold = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onHold(id, state);\n }\n };\n }\n\n grid[GatherProps] = function (this: GenericGrid) {\n const { visibility, rows, cols, cells, id } = this;\n return { visibility, rows, cols, cells, id };\n };\n\n return grid as unknown as Grid<T>;\n }, persistent({}));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n _ctx.unref(_ctx.style) ?? []\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n class: _normalizeClass({\n feature: true,\n clickable: true,\n can: _ctx.unref(_ctx.canClick),\n locked: !_ctx.unref(_ctx.canClick),\n small: _ctx.small,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { GenericClickable } from \"features/clickables/clickable\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport {\n coerceComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericClickable[\"display\"]>>(\n Object,\n String,\n Function\n ),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n small: Boolean,\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, onClick, onHold } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n </span>\n ))\n );\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Clickable.vue?vue&type=template&id=6b39988a&scoped=true&ts=true\"\nimport script from \"./Clickable.vue?vue&type=script&lang=tsx\"\nexport * from \"./Clickable.vue?vue&type=script&lang=tsx\"\n\nimport \"./Clickable.vue?vue&type=style&index=0&id=6b39988a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6b39988a\"]])\n\nexport default __exports__","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericLayer } from \"game/layers\";\nimport { Unsubscribe } from \"nanoevents\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, unref } from \"vue\";\n\nexport const ClickableType = Symbol(\"Clickable\");\n\nexport interface ClickableOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n }\n >;\n small?: boolean;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseClickable {\n id: string;\n type: typeof ClickableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Clickable<T extends ClickableOptions> = Replace<\n T & BaseClickable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericClickable = Replace<\n Clickable<ClickableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createClickable<T extends ClickableOptions>(\n optionsFunc: OptionsFunc<T, Clickable<T>, BaseClickable>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable = optionsFunc();\n clickable.id = getUniqueID(\"clickable-\");\n clickable.type = ClickableType;\n clickable[Component] = ClickableComponent;\n\n processComputable(clickable as T, \"visibility\");\n setDefault(clickable, \"visibility\", Visibility.Visible);\n processComputable(clickable as T, \"canClick\");\n setDefault(clickable, \"canClick\", true);\n processComputable(clickable as T, \"classes\");\n processComputable(clickable as T, \"style\");\n processComputable(clickable as T, \"mark\");\n processComputable(clickable as T, \"display\");\n\n if (clickable.onClick) {\n const onClick = clickable.onClick.bind(clickable);\n clickable.onClick = function (e) {\n if (unref(clickable.canClick)) {\n onClick(e);\n }\n };\n }\n if (clickable.onHold) {\n const onHold = clickable.onHold.bind(clickable);\n clickable.onHold = function () {\n if (unref(clickable.canClick)) {\n onHold();\n }\n };\n }\n\n clickable[GatherProps] = function (this: GenericClickable) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return clickable as unknown as Clickable<T>;\n });\n}\n\nexport function setupAutoClick(\n layer: GenericLayer,\n clickable: GenericClickable,\n autoActive: Computable<boolean> = true\n): Unsubscribe {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return layer.on(\"update\", () => {\n if (unref(isActive) && unref(clickable.canClick)) {\n clickable.onClick?.();\n }\n });\n}\n","import {\n Clickable,\n ClickableOptions,\n createClickable,\n GenericClickable\n} from \"features/clickables/clickable\";\nimport { GenericConversion } from \"features/conversion\";\nimport { CoercableComponent, jsx, OptionsFunc, Replace, setDefault } from \"features/feature\";\nimport { displayResource } from \"features/resources/resource\";\nimport {\n createTreeNode,\n GenericTree,\n GenericTreeNode,\n TreeNode,\n TreeNodeOptions\n} from \"features/trees/tree\";\nimport player from \"game/player\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { computed, Ref, unref } from \"vue\";\n\nexport interface ResetButtonOptions extends ClickableOptions {\n conversion: GenericConversion;\n tree: GenericTree;\n treeNode: GenericTreeNode;\n resetDescription?: Computable<string>;\n showNextAt?: Computable<boolean>;\n display?: Computable<CoercableComponent>;\n canClick?: Computable<boolean>;\n minimumGain?: Computable<DecimalSource>;\n}\n\nexport type ResetButton<T extends ResetButtonOptions> = Replace<\n Clickable<T>,\n {\n resetDescription: GetComputableTypeWithDefault<T[\"resetDescription\"], Ref<string>>;\n showNextAt: GetComputableTypeWithDefault<T[\"showNextAt\"], true>;\n display: GetComputableTypeWithDefault<T[\"display\"], Ref<JSX.Element>>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], Ref<boolean>>;\n minimumGain: GetComputableTypeWithDefault<T[\"minimumGain\"], 1>;\n onClick: VoidFunction;\n }\n>;\n\nexport type GenericResetButton = Replace<\n GenericClickable & ResetButton<ResetButtonOptions>,\n {\n resetDescription: ProcessedComputable<string>;\n showNextAt: ProcessedComputable<boolean>;\n display: ProcessedComputable<CoercableComponent>;\n canClick: ProcessedComputable<boolean>;\n minimumGain: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n optionsFunc: OptionsFunc<T>\n): ResetButton<T> {\n return createClickable(() => {\n const resetButton = optionsFunc();\n\n processComputable(resetButton as T, \"showNextAt\");\n setDefault(resetButton, \"showNextAt\", true);\n setDefault(resetButton, \"minimumGain\", 1);\n\n if (resetButton.resetDescription == null) {\n resetButton.resetDescription = computed(() =>\n Decimal.lt(resetButton.conversion.gainResource.value, 1e3) ? \"Reset for \" : \"\"\n );\n } else {\n processComputable(resetButton as T, \"resetDescription\");\n }\n\n if (resetButton.display == null) {\n resetButton.display = jsx(() => (\n <span>\n {unref(resetButton.resetDescription as ProcessedComputable<string>)}\n <b>\n {displayResource(\n resetButton.conversion.gainResource,\n Decimal.max(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n {resetButton.conversion.buyMax ? \"Next:\" : \"Req:\"}{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n resetButton.conversion.buyMax ||\n Decimal.floor(unref(resetButton.conversion.actualGain)).neq(1)\n ? unref(resetButton.conversion.nextAt)\n : unref(resetButton.conversion.currentAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gte(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n );\n }\n\n const onClick = resetButton.onClick;\n resetButton.onClick = function () {\n if (!unref(resetButton.canClick)) {\n return;\n }\n resetButton.conversion.convert();\n resetButton.tree.reset(resetButton.treeNode);\n onClick?.();\n };\n\n return resetButton;\n }) as unknown as ResetButton<T>;\n}\n\nexport interface LayerTreeNodeOptions extends TreeNodeOptions {\n layerID: string;\n color: Computable<string>; // marking as required\n display?: Computable<string>;\n append?: Computable<boolean>;\n}\nexport type LayerTreeNode<T extends LayerTreeNodeOptions> = Replace<\n TreeNode<T>,\n {\n display: GetComputableTypeWithDefault<T[\"display\"], T[\"layerID\"]>;\n append: GetComputableType<T[\"append\"]>;\n }\n>;\nexport type GenericLayerTreeNode = Replace<\n LayerTreeNode<LayerTreeNodeOptions>,\n {\n display: ProcessedComputable<string>;\n append?: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createLayerTreeNode<T extends LayerTreeNodeOptions>(\n optionsFunc: OptionsFunc<T>\n): LayerTreeNode<T> {\n return createTreeNode(() => {\n const options = optionsFunc();\n processComputable(options as T, \"display\");\n setDefault(options, \"display\", options.layerID);\n processComputable(options as T, \"append\");\n return {\n ...options,\n display: options.layerID,\n onClick: unref((options as unknown as GenericLayerTreeNode).append)\n ? function () {\n if (player.tabs.includes(options.layerID)) {\n const index = player.tabs.lastIndexOf(options.layerID);\n player.tabs.splice(index, 1);\n } else {\n player.tabs.push(options.layerID);\n }\n }\n : function () {\n player.tabs.splice(1, 1, options.layerID);\n }\n };\n }) as unknown as LayerTreeNode<T>;\n}\n","import { GenericLayer } from \"game/layers\";\nimport { Modifier } from \"game/modifiers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, isRef, Ref, unref } from \"vue\";\nimport { OptionsFunc, Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: Computable<DecimalSource>;\n actualGain?: Computable<DecimalSource>;\n currentAt?: Computable<DecimalSource>;\n nextAt?: Computable<DecimalSource>;\n baseResource: Resource;\n gainResource: Resource;\n buyMax?: Computable<boolean>;\n roundUpCost?: Computable<boolean>;\n convert?: VoidFunction;\n gainModifier?: Modifier;\n}\n\nexport interface BaseConversion {\n convert: VoidFunction;\n}\n\nexport type Conversion<T extends ConversionOptions> = Replace<\n T & BaseConversion,\n {\n currentGain: GetComputableTypeWithDefault<T[\"currentGain\"], Ref<DecimalSource>>;\n actualGain: GetComputableTypeWithDefault<T[\"actualGain\"], Ref<DecimalSource>>;\n currentAt: GetComputableTypeWithDefault<T[\"currentAt\"], Ref<DecimalSource>>;\n nextAt: GetComputableTypeWithDefault<T[\"nextAt\"], Ref<DecimalSource>>;\n buyMax: GetComputableTypeWithDefault<T[\"buyMax\"], true>;\n roundUpCost: GetComputableTypeWithDefault<T[\"roundUpCost\"], true>;\n }\n>;\n\nexport type GenericConversion = Replace<\n Conversion<ConversionOptions>,\n {\n currentGain: ProcessedComputable<DecimalSource>;\n actualGain: ProcessedComputable<DecimalSource>;\n currentAt: ProcessedComputable<DecimalSource>;\n nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: OptionsFunc<T, Conversion<T>, BaseConversion>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = conversion.currentGain;\n }\n if (conversion.currentAt == null) {\n conversion.currentAt = computed(() => {\n let current = conversion.scaling.currentAt(conversion as GenericConversion);\n if (conversion.roundUpCost) current = Decimal.ceil(current);\n return current;\n });\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() => {\n let next = conversion.scaling.nextAt(conversion as GenericConversion);\n if (conversion.roundUpCost) next = Decimal.ceil(next);\n return next;\n });\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n unref((conversion as GenericConversion).currentGain)\n );\n // TODO just subtract cost?\n conversion.baseResource.value = 0;\n };\n }\n\n processComputable(conversion as T, \"currentGain\");\n processComputable(conversion as T, \"actualGain\");\n processComputable(conversion as T, \"currentAt\");\n processComputable(conversion as T, \"nextAt\");\n processComputable(conversion as T, \"buyMax\");\n setDefault(conversion, \"buyMax\", true);\n processComputable(conversion as T, \"roundUpCost\");\n setDefault(conversion, \"roundUpCost\", true);\n\n return conversion as unknown as Conversion<T>;\n });\n}\n\nexport type ScalingFunction = {\n currentGain: (conversion: GenericConversion) => DecimalSource;\n currentAt: (conversion: GenericConversion) => DecimalSource;\n nextAt: (conversion: GenericConversion) => DecimalSource;\n};\n\n// Gain formula is (baseResource - base) * coefficient\n// e.g. if base is 10 and coefficient is 0.5, 10 points makes 1 gain, 12 points is 2\nexport function createLinearScaling(\n base: DecimalSource | Ref<DecimalSource>,\n coefficient: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n if (Decimal.lt(conversion.baseResource.value, unref(base))) {\n return 0;\n }\n\n return Decimal.sub(conversion.baseResource.value, unref(base))\n .sub(1)\n .times(unref(coefficient))\n .add(1);\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.times(current, unref(coefficient)).add(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.times(next, unref(coefficient)).add(unref(base)).max(unref(base));\n }\n };\n}\n\n// Gain formula is (baseResource / base) ^ exponent\n// e.g. if exponent is 0.5 and base is 10, then having 10 points makes gain 1, and 40 points is 2\nexport function createPolynomialScaling(\n base: DecimalSource | Ref<DecimalSource>,\n exponent: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n const gain = Decimal.div(conversion.baseResource.value, unref(base)).pow(\n unref(exponent)\n );\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n return gain;\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.root(current, unref(exponent)).times(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.root(next, unref(exponent)).times(unref(base)).max(unref(base));\n }\n };\n}\n\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(() => {\n const conversion: S = optionsFunc();\n\n setDefault(conversion, \"buyMax\", false);\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(conversion.gainResource.value);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(Decimal.add(conversion.gainResource.value, 1));\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = computed(() => {\n let gain = Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n ).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.gainModifier\n ? conversion.gainModifier.apply(\n unref((conversion as GenericConversion).currentGain)\n )\n : unref((conversion as GenericConversion).currentGain);\n // TODO just subtract cost?\n // Maybe by adding a cost function to scaling and nextAt just calls the cost function\n // with 1 + currentGain\n conversion.baseResource.value = 0;\n });\n\n return conversion;\n });\n}\n\nexport function setupPassiveGeneration(\n layer: GenericLayer,\n conversion: GenericConversion,\n rate: ProcessedComputable<DecimalSource> = 1\n): void {\n layer.on(\"preUpdate\", diff => {\n const currRate = isRef(rate) ? rate.value : rate;\n if (Decimal.neq(currRate, 0)) {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n Decimal.times(currRate, diff).times(unref(conversion.currentGain))\n );\n }\n });\n}\n\nfunction softcap(\n value: DecimalSource,\n cap: DecimalSource,\n power: DecimalSource = 0.5\n): DecimalSource {\n if (Decimal.lte(value, cap)) {\n return value;\n } else {\n return Decimal.pow(value, power).times(Decimal.pow(cap, Decimal.sub(1, power)));\n }\n}\n\nexport function addSoftcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>,\n power: ProcessedComputable<DecimalSource> = 0.5\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion =>\n softcap(scaling.currentGain(conversion), unref(cap), unref(power))\n };\n}\n\nexport function addHardcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion => Decimal.min(scaling.currentGain(conversion), unref(cap))\n };\n}\n","import { createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6447a93e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"toggle\" }, \"▼\", -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_CollapseTransition = _resolveComponent(\"CollapseTransition\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"infobox\", { collapsed: _ctx.unref(_ctx.collapsed), stacked: _ctx.stacked, ..._ctx.unref(_ctx.classes) }]),\n style: _normalizeStyle([\n {\n borderColor: _ctx.unref(_ctx.color),\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n _createElementVNode(\"button\", {\n class: \"title\",\n style: _normalizeStyle([{ backgroundColor: _ctx.unref(_ctx.color) }, _ctx.unref(_ctx.titleStyle) || []]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.collapsed.value = !_ctx.unref(_ctx.collapsed)))\n }, [\n _hoisted_1,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ], 4),\n _createVNode(_component_CollapseTransition, null, {\n default: _withCtx(() => [\n (!_ctx.unref(_ctx.collapsed))\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"body\",\n style: _normalizeStyle({ backgroundColor: _ctx.unref(_ctx.color) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.bodyComponent), {\n style: _normalizeStyle(_ctx.unref(_ctx.bodyStyle))\n }, null, 8, [\"style\"]))\n ], 4))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Node from \"components/Node.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport settings from \"game/settings\";\nimport { computeComponent, processedPropType } from \"util/vue\";\nimport CollapseTransition from \"@ivanv/vue-collapse-transition/src/CollapseTransition.vue\";\nimport { computed, defineComponent, PropType, Ref, StyleValue, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n color: processedPropType<string>(String),\n collapsed: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n titleStyle: processedPropType<StyleValue>(Object, String, Array),\n bodyStyle: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n CollapseTransition\n },\n setup(props) {\n const { title, display } = toRefs(props);\n\n const titleComponent = computeComponent(title);\n const bodyComponent = computeComponent(display);\n const stacked = computed(() => themes[settings.theme].mergeAdjacent);\n\n return {\n titleComponent,\n bodyComponent,\n stacked,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Infobox.vue?vue&type=template&id=6447a93e&scoped=true&ts=true\"\nimport script from \"./Infobox.vue?vue&type=script&lang=ts\"\nexport * from \"./Infobox.vue?vue&type=script&lang=ts\"\n\nimport \"./Infobox.vue?vue&type=style&index=0&id=6447a93e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6447a93e\"]])\n\nexport default __exports__","import InfoboxComponent from \"features/infoboxes/Infobox.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Ref, unref } from \"vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const InfoboxType = Symbol(\"Infobox\");\n\nexport interface InfoboxOptions {\n visibility?: Computable<Visibility>;\n color?: Computable<string>;\n style?: Computable<StyleValue>;\n titleStyle?: Computable<StyleValue>;\n bodyStyle?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n title: Computable<CoercableComponent>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseInfobox extends Persistent<boolean> {\n id: string;\n collapsed: Ref<boolean>;\n type: typeof InfoboxType;\n [Component]: typeof InfoboxComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Infobox<T extends InfoboxOptions> = Replace<\n T & BaseInfobox,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n color: GetComputableType<T[\"color\"]>;\n style: GetComputableType<T[\"style\"]>;\n titleStyle: GetComputableType<T[\"titleStyle\"]>;\n bodyStyle: GetComputableType<T[\"bodyStyle\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n title: GetComputableType<T[\"title\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericInfobox = Replace<\n Infobox<InfoboxOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createInfobox<T extends InfoboxOptions>(\n optionsFunc: OptionsFunc<T, Infobox<T>, BaseInfobox>\n): Infobox<T> {\n return createLazyProxy(persistent => {\n const infobox = Object.assign(persistent, optionsFunc());\n infobox.id = getUniqueID(\"infobox-\");\n infobox.type = InfoboxType;\n infobox[Component] = InfoboxComponent;\n\n infobox.collapsed = infobox[PersistentState];\n\n processComputable(infobox as T, \"visibility\");\n setDefault(infobox, \"visibility\", Visibility.Visible);\n processComputable(infobox as T, \"color\");\n processComputable(infobox as T, \"style\");\n processComputable(infobox as T, \"titleStyle\");\n processComputable(infobox as T, \"bodyStyle\");\n processComputable(infobox as T, \"classes\");\n processComputable(infobox as T, \"title\");\n processComputable(infobox as T, \"display\");\n\n infobox[GatherProps] = function (this: GenericInfobox) {\n const {\n visibility,\n display,\n title,\n color,\n collapsed,\n style,\n titleStyle,\n bodyStyle,\n classes,\n id\n } = this;\n return {\n visibility,\n display,\n title,\n color,\n collapsed,\n style: unref(style),\n titleStyle,\n bodyStyle,\n classes,\n id\n };\n };\n\n return infobox as unknown as Infobox<T>;\n }, persistent<boolean>(false));\n}\n","import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n ref: \"resizeListener\",\n class: _normalizeClass([\"resize-listener\", _ctx.unref(_ctx.classes)]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, null, 6))\n}","import { render } from \"./Particles.vue?vue&type=template&id=4e1c0c10&scoped=true&ts=true\"\nimport script from \"./Particles.vue?vue&type=script&lang=tsx\"\nexport * from \"./Particles.vue?vue&type=script&lang=tsx\"\n\nimport \"./Particles.vue?vue&type=style&index=0&id=4e1c0c10&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4e1c0c10\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Ref, shallowRef, unref } from \"vue\";\nimport {\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Application } from \"pixi.js\";\nimport { Emitter, EmitterConfigV3, upgradeConfig } from \"@pixi/particle-emitter\";\nimport { Computable, GetComputableType } from \"util/computed\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n onContainerResized?: (boundingRect: DOMRect) => void;\n onHotReload?: VoidFunction;\n}\n\nexport interface BaseParticles {\n id: string;\n app: Ref<null | Application>;\n addEmitter: (config: EmitterConfigV3) => Promise<Emitter>;\n type: typeof ParticlesType;\n [Component]: typeof ParticlesComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Particles<T extends ParticlesOptions> = Replace<\n T & BaseParticles,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n }\n>;\n\nexport type GenericParticles = Particles<ParticlesOptions>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: OptionsFunc<T, Particles<T>, BaseParticles>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.app = shallowRef(null);\n particles.addEmitter = (config: EmitterConfigV3): Promise<Emitter> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.app.value) {\n return Promise.resolve(new Emitter(genericParticles.app.value.stage, config));\n }\n return new Promise<Emitter>(resolve => {\n emittersToAdd.push({ resolve, config });\n });\n };\n\n let emittersToAdd: {\n resolve: (value: Emitter | PromiseLike<Emitter>) => void;\n config: EmitterConfigV3;\n }[] = [];\n\n function onInit(app: Application) {\n (particles as GenericParticles).app.value = app;\n emittersToAdd.forEach(({ resolve, config }) => resolve(new Emitter(app.stage, config)));\n emittersToAdd = [];\n }\n\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, style, classes, onContainerResized, onHotReload } = this;\n return {\n id,\n style: unref(style),\n classes,\n onContainerResized,\n onHotReload,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n\ndeclare global {\n interface Window {\n upgradeConfig: typeof upgradeConfig;\n }\n}\nwindow.upgradeConfig = upgradeConfig;\n","import { OptionsFunc, getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport { DefaultValue, Persistent, persistent, PersistentState } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { Computable, GetComputableType, processComputable } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Unsubscribe } from \"nanoevents\";\nimport { isRef, unref } from \"vue\";\n\nexport const ResetType = Symbol(\"Reset\");\n\nexport interface ResetOptions {\n thingsToReset: Computable<Record<string, unknown>[]>;\n onReset?: VoidFunction;\n}\n\nexport interface BaseReset {\n id: string;\n reset: VoidFunction;\n type: typeof ResetType;\n}\n\nexport type Reset<T extends ResetOptions> = Replace<\n T & BaseReset,\n {\n thingsToReset: GetComputableType<T[\"thingsToReset\"]>;\n }\n>;\n\nexport type GenericReset = Reset<ResetOptions>;\n\nexport function createReset<T extends ResetOptions>(\n optionsFunc: OptionsFunc<T, Reset<T>, BaseReset>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset = optionsFunc();\n reset.id = getUniqueID(\"reset-\");\n reset.type = ResetType;\n\n reset.reset = function () {\n const handleObject = (obj: unknown) => {\n if (obj && typeof obj === \"object\") {\n if (PersistentState in obj) {\n (obj as Persistent)[PersistentState].value = (obj as Persistent)[\n DefaultValue\n ];\n } else if (!(obj instanceof Decimal) && !isRef(obj)) {\n Object.values(obj).forEach(obj =>\n handleObject(obj as Record<string, unknown>)\n );\n }\n }\n };\n unref((reset as GenericReset).thingsToReset).forEach(handleObject);\n globalBus.emit(\"reset\", reset as GenericReset);\n reset.onReset?.();\n };\n\n processComputable(reset as T, \"thingsToReset\");\n\n return reset as unknown as Reset<T>;\n });\n}\n\nconst listeners: Record<string, Unsubscribe | undefined> = {};\nexport function trackResetTime(layer: GenericLayer, reset: GenericReset): Persistent<Decimal> {\n const resetTime = persistent<Decimal>(new Decimal(0));\n listeners[layer.id] = layer.on(\"preUpdate\", diff => {\n resetTime.value = Decimal.add(resetTime.value, diff);\n });\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === reset) {\n resetTime.value = new Decimal(0);\n }\n });\n return resetTime;\n}\nglobalBus.on(\"removeLayer\", layer => {\n // unsubscribe from preUpdate\n listeners[layer.id]?.();\n listeners[layer.id] = undefined;\n});\n\ndeclare module \"game/events\" {\n interface GlobalEvents {\n reset: (reset: GenericReset) => void;\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n resource: Resource;\n color: string;\n}\n\n\n\nconst amount = computed(() => displayResource(props.resource));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"h2\", {\n style: _normalizeStyle({ color: __props.color, 'text-shadow': '0px 0px 10px ' + __props.color })\n }, _toDisplayString(_unref(amount)), 5))\n}\n}\n\n})","import script from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = { key: 1 }\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\", \")\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\n\nimport { CoercableComponent } from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport Decimal from \"util/bignum\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { computed, Ref, StyleValue, toRefs } from \"vue\";\nimport ResourceVue from \"features/resources/Resource.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null,\n classes: null,\n style: null,\n effectDisplay: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n resource: Resource;\n color?: string;\n classes?: Record<string, boolean>;\n style?: StyleValue;\n effectDisplay?: CoercableComponent;\n}\n\n\nconst props = toRefs(_props);\n\nconst effectComponent = computeOptionalComponent(\n props.effectDisplay as Ref<CoercableComponent | undefined>\n);\n\nconst showPrefix = computed(() => {\n return Decimal.lt(props.resource.value, \"1e1000\");\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (_unref(showPrefix))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"You have \"))\n : _createCommentVNode(\"\", true),\n _createVNode(ResourceVue, {\n resource: __props.resource,\n color: __props.color || 'white'\n }, null, 8, [\"resource\", \"color\"]),\n _createTextVNode(\" \" + _toDisplayString(__props.resource.displayName), 1),\n (_unref(effectComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _hoisted_3,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(effectComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_4,\n _hoisted_5\n ]))\n}\n}\n\n})","import script from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { CoercableComponent, jsx } from \"features/feature\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { Computable, convertComputable, ProcessedComputable } from \"util/computed\";\nimport { renderJSX } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/modifiers.css\";\n\nexport interface Modifier {\n apply: (gain: DecimalSource) => DecimalSource;\n revert: (gain: DecimalSource) => DecimalSource;\n enabled: ProcessedComputable<boolean>;\n description?: ProcessedComputable<CoercableComponent>;\n}\n\nexport function createAdditiveModifier(\n addend: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedAddend = convertComputable(addend);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.add(gain, unref(processedAddend)),\n revert: gain => Decimal.sub(gain, unref(processedAddend)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">+{format(unref(processedAddend))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createMultiplicativeModifier(\n multiplier: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedMultiplier = convertComputable(multiplier);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.times(gain, unref(processedMultiplier)),\n revert: gain => Decimal.div(gain, unref(processedMultiplier)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">x{format(unref(processedMultiplier))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createExponentialModifier(\n exponent: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedExponent = convertComputable(exponent);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.pow(gain, unref(processedExponent)),\n revert: gain => Decimal.root(gain, unref(processedExponent)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">^{format(unref(processedExponent))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createSequentialModifier(...modifiers: Modifier[]): Required<Modifier> {\n return {\n apply: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduceRight((gain, modifier) => modifier.revert(gain), gain),\n enabled: computed(() => modifiers.filter(m => unref(m.enabled)).length > 0),\n description: jsx(() => (\n <>\n {(\n modifiers\n .filter(m => unref(m.enabled))\n .map(m => unref(m.description))\n .filter(d => d) as CoercableComponent[]\n ).map(renderJSX)}\n </>\n ))\n };\n}\n\nexport function createModifierSection(\n title: string,\n subtitle: string,\n modifier: Required<Modifier>,\n base: DecimalSource = 1,\n unit = \"\"\n) {\n return (\n <div>\n <h3>\n {title}\n {subtitle ? <span class=\"subtitle\"> ({subtitle})</span> : null}\n </h3>\n <br />\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {format(base)}\n {unit}\n </span>\n <span class=\"modifier-description\">Base</span>\n </div>\n {renderJSX(unref(modifier.description))}\n <hr />\n Total: {format(modifier.apply(base))}\n {unit}\n </div>\n );\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, isRef as _isRef, vModelText as _vModelText, createElementVNode as _createElementVNode, withDirectives as _withDirectives, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-20a0a34d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_3 = [\"min\", \"max\"]\n\nimport { computed, toRefs, unref } from \"vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n min: null,\n max: null\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: number): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: string;\n modelValue?: number;\n min?: number;\n max?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst value = computed({\n get() {\n return String(unref(props.modelValue) || 0);\n },\n set(value: string) {\n emit(\"update:modelValue\", Number(value));\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.title)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(__props.title), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(Tooltip, {\n display: `${_unref(value)}`,\n class: _normalizeClass({ fullWidth: !__props.title })\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"range\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n min: __props.min,\n max: __props.max\n }, null, 8, _hoisted_3), [\n [_vModelText, _unref(value)]\n ])\n ]),\n _: 1\n }, 8, [\"display\", \"class\"])\n ]))\n}\n}\n\n})","import script from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Slider.vue?vue&type=style&index=0&id=20a0a34d&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-20a0a34d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { nextTick, onMounted, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst top = ref(\"0\");\nconst observer = new ResizeObserver(updateTop);\nconst element = ref<HTMLElement | null>(null);\n\nfunction updateTop() {\n let el = element.value;\n if (el == undefined) {\n return;\n }\n\n let newTop = 0;\n while (el.previousSibling) {\n const sibling = el.previousSibling as HTMLElement;\n if (sibling.dataset && \"vSticky\" in sibling.dataset) {\n newTop += sibling.offsetHeight;\n }\n el = sibling;\n }\n top.value = newTop + \"px\";\n}\n\nnextTick(updateTop);\ndocument.fonts.ready.then(updateTop);\n\nonMounted(() => {\n const el = element.value?.parentElement;\n if (el) {\n observer.observe(el);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"sticky\",\n style: _normalizeStyle({ top: top.value }),\n ref_key: \"element\",\n ref: element,\n \"data-v-sticky\": \"\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n}\n}\n\n})","import script from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Sticky.vue?vue&type=style&index=0&id=6987dd96&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6987dd96\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n height: null\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"vr\",\n style: _normalizeStyle({ height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./VerticalRule.vue?vue&type=style&index=0&id=15f6e746&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15f6e746\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n width: _ctx.unref(_ctx.width) + 'px',\n height: _ctx.unref(_ctx.height) + 'px',\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n bar: true,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"overlayTextContainer border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), {\n key: 0,\n class: \"overlayText\",\n style: _normalizeStyle(_ctx.unref(_ctx.textStyle))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.style) ?? {},\n _ctx.unref(_ctx.baseStyle) ?? {},\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n _createElementVNode(\"div\", {\n class: \"fill\",\n style: _normalizeStyle([_ctx.barStyle, _ctx.unref(_ctx.style) ?? {}, _ctx.unref(_ctx.fillStyle) ?? {}])\n }, null, 4)\n ], 4),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { Direction } from \"./bar\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, CSSProperties, defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n progress: {\n type: processedPropType<DecimalSource>(String, Object, Number),\n required: true\n },\n width: {\n type: processedPropType<number>(Number),\n required: true\n },\n height: {\n type: processedPropType<number>(Number),\n required: true\n },\n direction: {\n type: processedPropType<Direction>(String),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n borderStyle: processedPropType<StyleValue>(Object, String, Array),\n textStyle: processedPropType<StyleValue>(Object, String, Array),\n baseStyle: processedPropType<StyleValue>(Object, String, Array),\n fillStyle: processedPropType<StyleValue>(Object, String, Array),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { progress, width, height, direction, display } = toRefs(props);\n\n const normalizedProgress = computed(() => {\n let progressNumber =\n progress.value instanceof Decimal\n ? progress.value.toNumber()\n : Number(progress.value);\n return (1 - Math.min(Math.max(progressNumber, 0), 1)) * 100;\n });\n\n const barStyle = computed(() => {\n const barStyle: Partial<CSSProperties> = {\n width: unwrapRef(width) + 0.5 + \"px\",\n height: unwrapRef(height) + 0.5 + \"px\"\n };\n switch (unref(direction)) {\n case Direction.Up:\n barStyle.clipPath = `inset(${normalizedProgress.value}% 0% 0% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Down:\n barStyle.clipPath = `inset(0% 0% ${normalizedProgress.value}% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Right:\n barStyle.clipPath = `inset(0% ${normalizedProgress.value}% 0% 0%)`;\n break;\n case Direction.Left:\n barStyle.clipPath = `inset(0% 0% 0% ${normalizedProgress.value} + '%)`;\n break;\n case Direction.Default:\n barStyle.clipPath = \"inset(0% 50% 0% 0%)\";\n break;\n }\n return barStyle;\n });\n\n const component = computeOptionalComponent(display);\n\n return {\n normalizedProgress,\n barStyle,\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Bar.vue?vue&type=template&id=e6e3c366&scoped=true&ts=true\"\nimport script from \"./Bar.vue?vue&type=script&lang=ts\"\nexport * from \"./Bar.vue?vue&type=script&lang=ts\"\n\nimport \"./Bar.vue?vue&type=style&index=0&id=e6e3c366&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e6e3c366\"]])\n\nexport default __exports__","import BarComponent from \"features/bars/Bar.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { unref } from \"vue\";\n\nexport const BarType = Symbol(\"Bar\");\n\nexport enum Direction {\n Up = \"Up\",\n Down = \"Down\",\n Left = \"Left\",\n Right = \"Right\",\n Default = \"Up\"\n}\n\nexport interface BarOptions {\n visibility?: Computable<Visibility>;\n width: Computable<number>;\n height: Computable<number>;\n direction: Computable<Direction>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n borderStyle?: Computable<StyleValue>;\n baseStyle?: Computable<StyleValue>;\n textStyle?: Computable<StyleValue>;\n fillStyle?: Computable<StyleValue>;\n progress: Computable<DecimalSource>;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n}\n\nexport interface BaseBar {\n id: string;\n type: typeof BarType;\n [Component]: typeof BarComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Bar<T extends BarOptions> = Replace<\n T & BaseBar,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n width: GetComputableType<T[\"width\"]>;\n height: GetComputableType<T[\"height\"]>;\n direction: GetComputableType<T[\"direction\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n borderStyle: GetComputableType<T[\"borderStyle\"]>;\n baseStyle: GetComputableType<T[\"baseStyle\"]>;\n textStyle: GetComputableType<T[\"textStyle\"]>;\n fillStyle: GetComputableType<T[\"fillStyle\"]>;\n progress: GetComputableType<T[\"progress\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericBar = Replace<\n Bar<BarOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createBar<T extends BarOptions>(\n optionsFunc: OptionsFunc<T, Bar<T>, BaseBar>\n): Bar<T> {\n return createLazyProxy(() => {\n const bar = optionsFunc();\n bar.id = getUniqueID(\"bar-\");\n bar.type = BarType;\n bar[Component] = BarComponent;\n\n processComputable(bar as T, \"visibility\");\n setDefault(bar, \"visibility\", Visibility.Visible);\n processComputable(bar as T, \"width\");\n processComputable(bar as T, \"height\");\n processComputable(bar as T, \"direction\");\n processComputable(bar as T, \"style\");\n processComputable(bar as T, \"classes\");\n processComputable(bar as T, \"borderStyle\");\n processComputable(bar as T, \"baseStyle\");\n processComputable(bar as T, \"textStyle\");\n processComputable(bar as T, \"fillStyle\");\n processComputable(bar as T, \"progress\");\n processComputable(bar as T, \"display\");\n processComputable(bar as T, \"mark\");\n\n bar[GatherProps] = function (this: GenericBar) {\n const {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style,\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n } = this;\n return {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style: unref(style),\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n };\n };\n\n return bar as unknown as Bar<T>;\n });\n}\n","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport { Resource } from \"features/resources/resource\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref } from \"vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"./feature\";\n\nexport const BuyableType = Symbol(\"Buyable\");\n\nexport type BuyableDisplay =\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n };\n\nexport interface BuyableOptions {\n visibility?: Computable<Visibility>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canPurchase?: Computable<boolean>;\n purchaseLimit?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n small?: Computable<boolean>;\n display?: Computable<BuyableDisplay>;\n onPurchase?: (cost: DecimalSource) => void;\n}\n\nexport interface BaseBuyable extends Persistent<DecimalSource> {\n id: string;\n amount: Ref<DecimalSource>;\n maxed: Ref<boolean>;\n canAfford: Ref<boolean>;\n canClick: ProcessedComputable<boolean>;\n onClick: VoidFunction;\n purchase: VoidFunction;\n type: typeof BuyableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Buyable<T extends BuyableOptions> = Replace<\n T & BaseBuyable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n cost: GetComputableType<T[\"cost\"]>;\n resource: GetComputableType<T[\"resource\"]>;\n canPurchase: GetComputableTypeWithDefault<T[\"canPurchase\"], Ref<boolean>>;\n purchaseLimit: GetComputableTypeWithDefault<T[\"purchaseLimit\"], Decimal>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n small: GetComputableType<T[\"small\"]>;\n display: Ref<CoercableComponent>;\n }\n>;\n\nexport type GenericBuyable = Replace<\n Buyable<BuyableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n purchaseLimit: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createBuyable<T extends BuyableOptions>(\n optionsFunc: OptionsFunc<T, Buyable<T>, BaseBuyable>\n): Buyable<T> {\n return createLazyProxy(persistent => {\n const buyable = Object.assign(persistent, optionsFunc());\n\n if (buyable.canPurchase == null && (buyable.resource == null || buyable.cost == null)) {\n console.warn(\n \"Cannot create buyable without a canPurchase property or a resource and cost property\",\n buyable\n );\n throw \"Cannot create buyable without a canPurchase property or a resource and cost property\";\n }\n\n buyable.id = getUniqueID(\"buyable-\");\n buyable.type = BuyableType;\n buyable[Component] = ClickableComponent;\n\n buyable.amount = buyable[PersistentState];\n buyable.canAfford = computed(() => {\n const genericBuyable = buyable as GenericBuyable;\n const cost = unref(genericBuyable.cost);\n return (\n genericBuyable.resource != null &&\n cost != null &&\n Decimal.gte(genericBuyable.resource.value, cost)\n );\n });\n if (buyable.canPurchase == null) {\n buyable.canPurchase = computed(\n () =>\n unref((buyable as GenericBuyable).visibility) === Visibility.Visible &&\n unref((buyable as GenericBuyable).canAfford) &&\n Decimal.lt(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n }\n buyable.maxed = computed(() =>\n Decimal.gte(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n processComputable(buyable as T, \"classes\");\n const classes = buyable.classes as ProcessedComputable<Record<string, boolean>> | undefined;\n buyable.classes = computed(() => {\n const currClasses = unref(classes) || {};\n if ((buyable as GenericBuyable).maxed.value) {\n currClasses.bought = true;\n }\n return currClasses;\n });\n processComputable(buyable as T, \"canPurchase\");\n buyable.canClick = buyable.canPurchase as ProcessedComputable<boolean>;\n buyable.onClick = buyable.purchase = function () {\n const genericBuyable = buyable as GenericBuyable;\n if (\n !unref(genericBuyable.canPurchase) ||\n genericBuyable.cost == null ||\n genericBuyable.resource == null\n ) {\n return;\n }\n const cost = unref(genericBuyable.cost);\n genericBuyable.resource.value = Decimal.sub(genericBuyable.resource.value, cost);\n genericBuyable.amount.value = Decimal.add(genericBuyable.amount.value, 1);\n this.onPurchase?.(cost);\n };\n processComputable(buyable as T, \"display\");\n const display = buyable.display;\n buyable.display = jsx(() => {\n // TODO once processComputable types correctly, remove this \"as X\"\n const currDisplay = unref(display) as BuyableDisplay;\n if (isCoercableComponent(currDisplay)) {\n const CurrDisplay = coerceComponent(currDisplay);\n return <CurrDisplay />;\n }\n if (currDisplay != null && buyable.cost != null && buyable.resource != null) {\n const genericBuyable = buyable as GenericBuyable;\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description);\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n const amountDisplay =\n unref(genericBuyable.purchaseLimit) === Decimal.dInf ? (\n <>Amount: {formatWhole(genericBuyable.amount.value)}</>\n ) : (\n <>\n Amount: {formatWhole(genericBuyable.amount.value)} /{\" \"}\n {formatWhole(unref(genericBuyable.purchaseLimit))}\n </>\n );\n\n return (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n <div>\n <br />\n {amountDisplay}\n </div>\n {currDisplay.effectDisplay ? (\n <div>\n <br />\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {genericBuyable.cost && !genericBuyable.maxed.value ? (\n <div>\n <br />\n Cost: {format(unref(genericBuyable.cost) || 0)}{\" \"}\n {buyable.resource.displayName}\n </div>\n ) : null}\n </span>\n );\n }\n return \"\";\n });\n\n processComputable(buyable as T, \"visibility\");\n setDefault(buyable, \"visibility\", Visibility.Visible);\n processComputable(buyable as T, \"cost\");\n processComputable(buyable as T, \"resource\");\n processComputable(buyable as T, \"purchaseLimit\");\n setDefault(buyable, \"purchaseLimit\", Decimal.dInf);\n processComputable(buyable as T, \"style\");\n processComputable(buyable as T, \"mark\");\n processComputable(buyable as T, \"small\");\n\n buyable[GatherProps] = function (this: GenericBuyable) {\n const { display, visibility, style, classes, onClick, canClick, small, mark, id } =\n this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return buyable as unknown as Buyable<T>;\n }, persistent<DecimalSource>(0));\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e580749\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.notifyStyle,\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n feature: true,\n challenge: true,\n done: _ctx.unref(_ctx.completed),\n canStart: _ctx.unref(_ctx.canStart) && !_ctx.unref(_ctx.maxed),\n maxed: _ctx.unref(_ctx.maxed),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"button\", {\n class: \"toggleChallenge\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.toggle && _ctx.toggle(...args))),\n disabled: !_ctx.unref(_ctx.canStart) || _ctx.unref(_ctx.maxed)\n }, _toDisplayString(_ctx.buttonText), 9, _hoisted_1),\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { GenericChallenge } from \"features/challenges/challenge\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { getHighNotifyStyle, getNotifyStyle } from \"game/notifications\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n active: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n maxed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canComplete: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n display: processedPropType<UnwrapRef<GenericChallenge[\"display\"]>>(\n String,\n Object,\n Function\n ),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n completed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canStart: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n toggle: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { active, maxed, canComplete, display } = toRefs(props);\n\n const buttonText = computed(() => {\n if (active.value) {\n return canComplete.value ? \"Finish\" : \"Exit Early\";\n }\n if (maxed.value) {\n return \"Completed\";\n }\n return \"Start\";\n });\n\n const comp = shallowRef<Component | string>(\"\");\n\n const notifyStyle = computed(() => {\n const currActive = unwrapRef(active);\n const currCanComplete = unwrapRef(canComplete);\n if (currActive) {\n if (currCanComplete) {\n return getHighNotifyStyle();\n }\n return getNotifyStyle();\n }\n return {};\n });\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const Goal = coerceComponent(currDisplay.goal || \"\");\n const Reward = coerceComponent(currDisplay.reward || \"\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.goal ? (\n <div>\n <br />\n Goal: <Goal />\n </div>\n ) : null}\n {currDisplay.reward ? (\n <div>\n <br />\n Reward: <Reward />\n </div>\n ) : null}\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n buttonText,\n notifyStyle,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Challenge.vue?vue&type=template&id=5e580749&scoped=true&ts=true\"\nimport script from \"./Challenge.vue?vue&type=script&lang=tsx\"\nexport * from \"./Challenge.vue?vue&type=script&lang=tsx\"\n\nimport \"./Challenge.vue?vue&type=style&index=0&id=5e580749&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5e580749\"]])\n\nexport default __exports__","import { isArray } from \"@vue/shared\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport ChallengeComponent from \"features/challenges/Challenge.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericReset } from \"features/reset\";\nimport { Resource } from \"features/resources/resource\";\nimport { globalBus } from \"game/events\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref, watch, WatchStopHandle } from \"vue\";\n\nexport const ChallengeType = Symbol(\"ChallengeType\");\n\nexport interface ChallengeOptions {\n visibility?: Computable<Visibility>;\n canStart?: Computable<boolean>;\n reset?: GenericReset;\n canComplete?: Computable<boolean | DecimalSource>;\n completionLimit?: Computable<DecimalSource>;\n mark?: Computable<boolean | string>;\n resource?: Resource;\n goal?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n goal?: CoercableComponent;\n reward?: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n onExit?: VoidFunction;\n onEnter?: VoidFunction;\n}\n\nexport interface BaseChallenge {\n id: string;\n completions: Persistent<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: Persistent<boolean>;\n toggle: VoidFunction;\n complete: (remainInChallenge?: boolean) => void;\n type: typeof ChallengeType;\n [Component]: typeof ChallengeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Challenge<T extends ChallengeOptions> = Replace<\n T & BaseChallenge,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canStart: GetComputableTypeWithDefault<T[\"canStart\"], true>;\n canComplete: GetComputableTypeWithDefault<T[\"canComplete\"], Ref<boolean>>;\n completionLimit: GetComputableTypeWithDefault<T[\"completionLimit\"], 1>;\n mark: GetComputableTypeWithDefault<T[\"mark\"], Ref<boolean>>;\n goal: GetComputableType<T[\"goal\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericChallenge = Replace<\n Challenge<ChallengeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canStart: ProcessedComputable<boolean>;\n canComplete: ProcessedComputable<boolean | DecimalSource>;\n completionLimit: ProcessedComputable<DecimalSource>;\n mark: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createChallenge<T extends ChallengeOptions>(\n optionsFunc: OptionsFunc<T, Challenge<T>, BaseChallenge>\n): Challenge<T> {\n const completions = persistent(0);\n const active = persistent(false);\n return createLazyProxy(() => {\n const challenge = optionsFunc();\n\n if (\n challenge.canComplete == null &&\n (challenge.resource == null || challenge.goal == null)\n ) {\n console.warn(\n \"Cannot create challenge without a canComplete property or a resource and goal property\",\n challenge\n );\n throw \"Cannot create challenge without a canComplete property or a resource and goal property\";\n }\n\n challenge.id = getUniqueID(\"challenge-\");\n challenge.type = ChallengeType;\n challenge[Component] = ChallengeComponent;\n\n challenge.completions = completions;\n challenge.active = active;\n challenge.completed = computed(() =>\n Decimal.gt((challenge as GenericChallenge).completions.value, 0)\n );\n challenge.maxed = computed(() =>\n Decimal.gte(\n (challenge as GenericChallenge).completions.value,\n unref((challenge as GenericChallenge).completionLimit)\n )\n );\n challenge.toggle = function () {\n const genericChallenge = challenge as GenericChallenge;\n if (genericChallenge.active.value) {\n if (unref(genericChallenge.canComplete) && !genericChallenge.maxed.value) {\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n }\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n } else if (\n unref(genericChallenge.canStart) &&\n unref(genericChallenge.visibility) === Visibility.Visible &&\n !genericChallenge.maxed.value\n ) {\n genericChallenge.reset?.reset();\n genericChallenge.active.value = true;\n genericChallenge.onEnter?.();\n }\n };\n challenge.complete = function (remainInChallenge?: boolean) {\n const genericChallenge = challenge as GenericChallenge;\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (\n genericChallenge.active.value &&\n completions !== false &&\n (completions === true || Decimal.neq(0, completions)) &&\n !genericChallenge.maxed.value\n ) {\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n if (remainInChallenge !== true) {\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n }\n }\n };\n processComputable(challenge as T, \"visibility\");\n setDefault(challenge, \"visibility\", Visibility.Visible);\n const visibility = challenge.visibility as ProcessedComputable<Visibility>;\n challenge.visibility = computed(() => {\n if (settings.hideChallenges === true && unref(challenge.maxed)) {\n return Visibility.None;\n }\n return unref(visibility);\n });\n if (challenge.canComplete == null) {\n challenge.canComplete = computed(() => {\n const genericChallenge = challenge as GenericChallenge;\n if (\n !genericChallenge.active.value ||\n genericChallenge.resource == null ||\n genericChallenge.goal == null\n ) {\n return false;\n }\n return Decimal.gte(genericChallenge.resource.value, unref(genericChallenge.goal));\n });\n }\n if (challenge.mark == null) {\n challenge.mark = computed(\n () =>\n Decimal.gt(unref((challenge as GenericChallenge).completionLimit), 1) &&\n !!unref(challenge.maxed)\n );\n }\n\n processComputable(challenge as T, \"canStart\");\n setDefault(challenge, \"canStart\", true);\n processComputable(challenge as T, \"canComplete\");\n processComputable(challenge as T, \"completionLimit\");\n setDefault(challenge, \"completionLimit\", 1);\n processComputable(challenge as T, \"mark\");\n processComputable(challenge as T, \"goal\");\n processComputable(challenge as T, \"classes\");\n processComputable(challenge as T, \"style\");\n processComputable(challenge as T, \"display\");\n\n if (challenge.reset != null) {\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === challenge.reset && (challenge.active as Ref<boolean>).value) {\n (challenge.toggle as VoidFunction)();\n }\n });\n }\n\n challenge[GatherProps] = function (this: GenericChallenge) {\n const {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style,\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n } = this;\n return {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style: unref(style),\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n };\n };\n\n return challenge as unknown as Challenge<T>;\n });\n}\n\nexport function setupAutoComplete(\n challenge: GenericChallenge,\n autoActive: Computable<boolean> = true,\n exitOnComplete = true\n): WatchStopHandle {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return watch([challenge.canComplete, isActive], ([canComplete, isActive]) => {\n if (canComplete && isActive) {\n challenge.complete(!exitOnComplete);\n }\n });\n}\n\nexport function createActiveChallenge(\n challenges: GenericChallenge[]\n): Ref<GenericChallenge | undefined> {\n return computed(() => challenges.find(challenge => challenge.active.value));\n}\n\nexport function isAnyChallengeActive(\n challenges: GenericChallenge[] | Ref<GenericChallenge | undefined>\n): Ref<boolean> {\n if (isArray(challenges)) {\n challenges = createActiveChallenge(challenges);\n }\n return computed(() => (challenges as Ref<GenericChallenge | undefined>).value != null);\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n hideChallenges: boolean;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"hideChallenges\", false);\n});\n\nregisterSettingField(\n jsx(() => (\n <Toggle\n title=\"Hide Maxed Challenges\"\n onUpdate:modelValue={value => (settings.hideChallenges = value)}\n modelValue={settings.hideChallenges}\n />\n ))\n);\n","import { hasWon } from \"data/projEntry\";\nimport { globalBus } from \"game/events\";\nimport player from \"game/player\";\nimport { registerInfoComponent } from \"game/settings\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n GetComputableType,\n ProcessedComputable,\n processComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { shallowReactive, unref } from \"vue\";\nimport { OptionsFunc, findFeatures, jsx, Replace, setDefault } from \"./feature\";\n\nexport const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});\nexport const HotkeyType = Symbol(\"Hotkey\");\n\nexport interface HotkeyOptions {\n enabled?: Computable<boolean>;\n key: string;\n description: Computable<string>;\n onPress: VoidFunction;\n}\n\nexport interface BaseHotkey {\n type: typeof HotkeyType;\n}\n\nexport type Hotkey<T extends HotkeyOptions> = Replace<\n T & BaseHotkey,\n {\n enabled: GetComputableTypeWithDefault<T[\"enabled\"], true>;\n description: GetComputableType<T[\"description\"]>;\n }\n>;\n\nexport type GenericHotkey = Replace<\n Hotkey<HotkeyOptions>,\n {\n enabled: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createHotkey<T extends HotkeyOptions>(\n optionsFunc: OptionsFunc<T, Hotkey<T>, BaseHotkey>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey = optionsFunc();\n hotkey.type = HotkeyType;\n\n processComputable(hotkey as T, \"enabled\");\n setDefault(hotkey, \"enabled\", true);\n processComputable(hotkey as T, \"description\");\n\n return hotkey as unknown as Hotkey<T>;\n });\n}\n\nglobalBus.on(\"addLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = hotkey;\n });\n});\n\nglobalBus.on(\"removeLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = undefined;\n });\n});\n\ndocument.onkeydown = function (e) {\n if ((e.target as HTMLElement | null)?.tagName === \"INPUT\") {\n return;\n }\n if (hasWon.value && !player.keepGoing) {\n return;\n }\n let key = e.key;\n if (e.shiftKey) {\n key = \"shift+\" + key;\n }\n if (e.ctrlKey) {\n key = \"ctrl+\" + key;\n }\n const hotkey = hotkeys[key];\n if (hotkey && unref(hotkey.enabled)) {\n e.preventDefault();\n hotkey.onPress();\n }\n};\n\nregisterInfoComponent(\n jsx(() => {\n const keys = Object.values(hotkeys).filter(hotkey => unref(hotkey?.enabled));\n if (keys.length === 0) {\n return \"\";\n }\n return (\n <div>\n <br />\n <h4>Hotkeys</h4>\n {keys.map(hotkey => (\n <div>\n {hotkey?.key}: {hotkey?.description}\n </div>\n ))}\n </div>\n );\n })\n);\n","import LinksComponent from \"./Links.vue\";\nimport { Component, OptionsFunc, GatherProps, Replace } from \"features/feature\";\nimport { Position } from \"game/layers\";\nimport {\n Computable,\n GetComputableType,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { SVGAttributes } from \"vue\";\n\nexport const LinksType = Symbol(\"Links\");\n\nexport interface Link extends SVGAttributes {\n startNode: { id: string };\n endNode: { id: string };\n offsetStart?: Position;\n offsetEnd?: Position;\n}\n\nexport interface LinksOptions {\n links?: Computable<Link[]>;\n}\n\nexport interface BaseLinks {\n type: typeof LinksType;\n [Component]: typeof LinksComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Links<T extends LinksOptions> = Replace<\n T & BaseLinks,\n {\n links: GetComputableType<T[\"links\"]>;\n }\n>;\n\nexport type GenericLinks = Replace<\n Links<LinksOptions>,\n {\n links: ProcessedComputable<Link[]>;\n }\n>;\n\nexport function createLinks<T extends LinksOptions>(\n optionsFunc: OptionsFunc<T, Links<T>, BaseLinks>\n): Links<T> {\n return createLazyProxy(() => {\n const links = optionsFunc();\n links.type = LinksType;\n links[Component] = LinksComponent;\n\n processComputable(links as T, \"links\");\n\n links[GatherProps] = function (this: GenericLinks) {\n const { links } = this;\n return {\n links\n };\n };\n\n return links as unknown as Links<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({ feature: true, milestone: true, done: _ctx.unref(_ctx.earned), ..._ctx.unref(_ctx.classes) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)))),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { GenericMilestone } from \"features/milestones/milestone\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, UnwrapRef, watchEffect } from \"vue\";\nimport Node from \"../../components/Node.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<UnwrapRef<GenericMilestone[\"display\"]>>(\n String,\n Object,\n Function\n ),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { display } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Requirement = coerceComponent(currDisplay.requirement, \"h3\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\", \"b\");\n const OptionsDisplay = coerceComponent(currDisplay.optionsDisplay || \"\", \"span\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n <Requirement />\n {currDisplay.effectDisplay ? (\n <div>\n <EffectDisplay />\n </div>\n ) : null}\n {currDisplay.optionsDisplay ? (\n <div class=\"equal-spaced\">\n <OptionsDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n comp,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Milestone.vue?vue&type=template&id=0b660ac3&scoped=true&ts=true\"\nimport script from \"./Milestone.vue?vue&type=script&lang=tsx\"\nexport * from \"./Milestone.vue?vue&type=script&lang=tsx\"\n\nimport \"./Milestone.vue?vue&type=style&index=0&id=0b660ac3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0b660ac3\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport MilestoneComponent from \"features/milestones/Milestone.vue\";\nimport { globalBus } from \"game/events\";\nimport \"game/notifications\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const MilestoneType = Symbol(\"Milestone\");\n\nexport enum MilestoneDisplay {\n All = \"all\",\n //Last = \"last\",\n Configurable = \"configurable\",\n Incomplete = \"incomplete\",\n None = \"none\"\n}\n\nexport interface MilestoneOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n display?: Computable<\n | CoercableComponent\n | {\n requirement: CoercableComponent;\n effectDisplay?: CoercableComponent;\n optionsDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseMilestone extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof MilestoneType;\n [Component]: typeof MilestoneComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Milestone<T extends MilestoneOptions> = Replace<\n T & BaseMilestone,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericMilestone = Replace<\n Milestone<MilestoneOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createMilestone<T extends MilestoneOptions>(\n optionsFunc: OptionsFunc<T, Milestone<T>, BaseMilestone>\n): Milestone<T> {\n return createLazyProxy(persistent => {\n const milestone = Object.assign(persistent, optionsFunc());\n milestone.id = getUniqueID(\"milestone-\");\n milestone.type = MilestoneType;\n milestone[Component] = MilestoneComponent;\n\n milestone.earned = milestone[PersistentState];\n milestone.complete = function () {\n milestone[PersistentState].value = true;\n };\n\n processComputable(milestone as T, \"visibility\");\n setDefault(milestone, \"visibility\", Visibility.Visible);\n const visibility = milestone.visibility as ProcessedComputable<Visibility>;\n milestone.visibility = computed(() => {\n const display = unref((milestone as GenericMilestone).display);\n switch (settings.msDisplay) {\n default:\n case MilestoneDisplay.All:\n return unref(visibility);\n case MilestoneDisplay.Configurable:\n if (\n unref(milestone.earned) &&\n !(\n display != null &&\n typeof display == \"object\" &&\n \"optionsDisplay\" in (display as Record<string, unknown>)\n )\n ) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.Incomplete:\n if (unref(milestone.earned)) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.None:\n return Visibility.None;\n }\n });\n\n processComputable(milestone as T, \"style\");\n processComputable(milestone as T, \"classes\");\n processComputable(milestone as T, \"display\");\n\n milestone[GatherProps] = function (this: GenericMilestone) {\n const { visibility, display, style, classes, earned, id } = this;\n return { visibility, display, style: unref(style), classes, earned, id };\n };\n\n if (milestone.shouldEarn) {\n const genericMilestone = milestone as GenericMilestone;\n watchEffect(() => {\n if (\n !genericMilestone.earned.value &&\n unref(genericMilestone.visibility) === Visibility.Visible &&\n genericMilestone.shouldEarn?.()\n ) {\n genericMilestone.earned.value = true;\n genericMilestone.onComplete?.();\n if (genericMilestone.display) {\n const display = unref(genericMilestone.display);\n const Display = coerceComponent(\n isCoercableComponent(display) ? display : display.requirement\n );\n toast(\n <>\n <h3>Milestone earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </>\n );\n }\n }\n });\n }\n\n return milestone as unknown as Milestone<T>;\n }, persistent<boolean>(false));\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n msDisplay: MilestoneDisplay;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"msDisplay\", MilestoneDisplay.All);\n});\n\nconst msDisplayOptions = Object.values(MilestoneDisplay).map(option => ({\n label: camelToTitle(option),\n value: option\n}));\n\nregisterSettingField(\n jsx(() => (\n <Select\n title=\"Show Milestones\"\n options={msDisplayOptions}\n onUpdate:modelValue={value => (settings.msDisplay = value as MilestoneDisplay)}\n modelValue={settings.msDisplay}\n />\n ))\n);\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CoercableComponent } from \"features/feature\";\nimport { computeComponent } from \"util/vue\";\nimport { toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n display: null\n },\n setup(__props: any) {\n\nconst _props = __props as { display: CoercableComponent }\n\n\nconst { display } = toRefs(_props);\nconst component = computeComponent(display);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n}\n}\n\n})","import script from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport TabComponent from \"features/tabs/Tab.vue\";\nimport { Computable, GetComputableType } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const TabType = Symbol(\"Tab\");\n\nexport interface TabOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseTab {\n id: string;\n type: typeof TabType;\n [Component]: typeof TabComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tab<T extends TabOptions> = Replace<\n T & BaseTab,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericTab = Tab<TabOptions>;\n\nexport function createTab<T extends TabOptions>(\n optionsFunc: OptionsFunc<T, Tab<T>, BaseTab>\n): Tab<T> {\n return createLazyProxy(() => {\n const tab = optionsFunc();\n tab.id = getUniqueID(\"tab-\");\n tab.type = TabType;\n tab[Component] = TabComponent;\n\n tab[GatherProps] = function (this: GenericTab) {\n const { display } = this;\n return { display };\n };\n\n return tab as unknown as Tab<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.selectTab && _ctx.selectTab(...args))),\n class: _normalizeClass([\"tabButton\", {\n active: _ctx.active,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.glowColorStyle,\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { getNotifyStyle } from \"game/notifications\";\nimport { computeComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n glowColor: processedPropType<string>(String),\n active: Boolean,\n floating: Boolean\n },\n emits: [\"selectTab\"],\n setup(props, { emit }) {\n const { display, glowColor, floating } = toRefs(props);\n\n const component = computeComponent(display);\n\n const glowColorStyle = computed(() => {\n const color = unwrapRef(glowColor);\n if (!color) {\n return {};\n }\n if (unref(floating)) {\n return getNotifyStyle(color);\n }\n return { boxShadow: `0px 9px 5px -6px ${color}` };\n });\n\n function selectTab() {\n emit(\"selectTab\");\n }\n\n return {\n selectTab,\n component,\n glowColorStyle,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./TabButton.vue?vue&type=template&id=361380c0&scoped=true&ts=true\"\nimport script from \"./TabButton.vue?vue&type=script&lang=ts\"\nexport * from \"./TabButton.vue?vue&type=script&lang=ts\"\n\nimport \"./TabButton.vue?vue&type=style&index=0&id=361380c0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-361380c0\"]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TabButton = _resolveComponent(\"TabButton\")!\n const _component_Sticky = _resolveComponent(\"Sticky\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tab-family-container\", { ..._ctx.unref(_ctx.classes), ..._ctx.tabClasses }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? [],\n _ctx.tabStyle ?? []\n ])\n }, [\n _createVNode(_component_Sticky, { class: \"tab-buttons-container\" }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tab-buttons\", { floating: _ctx.floating }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.tabs), (button, id) => {\n return (_openBlock(), _createBlock(_component_TabButton, _mergeProps({\n onSelectTab: ($event: any) => (_ctx.selected.value = id),\n floating: _ctx.floating,\n key: id,\n active: _ctx.unref(button.tab) === _ctx.unref(_ctx.activeTab)\n }, _ctx.gatherButtonProps(button)), null, 16, [\"onSelectTab\", \"floating\", \"active\"]))\n }), 128))\n ], 2)\n ]),\n _: 1\n }),\n (_ctx.unref(_ctx.activeTab))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Sticky from \"components/layout/Sticky.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { GenericTab } from \"features/tabs/tab\";\nimport TabButton from \"features/tabs/TabButton.vue\";\nimport { GenericTabButton } from \"features/tabs/tabFamily\";\nimport settings from \"game/settings\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n Ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n activeTab: {\n type: processedPropType<GenericTab | CoercableComponent | null>(Object),\n required: true\n },\n selected: {\n type: Object as PropType<Ref<string>>,\n required: true\n },\n tabs: {\n type: processedPropType<Record<string, GenericTabButton>>(Object),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object)\n },\n components: {\n Sticky,\n TabButton\n },\n setup(props) {\n const { activeTab } = toRefs(props);\n\n const floating = computed(() => {\n return themes[settings.theme].floatingTabs;\n });\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currActiveTab = unwrapRef(activeTab);\n if (currActiveTab == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currActiveTab)) {\n component.value = coerceComponent(currActiveTab);\n return;\n }\n component.value = coerceComponent(unref(currActiveTab.display));\n });\n\n const tabClasses = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n const tabClasses =\n isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.classes);\n return tabClasses;\n });\n\n const tabStyle = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n return isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.style);\n });\n\n function gatherButtonProps(button: GenericTabButton) {\n const { display, style, classes, glowColor, visibility } = button;\n return { display, style, classes, glowColor, visibility };\n }\n\n return {\n floating,\n tabClasses,\n tabStyle,\n Visibility,\n component,\n gatherButtonProps,\n unref\n };\n }\n});\n","import { render } from \"./TabFamily.vue?vue&type=template&id=38d5b5f9&scoped=true&ts=true\"\nimport script from \"./TabFamily.vue?vue&type=script&lang=ts\"\nexport * from \"./TabFamily.vue?vue&type=script&lang=ts\"\n\nimport \"./TabFamily.vue?vue&type=style&index=0&id=38d5b5f9&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-38d5b5f9\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport TabButtonComponent from \"features/tabs/TabButton.vue\";\nimport TabFamilyComponent from \"features/tabs/TabFamily.vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { GenericTab } from \"./tab\";\n\nexport const TabButtonType = Symbol(\"TabButton\");\nexport const TabFamilyType = Symbol(\"TabFamily\");\n\nexport interface TabButtonOptions {\n visibility?: Computable<Visibility>;\n tab: Computable<GenericTab | CoercableComponent>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n glowColor?: Computable<string>;\n}\n\nexport interface BaseTabButton {\n type: typeof TabButtonType;\n [Component]: typeof TabButtonComponent;\n}\n\nexport type TabButton<T extends TabButtonOptions> = Replace<\n T & BaseTabButton,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tab: GetComputableType<T[\"tab\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n }\n>;\n\nexport type GenericTabButton = Replace<\n TabButton<TabButtonOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport interface TabFamilyOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\n tabs: Record<string, TabButtonOptions>;\n activeTab: Ref<GenericTab | CoercableComponent | null>;\n selected: Ref<string>;\n type: typeof TabFamilyType;\n [Component]: typeof TabFamilyComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TabFamily<T extends TabFamilyOptions> = Replace<\n T & BaseTabFamily,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tabs: Record<string, GenericTabButton>;\n }\n>;\n\nexport type GenericTabFamily = Replace<\n TabFamily<TabFamilyOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTabFamily<T extends TabFamilyOptions>(\n tabs: Record<string, () => TabButtonOptions>,\n optionsFunc?: OptionsFunc<T, TabFamily<T>, BaseTabFamily>\n): TabFamily<T> {\n if (Object.keys(tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\");\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n return createLazyProxy(persistent => {\n const tabFamily = Object.assign(persistent, optionsFunc?.());\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n tabFamily.tabs = Object.keys(tabs).reduce<Record<string, GenericTabButton>>(\n (parsedTabs, tab) => {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabs[tab]();\n tabButton.type = TabButtonType;\n tabButton[Component] = TabButtonComponent;\n\n processComputable(tabButton as TabButtonOptions, \"visibility\");\n setDefault(tabButton, \"visibility\", Visibility.Visible);\n processComputable(tabButton as TabButtonOptions, \"tab\");\n processComputable(tabButton as TabButtonOptions, \"display\");\n processComputable(tabButton as TabButtonOptions, \"classes\");\n processComputable(tabButton as TabButtonOptions, \"style\");\n processComputable(tabButton as TabButtonOptions, \"glowColor\");\n parsedTabs[tab] = tabButton as GenericTabButton;\n return parsedTabs;\n },\n {}\n );\n tabFamily.selected = tabFamily[PersistentState];\n tabFamily.activeTab = computed(() => {\n const tabs = unref(processedTabFamily.tabs);\n if (\n tabFamily[PersistentState].value in tabs &&\n unref(tabs[processedTabFamily[PersistentState].value].visibility) ===\n Visibility.Visible\n ) {\n return unref(tabs[processedTabFamily[PersistentState].value].tab);\n }\n const firstTab = Object.values(tabs).find(\n tab => unref(tab.visibility) === Visibility.Visible\n );\n if (firstTab) {\n return unref(firstTab.tab);\n }\n return null;\n });\n\n processComputable(tabFamily as T, \"visibility\");\n setDefault(tabFamily, \"visibility\", Visibility.Visible);\n processComputable(tabFamily as T, \"classes\");\n processComputable(tabFamily as T, \"style\");\n\n tabFamily[GatherProps] = function (this: GenericTabFamily) {\n const { visibility, activeTab, selected, tabs, style, classes } = this;\n return { visibility, activeTab, selected, tabs, style: unref(style), classes };\n };\n\n // This is necessary because board.types is different from T and TabFamily\n const processedTabFamily = tabFamily as unknown as TabFamily<T>;\n return processedTabFamily;\n }, persistent(Object.keys(tabs)[0]));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-264c96b4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.purchase && _ctx.purchase(...args))),\n class: _normalizeClass({\n feature: true,\n upgrade: true,\n can: _ctx.unref(_ctx.canPurchase),\n locked: !_ctx.unref(_ctx.canPurchase),\n bought: _ctx.unref(_ctx.bought),\n ..._ctx.unref(_ctx.classes)\n }),\n disabled: !_ctx.unref(_ctx.canPurchase)\n }, [\n (_ctx.unref(_ctx.component))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { GenericUpgrade } from \"features/upgrades/upgrade\";\nimport { DecimalSource } from \"util/bignum\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericUpgrade[\"display\"]>>(String, Object, Function),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n resource: Object as PropType<Resource>,\n cost: processedPropType<DecimalSource>(String, Object, Number),\n canPurchase: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n bought: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n purchase: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, cost } = toRefs(props);\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n component.value = coerceComponent(currDisplay);\n return;\n }\n const currCost = unwrapRef(cost);\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n component.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {props.resource != null ? (\n <>\n <br />\n Cost: {props.resource &&\n displayResource(props.resource, currCost)}{\" \"}\n {props.resource?.displayName}\n </>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Upgrade.vue?vue&type=template&id=264c96b4&scoped=true&ts=true\"\nimport script from \"./Upgrade.vue?vue&type=script&lang=tsx\"\nexport * from \"./Upgrade.vue?vue&type=script&lang=tsx\"\n\nimport \"./Upgrade.vue?vue&type=style&index=0&id=264c96b4&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-264c96b4\"]])\n\nexport default __exports__","import UpgradeComponent from \"features/upgrades/Upgrade.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n findFeatures,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport { GenericLayer } from \"game/layers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\n\nexport const UpgradeType = Symbol(\"Upgrade\");\n\nexport interface UpgradeOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n mark?: Computable<boolean | string>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canAfford?: Computable<boolean>;\n onPurchase?: VoidFunction;\n}\n\nexport interface BaseUpgrade extends Persistent<boolean> {\n id: string;\n bought: Ref<boolean>;\n canPurchase: Ref<boolean>;\n purchase: VoidFunction;\n type: typeof UpgradeType;\n [Component]: typeof UpgradeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Upgrade<T extends UpgradeOptions> = Replace<\n T & BaseUpgrade,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n cost: GetComputableType<T[\"cost\"]>;\n canAfford: GetComputableTypeWithDefault<T[\"canAfford\"], Ref<boolean>>;\n }\n>;\n\nexport type GenericUpgrade = Replace<\n Upgrade<UpgradeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createUpgrade<T extends UpgradeOptions>(\n optionsFunc: OptionsFunc<T, Upgrade<T>, BaseUpgrade>\n): Upgrade<T> {\n return createLazyProxy(persistent => {\n const upgrade = Object.assign(persistent, optionsFunc());\n upgrade.id = getUniqueID(\"upgrade-\");\n upgrade.type = UpgradeType;\n upgrade[Component] = UpgradeComponent;\n\n if (upgrade.canAfford == null && (upgrade.resource == null || upgrade.cost == null)) {\n console.warn(\n \"Error: can't create upgrade without a canAfford property or a resource and cost property\",\n upgrade\n );\n }\n\n upgrade.bought = upgrade[PersistentState];\n if (upgrade.canAfford == null) {\n upgrade.canAfford = computed(() => {\n const genericUpgrade = upgrade as GenericUpgrade;\n return (\n genericUpgrade.resource != null &&\n genericUpgrade.cost != null &&\n Decimal.gte(genericUpgrade.resource.value, unref(genericUpgrade.cost))\n );\n });\n } else {\n processComputable(upgrade as T, \"canAfford\");\n }\n upgrade.canPurchase = computed(\n () =>\n unref((upgrade as GenericUpgrade).visibility) === Visibility.Visible &&\n unref((upgrade as GenericUpgrade).canAfford) &&\n !unref(upgrade.bought)\n );\n upgrade.purchase = function () {\n const genericUpgrade = upgrade as GenericUpgrade;\n if (!unref(genericUpgrade.canPurchase)) {\n return;\n }\n if (genericUpgrade.resource != null && genericUpgrade.cost != null) {\n genericUpgrade.resource.value = Decimal.sub(\n genericUpgrade.resource.value,\n unref(genericUpgrade.cost)\n );\n }\n genericUpgrade[PersistentState].value = true;\n genericUpgrade.onPurchase?.();\n };\n\n processComputable(upgrade as T, \"visibility\");\n setDefault(upgrade, \"visibility\", Visibility.Visible);\n processComputable(upgrade as T, \"classes\");\n processComputable(upgrade as T, \"style\");\n processComputable(upgrade as T, \"display\");\n processComputable(upgrade as T, \"mark\");\n processComputable(upgrade as T, \"cost\");\n processComputable(upgrade as T, \"resource\");\n\n upgrade[GatherProps] = function (this: GenericUpgrade) {\n const {\n display,\n visibility,\n style,\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n };\n };\n\n return upgrade as unknown as Upgrade<T>;\n }, persistent<boolean>(false));\n}\n\nexport function setupAutoPurchase(\n layer: GenericLayer,\n autoActive: Computable<boolean>,\n upgrades: GenericUpgrade[] = []\n): void {\n upgrades = upgrades || findFeatures(layer, UpgradeType);\n const isAutoActive = isFunction(autoActive) ? computed(autoActive) : autoActive;\n layer.on(\"update\", () => {\n if (unref(isAutoActive)) {\n upgrades.forEach(upgrade => upgrade.purchase());\n }\n });\n}\n","import Slider from \"components/fields/Slider.vue\";\nimport Text from \"components/fields/Text.vue\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport Column from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport Sticky from \"components/layout/Sticky.vue\";\nimport VerticalRule from \"components/layout/VerticalRule.vue\";\nimport Modal from \"components/Modal.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport themes from \"data/themes\";\nimport { createBar, Direction } from \"features/bars/bar\";\nimport { createBuyable } from \"features/buyable\";\nimport { createChallenge } from \"features/challenges/challenge\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport {\n addSoftcap,\n createCumulativeConversion,\n createPolynomialScaling\n} from \"features/conversion\";\nimport { jsx, showIf, Visibility } from \"features/feature\";\nimport { createHotkey } from \"features/hotkey\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createLinks } from \"features/links/links\";\nimport { createMilestone } from \"features/milestones/milestone\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource, trackBest } from \"features/resources/resource\";\nimport Resource from \"features/resources/Resource.vue\";\nimport { createTab } from \"features/tabs/tab\";\nimport { createTabFamily } from \"features/tabs/tabFamily\";\nimport { addTooltip, TooltipDirection } from \"features/tooltips/tooltip\";\nimport {\n createResourceTooltip,\n createTree,\n createTreeNode,\n GenericTreeNode,\n TreeBranch\n} from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\nimport {\n createAdditiveModifier,\n createExponentialModifier,\n createModifierSection,\n createSequentialModifier\n} from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal, { format, formatWhole } from \"util/bignum\";\nimport { render, renderCol, renderRow } from \"util/vue\";\nimport { computed, ComputedRef, ref } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"c\";\nconst layer = createLayer(id, () => {\n const color = \"#4BDC13\";\n const name = \"Candies\";\n const points = createResource<DecimalSource>(0, \"lollipops\");\n const best = trackBest(points);\n const beep = persistent<boolean>(false);\n const thingy = persistent<string>(\"pointy\");\n const otherThingy = persistent<number>(10);\n const spentOnBuyables = persistent(new Decimal(10));\n\n const waffleBoost = computed(() => Decimal.pow(points.value, 0.2));\n const icecreamCap = computed(() => Decimal.times(points.value, 10));\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" },\n color: \"rgb(75, 220, 19)\"\n }));\n\n const lollipopMilestone3 = createMilestone(() => ({\n shouldEarn() {\n return Decimal.gte(best.value, 3);\n },\n display: {\n requirement: \"3 Lollipops\",\n effectDisplay: \"Unlock the next milestone\"\n }\n }));\n const lollipopMilestone4 = createMilestone(() => ({\n visibility() {\n return showIf(lollipopMilestone3.earned.value);\n },\n shouldEarn() {\n return Decimal.gte(best.value, 4);\n },\n display: {\n requirement: \"4 Lollipops\",\n effectDisplay: \"You can toggle beep and boop (which do nothing)\",\n optionsDisplay: jsx(() => (\n <>\n <Toggle\n title=\"beep\"\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Toggle\n title=\"boop\"\n onUpdate:modelValue={value => (f.boop.value = value)}\n modelValue={f.boop.value}\n />\n </>\n ))\n },\n style() {\n if (this.earned) {\n return { backgroundColor: \"#1111DD\" };\n }\n return {};\n }\n }));\n const lollipopMilestones = [lollipopMilestone3, lollipopMilestone4];\n\n const funChallenge = createChallenge(() => ({\n title: \"Fun\",\n completionLimit: 3,\n display() {\n return {\n description: `Makes the game 0% harder<br>${formatWhole(this.completions.value)}/${\n this.completionLimit\n } completions`,\n goal: \"Have 20 points I guess\",\n reward: \"Says hi\",\n effectDisplay: format(funEffect.value) + \"x\"\n };\n },\n visibility() {\n return showIf(Decimal.gt(best.value, 0));\n },\n goal: 20,\n resource: main.points,\n onComplete() {\n console.log(\"hiii\");\n },\n onEnter() {\n main.points.value = 0;\n main.best.value = main.points.value;\n main.total.value = main.points.value;\n console.log(\"So challenging\");\n },\n onExit() {\n console.log(\"Sweet freedom!\");\n },\n style: {\n height: \"200px\"\n }\n }));\n const funEffect = computed(() => Decimal.add(points.value, 1).tetrate(0.02));\n\n const generatorUpgrade = createUpgrade(() => ({\n display: {\n title: \"Generator of Genericness\",\n description: \"Gain 1 point every second\"\n },\n cost: 1,\n resource: points\n }));\n const lollipopMultiplierUpgrade = createUpgrade(() => ({\n display: () => ({\n description: \"Point generation is faster based on your unspent Lollipops\",\n effectDisplay: `${format(lollipopMultiplierEffect.value)}x`\n }),\n cost: 1,\n resource: points,\n visibility: () => showIf(generatorUpgrade.bought.value)\n }));\n const lollipopMultiplierEffect = computed(() => {\n let ret = Decimal.add(points.value, 1).pow(0.5);\n if (ret.gte(\"1e20000000\")) ret = ret.sqrt().times(\"1e10000000\");\n return ret;\n });\n const unlockIlluminatiUpgrade = createUpgrade(() => ({\n visibility() {\n return showIf(lollipopMultiplierUpgrade.bought.value);\n },\n canAfford() {\n return Decimal.lt(main.points.value, 7);\n },\n onPurchase() {\n main.points.value = Decimal.add(main.points.value, 7);\n },\n display:\n \"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.\",\n style() {\n if (this.bought) {\n return { backgroundColor: \"#1111dd\" };\n }\n if (!this.canAfford) {\n return { backgroundColor: \"#dd1111\" };\n }\n return {};\n }\n }));\n const quasiUpgrade = createUpgrade(() => ({\n resource: createResource(exhancers.amount, \"Exhancers\", 0),\n cost: 3,\n display: {\n title: \"This upgrade doesn't exist\",\n description: \"Or does it?\"\n }\n }));\n const upgrades = [generatorUpgrade, lollipopMultiplierUpgrade, unlockIlluminatiUpgrade];\n\n const exhancers = createBuyable(() => ({\n resource: points,\n cost() {\n let x = new Decimal(this.amount.value);\n if (x.gte(25)) {\n x = x.pow(2).div(25);\n }\n const cost = Decimal.pow(2, x.pow(1.5));\n return cost.floor();\n },\n display() {\n return {\n title: \"Exhancers\",\n description: `Adds ${format(\n thingEffect.value\n )} things and multiplies stuff by ${format(stuffEffect.value)}.`\n };\n },\n onPurchase(cost) {\n spentOnBuyables.value = Decimal.add(spentOnBuyables.value, cost);\n },\n style: { height: \"222px\" },\n purchaseLimit: 4\n }));\n // The following need redundant ComputedRef<Decimal> type annotations because otherwise the ts\n // interpreter thinks exhancers are cyclically referenced\n const thingEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const stuffEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const confirmRespec = persistent<boolean>(false);\n const confirming = ref(false);\n const respecBuyables = createClickable(() => ({\n small: true,\n display: \"Respec Thingies\",\n onClick() {\n if (confirmRespec.value && !confirming.value) {\n confirming.value = true;\n return;\n }\n\n points.value = Decimal.add(points.value, spentOnBuyables.value);\n exhancers.amount.value = 0;\n main.tree.reset(treeNode);\n }\n }));\n const sellExhancer = createClickable(() => ({\n small: true,\n display: \"Sell One\",\n onClick() {\n if (Decimal.lte(exhancers.amount.value, 0)) {\n return;\n }\n exhancers.amount.value = Decimal.sub(exhancers.amount.value, 1);\n points.value = Decimal.add(points.value, exhancers.cost.value);\n spentOnBuyables.value = Decimal.sub(spentOnBuyables.value, exhancers.cost.value);\n }\n }));\n const buyablesDisplay = jsx(() => (\n <Column>\n <Row>\n <Toggle\n title=\"Confirm\"\n onUpdate:modelValue={value => (confirmRespec.value = value)}\n modelValue={confirmRespec.value}\n />\n {renderRow(respecBuyables)}\n </Row>\n {renderRow(exhancers)}\n {renderRow(sellExhancer)}\n <Modal\n modelValue={confirming.value}\n onUpdate:modelValue={value => (confirming.value = value)}\n v-slots={{\n header: () => <h2>Confirm Respec</h2>,\n body: () => <>Are you sure? Respeccing these doesn't accomplish much</>,\n footer: () => (\n <div class=\"modal-default-footer\">\n <div class=\"modal-default-flex-grow\"></div>\n <button\n class=\"button modal-default-button\"\n onClick={() => (confirming.value = false)}\n >\n Cancel\n </button>\n <button\n class=\"button modal-default-button danger\"\n onClick={() => {\n respecBuyables.onClick();\n confirming.value = false;\n }}\n >\n Respec\n </button>\n </div>\n )\n }}\n />\n </Column>\n ));\n\n const longBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FFFFFF\" },\n baseStyle: { backgroundColor: \"#696969\" },\n textStyle: { color: \"#04e050\" },\n direction: Direction.Right,\n width: 300,\n height: 30,\n progress() {\n return Decimal.add(main.points.value, 1).log(10).div(10).toNumber();\n },\n display() {\n return format(main.points.value) + \" / 1e10 points\";\n }\n }));\n const tallBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#4BEC13\" },\n baseStyle: { backgroundColor: \"#000000\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n borderStyle: { borderWidth: \"7px\" },\n direction: Direction.Up,\n width: 50,\n height: 200,\n progress() {\n return Decimal.div(main.points.value, 100);\n },\n display() {\n return formatWhole(Decimal.div(main.points.value, 1).min(100)) + \"%\";\n }\n }));\n const flatBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FE0102\" },\n baseStyle: { backgroundColor: \"#222222\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n direction: Direction.Up,\n width: 100,\n height: 30,\n progress() {\n return Decimal.div(points.value, 50);\n }\n }));\n\n const conversion = createCumulativeConversion(() => ({\n scaling: addSoftcap(createPolynomialScaling(10, 0.5), 1e100, 0.5),\n baseResource: main.points,\n gainResource: points,\n roundUpCost: true,\n gainModifier: createSequentialModifier(\n createExponentialModifier(2, \"Because I felt like it\"),\n createAdditiveModifier(1, \"Nice modifier\")\n )\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const hotkeys = [\n createHotkey(() => ({\n key: \"c\",\n description: \"reset for lollipops or whatever\",\n onPress() {\n if (resetButton.canClick.value) {\n resetButton.onClick();\n }\n }\n })),\n createHotkey(() => ({\n key: \"ctrl+c\",\n description: \"respec things\",\n onPress() {\n respecBuyables.onClick();\n }\n }))\n ];\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n mark: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n tooltip() {\n let tooltip = displayResource(points);\n if (Decimal.gt(exhancers.amount.value, 0)) {\n tooltip += `<br><i><br><br><br>${formatWhole(\n exhancers.amount.value\n )} Exhancers</i>`;\n }\n return tooltip;\n },\n style: {\n color: \"#3325CC\",\n textDecoration: \"underline\"\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n style: {\n color: \"#AA66AA\"\n },\n resetDescription: \"Melt your points into \"\n }));\n addTooltip(resetButton, {\n display: jsx(() =>\n createModifierSection(\n \"Modifiers\",\n \"\",\n conversion.gainModifier,\n conversion.scaling.currentGain(conversion)\n )\n ),\n pinnable: true,\n direction: TooltipDirection.DOWN,\n style: \"width: 400px; text-align: left\"\n });\n\n const g = createTreeNode(() => ({\n display: \"TH\",\n color: \"#6d3678\",\n canClick() {\n return Decimal.gte(main.points.value, 10);\n },\n tooltip: \"Thanos your points\",\n onClick() {\n main.points.value = Decimal.div(main.points.value, 2);\n console.log(\"Thanos'd\");\n },\n glowColor() {\n if (Decimal.eq(exhancers.amount.value, 1)) {\n return \"orange\";\n }\n return \"\";\n }\n }));\n const h = createTreeNode(() => ({\n display: \"h\",\n color() {\n return themes[settings.theme].variables[\"--locked\"];\n },\n tooltip: {\n display: computed(() => `Restore your points to ${format(otherThingy.value)}`),\n right: true\n },\n canClick() {\n return Decimal.lt(main.points.value, otherThingy.value);\n },\n onClick() {\n main.points.value = otherThingy.value;\n }\n }));\n const spook = createTreeNode(() => ({\n visibility: Visibility.Hidden\n }));\n const tree = createTree(() => ({\n nodes(): GenericTreeNode[][] {\n return [\n [f.treeNode, treeNode],\n [g, spook, h]\n ];\n },\n branches(): TreeBranch[] {\n return [\n {\n startNode: f.treeNode,\n endNode: treeNode,\n \"stroke-width\": \"25px\",\n stroke: \"green\",\n style: {\n filter: \"blur(5px)\"\n }\n },\n { startNode: treeNode, endNode: g },\n { startNode: g, endNode: h }\n ];\n }\n }));\n\n const links = createLinks(() => ({\n links: [\n {\n startNode: h,\n endNode: flatBoi,\n \"stroke-width\": \"5px\",\n stroke: \"red\",\n offsetEnd: { x: -50 + 100 * flatBoi.progress.value.toNumber(), y: 0 }\n }\n ]\n }));\n\n const illuminatiTabs = createTabFamily(\n {\n first: () => ({\n tab: jsx(() => (\n <>\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n <div>confirmed</div>\n </>\n )),\n display: \"first\"\n }),\n second: () => ({\n tab: f.display,\n display: \"second\"\n })\n },\n () => ({\n style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n })\n );\n\n const tabs = createTabFamily({\n mainTab: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n <MainDisplay\n resource={points}\n color={color}\n effectDisplay={`which are boosting waffles by ${format(\n waffleBoost.value\n )} and increasing the Ice Cream cap by ${format(icecreamCap.value)}`}\n />\n <Sticky>{render(resetButton)}</Sticky>\n <Resource resource={points} color={color} />\n <Spacer height=\"5px\" />\n <button onClick={() => console.log(\"yeet\")}>'HI'</button>\n <div>Name your points!</div>\n <Text\n modelValue={thingy.value}\n onUpdate:modelValue={value => (thingy.value = value)}\n />\n <Sticky style=\"color: red; font-size: 32px; font-family: Comic Sans MS;\">\n I have {displayResource(main.points)} {thingy.value} points!\n </Sticky>\n <hr />\n {renderCol(...lollipopMilestones)}\n <Spacer />\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n {renderRow(funChallenge)}\n </>\n ))\n })),\n display: \"main tab\",\n glowColor() {\n if (\n generatorUpgrade.canPurchase.value ||\n lollipopMultiplierUpgrade.canPurchase.value ||\n unlockIlluminatiUpgrade.canPurchase.value ||\n funChallenge.canComplete.value\n ) {\n return \"blue\";\n }\n return \"\";\n },\n style: { color: \"orange\" }\n }),\n thingies: () => ({\n tab: createTab(() => ({\n style() {\n return { backgroundColor: \"#222222\", \"--background\": \"#222222\" };\n },\n display: jsx(() => (\n <>\n {render(buyablesDisplay)}\n <Spacer />\n <Row style=\"width: 600px; height: 350px; background-color: green; border-style: solid;\">\n <Toggle\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Spacer width=\"30px\" height=\"10px\" />\n <div>\n <span>Beep</span>\n </div>\n <Spacer />\n <VerticalRule height=\"200px\" />\n </Row>\n <Spacer />\n <img src=\"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\" />\n </>\n ))\n })),\n glowColor: \"white\",\n display: \"thingies\",\n style: { borderColor: \"orange\" }\n }),\n jail: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n {render(coolInfo)}\n {render(longBoi)}\n <Spacer />\n <Row>\n <Column style=\"background-color: #555555; padding: 15px\">\n <div style=\"color: teal\">Sugar level:</div>\n <Spacer />\n {render(tallBoi)}\n </Column>\n <Spacer />\n <Column>\n <div>idk</div>\n <Spacer width=\"0\" height=\"50px\" />\n {render(flatBoi)}\n </Column>\n </Row>\n <Spacer />\n <div>It's jail because \"bars\"! So funny! Ha ha!</div>\n {render(tree)}\n </>\n ))\n })),\n display: \"jail\"\n }),\n illuminati: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n // This should really just be <> and </>, however for some reason the\n // typescript interpreter can't figure out this layer and f.tsx otherwise\n <div>\n <h1> C O N F I R M E D </h1>\n <Spacer />\n {render(illuminatiTabs)}\n <div>Adjust how many points H gives you!</div>\n <Slider\n onUpdate:modelValue={value => (otherThingy.value = value)}\n modelValue={otherThingy.value}\n min={1}\n max={30}\n />\n </div>\n )),\n style: {\n backgroundColor: \"#3325CC\"\n }\n })),\n visibility() {\n return showIf(unlockIlluminatiUpgrade.bought.value);\n },\n display: \"illuminati\"\n })\n });\n\n return {\n id,\n color,\n name,\n points,\n best,\n beep,\n thingy,\n otherThingy,\n spentOnBuyables,\n waffleBoost,\n icecreamCap,\n coolInfo,\n lollipopMilestones,\n funChallenge,\n funEffect,\n generatorUpgrade,\n lollipopMultiplierUpgrade,\n lollipopMultiplierEffect,\n unlockIlluminatiUpgrade,\n quasiUpgrade,\n exhancers,\n respecBuyables,\n sellExhancer,\n bars: { tallBoi, longBoi, flatBoi },\n tree,\n g,\n h,\n spook,\n conversion,\n reset,\n hotkeys,\n treeNode,\n resetButton,\n confirmRespec,\n minWidth: 800,\n tabs,\n display: jsx(() => (\n <>\n {render(tabs)}\n {render(links)}\n </>\n ))\n };\n});\n\nexport default layer;\n","import Spacer from \"components/layout/Spacer.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport { createPolynomialScaling, createIndependentConversion } from \"features/conversion\";\nimport { jsx } from \"features/feature\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createParticles } from \"features/particles/particles\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource } from \"features/resources/resource\";\nimport { addTooltip } from \"features/tooltips/tooltip\";\nimport { createResourceTooltip } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { createMultiplicativeModifier } from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { ref } from \"vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst id = \"f\";\nconst layer = createLayer(id, () => {\n const color = \"#FE0102\";\n const name = \"Farms\";\n const points = createResource<DecimalSource>(0, \"farm points\");\n const boop = persistent<boolean>(false);\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" }\n }));\n\n const clickableState = persistent<string>(\"Start\");\n const clickable = createClickable(() => ({\n display() {\n return {\n title: \"Clicky clicky!\",\n description: \"Current state:<br>\" + clickableState.value\n };\n },\n initialState: \"Start\",\n canClick() {\n return clickableState.value !== \"Borkened...\";\n },\n onClick(e) {\n switch (clickableState.value) {\n case \"Start\":\n clickableState.value = \"A new state!\";\n break;\n case \"A new state!\":\n clickableState.value = \"Keep going!\";\n break;\n case \"Keep going!\":\n clickableState.value = \"Maybe that's a bit too far...\";\n break;\n case \"Maybe that's a bit too far...\":\n const pos = e == undefined ? undefined : \"touches\" in e ? e.touches[0] : e;\n const confettiParticles = Object.assign({}, confetti, {\n pos: {\n x: (pos?.clientX ?? 0) - (particles.boundingRect?.value?.left ?? 0),\n y: (pos?.clientY ?? 0) - (particles.boundingRect?.value?.top ?? 0)\n }\n });\n particles.addEmitter(confettiParticles).then(e => e.playOnceAndDestroy());\n clickableState.value = \"Borkened...\";\n break;\n default:\n clickableState.value = \"Start\";\n break;\n }\n },\n onHold() {\n console.log(\"Clickkkkk...\");\n },\n style() {\n switch (clickableState.value) {\n case \"Start\":\n return { \"background-color\": \"green\" };\n case \"A new state!\":\n return { \"background-color\": \"yellow\" };\n case \"Keep going!\":\n return { \"background-color\": \"orange\" };\n case \"Maybe that's a bit too far...\":\n return { \"background-color\": \"red\" };\n default:\n return {};\n }\n }\n }));\n\n const resetClickable = createClickable(() => ({\n onClick() {\n if (clickableState.value == \"Borkened...\") {\n clickableState.value = \"Start\";\n }\n },\n display() {\n return clickableState.value == \"Borkened...\" ? \"Fix the clickable!\" : \"Does nothing\";\n },\n small: true\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const conversion = createIndependentConversion(() => ({\n scaling: createPolynomialScaling(10, 0.5),\n baseResource: main.points,\n gainResource: points,\n modifyGainAmount: createMultiplicativeModifier(c.otherThingy)\n }));\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n tooltip() {\n if (treeNode.canClick.value) {\n return `${displayResource(points)} ${points.displayName}`;\n }\n return `This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${displayResource(\n main.points\n )}`;\n },\n canClick() {\n return Decimal.gte(main.points.value, 10);\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n display: jsx(() => {\n if (resetButton.conversion.buyMax) {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you{\" \"}\n <b>{formatWhole(resetButton.conversion.currentGain.value)}</b> Farm Points\n in exchange for all of your points and lollipops! (You'll get another one at{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n } else {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange\n for all of your points and lollipops! (At least{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n }\n })\n }));\n\n const particles = createParticles(() => ({\n boundingRect: ref<null | DOMRect>(null),\n onContainerResized(boundingRect) {\n this.boundingRect.value = boundingRect;\n },\n style: \"z-index: 2\"\n }));\n\n const tab = jsx(() => (\n <>\n {render(coolInfo)}\n <MainDisplay resource={points} color={color} />\n {render(resetButton)}\n <div>You have {formatWhole(conversion.baseResource.value)} points</div>\n <div>\n <br />\n <img src=\"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390\" />\n <div>Bork Bork!</div>\n </div>\n <Spacer />\n {renderRow(resetClickable)}\n {renderRow(clickable)}\n {render(particles)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n boop,\n coolInfo,\n clickable,\n clickableState,\n reset,\n conversion,\n treeNode,\n resetButton,\n display: tab\n };\n});\n\nexport default layer;\n","import Row from \"components/layout/Row.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { main } from \"data/projEntry\";\nimport { createAchievement } from \"features/achievements/achievement\";\nimport { jsx } from \"features/feature\";\nimport { createGrid } from \"features/grids/grid\";\nimport { createResource } from \"features/resources/resource\";\nimport { createTreeNode } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { computed } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"a\";\nconst layer = createLayer(id, () => {\n const color = \"yellow\";\n const name = \"Achievements\";\n const points = createResource<DecimalSource>(0, \"achievement power\");\n\n const treeNode = createTreeNode(() => ({\n display: \"A\",\n color,\n tooltip: {\n display: \"Achievements\",\n right: true\n },\n onClick() {\n main.showAchievements();\n }\n }));\n\n const ach1 = createAchievement(() => ({\n image: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n display: \"Get me!\",\n tooltip: computed(() => {\n if (ach1.earned.value) {\n return \"You did it!\";\n }\n return \"How did this happen?\";\n }),\n shouldEarn: () => true\n }));\n const ach2 = createAchievement(() => ({\n display: \"Impossible!\",\n tooltip: computed(() => {\n if (ach2.earned.value) {\n return \"HOW????\";\n }\n return \"Mwahahaha!\";\n }),\n style: { color: \"#04e050\" }\n }));\n const ach3 = createAchievement(() => ({\n display: \"EIEIO\",\n tooltip:\n \"Get a farm point.\\n\\nReward: The dinosaur is now your friend (you can max Farm Points).\",\n shouldEarn: function () {\n return Decimal.gte(f.points.value, 1);\n },\n onComplete() {\n console.log(\"Bork bork bork!\");\n }\n }));\n const achievements = [ach1, ach2, ach3];\n\n const grid = createGrid(() => ({\n rows: 2,\n cols: 2,\n getStartState(id) {\n return id;\n },\n getStyle(id, state) {\n return { backgroundColor: `#${(Number(state) * 1234) % 999999}` };\n },\n // TODO display should return an object\n getTitle(id) {\n let direction = \"\";\n if (id === \"101\") {\n direction = \"top\";\n } else if (id === \"102\") {\n direction = \"bottom\";\n } else if (id === \"201\") {\n direction = \"left\";\n } else if (id === \"202\") {\n direction = \"right\";\n }\n return jsx(() => (\n <Tooltip display={JSON.stringify(this.cells[id].style)} {...{ [direction]: true }}>\n <h3>Gridable #{id}</h3>\n </Tooltip>\n ));\n },\n getDisplay(id, state) {\n return String(state);\n },\n getCanClick() {\n return Decimal.eq(main.points.value, 10);\n },\n onClick(id, state) {\n this.cells[id].state = Number(state) + 1;\n }\n }));\n\n const display = jsx(() => (\n <>\n <Row>\n <Tooltip display={ach1.tooltip} bottom>\n {render(ach1)}\n </Tooltip>\n <Tooltip display={ach2.tooltip} bottom>\n {render(ach2)}\n </Tooltip>\n <Tooltip display={ach3.tooltip} bottom>\n {render(ach3)}\n </Tooltip>\n </Row>\n {renderRow(grid)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n achievements,\n grid,\n treeNode,\n display\n };\n});\n\nexport default layer;\n","import Profectus from \"components/Profectus.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport { jsx } from \"features/feature\";\nimport { createResource, trackBest, trackOOMPS, trackTotal } from \"features/resources/resource\";\nimport { branchedResetPropagation, createTree, GenericTree } from \"features/trees/tree\";\nimport { globalBus } from \"game/events\";\nimport { createLayer, GenericLayer, setupLayerModal } from \"game/layers\";\nimport player, { PlayerData } from \"game/player\";\nimport Decimal, { DecimalSource, format, formatTime } from \"util/bignum\";\nimport { render } from \"util/vue\";\nimport { computed, toRaw } from \"vue\";\nimport a from \"./layers/aca/a\";\nimport c from \"./layers/aca/c\";\nimport f from \"./layers/aca/f\";\n\n/**\n * @hidden\n */\nexport const main = createLayer(\"main\", () => {\n const points = createResource<DecimalSource>(10);\n const best = trackBest(points);\n const total = trackTotal(points);\n\n const pointGain = computed(() => {\n if (!c.generatorUpgrade.bought.value) return new Decimal(0);\n let gain = new Decimal(3.19);\n if (c.lollipopMultiplierUpgrade.bought.value)\n gain = gain.times(c.lollipopMultiplierEffect.value);\n return gain;\n });\n globalBus.on(\"update\", diff => {\n points.value = Decimal.add(points.value, Decimal.times(pointGain.value, diff));\n });\n const oomps = trackOOMPS(points, pointGain);\n\n const { openModal, modal } = setupLayerModal(a);\n\n // Note: Casting as generic tree to avoid recursive type definitions\n const tree = createTree(() => ({\n nodes: [[c.treeNode], [f.treeNode, c.spook]],\n leftSideNodes: [a.treeNode, c.h],\n branches: [\n {\n startNode: f.treeNode,\n endNode: c.treeNode,\n stroke: \"blue\",\n \"stroke-width\": \"25px\",\n style: {\n filter: \"blur(5px)\"\n }\n }\n ],\n onReset() {\n points.value = toRaw(this.resettingNode.value) === toRaw(c.treeNode) ? 0 : 10;\n best.value = points.value;\n total.value = points.value;\n },\n resetPropagation: branchedResetPropagation\n })) as GenericTree;\n\n // Note: layers don't _need_ a reference to everything,\n // but I'd recommend it over trying to remember what does and doesn't need to be included.\n // Officially all you need are anything with persistency or that you want to access elsewhere\n return {\n name: \"Tree\",\n display: jsx(() => (\n <>\n {player.devSpeed === 0 ? <div>Game Paused</div> : null}\n {player.devSpeed && player.devSpeed !== 1 ? (\n <div>Dev Speed: {format(player.devSpeed || 0)}x</div>\n ) : null}\n {player.offlineTime != undefined ? (\n <div>Offline Time: {formatTime(player.offlineTime || 0)}</div>\n ) : null}\n <div>\n {Decimal.lt(points.value, \"1e1000\") ? <span>You have </span> : null}\n <h2>{format(points.value)}</h2>\n {Decimal.lt(points.value, \"1e1e6\") ? <span> points</span> : null}\n </div>\n {Decimal.gt(pointGain.value, 0) ? <div>({oomps.value})</div> : null}\n <Spacer />\n <button onClick={openModal}>open achievements</button>\n {render(modal)}\n {render(tree)}\n <Profectus height=\"200px\" style=\"margin: 10px auto; display: block\" />\n </>\n )),\n points,\n best,\n total,\n oomps,\n tree,\n showAchievements: openModal\n };\n});\n\nexport const getInitialLayers = (\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars */\n player: Partial<PlayerData>\n): Array<GenericLayer> => [main, f, c, a];\n\nexport const hasWon = computed(() => {\n return Decimal.gt(main.points.value, 25);\n});\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport function fixOldSave(\n oldVersion: string | undefined,\n player: Partial<PlayerData>\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n): void {}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import Modal from \"components/Modal.vue\";\nimport {\n CoercableComponent,\n OptionsFunc,\n jsx,\n JSXFunction,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { createNanoEvents, Emitter } from \"nanoevents\";\nimport { InjectionKey, Ref, ref, unref } from \"vue\";\nimport { globalBus } from \"./events\";\nimport { Persistent, persistent } from \"./persistence\";\nimport player from \"./player\";\n\nexport interface FeatureNode {\n rect: DOMRect;\n observer: MutationObserver;\n element: HTMLElement;\n}\n\nexport const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =\n Symbol(\"RegisterNode\");\nexport const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =\n Symbol(\"UnregisterNode\");\nexport const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =\n Symbol(\"Nodes\");\n\nexport interface LayerEvents {\n // Generation\n preUpdate: (diff: number) => void;\n // Actions (e.g. automation)\n update: (diff: number) => void;\n // Effects (e.g. milestones)\n postUpdate: (diff: number) => void;\n}\n\nexport const layers: Record<string, Readonly<GenericLayer> | undefined> = {};\nwindow.layers = layers;\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--layer-color\"?: string;\n }\n}\n\nexport interface Position {\n x: number;\n y: number;\n}\n\nexport interface LayerOptions {\n color?: Computable<string>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n name?: Computable<string>;\n minimizable?: Computable<boolean>;\n forceHideGoBack?: Computable<boolean>;\n minWidth?: Computable<number | string>;\n}\n\nexport interface BaseLayer {\n id: string;\n minimized: Persistent<boolean>;\n emitter: Emitter<LayerEvents>;\n on: OmitThisParameter<Emitter<LayerEvents>[\"on\"]>;\n emit: <K extends keyof LayerEvents>(event: K, ...args: Parameters<LayerEvents[K]>) => void;\n nodes: Ref<Record<string, FeatureNode | undefined>>;\n}\n\nexport type Layer<T extends LayerOptions> = Replace<\n T & BaseLayer,\n {\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n name: GetComputableTypeWithDefault<T[\"name\"], string>;\n minWidth: GetComputableTypeWithDefault<T[\"minWidth\"], 600>;\n minimizable: GetComputableTypeWithDefault<T[\"minimizable\"], true>;\n forceHideGoBack: GetComputableType<T[\"forceHideGoBack\"]>;\n }\n>;\n\nexport type GenericLayer = Replace<\n Layer<LayerOptions>,\n {\n name: ProcessedComputable<string>;\n minWidth: ProcessedComputable<number>;\n minimizable: ProcessedComputable<boolean>;\n }\n>;\n\nexport const persistentRefs: Record<string, Set<Persistent>> = {};\nexport const addingLayers: string[] = [];\nexport function createLayer<T extends LayerOptions>(\n id: string,\n optionsFunc: OptionsFunc<T, BaseLayer, BaseLayer>\n): Layer<T> {\n return createLazyProxy(() => {\n const layer = {} as T & Partial<BaseLayer>;\n const emitter = (layer.emitter = createNanoEvents<LayerEvents>());\n layer.on = emitter.on.bind(emitter);\n layer.emit = emitter.emit.bind(emitter);\n layer.nodes = ref({});\n layer.id = id;\n\n addingLayers.push(id);\n persistentRefs[id] = new Set();\n layer.minimized = persistent(false);\n Object.assign(layer, optionsFunc.call(layer));\n if (\n addingLayers[addingLayers.length - 1] == null ||\n addingLayers[addingLayers.length - 1] !== id\n ) {\n throw `Adding layers stack in invalid state. This should not happen\\nStack: ${addingLayers}\\nTrying to pop ${layer.id}`;\n }\n addingLayers.pop();\n\n processComputable(layer as T, \"color\");\n processComputable(layer as T, \"display\");\n processComputable(layer as T, \"name\");\n setDefault(layer, \"name\", layer.id);\n processComputable(layer as T, \"minWidth\");\n setDefault(layer, \"minWidth\", 600);\n processComputable(layer as T, \"minimizable\");\n setDefault(layer, \"minimizable\", true);\n\n return layer as unknown as Layer<T>;\n });\n}\n\nexport function addLayer(\n layer: GenericLayer,\n player: { layers?: Record<string, Record<string, unknown>> }\n): void {\n console.info(\"Adding layer\", layer.id);\n if (layers[layer.id]) {\n console.error(\n \"Attempted to add layer with same ID as existing layer\",\n layer.id,\n layers[layer.id]\n );\n return;\n }\n\n setDefault(player, \"layers\", {});\n if (player.layers[layer.id] == null) {\n player.layers[layer.id] = {};\n }\n layers[layer.id] = layer;\n\n globalBus.emit(\"addLayer\", layer, player.layers[layer.id]);\n}\n\nexport function getLayer<T extends GenericLayer>(layerID: string): T {\n return layers[layerID] as T;\n}\n\nexport function removeLayer(layer: GenericLayer): void {\n console.info(\"Removing layer\", layer.id);\n globalBus.emit(\"removeLayer\", layer);\n\n layers[layer.id] = undefined;\n}\n\nexport function reloadLayer(layer: GenericLayer): void {\n removeLayer(layer);\n\n // Re-create layer\n addLayer(layer, player);\n}\n\nexport function setupLayerModal(layer: GenericLayer): {\n openModal: VoidFunction;\n modal: JSXFunction;\n} {\n const showModal = ref(false);\n return {\n openModal: () => (showModal.value = true),\n modal: jsx(() => (\n <Modal\n modelValue={showModal.value}\n onUpdate:modelValue={value => (showModal.value = value)}\n v-slots={{\n header: () => <h2>{unref(layer.name)}</h2>,\n body: unref(layer.display)\n }}\n />\n ))\n };\n}\n\nglobalBus.on(\"update\", function updateLayers(diff) {\n Object.values(layers).forEach(layer => {\n layer?.emit(\"preUpdate\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"update\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"postUpdate\", diff);\n });\n});\n","import Col from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport {\n CoercableComponent,\n Component as ComponentKey,\n GatherProps,\n GenericComponent,\n JSXFunction,\n Visibility\n} from \"features/feature\";\nimport {\n Component,\n computed,\n ComputedRef,\n DefineComponent,\n defineComponent,\n isRef,\n onUnmounted,\n PropType,\n ref,\n Ref,\n ShallowRef,\n shallowRef,\n unref,\n watchEffect\n} from \"vue\";\nimport { DoNotCache, ProcessedComputable } from \"./computed\";\n\nexport function coerceComponent(\n component: CoercableComponent,\n defaultWrapper = \"span\"\n): DefineComponent {\n if (typeof component === \"function\") {\n return defineComponent({ render: component });\n }\n if (typeof component === \"string\") {\n if (component.length > 0) {\n component = component.trim();\n if (component.charAt(0) !== \"<\") {\n component = `<${defaultWrapper}>${component}</${defaultWrapper}>`;\n }\n\n return defineComponent({ template: component });\n }\n return defineComponent({ render: () => ({}) });\n }\n return component;\n}\n\nexport type VueFeature = {\n [ComponentKey]: GenericComponent;\n [GatherProps]: () => Record<string, unknown>;\n};\n\nexport function render(object: VueFeature | CoercableComponent): JSX.Element | DefineComponent {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n return coerceComponent(object);\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRow(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(render)}</Row>;\n}\n\nexport function renderCol(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(render)}</Col>;\n}\n\nexport function renderJSX(object: VueFeature | CoercableComponent): JSX.Element {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n if (typeof object === \"string\") {\n return <>{object}</>;\n }\n // TODO why is object typed as never?\n const Comp = object as DefineComponent;\n return <Comp />;\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRowJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(renderJSX)}</Row>;\n}\n\nexport function renderColJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(renderJSX)}</Col>;\n}\n\nexport function isCoercableComponent(component: unknown): component is CoercableComponent {\n if (typeof component === \"string\") {\n return true;\n } else if (typeof component === \"object\") {\n if (component == null) {\n return false;\n }\n return \"render\" in component || \"component\" in component;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } else if (typeof component === \"function\" && (component as any)[DoNotCache] === true) {\n return true;\n }\n return false;\n}\n\nexport function setupHoldToClick(\n onClick?: Ref<((e?: MouseEvent | TouchEvent) => void) | undefined>,\n onHold?: Ref<VoidFunction | undefined>\n): {\n start: (e: MouseEvent | TouchEvent) => void;\n stop: VoidFunction;\n handleHolding: VoidFunction;\n} {\n const interval = ref<null | number>(null);\n const event = ref<MouseEvent | TouchEvent | undefined>(undefined);\n\n function start(e: MouseEvent | TouchEvent) {\n if (!interval.value) {\n interval.value = setInterval(handleHolding, 250);\n }\n event.value = e;\n }\n function stop() {\n if (interval.value) {\n clearInterval(interval.value);\n interval.value = null;\n }\n }\n function handleHolding() {\n if (onHold && onHold.value) {\n onHold.value();\n } else if (onClick && onClick.value) {\n onClick.value(event.value);\n }\n }\n\n onUnmounted(stop);\n\n return { start, stop, handleHolding };\n}\n\nexport function getFirstFeature<T extends { visibility: ProcessedComputable<Visibility> }>(\n features: T[],\n filter: (feature: T) => boolean\n): { firstFeature: Ref<T | undefined>; hiddenFeatures: Ref<T[]> } {\n const filteredFeatures = computed(() =>\n features.filter(\n feature => unref(feature.visibility) === Visibility.Visible && filter(feature)\n )\n );\n return {\n firstFeature: computed(() => filteredFeatures.value[0]),\n hiddenFeatures: computed(() => filteredFeatures.value.slice(1))\n };\n}\n\nexport function computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\"> {\n const comp = shallowRef<Component | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\" | null> {\n const comp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(component);\n comp.value = currComponent == null ? null : coerceComponent(currComponent, defaultWrapper);\n });\n return comp;\n}\n\nexport function wrapRef<T>(ref: Ref<ProcessedComputable<T>>): ComputedRef<T> {\n return computed(() => unwrapRef(ref));\n}\n\nexport function unwrapRef<T>(ref: Ref<ProcessedComputable<T>>): T {\n return unref<T>(unref(ref));\n}\n\nexport function setRefValue<T>(ref: Ref<T | Ref<T>>, value: T) {\n if (isRef(ref.value)) {\n ref.value.value = value;\n } else {\n ref.value = value;\n }\n}\n\nexport type PropTypes =\n | typeof Boolean\n | typeof String\n | typeof Number\n | typeof Function\n | typeof Object\n | typeof Array;\n// TODO Unfortunately, the typescript engine gives up on typing completely when you use this method,\n// Even though it has the same typing as when doing it manually\nexport function processedPropType<T>(...types: PropTypes[]): PropType<ProcessedComputable<T>> {\n if (!types.includes(Object)) {\n types.push(Object);\n }\n return types as PropType<ProcessedComputable<T>>;\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot } from \"vue\"\n\nimport {\n RegisterNodeInjectionKey,\n UnregisterNodeInjectionKey,\n NodesInjectionKey,\n FeatureNode\n} from \"game/layers\";\nimport { nextTick, provide, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst nodes = ref<Record<string, FeatureNode | undefined>>({});\n\nexpose({ nodes });\n\nconst observerOptions = {\n attributes: true,\n childList: true,\n subtree: false\n};\n\nprovide(RegisterNodeInjectionKey, (id, element) => {\n const observer = new MutationObserver(() => updateNode(id));\n observer.observe(element, observerOptions);\n nodes.value[id] = { element, observer, rect: element.getBoundingClientRect() };\n nextTick(() => updateNode(id));\n});\nprovide(UnregisterNodeInjectionKey, id => {\n nodes.value[id]?.observer.disconnect();\n nodes.value[id] = undefined;\n});\nprovide(NodesInjectionKey, nodes);\n\nfunction updateNode(id: string) {\n const node = nodes.value[id];\n if (node == null) {\n return;\n }\n node.rect = node.element.getBoundingClientRect();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return _renderSlot(_ctx.$slots, \"default\")\n}\n}\n\n})","import script from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withModifiers as _withModifiers, mergeProps as _mergeProps, withDirectives as _withDirectives, Transition as _Transition, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"onPointerdown\"]\nconst _hoisted_2 = { class: \"modal-wrapper\" }\nconst _hoisted_3 = { class: \"modal-container\" }\nconst _hoisted_4 = { class: \"modal-header\" }\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\" default header \")\nconst _hoisted_6 = { class: \"modal-body\" }\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" default body \")\nconst _hoisted_8 = { class: \"modal-footer\" }\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"modal-default-flex-grow\" }, null, -1)\n\nimport { FeatureNode } from \"game/layers\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Context from \"./Context.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { expose, emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n modelValue: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isOpen = computed(() => props.modelValue || isAnimating.value);\nfunction close() {\n emit(\"update:modelValue\", false);\n}\n\nconst isAnimating = ref(false);\n\nconst contextRef = ref<typeof Context | null>(null);\nconst nodes = computed<Record<string, FeatureNode | undefined> | null>(\n () => contextRef.value?.nodes ?? null\n);\n\nexpose({ isOpen, nodes });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"#modal-root\" }, [\n _createVNode(_Transition, {\n name: \"modal\",\n onBeforeEnter: _cache[0] || (_cache[0] = ($event: any) => (isAnimating.value = true)),\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (isAnimating.value = false))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", _mergeProps({\n class: \"modal-mask\",\n onPointerdown: _withModifiers(close, [\"self\"])\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"header\", { shown: _unref(isOpen) }, () => [\n _hoisted_5\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(Context, {\n ref_key: \"contextRef\",\n ref: contextRef\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"body\", { shown: _unref(isOpen) }, () => [\n _hoisted_7\n ])\n ]),\n _: 3\n }, 512)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _renderSlot(_ctx.$slots, \"footer\", { shown: _unref(isOpen) }, () => [\n _createElementVNode(\"div\", { class: \"modal-default-footer\" }, [\n _hoisted_9,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: close\n }, \" Close \")\n ])\n ])\n ])\n ])\n ])\n ], 16, _hoisted_1), [\n [_vShow, __props.modelValue]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","import script from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=d02c1f40&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\n\nimport \"components/common/fields.css\";\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { ref, toRef, watch } from \"vue\";\nimport VueNextSelect from \"vue-next-select\";\nimport \"vue-next-select/dist/index.css\";\n\nexport type SelectOption = { label: string; value: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n options: null,\n placeholder: null,\n closeOnSelect: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: unknown): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: unknown;\n options: SelectOption[];\n placeholder?: string;\n closeOnSelect?: boolean;\n}\n\n\n\n\nconst titleComponent = computeOptionalComponent(toRef(props, \"title\"), \"span\");\n\nconst value = ref<SelectOption | undefined>(\n props.options.find(option => option.value === props.modelValue)\n);\nwatch(toRef(props, \"modelValue\"), modelValue => {\n if (value.value?.value !== modelValue) {\n value.value = props.options.find(option => option.value === modelValue);\n }\n});\n\nfunction onUpdate(value: SelectOption) {\n emit(\"update:modelValue\", value.value);\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(VueNextSelect), {\n options: __props.options,\n modelValue: value.value,\n \"onUpdate:modelValue\": [\n _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onUpdate\n ],\n min: 1,\n \"label-by\": \"label\",\n placeholder: __props.placeholder,\n \"close-on-select\": __props.closeOnSelect\n }, null, 8, [\"options\", \"modelValue\", \"placeholder\", \"close-on-select\"])\n ]))\n}\n}\n\n})","import script from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=0f1110ed&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, isRef as _isRef, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, createElementVNode as _createElementVNode, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8bda704a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onSubmit\"]\nconst _hoisted_2 = { class: \"field\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_4 = [\"placeholder\"]\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, onMounted, ref, toRefs, unref } from \"vue\";\nimport VueTextareaAutosize from \"vue-textarea-autosize\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n textArea: { type: Boolean },\n placeholder: null,\n maxHeight: null\n },\n emits: [\"update:modelValue\", \"submit\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: string): void;\n (e: \"submit\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: CoercableComponent;\n modelValue?: string;\n textArea?: boolean;\n placeholder?: string;\n maxHeight?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst titleComponent = computed(\n () => props.title?.value && coerceComponent(unref(props.title.value), \"span\")\n);\n\nconst field = ref<HTMLElement | null>(null);\nonMounted(() => {\n field.value?.focus();\n});\n\nconst value = computed({\n get() {\n return unref(props.modelValue) || \"\";\n },\n set(value: string) {\n emit(\"update:modelValue\", value);\n }\n});\n\nfunction submit() {\n emit(\"submit\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"form\", {\n onSubmit: _withModifiers(submit, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n (__props.textArea)\n ? (_openBlock(), _createBlock(_unref(VueTextareaAutosize), {\n key: 1,\n modelValue: _unref(value),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n maxHeight: __props.maxHeight,\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 8, [\"modelValue\", \"placeholder\", \"maxHeight\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"input\", {\n key: 2,\n type: \"text\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n class: _normalizeClass({ fullWidth: !__props.title }),\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 42, _hoisted_4)), [\n [_vModelText, _unref(value)]\n ])\n ])\n ], 40, _hoisted_1))\n}\n}\n\n})","import script from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Text.vue?vue&type=style&index=0&id=8bda704a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8bda704a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, isRef as _isRef, vModelCheckbox as _vModelCheckbox, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43cf95d0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: boolean;\n}\n\n\n\n\nconst component = computed(() => coerceComponent(unref(props.title) || \"<span></span>\", \"span\"));\n\nconst value = computed({\n get() {\n return !!props.modelValue;\n },\n set(value: boolean) {\n emit(\"update:modelValue\", value);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"checkbox\",\n class: \"toggle\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null))\n }, null, 512), [\n [_vModelCheckbox, _unref(value)]\n ]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n ]))\n}\n}\n\n})","import script from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Toggle.vue?vue&type=style&index=0&id=43cf95d0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43cf95d0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"col\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-adb5f26e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"material-icons pinned\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tooltip-container\", { shown: _ctx.isShown }]),\n onMouseenter: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHovered = true)),\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHovered = false)),\n onClickCapture: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.togglePinned && _ctx.togglePinned(...args)))\n }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, true),\n (_ctx.elementComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.elementComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_ctx.isShown)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tooltip\", {\n top: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.UP,\n left: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.LEFT,\n right: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.RIGHT,\n bottom: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.DOWN,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_ctx.showPin)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"push_pin\"))\n : _createCommentVNode(\"\", true),\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 1 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport themes from \"data/themes\";\nimport { CoercableComponent, jsx, StyleValue } from \"features/feature\";\nimport { Persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport {\n coerceComponent,\n computeOptionalComponent,\n processedPropType,\n render,\n unwrapRef,\n VueFeature\n} from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\nimport { TooltipDirection } from \"./tooltip\";\n\nexport default defineComponent({\n props: {\n element: processedPropType<VueFeature>(Object),\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n direction: processedPropType<TooltipDirection>(Number),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n pinned: Object as PropType<Persistent<boolean>>\n },\n setup(props) {\n const { element, display, pinned } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(pinned) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n const elementComp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(element);\n elementComp.value =\n currComponent == null\n ? null\n : coerceComponent(jsx(() => render(currComponent) as JSX.Element));\n });\n\n function togglePinned(e: MouseEvent) {\n const isPinned = pinned as unknown as Persistent<boolean> | undefined; // Vue typing :/\n if (e.shiftKey && isPinned) {\n isPinned.value = !isPinned.value;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n const showPin = computed(() => unwrapRef(pinned) && themes[settings.theme].showPin);\n\n return {\n TooltipDirection,\n isHovered,\n isShown,\n comp,\n elementComp,\n unref,\n togglePinned,\n showPin\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=adb5f26e&scoped=true&ts=true\"\nimport script from \"./Tooltip.vue?vue&type=script&lang=ts\"\nexport * from \"./Tooltip.vue?vue&type=script&lang=ts\"\n\nimport \"./Tooltip.vue?vue&type=style&index=0&id=adb5f26e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-adb5f26e\"]])\n\nexport default __exports__","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 7634;\nmodule.exports = webpackEmptyContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkprofectus\"] = self[\"webpackChunkprofectus\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(6098); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["Themes","defaultTheme","variables","floatingTabs","mergeAdjacent","showPin","classic","paper","nordic","aqua","Visibility","Component","Symbol","GatherProps","id","getUniqueID","prefix","jsx","func","showIf","condition","otherwise","None","Visible","setDefault","object","key","value","undefined","findFeatures","obj","type","objects","handleObject","Object","keys","forEach","push","isRef","TooltipDirection","addTooltip","element","options","pinnable","pinned","console","error","UP","elementComponent","elementGratherProps","bind","display","this","classes","style","direction","xoffset","yoffset","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","startGameLoop","watch","PersistentState","DefaultValue","StackTrace","Deleted","getStackTrace","Error","stack","split","slice","map","line","trim","join","persistent","defaultValue","ref","addingLayers","warn","persistentRefs","add","layer","saveData","features","path","foundPersistent","delete","persistentState","reduce","acc","curr","savedValue","isReactive","includes","foundPersistentInChild","clear","state","reactive","devSpeed","name","tabs","time","autosave","offlineProd","offlineTime","timePlayed","keepGoing","modID","modVersion","layers","stringifySave","player","JSON","stringify","unref","playerHandler","get","target","Proxy","set","property","receiver","isNaN","sign","mag","currentValue","ownKeys","Reflect","has","getOwnPropertyDescriptor","window","active","saves","showTPS","theme","unthrottled","loadSettings","item","localStorage","getItem","settings","parse","decodeURIComponent","escape","atob","assign","setItem","btoa","unescape","encodeURIComponent","deep","hardResetSettings","settingFields","registerSettingField","component","infoComponents","registerInfoComponent","gameComponents","shallowReactive","lastTenTicks","hasNaN","NaNPath","render","_ctx","_cache","$props","$setup","$data","$options","_component_Context","class","color","showGoBack","onClick","goBack","minimized","$event","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","width","parseInt","tabValue","flexGrow","flexShrink","flexBasis","margin","__exports__","_withScopeId","n","_hoisted_1","_hoisted_2","open","__props","expose","isOpen","Modal","modelValue","header","body","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","href","_hoisted_13","_hoisted_14","changelog","_props","title","logo","author","discordName","discordLink","versionNumber","versionTitle","infoComponent","openChangelog","src","alt","shown","themes","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","Toggle","enablePausing","disabled","skipConfirm","emits","isConfirming","click","cancel","confirming","$slots","left","activated","activatedTimeout","clearTimeout","setTimeout","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","save","dateFormat","Intl","DateTimeFormat","year","month","day","hour","minute","second","isEditing","newName","isActive","currentTime","changeName","FeedbackButton","DangerButton","onConfirmingChanged","format","Text","onSubmit","modal","importingFailed","saveToImport","playerData","e","bankContext","bank","cachedSaves","getCachedSave","exportSave","saveToExport","el","document","createElement","appendChild","select","setSelectionRange","execCommand","removeChild","duplicateSave","deleteSave","removeItem","openSave","newFromPreset","preset","editSave","currSave","ref_key","list","handle","itemKey","Save","onOpen","onExport","onEditName","onDuplicate","onDelete","footer","placeholder","length","closeOnSelect","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","info","savesManager","useHeader","banner","openDiscord","$attrs","Tooltip","DOWN","RIGHT","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","ref_for","Nav","Layer","$refs","playAgain","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","gameComponent","Game","TPS","GameOverScreen","NaNScreen","log","vue","createApp","App","mount","MAX_SIGNIFICANT_DIGITS","EXP_LIMIT","LAYER_DOWN","log10","FIRST_NEG_LAYER","NUMBER_EXP_MAX","NUMBER_EXP_MIN","MAX_ES_IN_A_ROW","IGNORE_COMMAS","COMMAS_ARE_DECIMAL_POINTS","powerOf10","powersOf10","i","for","indexOf0InPowersOf10","power","critical_headers","E","critical_tetr_values","critical_slog_values","D","Decimal","fromValue_noAlloc","FC","fromComponents","FC_NN","fromComponents_noNormalize","decimalPlaces","places","len","numDigits","ceil","abs","rounded","pow","parseFloat","toFixed","f_maglog10","f_gamma","trunc","NEGATIVE_INFINITY","scal1","l","n2","np","exp","OMEGA","f_lambertw","z","w","wn","tol","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","lt","fromDecimal","fromNumber","fromString","man","floor","residue","exponent","fromMantissaExponent","POSITIVE_INFINITY","m","other","times","neg","eq","gte","lte","absmag","signmag","normalize","mantissa","replace","pentationparts","heightparts","payload","result","pentate","tetrationparts","tetrate","base","height","powparts","toLowerCase","ptparts","parts","ecount","numberAttempt","newparts","charAt","layerstring","chrcode","charCodeAt","substr","me","repeat","toExponential","toStringWithDecimalPlaces","a","b","decimal","maxabs","cmpabs","layera","layerb","magdiff","newmag","recip","dNaN","cmp","tolerance","eq_tolerance","cmp_tolerance","magA","magB","neq_tolerance","log2","absLog10","pow10","gamma","t","lm","adj","l2","sqrt","this_num","negln","lambertw","iteratedlog","oldheight","fracheight","old_payload","next_payload","tetrate_critical","minus","plus","layeradd10","layeradd","fulltimes","fraction","layerloss","dNegOne","copy","slog_critical","slogthis","slog","slogdest","lnx","sin","cos","tan","asin","acos","atan","negate","sinh","cosh","sqr","ascensions","root","fromMantissaExponent_noNormalize","fromValue","reciprocate","notEquals","minabs","clamp","clampMin","clampMax","notEquals_tolerance","lt_tolerance","lte_tolerance","gt_tolerance","gte_tolerance","pLog10","logarithm","_other","factorial","lngamma","cube","cbrt","iteratedexp","ssqrt","resourcesAvailable","priceStart","priceRatio","currentOwned","affordGeometricSeries_core","numItems","sumGeometricSeries_core","priceAdd","affordArithmeticSeries_core","sumArithmeticSeries_core","cost","currentRpS","deltaRpS","efficiencyOfPurchase_core","maxLayers","random","randomsign","randomexp","randommag","actualStart","b2","critical_section","grid","lower","upper","basefrac","frac","MAX_VALUE","MIN_VALUE","decimalOne","exponentialFormat","num","precision","eString","defaultDecimalsShown","commaFormat","init","portions","regularFormat","eeee1000","e100000","e1000","e9","e6","e3","nearOne","thousandth","zero","small","defaultShowSmall","invertOOM","val","formatWhole","formatTime","seconds","toPlaces","x","maxAccepted","formatSmall","camelToTitle","camel","toUpperCase","isPlainObject","prototype","call","isFunction","DoNotCache","processComputable","computable","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","baseObject","calculated","calculateObj","setupInitialStore","stringifiedSave","load","loadSave","newSave","playerObj","removeLayer","addLayer","fixOldSave","getInitialLayers","onbeforeunload","hardReset","onInit","onContainerResized","onHotReload","app","resizeObserver","ResizeObserver","updateBounds","inject","NodesInjectionKey","resizeListener","onMounted","resListener","observe","resizeTo","backgroundAlpha","view","module","hot","status","onBeforeUnmount","destroy","isDirty","values","filter","node","rect","getBoundingClientRect","resize","fonts","ready","then","xmlns","viewBox","d","appear","script","createResource","displayName","resource","trackBest","best","amount","trackTotal","total","prevAmount","tetra8","e100","trackOOMPS","pointGain","oomps","oompsMag","lastPoints","prev","oompsString","displayResource","overrideAmount","_component_Links","nodesComp","leftNodesComp","rightNodesComp","branches","links","link","startNode","endNode","boundingRect","startPosition","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","updateNodes","validLinks","Link","leftSideNodes","rightSideNodes","Links","shallowRef","currNodes","row","_component_MarkNode","_component_Node","visibility","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","onHold","MarkNode","Node","isCoercableComponent","TreeNodeType","TreeType","createTreeNode","optionsFunc","TreeNode","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","createResourceTooltip","requiredResource","requirement","req","backgroundImage","earned","image","feature","achievement","locked","bought","getNotifyStyle","strength","transform","borderColor","zIndex","getHighNotifyStyle","use","toast","AchievementType","createAchievement","Achievement","complete","shouldEarn","genericAchievement","onComplete","Display","_component_GridCell","rows","cols","col","gatherCellProps","cells","tile","titleComponent","GridCell","cell","createGridProxy","getGridHandler","getCellHandler","configurable","enumerable","writable","cache","prop","getState","createGrid","Grid","getID","startState","setState","clickable","currDisplay","Title","Description","description","ClickableType","createClickable","Clickable","createResetButton","resetButton","resetDescription","conversion","gainResource","actualGain","minimumGain","buyMax","baseResource","nextAt","currentAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","currentGain","gain","gainModifier","apply","scaling","current","roundUpCost","next","createPolynomialScaling","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","ParticlesType","createParticles","particles","Particles","addEmitter","config","genericParticles","Promise","resolve","stage","emittersToAdd","upgradeConfig","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","createAdditiveModifier","addend","enabled","processedAddend","processedDescription","processedEnabled","createMultiplicativeModifier","multiplier","processedMultiplier","createExponentialModifier","processedExponent","createSequentialModifier","modifiers","modifier","reduceRight","createModifierSection","subtitle","unit","fullWidth","top","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","normalizedProgress","progressNumber","Direction","Up","clipPath","Down","Right","Left","Default","BarType","createBar","Bar","BuyableType","createBuyable","buyable","canPurchase","canAfford","genericBuyable","purchaseLimit","maxed","currClasses","purchase","onPurchase","CurrDisplay","EffectDisplay","amountDisplay","notifyStyle","challenge","done","completed","canStart","toggle","buttonText","canComplete","currActive","currCanComplete","Goal","goal","Reward","reward","ChallengeType","createChallenge","completions","Challenge","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","shiftKey","ctrlKey","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","OptionsDisplay","optionsDisplay","MilestoneDisplay","MilestoneType","createMilestone","Milestone","All","Configurable","Incomplete","genericMilestone","msDisplayOptions","option","TabType","createTab","Tab","selectTab","glowColorStyle","floating","_component_TabButton","_component_Sticky","tabClasses","tabStyle","button","onSelectTab","selected","activeTab","gatherButtonProps","Sticky","TabButton","currActiveTab","TabButtonType","TabFamilyType","createTabFamily","tabFamily","TabFamily","parsedTabs","tabButton","processedTabFamily","firstTab","find","upgrade","currCost","UpgradeType","createUpgrade","Upgrade","genericUpgrade","createLayer","points","beep","thingy","otherThingy","spentOnBuyables","waffleBoost","icecreamCap","coolInfo","lollipopMilestone3","lollipopMilestone4","f","boop","lollipopMilestones","funChallenge","funEffect","main","generatorUpgrade","lollipopMultiplierUpgrade","lollipopMultiplierEffect","ret","unlockIlluminatiUpgrade","quasiUpgrade","exhancers","upgrades","thingEffect","stuffEffect","confirmRespec","respecBuyables","sellExhancer","buyablesDisplay","longBoi","tallBoi","textShadow","borderWidth","flatBoi","tooltip","textDecoration","g","h","right","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","confettiParticles","clientX","clientY","playOnceAndDestroy","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","setupLayerModal","openModal","toRaw","showAchievements","oldVersion","emitter","on","Set","pop","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","renderJSX","Comp","setupHoldToClick","interval","event","handleHolding","computeComponent","unwrapRef","computeOptionalComponent","currComponent","wrapRef","processedPropType","types","observerOptions","attributes","childList","subtree","updateNode","provide","MutationObserver","disconnect","isAnimating","close","to","onBeforeEnter","onAfterLeave","onPointerdown","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","isShown","onMouseenter","isHovered","onClickCapture","togglePinned","elementComp","LEFT","bottom","isPinned","stopPropagation","webpackEmptyContext","code","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","definition","o","defineProperty","globalThis","hmd","create","children","hasOwnProperty","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.bd74b40f.js b/js/app.a22461db.js similarity index 59% rename from js/app.bd74b40f.js rename to js/app.a22461db.js index 28bde37..4410009 100644 --- a/js/app.bd74b40f.js +++ b/js/app.a22461db.js @@ -1,2 +1,2 @@ -(function(){var e={1037:function(e,o,t){"use strict";t.d(o,{b:function(){return n}});const l={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#eee","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var n;(function(e){e["Classic"]="classic",e["Paper"]="paper",e["Nordic"]="nordic",e["Aqua"]="aqua"})(n||(n={})),o["Z"]={classic:l,paper:{...l,variables:{...l.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...l,variables:{...l.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...l,variables:{...l.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}}},6113:function(e,o,t){"use strict";t.d(o,{wA:function(){return i},tj:function(){return a},QI:function(){return u},EE:function(){return m},tZ:function(){return c},Kf:function(){return f},Rh:function(){return d},bD:function(){return y}});var l=t(5613),n=t(9583),r=t(4865);const i=Symbol("Component"),a=Symbol("GatherProps");let s=0;function u(e="feature-"){return(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](s++):e+s++)()}var m;function c(e){return e[n.mM]=!0,e}function f(e,o=m.None){return e?m.Visible:o}function d(e,o,t){void 0===e[o]&&(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](void 0):void 0!=t)()&&(e[o]=t)}function y(e,o){const t=[],n=e=>{Object.keys(e).forEach((i=>{const a=e[i];a&&"object"===typeof a&&(a.type===o?t.push(a):(()=>a instanceof l.ZP!==void 0&&a instanceof l.ZP!==null&&(a instanceof l.ZP)[Symbol.for("!")]?(a instanceof l.ZP)[Symbol.for("!")]():!(a instanceof l.ZP))()&&(()=>void 0!==(0,r.isRef)(a)&&null!==(0,r.isRef)(a)&&(0,r.isRef)(a)[Symbol.for("!")]?(0,r.isRef)(a)[Symbol.for("!")]():!(0,r.isRef)(a))()&&n(a))}))};return n(e),t}(function(e){e[e["Visible"]=0]="Visible",e[e["Hidden"]=1]="Hidden",e[e["None"]=2]="None"})(m||(m={}))},4096:function(e,o,t){"use strict";t.d(o,{A:function(){return l},Z:function(){return s}});var l,n=t(264),r=t(6113),i=t(9583),a=t(4061);function s(e,o){o.pinnable&&((()=>"pinned"[Symbol.for("in")]?"pinned"[Symbol.for("in")](e):"pinned"in e)()?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),o.pinnable=!1):e.pinned=o.pinned=(0,a.ax)(!1)),(0,i.yB)(o,"display"),(0,i.yB)(o,"classes"),(0,i.yB)(o,"style"),(0,i.yB)(o,"direction"),(0,r.Rh)(o,"direction",l.UP),(0,i.yB)(o,"xoffset"),(0,i.yB)(o,"yoffset");const t=e[r.wA];e[r.wA]=n.Z;const s=e[r.tj].bind(e);return e[r.tj]=function(){const{display:e,classes:o,style:l,direction:n,xoffset:i,yoffset:a,pinned:u}=this;return{element:{[r.wA]:t,[r.tj]:s},display:e,classes:o,style:l,direction:n,xoffset:i,yoffset:a,pinned:u}}.bind(o),o}(function(e){e[e["UP"]=0]="UP",e[e["LEFT"]=1]="LEFT",e[e["RIGHT"]=2]="RIGHT",e[e["DOWN"]=3]="DOWN"})(l||(l={}))},7302:function(e,o,t){"use strict";t.r(o),t.d(o,{globalBus:function(){return m},startGameLoop:function(){return y}});var l=t(6453),n=t(5613),r=t(8111),i=t(4865),a=t(5967),s=t(9266),u=t(3032);const m=(0,r.i)();let c=null,f=null;function d(){const e=Date.now();let o=(()=>e-a.Z.time!==void 0&&e-a.Z.time!==null&&(e-a.Z.time)[Symbol.for("/")]?(e-a.Z.time)[Symbol.for("/")](1e3):(e-a.Z.time)/1e3)();a.Z.time=e;const t=o;if(u.Z.lastTenTicks.push(t),(()=>void 0!==u.Z.lastTenTicks.length&&null!==u.Z.lastTenTicks.length&&u.Z.lastTenTicks.length[Symbol.for(">")]?u.Z.lastTenTicks.length[Symbol.for(">")](10):u.Z.lastTenTicks.length>10)()&&(u.Z.lastTenTicks=u.Z.lastTenTicks.slice(1)),(!f?.value||!(()=>void 0!==a.Z.keepGoing&&null!==a.Z.keepGoing&&a.Z.keepGoing[Symbol.for("!")]?a.Z.keepGoing[Symbol.for("!")]():!a.Z.keepGoing)())&&!u.Z.hasNaN&&(o=Math.max(o,0),0!==a.Z.devSpeed)){if((()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("!=")]?a.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=a.Z.offlineTime)()){if(n.ZP.gt(a.Z.offlineTime,(()=>void 0!==l.offlineLimit&&null!==l.offlineLimit&&l.offlineLimit[Symbol.for("*")]?l.offlineLimit[Symbol.for("*")](3600):3600*l.offlineLimit)())&&(a.Z.offlineTime=(()=>void 0!==l.offlineLimit&&null!==l.offlineLimit&&l.offlineLimit[Symbol.for("*")]?l.offlineLimit[Symbol.for("*")](3600):3600*l.offlineLimit)()),n.ZP.gt(a.Z.offlineTime,0)&&(()=>void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!==")]?a.Z.devSpeed[Symbol.for("!==")](0):0!==a.Z.devSpeed)()){const e=Math.max((()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("/")]?a.Z.offlineTime[Symbol.for("/")](10):a.Z.offlineTime/10)(),o);a.Z.offlineTime=(()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("-")]?a.Z.offlineTime[Symbol.for("-")](e):a.Z.offlineTime-e)(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](e):o+e)()}else 0===a.Z.devSpeed&&(a.Z.offlineTime=(()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("+")]?a.Z.offlineTime[Symbol.for("+")](o):a.Z.offlineTime+o)());((()=>void 0!==a.Z.offlineProd&&null!==a.Z.offlineProd&&a.Z.offlineProd[Symbol.for("!")]?a.Z.offlineProd[Symbol.for("!")]():!a.Z.offlineProd)()||n.ZP.lt(a.Z.offlineTime,0))&&(a.Z.offlineTime=null)}o=Math.min(o,l.maxTickLength),(()=>void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!=")]?a.Z.devSpeed[Symbol.for("!=")](void 0):void 0!=a.Z.devSpeed)()&&(o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](a.Z.devSpeed):o*a.Z.devSpeed)()),(()=>void 0!==Number.isFinite(o)&&null!==Number.isFinite(o)&&Number.isFinite(o)[Symbol.for("!")]?Number.isFinite(o)[Symbol.for("!")]():!Number.isFinite(o))()&&(o=1e308),n.ZP.eq(o,0)||(a.Z.timePlayed=(()=>void 0!==a.Z.timePlayed&&null!==a.Z.timePlayed&&a.Z.timePlayed[Symbol.for("+")]?a.Z.timePlayed[Symbol.for("+")](o):a.Z.timePlayed+o)(),(()=>void 0!==Number.isFinite(a.Z.timePlayed)&&null!==Number.isFinite(a.Z.timePlayed)&&Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]?Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]():!Number.isFinite(a.Z.timePlayed))()&&(a.Z.timePlayed=1e308),m.emit("update",o,t),s.ZP.unthrottled?(requestAnimationFrame(d),(()=>void 0!==c&&null!==c&&c[Symbol.for("!=")]?c[Symbol.for("!=")](null):null!=c)()&&(clearInterval(c),c=null)):(()=>void 0!==c&&null!==c&&c[Symbol.for("==")]?c[Symbol.for("==")](null):null==c)()&&(c=setInterval(d,50)))}}async function y(){f=(await Promise.resolve().then(t.bind(t,7573))).hasWon,(0,i.watch)(f,(e=>{e&&m.emit("gameWon")})),s.ZP.unthrottled?requestAnimationFrame(d):c=setInterval(d,50)}},4061:function(e,o,t){"use strict";t.d(o,{n9:function(){return u},nY:function(){return m},ax:function(){return y}});t(1703);var l=t(7302),n=t(5613),r=t(3273),i=t(3577),a=t(4865),s=t(9365);const u=Symbol("PersistentState"),m=Symbol("DefaultValue"),c=Symbol("StackTrace"),f=Symbol("Deleted");function d(){return(new Error).stack?.split("\n").slice(3,5).map((e=>e.trim())).join("\n")||""}function y(e){const o=(0,a.isRef)(e)?e:(0,a.ref)(e);return o[u]=o,o[m]=(0,a.isRef)(e)?e.value:e,o[c]=d(),o[f]=!1,0===s.addingLayers.length?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",o,(()=>"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](o[c]):"\nCreated at:\n"+o[c])()):s.persistentRefs[s.addingLayers[(()=>void 0!==s.addingLayers.length&&null!==s.addingLayers.length&&s.addingLayers.length[Symbol.for("-")]?s.addingLayers.length[Symbol.for("-")](1):s.addingLayers.length-1)()]].add(o),o}l.globalBus.on("addLayer",((e,o)=>{const t=[],l=(d,y=[])=>{let b=!1;return Object.keys(d).forEach((h=>{const p=d[h];if(p&&"object"===typeof p)if((()=>void 0!==u&&null!==u&&u[Symbol.for("in")]?u[Symbol.for("in")](p):u in p)()){if(b=!0,p[f])return void console.warn("Deleted persistent ref present in returned object. Ignoring...",p,(()=>"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](p[c]):"\nCreated at:\n"+p[c])());s.persistentRefs[e.id].delete((()=>void 0!==r.Le&&null!==r.Le&&r.Le[Symbol.for("in")]?r.Le[Symbol.for("in")](p):r.Le in p)()?p[r.Le]:p);const t=y.reduce(((e,o)=>((()=>o in e!==void 0&&o in e!==null&&(o in e)[Symbol.for("!")]?(o in e)[Symbol.for("!")]():!(o in e))()&&(e[o]={}),e[o])),o),l=t[h];t[h]=p[u],(0,a.isReactive)(t)?(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](null):null!=l)()?t[h]=l:t[h]=p[m]:(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](null):null!=l)()?t[h].value=l:t[h].value=p[m]}else if((()=>p instanceof n.ZP!==void 0&&p instanceof n.ZP!==null&&(p instanceof n.ZP)[Symbol.for("!")]?(p instanceof n.ZP)[Symbol.for("!")]():!(p instanceof n.ZP))()&&(()=>void 0!==(0,a.isRef)(p)&&null!==(0,a.isRef)(p)&&(0,a.isRef)(p)[Symbol.for("!")]?(0,a.isRef)(p)[Symbol.for("!")]():!(0,a.isRef)(p))()&&(()=>void 0!==t.includes(p)&&null!==t.includes(p)&&t.includes(p)[Symbol.for("!")]?t.includes(p)[Symbol.for("!")]():!t.includes(p))()){"symbol"===typeof p.type&&t.push(p);const e=l(p,[...y,h]);e&&((0,i.kJ)(p)&&(()=>void 0!==(0,i.kJ)(d)&&null!==(0,i.kJ)(d)&&(0,i.kJ)(d)[Symbol.for("!")]?(0,i.kJ)(d)[Symbol.for("!")]():!(0,i.kJ)(d))()?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",(()=>void 0!==r.Le&&null!==r.Le&&r.Le[Symbol.for("in")]?r.Le[Symbol.for("in")](d):r.Le in d)()?d[r.Le]:d,h):b=!0)}})),b};l(e),s.persistentRefs[e.id].forEach((o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,(()=>"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](o[c]):"\nCreated at:\n"+o[c])())})),s.persistentRefs[e.id].clear()}))},5967:function(e,o,t){"use strict";t.d(o,{U:function(){return u}});var l=t(5613),n=t(1349),r=t(3273),i=t(4865),a=t(3032);const s=(0,i.reactive)({id:"",devSpeed:null,name:"",tabs:[],time:(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function u(e){return JSON.stringify(e,((e,o)=>(0,i.unref)(o)))}const m={get(e,o){if(o===r.Le||o===r.c4)return e[o];const t=e[r.Le][o];if((()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")]("value"):"value"!==o)()&&(0,n.PO)(t)&&(()=>t instanceof l.ZP!==void 0&&t instanceof l.ZP!==null&&(t instanceof l.ZP)[Symbol.for("!")]?(t instanceof l.ZP)[Symbol.for("!")]():!(t instanceof l.ZP))()){if((()=>void 0!==t&&null!==t&&t[Symbol.for("!==")]?t[Symbol.for("!==")](e[o]?.[r.Le]):t!==e[o]?.[r.Le])()){const l=[...e[r.c4],o];e[o]=new Proxy({[r.Le]:t,[r.c4]:l},m)}return e[o]}return t},set(e,o,t,n){if((()=>void 0!==a.Z.hasNaN&&null!==a.Z.hasNaN&&a.Z.hasNaN[Symbol.for("!")]?a.Z.hasNaN[Symbol.for("!")]():!a.Z.hasNaN)()&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))){const t=e[r.Le][o];if((()=>void 0!==("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&null!==("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]?("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]():!("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag))))())throw s.autosave=!1,a.Z.hasNaN=!0,a.Z.NaNPath=[...e[r.c4],o],a.Z.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[r.c4],o],e[r.Le]),"Attempted to set NaN value. See above for details"}return e[r.Le][o]=t,!0},ownKeys(e){return Reflect.ownKeys(e[r.Le])},has(e,o){return Reflect.has(e[r.Le],o)},getOwnPropertyDescriptor(e,o){return Object.getOwnPropertyDescriptor(e[r.Le],o)}};o["Z"]=window.player=new Proxy({[r.Le]:s,[r.c4]:["player"]},m)},9266:function(e,o,t){"use strict";t.d(o,{ri:function(){return u},V$:function(){return m},QV:function(){return c},II:function(){return f},fw:function(){return d},t:function(){return y}});t(2801);var l=t(6453),n=t(1037),r=t(7302),i=t(463),a=t(4865);const s=(0,a.reactive)({active:"",saves:[],showTPS:!0,theme:n.b.Nordic,unthrottled:!1});function u(){try{const e=localStorage.getItem(l.id);if((()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](""):""!==e)()){const o=JSON.parse(decodeURIComponent(escape(atob(e))));"object"===typeof o&&Object.assign(s,o)}r.globalBus.emit("loadSettings",s)}catch{}}(0,a.watch)(s,(e=>localStorage.setItem(l.id,btoa(unescape(encodeURIComponent(JSON.stringify(e)))))),{deep:!0}),o["ZP"]=window.settings=s;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:n.b.Nordic};r.globalBus.emit("loadSettings",e),Object.assign(s,e),(0,i.y6)()};const m=(0,a.reactive)([]);function c(e){m.push(e)}const f=(0,a.reactive)([]);function d(e){f.push(e)}const y=(0,a.reactive)([])},3032:function(e,o,t){"use strict";var l=t(4865);o["Z"]=window.state=(0,l.shallowReactive)({lastTenTicks:[],hasNaN:!1,NaNPath:[]})},6098:function(e,o,t){"use strict";var l=t(4865),n=t(6113),r=t(1604),i=t(6453),a=t(9365),s=t(5967);function u(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Context");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"layer-container",style:(0,l.normalizeStyle)({"--layer-color":e.unref(e.color)})},[e.showGoBack?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,class:"goBack",onClick:o[0]||(o[0]=(...o)=>e.goBack&&e.goBack(...o))},"←")):(0,l.createCommentVNode)("",!0),e.minimized.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"layer-tab minimized",onClick:o[1]||(o[1]=o=>e.minimized.value=!1)},[(0,l.createElementVNode)("div",null,(0,l.toDisplayString)(e.unref(e.name)),1)])):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:2,class:(0,l.normalizeClass)(["layer-tab",[{showGoBack:e.showGoBack},e.unref(e.classes)]]),style:(0,l.normalizeStyle)(e.unref(e.style))},[(0,l.createVNode)(a,{ref:"contextRef"},{default:(0,l.withCtx)((()=>[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component)))])),_:1},512)],6)),e.unref(e.minimizable)?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:3,class:"minimize",onClick:o[2]||(o[2]=o=>e.minimized.value=!0)}," ▼ ")):(0,l.createCommentVNode)("",!0)],4)}var m=t(5053),c=(0,l.defineComponent)({components:{Context:m.Z},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:(0,r.P5)(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:(0,r.P5)(Number,String),required:!0},name:{type:(0,r.P5)(String),required:!0},color:(0,r.P5)(String),style:(0,r.P5)(String,Object,Array),classes:(0,r.P5)(Object),minimizable:(0,r.P5)(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:o,index:t,minimized:n,minWidth:a,tab:u}=(0,l.toRefs)(e),m=(0,r.vq)(o),c=(0,l.computed)((()=>i.allowGoBack&&(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for(">")]?t.value[Symbol.for(">")](0):t.value>0)()&&(()=>void 0!==n.value&&null!==n.value&&n.value[Symbol.for("!")]?n.value[Symbol.for("!")]():!n.value)()));function f(){s.Z.tabs.splice((0,l.unref)(e.index),1/0)}(0,l.nextTick)((()=>y(n.value,(0,l.unref)(a.value)))),(0,l.watch)([n,(0,r.o9)(a)],(([e,o])=>y(e,o)));const d=(0,l.ref)(null);function y(e,o){const t="number"===typeof o||Number.isNaN(parseInt(o))?(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]("px"):o+"px")():o,l=u.value();(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](void 0):void 0!=l)()&&(e?(l.style.flexGrow="0",l.style.flexShrink="0",l.style.width="60px",l.style.minWidth=l.style.flexBasis="",l.style.margin="0"):(l.style.flexGrow="",l.style.flexShrink="",l.style.width="",l.style.minWidth=l.style.flexBasis=`${t}px`,l.style.margin=""))}return(0,l.watch)((()=>d.value?.nodes),(o=>{o&&(e.nodes.value=o)})),{component:m,showGoBack:c,contextRef:d,unref:l.unref,goBack:f}}}),f=t(3744);const d=(0,f.Z)(c,[["render",u],["__scopeId","data-v-66dc9e3e"]]);var y=d,b=t(6948);const h=e=>((0,l.pushScopeId)("data-v-5f8298e6"),e=e(),(0,l.popScopeId)(),e),p=h((()=>(0,l.createElementVNode)("h2",null,"Changelog",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),g=h((()=>(0,l.createElementVNode)("details",{open:""},[(0,l.createElementVNode)("summary",null,[(0,l.createTextVNode)("v0.0 Initial Commit - "),(0,l.createElementVNode)("time",null,"2021-09-04")]),(0,l.createTextVNode)(" This is the first release :D "),(0,l.createElementVNode)("ul",null,[(0,l.createElementVNode)("li",{class:"feature"},"Did everything"),(0,l.createElementVNode)("li",{class:"fix"},"Had some fun"),(0,l.createElementVNode)("li",{class:"breaking"},"Removed everything"),(0,l.createElementVNode)("li",{class:"balancing"},"Created some bugs to fix later")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var v=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);return o({open(){t.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[p])),body:(0,l.withCtx)((()=>[g])),_:1},8,["modelValue"]))}});const S=(0,f.Z)(v,[["__scopeId","data-v-5f8298e6"]]);var N=S,k=t(9266),V=t(5613);const x=e=>((0,l.pushScopeId)("data-v-3eb46986"),e=e(),(0,l.popScopeId)(),e),M={class:"info-modal-header"},C=["src","alt"],w={class:"info-modal-title"},Z={key:0},B={key:0},P={key:0},E=x((()=>(0,l.createElementVNode)("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),T=x((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),F=x((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),I=["href"],D=x((()=>(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),R=x((()=>(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,l.createTextVNode)(" The Paper Pilot Community ")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),O=x((()=>(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,l.createTextVNode)(" The Modding Tree ")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),_=x((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var j=(0,l.defineComponent)({props:{changelog:null},setup(e,{expose:o}){const t=e,{title:a,logo:u,author:m,discordName:c,discordLink:f,versionNumber:d,versionTitle:y}=i,h=(0,l.toRefs)(t),p=(0,l.ref)(!1),g=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),v=(0,l.computed)((()=>(0,r.MM)((0,n.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.II.map(r.sY)]))))));function S(){(0,l.unref)(h.changelog)?.open()}return o({open(){p.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:p.value,"onUpdate:modelValue":o[0]||(o[0]=e=>p.value=e)},{header:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",M,[(0,l.unref)(u)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,class:"info-modal-logo",src:(0,l.unref)(u),alt:(0,l.unref)(a)},null,8,C)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",w,[(0,l.createElementVNode)("h2",null,(0,l.toDisplayString)((0,l.unref)(a)),1),(0,l.createElementVNode)("h4",null,[(0,l.createTextVNode)((()=>" v"[Symbol.for("+")]?" v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(d))):" v"+(0,l.toDisplayString)((0,l.unref)(d)))(),1),(0,l.unref)(y)?((0,l.openBlock)(),(0,l.createElementBlock)("span",Z,(()=>": "[Symbol.for("+")]?": "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(y))):": "+(0,l.toDisplayString)((0,l.unref)(y)))(),1)):(0,l.createCommentVNode)("",!0)])])])])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createElementBlock)("div",B,[(0,l.unref)(m)?((0,l.openBlock)(),(0,l.createElementBlock)("div",P,(()=>"By "[Symbol.for("+")]?"By "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(m))):"By "+(0,l.toDisplayString)((0,l.unref)(m)))(),1)):(0,l.createCommentVNode)("",!0),E,T,(0,l.createElementVNode)("div",{class:"link",onClick:S},"Changelog"),F,(0,l.createElementVNode)("div",null,[(()=>void 0!==(0,l.unref)(f)&&null!==(0,l.unref)(f)&&(0,l.unref)(f)[Symbol.for("!==")]?(0,l.unref)(f)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(f))()?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:0,href:(0,l.unref)(f),class:"info-modal-discord-link"},[D,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(c))):" "+(0,l.toDisplayString)((0,l.unref)(c)))(),1)],8,I)):(0,l.createCommentVNode)("",!0)]),R,O,_,(0,l.createElementVNode)("div",null,(()=>"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(g))):"Time Played: "+(0,l.toDisplayString)((0,l.unref)(g)))(),1),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(v))))])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const A=(0,f.Z)(j,[["__scopeId","data-v-3eb46986"]]);var U=A,q=t(1037),z=t(1349),L=t(3525),G=t(9868),W=t(264);const H=e=>((0,l.pushScopeId)("data-v-85d7ae40"),e=e(),(0,l.popScopeId)(),e),$=H((()=>(0,l.createElementVNode)("div",{class:"header"},[(0,l.createElementVNode)("h2",null,"Options")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Y=H((()=>(0,l.createElementVNode)("hr",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var K=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);o({open(){t.value=!0}});const a=Object.keys(q.Z).map((e=>({label:(0,z.IJ)(e),value:e}))),u=(0,l.computed)((()=>(0,r.MM)((0,n.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.V$.map(r.sY)])))))),{showTPS:m,theme:c,unthrottled:f}=(0,l.toRefs)(k.ZP),{autosave:d,offlineProd:y}=(0,l.toRefs)(s.Z),h=(0,l.computed)({get(){return 0===s.Z.devSpeed},set(e){s.Z.devSpeed=e?0:null}}),p=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Offline Production"),(0,l.createVNode)(W.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),g=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Autosave"),(0,l.createVNode)(W.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),v=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Pause game"),(0,l.createVNode)(W.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})])));return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:t.value,"onUpdate:modelValue":o[6]||(o[6]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[$])),body:(0,l.withCtx)((()=>[(0,l.createVNode)(L.Z,{title:"Theme",options:(0,l.unref)(a),modelValue:(0,l.unref)(c),"onUpdate:modelValue":o[0]||(o[0]=e=>(0,l.isRef)(c)?c.value=e:null)},null,8,["options","modelValue"]),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(u)))),(0,l.createVNode)(G.Z,{title:"Show TPS",modelValue:(0,l.unref)(m),"onUpdate:modelValue":o[1]||(o[1]=e=>(0,l.isRef)(m)?m.value=e:null)},null,8,["modelValue"]),Y,(0,l.createVNode)(G.Z,{title:"Unthrottled",modelValue:(0,l.unref)(f),"onUpdate:modelValue":o[2]||(o[2]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["modelValue"]),(0,l.createVNode)(G.Z,{title:(0,l.unref)(p),modelValue:(0,l.unref)(y),"onUpdate:modelValue":o[3]||(o[3]=e=>(0,l.isRef)(y)?y.value=e:null)},null,8,["title","modelValue"]),(0,l.createVNode)(G.Z,{title:(0,l.unref)(g),modelValue:(0,l.unref)(d),"onUpdate:modelValue":o[4]||(o[4]=e=>(0,l.isRef)(d)?d.value=e:null)},null,8,["title","modelValue"]),(0,l.unref)(i).enablePausing?((0,l.openBlock)(),(0,l.createBlock)(G.Z,{key:0,title:(0,l.unref)(v),modelValue:(0,l.unref)(h),"onUpdate:modelValue":o[5]||(o[5]=e=>(0,l.isRef)(h)?h.value=e:null)},null,8,["title","modelValue"])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const J=(0,f.Z)(K,[["__scopeId","data-v-85d7ae40"]]);var Q=J,X=(t(2801),t(463)),ee=t(4520);const oe={key:0},te=["onClick","disabled"],le={key:0},ne=["onClick"];var re=(0,l.defineComponent)({props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:o}){const t=e,n=(0,l.toRefs)(t),r=(0,l.ref)(!1);function i(){(0,l.unref)(n.skipConfirm)?o("click"):(r.value&&o("click"),r.value=(()=>void 0!==r.value&&null!==r.value&&r.value[Symbol.for("!")]?r.value[Symbol.for("!")]():!r.value)())}function a(){r.value=!1}return(0,l.watch)(r,(e=>{o("confirmingChanged",e)})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:(0,l.normalizeClass)(["container",{confirming:r.value}])},[r.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",oe,"Are you sure?")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("button",{onClick:(0,l.withModifiers)(i,["stop"]),class:"button danger",disabled:e.disabled},[r.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",le,"Yes")):(0,l.renderSlot)(o.$slots,"default",{key:1})],8,te),r.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"button",onClick:(0,l.withModifiers)(a,["stop"])},"No",8,ne)):(0,l.createCommentVNode)("",!0)],2))}});const ie=(0,f.Z)(re,[["__scopeId","data-v-bf59fca4"]]);var ae=ie;const se=["onClick"];var ue=(0,l.defineComponent)({props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:o}){const t=(0,l.ref)(!1),n=(0,l.ref)(null);function r(){o("click"),n.value&&clearTimeout(n.value),t.value=!1,(0,l.nextTick)((()=>{t.value=!0,n.value=setTimeout((()=>t.value=!1),500)}))}return(o,n)=>((0,l.openBlock)(),(0,l.createElementBlock)("button",{onClick:(0,l.withModifiers)(r,["stop"]),class:(0,l.normalizeClass)(["feedback",{activated:t.value,left:e.left}])},[(0,l.renderSlot)(o.$slots,"default")],10,se))}});const me=(0,f.Z)(ue,[["__scopeId","data-v-5bbcedd3"]]);var ce=me;const fe=e=>((0,l.pushScopeId)("data-v-6a0cf7ac"),e=e(),(0,l.popScopeId)(),e),de=fe((()=>(0,l.createElementVNode)("div",{class:"handle material-icons"},"drag_handle",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ye={key:0,class:"actions"},be=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"content_paste",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),he=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"content_copy",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),pe=[he],ge=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"edit",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ve=[ge],Se=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons",style:{margin:"-2px"}},"delete",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ne={key:1,class:"actions"},ke=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"check",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ve=[ke],xe=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"close",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Me=[xe],Ce={key:2,class:"details"},we={class:"save-version"},Ze=fe((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Be={key:0},Pe={key:3,class:"details"},Ee={key:4,class:"details error"},Te=fe((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Fe=(0,l.defineComponent)({props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:o}){const t=e,{save:n}=(0,l.toRefs)(t),r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=(0,l.ref)(!1),a=(0,l.ref)(!1),u=(0,l.ref)("");(0,l.watch)(i,(()=>u.value=n.value.name||""));const m=(0,l.computed)((()=>n.value&&n.value.id===s.Z.id)),c=(0,l.computed)((()=>m.value?s.Z.time:n.value&&n.value.time||0));function f(){o("editName",u.value),i.value=!1}return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["save",{active:(0,l.unref)(m)}])},[de,(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",ye,[(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createBlock)(ce,{key:0,onClick:t[0]||(t[0]=e=>o("export")),class:"button",left:""},{default:(0,l.withCtx)((()=>[be])),_:1})):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,onClick:t[1]||(t[1]=e=>o("duplicate")),class:"button"},pe)):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:2,onClick:t[2]||(t[2]=e=>i.value=(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()),class:"button"},ve)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(ae,{disabled:(0,l.unref)(m),onClick:t[3]||(t[3]=e=>o("delete")),onConfirmingChanged:t[4]||(t[4]=e=>a.value=e)},{default:(0,l.withCtx)((()=>[Se])),_:1},8,["disabled"])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ne,[(0,l.createElementVNode)("button",{onClick:f,class:"button"},Ve),(0,l.createElementVNode)("button",{onClick:t[5]||(t[5]=e=>i.value=(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()),class:"button"},Me)])),(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ce,[(0,l.createElementVNode)("button",{class:"button open",onClick:t[6]||(t[6]=e=>o("open"))},[(0,l.createElementVNode)("h3",null,(0,l.toDisplayString)((0,l.unref)(n).name),1)]),(0,l.createElementVNode)("span",we,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(n).modVersion)):"v"+(0,l.toDisplayString)((0,l.unref)(n).modVersion))(),1),Ze,(0,l.unref)(c)?((0,l.openBlock)(),(0,l.createElementBlock)("div",Be,(()=>"Last played "[Symbol.for("+")]?"Last played "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(r).format((0,l.unref)(c)))):"Last played "+(0,l.toDisplayString)((0,l.unref)(r).format((0,l.unref)(c))))(),1)):(0,l.createCommentVNode)("",!0)])):(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&i.value?((0,l.openBlock)(),(0,l.createElementBlock)("div",Pe,[(0,l.createVNode)(ee.Z,{modelValue:u.value,"onUpdate:modelValue":t[7]||(t[7]=e=>u.value=e),class:"editname",onSubmit:f},null,8,["modelValue"])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ee,[(0,l.createTextVNode)((()=>" Error: Failed to load save with id "[Symbol.for("+")]?" Error: Failed to load save with id "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(n).id)):" Error: Failed to load save with id "+(0,l.toDisplayString)((0,l.unref)(n).id))(),1),Te,(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(n).error),1)]))],2))}});const Ie=(0,f.Z)(Fe,[["__scopeId","data-v-6a0cf7ac"]]);var De=Ie,Re=t(9980),Oe=t.n(Re);const _e=e=>((0,l.pushScopeId)("data-v-7d95f59e"),e=e(),(0,l.popScopeId)(),e),je=_e((()=>(0,l.createElementVNode)("h2",null,"Saves Manager",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ae={class:"modal-footer"},Ue={class:"field"},qe=_e((()=>(0,l.createElementVNode)("span",{class:"field-title"},"Create Save",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ze={class:"field-buttons"},Le={class:"footer"},Ge=_e((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var We=(0,l.defineComponent)({setup(e,{expose:o}){const n=(0,l.ref)(!1),r=(0,l.ref)(null);o({open(){n.value=!0}});const i=(0,l.ref)(!1),a=(0,l.ref)("");(0,l.watch)(a,(e=>{e?(0,l.nextTick)((()=>{try{const o=JSON.parse(decodeURIComponent(escape(atob(e))));if((()=>void 0!==typeof o&&null!==typeof o&&(typeof o)[Symbol.for("!==")]?(typeof o)[Symbol.for("!==")]("object"):"object"!==typeof o)())return void(i.value=!0);const t=(0,X.QI)();o.id=t,localStorage.setItem(t,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),a.value="",i.value=!1,k.ZP.saves.push(t)}catch(o){i.value=!0}})):i.value=!1}));let u=t(7634),m=(0,l.ref)(u.keys().reduce(((e,o)=>(e.push({label:o.slice(2,(()=>4[Symbol.for("minus")]?4[Symbol.for("minus")]():-4)()),value:u(o).default}),e)),[]));const c=(0,l.shallowReactive)({});function f(e){if((()=>void 0!==c[e]&&null!==c[e]&&c[e][Symbol.for("==")]?c[e][Symbol.for("==")](null):null==c[e])()){const t=localStorage.getItem(e);if((()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)())c[e]={error:"Save doesn't exist in localStorage",id:e};else if("dW5kZWZpbmVk"===t)c[e]={error:"Save is undefined",id:e};else try{c[e]={...JSON.parse(decodeURIComponent(escape(atob(t)))),id:e}}catch(o){c[e]={error:o,id:e},console.warn(`SavesManager: Failed to load info about save with id ${e}:\n${o}\n${t}`)}}return c[e]}(0,l.watch)(n,(e=>{e&&Object.keys(c).forEach((e=>(()=>void 0!==c&&null!==c&&c[Symbol.for("delete")]?c[Symbol.for("delete")]("key"):delete c.key)()))}));const d=(0,l.computed)((()=>k.ZP.saves.reduce(((e,o)=>(e[o]=f(o),e)),{})));function y(e){let o;o=s.Z.id===e?(0,X.a1)():btoa(unescape(encodeURIComponent(JSON.stringify(d.value[e]))));const t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}function h(e){s.Z.id===e&&(0,X.a1)();const o={...d.value[e],id:(0,X.QI)()};localStorage.setItem(o.id,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),k.ZP.saves.push(o.id)}function p(e){k.ZP.saves=k.ZP.saves.filter((o=>(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](e):o!==e)())),localStorage.removeItem(e),c[e]=void 0}function g(e){d.value[s.Z.id].time=s.Z.time,(0,X.a1)(),(0,X.uW)(d.value[e]),c[e]=void 0}function v(e){const o=JSON.parse(decodeURIComponent(escape(atob(e))));o.id=(0,X.QI)(),localStorage.setItem(o.id,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),k.ZP.saves.push(o.id)}function S(e,o){const t=d.value[e];t&&(t.name=o,s.Z.id===e?(s.Z.name=o,(0,X.a1)()):(localStorage.setItem(e,btoa(unescape(encodeURIComponent(JSON.stringify(t))))),c[e]=void 0))}return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:n.value,"onUpdate:modelValue":o[4]||(o[4]=e=>n.value=e),ref_key:"modal",ref:r},{header:(0,l.withCtx)((()=>[je])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(Oe()),{key:0,list:(0,l.unref)(k.ZP).saves,handle:".handle",itemKey:e=>e},{item:(0,l.withCtx)((({element:e})=>[(0,l.createVNode)(De,{save:(0,l.unref)(d)[e],onOpen:o=>g(e),onExport:o=>y(e),onEditName:o=>S(e,o),onDuplicate:o=>h(e),onDelete:o=>p(e)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])])),_:1},8,["list","itemKey"])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",Ae,[(0,l.createVNode)(ee.Z,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=e=>a.value=e),title:"Import Save",placeholder:"Paste your save here!",class:(0,l.normalizeClass)({importingFailed:i.value})},null,8,["modelValue","class"]),(0,l.createElementVNode)("div",Ue,[qe,(0,l.createElementVNode)("div",ze,[(0,l.createElementVNode)("button",{class:"button",onClick:o[1]||(o[1]=(...e)=>(0,l.unref)(X.xM)&&(0,l.unref)(X.xM)(...e))},"New Game"),(()=>void 0!==Object.keys((0,l.unref)(m)).length&&null!==Object.keys((0,l.unref)(m)).length&&Object.keys((0,l.unref)(m)).length[Symbol.for(">")]?Object.keys((0,l.unref)(m)).length[Symbol.for(">")](0):Object.keys((0,l.unref)(m)).length>0)()?((0,l.openBlock)(),(0,l.createBlock)(L.Z,{key:0,options:(0,l.unref)(m),modelValue:void 0,"onUpdate:modelValue":o[2]||(o[2]=e=>v(e)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,l.createCommentVNode)("",!0)])]),(0,l.createElementVNode)("div",Le,[Ge,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:o[3]||(o[3]=e=>n.value=!1)}," Close ")])])])),_:1},8,["modelValue"]))}});const He=(0,f.Z)(We,[["__scopeId","data-v-7d95f59e"]]);var $e=He,Ye=t(4096);const Ke=e=>((0,l.pushScopeId)("data-v-71847eca"),e=e(),(0,l.popScopeId)(),e),Je=["src","alt"],Qe={key:1,class:"title"},Xe=Ke((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),eo={class:"discord"},oo={class:"discord-links"},to={key:0},lo=["href"],no=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ro=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),io={href:"https://forums.moddingtree.com/",target:"_blank"},ao=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),so=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),uo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),mo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),co=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),fo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),yo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),bo={href:"https://forums.moddingtree.com/",target:"_blank"},ho=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),po={class:"discord"},go={class:"discord-links"},vo={key:0},So=["href"],No=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ko=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Vo=(0,l.defineComponent)({setup(e){const o=(0,l.ref)(null),t=(0,l.ref)(null),n=(0,l.ref)(null),r=(0,l.ref)(null),{useHeader:a,banner:s,title:u,discordName:m,discordLink:c,versionNumber:f}=i;function d(){window.open(c,"mywindow")}return(e,i)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.unref)(a)?((0,l.openBlock)(),(0,l.createElementBlock)("div",(0,l.mergeProps)({key:0,class:"nav"},e.$attrs),[(0,l.unref)(s)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,src:(0,l.unref)(s),class:"banner",alt:(0,l.unref)(u)},null,8,Je)):((0,l.openBlock)(),(0,l.createElementBlock)("div",Qe,(0,l.toDisplayString)((0,l.unref)(u)),1)),(0,l.createElementVNode)("div",{onClick:i[0]||(i[0]=e=>r.value?.open()),class:"version-container"},[(0,l.createVNode)(W.Z,{display:"Changelog",direction:(0,l.unref)(Ye.A).DOWN,class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1},8,["direction"])]),Xe,(0,l.createElementVNode)("div",eo,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",oo,[(()=>void 0!==(0,l.unref)(c)&&null!==(0,l.unref)(c)&&(0,l.unref)(c)[Symbol.for("!==")]?(0,l.unref)(c)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(c))()?((0,l.openBlock)(),(0,l.createElementBlock)("li",to,[(0,l.createElementVNode)("a",{href:(0,l.unref)(c),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(m)),9,lo)])):(0,l.createCommentVNode)("",!0),no,ro])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",io,[(0,l.createVNode)(W.Z,{display:"Forums",direction:(0,l.unref)(Ye.A).DOWN,yoffset:"5px"},{default:(0,l.withCtx)((()=>[ao])),_:1},8,["direction"])])]),(0,l.createElementVNode)("div",{onClick:i[1]||(i[1]=e=>o.value?.open())},[(0,l.createVNode)(W.Z,{display:"Info",direction:(0,l.unref)(Ye.A).DOWN,class:"info"},{default:(0,l.withCtx)((()=>[so])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[2]||(i[2]=e=>t.value?.open())},[(0,l.createVNode)(W.Z,{display:"Saves",direction:(0,l.unref)(Ye.A).DOWN,xoffset:"-20px"},{default:(0,l.withCtx)((()=>[uo])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[3]||(i[3]=e=>n.value?.open())},[(0,l.createVNode)(W.Z,{display:"Options",direction:(0,l.unref)(Ye.A).DOWN,xoffset:"-66px"},{default:(0,l.withCtx)((()=>[mo])),_:1},8,["direction"])])],16)):((0,l.openBlock)(),(0,l.createElementBlock)("div",(0,l.mergeProps)({key:1,class:"overlay-nav"},e.$attrs),[(0,l.createElementVNode)("div",{onClick:i[4]||(i[4]=e=>r.value?.open()),class:"version-container"},[(0,l.createVNode)(W.Z,{display:"Changelog",direction:(0,l.unref)(Ye.A).RIGHT,xoffset:"25%",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[5]||(i[5]=e=>t.value?.open())},[(0,l.createVNode)(W.Z,{display:"Saves",direction:(0,l.unref)(Ye.A).RIGHT},{default:(0,l.withCtx)((()=>[co])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[6]||(i[6]=e=>n.value?.open())},[(0,l.createVNode)(W.Z,{display:"Options",direction:(0,l.unref)(Ye.A).RIGHT},{default:(0,l.withCtx)((()=>[fo])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[7]||(i[7]=e=>o.value?.open())},[(0,l.createVNode)(W.Z,{display:"Info",direction:(0,l.unref)(Ye.A).RIGHT},{default:(0,l.withCtx)((()=>[yo])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",bo,[(0,l.createVNode)(W.Z,{display:"Forums",direction:(0,l.unref)(Ye.A).RIGHT,xoffset:"7px"},{default:(0,l.withCtx)((()=>[ho])),_:1},8,["direction"])])]),(0,l.createElementVNode)("div",po,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",go,[(()=>void 0!==(0,l.unref)(c)&&null!==(0,l.unref)(c)&&(0,l.unref)(c)[Symbol.for("!==")]?(0,l.unref)(c)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(c))()?((0,l.openBlock)(),(0,l.createElementBlock)("li",vo,[(0,l.createElementVNode)("a",{href:(0,l.unref)(c),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(m)),9,So)])):(0,l.createCommentVNode)("",!0),No,ko])])],16)),(0,l.createVNode)(U,{ref_key:"info",ref:o,changelog:r.value},null,8,["changelog"]),(0,l.createVNode)($e,{ref_key:"savesManager",ref:t},null,512),(0,l.createVNode)(Q,{ref_key:"options",ref:n},null,512),(0,l.createVNode)(N,{ref_key:"changelog",ref:r},null,512)],64))}});const xo=(0,f.Z)(Vo,[["__scopeId","data-v-71847eca"]]);var Mo=xo;const Co={class:"inner-tab"},wo={key:1,class:"separator"};var Zo=(0,l.defineComponent)({setup(e){const o=(0,l.toRef)(s.Z,"tabs"),t=(0,l.computed)((()=>Object.keys(a.layers))),n=i.useHeader;function r(e){const{display:o,minimized:t,minWidth:l,name:n,color:r,style:i,classes:a,minimizable:s,nodes:u}=e;return{display:o,minimized:t,minWidth:l,name:n,color:r,style:i,classes:a,minimizable:s,nodes:u}}return(e,i)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tabs-container",{useHeader:(0,l.unref)(n)}])},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(o),((i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:s,class:"tab",ref_for:!0,ref:`tab-${s}`},[0===s&&(()=>void 0!==(0,l.unref)(n)&&null!==(0,l.unref)(n)&&(0,l.unref)(n)[Symbol.for("!")]?(0,l.unref)(n)[Symbol.for("!")]():!(0,l.unref)(n))()?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Co,[(0,l.unref)(t).includes(i)?((0,l.openBlock)(),(0,l.createBlock)(y,(0,l.mergeProps)({key:0},r((0,l.unref)(a.layers)[i]),{index:s,tab:()=>e.$refs[`tab-${s}`]?.[0]}),null,16,["index","tab"])):((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(i),{key:1,index:s},null,8,["index"]))]),(()=>void 0!==s&&null!==s&&s[Symbol.for("!==")]?s[Symbol.for("!==")]((0,l.unref)(o).length-1):s!==(0,l.unref)(o).length-1)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",wo)):(0,l.createCommentVNode)("",!0)])))),128))],2))}});const Bo=(0,f.Z)(Zo,[["__scopeId","data-v-4fd7697b"]]);var Po=Bo,Eo=t(7573);const To=e=>((0,l.pushScopeId)("data-v-06188cc8"),e=e(),(0,l.popScopeId)(),e),Fo={class:"game-over-modal-header"},Io=["src","alt"],Do={class:"game-over-modal-title"},Ro=To((()=>(0,l.createElementVNode)("h2",null,"Congratulations!",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Oo={key:0},_o=To((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),jo=To((()=>(0,l.createElementVNode)("div",null," Please check the Discord to discuss the game or to check for new content updates! ",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ao=To((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Uo=["href"],qo=To((()=>(0,l.createElementVNode)("span",{class:"material-icons game-over-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var zo=(0,l.defineComponent)({setup(e){const{title:o,logo:t,discordName:n,discordLink:r,versionNumber:a,versionTitle:u}=i,m=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),c=(0,l.computed)((()=>Eo.hasWon.value&&(()=>void 0!==s.Z.keepGoing&&null!==s.Z.keepGoing&&s.Z.keepGoing[Symbol.for("!")]?s.Z.keepGoing[Symbol.for("!")]():!s.Z.keepGoing)())),f=(0,l.toRef)(s.Z,"autosave");function d(){s.Z.keepGoing=!0}function y(){(0,X.uW)((0,X.xM)())}return(e,i)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{"model-value":(0,l.unref)(c)},{header:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",Fo,[(0,l.unref)(t)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,class:"game-over-modal-logo",src:(0,l.unref)(t),alt:(0,l.unref)(o)},null,8,Io)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Do,[Ro,(0,l.createElementVNode)("h4",null,(()=>"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": "!==void 0&&"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": "!==null&&("You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": ")[Symbol.for("+")]?("You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": ")[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(u))):"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": "+(0,l.toDisplayString)((0,l.unref)(u)))(),1)])])])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createElementBlock)("div",Oo,[(0,l.createElementVNode)("div",null,(()=>"It took you "+(0,l.toDisplayString)((0,l.unref)(m))!==void 0&&"It took you "+(0,l.toDisplayString)((0,l.unref)(m))!==null&&("It took you "+(0,l.toDisplayString)((0,l.unref)(m)))[Symbol.for("+")]?("It took you "+(0,l.toDisplayString)((0,l.unref)(m)))[Symbol.for("+")](" to beat the game."):"It took you "+(0,l.toDisplayString)((0,l.unref)(m))+" to beat the game.")(),1),_o,jo,Ao,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(r),class:"game-over-modal-discord-link"},[qo,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(n))):" "+(0,l.toDisplayString)((0,l.unref)(n)))(),1)],8,Uo)]),(0,l.createVNode)(G.Z,{title:"Autosave",modelValue:(0,l.unref)(f),"onUpdate:modelValue":i[0]||(i[0]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["modelValue"])])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",{class:"game-over-footer"},[(0,l.createElementVNode)("button",{onClick:d,class:"button"},"Keep Going"),(0,l.createElementVNode)("button",{onClick:y,class:"button danger"},"Play Again")])])),_:1},8,["model-value"]))}});const Lo=(0,f.Z)(zo,[["__scopeId","data-v-06188cc8"]]);var Go=Lo,Wo=t(3032);const Ho=e=>((0,l.pushScopeId)("data-v-5935214c"),e=e(),(0,l.popScopeId)(),e),$o=Ho((()=>(0,l.createElementVNode)("div",{class:"nan-modal-header"},[(0,l.createElementVNode)("h2",null,"NaN value detected!")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Yo={key:0},Ko=Ho((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Jo=["href"],Qo=Ho((()=>(0,l.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Xo=Ho((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),et={class:"nan-footer"};var ot=(0,l.defineComponent)({setup(e){const{discordName:o,discordLink:t}=i,n=(0,l.toRef)(s.Z,"autosave"),r=(0,l.toRef)(Wo.Z,"hasNaN"),a=(0,l.ref)(null),u=(0,l.computed)((()=>Wo.Z.NaNPath.join("."))),m=(0,l.computed)((()=>Wo.Z.NaNPath.slice((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())[0])),c=(0,l.computed)((()=>Wo.Z.NaNReceiver&&m.value?Wo.Z.NaNReceiver[m.value]:null)),f=(0,l.computed)({get(){return 0===s.Z.devSpeed},set(e){s.Z.devSpeed=e?null:0}});function d(){Wo.Z.NaNReceiver&&m.value&&(Wo.Z.NaNReceiver[m.value]=new V.ZP(0),Wo.Z.hasNaN=!1)}function y(){Wo.Z.NaNReceiver&&m.value&&(Wo.Z.NaNReceiver[m.value]=new V.ZP(1),Wo.Z.hasNaN=!1)}function h(){Wo.Z.NaNReceiver&&m.value&&(Wo.Z.NaNReceiver[m.value]=new V.ZP(NaN),Wo.Z.hasNaN=!1)}return(e,s)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(b.Z,(0,l.mergeProps)({modelValue:(0,l.unref)(r),"onUpdate:modelValue":s[4]||(s[4]=e=>(0,l.isRef)(r)?r.value=e:null)},e.$attrs),{header:(0,l.withCtx)((()=>[$o])),body:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",null,[(0,l.createTextVNode)((()=>' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u))!==void 0&&' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u))!==null&&(' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u)))[Symbol.for("+")]?(' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u)))[Symbol.for("+")]('" to NaN'):' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u))+'" to NaN')(),1),(0,l.unref)(c)?((0,l.openBlock)(),(0,l.createElementBlock)("span",Yo,(()=>(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c)))!==void 0&&(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c)))!==null&&((0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c))))[Symbol.for("+")]?((0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c))))[Symbol.for("+")](")"):(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c)))+")")(),1)):(0,l.createCommentVNode)("",!0),(0,l.createTextVNode)((()=>". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled")!==void 0&&". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled")!==null&&(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled"))[Symbol.for("+")]?(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled"))[Symbol.for("+")](". Check the console for more details, and consider sharing it with the developers on discord. "):". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ")(),1)]),Ko,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(t),class:"nan-modal-discord-link"},[Qo,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(o))):" "+(0,l.toDisplayString)((0,l.unref)(o)))(),1)],8,Jo)]),Xo,(0,l.createVNode)(G.Z,{title:"Autosave",modelValue:(0,l.unref)(n),"onUpdate:modelValue":s[0]||(s[0]=e=>(0,l.isRef)(n)?n.value=e:null)},null,8,["modelValue"]),(0,l.unref)(i).enablePausing?((0,l.openBlock)(),(0,l.createBlock)(G.Z,{key:0,title:"Pause game",modelValue:(0,l.unref)(f),"onUpdate:modelValue":s[1]||(s[1]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["modelValue"])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",et,[(0,l.createElementVNode)("button",{onClick:s[2]||(s[2]=e=>a.value?.open()),class:"button"},"Open Saves Manager"),(0,l.createElementVNode)("button",{onClick:d,class:"button"},"Set to 0"),(0,l.createElementVNode)("button",{onClick:y,class:"button"},"Set to 1"),(0,l.unref)(c)&&(0,l.unref)(V.ZP).neq((0,l.unref)(c),0)&&(0,l.unref)(V.ZP).neq((0,l.unref)(c),1)?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:s[3]||(s[3]=e=>r.value=!1),class:"button"}," Set to previous ")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("button",{onClick:h,class:"button danger"},"Ignore")])])),_:1},16,["modelValue"]),(0,l.createVNode)($e,{ref_key:"savesManager",ref:a},null,512)],64))}});const tt=(0,f.Z)(ot,[["__scopeId","data-v-5935214c"]]);var lt=tt;const nt={key:0,class:"tpsDisplay"},rt={key:0,class:"low"};var it=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>V.ZP.div(Wo.Z.lastTenTicks.length,Wo.Z.lastTenTicks.reduce(((e,o)=>(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](o):e+o)()),0)))),t=(0,l.ref)([]);(0,l.watchEffect)((()=>{t.value.push(Math.round(o.value.toNumber())),(()=>void 0!==t.value.length&&null!==t.value.length&&t.value.length[Symbol.for(">")]?t.value.length[Symbol.for(">")](10):t.value.length>10)()&&(t.value=t.value.slice(1))}));const n=(0,l.computed)((()=>t.value.reduce(((e,o)=>V.ZP.max(e,o)),0))),r=(0,l.computed)((()=>V.ZP.sub(o.value,n.value).gt(1)));return(e,t)=>(()=>void 0!==(0,l.unref)(o).isNan()&&null!==(0,l.unref)(o).isNan()&&(0,l.unref)(o).isNan()[Symbol.for("!")]?(0,l.unref)(o).isNan()[Symbol.for("!")]():!(0,l.unref)(o).isNan())()?((0,l.openBlock)(),(0,l.createElementBlock)("div",nt,[(0,l.createTextVNode)((()=>" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o)))!==void 0&&" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o)))!==null&&(" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o))))[Symbol.for("+")]?(" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o))))[Symbol.for("+")](" "):" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o)))+" ")(),1),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",rt,(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(n))),1)):(0,l.createCommentVNode)("",!0)])),_:1})])):(0,l.createCommentVNode)("",!0)}});const at=(0,f.Z)(it,[["__scopeId","data-v-c0663118"]]);var st=at,ut=(0,l.defineComponent)({setup(e){const o=i.useHeader,t=(0,l.computed)((()=>q.Z[k.ZP.theme].variables)),a=(0,l.toRef)(k.ZP,"showTPS"),s=(0,l.computed)((()=>(0,r.MM)((0,n.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.t.map(r.sY)]))))));return(e,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createElementVNode)("div",{id:"modal-root",style:(0,l.normalizeStyle)((0,l.unref)(t))},null,4),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["app",{useHeader:(0,l.unref)(o)}]),style:(0,l.normalizeStyle)((0,l.unref)(t))},[(0,l.unref)(o)?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Po),(0,l.unref)((0,l.unref)(a))?((0,l.openBlock)(),(0,l.createBlock)(st,{key:1})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Go),(0,l.createVNode)(lt),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(s))))],6)],64))}});const mt=(0,f.Z)(ut,[["__scopeId","data-v-f13f28b6"]]);var ct=mt;if(document.title=i.title,""===i.id)throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame((async()=>{console.log("%cMade in Profectus%c\nLearn more at www.moddingtree.com","font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await(0,X.zD)();const{globalBus:e,startGameLoop:o}=await t(7302),n=window.vue=(0,l.createApp)(ct);e.emit("setupVue",n),n.mount("#app"),o()})),window.projInfo=i},5613:function(e,o,t){"use strict";t.d(o,{ZP:function(){return be},WU:function(){return ue},mr:function(){return ce},Ht:function(){return me}});var l={};t.r(l),t.d(l,{commaFormat:function(){return z},default:function(){return A},exponentialFormat:function(){return q},format:function(){return ee},formatSmall:function(){return ne},formatTime:function(){return te},formatWhole:function(){return oe},invertOOM:function(){return re},regularFormat:function(){return L},toPlaces:function(){return le}});var n=t(2482);t(1703);let r,i,a,s,u,m,c,f,d,y,b;const h=17,p=9e15,g=Math.log10(9e15),v=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](9e15):1/9e15)(),S=308,N=(()=>324[Symbol.for("minus")]?324[Symbol.for("minus")]():-324)(),k=5,V=!0,x=!1,M=function(){const e=[];for(let t=(()=>void 0!==N&&null!==N&&N[Symbol.for("+")]?N[Symbol.for("+")](1):N+1)();(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")](S):t<=S)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++)())e.push(Number((()=>"1e"[Symbol.for("+")]?"1e"[Symbol.for("+")](t):"1e"+t)()));const o=323;return function(t){return e[(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](o):t+o)()]}}(),C=[2,Math.E,3,4,5,6,7,8,9,10],w=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Z=[[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.9194161097107025[Symbol.for("minus")]?.9194161097107025[Symbol.for("minus")]():-.9194161097107025)(),(()=>.8335625019330468[Symbol.for("minus")]?.8335625019330468[Symbol.for("minus")]():-.8335625019330468)(),(()=>.7425599821143978[Symbol.for("minus")]?.7425599821143978[Symbol.for("minus")]():-.7425599821143978)(),(()=>.6466611521029437[Symbol.for("minus")]?.6466611521029437[Symbol.for("minus")]():-.6466611521029437)(),(()=>.5462617907227869[Symbol.for("minus")]?.5462617907227869[Symbol.for("minus")]():-.5462617907227869)(),(()=>.4419033816638769[Symbol.for("minus")]?.4419033816638769[Symbol.for("minus")]():-.4419033816638769)(),(()=>.3342645487554494[Symbol.for("minus")]?.3342645487554494[Symbol.for("minus")]():-.3342645487554494)(),(()=>.224140440909962[Symbol.for("minus")]?.224140440909962[Symbol.for("minus")]():-.224140440909962)(),(()=>.11241087890006762[Symbol.for("minus")]?.11241087890006762[Symbol.for("minus")]():-.11241087890006762)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.90603157029014[Symbol.for("minus")]?.90603157029014[Symbol.for("minus")]():-.90603157029014)(),(()=>.80786507256596[Symbol.for("minus")]?.80786507256596[Symbol.for("minus")]():-.80786507256596)(),(()=>.7064666939634[Symbol.for("minus")]?.7064666939634[Symbol.for("minus")]():-.7064666939634)(),(()=>.60294836853664[Symbol.for("minus")]?.60294836853664[Symbol.for("minus")]():-.60294836853664)(),(()=>.49849837513117[Symbol.for("minus")]?.49849837513117[Symbol.for("minus")]():-.49849837513117)(),(()=>.39430303318768[Symbol.for("minus")]?.39430303318768[Symbol.for("minus")]():-.39430303318768)(),(()=>.29147201034755[Symbol.for("minus")]?.29147201034755[Symbol.for("minus")]():-.29147201034755)(),(()=>.19097820800866[Symbol.for("minus")]?.19097820800866[Symbol.for("minus")]():-.19097820800866)(),(()=>.09361896280296[Symbol.for("minus")]?.09361896280296[Symbol.for("minus")]():-.09361896280296)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.9021579584316141[Symbol.for("minus")]?.9021579584316141[Symbol.for("minus")]():-.9021579584316141)(),(()=>.8005762598234203[Symbol.for("minus")]?.8005762598234203[Symbol.for("minus")]():-.8005762598234203)(),(()=>.6964780623319391[Symbol.for("minus")]?.6964780623319391[Symbol.for("minus")]():-.6964780623319391)(),(()=>.5911906810998454[Symbol.for("minus")]?.5911906810998454[Symbol.for("minus")]():-.5911906810998454)(),(()=>.486050182576545[Symbol.for("minus")]?.486050182576545[Symbol.for("minus")]():-.486050182576545)(),(()=>.3823089430815083[Symbol.for("minus")]?.3823089430815083[Symbol.for("minus")]():-.3823089430815083)(),(()=>.28106046722897615[Symbol.for("minus")]?.28106046722897615[Symbol.for("minus")]():-.28106046722897615)(),(()=>.1831906535795894[Symbol.for("minus")]?.1831906535795894[Symbol.for("minus")]():-.1831906535795894)(),(()=>.08935809204418144[Symbol.for("minus")]?.08935809204418144[Symbol.for("minus")]():-.08935809204418144)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8917227442365535[Symbol.for("minus")]?.8917227442365535[Symbol.for("minus")]():-.8917227442365535)(),(()=>.781258746326964[Symbol.for("minus")]?.781258746326964[Symbol.for("minus")]():-.781258746326964)(),(()=>.6705130326902455[Symbol.for("minus")]?.6705130326902455[Symbol.for("minus")]():-.6705130326902455)(),(()=>.5612813129406509[Symbol.for("minus")]?.5612813129406509[Symbol.for("minus")]():-.5612813129406509)(),(()=>.4551067709033134[Symbol.for("minus")]?.4551067709033134[Symbol.for("minus")]():-.4551067709033134)(),(()=>.35319256652135966[Symbol.for("minus")]?.35319256652135966[Symbol.for("minus")]():-.35319256652135966)(),(()=>.2563741554088552[Symbol.for("minus")]?.2563741554088552[Symbol.for("minus")]():-.2563741554088552)(),(()=>.1651412821106526[Symbol.for("minus")]?.1651412821106526[Symbol.for("minus")]():-.1651412821106526)(),(()=>.0796919581982668[Symbol.for("minus")]?.0796919581982668[Symbol.for("minus")]():-.0796919581982668)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8843387974366064[Symbol.for("minus")]?.8843387974366064[Symbol.for("minus")]():-.8843387974366064)(),(()=>.7678744063886243[Symbol.for("minus")]?.7678744063886243[Symbol.for("minus")]():-.7678744063886243)(),(()=>.6529563724510552[Symbol.for("minus")]?.6529563724510552[Symbol.for("minus")]():-.6529563724510552)(),(()=>.5415870994657841[Symbol.for("minus")]?.5415870994657841[Symbol.for("minus")]():-.5415870994657841)(),(()=>.4352842206588936[Symbol.for("minus")]?.4352842206588936[Symbol.for("minus")]():-.4352842206588936)(),(()=>.33504449124791424[Symbol.for("minus")]?.33504449124791424[Symbol.for("minus")]():-.33504449124791424)(),(()=>.24138853420685147[Symbol.for("minus")]?.24138853420685147[Symbol.for("minus")]():-.24138853420685147)(),(()=>.15445285440944467[Symbol.for("minus")]?.15445285440944467[Symbol.for("minus")]():-.15445285440944467)(),(()=>.07409659641336663[Symbol.for("minus")]?.07409659641336663[Symbol.for("minus")]():-.07409659641336663)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8786709358426346[Symbol.for("minus")]?.8786709358426346[Symbol.for("minus")]():-.8786709358426346)(),(()=>.7577735191184886[Symbol.for("minus")]?.7577735191184886[Symbol.for("minus")]():-.7577735191184886)(),(()=>.6399546189952064[Symbol.for("minus")]?.6399546189952064[Symbol.for("minus")]():-.6399546189952064)(),(()=>.527284921869926[Symbol.for("minus")]?.527284921869926[Symbol.for("minus")]():-.527284921869926)(),(()=>.4211627631006314[Symbol.for("minus")]?.4211627631006314[Symbol.for("minus")]():-.4211627631006314)(),(()=>.3223479611761232[Symbol.for("minus")]?.3223479611761232[Symbol.for("minus")]():-.3223479611761232)(),(()=>.23107655627789858[Symbol.for("minus")]?.23107655627789858[Symbol.for("minus")]():-.23107655627789858)(),(()=>.1472057700818259[Symbol.for("minus")]?.1472057700818259[Symbol.for("minus")]():-.1472057700818259)(),(()=>.07035171210706326[Symbol.for("minus")]?.07035171210706326[Symbol.for("minus")]():-.07035171210706326)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8740862815291583[Symbol.for("minus")]?.8740862815291583[Symbol.for("minus")]():-.8740862815291583)(),(()=>.7497032990976209[Symbol.for("minus")]?.7497032990976209[Symbol.for("minus")]():-.7497032990976209)(),(()=>.6297119746181752[Symbol.for("minus")]?.6297119746181752[Symbol.for("minus")]():-.6297119746181752)(),(()=>.5161838335958787[Symbol.for("minus")]?.5161838335958787[Symbol.for("minus")]():-.5161838335958787)(),(()=>.41036238255751956[Symbol.for("minus")]?.41036238255751956[Symbol.for("minus")]():-.41036238255751956)(),(()=>.31277212146489963[Symbol.for("minus")]?.31277212146489963[Symbol.for("minus")]():-.31277212146489963)(),(()=>.2233976621705518[Symbol.for("minus")]?.2233976621705518[Symbol.for("minus")]():-.2233976621705518)(),(()=>.1418697367979619[Symbol.for("minus")]?.1418697367979619[Symbol.for("minus")]():-.1418697367979619)(),(()=>.06762117662323441[Symbol.for("minus")]?.06762117662323441[Symbol.for("minus")]():-.06762117662323441)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8702632331800649[Symbol.for("minus")]?.8702632331800649[Symbol.for("minus")]():-.8702632331800649)(),(()=>.7430366914122081[Symbol.for("minus")]?.7430366914122081[Symbol.for("minus")]():-.7430366914122081)(),(()=>.6213373075161548[Symbol.for("minus")]?.6213373075161548[Symbol.for("minus")]():-.6213373075161548)(),(()=>.5072025698095242[Symbol.for("minus")]?.5072025698095242[Symbol.for("minus")]():-.5072025698095242)(),(()=>.40171437727184167[Symbol.for("minus")]?.40171437727184167[Symbol.for("minus")]():-.40171437727184167)(),(()=>.30517930701410456[Symbol.for("minus")]?.30517930701410456[Symbol.for("minus")]():-.30517930701410456)(),(()=>.21736343968190863[Symbol.for("minus")]?.21736343968190863[Symbol.for("minus")]():-.21736343968190863)(),(()=>.137710238299109[Symbol.for("minus")]?.137710238299109[Symbol.for("minus")]():-.137710238299109)(),(()=>.06550774483471955[Symbol.for("minus")]?.06550774483471955[Symbol.for("minus")]():-.06550774483471955)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8670016295947213[Symbol.for("minus")]?.8670016295947213[Symbol.for("minus")]():-.8670016295947213)(),(()=>.7373984232432306[Symbol.for("minus")]?.7373984232432306[Symbol.for("minus")]():-.7373984232432306)(),(()=>.6143173985094293[Symbol.for("minus")]?.6143173985094293[Symbol.for("minus")]():-.6143173985094293)(),(()=>.49973884395492807[Symbol.for("minus")]?.49973884395492807[Symbol.for("minus")]():-.49973884395492807)(),(()=>.394584953527678[Symbol.for("minus")]?.394584953527678[Symbol.for("minus")]():-.394584953527678)(),(()=>.2989649949848695[Symbol.for("minus")]?.2989649949848695[Symbol.for("minus")]():-.2989649949848695)(),(()=>.21245647317021688[Symbol.for("minus")]?.21245647317021688[Symbol.for("minus")]():-.21245647317021688)(),(()=>.13434688362382652[Symbol.for("minus")]?.13434688362382652[Symbol.for("minus")]():-.13434688362382652)(),(()=>.0638072667348083[Symbol.for("minus")]?.0638072667348083[Symbol.for("minus")]():-.0638072667348083)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8641642839543857[Symbol.for("minus")]?.8641642839543857[Symbol.for("minus")]():-.8641642839543857)(),(()=>.732534623168535[Symbol.for("minus")]?.732534623168535[Symbol.for("minus")]():-.732534623168535)(),(()=>.6083127477059322[Symbol.for("minus")]?.6083127477059322[Symbol.for("minus")]():-.6083127477059322)(),(()=>.4934049257184696[Symbol.for("minus")]?.4934049257184696[Symbol.for("minus")]():-.4934049257184696)(),(()=>.3885773075899922[Symbol.for("minus")]?.3885773075899922[Symbol.for("minus")]():-.3885773075899922)(),(()=>.29376029055315767[Symbol.for("minus")]?.29376029055315767[Symbol.for("minus")]():-.29376029055315767)(),(()=>.2083678561173622[Symbol.for("minus")]?.2083678561173622[Symbol.for("minus")]():-.2083678561173622)(),(()=>.13155653399373268[Symbol.for("minus")]?.13155653399373268[Symbol.for("minus")]():-.13155653399373268)(),(()=>.062401588652553186[Symbol.for("minus")]?.062401588652553186[Symbol.for("minus")]():-.062401588652553186)(),0]],B=function(e){return _.fromValue_noAlloc(e)},P=function(e,o,t){return _.fromComponents(e,o,t)},E=function(e,o,t){return _.fromComponents_noNormalize(e,o,t)},T=function(e,o){const t=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),l=Math.ceil(Math.log10(Math.abs(e))),n=(()=>void 0!==Math.round(e*Math.pow(10,t-l))&&null!==Math.round(e*Math.pow(10,t-l))&&Math.round(e*Math.pow(10,t-l))[Symbol.for("*")]?Math.round(e*Math.pow(10,t-l))[Symbol.for("*")](Math.pow(10,l-t)):Math.round(e*Math.pow(10,t-l))*Math.pow(10,l-t))();return parseFloat(n.toFixed(Math.max((()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](l):t-l)(),0)))},F=function(e){return(()=>void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e)))()},I=function(e){if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))())return e;if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50)())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let o=1;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)())o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](e):o*e)(),(()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})();e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)();let t=.9189385332046727;t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]((e+.5)*Math.log(e)):t+(e+.5)*Math.log(e))(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();const l=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let n=e;return t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(12*n)):t+1/(12*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(360*n)):t+1/(360*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1260*n)):t+1/(1260*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1680*n)):t+1/(1680*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1188*n)):t+1/(1188*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](691/(360360*n)):t+691/(360360*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](7/(1092*n)):t+7/(1092*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](3617/(122400*n)):t+3617/(122400*n))(),(()=>void 0!==Math.exp(t)&&null!==Math.exp(t)&&Math.exp(t)[Symbol.for("/")]?Math.exp(t)[Symbol.for("/")](o):Math.exp(t)/o)()},D=.5671432904097838,R=function(e,o=1e-10){let t,l;if((()=>void 0!==Number.isFinite(e)&&null!==Number.isFinite(e)&&Number.isFinite(e)[Symbol.for("!")]?Number.isFinite(e)[Symbol.for("!")]():!Number.isFinite(e))())return e;if(0===e)return e;if(1===e)return D;t=(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)()?0:(()=>void 0!==Math.log(e)&&null!==Math.log(e)&&Math.log(e)[Symbol.for("-")]?Math.log(e)[Symbol.for("-")](Math.log(Math.log(e))):Math.log(e)-Math.log(Math.log(e)))();for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](100):n<100)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(l=(()=>e*Math.exp(-t)+t*t!==void 0&&e*Math.exp(-t)+t*t!==null&&(e*Math.exp(-t)+t*t)[Symbol.for("/")]?(e*Math.exp(-t)+t*t)[Symbol.for("/")](t+1):(e*Math.exp(-t)+t*t)/(t+1))(),(()=>void 0!==Math.abs(l-t)&&null!==Math.abs(l-t)&&Math.abs(l-t)[Symbol.for("<")]?Math.abs(l-t)[Symbol.for("<")](o*Math.abs(l)):Math.abs(l-t)<o*Math.abs(l))())return l;t=l}throw Error(`Iteration failed to converge: ${e.toString()}`)};function O(e,o=1e-10){let t,l,n,r;if((()=>void 0!==Number.isFinite(e.mag)&&null!==Number.isFinite(e.mag)&&Number.isFinite(e.mag)[Symbol.for("!")]?Number.isFinite(e.mag)[Symbol.for("!")]():!Number.isFinite(e.mag))())return e;if(e===_.dZero)return e;if(e===_.dOne)return B(D);_.abs(e);t=_.ln(e);for(let i=0;(()=>void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](100):i<100)();(()=>void 0!==i&&null!==i&&"object"===typeof i&&i[Symbol.for("prefix-increment")]?i[Symbol.for("prefix-increment")]():++i)()){if(l=_.exp((()=>void 0!==t&&null!==t&&t[Symbol.for("minus")]?t[Symbol.for("minus")]():-t)()),n=t.sub(e.mul(l)),r=t.sub(n.div(t.add(1).sub(t.add(2).mul(n).div(_.mul(2,t).add(2))))),_.abs(r.sub(t)).lt(_.abs(r).mul(o)))return r;t=r}throw Error(`Iteration failed to converge: ${e.toString()}`)}r=Symbol.for("+"),i=Symbol.for("-"),a=Symbol.for("*"),s=Symbol.for("/"),u=Symbol.for("minus"),m=Symbol.for("=="),c=Symbol.for(">"),f=Symbol.for("<"),d=Symbol.for(">="),y=Symbol.for("<="),b=Symbol.for("!=");class _{constructor(e){(0,n.Z)(this,"sign",Number.NaN),(0,n.Z)(this,"mag",Number.NaN),(0,n.Z)(this,"layer",Number.NaN),e instanceof _||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(0===this.sign)return 0;if(0===this.layer){const e=Math.floor(Math.log10(this.mag));let o;return o=5e-324===this.mag?5:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("/")]?this.mag[Symbol.for("/")](M(e)):this.mag/M(e))(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o):this.sign*o)()}if(1===this.layer){const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](Math.floor(this.mag)):this.mag-Math.floor(this.mag))();return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,e)):this.sign*Math.pow(10,e))()}return this.sign}set m(e){(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](2):this.layer<=2)()?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent))}get e(){return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor((()=>void 0!==Math.sign(this.mag)&&null!==Math.sign(this.mag)&&Math.sign(this.mag)[Symbol.for("*")]?Math.sign(this.mag)[Symbol.for("*")](Math.pow(10,Math.abs(this.mag))):Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag)))()):(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("*")]?this.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):this.mag*Number.POSITIVE_INFINITY)()}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,o,t){return(new _).fromComponents(e,o,t)}static fromComponents_noNormalize(e,o,t){return(new _).fromComponents_noNormalize(e,o,t)}static fromMantissaExponent(e,o){return(new _).fromMantissaExponent(e,o)}static fromMantissaExponent_noNormalize(e,o){return(new _).fromMantissaExponent_noNormalize(e,o)}static fromDecimal(e){return(new _).fromDecimal(e)}static fromNumber(e){return(new _).fromNumber(e)}static fromString(e){return(new _).fromString(e)}static fromValue(e){return(new _).fromValue(e)}static fromValue_noAlloc(e){return e instanceof _?e:new _(e)}static abs(e){return B(e).abs()}static neg(e){return B(e).neg()}static negate(e){return B(e).neg()}static negated(e){return B(e).neg()}static sign(e){return B(e).sign}static sgn(e){return B(e).sign}static round(e){return B(e).round()}static floor(e){return B(e).floor()}static ceil(e){return B(e).ceil()}static trunc(e){return B(e).trunc()}static add(e,o){return B(e).add(o)}static plus(e,o){return B(e).add(o)}static sub(e,o){return B(e).sub(o)}static subtract(e,o){return B(e).sub(o)}static minus(e,o){return B(e).sub(o)}static mul(e,o){return B(e).mul(o)}static multiply(e,o){return B(e).mul(o)}static times(e,o){return B(e).mul(o)}static div(e,o){return B(e).div(o)}static divide(e,o){return B(e).div(o)}static recip(e){return B(e).recip()}static reciprocal(e){return B(e).recip()}static reciprocate(e){return B(e).reciprocate()}static cmp(e,o){return B(e).cmp(o)}static cmpabs(e,o){return B(e).cmpabs(o)}static compare(e,o){return B(e).cmp(o)}static isNaN(e){return e=B(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=B(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,o){return B(e).eq(o)}static equals(e,o){return B(e).eq(o)}static neq(e,o){return B(e).neq(o)}static notEquals(e,o){return B(e).notEquals(o)}static lt(e,o){return B(e).lt(o)}static lte(e,o){return B(e).lte(o)}static gt(e,o){return B(e).gt(o)}static gte(e,o){return B(e).gte(o)}static max(e,o){return B(e).max(o)}static min(e,o){return B(e).min(o)}static minabs(e,o){return B(e).minabs(o)}static maxabs(e,o){return B(e).maxabs(o)}static clamp(e,o,t){return B(e).clamp(o,t)}static clampMin(e,o){return B(e).clampMin(o)}static clampMax(e,o){return B(e).clampMax(o)}static cmp_tolerance(e,o,t){return B(e).cmp_tolerance(o,t)}static compare_tolerance(e,o,t){return B(e).cmp_tolerance(o,t)}static eq_tolerance(e,o,t){return B(e).eq_tolerance(o,t)}static equals_tolerance(e,o,t){return B(e).eq_tolerance(o,t)}static neq_tolerance(e,o,t){return B(e).neq_tolerance(o,t)}static notEquals_tolerance(e,o,t){return B(e).notEquals_tolerance(o,t)}static lt_tolerance(e,o,t){return B(e).lt_tolerance(o,t)}static lte_tolerance(e,o,t){return B(e).lte_tolerance(o,t)}static gt_tolerance(e,o,t){return B(e).gt_tolerance(o,t)}static gte_tolerance(e,o,t){return B(e).gte_tolerance(o,t)}static pLog10(e){return B(e).pLog10()}static absLog10(e){return B(e).absLog10()}static log10(e){return B(e).log10()}static log(e,o){return B(e).log(o)}static log2(e){return B(e).log2()}static ln(e){return B(e).ln()}static logarithm(e,o){return B(e).logarithm(o)}static pow(e,o){return B(e).pow(o)}static pow10(e){return B(e).pow10()}static root(e,o){return B(e).root(o)}static factorial(e,o){return B(e).factorial()}static gamma(e,o){return B(e).gamma()}static lngamma(e,o){return B(e).lngamma()}static exp(e){return B(e).exp()}static sqr(e){return B(e).sqr()}static sqrt(e){return B(e).sqrt()}static cube(e){return B(e).cube()}static cbrt(e){return B(e).cbrt()}static tetrate(e,o=2,t=E(1,0,1)){return B(e).tetrate(o,t)}static iteratedexp(e,o=2,t=E(1,0,1)){return B(e).iteratedexp(o,t)}static iteratedlog(e,o=10,t=1){return B(e).iteratedlog(o,t)}static layeradd10(e,o){return B(e).layeradd10(o)}static layeradd(e,o,t=10){return B(e).layeradd(o,t)}static slog(e,o=10){return B(e).slog(o)}static lambertw(e){return B(e).lambertw()}static ssqrt(e){return B(e).ssqrt()}static pentate(e,o=2,t=E(1,0,1)){return B(e).pentate(o,t)}static affordGeometricSeries(e,o,t,l){return this.affordGeometricSeries_core(B(e),B(o),B(t),l)}static sumGeometricSeries(e,o,t,l){return this.sumGeometricSeries_core(e,B(o),B(t),l)}static affordArithmeticSeries(e,o,t,l){return this.affordArithmeticSeries_core(B(e),B(o),B(t),B(l))}static sumArithmeticSeries(e,o,t,l){return this.sumArithmeticSeries_core(B(e),B(o),B(t),B(l))}static efficiencyOfPurchase(e,o,t){return this.efficiencyOfPurchase_core(B(e),B(o),B(t))}static randomDecimalForTesting(e){if((()=>20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1)())return E(0,0,0);const o=(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.5):Math.random()>.5)()?1:(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)();if((()=>20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1)())return E(o,0,1);const t=Math.floor((()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](e+1):Math.random()*(e+1))());let l=0===t?(()=>616*Math.random()!==void 0&&616*Math.random()!==null&&(616*Math.random())[Symbol.for("-")]?(616*Math.random())[Symbol.for("-")](308):616*Math.random()-308)():(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](16):16*Math.random())();(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(l=Math.trunc(l));let n=Math.pow(10,l);return(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(n=Math.trunc(n)),P(o,t,n)}static affordGeometricSeries_core(e,o,t,l){const n=o.mul(t.pow(l));return _.floor(e.div(n).mul(t.sub(1)).add(1).log10().div(t.log10()))}static sumGeometricSeries_core(e,o,t,l){return o.mul(t.pow(l)).mul(_.sub(1,t.pow(e))).div(_.sub(1,t))}static affordArithmeticSeries_core(e,o,t,l){const n=o.add(l.mul(t)),r=n.sub(t.div(2)),i=r.pow(2);return r.neg().add(i.add(t.mul(e).mul(2)).sqrt()).div(t).floor()}static sumArithmeticSeries_core(e,o,t,l){const n=o.add(l.mul(t));return e.div(2).mul(n.mul(2).plus(e.sub(1).mul(t)))}static efficiencyOfPurchase_core(e,o,t){return e.div(o).add(e.div(t))}[r](e){return this.add(e)}[i](e){return this.sub(e)}[a](e){return this.times(e)}[s](e){return this.div(e)}[u](){return this.neg()}[m](e){return this.eq(e)}[c](e){return this.gt(e)}[f](e){return this.lt(e)}[d](e){return this.gte(e)}[y](e){return this.lte(e)}[b](e){return this.neq(e)}normalize(){if(0===this.sign||0===this.mag&&0===this.layer)return this.sign=0,this.mag=0,this.layer=0,this;if(0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()&&(this.mag=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)(),this.sign=(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)()),0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](v):this.mag<v)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),o=Math.sign(this.mag);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](p):e>=p)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.log10(e)):o*Math.log10(e))(),this;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](g):e<g)()&&(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)())this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),0===this.layer?this.mag=Math.pow(10,this.mag):(this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.pow(10,e)):o*Math.pow(10,e))(),e=Math.abs(this.mag),o=Math.sign(this.mag));return 0===this.layer&&((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?(this.mag=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)(),this.sign=(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)()):0===this.mag&&(this.sign=0)),this}fromComponents(e,o,t){return this.sign=e,this.layer=o,this.mag=t,this.normalize(),this}fromComponents_noNormalize(e,o,t){return this.sign=e,this.layer=o,this.mag=t,this}fromMantissaExponent(e,o){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](Math.log10(e)):o+Math.log10(e))(),this.normalize(),this}fromMantissaExponent_noNormalize(e,o){return this.fromMantissaExponent(e,o),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){V?e=e.replace(",",""):x&&(e=e.replace(",","."));const o=e.split("^^^");if(2===o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";");let n=1;if(2===l.length&&(n=parseFloat(l[1]),(()=>void 0!==isFinite(n)&&null!==isFinite(n)&&isFinite(n)[Symbol.for("!")]?isFinite(n)[Symbol.for("!")]():!isFinite(n))()&&(n=1)),isFinite(e)&&isFinite(t)){const o=_.pentate(e,t,n);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const t=e.split("^^");if(2===t.length){const e=parseFloat(t[0]),o=parseFloat(t[1]),l=t[1].split(";");let n=1;if(2===l.length&&(n=parseFloat(l[1]),(()=>void 0!==isFinite(n)&&null!==isFinite(n)&&isFinite(n)[Symbol.for("!")]?isFinite(n)[Symbol.for("!")]():!isFinite(n))()&&(n=1)),isFinite(e)&&isFinite(o)){const t=_.tetrate(e,o,n);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}const l=e.split("^");if(2===l.length){const e=parseFloat(l[0]),o=parseFloat(l[1]);if(isFinite(e)&&isFinite(o)){const t=_.pow(e,o);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}let n,r;e=e.trim().toLowerCase();let i=e.split("pt");if(2===i.length){n=10,r=parseFloat(i[0]),i[1]=i[1].replace("(",""),i[1]=i[1].replace(")","");let e=parseFloat(i[1]);if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))()&&(e=1),isFinite(n)&&isFinite(r)){const o=_.tetrate(n,r,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}if(i=e.split("p"),2===i.length){n=10,r=parseFloat(i[0]),i[1]=i[1].replace("(",""),i[1]=i[1].replace(")","");let e=parseFloat(i[1]);if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))()&&(e=1),isFinite(n)&&isFinite(r)){const o=_.tetrate(n,r,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const a=e.split("e"),s=(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](1):a.length-1)();if(0===s){const o=parseFloat(e);if(isFinite(o))return this.fromNumber(o)}else if(1===s){const o=parseFloat(e);if(isFinite(o)&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](0):0!==o)())return this.fromNumber(o)}const u=e.split("e^");if(2===u.length){this.sign=1,(()=>void 0!==u[0].charAt(0)&&null!==u[0].charAt(0)&&u[0].charAt(0)[Symbol.for("==")]?u[0].charAt(0)[Symbol.for("==")]("-"):"-"==u[0].charAt(0))()&&(this.sign=(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());let e="";for(let o=0;(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](u[1].length):o<u[1].length)();(()=>void 0!==o&&null!==o&&"object"===typeof o&&o[Symbol.for("prefix-increment")]?o[Symbol.for("prefix-increment")]():++o)()){const t=u[1].charCodeAt(o);if(!((()=>void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](43):t>=43)()&&(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")](57):t<=57)()||101===t))return this.layer=parseFloat(e),this.mag=parseFloat(u[1].substr((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)())),this.normalize(),this;e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](u[1].charAt(o)):e+u[1].charAt(o))()}}if((()=>void 0!==s&&null!==s&&s[Symbol.for("<")]?s[Symbol.for("<")](1):s<1)())return this.sign=0,this.layer=0,this.mag=0,this;const m=parseFloat(a[0]);if(0===m)return this.sign=0,this.layer=0,this.mag=0,this;let c=parseFloat(a[(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](1):a.length-1)()]);if((()=>void 0!==s&&null!==s&&s[Symbol.for(">=")]?s[Symbol.for(">=")](2):s>=2)()){const e=parseFloat(a[(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](2):a.length-2)()]);isFinite(e)&&(c=(()=>void 0!==c&&null!==c&&c[Symbol.for("*")]?c[Symbol.for("*")](Math.sign(e)):c*Math.sign(e))(),c=(()=>void 0!==c&&null!==c&&c[Symbol.for("+")]?c[Symbol.for("+")](F(e)):c+F(e))())}if((()=>void 0!==isFinite(m)&&null!==isFinite(m)&&isFinite(m)[Symbol.for("!")]?isFinite(m)[Symbol.for("!")]():!isFinite(m))())this.sign="-"===a[0]?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():1,this.layer=s,this.mag=c;else if(1===s)this.sign=Math.sign(m),this.layer=1,this.mag=(()=>void 0!==c&&null!==c&&c[Symbol.for("+")]?c[Symbol.for("+")](Math.log10(Math.abs(m))):c+Math.log10(Math.abs(m)))();else{if(this.sign=Math.sign(m),this.layer=s,2===s){const e=_.mul(P(1,2,c),B(m));return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}this.mag=c}return this.normalize(),this}fromValue(e){return e instanceof _||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return(()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()?Number.NaN:0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)():1===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,this.mag)):this.sign*Math.pow(10,this.mag))():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](0):this.sign>0)()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:0===this.m?0:T(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:T(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?1===this.sign?"Infinity":"-Infinity":0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toString():(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():1===this.layer?(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](k):this.layer<=k)()?(()=>(-1===this.sign?"-":"")+"e".repeat(this.layer)!==void 0&&(-1===this.sign?"-":"")+"e".repeat(this.layer)!==null&&((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")]?((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")](this.mag):(-1===this.sign?"-":"")+"e".repeat(this.layer)+this.mag)():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](this.mag):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+this.mag)()}toExponential(e){return 0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return 0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return(()=>void 0!==this.e&&null!==this.e&&this.e[Symbol.for("<=")]?this.e[Symbol.for("<=")](-7):this.e<=-7)()?this.toExponential((()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)()):(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](this.e):e>this.e)()?this.toFixed((()=>e-this.exponent!==void 0&&e-this.exponent!==null&&(e-this.exponent)[Symbol.for("-")]?(e-this.exponent)[Symbol.for("-")](1):e-this.exponent-1)()):this.toExponential((()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)())}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return 0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toFixed(e):(()=>T(this.m,e)+"e"!==void 0&&T(this.m,e)+"e"!==null&&(T(this.m,e)+"e")[Symbol.for("+")]?(T(this.m,e)+"e")[Symbol.for("+")](T(this.e,e)):T(this.m,e)+"e"+T(this.e,e))():1===this.layer?(()=>T(this.m,e)+"e"!==void 0&&T(this.m,e)+"e"!==null&&(T(this.m,e)+"e")[Symbol.for("+")]?(T(this.m,e)+"e")[Symbol.for("+")](T(this.e,e)):T(this.m,e)+"e"+T(this.e,e))():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](k):this.layer<=k)()?(()=>(-1===this.sign?"-":"")+"e".repeat(this.layer)!==void 0&&(-1===this.sign?"-":"")+"e".repeat(this.layer)!==null&&((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")]?((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")](T(this.mag,e)):(-1===this.sign?"-":"")+"e".repeat(this.layer)+T(this.mag,e))():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](T(this.mag,e)):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+T(this.mag,e))()}abs(){return E(0===this.sign?0:1,this.layer,this.mag)}neg(){return E((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)(),this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.round(this.mag)):this}floor(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.floor(this.mag)):this}ceil(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.ceil(this.mag)):this}trunc(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.trunc(this.mag)):this}add(e){const o=B(e);if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))())return this;if((()=>void 0!==Number.isFinite(o.layer)&&null!==Number.isFinite(o.layer)&&Number.isFinite(o.layer)[Symbol.for("!")]?Number.isFinite(o.layer)[Symbol.for("!")]():!Number.isFinite(o.layer))())return o;if(0===this.sign)return o;if(0===o.sign)return this;if(this.sign===(()=>void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("minus")]?o.sign[Symbol.for("minus")]():-o.sign)()&&this.layer===o.layer&&this.mag===o.mag)return E(0,0,0);let t,l;if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](2):this.layer>=2)()||(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](2):o.layer>=2)())return this.maxabs(o);if((()=>void 0!==_.cmpabs(this,o)&&null!==_.cmpabs(this,o)&&_.cmpabs(this,o)[Symbol.for(">")]?_.cmpabs(this,o)[Symbol.for(">")](0):_.cmpabs(this,o)>0)()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return B((()=>t.sign*t.mag!==void 0&&t.sign*t.mag!==null&&(t.sign*t.mag)[Symbol.for("+")]?(t.sign*t.mag)[Symbol.for("+")](l.sign*l.mag):t.sign*t.mag+l.sign*l.mag)());const n=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("*")]?t.layer[Symbol.for("*")](Math.sign(t.mag)):t.layer*Math.sign(t.mag))(),r=(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("*")]?l.layer[Symbol.for("*")](Math.sign(l.mag)):l.layer*Math.sign(l.mag))();if((()=>n-r!==void 0&&n-r!==null&&(n-r)[Symbol.for(">=")]?(n-r)[Symbol.for(">=")](2):n-r>=2)())return t;if(0===n&&r===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()){if((()=>void 0!==Math.abs(l.mag-Math.log10(t.mag))&&null!==Math.abs(l.mag-Math.log10(t.mag))&&Math.abs(l.mag-Math.log10(t.mag))[Symbol.for(">")]?Math.abs(l.mag-Math.log10(t.mag))[Symbol.for(">")](h):Math.abs(l.mag-Math.log10(t.mag))>h)())return t;{const e=Math.pow(10,(()=>void 0!==Math.log10(t.mag)&&null!==Math.log10(t.mag)&&Math.log10(t.mag)[Symbol.for("-")]?Math.log10(t.mag)[Symbol.for("-")](l.mag):Math.log10(t.mag)-l.mag)()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return P(Math.sign(o),1,(()=>void 0!==l.mag&&null!==l.mag&&l.mag[Symbol.for("+")]?l.mag[Symbol.for("+")](Math.log10(Math.abs(o))):l.mag+Math.log10(Math.abs(o)))())}}if(1===n&&0===r){if((()=>void 0!==Math.abs(t.mag-Math.log10(l.mag))&&null!==Math.abs(t.mag-Math.log10(l.mag))&&Math.abs(t.mag-Math.log10(l.mag))[Symbol.for(">")]?Math.abs(t.mag-Math.log10(l.mag))[Symbol.for(">")](h):Math.abs(t.mag-Math.log10(l.mag))>h)())return t;{const e=Math.pow(10,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("-")]?t.mag[Symbol.for("-")](Math.log10(l.mag)):t.mag-Math.log10(l.mag))()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return P(Math.sign(o),1,(()=>void 0!==Math.log10(l.mag)&&null!==Math.log10(l.mag)&&Math.log10(l.mag)[Symbol.for("+")]?Math.log10(l.mag)[Symbol.for("+")](Math.log10(Math.abs(o))):Math.log10(l.mag)+Math.log10(Math.abs(o)))())}}if((()=>void 0!==Math.abs(t.mag-l.mag)&&null!==Math.abs(t.mag-l.mag)&&Math.abs(t.mag-l.mag)[Symbol.for(">")]?Math.abs(t.mag-l.mag)[Symbol.for(">")](h):Math.abs(t.mag-l.mag)>h)())return t;{const e=Math.pow(10,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("-")]?t.mag[Symbol.for("-")](l.mag):t.mag-l.mag)()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return P(Math.sign(o),1,(()=>void 0!==l.mag&&null!==l.mag&&l.mag[Symbol.for("+")]?l.mag[Symbol.for("+")](Math.log10(Math.abs(o))):l.mag+Math.log10(Math.abs(o)))())}}plus(e){return this.add(e)}sub(e){return this.add(B(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const o=B(e);if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))())return this;if((()=>void 0!==Number.isFinite(o.layer)&&null!==Number.isFinite(o.layer)&&Number.isFinite(o.layer)[Symbol.for("!")]?Number.isFinite(o.layer)[Symbol.for("!")]():!Number.isFinite(o.layer))())return o;if(0===this.sign||0===o.sign)return E(0,0,0);if(this.layer===o.layer&&this.mag===(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag)())return E((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o.sign):this.sign*o.sign)(),0,1);let t,l;if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](o.layer):this.layer>o.layer)()||(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("==")]?this.layer[Symbol.for("==")](o.layer):this.layer==o.layer)()&&(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for(">")]?Math.abs(this.mag)[Symbol.for(">")](Math.abs(o.mag)):Math.abs(this.mag)>Math.abs(o.mag))()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return B((()=>t.sign*l.sign*t.mag!==void 0&&t.sign*l.sign*t.mag!==null&&(t.sign*l.sign*t.mag)[Symbol.for("*")]?(t.sign*l.sign*t.mag)[Symbol.for("*")](l.mag):t.sign*l.sign*t.mag*l.mag)());if((()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for(">=")]?t.layer[Symbol.for(">=")](3):t.layer>=3)()||(()=>t.layer-l.layer!==void 0&&t.layer-l.layer!==null&&(t.layer-l.layer)[Symbol.for(">=")]?(t.layer-l.layer)[Symbol.for(">=")](2):t.layer-l.layer>=2)())return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),t.layer,t.mag);if(1===t.layer&&0===l.layer)return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),1,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("+")]?t.mag[Symbol.for("+")](Math.log10(l.mag)):t.mag+Math.log10(l.mag))());if(1===t.layer&&1===l.layer)return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),1,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("+")]?t.mag[Symbol.for("+")](l.mag):t.mag+l.mag)());if(2===t.layer&&1===l.layer){const e=P(Math.sign(t.mag),(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](1):t.layer-1)(),Math.abs(t.mag)).add(P(Math.sign(l.mag),(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](1):l.layer-1)(),Math.abs(l.mag)));return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)())}if(2===t.layer&&2===l.layer){const e=P(Math.sign(t.mag),(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](1):t.layer-1)(),Math.abs(t.mag)).add(P(Math.sign(l.mag),(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](1):l.layer-1)(),Math.abs(l.mag)));return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)())}throw Error((()=>"Bad arguments to mul: "+this+", "!==void 0&&"Bad arguments to mul: "+this+", "!==null&&("Bad arguments to mul: "+this+", ")[Symbol.for("+")]?("Bad arguments to mul: "+this+", ")[Symbol.for("+")](e):"Bad arguments to mul: "+this+", "+e)())}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const o=B(e);return this.mul(o.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return 0===this.mag?_.dNaN:0===this.layer?P(this.sign,0,(()=>1[Symbol.for("/")]?1[Symbol.for("/")](this.mag):1/this.mag)()):P(this.sign,this.layer,(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)())}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const o=B(e);return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](o.sign):this.sign>o.sign)()?1:(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<")]?this.sign[Symbol.for("<")](o.sign):this.sign<o.sign)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.cmpabs(e)):this.sign*this.cmpabs(e))()}cmpabs(e){const o=B(e),t=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?this.layer:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("minus")]?this.layer[Symbol.for("minus")]():-this.layer)(),l=(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">")]?o.mag[Symbol.for(">")](0):o.mag>0)()?o.layer:(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("minus")]?o.layer[Symbol.for("minus")]():-o.layer)();return(()=>void 0!==t&&null!==t&&t[Symbol.for(">")]?t[Symbol.for(">")](l):t>l)()?1:(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](l):t<l)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](o.mag):this.mag>o.mag)()?1:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](o.mag):this.mag<o.mag)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const o=B(e);return this.sign===o.sign&&this.layer===o.layer&&this.mag===o.mag}equals(e){return this.eq(e)}neq(e){return(()=>void 0!==this.eq(e)&&null!==this.eq(e)&&this.eq(e)[Symbol.for("!")]?this.eq(e)[Symbol.for("!")]():!this.eq(e))()}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()}lte(e){return(()=>void 0!==this.gt(e)&&null!==this.gt(e)&&this.gt(e)[Symbol.for("!")]?this.gt(e)[Symbol.for("!")]():!this.gt(e))()}gt(e){return 1===this.cmp(e)}gte(e){return(()=>void 0!==this.lt(e)&&null!==this.lt(e)&&this.lt(e)[Symbol.for("!")]?this.lt(e)[Symbol.for("!")]():!this.lt(e))()}max(e){const o=B(e);return this.lt(o)?o:this}min(e){const o=B(e);return this.gt(o)?o:this}maxabs(e){const o=B(e);return(()=>void 0!==this.cmpabs(o)&&null!==this.cmpabs(o)&&this.cmpabs(o)[Symbol.for("<")]?this.cmpabs(o)[Symbol.for("<")](0):this.cmpabs(o)<0)()?o:this}minabs(e){const o=B(e);return(()=>void 0!==this.cmpabs(o)&&null!==this.cmpabs(o)&&this.cmpabs(o)[Symbol.for(">")]?this.cmpabs(o)[Symbol.for(">")](0):this.cmpabs(o)>0)()?o:this}clamp(e,o){return this.max(e).min(o)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,o){const t=B(e);return this.eq_tolerance(t,o)?0:this.cmp(t)}compare_tolerance(e,o){return this.cmp_tolerance(e,o)}eq_tolerance(e,o){const t=B(e);if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=1e-7),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("!==")]?this.sign[Symbol.for("!==")](t.sign):this.sign!==t.sign)())return!1;if((()=>void 0!==Math.abs(this.layer-t.layer)&&null!==Math.abs(this.layer-t.layer)&&Math.abs(this.layer-t.layer)[Symbol.for(">")]?Math.abs(this.layer-t.layer)[Symbol.for(">")](1):Math.abs(this.layer-t.layer)>1)())return!1;let l=this.mag,n=t.mag;return(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](t.layer):this.layer>t.layer)()&&(n=F(n)),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<")]?this.layer[Symbol.for("<")](t.layer):this.layer<t.layer)()&&(l=F(l)),(()=>void 0!==Math.abs(l-n)&&null!==Math.abs(l-n)&&Math.abs(l-n)[Symbol.for("<=")]?Math.abs(l-n)[Symbol.for("<=")](o*Math.max(Math.abs(l),Math.abs(n))):Math.abs(l-n)<=o*Math.max(Math.abs(l),Math.abs(n)))()}equals_tolerance(e,o){return this.eq_tolerance(e,o)}neq_tolerance(e,o){return(()=>void 0!==this.eq_tolerance(e,o)&&null!==this.eq_tolerance(e,o)&&this.eq_tolerance(e,o)[Symbol.for("!")]?this.eq_tolerance(e,o)[Symbol.for("!")]():!this.eq_tolerance(e,o))()}notEquals_tolerance(e,o){return this.neq_tolerance(e,o)}lt_tolerance(e,o){const t=B(e);return(()=>void 0!==this.eq_tolerance(t,o)&&null!==this.eq_tolerance(t,o)&&this.eq_tolerance(t,o)[Symbol.for("!")]?this.eq_tolerance(t,o)[Symbol.for("!")]():!this.eq_tolerance(t,o))()&&this.lt(t)}lte_tolerance(e,o){const t=B(e);return this.eq_tolerance(t,o)||this.lt(t)}gt_tolerance(e,o){const t=B(e);return(()=>void 0!==this.eq_tolerance(t,o)&&null!==this.eq_tolerance(t,o)&&this.eq_tolerance(t,o)[Symbol.for("!")]?this.eq_tolerance(t,o)[Symbol.for("!")]():!this.eq_tolerance(t,o))()&&this.gt(t)}gte_tolerance(e,o){const t=B(e);return this.eq_tolerance(t,o)||this.gt(t)}pLog10(){return this.lt(_.dZero)?_.dZero:this.log10()}absLog10(){return 0===this.sign?_.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag)):P(1,0,Math.log10(this.mag))}log10(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?_.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag)):P(this.sign,0,Math.log10(this.mag))}log(e){return e=B(e),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()||(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<=")]?e.sign[Symbol.for("<=")](0):e.sign<=0)()||1===e.sign&&0===e.layer&&1===e.mag?_.dNaN:0===this.layer&&0===e.layer?P(this.sign,0,(()=>void 0!==Math.log(this.mag)&&null!==Math.log(this.mag)&&Math.log(this.mag)[Symbol.for("/")]?Math.log(this.mag)[Symbol.for("/")](Math.log(e.mag)):Math.log(this.mag)/Math.log(e.mag))()):_.div(this.log10(),e.log10())}log2(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?_.dNaN:0===this.layer?P(this.sign,0,Math.log2(this.mag)):1===this.layer?P(Math.sign(this.mag),0,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("*")]?Math.abs(this.mag)[Symbol.for("*")](3.321928094887362):3.321928094887362*Math.abs(this.mag))()):2===this.layer?P(Math.sign(this.mag),1,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("+")]?Math.abs(this.mag)[Symbol.for("+")](.5213902276543247):Math.abs(this.mag)+.5213902276543247)()):P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag))}ln(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?_.dNaN:0===this.layer?P(this.sign,0,Math.log(this.mag)):1===this.layer?P(Math.sign(this.mag),0,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("*")]?Math.abs(this.mag)[Symbol.for("*")](2.302585092994046):2.302585092994046*Math.abs(this.mag))()):2===this.layer?P(Math.sign(this.mag),1,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("+")]?Math.abs(this.mag)[Symbol.for("+")](.36221568869946325):Math.abs(this.mag)+.36221568869946325)()):P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const o=B(e),t=this,l=o;if(0===t.sign)return l.eq(0)?E(1,0,1):t;if(1===t.sign&&0===t.layer&&1===t.mag)return t;if(0===l.sign)return E(1,0,1);if(1===l.sign&&0===l.layer&&1===l.mag)return t;const n=t.absLog10().mul(l).pow10();return this.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()?1===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?n.neg():0===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?n:_.dNaN:n}pow10(){if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()||(()=>void 0!==Number.isFinite(this.mag)&&null!==Number.isFinite(this.mag)&&Number.isFinite(this.mag)[Symbol.for("!")]?Number.isFinite(this.mag)[Symbol.for("!")]():!Number.isFinite(this.mag))())return _.dNaN;let e=this;if(0===e.layer){const o=Math.pow(10,(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)());if(Number.isFinite(o)&&(()=>void 0!==Math.abs(o)&&null!==Math.abs(o)&&Math.abs(o)[Symbol.for(">=")]?Math.abs(o)[Symbol.for(">=")](.1):Math.abs(o)>=.1)())return P(1,0,o);if(0===e.sign)return _.dOne;e=E(e.sign,(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),Math.log10(e.mag))}return(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for(">")]?e.sign[Symbol.for(">")](0):e.sign>0)()&&(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">=")]?e.mag[Symbol.for(">=")](0):e.mag>=0)()?P(e.sign,(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),e.mag):(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)()&&(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">=")]?e.mag[Symbol.for(">=")](0):e.mag>=0)()?P((()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag)()):_.dOne}pow_base(e){return B(e).pow(this)}root(e){const o=B(e);return this.pow(o.recip())}factorial(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||0===this.layer?this.add(1).gamma():1===this.layer?_.exp(_.mul(this,_.ln(this).sub(1))):_.exp(this)}gamma(){if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return this.recip();if(0===this.layer){if(this.lt(E(1,0,24)))return B(I((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](1):this.mag-1)();let o=.9189385332046727;o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e))(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e)();const t=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let l=e,n=(()=>12[Symbol.for("*")]?12[Symbol.for("*")](l):12*l)(),r=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)(),i=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](r):o+r)();if(i===o)return _.exp(o);if(o=i,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),n=(()=>360[Symbol.for("*")]?360[Symbol.for("*")](l):360*l)(),r=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)(),i=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](r):o-r)(),i===o)return _.exp(o);o=i,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),n=(()=>1260[Symbol.for("*")]?1260[Symbol.for("*")](l):1260*l)();let a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)();return o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](a):o+a)(),l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),n=(()=>1680[Symbol.for("*")]?1680[Symbol.for("*")](l):1680*l)(),a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](a):o-a)(),_.exp(o)}return 1===this.layer?_.exp(_.mul(this,_.ln(this).sub(1))):_.exp(this)}lngamma(){return this.gamma().ln()}exp(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dOne:0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<=")]?this.mag[Symbol.for("<=")](709.7):this.mag<=709.7)()?B(Math.exp((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):0===this.layer?P(1,1,(()=>this.sign*Math.log10(Math.E)!==void 0&&this.sign*Math.log10(Math.E)!==null&&(this.sign*Math.log10(Math.E))[Symbol.for("*")]?(this.sign*Math.log10(Math.E))[Symbol.for("*")](this.mag):this.sign*Math.log10(Math.E)*this.mag)()):1===this.layer?P(1,2,(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.log10(.4342944819032518)+this.mag):this.sign*(Math.log10(.4342944819032518)+this.mag))()):P(1,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())}sqr(){return this.pow(2)}sqrt(){if(0===this.layer)return B(Math.sqrt((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));if(1===this.layer)return P(1,2,(()=>void 0!==Math.log10(this.mag)&&null!==Math.log10(this.mag)&&Math.log10(this.mag)[Symbol.for("-")]?Math.log10(this.mag)[Symbol.for("-")](.3010299956639812):Math.log10(this.mag)-.3010299956639812)());{const e=_.div(E(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag),E(1,0,2));return e.layer=(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](3):1/3)())}tetrate(e=2,o=E(1,0,1)){if(1===e)return _.pow(this,o);if(0===e)return new _(o);if(this.eq(_.dOne))return _.dOne;if(this.eq((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))return _.pow(this,o);if(e===Number.POSITIVE_INFINITY){const e=this.toNumber();if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](1.444667861009766):e<=1.444667861009766)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](.06598803584531254):e>=.06598803584531254)()){if((()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009099):e>1.444667861009099)())return new _(Math.E);const o=_.ln(this).neg();return o.lambertw().div(o)}return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009766):e>1.444667861009766)()?new _(Number.POSITIVE_INFINITY):_.dNaN}if(this.eq(_.dZero)){let o=Math.abs((()=>e+1!==void 0&&e+1!==null&&(e+1)[Symbol.for("%")]?(e+1)[Symbol.for("%")](2):(e+1)%2)());return(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](1):o>1)()&&(o=(()=>2[Symbol.for("-")]?2[Symbol.for("-")](o):2-o)()),new _(o)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](0):e<0)())return _.iteratedlog(o,this,(()=>void 0!==e&&null!==e&&e[Symbol.for("minus")]?e[Symbol.for("minus")]():-e)());o=B(o);const t=e;e=Math.trunc(e);const l=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();if(this.gt(_.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let t=0;(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](e):t<e)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("prefix-increment")]?t[Symbol.for("prefix-increment")]():++t)()){const e=o;if(o=this.pow(o),e.eq(o))return o}if((()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](0):0!=l)()){const e=this.pow(o);return o.mul((()=>1[Symbol.for("-")]?1[Symbol.for("-")](l):1-l)()).add(e.mul(l))}return o}(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(_.dOne)?this.gt(10)?o=this.pow(l):(o=B(_.tetrate_critical(this.toNumber(),l)),this.lt(2)&&(o=o.sub(1).mul(this.minus(1)).plus(1))):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](e):n<e)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(o=this.pow(o),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>o.layer-this.layer!==void 0&&o.layer-this.layer!==null&&(o.layer-this.layer)[Symbol.for(">")]?(o.layer-this.layer)[Symbol.for(">")](3):o.layer-this.layer>3)())return E(o.sign,(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](e-n-1):o.layer+(e-n-1))(),o.mag);if((()=>void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](1e4):n>1e4)())return o}return o}iteratedexp(e=2,o=E(1,0,1)){return this.tetrate(e,o)}iteratedlog(e=10,o=1){if((()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)())return _.tetrate(e,(()=>void 0!==o&&null!==o&&o[Symbol.for("minus")]?o[Symbol.for("minus")]():-o)(),this);e=B(e);let t=B(this);const l=o;o=Math.trunc(o);const n=(()=>void 0!==l&&null!==l&&l[Symbol.for("-")]?l[Symbol.for("-")](o):l-o)();if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=Math.min(o,(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](l):o-l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](o):r<o)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(t=t.log(e),(()=>void 0!==isFinite(t.layer)&&null!==isFinite(t.layer)&&isFinite(t.layer)[Symbol.for("!")]?isFinite(t.layer)[Symbol.for("!")]():!isFinite(t.layer))()||(()=>void 0!==isFinite(t.mag)&&null!==isFinite(t.mag)&&isFinite(t.mag)[Symbol.for("!")]?isFinite(t.mag)[Symbol.for("!")]():!isFinite(t.mag))())return t.normalize();if((()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](1e4):r>1e4)())return t}return(()=>void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](0):n>0)()&&(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](1):n<1)()&&(t=e.eq(10)?t.layeradd10((()=>void 0!==n&&null!==n&&n[Symbol.for("minus")]?n[Symbol.for("minus")]():-n)()):t.layeradd((()=>void 0!==n&&null!==n&&n[Symbol.for("minus")]?n[Symbol.for("minus")]():-n)(),e)),t}slog(e=10){if(e=B(e),e.lte(_.dZero))return _.dNaN;if(e.eq(_.dOne))return _.dNaN;if(e.lt(_.dOne))return this.eq(_.dOne)?_.dZero:this.eq(_.dZero)?_.dNegOne:_.dNaN;if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||this.eq(_.dZero))return _.dNegOne;let o=0,t=B(this);if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)();o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](l):o+l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let l=0;(()=>void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100)();(()=>void 0!==l&&null!==l&&"object"===typeof l&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l)())if(t.lt(_.dZero))t=_.pow(e,t),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)();else{if(t.lte(_.dOne))return B((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](_.slog_critical(e.toNumber(),t.toNumber())):o+_.slog_critical(e.toNumber(),t.toNumber()))());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),t=_.log(t,e)}return B(o)}static slog_critical(e,o){return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()?(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)():_.critical_section(e,o,Z)}static tetrate_critical(e,o){return _.critical_section(e,o,w)}static critical_section(e,o,t){o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](10):10*o)(),(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)()&&(o=0),(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](10):o>10)()&&(o=10),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](2):e<2)()&&(e=2),(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()&&(e=10);let l=0,n=0;for(let a=0;(()=>void 0!==a&&null!==a&&a[Symbol.for("<")]?a[Symbol.for("<")](C.length):a<C.length)();(()=>void 0!==a&&null!==a&&"object"===typeof a&&a[Symbol.for("prefix-increment")]?a[Symbol.for("prefix-increment")]():++a)()){if((()=>void 0!==C[a]&&null!==C[a]&&C[a][Symbol.for("==")]?C[a][Symbol.for("==")](e):C[a]==e)()){l=t[a][Math.floor(o)],n=t[a][Math.ceil(o)];break}if((()=>void 0!==C[a]&&null!==C[a]&&C[a][Symbol.for("<")]?C[a][Symbol.for("<")](e):C[a]<e)()&&(()=>void 0!==C[a+1]&&null!==C[a+1]&&C[a+1][Symbol.for(">")]?C[a+1][Symbol.for(">")](e):C[a+1]>e)()){const r=(()=>e-C[a]!==void 0&&e-C[a]!==null&&(e-C[a])[Symbol.for("/")]?(e-C[a])[Symbol.for("/")](C[a+1]-C[a]):(e-C[a])/(C[a+1]-C[a]))();l=(()=>t[a][Math.floor(o)]*(1-r)!==void 0&&t[a][Math.floor(o)]*(1-r)!==null&&(t[a][Math.floor(o)]*(1-r))[Symbol.for("+")]?(t[a][Math.floor(o)]*(1-r))[Symbol.for("+")](t[a+1][Math.floor(o)]*r):t[a][Math.floor(o)]*(1-r)+t[a+1][Math.floor(o)]*r)(),n=(()=>t[a][Math.ceil(o)]*(1-r)!==void 0&&t[a][Math.ceil(o)]*(1-r)!==null&&(t[a][Math.ceil(o)]*(1-r))[Symbol.for("+")]?(t[a][Math.ceil(o)]*(1-r))[Symbol.for("+")](t[a+1][Math.ceil(o)]*r):t[a][Math.ceil(o)]*(1-r)+t[a+1][Math.ceil(o)]*r)();break}}const r=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](Math.floor(o)):o-Math.floor(o))(),i=(()=>l*(1-r)!==void 0&&l*(1-r)!==null&&(l*(1-r))[Symbol.for("+")]?(l*(1-r))[Symbol.for("+")](n*r):l*(1-r)+n*r)();return i}layeradd10(e){e=_.fromValue_noAlloc(e).toNumber();const o=B(this);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](1):e>=1)()){(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0)()&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](0):o.layer>0)()?(o.sign=0,o.mag=0,o.layer=0):o.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("==")]?o.layer[Symbol.for("==")](0):0==o.layer)()&&(o.sign=1,o.mag=(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag)());const t=Math.trunc(e);e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](t):e-t)(),o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t)()}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](-1):e<=-1)()){const t=Math.trunc(e);if(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](t):e-t)(),o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t)(),(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)())for(let e=0;(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](100):e<100)();(()=>void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e)()){if((()=>{void 0!==o.layer&&null!==o.layer&&"object"===typeof o.layer&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag),(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return 0===o.sign&&(o.sign=1),(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)()&&(o.layer=0),o.normalize();if((()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](0):o.layer>=0)())break}}while((()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)())(()=>{void 0!==o.layer&&null!==o.layer&&"object"===typeof o.layer&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag);return 0===o.sign&&(o.sign=1,0===o.mag&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](1):o.layer>=1)()&&(o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1)(),o.mag=1)),o.normalize(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](0):0!==e)()?o.layeradd(e,10):o}layeradd(e,o){const t=this.slog(o).toNumber(),l=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](e):t+e)();return(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](0):l>=0)()?_.tetrate(o,l):(()=>void 0!==Number.isFinite(l)&&null!==Number.isFinite(l)&&Number.isFinite(l)[Symbol.for("!")]?Number.isFinite(l)[Symbol.for("!")]():!Number.isFinite(l))()?_.dNaN:(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](-1):l>=-1)()?_.log(_.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](1):l+1)()),o):_.log(_.log(_.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](2):l+2)()),o),o)}lambertw(){if(this.lt((()=>.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499)()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return B(R(this.toNumber()));if(0===this.layer)return B(R((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));if(1===this.layer)return O(this);if(2===this.layer)return O(this);if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](3):this.layer>=3)())return E(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("==")]?this.sign[Symbol.for("==")](1):1==this.sign)()&&(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](3):this.layer>=3)())return E(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,o=E(1,0,1)){o=B(o);const t=e;e=Math.trunc(e);const l=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(_.dOne)?((()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})(),o=new _(l)):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](e):n<e)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(o=this.tetrate(o.toNumber()),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](10):n>10)())return o}return o}sin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.sin((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(0,0,0)}cos(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dOne:0===this.layer?B(Math.cos((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(0,0,0)}tan(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.tan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(0,0,0)}asin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.asin((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(Number.NaN,Number.NaN,Number.NaN)}acos(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?B(Math.acos(this.toNumber())):0===this.layer?B(Math.acos((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(Number.NaN,Number.NaN,Number.NaN)}atan(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.atan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(Math.atan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Infinity):Infinity*this.sign)()))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return _.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return _.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?E(Number.NaN,Number.NaN,Number.NaN):_.ln(this.add(1).div(B(1).sub(this))).div(2)}ascensionPenalty(e){return 0===e?this:this.root(_.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](1):this.cmp(e)<1)()}lessThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](0):this.cmp(e)<0)()}greaterThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](-1):this.cmp(e)>-1)()}greaterThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](0):this.cmp(e)>0)()}}(0,n.Z)(_,"dZero",E(0,0,0)),(0,n.Z)(_,"dOne",E(1,0,1)),(0,n.Z)(_,"dNegOne",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),0,1)),(0,n.Z)(_,"dTwo",E(1,0,2)),(0,n.Z)(_,"dTen",E(1,0,10)),(0,n.Z)(_,"dNaN",E(Number.NaN,Number.NaN,Number.NaN)),(0,n.Z)(_,"dInf",E(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,n.Z)(_,"dNegInf",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,n.Z)(_,"dNumberMax",P(1,0,Number.MAX_VALUE)),(0,n.Z)(_,"dNumberMin",P(1,0,Number.MIN_VALUE));var j=t(6453),A=_;const U=new _(1);function q(e,o,t=!0){let l=_.log10(e).floor(),n=_.div(e,_.pow(10,l));"10"===n.toStringWithDecimalPlaces(o)&&(n=U,l=l.add(1));const r=l.gte(1e9)?ee(l,Math.max(Math.max(o,3),j.defaultDecimalsShown)):l.gte(1e4)?z(l,0):l.toStringWithDecimalPlaces(0);return t?(()=>n.toStringWithDecimalPlaces(o)+"e"!==void 0&&n.toStringWithDecimalPlaces(o)+"e"!==null&&(n.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")]?(n.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")](r):n.toStringWithDecimalPlaces(o)+"e"+r)():(()=>"e"[Symbol.for("+")]?"e"[Symbol.for("+")](r):"e"+r)()}function z(e,o){if(null===e||void 0===e)return"NaN";if(e=new _(e),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.001):e.mag<.001)())return(0).toFixed(o);const t=e.toStringWithDecimalPlaces(o),l=t.split(".");return l[0]=l[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),(()=>void 0!==l.length&&null!==l.length&&l.length[Symbol.for("==")]?l.length[Symbol.for("==")](1):1==l.length)()?l[0]:(()=>l[0]+"."!==void 0&&l[0]+"."!==null&&(l[0]+".")[Symbol.for("+")]?(l[0]+".")[Symbol.for("+")](l[1]):l[0]+"."+l[1])()}function L(e,o){return null===e||void 0===e?"NaN":(e=new _(e),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e-4):e.mag<1e-4)()?(0).toFixed(o):((()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.1):e.mag<.1)()&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](0):0!==o)()&&(o=Math.max(Math.max(o,4),j.defaultDecimalsShown)),e.toStringWithDecimalPlaces(o)))}const G=new _("eeee1000"),W=new _("e100000"),H=new _("e1000"),$=new _(1e9),Y=new _(1e6),K=new _(1e3),J=new _(.98),Q=new _(.001),X=new _(0);function ee(e,o,t){if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=j.defaultDecimalsShown),t=t??j.defaultShowSmall,e=new _(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if((()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)())return(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](ee(e.neg(),o)):"-"+ee(e.neg(),o))();if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(G)){const o=e.slog();return o.gte(Y)?(()=>"F"[Symbol.for("+")]?"F"[Symbol.for("+")](ee(o.floor())):"F"+ee(o.floor()))():(()=>_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](z(o.floor(),0)):_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"+z(o.floor(),0))()}if(e.gte(W))return q(e,0,!1);if(e.gte(H))return q(e,0);if(e.gte($))return q(e,o);if(e.gte(K))return z(e,0);if(e.gte(Q)||(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)())return L(e,o);if(e.eq(X))return(0).toFixed(o);if(e=re(e),e.lt(H)){const t=q(e,o);return t.replace(/([^(?:e|F)]*)$/,"-$1")}return(()=>void 0!==ee(e,o)&&null!==ee(e,o)&&ee(e,o)[Symbol.for("+")]?ee(e,o)[Symbol.for("+")]("⁻¹"):ee(e,o)+"⁻¹")()}function oe(e){return e=new _(e),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)()?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](oe(e.neg())):"-"+oe(e.neg()))():e.gte($)||e.lte(J)&&(()=>void 0!==e.eq(X)&&null!==e.eq(X)&&e.eq(X)[Symbol.for("!")]?e.eq(X)[Symbol.for("!")]():!e.eq(X))()?ee(e):ee(e,0)}function te(e){return _.lt(e,0)?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](te(_.neg(e))):"-"+te(_.neg(e)))():_.gt(e,(()=>2[Symbol.for("**")]?2[Symbol.for("**")](51):2**51)())?(()=>void 0!==ee(_.div(e,31536e3))&&null!==ee(_.div(e,31536e3))&&ee(_.div(e,31536e3))[Symbol.for("+")]?ee(_.div(e,31536e3))[Symbol.for("+")]("y"):ee(_.div(e,31536e3))+"y")():(e=new _(e).toNumber(),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](60):e<60)()?(()=>void 0!==ee(e)&&null!==ee(e)&&ee(e)[Symbol.for("+")]?ee(e)[Symbol.for("+")]("s"):ee(e)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](3600):e<3600)()?(()=>oe(Math.floor(e/60))+"m "+ee(e%60)!==void 0&&oe(Math.floor(e/60))+"m "+ee(e%60)!==null&&(oe(Math.floor(e/60))+"m "+ee(e%60))[Symbol.for("+")]?(oe(Math.floor(e/60))+"m "+ee(e%60))[Symbol.for("+")]("s"):oe(Math.floor(e/60))+"m "+ee(e%60)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](86400):e<86400)()?(()=>oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60)!==void 0&&oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60)!==null&&(oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60))[Symbol.for("+")]?(oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60))[Symbol.for("+")]("s"):oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](31536e3):e<31536e3)()?(()=>oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60)!==void 0&&oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60)!==null&&(oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60))[Symbol.for("+")]?(oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60))[Symbol.for("+")]("m"):oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60)+"m")():(()=>oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)!==void 0&&oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)!==null&&(oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24))[Symbol.for("+")]?(oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24))[Symbol.for("+")]("h"):oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h")())}function le(e,o,t){e=new _(e);let l=e.toStringWithDecimalPlaces(o);return new _(l).gte(t)&&(l=_.sub(t,Math.pow(.1,o)).toStringWithDecimalPlaces(o)),l}function ne(e,o){return ee(e,o,!0)}function re(e){let o=_.log10(e).ceil();const t=_.div(e,_.pow(10,o));return o=o.neg(),e=new _(10).pow(o).times(t),e}const{exponentialFormat:ie,commaFormat:ae,regularFormat:se,format:ue,formatWhole:me,formatTime:ce,toPlaces:fe,formatSmall:de,invertOOM:ye}=l;window.Decimal=A,window.exponentialFormat=ie,window.commaFormat=ae,window.regularFormat=se,window.format=ue,window.formatWhole=me,window.formatTime=ce,window.toPlaces=fe,window.formatSmall=de,window.invertOOM=ye;var be=A},1349:function(e,o,t){"use strict";function l(e){let o=e.replace(/([A-Z])/g," $1");return o=(()=>void 0!==o.charAt(0).toUpperCase()&&null!==o.charAt(0).toUpperCase()&&o.charAt(0).toUpperCase()[Symbol.for("+")]?o.charAt(0).toUpperCase()[Symbol.for("+")](o.slice(1)):o.charAt(0).toUpperCase()+o.slice(1))(),o}function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){return"function"===typeof e}t.d(o,{IJ:function(){return l},PO:function(){return n},mf:function(){return r}})},9583:function(e,o,t){"use strict";t.d(o,{mM:function(){return r},yB:function(){return i},UI:function(){return a}});var l=t(4865),n=t(1349);const r=Symbol("DoNotCache");function i(e,o){const t=e[o];(0,n.mf)(t)&&0===t.length&&(()=>void 0!==t[r]&&null!==t[r]&&t[r][Symbol.for("!")]?t[r][Symbol.for("!")]():!t[r])()&&(e[o]=(0,l.computed)(t.bind(e)))}function a(e){return(0,n.mf)(e)&&(()=>void 0!==e[r]&&null!==e[r]&&e[r][Symbol.for("!")]?e[r][Symbol.for("!")]():!e[r])()&&(e=(0,l.computed)(e)),e}},3273:function(e,o,t){"use strict";t.d(o,{Le:function(){return l},c4:function(){return n},z2:function(){return r}});const l=Symbol("ProxyState"),n=Symbol("ProxyPath");function r(e,o={}){const t=o;let n=!1;function r(){return(()=>void 0!==n&&null!==n&&n[Symbol.for("!")]?n[Symbol.for("!")]():!n)()&&(Object.assign(t,e(t)),n=!0),t}return new Proxy(t,{get(e,o){return o===l?r():r()[o]},set(e,o,t){return r()[o]=t,!0},has(e,o){return o===l||Reflect.has(r(),o)},ownKeys(){return Reflect.ownKeys(r())},getOwnPropertyDescriptor(o,l){return(()=>void 0!==n&&null!==n&&n[Symbol.for("!")]?n[Symbol.for("!")]():!n)()&&(Object.assign(t,e(t)),n=!0),Object.getOwnPropertyDescriptor(o,l)}})}},463:function(e,o,t){"use strict";t.d(o,{a1:function(){return s},zD:function(){return u},xM:function(){return m},QI:function(){return c},uW:function(){return f},y6:function(){return d}});t(2801);var l=t(6453),n=t(5967),r=t(9266),i=t(3273);function a(e={}){return Object.assign({id:`${l.id}-0`,name:"Default Save",tabs:l.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:l.id,modVersion:l.versionNumber,layers:{}},e)}function s(){const e=btoa(unescape(encodeURIComponent((0,n.U)(n.Z[i.Le]))));return localStorage.setItem(n.Z.id,e),e}async function u(){(0,r.ri)();try{const e=localStorage.getItem(r.ZP.active);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void await f(m());const o=JSON.parse(decodeURIComponent(escape(atob(e))));if((()=>void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id)())return void await f(m());o.id=r.ZP.active,await f(o)}catch(e){console.error("Failed to load save. Falling back to new save.\n",e),await f(m())}}function m(){const e=c(),o=a({id:e});return localStorage.setItem(e,btoa(unescape(encodeURIComponent((0,n.U)(o))))),r.ZP.saves.push(e),o}function c(){let e,o=0;do{e=`${l.id}-${(()=>void 0!==o&&null!==o&&"object"===typeof o&&o[Symbol.for("postfix-increment")]?o[Symbol.for("postfix-increment")]():o++)()}`}while(localStorage.getItem(e));return e}async function f(e){console.info("Loading save",e);const{layers:o,removeLayer:i,addLayer:s}=await Promise.resolve().then(t.bind(t,9365)),{fixOldSave:u,getInitialLayers:m}=await Promise.resolve().then(t.bind(t,7573));for(const t in o)i(o[t]);m(e).forEach((o=>s(o,e))),e=a(e),e.offlineProd&&e.time&&((()=>void 0!==e.offlineTime&&null!==e.offlineTime&&e.offlineTime[Symbol.for("==")]?e.offlineTime[Symbol.for("==")](void 0):void 0==e.offlineTime)()&&(e.offlineTime=0),e.offlineTime=(()=>void 0!==e.offlineTime&&null!==e.offlineTime&&e.offlineTime[Symbol.for("+")]?e.offlineTime[Symbol.for("+")]((Date.now()-e.time)/1e3):e.offlineTime+(Date.now()-e.time)/1e3)()),e.time=Date.now(),(()=>void 0!==e.modVersion&&null!==e.modVersion&&e.modVersion[Symbol.for("!==")]?e.modVersion[Symbol.for("!==")](l.versionNumber):e.modVersion!==l.versionNumber)()&&u(e.modVersion,e),Object.assign(n.Z,e),r.ZP.active=n.Z.id}setInterval((()=>{n.Z.autosave&&s()}),1e3),window.onbeforeunload=()=>{n.Z.autosave&&s()},window.save=s;const d=window.hardReset=async()=>{await f(m())}},7573:function(e,o,t){"use strict";t.r(o),t.d(o,{fixOldSave:function(){return ul},getInitialLayers:function(){return al},hasWon:function(){return sl},main:function(){return il}});var l=t(4865);const n=e=>((0,l.pushScopeId)("data-v-07150322"),e=e(),(0,l.popScopeId)(),e),r=n((()=>(0,l.createElementVNode)("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[(0,l.createElementVNode)("g",{id:"P"},[(0,l.createElementVNode)("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),(0,l.createElementVNode)("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),(0,l.createElementVNode)("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),(0,l.createElementVNode)("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),(0,l.createElementVNode)("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),(0,l.createElementVNode)("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),(0,l.createElementVNode)("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));function i(e,o){return(0,l.openBlock)(),(0,l.createBlock)(l.Transition,{appear:""},{default:(0,l.withCtx)((()=>[r])),_:1})}var a=t(3744);const s={},u=(0,a.Z)(s,[["render",i],["__scopeId","data-v-07150322"]]);var m=u,c=(0,l.defineComponent)({props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{style:(0,l.normalizeStyle)({width:e.width,height:e.height})},null,4))}});const f=c;var d=f,y=t(6113),b=t(5613),h=t(7302),p=t(4061);function g(e,o="points",t=0,n){const r=(0,l.isRef)(e)?e:(0,p.ax)(e);return r.displayName=o,r.precision=t,r.small=n,r}function v(e){const o=(0,p.ax)(e.value);return(0,l.watch)(e,(e=>{b.ZP.gt(e,o.value)&&(o.value=e)})),o}function S(e){const o=(0,p.ax)(e.value);return(0,l.watch)(e,((e,t)=>{b.ZP.gt(e,t)&&(o.value=b.ZP.add(o.value,b.ZP.sub(e,t)))})),o}const N=new b.ZP("10^^8"),k=new b.ZP("1e100");function V(e,o){const t=(0,l.ref)(0),n=(0,l.ref)(0),r=(0,l.ref)(0);h.globalBus.on("update",(o=>{if(n.value=0,b.ZP.lte(e.value,k))return void(r.value=e.value);let l=e.value,i=r.value;if(r.value=l,b.ZP.gt(l,i))if(b.ZP.gte(l,N))l=b.ZP.slog(l,1e10),i=b.ZP.slog(i,1e10),t.value=l.sub(i).div(o),n.value=(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)();else while(b.ZP.div(l,i).log(10).div(o).gte("100")&&(()=>void 0!==n.value&&null!==n.value&&n.value[Symbol.for("<=")]?n.value[Symbol.for("<=")](5):n.value<=5)()&&b.ZP.gt(i,0))l=b.ZP.log10(l),i=b.ZP.log10(i),t.value=l.sub(i).div(o),(()=>{void 0!==n.value&&null!==n.value&&"object"===typeof n.value&&n.value[Symbol.for("postfix-increment")]?n.value[Symbol.for("postfix-increment")]():n.value++})()}));const i=(0,l.computed)((()=>0===n.value?o?(()=>(0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName!==void 0&&(0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName!==null&&((0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]?((0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]("/s"):(0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName+"/s")():"":(()=>(0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)!==void 0&&(0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)!==null&&((0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value))[Symbol.for("+")]?((0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value))[Symbol.for("+")]("s/sec"):(0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)+"s/sec")()));return i}function x(e,o){const t=o??e.value;return b.ZP.eq(e.precision,0)?(0,b.Ht)(t):(0,b.WU)(t,e.precision,e.small)}function M(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Links");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.nodesComp))),e.leftNodesComp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.leftNodesComp),{key:0})):(0,l.createCommentVNode)("",!0),e.rightNodesComp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.rightNodesComp),{key:1})):(0,l.createCommentVNode)("",!0),e.branches?((0,l.openBlock)(),(0,l.createBlock)(a,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,l.createCommentVNode)("",!0)],64)}var C=t(1604),w=t(9365);const Z=["x1","y1","x2","y2"];var B=(0,l.defineComponent)({props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,l.computed)((()=>{const e=t.startNode.value.rect,o=t.boundingRect.value,l=o?{x:(()=>e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](o.x):e.x+e.width/2-o.x)(),y:(()=>e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](o.y):e.y+e.height/2-o.y)()}:{x:0,y:0};return t.link.value.offsetStart&&(l.x=(()=>void 0!==l.x&&null!==l.x&&l.x[Symbol.for("+")]?l.x[Symbol.for("+")](t.link.value.offsetStart.x):l.x+t.link.value.offsetStart.x)(),l.y=(()=>void 0!==l.y&&null!==l.y&&l.y[Symbol.for("+")]?l.y[Symbol.for("+")](t.link.value.offsetStart.y):l.y+t.link.value.offsetStart.y)()),l})),r=(0,l.computed)((()=>{const e=t.endNode.value.rect,o=t.boundingRect.value,l=o?{x:(()=>e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](o.x):e.x+e.width/2-o.x)(),y:(()=>e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](o.y):e.y+e.height/2-o.y)()}:{x:0,y:0};return t.link.value.offsetEnd&&(l.x=(()=>void 0!==l.x&&null!==l.x&&l.x[Symbol.for("+")]?l.x[Symbol.for("+")](t.link.value.offsetEnd.x):l.x+t.link.value.offsetEnd.x)(),l.y=(()=>void 0!==l.y&&null!==l.y&&l.y[Symbol.for("+")]?l.y[Symbol.for("+")](t.link.value.offsetEnd.y):l.y+t.link.value.offsetEnd.y)()),l}));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("line",(0,l.mergeProps)({"stroke-width":"15px",stroke:"white"},e.link,{x1:(0,l.unref)(n).x,y1:(0,l.unref)(n).y,x2:(0,l.unref)(r).x,y2:(0,l.unref)(r).y}),null,16,Z))}});const P=B;var E=P,T=(0,l.defineComponent)({props:{links:null},setup(e){const o=e,t=(0,l.toRef)(o,"links"),n=new ResizeObserver(u),r=(0,l.inject)(w.NodesInjectionKey),i=(0,l.ref)(null);(0,l.onMounted)((()=>{const e=i.value;(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&n.observe(e)}));let a=!0,s=(0,l.ref)(i.value?.getBoundingClientRect());function u(){(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!=")]?i.value[Symbol.for("!=")](null):null!=i.value)()&&a&&(a=!1,(0,l.nextTick)((()=>{s.value=i.value?.getBoundingClientRect(),Object.values(r.value).forEach((e=>e.rect=e.element.getBoundingClientRect())),a=!0})))}document.fonts.ready.then(u);const m=(0,l.computed)((()=>{const e=r.value;return t.value?.filter((o=>e[o.startNode.id]?.rect&&e[o.startNode.id]?.rect))??[]}));return(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.unref)(m)?((0,l.openBlock)(),(0,l.createElementBlock)("svg",(0,l.normalizeProps)((0,l.mergeProps)({key:0},e.$attrs)),[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(m),((e,o)=>((0,l.openBlock)(),(0,l.createBlock)(E,{key:o,link:e,boundingRect:(0,l.unref)(s),startNode:(0,l.unref)(r)[e.startNode.id],endNode:(0,l.unref)(r)[e.endNode.id]},null,8,["link","boundingRect","startNode","endNode"])))),128))],16)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});const F=(0,a.Z)(T,[["__scopeId","data-v-e35b0402"]]);var I=F,D=(0,l.defineComponent)({props:{nodes:{type:(0,C.P5)(Array),required:!0},leftSideNodes:(0,C.P5)(Array),rightSideNodes:(0,C.P5)(Array),branches:(0,C.P5)(Array)},components:{Links:I},setup(e){const{nodes:o,leftSideNodes:t,rightSideNodes:n}=(0,l.toRefs)(e),r=(0,l.shallowRef)();(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);r.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[e.map((e=>(0,l.createVNode)("span",{class:"row"},[e.map(C.qF)])))]))))}));const i=(0,l.shallowRef)();(0,l.watchEffect)((()=>{const e=(0,C.Uv)(t);i.value=e?(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",{class:"left-side-nodes small"},[e.map(C.qF)])))):""}));const a=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{const e=(0,C.Uv)(n);a.value=e?(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",{class:"side-nodes small"},[e.map(C.qF)])))):""})),{unref:l.unref,nodesComp:r,leftNodesComp:i,rightNodesComp:a}}});const R=(0,a.Z)(D,[["render",M],["__scopeId","data-v-51e99c22"]]);var O=R;function _(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:(0,l.normalizeClass)({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)})},[(0,l.createElementVNode)("div",{onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},e.unref(e.style)??[]])},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp))))],36),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var j=(0,l.defineComponent)({props:{id:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,l.inject)(w.RegisterNodeInjectionKey),r=(0,l.inject)(w.UnregisterNodeInjectionKey),i=(0,l.ref)(null),a=(0,l.computed)((()=>i.value&&i.value.parentElement));return n&&r&&((0,l.watch)([a,t.id],(([e,o],[t,i])=>{t&&r((0,l.unref)(i)),e&&n(o,e)})),(0,l.onUnmounted)((()=>r((0,l.unref)(t.id))))),(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"node",ref_key:"node",ref:i},null,512))}});const A=(0,a.Z)(j,[["__scopeId","data-v-63ded336"]]);var U=A;const q={key:0},z={key:0,class:"mark star"},L=["src"];var G=(0,l.defineComponent)({props:{mark:{type:[Boolean,String]}},setup(e){return(o,t)=>e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",q,[!0===e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",z)):((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,L))])):(0,l.createCommentVNode)("",!0)}});const W=(0,a.Z)(G,[["__scopeId","data-v-c476c56a"]]);var H=W,$=(0,l.defineComponent)({props:{display:(0,C.P5)(Object,String,Function),visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),onClick:Function,onHold:Function,color:(0,C.P5)(String),glowColor:(0,C.P5)(String),canClick:{type:(0,C.P5)(Boolean),required:!0},mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:H,Node:U},setup(e){const{onClick:o,onHold:t,display:n}=(0,l.toRefs)(e),r=(0,C.KO)(n),{start:i,stop:a}=(0,C.ix)(o,t);return{start:i,stop:a,comp:r,unref:l.unref,Visibility:y.EE,isCoercableComponent:C.RU}}});const Y=(0,a.Z)($,[["render",_],["__scopeId","data-v-426d9bce"]]);var K=Y,J=t(9583),Q=t(3273);const X=Symbol("TreeNode"),ee=Symbol("Tree");function oe(e){return(0,Q.z2)((()=>{const o=e();if(o.id=(0,y.QI)("treeNode-"),o.type=X,o[y.wA]=K,(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,J.yB)(o,"color"),(0,J.yB)(o,"display"),(0,J.yB)(o,"glowColor"),(0,J.yB)(o,"classes"),(0,J.yB)(o,"style"),(0,J.yB)(o,"mark"),o.onClick){const e=o.onClick.bind(o);o.onClick=function(){(0,l.unref)(o.canClick)&&e()}}if(o.onHold){const e=o.onHold.bind(o);o.onHold=function(){(0,l.unref)(o.canClick)&&e()}}return o[y.tj]=function(){const{display:e,visibility:o,style:t,classes:l,onClick:n,onHold:r,color:i,glowColor:a,canClick:s,mark:u,id:m}=this;return{display:e,visibility:o,style:t,classes:l,onClick:n,onHold:r,color:i,glowColor:a,canClick:s,mark:u,id:m}},o}))}function te(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("tree-"),o.type=ee,o[y.wA]=O,o.isResetting=(0,l.ref)(!1),o.resettingNode=(0,l.shallowRef)(null),o.reset=function(e){const t=o;t.isResetting.value=!0,t.resettingNode.value=e,t.resetPropagation?.(t,e),t.onReset?.(e),t.isResetting.value=!1,t.resettingNode.value=null},o.links=(0,l.computed)((()=>{const e=o;return(0,l.unref)(e.branches)??[]})),(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"nodes"),(0,J.yB)(o,"leftSideNodes"),(0,J.yB)(o,"rightSideNodes"),(0,J.yB)(o,"branches"),o[y.tj]=function(){const{nodes:e,leftSideNodes:o,rightSideNodes:t,branches:l}=this;return{nodes:e,leftSideNodes:o,rightSideNodes:t,branches:l}},o}))}const le=function(e,o){const t=[o];let n=[o];if((()=>void 0!==e.branches&&null!==e.branches&&e.branches[Symbol.for("!=")]?e.branches[Symbol.for("!=")](null):null!=e.branches)()){const o=(0,l.unref)(e.branches);while((()=>void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0)()){const e=[];n.forEach((l=>{o.filter((e=>e.startNode===l||e.endNode===l)).map((e=>e.startNode===l?e.endNode:e.startNode)).filter((e=>(()=>void 0!==t.includes(e)&&null!==t.includes(e)&&t.includes(e)[Symbol.for("!")]?t.includes(e)[Symbol.for("!")]():!t.includes(e))())).forEach((o=>{(()=>void 0!==e.includes(o)&&null!==e.includes(o)&&e.includes(o)[Symbol.for("!")]?e.includes(o)[Symbol.for("!")]():!e.includes(o))()&&(e.push(o),o.reset?.reset())}))})),n=e,t.push(...n)}}};function ne(e,o=null,t=0){const n=(0,J.UI)(t);return(0,l.computed)((()=>(()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()||b.ZP.gte(e.value,(0,l.unref)(n))?(()=>x(e)+" "!==void 0&&x(e)+" "!==null&&(x(e)+" ")[Symbol.for("+")]?(x(e)+" ")[Symbol.for("+")](e.displayName):x(e)+" "+e.displayName)():`Reach ${b.ZP.eq(o.precision,0)?(0,b.Ht)((0,l.unref)(n)):(0,b.WU)((0,l.unref)(n),o.precision)} ${o.displayName} to unlock (You have ${b.ZP.eq(o.precision,0)?(0,b.Ht)(o.value):(0,b.WU)(o.value,o.precision)})`))}var re=t(5967),ie=t(274),ae=t(264);function se(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},e.unref(e.style)??[]]),class:(0,l.normalizeClass)({feature:!0,achievement:!0,locked:(()=>void 0!==e.unref(e.earned)&&null!==e.unref(e.earned)&&e.unref(e.earned)[Symbol.for("!")]?e.unref(e.earned)[Symbol.for("!")]():!e.unref(e.earned))(),bought:e.unref(e.earned),...e.unref(e.classes)})},[e.component?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var ue=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:(0,C.P5)(Object,String,Function),earned:{type:(0,C.P5)(Boolean),required:!0},image:(0,C.P5)(String),style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:U,MarkNode:H},setup(e){const{display:o}=(0,l.toRefs)(e);return{component:(0,C.KO)(o),unref:l.unref,Visibility:y.EE}}});const me=(0,a.Z)(ue,[["render",se],["__scopeId","data-v-e3f32402"]]);var ce=me,fe=t(3002);t(343);function de(e="white",o="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 ${o} ${e}`,zIndex:1}}function ye(){return de("red","20px")}h.globalBus.on("setupVue",(e=>e.use(fe.ZP)));const be=(0,fe.pm)(),he=Symbol("Achievement");function pe(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());if(t.id=(0,y.QI)("achievement-"),t.type=he,t[y.wA]=ce,t.earned=t[p.n9],t.complete=function(){t[p.n9].value=!0},(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"display"),(0,J.yB)(t,"mark"),(0,J.yB)(t,"image"),(0,J.yB)(t,"style"),(0,J.yB)(t,"classes"),t[y.tj]=function(){const{visibility:e,display:o,earned:t,image:n,style:r,classes:i,mark:a,id:s}=this;return{visibility:e,display:o,earned:t,image:n,style:(0,l.unref)(r),classes:i,mark:a,id:s}},t.shouldEarn){const e=t;(0,l.watchEffect)((()=>{if((()=>void 0!==e.earned.value&&null!==e.earned.value&&e.earned.value[Symbol.for("!")]?e.earned.value[Symbol.for("!")]():!e.earned.value)()&&(0,l.unref)(e.visibility)===y.EE.Visible&&e.shouldEarn?.()&&(e.earned.value=!0,e.onComplete?.(),e.display)){const o=(0,C.MM)((0,l.unref)(e.display));be.info((0,l.createVNode)("div",null,[(0,l.createVNode)("h3",null,[(0,l.createTextVNode)("Achievement earned!")]),(0,l.createVNode)("div",null,[(0,l.createVNode)(o,null,null)])]))}}))}return t}),(0,p.ax)(!1))}function ge(e,o,t,n,r,i){const a=(0,l.resolveComponent)("GridCell");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.rows),(o=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["row",{mergeAdjacent:e.mergeAdjacent}]),key:o},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.cols),(t=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherCellProps(e.unref(e.cells)[(()=>100*o!==void 0&&100*o!==null&&(100*o)[Symbol.for("+")]?(100*o)[Symbol.for("+")](t):100*o+t)()])),null,16)))),128))],2)))),128))],4)):(0,l.createCommentVNode)("",!0)}var ve=t(1037),Se=t(9266);const Ne={key:0};function ke(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,class:(0,l.normalizeClass)({feature:!0,tile:!0,can:e.unref(e.canClick),locked:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))()}),style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o))},[e.title?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ne,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.titleComponent)))])):(0,l.createCommentVNode)("",!0),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{style:{"white-space":"pre-line"}})),(0,l.createVNode)(a,{id:e.id},null,8,["id"])],38)):(0,l.createCommentVNode)("",!0)}var Ve=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,C.P5)(Object,String,Function),required:!0},title:(0,C.P5)(Object,String,Function),style:(0,C.P5)(String,Object,Array),canClick:{type:(0,C.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:U},setup(e){const{onClick:o,onHold:t,title:n,display:r}=(0,l.toRefs)(e),{start:i,stop:a}=(0,C.ix)(o,t),s=(0,C.KO)(n),u=(0,C.vq)(r);return{start:i,stop:a,titleComponent:s,component:u,Visibility:y.EE,unref:l.unref}}});const xe=(0,a.Z)(Ve,[["render",ke],["__scopeId","data-v-b1182ac6"]]);var Me=xe,Ce=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},rows:{type:(0,C.P5)(Number),required:!0},cols:{type:(0,C.P5)(Number),required:!0},cells:{type:(0,C.P5)(Object),required:!0}},components:{GridCell:Me},setup(){const e=(0,l.computed)((()=>ve.Z[Se.ZP.theme].mergeAdjacent));function o(e){const{visibility:o,onClick:t,onHold:l,display:n,title:r,style:i,canClick:a,id:s}=e;return{visibility:o,onClick:t,onHold:l,display:n,title:r,style:i,canClick:a,id:s}}return{unref:l.unref,gatherCellProps:o,Visibility:y.EE,mergeAdjacent:e}}});const we=(0,a.Z)(Ce,[["render",ge]]);var Ze=we,Be=t(1349);Symbol("Grid");function Pe(e){return new Proxy({},Ee(e))}function Ee(e){const o=(0,l.computed)((()=>{const o=[];for(let t=1;(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")]((0,l.unref)(e.rows)):t<=(0,l.unref)(e.rows))();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++)())for(let n=1;(()=>void 0!==n&&null!==n&&n[Symbol.for("<=")]?n[Symbol.for("<=")]((0,l.unref)(e.cols)):n<=(0,l.unref)(e.cols))();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("postfix-increment")]?n[Symbol.for("postfix-increment")]():n++)())o.push((()=>100*t!==void 0&&100*t!==null&&(100*t)[Symbol.for("+")]?(100*t)[Symbol.for("+")](n):100*t+n)().toString());return o}));return{get(t,l){return"isProxy"===l||("symbol"===typeof l?e[l]:(()=>void 0!==o.value.includes(l.toString())&&null!==o.value.includes(l.toString())&&o.value.includes(l.toString())[Symbol.for("!")]?o.value.includes(l.toString())[Symbol.for("!")]():!o.value.includes(l.toString()))()?void 0:((()=>void 0!==t[l]&&null!==t[l]&&t[l][Symbol.for("==")]?t[l][Symbol.for("==")](null):null==t[l])()&&(t[l]=new Proxy(e,Te(l.toString()))),t[l]))},set(e,o,t){return console.warn("Cannot set grid cells",e,o,t),!1},ownKeys(){return o.value},has(e,t){return o.value.includes(t.toString())},getOwnPropertyDescriptor(e,t){if(o.value.includes(t.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function Te(e){const o=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],t={};return{get(o,n,r){if("isProxy"===n)return!0;let i=o[n];return(0,Be.mf)(i)?()=>i.call(r,e,o.getState(e)):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()||"symbol"===typeof n?i:(n=(()=>void 0!==n.slice(0,1).toUpperCase()&&null!==n.slice(0,1).toUpperCase()&&n.slice(0,1).toUpperCase()[Symbol.for("+")]?n.slice(0,1).toUpperCase()[Symbol.for("+")](n.slice(1)):n.slice(0,1).toUpperCase()+n.slice(1))(),"startState"===n?i.call(r,e):(i=o[`get${n}`],(0,Be.mf)(i)?((()=>n in t!==void 0&&n in t!==null&&(n in t)[Symbol.for("!")]?(n in t)[Symbol.for("!")]():!(n in t))()&&(t[n]=(0,l.computed)((()=>i.call(r,e,o.getState(e))))),t[n].value):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()?(0,l.unref)(i):(i=o[`on${n}`],(0,Be.mf)(i)?()=>i.call(r,e,o.getState(e)):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()?i:o[n])))},set(o,t,l,n){return t=`set${(()=>void 0!==t.slice(0,1).toUpperCase()&&null!==t.slice(0,1).toUpperCase()&&t.slice(0,1).toUpperCase()[Symbol.for("+")]?t.slice(0,1).toUpperCase()[Symbol.for("+")](t.slice(1)):t.slice(0,1).toUpperCase()+t.slice(1))()}`,(()=>void 0!==t&&null!==t&&t[Symbol.for("in")]?t[Symbol.for("in")](o):t in o)()&&(0,Be.mf)(o[t])&&(()=>void 0!==o[t].length&&null!==o[t].length&&o[t].length[Symbol.for("<")]?o[t].length[Symbol.for("<")](3):o[t].length<3)()?(o[t].call(n,e,l),!0):(console.warn(`No setter for "${t}".`,o),!1)},ownKeys(){return o},has(e,t){return o.includes(t.toString())},getOwnPropertyDescriptor(e,t){if(o.includes(t.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function Fe(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());if(t.id=(0,y.QI)("grid-"),t[y.wA]=Ze,t.getID=function(e){return(()=>t.id+"-"!==void 0&&t.id+"-"!==null&&(t.id+"-")[Symbol.for("+")]?(t.id+"-")[Symbol.for("+")](e):t.id+"-"+e)()},t.getState=function(e){return(()=>void 0!==this[p.n9].value[e]&&null!==this[p.n9].value[e]&&this[p.n9].value[e][Symbol.for("!=")]?this[p.n9].value[e][Symbol.for("!=")](void 0):void 0!=this[p.n9].value[e])()?this[p.n9].value[e]:this.cells[e].startState},t.setState=function(e,o){this[p.n9].value[e]=o},t.cells=Pe(t),(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"rows"),(0,J.yB)(t,"cols"),(0,J.yB)(t,"getVisibility"),(0,y.Rh)(t,"getVisibility",y.EE.Visible),(0,J.yB)(t,"getCanClick"),(0,y.Rh)(t,"getCanClick",!0),(0,J.yB)(t,"getStartState"),(0,J.yB)(t,"getStyle"),(0,J.yB)(t,"getClasses"),(0,J.yB)(t,"getTitle"),(0,J.yB)(t,"getDisplay"),t.onClick){const e=t.onClick.bind(t);t.onClick=function(o,n){(0,l.unref)(t.cells[o].canClick)&&e(o,n)}}if(t.onHold){const e=t.onHold.bind(t);t.onHold=function(o,n){(0,l.unref)(t.cells[o].canClick)&&e(o,n)}}return t[y.tj]=function(){const{visibility:e,rows:o,cols:t,cells:l,id:n}=this;return{visibility:e,rows:o,cols:t,cells:l,id:n}},t}),(0,p.ax)({}))}function Ie(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??[]]),onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),class:(0,l.normalizeClass)({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))(),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],38)):(0,l.createCommentVNode)("",!0)}var De=(0,l.defineComponent)({props:{display:{type:(0,C.P5)(Object,String,Function),required:!0},visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(Object,String,Array),classes:(0,C.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,C.P5)(Boolean),required:!0},small:Boolean,mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:U,MarkNode:H},setup(e){const{display:o,onClick:t,onHold:n}=(0,l.toRefs)(e),r=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(r.value="");if((0,C.RU)(e))return void(r.value=(0,C.MM)(e));const t=(0,C.MM)(e.title||"","h3"),n=(0,C.MM)(e.description,"div");r.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(t,null,null)]):null,(0,l.createVNode)(n,null,null)]))))}));const{start:i,stop:a}=(0,C.ix)(t,n);return{start:i,stop:a,comp:r,Visibility:y.EE,unref:l.unref}}});const Re=(0,a.Z)(De,[["render",Ie],["__scopeId","data-v-6b39988a"]]);var Oe=Re;const _e=Symbol("Clickable");function je(e){return(0,Q.z2)((()=>{const o=e();if(o.id=(0,y.QI)("clickable-"),o.type=_e,o[y.wA]=Oe,(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,J.yB)(o,"classes"),(0,J.yB)(o,"style"),(0,J.yB)(o,"mark"),(0,J.yB)(o,"display"),o.onClick){const e=o.onClick.bind(o);o.onClick=function(t){(0,l.unref)(o.canClick)&&e(t)}}if(o.onHold){const e=o.onHold.bind(o);o.onHold=function(){(0,l.unref)(o.canClick)&&e()}}return o[y.tj]=function(){const{display:e,visibility:o,style:t,classes:n,onClick:r,onHold:i,canClick:a,small:s,mark:u,id:m}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:n,onClick:r,onHold:i,canClick:a,small:s,mark:u,id:m}},o}))}function Ae(e){return je((()=>{const o=e();(0,J.yB)(o,"showNextAt"),(0,y.Rh)(o,"showNextAt",!0),(0,y.Rh)(o,"minimumGain",1),(()=>void 0!==o.resetDescription&&null!==o.resetDescription&&o.resetDescription[Symbol.for("==")]?o.resetDescription[Symbol.for("==")](null):null==o.resetDescription)()?o.resetDescription=(0,l.computed)((()=>b.ZP.lt(o.conversion.gainResource.value,1e3)?"Reset for ":"")):(0,J.yB)(o,"resetDescription"),(()=>void 0!==o.display&&null!==o.display&&o.display[Symbol.for("==")]?o.display[Symbol.for("==")](null):null==o.display)()&&(o.display=(0,y.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.unref)(o.resetDescription),(0,l.createVNode)("b",null,[x(o.conversion.gainResource,b.ZP.max((0,l.unref)(o.conversion.actualGain),(0,l.unref)(o.minimumGain)))])," ",o.conversion.gainResource.displayName,(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),o.conversion.buyMax?"Next:":"Req:"," ",x(o.conversion.baseResource,o.conversion.buyMax||b.ZP.floor((0,l.unref)(o.conversion.actualGain)).neq(1)?(0,l.unref)(o.conversion.nextAt):(0,l.unref)(o.conversion.currentAt))," ",o.conversion.baseResource.displayName]),[[l.vShow,(0,l.unref)(o.showNextAt)]])])))),(()=>void 0!==o.canClick&&null!==o.canClick&&o.canClick[Symbol.for("==")]?o.canClick[Symbol.for("==")](null):null==o.canClick)()&&(o.canClick=(0,l.computed)((()=>b.ZP.gte((0,l.unref)(o.conversion.actualGain),(0,l.unref)(o.minimumGain)))));const t=o.onClick;return o.onClick=function(){(()=>void 0!==(0,l.unref)(o.canClick)&&null!==(0,l.unref)(o.canClick)&&(0,l.unref)(o.canClick)[Symbol.for("!")]?(0,l.unref)(o.canClick)[Symbol.for("!")]():!(0,l.unref)(o.canClick))()||(o.conversion.convert(),o.tree.reset(o.treeNode),t?.())},o}))}function Ue(e){return oe((()=>{const o=e();return(0,J.yB)(o,"display"),(0,y.Rh)(o,"display",o.layerID),(0,J.yB)(o,"append"),{...o,display:o.layerID,onClick:(0,l.unref)(o.append)?function(){if(re.Z.tabs.includes(o.layerID)){const e=re.Z.tabs.lastIndexOf(o.layerID);re.Z.tabs.splice(e,1)}else re.Z.tabs.push(o.layerID)}:function(){re.Z.tabs.splice(1,1,o.layerID)}}}))}function qe(e){return(0,Q.z2)((()=>{const o=e();return(()=>void 0!==o.currentGain&&null!==o.currentGain&&o.currentGain[Symbol.for("==")]?o.currentGain[Symbol.for("==")](null):null==o.currentGain)()&&(o.currentGain=(0,l.computed)((()=>{let e=o.gainModifier?o.gainModifier.apply(o.scaling.currentGain(o)):o.scaling.currentGain(o);return e=b.ZP.floor(e).max(0),(()=>void 0!==(0,l.unref)(o.buyMax)&&null!==(0,l.unref)(o.buyMax)&&(0,l.unref)(o.buyMax)[Symbol.for("!")]?(0,l.unref)(o.buyMax)[Symbol.for("!")]():!(0,l.unref)(o.buyMax))()&&(e=e.min(1)),e}))),(()=>void 0!==o.actualGain&&null!==o.actualGain&&o.actualGain[Symbol.for("==")]?o.actualGain[Symbol.for("==")](null):null==o.actualGain)()&&(o.actualGain=o.currentGain),(()=>void 0!==o.currentAt&&null!==o.currentAt&&o.currentAt[Symbol.for("==")]?o.currentAt[Symbol.for("==")](null):null==o.currentAt)()&&(o.currentAt=(0,l.computed)((()=>{let e=o.scaling.currentAt(o);return o.roundUpCost&&(e=b.ZP.ceil(e)),e}))),(()=>void 0!==o.nextAt&&null!==o.nextAt&&o.nextAt[Symbol.for("==")]?o.nextAt[Symbol.for("==")](null):null==o.nextAt)()&&(o.nextAt=(0,l.computed)((()=>{let e=o.scaling.nextAt(o);return o.roundUpCost&&(e=b.ZP.ceil(e)),e}))),(()=>void 0!==o.convert&&null!==o.convert&&o.convert[Symbol.for("==")]?o.convert[Symbol.for("==")](null):null==o.convert)()&&(o.convert=function(){o.gainResource.value=b.ZP.add(o.gainResource.value,(0,l.unref)(o.currentGain)),o.baseResource.value=0}),(0,J.yB)(o,"currentGain"),(0,J.yB)(o,"actualGain"),(0,J.yB)(o,"currentAt"),(0,J.yB)(o,"nextAt"),(0,J.yB)(o,"buyMax"),(0,y.Rh)(o,"buyMax",!0),(0,J.yB)(o,"roundUpCost"),(0,y.Rh)(o,"roundUpCost",!0),o}))}function ze(e,o){return{currentGain(t){const n=b.ZP.div(t.baseResource.value,(0,l.unref)(e)).pow((0,l.unref)(o));return n.isNan()?new b.ZP(0):n},currentAt(t){let n=(0,l.unref)(t.currentGain);return t.gainModifier&&(n=t.gainModifier.revert(n)),n=b.ZP.max(0,n),b.ZP.root(n,(0,l.unref)(o)).times((0,l.unref)(e))},nextAt(t){let n=b.ZP.add((0,l.unref)(t.currentGain),1);return t.gainModifier&&(n=t.gainModifier.revert(n)),n=b.ZP.max(0,n),b.ZP.root(n,(0,l.unref)(o)).times((0,l.unref)(e)).max((0,l.unref)(e))}}}function Le(e){return qe(e)}function Ge(e){return qe((()=>{const o=e();return(0,y.Rh)(o,"buyMax",!1),(()=>void 0!==o.currentGain&&null!==o.currentGain&&o.currentGain[Symbol.for("==")]?o.currentGain[Symbol.for("==")](null):null==o.currentGain)()&&(o.currentGain=(0,l.computed)((()=>{let e=o.gainModifier?o.gainModifier.apply(o.scaling.currentGain(o)):o.scaling.currentGain(o);return e=b.ZP.floor(e).max(o.gainResource.value),(()=>void 0!==(0,l.unref)(o.buyMax)&&null!==(0,l.unref)(o.buyMax)&&(0,l.unref)(o.buyMax)[Symbol.for("!")]?(0,l.unref)(o.buyMax)[Symbol.for("!")]():!(0,l.unref)(o.buyMax))()&&(e=e.min(b.ZP.add(o.gainResource.value,1))),e}))),(()=>void 0!==o.actualGain&&null!==o.actualGain&&o.actualGain[Symbol.for("==")]?o.actualGain[Symbol.for("==")](null):null==o.actualGain)()&&(o.actualGain=(0,l.computed)((()=>{let e=b.ZP.sub(o.scaling.currentGain(o),o.gainResource.value).max(0);return(()=>void 0!==(0,l.unref)(o.buyMax)&&null!==(0,l.unref)(o.buyMax)&&(0,l.unref)(o.buyMax)[Symbol.for("!")]?(0,l.unref)(o.buyMax)[Symbol.for("!")]():!(0,l.unref)(o.buyMax))()&&(e=e.min(1)),e}))),(0,y.Rh)(o,"convert",(function(){o.gainResource.value=o.gainModifier?o.gainModifier.apply((0,l.unref)(o.currentGain)):(0,l.unref)(o.currentGain),o.baseResource.value=0})),o}))}function We(e,o,t=.5){return b.ZP.lte(e,o)?e:b.ZP.pow(e,t).times(b.ZP.pow(o,b.ZP.sub(1,t)))}function He(e,o,t=.5){return{...e,currentGain:n=>We(e.currentGain(n),(0,l.unref)(o),(0,l.unref)(t))}}const $e=e=>((0,l.pushScopeId)("data-v-6447a93e"),e=e(),(0,l.popScopeId)(),e),Ye=$e((()=>(0,l.createElementVNode)("span",{class:"toggle"},"▼",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));function Ke(e,o,t,n,r,i){const a=(0,l.resolveComponent)("CollapseTransition"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["infobox",{collapsed:e.unref(e.collapsed),stacked:e.stacked,...e.unref(e.classes)}]),style:(0,l.normalizeStyle)([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}])},[(0,l.createElementVNode)("button",{class:"title",style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:o[0]||(o[0]=o=>e.collapsed.value=(()=>void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed))())},[Ye,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.titleComponent)))],4),(0,l.createVNode)(a,null,{default:(0,l.withCtx)((()=>[(()=>void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed))()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:"body",style:(0,l.normalizeStyle)({backgroundColor:e.unref(e.color)})},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.bodyComponent),{style:(0,l.normalizeStyle)(e.unref(e.bodyStyle))},null,8,["style"]))],4)):(0,l.createCommentVNode)("",!0)])),_:1}),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var Je=t(423),Qe=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:{type:(0,C.P5)(Object,String,Function),required:!0},title:{type:(0,C.P5)(Object,String,Function),required:!0},color:(0,C.P5)(String),collapsed:{type:Object,required:!0},style:(0,C.P5)(Object,String,Array),titleStyle:(0,C.P5)(Object,String,Array),bodyStyle:(0,C.P5)(Object,String,Array),classes:(0,C.P5)(Object),id:{type:String,required:!0}},components:{Node:U,CollapseTransition:Je.Z},setup(e){const{title:o,display:t}=(0,l.toRefs)(e),n=(0,C.vq)(o),r=(0,C.vq)(t),i=(0,l.computed)((()=>ve.Z[Se.ZP.theme].mergeAdjacent));return{titleComponent:n,bodyComponent:r,stacked:i,unref:l.unref,Visibility:y.EE}}});const Xe=(0,a.Z)(Qe,[["render",Ke],["__scopeId","data-v-6447a93e"]]);var eo=Xe;const oo=Symbol("Infobox");function to(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());return t.id=(0,y.QI)("infobox-"),t.type=oo,t[y.wA]=eo,t.collapsed=t[p.n9],(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"color"),(0,J.yB)(t,"style"),(0,J.yB)(t,"titleStyle"),(0,J.yB)(t,"bodyStyle"),(0,J.yB)(t,"classes"),(0,J.yB)(t,"title"),(0,J.yB)(t,"display"),t[y.tj]=function(){const{visibility:e,display:o,title:t,color:n,collapsed:r,style:i,titleStyle:a,bodyStyle:s,classes:u,id:m}=this;return{visibility:e,display:o,title:t,color:n,collapsed:r,style:(0,l.unref)(i),titleStyle:a,bodyStyle:s,classes:u,id:m}},t}),(0,p.ax)(!1))}function lo(e,o,t,n,r,i){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{ref:"resizeListener",class:(0,l.normalizeClass)(["resize-listener",e.unref(e.classes)]),style:(0,l.normalizeStyle)(e.unref(e.style))},null,6)}var no=t(6591),ro=(0,l.defineComponent)({props:{style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const o=(0,l.ref)(null),t=new ResizeObserver(a),n=(0,l.inject)(w.NodesInjectionKey),r=(0,l.ref)(null);(0,l.onMounted)((()=>{const l=r.value;(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](null):null!=l)()&&(t.observe(l),o.value=new no.MxU({resizeTo:l,backgroundAlpha:0}),r.value?.appendChild(o.value.view),e.onInit(o.value)),a()})),(0,l.onBeforeUnmount)((()=>{o.value?.destroy()}));let i=!0;function a(){i&&(i=!1,(0,l.nextTick)((()=>{(()=>void 0!==r.value&&null!==r.value&&r.value[Symbol.for("!=")]?r.value[Symbol.for("!=")](null):null!=r.value)()&&e.onContainerResized&&(Object.values(n.value).filter((e=>e)).forEach((e=>e.rect=e.element.getBoundingClientRect())),e.onContainerResized(r.value.getBoundingClientRect()),o.value?.resize()),i=!0})))}return document.fonts.ready.then(a),{unref:l.unref,resizeListener:r}}});const io=(0,a.Z)(ro,[["render",lo],["__scopeId","data-v-4e1c0c10"]]);var ao=io,so=t(1845);const uo=Symbol("Particles");function mo(e){return(0,Q.z2)((()=>{const o=e();o.id=(0,y.QI)("particles-"),o.type=uo,o[y.wA]=ao,o.app=(0,l.shallowRef)(null),o.addEmitter=e=>{const l=o;return l.app.value?Promise.resolve(new so.Q5(l.app.value.stage,e)):new Promise((o=>{t.push({resolve:o,config:e})}))};let t=[];function n(e){o.app.value=e,t.forEach((({resolve:o,config:t})=>o(new so.Q5(e.stage,t)))),t=[]}return o.onContainerResized=o.onContainerResized?.bind(o),o[y.tj]=function(){const{id:e,style:o,classes:t,onContainerResized:r,onHotReload:i}=this;return{id:e,style:(0,l.unref)(o),classes:t,onContainerResized:r,onHotReload:i,onInit:n}},o}))}window.upgradeConfig=so.oC;const co=Symbol("Reset");function fo(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("reset-"),o.type=co,o.reset=function(){const e=o=>{o&&"object"===typeof o&&((()=>void 0!==p.n9&&null!==p.n9&&p.n9[Symbol.for("in")]?p.n9[Symbol.for("in")](o):p.n9 in o)()?o[p.n9].value=o[p.nY]:(()=>o instanceof b.ZP!==void 0&&o instanceof b.ZP!==null&&(o instanceof b.ZP)[Symbol.for("!")]?(o instanceof b.ZP)[Symbol.for("!")]():!(o instanceof b.ZP))()&&(()=>void 0!==(0,l.isRef)(o)&&null!==(0,l.isRef)(o)&&(0,l.isRef)(o)[Symbol.for("!")]?(0,l.isRef)(o)[Symbol.for("!")]():!(0,l.isRef)(o))()&&Object.values(o).forEach((o=>e(o))))};(0,l.unref)(o.thingsToReset).forEach(e),h.globalBus.emit("reset",o),o.onReset?.()},(0,J.yB)(o,"thingsToReset"),o}))}const yo={};h.globalBus.on("removeLayer",(e=>{yo[e.id]?.(),yo[e.id]=void 0}));var bo=(0,l.defineComponent)({props:{resource:null,color:null},setup(e){const o=e,t=(0,l.computed)((()=>x(o.resource)));return(o,n)=>((0,l.openBlock)(),(0,l.createElementBlock)("h2",{style:(0,l.normalizeStyle)({color:e.color,"text-shadow":(()=>"0px 0px 10px "[Symbol.for("+")]?"0px 0px 10px "[Symbol.for("+")](e.color):"0px 0px 10px "+e.color)()})},(0,l.toDisplayString)((0,l.unref)(t)),5))}});const ho=bo;var po=ho;const go={key:0},vo={key:1},So=(0,l.createTextVNode)(", "),No=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()),ko=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var Vo=(0,l.defineComponent)({props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,C.KO)(t.effectDisplay),r=(0,l.computed)((()=>b.ZP.lt(t.resource.value,"1e1000")));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",null,[(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",go,"You have ")):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(po,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)(e.resource.displayName)):" "+(0,l.toDisplayString)(e.resource.displayName))(),1),(0,l.unref)(n)?((0,l.openBlock)(),(0,l.createElementBlock)("span",vo,[So,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(n))))])):(0,l.createCommentVNode)("",!0),No,ko]))}});const xo=Vo;var Mo=xo,Co=t(4096);function wo(e,o,t){const n=(0,J.UI)(e),r=(0,J.UI)(o),i=(0,J.UI)(!!(()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)()||t);return{apply:e=>b.ZP.add(e,(0,l.unref)(n)),revert:e=>b.ZP.sub(e,(0,l.unref)(n)),enabled:i,description:(0,y.tZ)((()=>(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,l.createTextVNode)("+"),(0,b.WU)((0,l.unref)(n))]),(0,l.unref)(r)?(0,l.createVNode)("span",{class:"modifier-description"},[(0,C.qF)((0,l.unref)(r))]):null])))}}function Zo(e,o,t){const n=(0,J.UI)(e),r=(0,J.UI)(o),i=(0,J.UI)(!!(()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)()||t);return{apply:e=>b.ZP.times(e,(0,l.unref)(n)),revert:e=>b.ZP.div(e,(0,l.unref)(n)),enabled:i,description:(0,y.tZ)((()=>(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,l.createTextVNode)("x"),(0,b.WU)((0,l.unref)(n))]),(0,l.unref)(r)?(0,l.createVNode)("span",{class:"modifier-description"},[(0,C.qF)((0,l.unref)(r))]):null])))}}function Bo(e,o,t){const n=(0,J.UI)(e),r=(0,J.UI)(o),i=(0,J.UI)(!!(()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)()||t);return{apply:e=>b.ZP.pow(e,(0,l.unref)(n)),revert:e=>b.ZP.root(e,(0,l.unref)(n)),enabled:i,description:(0,y.tZ)((()=>(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,l.createTextVNode)("^"),(0,b.WU)((0,l.unref)(n))]),(0,l.unref)(r)?(0,l.createVNode)("span",{class:"modifier-description"},[(0,C.qF)((0,l.unref)(r))]):null])))}}function Po(...e){return{apply:o=>e.filter((e=>(0,l.unref)(e.enabled))).reduce(((e,o)=>o.apply(e)),o),revert:o=>e.filter((e=>(0,l.unref)(e.enabled))).reduceRight(((e,o)=>o.revert(e)),o),enabled:(0,l.computed)((()=>(()=>void 0!==e.filter((e=>(0,l.unref)(e.enabled))).length&&null!==e.filter((e=>(0,l.unref)(e.enabled))).length&&e.filter((e=>(0,l.unref)(e.enabled))).length[Symbol.for(">")]?e.filter((e=>(0,l.unref)(e.enabled))).length[Symbol.for(">")](0):e.filter((e=>(0,l.unref)(e.enabled))).length>0)())),description:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[e.filter((e=>(0,l.unref)(e.enabled))).map((e=>(0,l.unref)(e.description))).filter((e=>e)).map(C.qF)])))}}function Eo(e,o,t,n=1,r=""){return(0,l.createVNode)("div",null,[(0,l.createVNode)("h3",null,[e,o?(0,l.createVNode)("span",{class:"subtitle"},[(0,l.createTextVNode)(" ("),o,(0,l.createTextVNode)(")")]):null]),(0,l.createVNode)("br",null,null),(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,b.WU)(n),r]),(0,l.createVNode)("span",{class:"modifier-description"},[(0,l.createTextVNode)("Base")])]),(0,C.qF)((0,l.unref)(t.description)),(0,l.createVNode)("hr",null,null),(0,l.createTextVNode)("Total: "),(0,b.WU)(t.apply(n)),r])}const To={class:"field"},Fo={key:0,class:"field-title"},Io=["min","max"];var Do=(0,l.defineComponent)({props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,n=(0,l.toRefs)(t),r=(0,l.computed)({get(){return String((0,l.unref)(n.modelValue)||0)},set(e){o("update:modelValue",Number(e))}});return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",To,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)("span",Fo,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(ae.Z,{display:`${(0,l.unref)(r)}`,class:(0,l.normalizeClass)({fullWidth:(()=>void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title)()})},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("input",{type:"range","onUpdate:modelValue":t[0]||(t[0]=e=>(0,l.isRef)(r)?r.value=e:null),min:e.min,max:e.max},null,8,Io),[[l.vModelText,(0,l.unref)(r)]])])),_:1},8,["display","class"])]))}});const Ro=(0,a.Z)(Do,[["__scopeId","data-v-20a0a34d"]]);var Oo=Ro,_o=t(4520),jo=t(9868),Ao=t(9905),Uo=(0,l.defineComponent)({setup(e){const o=(0,l.ref)("0"),t=new ResizeObserver(r),n=(0,l.ref)(null);function r(){let e=n.value;if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e)())return;let t=0;while(e.previousSibling){const o=e.previousSibling;o.dataset&&(()=>"vSticky"[Symbol.for("in")]?"vSticky"[Symbol.for("in")](o.dataset):"vSticky"in o.dataset)()&&(t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](o.offsetHeight):t+o.offsetHeight)()),e=o}o.value=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]("px"):t+"px")()}return(0,l.nextTick)(r),document.fonts.ready.then(r),(0,l.onMounted)((()=>{const e=n.value?.parentElement;e&&t.observe(e)})),(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"sticky",style:(0,l.normalizeStyle)({top:o.value}),ref_key:"element",ref:n,"data-v-sticky":""},[(0,l.renderSlot)(e.$slots,"default")],4))}});const qo=(0,a.Z)(Uo,[["__scopeId","data-v-6987dd96"]]);var zo=qo,Lo=(0,l.defineComponent)({props:{height:null},setup(e){return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"vr",style:(0,l.normalizeStyle)({height:e.height})},null,4))}});const Go=(0,a.Z)(Lo,[["__scopeId","data-v-15f6e746"]]);var Wo=Go,Ho=t(6948);function $o(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{width:(()=>void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px")(),height:(()=>void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px")(),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),class:(0,l.normalizeClass)({bar:!0,...e.unref(e.classes)})},[(0,l.createElementVNode)("div",{class:"overlayTextContainer border",style:(0,l.normalizeStyle)([{width:(()=>void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px")(),height:(()=>void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px")()},e.unref(e.borderStyle)??{}])},[e.component?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{key:0,class:"overlayText",style:(0,l.normalizeStyle)(e.unref(e.textStyle))},null,8,["style"])):(0,l.createCommentVNode)("",!0)],4),(0,l.createElementVNode)("div",{class:"border",style:(0,l.normalizeStyle)([{width:(()=>void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px")(),height:(()=>void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px")()},e.unref(e.style)??{},e.unref(e.baseStyle)??{},e.unref(e.borderStyle)??{}])},[(0,l.createElementVNode)("div",{class:"fill",style:(0,l.normalizeStyle)([e.barStyle,e.unref(e.style)??{},e.unref(e.fillStyle)??{}])},null,4)],4),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var Yo=(0,l.defineComponent)({props:{progress:{type:(0,C.P5)(String,Object,Number),required:!0},width:{type:(0,C.P5)(Number),required:!0},height:{type:(0,C.P5)(Number),required:!0},direction:{type:(0,C.P5)(String),required:!0},display:(0,C.P5)(Object,String,Function),visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(Object,String,Array),classes:(0,C.P5)(Object),borderStyle:(0,C.P5)(Object,String,Array),textStyle:(0,C.P5)(Object,String,Array),baseStyle:(0,C.P5)(Object,String,Array),fillStyle:(0,C.P5)(Object,String,Array),mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:H,Node:U},setup(e){const{progress:o,width:t,height:n,direction:r,display:i}=(0,l.toRefs)(e),a=(0,l.computed)((()=>{let e=o.value instanceof b.ZP?o.value.toNumber():Number(o.value);return(()=>1-Math.min(Math.max(e,0),1)!==void 0&&1-Math.min(Math.max(e,0),1)!==null&&(1-Math.min(Math.max(e,0),1))[Symbol.for("*")]?(1-Math.min(Math.max(e,0),1))[Symbol.for("*")](100):100*(1-Math.min(Math.max(e,0),1)))()})),s=(0,l.computed)((()=>{const e={width:(()=>(0,C.Uv)(t)+.5!==void 0&&(0,C.Uv)(t)+.5!==null&&((0,C.Uv)(t)+.5)[Symbol.for("+")]?((0,C.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,C.Uv)(t)+.5+"px")(),height:(()=>(0,C.Uv)(n)+.5!==void 0&&(0,C.Uv)(n)+.5!==null&&((0,C.Uv)(n)+.5)[Symbol.for("+")]?((0,C.Uv)(n)+.5)[Symbol.for("+")]("px"):(0,C.Uv)(n)+.5+"px")()};switch((0,l.unref)(r)){case Xo.Up:e.clipPath=`inset(${a.value}% 0% 0% 0%)`,e.width=(()=>(0,C.Uv)(t)+1!==void 0&&(0,C.Uv)(t)+1!==null&&((0,C.Uv)(t)+1)[Symbol.for("+")]?((0,C.Uv)(t)+1)[Symbol.for("+")]("px"):(0,C.Uv)(t)+1+"px")();break;case Xo.Down:e.clipPath=`inset(0% 0% ${a.value}% 0%)`,e.width=(()=>(0,C.Uv)(t)+1!==void 0&&(0,C.Uv)(t)+1!==null&&((0,C.Uv)(t)+1)[Symbol.for("+")]?((0,C.Uv)(t)+1)[Symbol.for("+")]("px"):(0,C.Uv)(t)+1+"px")();break;case Xo.Right:e.clipPath=`inset(0% ${a.value}% 0% 0%)`;break;case Xo.Left:e.clipPath=`inset(0% 0% 0% ${a.value} + '%)`;break;case Xo.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),u=(0,C.KO)(i);return{normalizedProgress:a,barStyle:s,component:u,unref:l.unref,Visibility:y.EE}}});const Ko=(0,a.Z)(Yo,[["render",$o],["__scopeId","data-v-e6e3c366"]]);var Jo=Ko;const Qo=Symbol("Bar");var Xo;function et(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("bar-"),o.type=Qo,o[y.wA]=Jo,(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"width"),(0,J.yB)(o,"height"),(0,J.yB)(o,"direction"),(0,J.yB)(o,"style"),(0,J.yB)(o,"classes"),(0,J.yB)(o,"borderStyle"),(0,J.yB)(o,"baseStyle"),(0,J.yB)(o,"textStyle"),(0,J.yB)(o,"fillStyle"),(0,J.yB)(o,"progress"),(0,J.yB)(o,"display"),(0,J.yB)(o,"mark"),o[y.tj]=function(){const{progress:e,width:o,height:t,direction:n,display:r,visibility:i,style:a,classes:s,borderStyle:u,textStyle:m,baseStyle:c,fillStyle:f,mark:d,id:y}=this;return{progress:e,width:o,height:t,direction:n,display:r,visibility:i,style:(0,l.unref)(a),classes:s,borderStyle:u,textStyle:m,baseStyle:c,fillStyle:f,mark:d,id:y}},o}))}(function(e){e["Up"]="Up",e["Down"]="Down",e["Left"]="Left",e["Right"]="Right",e["Default"]="Up"})(Xo||(Xo={}));const ot=Symbol("Buyable");function tt(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());if((()=>void 0!==t.canPurchase&&null!==t.canPurchase&&t.canPurchase[Symbol.for("==")]?t.canPurchase[Symbol.for("==")](null):null==t.canPurchase)()&&((()=>void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("==")]?t.resource[Symbol.for("==")](null):null==t.resource)()||(()=>void 0!==t.cost&&null!==t.cost&&t.cost[Symbol.for("==")]?t.cost[Symbol.for("==")](null):null==t.cost)()))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",t),"Cannot create buyable without a canPurchase property or a resource and cost property";t.id=(0,y.QI)("buyable-"),t.type=ot,t[y.wA]=Oe,t.amount=t[p.n9],t.canAfford=(0,l.computed)((()=>{const e=t,o=(0,l.unref)(e.cost);return(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](null):null!=o)()&&b.ZP.gte(e.resource.value,o)})),(()=>void 0!==t.canPurchase&&null!==t.canPurchase&&t.canPurchase[Symbol.for("==")]?t.canPurchase[Symbol.for("==")](null):null==t.canPurchase)()&&(t.canPurchase=(0,l.computed)((()=>(0,l.unref)(t.visibility)===y.EE.Visible&&(0,l.unref)(t.canAfford)&&b.ZP.lt(t.amount.value,(0,l.unref)(t.purchaseLimit))))),t.maxed=(0,l.computed)((()=>b.ZP.gte(t.amount.value,(0,l.unref)(t.purchaseLimit)))),(0,J.yB)(t,"classes");const n=t.classes;t.classes=(0,l.computed)((()=>{const e=(0,l.unref)(n)||{};return t.maxed.value&&(e.bought=!0),e})),(0,J.yB)(t,"canPurchase"),t.canClick=t.canPurchase,t.onClick=t.purchase=function(){const e=t;if((()=>void 0!==(0,l.unref)(e.canPurchase)&&null!==(0,l.unref)(e.canPurchase)&&(0,l.unref)(e.canPurchase)[Symbol.for("!")]?(0,l.unref)(e.canPurchase)[Symbol.for("!")]():!(0,l.unref)(e.canPurchase))()||(()=>void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("==")]?e.cost[Symbol.for("==")](null):null==e.cost)()||(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("==")]?e.resource[Symbol.for("==")](null):null==e.resource)())return;const o=(0,l.unref)(e.cost);e.resource.value=b.ZP.sub(e.resource.value,o),e.amount.value=b.ZP.add(e.amount.value,1),this.onPurchase?.(o)},(0,J.yB)(t,"display");const r=t.display;return t.display=(0,y.tZ)((()=>{const e=(0,l.unref)(r);if((0,C.RU)(e)){const o=(0,C.MM)(e);return(0,l.createVNode)(o,null,null)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&(()=>void 0!==t.cost&&null!==t.cost&&t.cost[Symbol.for("!=")]?t.cost[Symbol.for("!=")](null):null!=t.cost)()&&(()=>void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("!=")]?t.resource[Symbol.for("!=")](null):null!=t.resource)()){const o=t,n=(0,C.MM)(e.title||"","h3"),r=(0,C.MM)(e.description),i=(0,C.MM)(e.effectDisplay||""),a=(0,l.unref)(o.purchaseLimit)===b.ZP.dInf?(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(o.amount.value)]):(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(o.amount.value),(0,l.createTextVNode)(" /")," ",(0,b.Ht)((0,l.unref)(o.purchaseLimit))]);return(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(n,null,null)]):null,(0,l.createVNode)(r,null,null),(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),a]),e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Currently: "),(0,l.createVNode)(i,null,null)]):null,o.cost&&(()=>void 0!==o.maxed.value&&null!==o.maxed.value&&o.maxed.value[Symbol.for("!")]?o.maxed.value[Symbol.for("!")]():!o.maxed.value)()?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Cost: "),(0,b.WU)((0,l.unref)(o.cost)||0)," ",t.resource.displayName]):null])}return""})),(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"cost"),(0,J.yB)(t,"resource"),(0,J.yB)(t,"purchaseLimit"),(0,y.Rh)(t,"purchaseLimit",b.ZP.dInf),(0,J.yB)(t,"style"),(0,J.yB)(t,"mark"),(0,J.yB)(t,"small"),t[y.tj]=function(){const{display:e,visibility:o,style:t,classes:n,onClick:r,canClick:i,small:a,mark:s,id:u}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:n,onClick:r,canClick:i,small:a,mark:s,id:u}},t}),(0,p.ax)(0))}t(3577);const lt=["disabled"];function nt(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,e.unref(e.style)??{}]),class:(0,l.normalizeClass)({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&(()=>void 0!==e.unref(e.maxed)&&null!==e.unref(e.maxed)&&e.unref(e.maxed)[Symbol.for("!")]?e.unref(e.maxed)[Symbol.for("!")]():!e.unref(e.maxed))(),maxed:e.unref(e.maxed),...e.unref(e.classes)})},[(0,l.createElementVNode)("button",{class:"toggleChallenge",onClick:o[0]||(o[0]=(...o)=>e.toggle&&e.toggle(...o)),disabled:(()=>void 0!==e.unref(e.canStart)&&null!==e.unref(e.canStart)&&e.unref(e.canStart)[Symbol.for("!")]?e.unref(e.canStart)[Symbol.for("!")]():!e.unref(e.canStart))()||e.unref(e.maxed)},(0,l.toDisplayString)(e.buttonText),9,lt),e.unref(e.comp)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var rt=(0,l.defineComponent)({props:{active:{type:(0,C.P5)(Boolean),required:!0},maxed:{type:(0,C.P5)(Boolean),required:!0},canComplete:{type:(0,C.P5)(Boolean),required:!0},display:(0,C.P5)(String,Object,Function),visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),completed:{type:(0,C.P5)(Boolean),required:!0},canStart:{type:(0,C.P5)(Boolean),required:!0},mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:H,Node:U},setup(e){const{active:o,maxed:t,canComplete:n,display:r}=(0,l.toRefs)(e),i=(0,l.computed)((()=>o.value?n.value?"Finish":"Exit Early":t.value?"Completed":"Start")),a=(0,l.shallowRef)(""),s=(0,l.computed)((()=>{const e=(0,C.Uv)(o),t=(0,C.Uv)(n);return e?t?ye():de():{}}));return(0,l.watchEffect)((()=>{const e=(0,C.Uv)(r);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(a.value="");if((0,C.RU)(e))return void(a.value=(0,C.MM)(e));const o=(0,C.MM)(e.title||"","h3"),t=(0,C.MM)(e.description,"div"),n=(0,C.MM)(e.goal||""),i=(0,C.MM)(e.reward||""),s=(0,C.MM)(e.effectDisplay||"");a.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(o,null,null)]):null,(0,l.createVNode)(t,null,null),e.goal?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Goal: "),(0,l.createVNode)(n,null,null)]):null,e.reward?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Reward: "),(0,l.createVNode)(i,null,null)]):null,e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Currently: "),(0,l.createVNode)(s,null,null)]):null]))))})),{buttonText:i,notifyStyle:s,comp:a,Visibility:y.EE,unref:l.unref}}});const it=(0,a.Z)(rt,[["render",nt],["__scopeId","data-v-5e580749"]]);var at=it;const st=Symbol("ChallengeType");function ut(e){const o=(0,p.ax)(0),t=(0,p.ax)(!1);return(0,Q.z2)((()=>{const n=e();if((()=>void 0!==n.canComplete&&null!==n.canComplete&&n.canComplete[Symbol.for("==")]?n.canComplete[Symbol.for("==")](null):null==n.canComplete)()&&((()=>void 0!==n.resource&&null!==n.resource&&n.resource[Symbol.for("==")]?n.resource[Symbol.for("==")](null):null==n.resource)()||(()=>void 0!==n.goal&&null!==n.goal&&n.goal[Symbol.for("==")]?n.goal[Symbol.for("==")](null):null==n.goal)()))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",n),"Cannot create challenge without a canComplete property or a resource and goal property";n.id=(0,y.QI)("challenge-"),n.type=st,n[y.wA]=at,n.completions=o,n.active=t,n.completed=(0,l.computed)((()=>b.ZP.gt(n.completions.value,0))),n.maxed=(0,l.computed)((()=>b.ZP.gte(n.completions.value,(0,l.unref)(n.completionLimit)))),n.toggle=function(){const e=n;if(e.active.value){if((0,l.unref)(e.canComplete)&&(()=>void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value)()){let o=(0,l.unref)(e.canComplete);"boolean"===typeof o&&(o=1),e.completions.value=b.ZP.min(b.ZP.add(e.completions.value,o),(0,l.unref)(e.completionLimit)),e.onComplete?.()}e.active.value=!1,e.onExit?.(),e.reset?.reset()}else(0,l.unref)(e.canStart)&&(0,l.unref)(e.visibility)===y.EE.Visible&&(()=>void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value)()&&(e.reset?.reset(),e.active.value=!0,e.onEnter?.())},n.complete=function(e){const o=n;let t=(0,l.unref)(o.canComplete);o.active.value&&(()=>void 0!==t&&null!==t&&t[Symbol.for("!==")]?t[Symbol.for("!==")](!1):!1!==t)()&&(!0===t||b.ZP.neq(0,t))&&(()=>void 0!==o.maxed.value&&null!==o.maxed.value&&o.maxed.value[Symbol.for("!")]?o.maxed.value[Symbol.for("!")]():!o.maxed.value)()&&("boolean"===typeof t&&(t=1),o.completions.value=b.ZP.min(b.ZP.add(o.completions.value,t),(0,l.unref)(o.completionLimit)),o.onComplete?.(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e)()&&(o.active.value=!1,o.onExit?.(),o.reset?.reset()))},(0,J.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible);const r=n.visibility;return n.visibility=(0,l.computed)((()=>!0===Se.ZP.hideChallenges&&(0,l.unref)(n.maxed)?y.EE.None:(0,l.unref)(r))),(()=>void 0!==n.canComplete&&null!==n.canComplete&&n.canComplete[Symbol.for("==")]?n.canComplete[Symbol.for("==")](null):null==n.canComplete)()&&(n.canComplete=(0,l.computed)((()=>{const e=n;return!((()=>void 0!==e.active.value&&null!==e.active.value&&e.active.value[Symbol.for("!")]?e.active.value[Symbol.for("!")]():!e.active.value)()||(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("==")]?e.resource[Symbol.for("==")](null):null==e.resource)()||(()=>void 0!==e.goal&&null!==e.goal&&e.goal[Symbol.for("==")]?e.goal[Symbol.for("==")](null):null==e.goal)())&&b.ZP.gte(e.resource.value,(0,l.unref)(e.goal))}))),(()=>void 0!==n.mark&&null!==n.mark&&n.mark[Symbol.for("==")]?n.mark[Symbol.for("==")](null):null==n.mark)()&&(n.mark=(0,l.computed)((()=>b.ZP.gt((0,l.unref)(n.completionLimit),1)&&(()=>void 0!==!(0,l.unref)(n.maxed)&&null!==!(0,l.unref)(n.maxed)&&(!(0,l.unref)(n.maxed))[Symbol.for("!")]?(!(0,l.unref)(n.maxed))[Symbol.for("!")]():!!(0,l.unref)(n.maxed))()))),(0,J.yB)(n,"canStart"),(0,y.Rh)(n,"canStart",!0),(0,J.yB)(n,"canComplete"),(0,J.yB)(n,"completionLimit"),(0,y.Rh)(n,"completionLimit",1),(0,J.yB)(n,"mark"),(0,J.yB)(n,"goal"),(0,J.yB)(n,"classes"),(0,J.yB)(n,"style"),(0,J.yB)(n,"display"),(()=>void 0!==n.reset&&null!==n.reset&&n.reset[Symbol.for("!=")]?n.reset[Symbol.for("!=")](null):null!=n.reset)()&&h.globalBus.on("reset",(e=>{e===n.reset&&n.active.value&&n.toggle()})),n[y.tj]=function(){const{active:e,maxed:o,canComplete:t,display:n,visibility:r,style:i,classes:a,completed:s,canStart:u,mark:m,id:c,toggle:f}=this;return{active:e,maxed:o,canComplete:t,display:n,visibility:r,style:(0,l.unref)(i),classes:a,completed:s,canStart:u,mark:m,id:c,toggle:f}},n}))}h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"hideChallenges",!1)})),(0,Se.QV)((0,y.tZ)((()=>(0,l.createVNode)(jo.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>Se.ZP.hideChallenges=e,modelValue:Se.ZP.hideChallenges},null))));const mt=(0,l.shallowReactive)({}),ct=Symbol("Hotkey");function ft(e){return(0,Q.z2)((()=>{const o=e();return o.type=ct,(0,J.yB)(o,"enabled"),(0,y.Rh)(o,"enabled",!0),(0,J.yB)(o,"description"),o}))}h.globalBus.on("addLayer",(e=>{(0,y.bD)(e,ct).forEach((e=>{mt[e.key]=e}))})),h.globalBus.on("removeLayer",(e=>{(0,y.bD)(e,ct).forEach((e=>{mt[e.key]=void 0}))})),document.onkeydown=function(e){if("INPUT"===e.target?.tagName)return;if(sl.value&&(()=>void 0!==re.Z.keepGoing&&null!==re.Z.keepGoing&&re.Z.keepGoing[Symbol.for("!")]?re.Z.keepGoing[Symbol.for("!")]():!re.Z.keepGoing)())return;let o=e.key;e.shiftKey&&(o=(()=>"shift+"[Symbol.for("+")]?"shift+"[Symbol.for("+")](o):"shift+"+o)()),e.ctrlKey&&(o=(()=>"ctrl+"[Symbol.for("+")]?"ctrl+"[Symbol.for("+")](o):"ctrl+"+o)());const t=mt[o];t&&(0,l.unref)(t.enabled)&&(e.preventDefault(),t.onPress())},(0,Se.fw)((0,y.tZ)((()=>{const e=Object.values(mt).filter((e=>(0,l.unref)(e?.enabled)));return 0===e.length?"":(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createVNode)("h4",null,[(0,l.createTextVNode)("Hotkeys")]),e.map((e=>(0,l.createVNode)("div",null,[e?.key,(0,l.createTextVNode)(": "),e?.description])))])})));const dt=Symbol("Links");function yt(e){return(0,Q.z2)((()=>{const o=e();return o.type=dt,o[y.wA]=I,(0,J.yB)(o,"links"),o[y.tj]=function(){const{links:e}=this;return{links:e}},o}))}var bt=t(3525);function ht(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),class:(0,l.normalizeClass)({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)))),(0,l.createVNode)(a,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var pt=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:{type:(0,C.P5)(String,Object,Function),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),earned:{type:(0,C.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:U},setup(e){const{display:o}=(0,l.toRefs)(e),t=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(t.value="");if((0,C.RU)(e))return void(t.value=(0,C.MM)(e));const n=(0,C.MM)(e.requirement,"h3"),r=(0,C.MM)(e.effectDisplay||"","b"),i=(0,C.MM)(e.optionsDisplay||"","span");t.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createVNode)(n,null,null),e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createVNode)(r,null,null)]):null,e.optionsDisplay?(0,l.createVNode)("div",{class:"equal-spaced"},[(0,l.createVNode)(i,null,null)]):null]))))})),{comp:t,unref:l.unref,Visibility:y.EE}}});const gt=(0,a.Z)(pt,[["render",ht],["__scopeId","data-v-0b660ac3"]]);var vt=gt;const St=(0,fe.pm)(),Nt=Symbol("Milestone");var kt;function Vt(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());t.id=(0,y.QI)("milestone-"),t.type=Nt,t[y.wA]=vt,t.earned=t[p.n9],t.complete=function(){t[p.n9].value=!0},(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible);const n=t.visibility;if(t.visibility=(0,l.computed)((()=>{const e=(0,l.unref)(t.display);switch(Se.ZP.msDisplay){default:case kt.All:return(0,l.unref)(n);case kt.Configurable:return(0,l.unref)(t.earned)&&(()=>void 0!==(null!=e&&"object"==typeof e&&"optionsDisplay"in e)&&null!==(null!=e&&"object"==typeof e&&"optionsDisplay"in e)&&(null!=e&&"object"==typeof e&&"optionsDisplay"in e)[Symbol.for("!")]?(null!=e&&"object"==typeof e&&"optionsDisplay"in e)[Symbol.for("!")]():!(null!=e&&"object"==typeof e&&"optionsDisplay"in e))()?y.EE.None:(0,l.unref)(n);case kt.Incomplete:return(0,l.unref)(t.earned)?y.EE.None:(0,l.unref)(n);case kt.None:return y.EE.None}})),(0,J.yB)(t,"style"),(0,J.yB)(t,"classes"),(0,J.yB)(t,"display"),t[y.tj]=function(){const{visibility:e,display:o,style:t,classes:n,earned:r,id:i}=this;return{visibility:e,display:o,style:(0,l.unref)(t),classes:n,earned:r,id:i}},t.shouldEarn){const e=t;(0,l.watchEffect)((()=>{if((()=>void 0!==e.earned.value&&null!==e.earned.value&&e.earned.value[Symbol.for("!")]?e.earned.value[Symbol.for("!")]():!e.earned.value)()&&(0,l.unref)(e.visibility)===y.EE.Visible&&e.shouldEarn?.()&&(e.earned.value=!0,e.onComplete?.(),e.display)){const o=(0,l.unref)(e.display),t=(0,C.MM)((0,C.RU)(o)?o:o.requirement);St((0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)("h3",null,[(0,l.createTextVNode)("Milestone earned!")]),(0,l.createVNode)("div",null,[(0,l.createVNode)(t,null,null)])]))}}))}return t}),(0,p.ax)(!1))}(function(e){e["All"]="all",e["Configurable"]="configurable",e["Incomplete"]="incomplete",e["None"]="none"})(kt||(kt={})),h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"msDisplay",kt.All)}));const xt=Object.values(kt).map((e=>({label:(0,Be.IJ)(e),value:e})));(0,Se.QV)((0,y.tZ)((()=>(0,l.createVNode)(bt.Z,{title:"Show Milestones",options:xt,"onUpdate:modelValue":e=>Se.ZP.msDisplay=e,modelValue:Se.ZP.msDisplay},null))));var Mt=(0,l.defineComponent)({props:{display:null},setup(e){const o=e,{display:t}=(0,l.toRefs)(o),n=(0,C.vq)(t);return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(n))))}});const Ct=Mt;var wt=Ct;const Zt=Symbol("Tab");function Bt(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("tab-"),o.type=Zt,o[y.wA]=wt,o[y.tj]=function(){const{display:e}=this;return{display:e}},o}))}function Pt(e,o,t,n,r,i){return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:o[0]||(o[0]=(...o)=>e.selectTab&&e.selectTab(...o)),class:(0,l.normalizeClass)(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,e.unref(e.style)??{}])},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component)))],6)):(0,l.createCommentVNode)("",!0)}var Et=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:{type:(0,C.P5)(Object,String,Function),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),glowColor:(0,C.P5)(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:o}){const{display:t,glowColor:n,floating:r}=(0,l.toRefs)(e),i=(0,C.vq)(t),a=(0,l.computed)((()=>{const e=(0,C.Uv)(n);return(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?{}:(0,l.unref)(r)?de(e):{boxShadow:`0px 9px 5px -6px ${e}`}}));function s(){o("selectTab")}return{selectTab:s,component:i,glowColorStyle:a,unref:l.unref,Visibility:y.EE}}});const Tt=(0,a.Z)(Et,[["render",Pt],["__scopeId","data-v-361380c0"]]);var Ft=Tt;function It(e,o,t,n,r,i){const a=(0,l.resolveComponent)("TabButton"),s=(0,l.resolveComponent)("Sticky");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??[],e.tabStyle??[]])},[(0,l.createVNode)(s,{class:"tab-buttons-container"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["tab-buttons",{floating:e.floating}])},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.tabs),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({onSelectTab:o=>e.selected.value=t,floating:e.floating,key:t,active:e.unref(o.tab)===e.unref(e.activeTab)},e.gatherButtonProps(o)),null,16,["onSelectTab","floating","active"])))),128))],2)])),_:1}),e.unref(e.activeTab)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)}var Dt=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},activeTab:{type:(0,C.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,C.P5)(Object),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object)},components:{Sticky:zo,TabButton:Ft},setup(e){const{activeTab:o}=(0,l.toRefs)(e),t=(0,l.computed)((()=>ve.Z[Se.ZP.theme].floatingTabs)),n=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()?n.value="":(0,C.RU)(e)?n.value=(0,C.MM)(e):n.value=(0,C.MM)((0,l.unref)(e.display))}));const r=(0,l.computed)((()=>{const e=(0,C.Uv)(o),t=(0,C.RU)(e)||(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?void 0:(0,l.unref)(e.classes);return t})),i=(0,l.computed)((()=>{const e=(0,C.Uv)(o);return(0,C.RU)(e)||(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?void 0:(0,l.unref)(e.style)}));function a(e){const{display:o,style:t,classes:l,glowColor:n,visibility:r}=e;return{display:o,style:t,classes:l,glowColor:n,visibility:r}}return{floating:t,tabClasses:r,tabStyle:i,Visibility:y.EE,component:n,gatherButtonProps:a,unref:l.unref}}});const Rt=(0,a.Z)(Dt,[["render",It],["__scopeId","data-v-38d5b5f9"]]);var Ot=Rt;const _t=Symbol("TabButton"),jt=Symbol("TabFamily");function At(e,o){if(0===Object.keys(e).length)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";return(0,Q.z2)((t=>{const n=Object.assign(t,o?.());n.id=(0,y.QI)("tabFamily-"),n.type=jt,n[y.wA]=Ot,n.tabs=Object.keys(e).reduce(((o,t)=>{const l=e[t]();return l.type=_t,l[y.wA]=Ft,(0,J.yB)(l,"visibility"),(0,y.Rh)(l,"visibility",y.EE.Visible),(0,J.yB)(l,"tab"),(0,J.yB)(l,"display"),(0,J.yB)(l,"classes"),(0,J.yB)(l,"style"),(0,J.yB)(l,"glowColor"),o[t]=l,o}),{}),n.selected=n[p.n9],n.activeTab=(0,l.computed)((()=>{const e=(0,l.unref)(r.tabs);if((()=>void 0!==n[p.n9].value&&null!==n[p.n9].value&&n[p.n9].value[Symbol.for("in")]?n[p.n9].value[Symbol.for("in")](e):n[p.n9].value in e)()&&(0,l.unref)(e[r[p.n9].value].visibility)===y.EE.Visible)return(0,l.unref)(e[r[p.n9].value].tab);const o=Object.values(e).find((e=>(0,l.unref)(e.visibility)===y.EE.Visible));return o?(0,l.unref)(o.tab):null})),(0,J.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,J.yB)(n,"classes"),(0,J.yB)(n,"style"),n[y.tj]=function(){const{visibility:e,activeTab:o,selected:t,tabs:n,style:r,classes:i}=this;return{visibility:e,activeTab:o,selected:t,tabs:n,style:(0,l.unref)(r),classes:i}};const r=n;return r}),(0,p.ax)(Object.keys(e)[0]))}const Ut=["disabled"];function qt(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),onClick:o[0]||(o[0]=(...o)=>e.purchase&&e.purchase(...o)),class:(0,l.normalizeClass)({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:(()=>void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase))(),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:(()=>void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase))()},[e.unref(e.component)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],14,Ut)):(0,l.createCommentVNode)("",!0)}var zt=(0,l.defineComponent)({props:{display:{type:(0,C.P5)(String,Object,Function),required:!0},visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),resource:Object,cost:(0,C.P5)(String,Object,Number),canPurchase:{type:(0,C.P5)(Boolean),required:!0},bought:{type:(0,C.P5)(Boolean),required:!0},mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:U,MarkNode:H},setup(e){const{display:o,cost:t}=(0,l.toRefs)(e),n=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const r=(0,C.Uv)(o);if((()=>void 0!==r&&null!==r&&r[Symbol.for("==")]?r[Symbol.for("==")](null):null==r)())return void(n.value="");if((0,C.RU)(r))return void(n.value=(0,C.MM)(r));const i=(0,C.Uv)(t),a=(0,C.MM)(r.title||"","h3"),s=(0,C.MM)(r.description,"div"),u=(0,C.MM)(r.effectDisplay||"");n.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[r.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(a,null,null)]):null,(0,l.createVNode)(s,null,null),r.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Currently: "),(0,l.createVNode)(u,null,null)]):null,(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()?(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Cost: "),e.resource&&x(e.resource,i)," ",e.resource?.displayName]):null]))))})),{component:n,unref:l.unref,Visibility:y.EE}}});const Lt=(0,a.Z)(zt,[["render",qt],["__scopeId","data-v-264c96b4"]]);var Gt=Lt;const Wt=Symbol("Upgrade");function Ht(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());return t.id=(0,y.QI)("upgrade-"),t.type=Wt,t[y.wA]=Gt,(()=>void 0!==t.canAfford&&null!==t.canAfford&&t.canAfford[Symbol.for("==")]?t.canAfford[Symbol.for("==")](null):null==t.canAfford)()&&((()=>void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("==")]?t.resource[Symbol.for("==")](null):null==t.resource)()||(()=>void 0!==t.cost&&null!==t.cost&&t.cost[Symbol.for("==")]?t.cost[Symbol.for("==")](null):null==t.cost)())&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",t),t.bought=t[p.n9],(()=>void 0!==t.canAfford&&null!==t.canAfford&&t.canAfford[Symbol.for("==")]?t.canAfford[Symbol.for("==")](null):null==t.canAfford)()?t.canAfford=(0,l.computed)((()=>{const e=t;return(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()&&(()=>void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("!=")]?e.cost[Symbol.for("!=")](null):null!=e.cost)()&&b.ZP.gte(e.resource.value,(0,l.unref)(e.cost))})):(0,J.yB)(t,"canAfford"),t.canPurchase=(0,l.computed)((()=>(0,l.unref)(t.visibility)===y.EE.Visible&&(0,l.unref)(t.canAfford)&&(()=>void 0!==(0,l.unref)(t.bought)&&null!==(0,l.unref)(t.bought)&&(0,l.unref)(t.bought)[Symbol.for("!")]?(0,l.unref)(t.bought)[Symbol.for("!")]():!(0,l.unref)(t.bought))())),t.purchase=function(){const e=t;(()=>void 0!==(0,l.unref)(e.canPurchase)&&null!==(0,l.unref)(e.canPurchase)&&(0,l.unref)(e.canPurchase)[Symbol.for("!")]?(0,l.unref)(e.canPurchase)[Symbol.for("!")]():!(0,l.unref)(e.canPurchase))()||((()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()&&(()=>void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("!=")]?e.cost[Symbol.for("!=")](null):null!=e.cost)()&&(e.resource.value=b.ZP.sub(e.resource.value,(0,l.unref)(e.cost))),e[p.n9].value=!0,e.onPurchase?.())},(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"classes"),(0,J.yB)(t,"style"),(0,J.yB)(t,"display"),(0,J.yB)(t,"mark"),(0,J.yB)(t,"cost"),(0,J.yB)(t,"resource"),t[y.tj]=function(){const{display:e,visibility:o,style:t,classes:n,resource:r,cost:i,canPurchase:a,bought:s,mark:u,id:m,purchase:c}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:n,resource:r,cost:i,canPurchase:a,bought:s,mark:u,id:m,purchase:c}},t}),(0,p.ax)(!1))}function $t(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&(()=>void 0!==(0,l.isVNode)(e)&&null!==(0,l.isVNode)(e)&&(0,l.isVNode)(e)[Symbol.for("!")]?(0,l.isVNode)(e)[Symbol.for("!")]():!(0,l.isVNode)(e))()}const Yt="c",Kt=(0,w.createLayer)(Yt,(()=>{const e="#4BDC13",o="Candies",t=g(0,"lollipops"),n=v(t),r=(0,p.ax)(!1),i=(0,p.ax)("pointy"),a=(0,p.ax)(10),s=(0,p.ax)(new b.ZP(10)),u=(0,l.computed)((()=>b.ZP.pow(t.value,.2))),m=(0,l.computed)((()=>b.ZP.times(t.value,10))),c=to((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}))),f=Vt((()=>({shouldEarn(){return b.ZP.gte(n.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}))),h=Vt((()=>({visibility(){return(0,y.Kf)(f.earned.value)},shouldEarn(){return b.ZP.gte(n.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(jo.Z,{title:"beep","onUpdate:modelValue":e=>r.value=e,modelValue:r.value},null),(0,l.createVNode)(jo.Z,{title:"boop","onUpdate:modelValue":e=>ol.boop.value=e,modelValue:ol.boop.value},null)])))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}}))),S=[f,h],N=ut((()=>({title:"Fun",completionLimit:3,display(){return{description:`Makes the game 0% harder<br>${(0,b.Ht)(this.completions.value)}/${this.completionLimit} completions`,goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:(()=>void 0!==(0,b.WU)(k.value)&&null!==(0,b.WU)(k.value)&&(0,b.WU)(k.value)[Symbol.for("+")]?(0,b.WU)(k.value)[Symbol.for("+")]("x"):(0,b.WU)(k.value)+"x")()}},visibility(){return(0,y.Kf)(b.ZP.gt(n.value,0))},goal:20,resource:il.points,onComplete(){console.log("hiii")},onEnter(){il.points.value=0,il.best.value=il.points.value,il.total.value=il.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}}))),k=(0,l.computed)((()=>b.ZP.add(t.value,1).tetrate(.02))),V=Ht((()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:t}))),M=Ht((()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${(0,b.WU)(w.value)}x`}),cost:1,resource:t,visibility:()=>(0,y.Kf)(V.bought.value)}))),w=(0,l.computed)((()=>{let e=b.ZP.add(t.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),Z=Ht((()=>({visibility(){return(0,y.Kf)(M.bought.value)},canAfford(){return b.ZP.lt(il.points.value,7)},onPurchase(){il.points.value=b.ZP.add(il.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style(){return this.bought?{backgroundColor:"#1111dd"}:(()=>void 0!==this.canAfford&&null!==this.canAfford&&this.canAfford[Symbol.for("!")]?this.canAfford[Symbol.for("!")]():!this.canAfford)()?{backgroundColor:"#dd1111"}:{}}}))),B=Ht((()=>({resource:g(E.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}))),P=[V,M,Z],E=tt((()=>({resource:t,cost(){let e=new b.ZP(this.amount.value);e.gte(25)&&(e=e.pow(2).div(25));const o=b.ZP.pow(2,e.pow(1.5));return o.floor()},display(){return{title:"Exhancers",description:`Adds ${(0,b.WU)(T.value)} things and multiplies stuff by ${(0,b.WU)(F.value)}.`}},onPurchase(e){s.value=b.ZP.add(s.value,e)},style:{height:"222px"},purchaseLimit:4}))),T=(0,l.computed)((()=>b.ZP.gte(E.amount.value,0)?b.ZP.pow(25,b.ZP.pow(E.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(E.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),F=(0,l.computed)((()=>b.ZP.gte(E.amount.value,0)?b.ZP.pow(25,b.ZP.pow(E.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(E.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),I=(0,p.ax)(!1),D=(0,l.ref)(!1),R=je((()=>({small:!0,display:"Respec Thingies",onClick(){I.value&&(()=>void 0!==D.value&&null!==D.value&&D.value[Symbol.for("!")]?D.value[Symbol.for("!")]():!D.value)()?D.value=!0:(t.value=b.ZP.add(t.value,s.value),E.amount.value=0,il.tree.reset(G))}}))),O=je((()=>({small:!0,display:"Sell One",onClick(){b.ZP.lte(E.amount.value,0)||(E.amount.value=b.ZP.sub(E.amount.value,1),t.value=b.ZP.add(t.value,E.cost.value),s.value=b.ZP.sub(s.value,E.cost.value))}}))),_=(0,y.tZ)((()=>(0,l.createVNode)(Ao.Z,null,{default:()=>[(0,l.createVNode)(ie.Z,null,{default:()=>[(0,l.createVNode)(jo.Z,{title:"Confirm","onUpdate:modelValue":e=>I.value=e,modelValue:I.value},null),(0,C._4)(R)]}),(0,C._4)(E),(0,C._4)(O),(0,l.createVNode)(Ho.Z,{modelValue:D.value,"onUpdate:modelValue":e=>D.value=e},{header:()=>(0,l.createVNode)("h2",null,[(0,l.createTextVNode)("Confirm Respec")]),body:()=>(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Are you sure? Respeccing these doesn't accomplish much")]),footer:()=>(0,l.createVNode)("div",{class:"modal-default-footer"},[(0,l.createVNode)("div",{class:"modal-default-flex-grow"},null),(0,l.createVNode)("button",{class:"button modal-default-button",onClick:()=>D.value=!1},[(0,l.createTextVNode)("Cancel")]),(0,l.createVNode)("button",{class:"button modal-default-button danger",onClick:()=>{R.onClick(),D.value=!1}},[(0,l.createTextVNode)("Respec")])])})]}))),j=et((()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:Xo.Right,width:300,height:30,progress(){return b.ZP.add(il.points.value,1).log(10).div(10).toNumber()},display(){return(()=>void 0!==(0,b.WU)(il.points.value)&&null!==(0,b.WU)(il.points.value)&&(0,b.WU)(il.points.value)[Symbol.for("+")]?(0,b.WU)(il.points.value)[Symbol.for("+")](" / 1e10 points"):(0,b.WU)(il.points.value)+" / 1e10 points")()}}))),A=et((()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:Xo.Up,width:50,height:200,progress(){return b.ZP.div(il.points.value,100)},display(){return(()=>void 0!==(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))&&null!==(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))&&(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))[Symbol.for("+")]?(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))[Symbol.for("+")]("%"):(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))+"%")()}}))),U=et((()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:Xo.Up,width:100,height:30,progress(){return b.ZP.div(t.value,50)}}))),q=Le((()=>({scaling:He(ze(10,.5),1e100,.5),baseResource:il.points,gainResource:t,roundUpCost:!0,gainModifier:Po(Bo(2,"Because I felt like it"),wo(1,"Nice modifier"))}))),z=fo((()=>({thingsToReset:()=>[Kt]}))),L=[ft((()=>({key:"c",description:"reset for lollipops or whatever",onPress(){W.canClick.value&&W.onClick()}}))),ft((()=>({key:"ctrl+c",description:"respec things",onPress(){R.onClick()}})))],G=Ue((()=>({layerID:Yt,color:e,reset:z,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let e=x(t);return b.ZP.gt(E.amount.value,0)&&(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](`<br><i><br><br><br>${(0,b.Ht)(E.amount.value)} Exhancers</i>`):e+`<br><i><br><br><br>${(0,b.Ht)(E.amount.value)} Exhancers</i>`)()),e},style:{color:"#3325CC",textDecoration:"underline"}})));(0,Co.Z)(G,{display:ne(t),pinnable:!0});const W=Ae((()=>({conversion:q,tree:il.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "})));(0,Co.Z)(W,{display:(0,y.tZ)((()=>Eo("Modifiers","",q.gainModifier,q.scaling.currentGain(q)))),pinnable:!0,direction:Co.A.DOWN,style:"width: 400px; text-align: left"});const H=oe((()=>({display:"TH",color:"#6d3678",canClick(){return b.ZP.gte(il.points.value,10)},tooltip:"Thanos your points",onClick(){il.points.value=b.ZP.div(il.points.value,2),console.log("Thanos'd")},glowColor(){return b.ZP.eq(E.amount.value,1)?"orange":""}}))),$=oe((()=>({display:"h",color(){return ve.Z[Se.ZP.theme].variables["--locked"]},tooltip:{display:(0,l.computed)((()=>`Restore your points to ${(0,b.WU)(a.value)}`)),right:!0},canClick(){return b.ZP.lt(il.points.value,a.value)},onClick(){il.points.value=a.value}}))),Y=oe((()=>({visibility:y.EE.Hidden}))),K=te((()=>({nodes(){return[[ol.treeNode,G],[H,Y,$]]},branches(){return[{startNode:ol.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:H},{startNode:H,endNode:$}]}}))),J=yt((()=>({links:[{startNode:$,endNode:U,"stroke-width":"5px",stroke:"red",offsetEnd:{x:(()=>(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*U.progress.value.toNumber()):100*U.progress.value.toNumber()-50)(),y:0}}]}))),Q=At({first:()=>({tab:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C._4)(...P),(0,C._4)(B),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("confirmed")])]))),display:"first"}),second:()=>({tab:ol.display,display:"second"})},(()=>({style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}))),X=At({mainTab:()=>({tab:Bt((()=>({display:(0,y.tZ)((()=>{let o;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(Mo,{resource:t,color:e,effectDisplay:`which are boosting waffles by ${(0,b.WU)(u.value)} and increasing the Ice Cream cap by ${(0,b.WU)(m.value)}`},null),(0,l.createVNode)(zo,null,$t(o=(0,C.sY)(W))?o:{default:()=>[o]}),(0,l.createVNode)(po,{resource:t,color:e},null),(0,l.createVNode)(d,{height:"5px"},null),(0,l.createVNode)("button",{onClick:()=>console.log("yeet")},[(0,l.createTextVNode)("'HI'")]),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Name your points!")]),(0,l.createVNode)(_o.Z,{modelValue:i.value,"onUpdate:modelValue":e=>i.value=e},null),(0,l.createVNode)(zo,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[(0,l.createTextVNode)("I have "),x(il.points),(0,l.createTextVNode)(" "),i.value,(0,l.createTextVNode)(" points!")]}),(0,l.createVNode)("hr",null,null),(0,C.Dy)(...S),(0,l.createVNode)(d,null,null),(0,C._4)(...P),(0,C._4)(B),(0,C._4)(N)])}))}))),display:"main tab",glowColor(){return V.canPurchase.value||M.canPurchase.value||Z.canPurchase.value||N.canComplete.value?"blue":""},style:{color:"orange"}}),thingies:()=>({tab:Bt((()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(_),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ie.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[(0,l.createVNode)(jo.Z,{"onUpdate:modelValue":e=>r.value=e,modelValue:r.value},null),(0,l.createVNode)(d,{width:"30px",height:"10px"},null),(0,l.createVNode)("div",null,[(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Beep")])]),(0,l.createVNode)(d,null,null),(0,l.createVNode)(Wo,{height:"200px"},null)]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)])))}))),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}),jail:()=>({tab:Bt((()=>({display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(c),(0,C.sY)(j),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ie.Z,null,{default:()=>[(0,l.createVNode)(Ao.Z,{style:"background-color: #555555; padding: 15px"},{default:()=>[(0,l.createVNode)("div",{style:"color: teal"},[(0,l.createTextVNode)("Sugar level:")]),(0,l.createVNode)(d,null,null),(0,C.sY)(A)]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)(Ao.Z,null,{default:()=>[(0,l.createVNode)("div",null,[(0,l.createTextVNode)("idk")]),(0,l.createVNode)(d,{width:"0",height:"50px"},null),(0,C.sY)(U)]})]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)("div",null,[(0,l.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,C.sY)(K)])))}))),display:"jail"}),illuminati:()=>({tab:Bt((()=>({display:(0,y.tZ)((()=>(0,l.createVNode)("div",null,[(0,l.createVNode)("h1",null,[(0,l.createTextVNode)(" C O N F I R M E D ")]),(0,l.createVNode)(d,null,null),(0,C.sY)(Q),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Adjust how many points H gives you!")]),(0,l.createVNode)(Oo,{"onUpdate:modelValue":e=>a.value=e,modelValue:a.value,min:1,max:30},null)]))),style:{backgroundColor:"#3325CC"}}))),visibility(){return(0,y.Kf)(Z.bought.value)},display:"illuminati"})});return{id:Yt,color:e,name:o,points:t,best:n,beep:r,thingy:i,otherThingy:a,spentOnBuyables:s,waffleBoost:u,icecreamCap:m,coolInfo:c,lollipopMilestones:S,funChallenge:N,funEffect:k,generatorUpgrade:V,lollipopMultiplierUpgrade:M,lollipopMultiplierEffect:w,unlockIlluminatiUpgrade:Z,quasiUpgrade:B,exhancers:E,respecBuyables:R,sellExhancer:O,bars:{tallBoi:A,longBoi:j,flatBoi:U},tree:K,g:H,h:$,spook:Y,conversion:q,reset:z,hotkeys:L,treeNode:G,resetButton:W,confirmRespec:I,minWidth:800,tabs:X,display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(X),(0,C.sY)(J)])))}}));var Jt=Kt,Qt=JSON.parse('{"lifetime":{"min":0.5,"max":1},"ease":[{"s":0,"cp":0.329,"e":0.548},{"s":0.548,"cp":0.767,"e":0.876},{"s":0.876,"cp":0.985,"e":1}],"frequency":0.001,"emitterLifetime":0.1,"maxParticles":100,"addAtBack":true,"pos":{"x":0,"y":0},"emit":false,"behaviors":[{"type":"alpha","config":{"alpha":{"list":[{"time":0,"value":0.74},{"time":1,"value":0}]}}},{"type":"moveSpeed","config":{"speed":{"list":[{"time":0,"value":300},{"time":1,"value":0}]},"minMult":1}},{"type":"scale","config":{"scale":{"list":[{"time":0,"value":1},{"time":1,"value":0.25}]},"minMult":1}},{"type":"color","config":{"color":{"list":[{"time":0,"value":"#ffdfa0"},{"time":1,"value":"#100f0c"}]}}},{"type":"rotation","config":{"accel":0,"minSpeed":0,"maxSpeed":200,"minStart":0,"maxStart":360}},{"type":"textureRandom","config":{"textures":["/particle.png"]}},{"type":"spawnShape","config":{"type":"rect","data":{"x":0,"y":0,"w":0,"h":0}}}]}');const Xt="f",el=(0,w.createLayer)(Xt,(()=>{const e="#FE0102",o="Farms",t=g(0,"farm points"),n=(0,p.ax)(!1),r=to((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}))),i=(0,p.ax)("Start"),a=je((()=>({display(){return{title:"Clicky clicky!",description:(()=>"Current state:<br>"[Symbol.for("+")]?"Current state:<br>"[Symbol.for("+")](i.value):"Current state:<br>"+i.value)()}},initialState:"Start",canClick(){return(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!==")]?i.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==i.value)()},onClick(e){switch(i.value){case"Start":i.value="A new state!";break;case"A new state!":i.value="Keep going!";break;case"Keep going!":i.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const o=(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e)()?void 0:(()=>"touches"[Symbol.for("in")]?"touches"[Symbol.for("in")](e):"touches"in e)()?e.touches[0]:e,t=Object.assign({},Qt,{pos:{x:(()=>void 0!==(o?.clientX??0)&&null!==(o?.clientX??0)&&(o?.clientX??0)[Symbol.for("-")]?(o?.clientX??0)[Symbol.for("-")](h.boundingRect?.value?.left??0):(o?.clientX??0)-(h.boundingRect?.value?.left??0))(),y:(()=>void 0!==(o?.clientY??0)&&null!==(o?.clientY??0)&&(o?.clientY??0)[Symbol.for("-")]?(o?.clientY??0)[Symbol.for("-")](h.boundingRect?.value?.top??0):(o?.clientY??0)-(h.boundingRect?.value?.top??0))()}});h.addEmitter(t).then((e=>e.playOnceAndDestroy())),i.value="Borkened...";break;default:i.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(i.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}}))),s=je((()=>({onClick(){(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value)()&&(i.value="Start")},display(){return(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value)()?"Fix the clickable!":"Does nothing"},small:!0}))),u=fo((()=>({thingsToReset:()=>[el]}))),m=Ge((()=>({scaling:ze(10,.5),baseResource:il.points,gainResource:t,modifyGainAmount:Zo(Jt.otherThingy)}))),c=Ue((()=>({layerID:Xt,color:e,reset:u,tooltip(){return c.canClick.value?`${x(t)} ${t.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${x(il.points)}`},canClick(){return b.ZP.gte(il.points.value,10)}})));(0,Co.Z)(c,{display:ne(t),pinnable:!0});const f=Ae((()=>({conversion:m,tree:il.tree,treeNode:c,display:(0,y.tZ)((()=>f.conversion.buyMax?(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Hi! I'm a "),(0,l.createVNode)("u",null,[(0,l.createTextVNode)("weird dinosaur")]),(0,l.createTextVNode)(" and I'll give you")," ",(0,l.createVNode)("b",null,[(0,b.Ht)(f.conversion.currentGain.value)]),(0,l.createTextVNode)(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",(0,b.Ht)(f.conversion.nextAt.value),(0,l.createTextVNode)(" points)")]):(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Hi! I'm a "),(0,l.createVNode)("u",null,[(0,l.createTextVNode)("weird dinosaur")]),(0,l.createTextVNode)(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",(0,b.Ht)(f.conversion.nextAt.value),(0,l.createTextVNode)(" points)")])))}))),h=mo((()=>({boundingRect:(0,l.ref)(null),onContainerResized(e){this.boundingRect.value=e},style:"z-index: 2"}))),v=(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(r),(0,l.createVNode)(Mo,{resource:t,color:e},null),(0,C.sY)(f),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("You have "),(0,b.Ht)(m.baseResource.value),(0,l.createTextVNode)(" points")]),(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createVNode)("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Bork Bork!")])]),(0,l.createVNode)(d,null,null),(0,C._4)(s),(0,C._4)(a),(0,C.sY)(h)])));return{id:Xt,color:e,name:o,points:t,boop:n,coolInfo:r,clickable:a,clickableState:i,reset:u,conversion:m,treeNode:c,resetButton:f,display:v}}));var ol=el;function tl(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&(()=>void 0!==(0,l.isVNode)(e)&&null!==(0,l.isVNode)(e)&&(0,l.isVNode)(e)[Symbol.for("!")]?(0,l.isVNode)(e)[Symbol.for("!")]():!(0,l.isVNode)(e))()}const ll="a",nl=(0,w.createLayer)(ll,(()=>{const e="yellow",o="Achievements",t=g(0,"achievement power"),n=oe((()=>({display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick(){il.showAchievements()}}))),r=pe((()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,l.computed)((()=>r.earned.value?"You did it!":"How did this happen?")),shouldEarn:()=>!0}))),i=pe((()=>({display:"Impossible!",tooltip:(0,l.computed)((()=>i.earned.value?"HOW????":"Mwahahaha!")),style:{color:"#04e050"}}))),a=pe((()=>({display:"EIEIO",tooltip:"Get a farm point.\n\nReward: The dinosaur is now your friend (you can max Farm Points).",shouldEarn:function(){return b.ZP.gte(ol.points.value,1)},onComplete(){console.log("Bork bork bork!")}}))),s=[r,i,a],u=Fe((()=>({rows:2,cols:2,getStartState(e){return e},getStyle(e,o){return{backgroundColor:`#${(()=>1234*Number(o)!==void 0&&1234*Number(o)!==null&&(1234*Number(o))[Symbol.for("%")]?(1234*Number(o))[Symbol.for("%")](999999):1234*Number(o)%999999)()}`}},getTitle(e){let o="";return"101"===e?o="top":"102"===e?o="bottom":"201"===e?o="left":"202"===e&&(o="right"),(0,y.tZ)((()=>(0,l.createVNode)(ae.Z,(0,l.mergeProps)({display:JSON.stringify(this.cells[e].style)},{[o]:!0}),{default:()=>[(0,l.createVNode)("h3",null,[(0,l.createTextVNode)("Gridable #"),e])]})))},getDisplay(e,o){return String(o)},getCanClick(){return b.ZP.eq(il.points.value,10)},onClick(e,o){this.cells[e].state=(()=>void 0!==Number(o)&&null!==Number(o)&&Number(o)[Symbol.for("+")]?Number(o)[Symbol.for("+")](1):Number(o)+1)()}}))),m=(0,y.tZ)((()=>{let e,o,t;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(ie.Z,null,{default:()=>[(0,l.createVNode)(ae.Z,{display:r.tooltip,bottom:!0},tl(e=(0,C.sY)(r))?e:{default:()=>[e]}),(0,l.createVNode)(ae.Z,{display:i.tooltip,bottom:!0},tl(o=(0,C.sY)(i))?o:{default:()=>[o]}),(0,l.createVNode)(ae.Z,{display:a.tooltip,bottom:!0},tl(t=(0,C.sY)(a))?t:{default:()=>[t]})]}),(0,C._4)(u)])}));return{id:ll,color:e,name:o,points:t,achievements:s,grid:u,treeNode:n,display:m}}));var rl=nl;const il=(0,w.createLayer)("main",(()=>{const e=g(10),o=v(e),t=S(e),n=(0,l.computed)((()=>{if((()=>void 0!==Jt.generatorUpgrade.bought.value&&null!==Jt.generatorUpgrade.bought.value&&Jt.generatorUpgrade.bought.value[Symbol.for("!")]?Jt.generatorUpgrade.bought.value[Symbol.for("!")]():!Jt.generatorUpgrade.bought.value)())return new b.ZP(0);let e=new b.ZP(3.19);return Jt.lollipopMultiplierUpgrade.bought.value&&(e=e.times(Jt.lollipopMultiplierEffect.value)),e}));h.globalBus.on("update",(o=>{e.value=b.ZP.add(e.value,b.ZP.times(n.value,o))}));const r=V(e,n),{openModal:i,modal:a}=(0,w.setupLayerModal)(rl),s=te((()=>({nodes:[[Jt.treeNode],[ol.treeNode,Jt.spook]],leftSideNodes:[rl.treeNode,Jt.h],branches:[{startNode:ol.treeNode,endNode:Jt.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=(0,l.toRaw)(this.resettingNode.value)===(0,l.toRaw)(Jt.treeNode)?0:10,o.value=e.value,t.value=e.value},resetPropagation:le})));return{name:"Tree",display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[0===re.Z.devSpeed?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Game Paused")]):null,re.Z.devSpeed&&(()=>void 0!==re.Z.devSpeed&&null!==re.Z.devSpeed&&re.Z.devSpeed[Symbol.for("!==")]?re.Z.devSpeed[Symbol.for("!==")](1):1!==re.Z.devSpeed)()?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Dev Speed: "),(0,b.WU)(re.Z.devSpeed||0),(0,l.createTextVNode)("x")]):null,(()=>void 0!==re.Z.offlineTime&&null!==re.Z.offlineTime&&re.Z.offlineTime[Symbol.for("!=")]?re.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=re.Z.offlineTime)()?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Offline Time: "),(0,b.mr)(re.Z.offlineTime||0)]):null,(0,l.createVNode)("div",null,[b.ZP.lt(e.value,"1e1000")?(0,l.createVNode)("span",null,[(0,l.createTextVNode)("You have ")]):null,(0,l.createVNode)("h2",null,[(0,b.WU)(e.value)]),b.ZP.lt(e.value,"1e1e6")?(0,l.createVNode)("span",null,[(0,l.createTextVNode)(" points")]):null]),b.ZP.gt(n.value,0)?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("("),r.value,(0,l.createTextVNode)(")")]):null,(0,l.createVNode)(d,null,null),(0,l.createVNode)("button",{onClick:i},[(0,l.createTextVNode)("open achievements")]),(0,C.sY)(a),(0,C.sY)(s),(0,l.createVNode)(m,{height:"200px",style:"margin: 10px auto; display: block"},null)]))),points:e,best:o,total:t,oomps:r,tree:s,showAchievements:i}})),al=e=>[il,ol,Jt,rl],sl=(0,l.computed)((()=>b.ZP.gt(il.points.value,25)));function ul(e,o){}},9365:function(e,o,t){"use strict";t.r(o),t.d(o,{RegisterNodeInjectionKey:function(){return f},UnregisterNodeInjectionKey:function(){return d},NodesInjectionKey:function(){return y},layers:function(){return b},persistentRefs:function(){return h},addingLayers:function(){return p},createLayer:function(){return g},addLayer:function(){return v},getLayer:function(){return S},removeLayer:function(){return N},reloadLayer:function(){return k},setupLayerModal:function(){return V}});var l=t(4865),n=t(6948),r=t(6113),i=t(9583),a=t(3273),s=t(8111),u=t(7302),m=t(4061),c=t(5967);const f=Symbol("RegisterNode"),d=Symbol("UnregisterNode"),y=Symbol("Nodes"),b={};window.layers=b;const h={},p=[];function g(e,o){return(0,a.z2)((()=>{const t={},n=t.emitter=(0,s.i)();if(t.on=n.on.bind(n),t.emit=n.emit.bind(n),t.nodes=(0,l.ref)({}),t.id=e,p.push(e),h[e]=new Set,t.minimized=(0,m.ax)(!1),Object.assign(t,o.call(t)),(()=>void 0!==p[p.length-1]&&null!==p[p.length-1]&&p[p.length-1][Symbol.for("==")]?p[p.length-1][Symbol.for("==")](null):null==p[p.length-1])()||(()=>void 0!==p[p.length-1]&&null!==p[p.length-1]&&p[p.length-1][Symbol.for("!==")]?p[p.length-1][Symbol.for("!==")](e):p[p.length-1]!==e)())throw`Adding layers stack in invalid state. This should not happen\nStack: ${p}\nTrying to pop ${t.id}`;return p.pop(),(0,i.yB)(t,"color"),(0,i.yB)(t,"display"),(0,i.yB)(t,"name"),(0,r.Rh)(t,"name",t.id),(0,i.yB)(t,"minWidth"),(0,r.Rh)(t,"minWidth",600),(0,i.yB)(t,"minimizable"),(0,r.Rh)(t,"minimizable",!0),t}))}function v(e,o){console.info("Adding layer",e.id),b[e.id]?console.error("Attempted to add layer with same ID as existing layer",e.id,b[e.id]):((0,r.Rh)(o,"layers",{}),(()=>void 0!==o.layers[e.id]&&null!==o.layers[e.id]&&o.layers[e.id][Symbol.for("==")]?o.layers[e.id][Symbol.for("==")](null):null==o.layers[e.id])()&&(o.layers[e.id]={}),b[e.id]=e,u.globalBus.emit("addLayer",e,o.layers[e.id]))}function S(e){return b[e]}function N(e){console.info("Removing layer",e.id),u.globalBus.emit("removeLayer",e),b[e.id]=void 0}function k(e){N(e),v(e,c.Z)}function V(e){const o=(0,l.ref)(!1);return{openModal:()=>o.value=!0,modal:(0,r.tZ)((()=>(0,l.createVNode)(n.Z,{modelValue:o.value,"onUpdate:modelValue":e=>o.value=e},{header:()=>(0,l.createVNode)("h2",null,[(0,l.unref)(e.name)]),body:(0,l.unref)(e.display)})))}}u.globalBus.on("update",(function(e){Object.values(b).forEach((o=>{o?.emit("preUpdate",e)})),Object.values(b).forEach((o=>{o?.emit("update",e)})),Object.values(b).forEach((o=>{o?.emit("postUpdate",e)}))}))},1604:function(e,o,t){"use strict";t.d(o,{MM:function(){return u},sY:function(){return m},_4:function(){return c},Dy:function(){return f},qF:function(){return d},RU:function(){return y},ix:function(){return b},vq:function(){return h},KO:function(){return p},o9:function(){return g},Uv:function(){return v},P5:function(){return S}});var l=t(4865),n=t(9905),r=t(274),i=t(6113),a=t(9583);function s(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&(()=>void 0!==(0,l.isVNode)(e)&&null!==(0,l.isVNode)(e)&&(0,l.isVNode)(e)[Symbol.for("!")]?(0,l.isVNode)(e)[Symbol.for("!")]():!(0,l.isVNode)(e))()}function u(e,o="span"){return"function"===typeof e?(0,l.defineComponent)({render:e}):"string"===typeof e?(()=>void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0)()?(e=e.trim(),(()=>void 0!==e.charAt(0)&&null!==e.charAt(0)&&e.charAt(0)[Symbol.for("!==")]?e.charAt(0)[Symbol.for("!==")]("<"):"<"!==e.charAt(0))()&&(e=`<${o}>${e}</${o}>`),(0,l.defineComponent)({template:e})):(0,l.defineComponent)({render:()=>({})}):e}function m(e){if(y(e))return"function"===typeof e?e():u(e);const o=e[i.wA];return(0,l.createVNode)(o,e[i.tj](),null)}function c(...e){let o;return(0,l.createVNode)(r.Z,null,s(o=e.map(m))?o:{default:()=>[o]})}function f(...e){let o;return(0,l.createVNode)(n.Z,null,s(o=e.map(m))?o:{default:()=>[o]})}function d(e){if(y(e)){if("function"===typeof e)return e();if("string"===typeof e)return(0,l.createVNode)(l.Fragment,null,[e]);const o=e;return(0,l.createVNode)(o,null,null)}const o=e[i.wA];return(0,l.createVNode)(o,e[i.tj](),null)}function y(e){return"string"===typeof e||("object"===typeof e?!(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()&&((()=>"render"[Symbol.for("in")]?"render"[Symbol.for("in")](e):"render"in e)()||(()=>"component"[Symbol.for("in")]?"component"[Symbol.for("in")](e):"component"in e)()):"function"===typeof e&&!0===e[a.mM])}function b(e,o){const t=(0,l.ref)(null),n=(0,l.ref)(void 0);function r(e){(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)()&&(t.value=setInterval(a,250)),n.value=e}function i(){t.value&&(clearInterval(t.value),t.value=null)}function a(){o&&o.value?o.value():e&&e.value&&e.value(n.value)}return(0,l.onUnmounted)(i),{start:r,stop:i,handleHolding:a}}function h(e,o="div"){const t=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{t.value=u(v(e),o)})),t}function p(e,o="div"){const t=(0,l.shallowRef)(null);return(0,l.watchEffect)((()=>{const l=v(e);t.value=(()=>void 0!==l&&null!==l&&l[Symbol.for("==")]?l[Symbol.for("==")](null):null==l)()?null:u(l,o)})),t}function g(e){return(0,l.computed)((()=>v(e)))}function v(e){return(0,l.unref)((0,l.unref)(e))}function S(...e){return(()=>void 0!==e.includes(Object)&&null!==e.includes(Object)&&e.includes(Object)[Symbol.for("!")]?e.includes(Object)[Symbol.for("!")]():!e.includes(Object))()&&e.push(Object),e}},5053:function(e,o,t){"use strict";t.d(o,{Z:function(){return a}});var l=t(4865),n=t(9365),r=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)({});o({nodes:t});const r={attributes:!0,childList:!0,subtree:!1};function i(e){const o=t.value[e];(()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()||(o.rect=o.element.getBoundingClientRect())}return(0,l.provide)(n.RegisterNodeInjectionKey,((e,o)=>{const n=new MutationObserver((()=>i(e)));n.observe(o,r),t.value[e]={element:o,observer:n,rect:o.getBoundingClientRect()},(0,l.nextTick)((()=>i(e)))})),(0,l.provide)(n.UnregisterNodeInjectionKey,(e=>{t.value[e]?.observer.disconnect(),t.value[e]=void 0})),(0,l.provide)(n.NodesInjectionKey,t),(e,o)=>(0,l.renderSlot)(e.$slots,"default")}});const i=r;var a=i},6948:function(e,o,t){"use strict";t.d(o,{Z:function(){return h}});var l=t(4865),n=t(5053);const r=["onPointerdown"],i={class:"modal-wrapper"},a={class:"modal-container"},s={class:"modal-header"},u=(0,l.createTextVNode)(" default header "),m={class:"modal-body"},c=(0,l.createTextVNode)(" default body "),f={class:"modal-footer"},d=(0,l.createElementVNode)("div",{class:"modal-default-flex-grow"},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var y=(0,l.defineComponent)({props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:o,emit:t}){const y=e,b=(0,l.toRefs)(y),h=(0,l.computed)((()=>b.modelValue||g.value));function p(){t("update:modelValue",!1)}const g=(0,l.ref)(!1),v=(0,l.ref)(null),S=(0,l.computed)((()=>v.value?.nodes??null));return o({isOpen:h,nodes:S}),(o,t)=>((0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{to:"#modal-root"},[(0,l.createVNode)(l.Transition,{name:"modal",onBeforeEnter:t[0]||(t[0]=e=>g.value=!0),onAfterLeave:t[1]||(t[1]=e=>g.value=!1)},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",(0,l.mergeProps)({class:"modal-mask",onPointerdown:(0,l.withModifiers)(p,["self"])},o.$attrs),[(0,l.createElementVNode)("div",i,[(0,l.createElementVNode)("div",a,[(0,l.createElementVNode)("div",s,[(0,l.renderSlot)(o.$slots,"header",{shown:(0,l.unref)(h)},(()=>[u]))]),(0,l.createElementVNode)("div",m,[(0,l.createVNode)(n.Z,{ref_key:"contextRef",ref:v},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(o.$slots,"body",{shown:(0,l.unref)(h)},(()=>[c]))])),_:3},512)]),(0,l.createElementVNode)("div",f,[(0,l.renderSlot)(o.$slots,"footer",{shown:(0,l.unref)(h)},(()=>[(0,l.createElementVNode)("div",{class:"modal-default-footer"},[d,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:p}," Close ")])]))])])])],16,r),[[l.vShow,e.modelValue]])])),_:3})]))}});const b=y;var h=b},3525:function(e,o,t){"use strict";t.d(o,{Z:function(){return m}});var l=t(4865),n=t(1604),r=t(9179);const i={class:"field"},a={key:0,class:"field-title"};var s=(0,l.defineComponent)({props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,s=(0,n.KO)((0,l.toRef)(t,"title"),"span"),u=(0,l.ref)(t.options.find((e=>e.value===t.modelValue)));function m(e){o("update:modelValue",e.value)}return(0,l.watch)((0,l.toRef)(t,"modelValue"),(e=>{(()=>void 0!==u.value?.value&&null!==u.value?.value&&u.value?.value[Symbol.for("!==")]?u.value?.value[Symbol.for("!==")](e):u.value?.value!==e)()&&(u.value=t.options.find((o=>o.value===e)))})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.unref)(s)?((0,l.openBlock)(),(0,l.createElementBlock)("span",a,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(s))))])):(0,l.createCommentVNode)("",!0),(0,l.createVNode)((0,l.unref)(r.Z),{options:e.options,modelValue:u.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>u.value=e),m],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const u=s;var m=u},4520:function(e,o,t){"use strict";t.d(o,{Z:function(){return d}});var l=t(4865),n=t(1604),r=t(7197);const i=["onSubmit"],a={class:"field"},s={key:0,class:"field-title"},u=["placeholder"];var m=(0,l.defineComponent)({props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(e,{emit:o}){const t=e,m=(0,l.toRefs)(t),c=(0,l.computed)((()=>m.title?.value&&(0,n.MM)((0,l.unref)(m.title.value),"span"))),f=(0,l.ref)(null);(0,l.onMounted)((()=>{f.value?.focus()}));const d=(0,l.computed)({get(){return(0,l.unref)(m.modelValue)||""},set(e){o("update:modelValue",e)}});function y(){o("submit")}return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("form",{onSubmit:(0,l.withModifiers)(y,["prevent"])},[(0,l.createElementVNode)("div",a,[(0,l.unref)(c)?((0,l.openBlock)(),(0,l.createElementBlock)("span",s,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(c))))])):(0,l.createCommentVNode)("",!0),e.textArea?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(r.Z),{key:1,modelValue:(0,l.unref)(d),"onUpdate:modelValue":t[0]||(t[0]=e=>(0,l.isRef)(d)?d.value=e:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:y,ref_key:"field",ref:f},null,8,["modelValue","placeholder","maxHeight"])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:2,type:"text","onUpdate:modelValue":t[1]||(t[1]=e=>(0,l.isRef)(d)?d.value=e:null),placeholder:e.placeholder,class:(0,l.normalizeClass)({fullWidth:(()=>void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title)()}),onBlur:y,ref_key:"field",ref:f},null,42,u)),[[l.vModelText,(0,l.unref)(d)]])])],40,i))}}),c=t(3744);const f=(0,c.Z)(m,[["__scopeId","data-v-8bda704a"]]);var d=f},9868:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865),n=t(1604);const r={class:"field"};var i=(0,l.defineComponent)({props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,i=(0,l.computed)((()=>(0,n.MM)((0,l.unref)(t.title)||"<span></span>","span"))),a=(0,l.computed)({get(){return(()=>void 0!==!t.modelValue&&null!==!t.modelValue&&(!t.modelValue)[Symbol.for("!")]?(!t.modelValue)[Symbol.for("!")]():!!t.modelValue)()},set(e){o("update:modelValue",e)}});return(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("label",r,[(0,l.withDirectives)((0,l.createElementVNode)("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=e=>(0,l.isRef)(a)?a.value=e:null)},null,512),[[l.vModelCheckbox,(0,l.unref)(a)]]),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(i))))]))}}),a=t(3744);const s=(0,a.Z)(i,[["__scopeId","data-v-43cf95d0"]]);var u=s},9905:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865),n=t(1037),r=t(9266);const i={class:"table"};var a=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>n.Z[r.ZP.theme].mergeAdjacent));return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["col",{mergeAdjacent:(0,l.unref)(o)}])},[(0,l.renderSlot)(e.$slots,"default")],2)]))}});const s=a;var u=s},274:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865),n=t(1037),r=t(9266);const i={class:"table"};var a=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>n.Z[r.ZP.theme].mergeAdjacent));return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["row",{mergeAdjacent:(0,l.unref)(o)}])},[(0,l.renderSlot)(e.$slots,"default")],2)]))}});const s=a;var u=s},264:function(e,o,t){"use strict";t.d(o,{Z:function(){return y}});var l=t(4865);const n={key:0,class:"material-icons pinned"};function r(e,o,t,r,i,a){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:o[0]||(o[0]=o=>e.isHovered=!0),onMouseleave:o[1]||(o[1]=o=>e.isHovered=!1),onClickCapture:o[2]||(o[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[(0,l.renderSlot)(e.$slots,"default",{},void 0,!0),e.elementComp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.elementComp),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[e.isShown?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tooltip",{top:e.unref(e.direction)===e.TooltipDirection.UP,left:e.unref(e.direction)===e.TooltipDirection.LEFT,right:e.unref(e.direction)===e.TooltipDirection.RIGHT,bottom:e.unref(e.direction)===e.TooltipDirection.DOWN,...e.unref(e.classes)}]),style:(0,l.normalizeStyle)([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},e.unref(e.style)??{}])},[e.showPin?((0,l.openBlock)(),(0,l.createElementBlock)("span",n,"push_pin")):(0,l.createCommentVNode)("",!0),e.comp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.comp),{key:1})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)])),_:1})],34)}var i=t(1037),a=t(6113),s=t(9266),u=t(1604),m=t(4096),c=(0,l.defineComponent)({props:{element:(0,u.P5)(Object),display:{type:(0,u.P5)(Object,String,Function),required:!0},style:(0,u.P5)(Object,String,Array),classes:(0,u.P5)(Object),direction:(0,u.P5)(Number),xoffset:(0,u.P5)(String),yoffset:(0,u.P5)(String),pinned:Object},setup(e){const{element:o,display:t,pinned:n}=(0,l.toRefs)(e),r=(0,l.ref)(!1),c=(0,l.computed)((()=>((0,u.Uv)(n)||r.value)&&f.value)),f=(0,u.KO)(t),d=(0,l.shallowRef)(null);function y(e){const o=n;e.shiftKey&&o&&(o.value=(()=>void 0!==o.value&&null!==o.value&&o.value[Symbol.for("!")]?o.value[Symbol.for("!")]():!o.value)(),e.stopPropagation(),e.preventDefault())}(0,l.watchEffect)((()=>{const e=(0,u.Uv)(o);d.value=(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()?null:(0,u.MM)((0,a.tZ)((()=>(0,u.sY)(e))))}));const b=(0,l.computed)((()=>(0,u.Uv)(n)&&i.Z[s.ZP.theme].showPin));return{TooltipDirection:m.A,isHovered:r,isShown:c,comp:f,elementComp:d,unref:l.unref,togglePinned:y,showPin:b}}}),f=t(3744);const d=(0,f.Z)(c,[["render",r],["__scopeId","data-v-adb5f26e"]]);var y=d},7634:function(e){function o(e){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}o.keys=function(){return[]},o.resolve=o,o.id=7634,e.exports=o},6453:function(e){"use strict";e.exports=JSON.parse('{"title":"Profectus","id":"profectus-demo","author":"thepaperpilot","discordName":"The Paper Pilot Community","discordLink":"https://discord.gg/WzejVAx","versionNumber":"0.0","versionTitle":"Initial Commit","allowGoBack":true,"defaultShowSmall":false,"defaultDecimalsShown":2,"useHeader":true,"banner":null,"logo":"Logo.png","initialTabs":["main","c"],"maxTickLength":3600,"offlineLimit":1,"enablePausing":true}')}},o={};function t(l){var n=o[l];if(void 0!==n)return n.exports;var r=o[l]={id:l,loaded:!1,exports:{}};return e[l].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}t.m=e,function(){var e=[];t.O=function(o,l,n,r){if(!l){var i=1/0;for(m=0;m<e.length;m++){l=e[m][0],n=e[m][1],r=e[m][2];for(var a=!0,s=0;s<l.length;s++)(!1&r||i>=r)&&Object.keys(t.O).every((function(e){return t.O[e](l[s])}))?l.splice(s--,1):(a=!1,r<i&&(i=r));if(a){e.splice(m--,1);var u=n();void 0!==u&&(o=u)}}return o}r=r||0;for(var m=e.length;m>0&&e[m-1][2]>r;m--)e[m]=e[m-1];e[m]=[l,n,r]}}(),function(){t.n=function(e){var o=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(o,{a:o}),o}}(),function(){t.d=function(e,o){for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})}}(),function(){t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)}}(),function(){t.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){t.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};t.O.j=function(o){return 0===e[o]};var o=function(o,l){var n,r,i=l[0],a=l[1],s=l[2],u=0;if(i.some((function(o){return 0!==e[o]}))){for(n in a)t.o(a,n)&&(t.m[n]=a[n]);if(s)var m=s(t)}for(o&&o(l);u<i.length;u++)r=i[u],t.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return t.O(m)},l=self["webpackChunkprofectus"]=self["webpackChunkprofectus"]||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))}();var l=t.O(void 0,[998],(function(){return t(6098)}));l=t.O(l)})(); -//# sourceMappingURL=app.bd74b40f.js.map \ No newline at end of file +(function(){var e={1037:function(e,o,t){"use strict";t.d(o,{b:function(){return n}});const l={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#eee","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var n;(function(e){e["Classic"]="classic",e["Paper"]="paper",e["Nordic"]="nordic",e["Aqua"]="aqua"})(n||(n={})),o["Z"]={classic:l,paper:{...l,variables:{...l.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...l,variables:{...l.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...l,variables:{...l.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}}},6113:function(e,o,t){"use strict";t.d(o,{wA:function(){return i},tj:function(){return a},QI:function(){return u},EE:function(){return m},tZ:function(){return c},Kf:function(){return f},Rh:function(){return d},bD:function(){return y}});var l=t(5613),n=t(9583),r=t(4865);const i=Symbol("Component"),a=Symbol("GatherProps");let s=0;function u(e="feature-"){return(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](s++):e+s++)()}var m;function c(e){return e[n.mM]=!0,e}function f(e,o=m.None){return e?m.Visible:o}function d(e,o,t){void 0===e[o]&&(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](void 0):void 0!=t)()&&(e[o]=t)}function y(e,o){const t=[],n=e=>{Object.keys(e).forEach((i=>{const a=e[i];a&&"object"===typeof a&&(a.type===o?t.push(a):(()=>a instanceof l.ZP!==void 0&&a instanceof l.ZP!==null&&(a instanceof l.ZP)[Symbol.for("!")]?(a instanceof l.ZP)[Symbol.for("!")]():!(a instanceof l.ZP))()&&(()=>void 0!==(0,r.isRef)(a)&&null!==(0,r.isRef)(a)&&(0,r.isRef)(a)[Symbol.for("!")]?(0,r.isRef)(a)[Symbol.for("!")]():!(0,r.isRef)(a))()&&n(a))}))};return n(e),t}(function(e){e[e["Visible"]=0]="Visible",e[e["Hidden"]=1]="Hidden",e[e["None"]=2]="None"})(m||(m={}))},4096:function(e,o,t){"use strict";t.d(o,{A:function(){return l},Z:function(){return s}});var l,n=t(264),r=t(6113),i=t(9583),a=t(4061);function s(e,o){o.pinnable&&((()=>"pinned"[Symbol.for("in")]?"pinned"[Symbol.for("in")](e):"pinned"in e)()?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),o.pinnable=!1):e.pinned=o.pinned=(0,a.ax)(!1)),(0,i.yB)(o,"display"),(0,i.yB)(o,"classes"),(0,i.yB)(o,"style"),(0,i.yB)(o,"direction"),(0,r.Rh)(o,"direction",l.UP),(0,i.yB)(o,"xoffset"),(0,i.yB)(o,"yoffset");const t=e[r.wA];e[r.wA]=n.Z;const s=e[r.tj].bind(e);return e[r.tj]=function(){const{display:e,classes:o,style:l,direction:n,xoffset:i,yoffset:a,pinned:u}=this;return{element:{[r.wA]:t,[r.tj]:s},display:e,classes:o,style:l,direction:n,xoffset:i,yoffset:a,pinned:u}}.bind(o),o}(function(e){e[e["UP"]=0]="UP",e[e["LEFT"]=1]="LEFT",e[e["RIGHT"]=2]="RIGHT",e[e["DOWN"]=3]="DOWN"})(l||(l={}))},7302:function(e,o,t){"use strict";t.r(o),t.d(o,{globalBus:function(){return m},startGameLoop:function(){return y}});var l=t(6453),n=t(5613),r=t(8111),i=t(4865),a=t(5967),s=t(9266),u=t(3032);const m=(0,r.i)();let c=null,f=null;function d(){const e=Date.now();let o=(()=>e-a.Z.time!==void 0&&e-a.Z.time!==null&&(e-a.Z.time)[Symbol.for("/")]?(e-a.Z.time)[Symbol.for("/")](1e3):(e-a.Z.time)/1e3)();a.Z.time=e;const t=o;if(u.Z.lastTenTicks.push(t),(()=>void 0!==u.Z.lastTenTicks.length&&null!==u.Z.lastTenTicks.length&&u.Z.lastTenTicks.length[Symbol.for(">")]?u.Z.lastTenTicks.length[Symbol.for(">")](10):u.Z.lastTenTicks.length>10)()&&(u.Z.lastTenTicks=u.Z.lastTenTicks.slice(1)),(!f?.value||!(()=>void 0!==a.Z.keepGoing&&null!==a.Z.keepGoing&&a.Z.keepGoing[Symbol.for("!")]?a.Z.keepGoing[Symbol.for("!")]():!a.Z.keepGoing)())&&!u.Z.hasNaN&&(o=Math.max(o,0),0!==a.Z.devSpeed)){if((()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("!=")]?a.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=a.Z.offlineTime)()){if(n.ZP.gt(a.Z.offlineTime,(()=>void 0!==l.offlineLimit&&null!==l.offlineLimit&&l.offlineLimit[Symbol.for("*")]?l.offlineLimit[Symbol.for("*")](3600):3600*l.offlineLimit)())&&(a.Z.offlineTime=(()=>void 0!==l.offlineLimit&&null!==l.offlineLimit&&l.offlineLimit[Symbol.for("*")]?l.offlineLimit[Symbol.for("*")](3600):3600*l.offlineLimit)()),n.ZP.gt(a.Z.offlineTime,0)&&(()=>void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!==")]?a.Z.devSpeed[Symbol.for("!==")](0):0!==a.Z.devSpeed)()){const e=Math.max((()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("/")]?a.Z.offlineTime[Symbol.for("/")](10):a.Z.offlineTime/10)(),o);a.Z.offlineTime=(()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("-")]?a.Z.offlineTime[Symbol.for("-")](e):a.Z.offlineTime-e)(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](e):o+e)()}else 0===a.Z.devSpeed&&(a.Z.offlineTime=(()=>void 0!==a.Z.offlineTime&&null!==a.Z.offlineTime&&a.Z.offlineTime[Symbol.for("+")]?a.Z.offlineTime[Symbol.for("+")](o):a.Z.offlineTime+o)());((()=>void 0!==a.Z.offlineProd&&null!==a.Z.offlineProd&&a.Z.offlineProd[Symbol.for("!")]?a.Z.offlineProd[Symbol.for("!")]():!a.Z.offlineProd)()||n.ZP.lt(a.Z.offlineTime,0))&&(a.Z.offlineTime=null)}o=Math.min(o,l.maxTickLength),(()=>void 0!==a.Z.devSpeed&&null!==a.Z.devSpeed&&a.Z.devSpeed[Symbol.for("!=")]?a.Z.devSpeed[Symbol.for("!=")](void 0):void 0!=a.Z.devSpeed)()&&(o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](a.Z.devSpeed):o*a.Z.devSpeed)()),(()=>void 0!==Number.isFinite(o)&&null!==Number.isFinite(o)&&Number.isFinite(o)[Symbol.for("!")]?Number.isFinite(o)[Symbol.for("!")]():!Number.isFinite(o))()&&(o=1e308),n.ZP.eq(o,0)||(a.Z.timePlayed=(()=>void 0!==a.Z.timePlayed&&null!==a.Z.timePlayed&&a.Z.timePlayed[Symbol.for("+")]?a.Z.timePlayed[Symbol.for("+")](o):a.Z.timePlayed+o)(),(()=>void 0!==Number.isFinite(a.Z.timePlayed)&&null!==Number.isFinite(a.Z.timePlayed)&&Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]?Number.isFinite(a.Z.timePlayed)[Symbol.for("!")]():!Number.isFinite(a.Z.timePlayed))()&&(a.Z.timePlayed=1e308),m.emit("update",o,t),s.ZP.unthrottled?(requestAnimationFrame(d),(()=>void 0!==c&&null!==c&&c[Symbol.for("!=")]?c[Symbol.for("!=")](null):null!=c)()&&(clearInterval(c),c=null)):(()=>void 0!==c&&null!==c&&c[Symbol.for("==")]?c[Symbol.for("==")](null):null==c)()&&(c=setInterval(d,50)))}}async function y(){f=(await Promise.resolve().then(t.bind(t,2561))).hasWon,(0,i.watch)(f,(e=>{e&&m.emit("gameWon")})),s.ZP.unthrottled?requestAnimationFrame(d):c=setInterval(d,50)}},4061:function(e,o,t){"use strict";t.d(o,{n9:function(){return u},nY:function(){return m},ax:function(){return y}});t(1703);var l=t(7302),n=t(5613),r=t(3273),i=t(3577),a=t(4865),s=t(9365);const u=Symbol("PersistentState"),m=Symbol("DefaultValue"),c=Symbol("StackTrace"),f=Symbol("Deleted");function d(){return(new Error).stack?.split("\n").slice(3,5).map((e=>e.trim())).join("\n")||""}function y(e){const o=(0,a.isRef)(e)?e:(0,a.ref)(e);return o[u]=o,o[m]=(0,a.isRef)(e)?e.value:e,o[c]=d(),o[f]=!1,0===s.addingLayers.length?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",o,(()=>"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](o[c]):"\nCreated at:\n"+o[c])()):s.persistentRefs[s.addingLayers[(()=>void 0!==s.addingLayers.length&&null!==s.addingLayers.length&&s.addingLayers.length[Symbol.for("-")]?s.addingLayers.length[Symbol.for("-")](1):s.addingLayers.length-1)()]].add(o),o}l.globalBus.on("addLayer",((e,o)=>{const t=[],l=(d,y=[])=>{let b=!1;return Object.keys(d).forEach((h=>{const p=d[h];if(p&&"object"===typeof p)if((()=>void 0!==u&&null!==u&&u[Symbol.for("in")]?u[Symbol.for("in")](p):u in p)()){if(b=!0,p[f])return void console.warn("Deleted persistent ref present in returned object. Ignoring...",p,(()=>"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](p[c]):"\nCreated at:\n"+p[c])());s.persistentRefs[e.id].delete((()=>void 0!==r.Le&&null!==r.Le&&r.Le[Symbol.for("in")]?r.Le[Symbol.for("in")](p):r.Le in p)()?p[r.Le]:p);const t=y.reduce(((e,o)=>((()=>o in e!==void 0&&o in e!==null&&(o in e)[Symbol.for("!")]?(o in e)[Symbol.for("!")]():!(o in e))()&&(e[o]={}),e[o])),o),l=t[h];t[h]=p[u],(0,a.isReactive)(t)?(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](null):null!=l)()?t[h]=l:t[h]=p[m]:(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](null):null!=l)()?t[h].value=l:t[h].value=p[m]}else if((()=>p instanceof n.ZP!==void 0&&p instanceof n.ZP!==null&&(p instanceof n.ZP)[Symbol.for("!")]?(p instanceof n.ZP)[Symbol.for("!")]():!(p instanceof n.ZP))()&&(()=>void 0!==(0,a.isRef)(p)&&null!==(0,a.isRef)(p)&&(0,a.isRef)(p)[Symbol.for("!")]?(0,a.isRef)(p)[Symbol.for("!")]():!(0,a.isRef)(p))()&&(()=>void 0!==t.includes(p)&&null!==t.includes(p)&&t.includes(p)[Symbol.for("!")]?t.includes(p)[Symbol.for("!")]():!t.includes(p))()){"symbol"===typeof p.type&&t.push(p);const e=l(p,[...y,h]);e&&((0,i.kJ)(p)&&(()=>void 0!==(0,i.kJ)(d)&&null!==(0,i.kJ)(d)&&(0,i.kJ)(d)[Symbol.for("!")]?(0,i.kJ)(d)[Symbol.for("!")]():!(0,i.kJ)(d))()?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",(()=>void 0!==r.Le&&null!==r.Le&&r.Le[Symbol.for("in")]?r.Le[Symbol.for("in")](d):r.Le in d)()?d[r.Le]:d,h):b=!0)}})),b};l(e),s.persistentRefs[e.id].forEach((o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,(()=>"\nCreated at:\n"[Symbol.for("+")]?"\nCreated at:\n"[Symbol.for("+")](o[c]):"\nCreated at:\n"+o[c])())})),s.persistentRefs[e.id].clear()}))},5967:function(e,o,t){"use strict";t.d(o,{U:function(){return u}});var l=t(5613),n=t(1349),r=t(3273),i=t(4865),a=t(3032);const s=(0,i.reactive)({id:"",devSpeed:null,name:"",tabs:[],time:(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function u(e){return JSON.stringify(e,((e,o)=>(0,i.unref)(o)))}const m={get(e,o){if(o===r.Le||o===r.c4)return e[o];const t=e[r.Le][o];if((()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")]("value"):"value"!==o)()&&(0,n.PO)(t)&&(()=>t instanceof l.ZP!==void 0&&t instanceof l.ZP!==null&&(t instanceof l.ZP)[Symbol.for("!")]?(t instanceof l.ZP)[Symbol.for("!")]():!(t instanceof l.ZP))()){if((()=>void 0!==t&&null!==t&&t[Symbol.for("!==")]?t[Symbol.for("!==")](e[o]?.[r.Le]):t!==e[o]?.[r.Le])()){const l=[...e[r.c4],o];e[o]=new Proxy({[r.Le]:t,[r.c4]:l},m)}return e[o]}return t},set(e,o,t,n){if((()=>void 0!==a.Z.hasNaN&&null!==a.Z.hasNaN&&a.Z.hasNaN[Symbol.for("!")]?a.Z.hasNaN[Symbol.for("!")]():!a.Z.hasNaN)()&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))){const t=e[r.Le][o];if((()=>void 0!==("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&null!==("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]?("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]():!("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag))))())throw s.autosave=!1,a.Z.hasNaN=!0,a.Z.NaNPath=[...e[r.c4],o],a.Z.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[r.c4],o],e[r.Le]),"Attempted to set NaN value. See above for details"}return e[r.Le][o]=t,!0},ownKeys(e){return Reflect.ownKeys(e[r.Le])},has(e,o){return Reflect.has(e[r.Le],o)},getOwnPropertyDescriptor(e,o){return Object.getOwnPropertyDescriptor(e[r.Le],o)}};o["Z"]=window.player=new Proxy({[r.Le]:s,[r.c4]:["player"]},m)},9266:function(e,o,t){"use strict";t.d(o,{ri:function(){return u},V$:function(){return m},QV:function(){return c},II:function(){return f},fw:function(){return d},t:function(){return y}});t(2801);var l=t(6453),n=t(1037),r=t(7302),i=t(463),a=t(4865);const s=(0,a.reactive)({active:"",saves:[],showTPS:!0,theme:n.b.Nordic,unthrottled:!1});function u(){try{const e=localStorage.getItem(l.id);if((()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](""):""!==e)()){const o=JSON.parse(decodeURIComponent(escape(atob(e))));"object"===typeof o&&Object.assign(s,o)}r.globalBus.emit("loadSettings",s)}catch{}}(0,a.watch)(s,(e=>localStorage.setItem(l.id,btoa(unescape(encodeURIComponent(JSON.stringify(e)))))),{deep:!0}),o["ZP"]=window.settings=s;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:n.b.Nordic};r.globalBus.emit("loadSettings",e),Object.assign(s,e),(0,i.y6)()};const m=(0,a.reactive)([]);function c(e){m.push(e)}const f=(0,a.reactive)([]);function d(e){f.push(e)}const y=(0,a.reactive)([])},3032:function(e,o,t){"use strict";var l=t(4865);o["Z"]=window.state=(0,l.shallowReactive)({lastTenTicks:[],hasNaN:!1,NaNPath:[]})},6098:function(e,o,t){"use strict";var l=t(4865),n=t(6113),r=t(1604),i=t(6453),a=t(9365),s=t(5967);function u(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Context");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"layer-container",style:(0,l.normalizeStyle)({"--layer-color":e.unref(e.color)})},[e.showGoBack?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,class:"goBack",onClick:o[0]||(o[0]=(...o)=>e.goBack&&e.goBack(...o))},"←")):(0,l.createCommentVNode)("",!0),e.minimized.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"layer-tab minimized",onClick:o[1]||(o[1]=o=>e.minimized.value=!1)},[(0,l.createElementVNode)("div",null,(0,l.toDisplayString)(e.unref(e.name)),1)])):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:2,class:(0,l.normalizeClass)(["layer-tab",[{showGoBack:e.showGoBack},e.unref(e.classes)]]),style:(0,l.normalizeStyle)(e.unref(e.style))},[(0,l.createVNode)(a,{ref:"contextRef"},{default:(0,l.withCtx)((()=>[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component)))])),_:1},512)],6)),e.unref(e.minimizable)?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:3,class:"minimize",onClick:o[2]||(o[2]=o=>e.minimized.value=!0)}," ▼ ")):(0,l.createCommentVNode)("",!0)],4)}var m=t(5053),c=(0,l.defineComponent)({components:{Context:m.Z},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:(0,r.P5)(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:(0,r.P5)(Number,String),required:!0},name:{type:(0,r.P5)(String),required:!0},color:(0,r.P5)(String),style:(0,r.P5)(String,Object,Array),classes:(0,r.P5)(Object),minimizable:(0,r.P5)(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:o,index:t,minimized:n,minWidth:a,tab:u}=(0,l.toRefs)(e),m=(0,r.vq)(o),c=(0,l.computed)((()=>i.allowGoBack&&(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for(">")]?t.value[Symbol.for(">")](0):t.value>0)()&&(()=>void 0!==n.value&&null!==n.value&&n.value[Symbol.for("!")]?n.value[Symbol.for("!")]():!n.value)()));function f(){s.Z.tabs.splice((0,l.unref)(e.index),1/0)}(0,l.nextTick)((()=>y(n.value,(0,l.unref)(a.value)))),(0,l.watch)([n,(0,r.o9)(a)],(([e,o])=>y(e,o)));const d=(0,l.ref)(null);function y(e,o){const t="number"===typeof o||Number.isNaN(parseInt(o))?(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]("px"):o+"px")():o,l=u.value();(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](void 0):void 0!=l)()&&(e?(l.style.flexGrow="0",l.style.flexShrink="0",l.style.width="60px",l.style.minWidth=l.style.flexBasis="",l.style.margin="0"):(l.style.flexGrow="",l.style.flexShrink="",l.style.width="",l.style.minWidth=l.style.flexBasis=`${t}px`,l.style.margin=""))}return(0,l.watch)((()=>d.value?.nodes),(o=>{o&&(e.nodes.value=o)})),{component:m,showGoBack:c,contextRef:d,unref:l.unref,goBack:f}}}),f=t(3744);const d=(0,f.Z)(c,[["render",u],["__scopeId","data-v-66dc9e3e"]]);var y=d,b=t(6948);const h=e=>((0,l.pushScopeId)("data-v-5f8298e6"),e=e(),(0,l.popScopeId)(),e),p=h((()=>(0,l.createElementVNode)("h2",null,"Changelog",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),g=h((()=>(0,l.createElementVNode)("details",{open:""},[(0,l.createElementVNode)("summary",null,[(0,l.createTextVNode)("v0.0 Initial Commit - "),(0,l.createElementVNode)("time",null,"2021-09-04")]),(0,l.createTextVNode)(" This is the first release :D "),(0,l.createElementVNode)("ul",null,[(0,l.createElementVNode)("li",{class:"feature"},"Did everything"),(0,l.createElementVNode)("li",{class:"fix"},"Had some fun"),(0,l.createElementVNode)("li",{class:"breaking"},"Removed everything"),(0,l.createElementVNode)("li",{class:"balancing"},"Created some bugs to fix later")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var v=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);return o({open(){t.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[p])),body:(0,l.withCtx)((()=>[g])),_:1},8,["modelValue"]))}});const S=(0,f.Z)(v,[["__scopeId","data-v-5f8298e6"]]);var N=S,k=t(9266),V=t(5613);const x=e=>((0,l.pushScopeId)("data-v-3eb46986"),e=e(),(0,l.popScopeId)(),e),M={class:"info-modal-header"},C=["src","alt"],w={class:"info-modal-title"},Z={key:0},B={key:0},P={key:0},E=x((()=>(0,l.createElementVNode)("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),T=x((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),F=x((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),I=["href"],D=x((()=>(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),R=x((()=>(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,l.createTextVNode)(" The Paper Pilot Community ")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),O=x((()=>(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,l.createTextVNode)(" The Modding Tree ")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),_=x((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var j=(0,l.defineComponent)({props:{changelog:null},setup(e,{expose:o}){const t=e,{title:a,logo:u,author:m,discordName:c,discordLink:f,versionNumber:d,versionTitle:y}=i,h=(0,l.toRefs)(t),p=(0,l.ref)(!1),g=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),v=(0,l.computed)((()=>(0,r.MM)((0,n.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.II.map(r.sY)]))))));function S(){(0,l.unref)(h.changelog)?.open()}return o({open(){p.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:p.value,"onUpdate:modelValue":o[0]||(o[0]=e=>p.value=e)},{header:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",M,[(0,l.unref)(u)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,class:"info-modal-logo",src:(0,l.unref)(u),alt:(0,l.unref)(a)},null,8,C)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",w,[(0,l.createElementVNode)("h2",null,(0,l.toDisplayString)((0,l.unref)(a)),1),(0,l.createElementVNode)("h4",null,[(0,l.createTextVNode)((()=>" v"[Symbol.for("+")]?" v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(d))):" v"+(0,l.toDisplayString)((0,l.unref)(d)))(),1),(0,l.unref)(y)?((0,l.openBlock)(),(0,l.createElementBlock)("span",Z,(()=>": "[Symbol.for("+")]?": "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(y))):": "+(0,l.toDisplayString)((0,l.unref)(y)))(),1)):(0,l.createCommentVNode)("",!0)])])])])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createElementBlock)("div",B,[(0,l.unref)(m)?((0,l.openBlock)(),(0,l.createElementBlock)("div",P,(()=>"By "[Symbol.for("+")]?"By "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(m))):"By "+(0,l.toDisplayString)((0,l.unref)(m)))(),1)):(0,l.createCommentVNode)("",!0),E,T,(0,l.createElementVNode)("div",{class:"link",onClick:S},"Changelog"),F,(0,l.createElementVNode)("div",null,[(()=>void 0!==(0,l.unref)(f)&&null!==(0,l.unref)(f)&&(0,l.unref)(f)[Symbol.for("!==")]?(0,l.unref)(f)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(f))()?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:0,href:(0,l.unref)(f),class:"info-modal-discord-link"},[D,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(c))):" "+(0,l.toDisplayString)((0,l.unref)(c)))(),1)],8,I)):(0,l.createCommentVNode)("",!0)]),R,O,_,(0,l.createElementVNode)("div",null,(()=>"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(g))):"Time Played: "+(0,l.toDisplayString)((0,l.unref)(g)))(),1),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(v))))])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const A=(0,f.Z)(j,[["__scopeId","data-v-3eb46986"]]);var U=A,q=t(1037),z=t(1349),L=t(3525),G=t(9868),W=t(264);const H=e=>((0,l.pushScopeId)("data-v-85d7ae40"),e=e(),(0,l.popScopeId)(),e),$=H((()=>(0,l.createElementVNode)("div",{class:"header"},[(0,l.createElementVNode)("h2",null,"Options")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Y=H((()=>(0,l.createElementVNode)("hr",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var K=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);o({open(){t.value=!0}});const a=Object.keys(q.Z).map((e=>({label:(0,z.IJ)(e),value:e}))),u=(0,l.computed)((()=>(0,r.MM)((0,n.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.V$.map(r.sY)])))))),{showTPS:m,theme:c,unthrottled:f}=(0,l.toRefs)(k.ZP),{autosave:d,offlineProd:y}=(0,l.toRefs)(s.Z),h=(0,l.computed)({get(){return 0===s.Z.devSpeed},set(e){s.Z.devSpeed=e?0:null}}),p=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Offline Production"),(0,l.createVNode)(W.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),g=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Autosave"),(0,l.createVNode)(W.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),v=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Pause game"),(0,l.createVNode)(W.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})])));return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:t.value,"onUpdate:modelValue":o[6]||(o[6]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[$])),body:(0,l.withCtx)((()=>[(0,l.createVNode)(L.Z,{title:"Theme",options:(0,l.unref)(a),modelValue:(0,l.unref)(c),"onUpdate:modelValue":o[0]||(o[0]=e=>(0,l.isRef)(c)?c.value=e:null)},null,8,["options","modelValue"]),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(u)))),(0,l.createVNode)(G.Z,{title:"Show TPS",modelValue:(0,l.unref)(m),"onUpdate:modelValue":o[1]||(o[1]=e=>(0,l.isRef)(m)?m.value=e:null)},null,8,["modelValue"]),Y,(0,l.createVNode)(G.Z,{title:"Unthrottled",modelValue:(0,l.unref)(f),"onUpdate:modelValue":o[2]||(o[2]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["modelValue"]),(0,l.createVNode)(G.Z,{title:(0,l.unref)(p),modelValue:(0,l.unref)(y),"onUpdate:modelValue":o[3]||(o[3]=e=>(0,l.isRef)(y)?y.value=e:null)},null,8,["title","modelValue"]),(0,l.createVNode)(G.Z,{title:(0,l.unref)(g),modelValue:(0,l.unref)(d),"onUpdate:modelValue":o[4]||(o[4]=e=>(0,l.isRef)(d)?d.value=e:null)},null,8,["title","modelValue"]),(0,l.unref)(i).enablePausing?((0,l.openBlock)(),(0,l.createBlock)(G.Z,{key:0,title:(0,l.unref)(v),modelValue:(0,l.unref)(h),"onUpdate:modelValue":o[5]||(o[5]=e=>(0,l.isRef)(h)?h.value=e:null)},null,8,["title","modelValue"])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const J=(0,f.Z)(K,[["__scopeId","data-v-85d7ae40"]]);var Q=J,X=(t(2801),t(463)),ee=t(4520);const oe={key:0},te=["onClick","disabled"],le={key:0},ne=["onClick"];var re=(0,l.defineComponent)({props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:o}){const t=e,n=(0,l.toRefs)(t),r=(0,l.ref)(!1);function i(){(0,l.unref)(n.skipConfirm)?o("click"):(r.value&&o("click"),r.value=(()=>void 0!==r.value&&null!==r.value&&r.value[Symbol.for("!")]?r.value[Symbol.for("!")]():!r.value)())}function a(){r.value=!1}return(0,l.watch)(r,(e=>{o("confirmingChanged",e)})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:(0,l.normalizeClass)(["container",{confirming:r.value}])},[r.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",oe,"Are you sure?")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("button",{onClick:(0,l.withModifiers)(i,["stop"]),class:"button danger",disabled:e.disabled},[r.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",le,"Yes")):(0,l.renderSlot)(o.$slots,"default",{key:1})],8,te),r.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"button",onClick:(0,l.withModifiers)(a,["stop"])},"No",8,ne)):(0,l.createCommentVNode)("",!0)],2))}});const ie=(0,f.Z)(re,[["__scopeId","data-v-bf59fca4"]]);var ae=ie;const se=["onClick"];var ue=(0,l.defineComponent)({props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:o}){const t=(0,l.ref)(!1),n=(0,l.ref)(null);function r(){o("click"),n.value&&clearTimeout(n.value),t.value=!1,(0,l.nextTick)((()=>{t.value=!0,n.value=setTimeout((()=>t.value=!1),500)}))}return(o,n)=>((0,l.openBlock)(),(0,l.createElementBlock)("button",{onClick:(0,l.withModifiers)(r,["stop"]),class:(0,l.normalizeClass)(["feedback",{activated:t.value,left:e.left}])},[(0,l.renderSlot)(o.$slots,"default")],10,se))}});const me=(0,f.Z)(ue,[["__scopeId","data-v-5bbcedd3"]]);var ce=me;const fe=e=>((0,l.pushScopeId)("data-v-6a0cf7ac"),e=e(),(0,l.popScopeId)(),e),de=fe((()=>(0,l.createElementVNode)("div",{class:"handle material-icons"},"drag_handle",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ye={key:0,class:"actions"},be=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"content_paste",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),he=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"content_copy",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),pe=[he],ge=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"edit",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ve=[ge],Se=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons",style:{margin:"-2px"}},"delete",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ne={key:1,class:"actions"},ke=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"check",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ve=[ke],xe=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"close",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Me=[xe],Ce={key:2,class:"details"},we={class:"save-version"},Ze=fe((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Be={key:0},Pe={key:3,class:"details"},Ee={key:4,class:"details error"},Te=fe((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Fe=(0,l.defineComponent)({props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:o}){const t=e,{save:n}=(0,l.toRefs)(t),r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=(0,l.ref)(!1),a=(0,l.ref)(!1),u=(0,l.ref)("");(0,l.watch)(i,(()=>u.value=n.value.name||""));const m=(0,l.computed)((()=>n.value&&n.value.id===s.Z.id)),c=(0,l.computed)((()=>m.value?s.Z.time:n.value&&n.value.time||0));function f(){o("editName",u.value),i.value=!1}return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["save",{active:(0,l.unref)(m)}])},[de,(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",ye,[(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createBlock)(ce,{key:0,onClick:t[0]||(t[0]=e=>o("export")),class:"button",left:""},{default:(0,l.withCtx)((()=>[be])),_:1})):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,onClick:t[1]||(t[1]=e=>o("duplicate")),class:"button"},pe)):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:2,onClick:t[2]||(t[2]=e=>i.value=(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()),class:"button"},ve)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(ae,{disabled:(0,l.unref)(m),onClick:t[3]||(t[3]=e=>o("delete")),onConfirmingChanged:t[4]||(t[4]=e=>a.value=e)},{default:(0,l.withCtx)((()=>[Se])),_:1},8,["disabled"])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ne,[(0,l.createElementVNode)("button",{onClick:f,class:"button"},Ve),(0,l.createElementVNode)("button",{onClick:t[5]||(t[5]=e=>i.value=(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()),class:"button"},Me)])),(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ce,[(0,l.createElementVNode)("button",{class:"button open",onClick:t[6]||(t[6]=e=>o("open"))},[(0,l.createElementVNode)("h3",null,(0,l.toDisplayString)((0,l.unref)(n).name),1)]),(0,l.createElementVNode)("span",we,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(n).modVersion)):"v"+(0,l.toDisplayString)((0,l.unref)(n).modVersion))(),1),Ze,(0,l.unref)(c)?((0,l.openBlock)(),(0,l.createElementBlock)("div",Be,(()=>"Last played "[Symbol.for("+")]?"Last played "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(r).format((0,l.unref)(c)))):"Last played "+(0,l.toDisplayString)((0,l.unref)(r).format((0,l.unref)(c))))(),1)):(0,l.createCommentVNode)("",!0)])):(()=>void 0!==(0,l.unref)(n).error&&null!==(0,l.unref)(n).error&&(0,l.unref)(n).error[Symbol.for("==")]?(0,l.unref)(n).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(n).error)()&&i.value?((0,l.openBlock)(),(0,l.createElementBlock)("div",Pe,[(0,l.createVNode)(ee.Z,{modelValue:u.value,"onUpdate:modelValue":t[7]||(t[7]=e=>u.value=e),class:"editname",onSubmit:f},null,8,["modelValue"])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ee,[(0,l.createTextVNode)((()=>" Error: Failed to load save with id "[Symbol.for("+")]?" Error: Failed to load save with id "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(n).id)):" Error: Failed to load save with id "+(0,l.toDisplayString)((0,l.unref)(n).id))(),1),Te,(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(n).error),1)]))],2))}});const Ie=(0,f.Z)(Fe,[["__scopeId","data-v-6a0cf7ac"]]);var De=Ie,Re=t(9980),Oe=t.n(Re);const _e=e=>((0,l.pushScopeId)("data-v-7d95f59e"),e=e(),(0,l.popScopeId)(),e),je=_e((()=>(0,l.createElementVNode)("h2",null,"Saves Manager",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ae={class:"modal-footer"},Ue={class:"field"},qe=_e((()=>(0,l.createElementVNode)("span",{class:"field-title"},"Create Save",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ze={class:"field-buttons"},Le={class:"footer"},Ge=_e((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var We=(0,l.defineComponent)({setup(e,{expose:o}){const n=(0,l.ref)(!1),r=(0,l.ref)(null);o({open(){n.value=!0}});const i=(0,l.ref)(!1),a=(0,l.ref)("");(0,l.watch)(a,(e=>{e?(0,l.nextTick)((()=>{try{const o=JSON.parse(decodeURIComponent(escape(atob(e))));if((()=>void 0!==typeof o&&null!==typeof o&&(typeof o)[Symbol.for("!==")]?(typeof o)[Symbol.for("!==")]("object"):"object"!==typeof o)())return void(i.value=!0);const t=(0,X.QI)();o.id=t,localStorage.setItem(t,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),a.value="",i.value=!1,k.ZP.saves.push(t)}catch(o){i.value=!0}})):i.value=!1}));let u=t(7634),m=(0,l.ref)(u.keys().reduce(((e,o)=>(e.push({label:o.slice(2,(()=>4[Symbol.for("minus")]?4[Symbol.for("minus")]():-4)()),value:u(o).default}),e)),[]));const c=(0,l.shallowReactive)({});function f(e){if((()=>void 0!==c[e]&&null!==c[e]&&c[e][Symbol.for("==")]?c[e][Symbol.for("==")](null):null==c[e])()){const t=localStorage.getItem(e);if((()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)())c[e]={error:"Save doesn't exist in localStorage",id:e};else if("dW5kZWZpbmVk"===t)c[e]={error:"Save is undefined",id:e};else try{c[e]={...JSON.parse(decodeURIComponent(escape(atob(t)))),id:e}}catch(o){c[e]={error:o,id:e},console.warn(`SavesManager: Failed to load info about save with id ${e}:\n${o}\n${t}`)}}return c[e]}(0,l.watch)(n,(e=>{e&&Object.keys(c).forEach((e=>(()=>void 0!==c&&null!==c&&c[Symbol.for("delete")]?c[Symbol.for("delete")]("key"):delete c.key)()))}));const d=(0,l.computed)((()=>k.ZP.saves.reduce(((e,o)=>(e[o]=f(o),e)),{})));function y(e){let o;o=s.Z.id===e?(0,X.a1)():btoa(unescape(encodeURIComponent(JSON.stringify(d.value[e]))));const t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}function h(e){s.Z.id===e&&(0,X.a1)();const o={...d.value[e],id:(0,X.QI)()};localStorage.setItem(o.id,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),k.ZP.saves.push(o.id)}function p(e){k.ZP.saves=k.ZP.saves.filter((o=>(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](e):o!==e)())),localStorage.removeItem(e),c[e]=void 0}function g(e){d.value[s.Z.id].time=s.Z.time,(0,X.a1)(),(0,X.uW)(d.value[e]),c[e]=void 0}function v(e){const o=JSON.parse(decodeURIComponent(escape(atob(e))));o.id=(0,X.QI)(),localStorage.setItem(o.id,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),k.ZP.saves.push(o.id)}function S(e,o){const t=d.value[e];t&&(t.name=o,s.Z.id===e?(s.Z.name=o,(0,X.a1)()):(localStorage.setItem(e,btoa(unescape(encodeURIComponent(JSON.stringify(t))))),c[e]=void 0))}return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:n.value,"onUpdate:modelValue":o[4]||(o[4]=e=>n.value=e),ref_key:"modal",ref:r},{header:(0,l.withCtx)((()=>[je])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(Oe()),{key:0,list:(0,l.unref)(k.ZP).saves,handle:".handle",itemKey:e=>e},{item:(0,l.withCtx)((({element:e})=>[(0,l.createVNode)(De,{save:(0,l.unref)(d)[e],onOpen:o=>g(e),onExport:o=>y(e),onEditName:o=>S(e,o),onDuplicate:o=>h(e),onDelete:o=>p(e)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])])),_:1},8,["list","itemKey"])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",Ae,[(0,l.createVNode)(ee.Z,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=e=>a.value=e),title:"Import Save",placeholder:"Paste your save here!",class:(0,l.normalizeClass)({importingFailed:i.value})},null,8,["modelValue","class"]),(0,l.createElementVNode)("div",Ue,[qe,(0,l.createElementVNode)("div",ze,[(0,l.createElementVNode)("button",{class:"button",onClick:o[1]||(o[1]=(...e)=>(0,l.unref)(X.xM)&&(0,l.unref)(X.xM)(...e))},"New Game"),(()=>void 0!==Object.keys((0,l.unref)(m)).length&&null!==Object.keys((0,l.unref)(m)).length&&Object.keys((0,l.unref)(m)).length[Symbol.for(">")]?Object.keys((0,l.unref)(m)).length[Symbol.for(">")](0):Object.keys((0,l.unref)(m)).length>0)()?((0,l.openBlock)(),(0,l.createBlock)(L.Z,{key:0,options:(0,l.unref)(m),modelValue:void 0,"onUpdate:modelValue":o[2]||(o[2]=e=>v(e)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,l.createCommentVNode)("",!0)])]),(0,l.createElementVNode)("div",Le,[Ge,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:o[3]||(o[3]=e=>n.value=!1)}," Close ")])])])),_:1},8,["modelValue"]))}});const He=(0,f.Z)(We,[["__scopeId","data-v-7d95f59e"]]);var $e=He,Ye=t(4096);const Ke=e=>((0,l.pushScopeId)("data-v-71847eca"),e=e(),(0,l.popScopeId)(),e),Je=["src","alt"],Qe={key:1,class:"title"},Xe=Ke((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),eo={class:"discord"},oo={class:"discord-links"},to={key:0},lo=["href"],no=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ro=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),io={href:"https://forums.moddingtree.com/",target:"_blank"},ao=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),so=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),uo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),mo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),co=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),fo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),yo=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),bo={href:"https://forums.moddingtree.com/",target:"_blank"},ho=Ke((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),po={class:"discord"},go={class:"discord-links"},vo={key:0},So=["href"],No=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ko=Ke((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Vo=(0,l.defineComponent)({setup(e){const o=(0,l.ref)(null),t=(0,l.ref)(null),n=(0,l.ref)(null),r=(0,l.ref)(null),{useHeader:a,banner:s,title:u,discordName:m,discordLink:c,versionNumber:f}=i;function d(){window.open(c,"mywindow")}return(e,i)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.unref)(a)?((0,l.openBlock)(),(0,l.createElementBlock)("div",(0,l.mergeProps)({key:0,class:"nav"},e.$attrs),[(0,l.unref)(s)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,src:(0,l.unref)(s),class:"banner",alt:(0,l.unref)(u)},null,8,Je)):((0,l.openBlock)(),(0,l.createElementBlock)("div",Qe,(0,l.toDisplayString)((0,l.unref)(u)),1)),(0,l.createElementVNode)("div",{onClick:i[0]||(i[0]=e=>r.value?.open()),class:"version-container"},[(0,l.createVNode)(W.Z,{display:"Changelog",direction:(0,l.unref)(Ye.A).DOWN,class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1},8,["direction"])]),Xe,(0,l.createElementVNode)("div",eo,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",oo,[(()=>void 0!==(0,l.unref)(c)&&null!==(0,l.unref)(c)&&(0,l.unref)(c)[Symbol.for("!==")]?(0,l.unref)(c)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(c))()?((0,l.openBlock)(),(0,l.createElementBlock)("li",to,[(0,l.createElementVNode)("a",{href:(0,l.unref)(c),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(m)),9,lo)])):(0,l.createCommentVNode)("",!0),no,ro])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",io,[(0,l.createVNode)(W.Z,{display:"Forums",direction:(0,l.unref)(Ye.A).DOWN,yoffset:"5px"},{default:(0,l.withCtx)((()=>[ao])),_:1},8,["direction"])])]),(0,l.createElementVNode)("div",{onClick:i[1]||(i[1]=e=>o.value?.open())},[(0,l.createVNode)(W.Z,{display:"Info",direction:(0,l.unref)(Ye.A).DOWN,class:"info"},{default:(0,l.withCtx)((()=>[so])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[2]||(i[2]=e=>t.value?.open())},[(0,l.createVNode)(W.Z,{display:"Saves",direction:(0,l.unref)(Ye.A).DOWN,xoffset:"-20px"},{default:(0,l.withCtx)((()=>[uo])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[3]||(i[3]=e=>n.value?.open())},[(0,l.createVNode)(W.Z,{display:"Options",direction:(0,l.unref)(Ye.A).DOWN,xoffset:"-66px"},{default:(0,l.withCtx)((()=>[mo])),_:1},8,["direction"])])],16)):((0,l.openBlock)(),(0,l.createElementBlock)("div",(0,l.mergeProps)({key:1,class:"overlay-nav"},e.$attrs),[(0,l.createElementVNode)("div",{onClick:i[4]||(i[4]=e=>r.value?.open()),class:"version-container"},[(0,l.createVNode)(W.Z,{display:"Changelog",direction:(0,l.unref)(Ye.A).RIGHT,xoffset:"25%",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[5]||(i[5]=e=>t.value?.open())},[(0,l.createVNode)(W.Z,{display:"Saves",direction:(0,l.unref)(Ye.A).RIGHT},{default:(0,l.withCtx)((()=>[co])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[6]||(i[6]=e=>n.value?.open())},[(0,l.createVNode)(W.Z,{display:"Options",direction:(0,l.unref)(Ye.A).RIGHT},{default:(0,l.withCtx)((()=>[fo])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",{onClick:i[7]||(i[7]=e=>o.value?.open())},[(0,l.createVNode)(W.Z,{display:"Info",direction:(0,l.unref)(Ye.A).RIGHT},{default:(0,l.withCtx)((()=>[yo])),_:1},8,["direction"])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",bo,[(0,l.createVNode)(W.Z,{display:"Forums",direction:(0,l.unref)(Ye.A).RIGHT,xoffset:"7px"},{default:(0,l.withCtx)((()=>[ho])),_:1},8,["direction"])])]),(0,l.createElementVNode)("div",po,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",go,[(()=>void 0!==(0,l.unref)(c)&&null!==(0,l.unref)(c)&&(0,l.unref)(c)[Symbol.for("!==")]?(0,l.unref)(c)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(c))()?((0,l.openBlock)(),(0,l.createElementBlock)("li",vo,[(0,l.createElementVNode)("a",{href:(0,l.unref)(c),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(m)),9,So)])):(0,l.createCommentVNode)("",!0),No,ko])])],16)),(0,l.createVNode)(U,{ref_key:"info",ref:o,changelog:r.value},null,8,["changelog"]),(0,l.createVNode)($e,{ref_key:"savesManager",ref:t},null,512),(0,l.createVNode)(Q,{ref_key:"options",ref:n},null,512),(0,l.createVNode)(N,{ref_key:"changelog",ref:r},null,512)],64))}});const xo=(0,f.Z)(Vo,[["__scopeId","data-v-71847eca"]]);var Mo=xo;const Co={class:"inner-tab"},wo={key:1,class:"separator"};var Zo=(0,l.defineComponent)({setup(e){const o=(0,l.toRef)(s.Z,"tabs"),t=(0,l.computed)((()=>Object.keys(a.layers))),n=i.useHeader;function r(e){const{display:o,minimized:t,minWidth:l,name:n,color:r,style:i,classes:a,minimizable:s,nodes:u}=e;return{display:o,minimized:t,minWidth:l,name:n,color:r,style:i,classes:a,minimizable:s,nodes:u}}return(e,i)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tabs-container",{useHeader:(0,l.unref)(n)}])},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(o),((i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:s,class:"tab",ref_for:!0,ref:`tab-${s}`},[0===s&&(()=>void 0!==(0,l.unref)(n)&&null!==(0,l.unref)(n)&&(0,l.unref)(n)[Symbol.for("!")]?(0,l.unref)(n)[Symbol.for("!")]():!(0,l.unref)(n))()?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Co,[(0,l.unref)(t).includes(i)?((0,l.openBlock)(),(0,l.createBlock)(y,(0,l.mergeProps)({key:0},r((0,l.unref)(a.layers)[i]),{index:s,tab:()=>e.$refs[`tab-${s}`]?.[0]}),null,16,["index","tab"])):((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(i),{key:1,index:s},null,8,["index"]))]),(()=>void 0!==s&&null!==s&&s[Symbol.for("!==")]?s[Symbol.for("!==")]((0,l.unref)(o).length-1):s!==(0,l.unref)(o).length-1)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",wo)):(0,l.createCommentVNode)("",!0)])))),128))],2))}});const Bo=(0,f.Z)(Zo,[["__scopeId","data-v-4fd7697b"]]);var Po=Bo,Eo=t(2561);const To=e=>((0,l.pushScopeId)("data-v-06188cc8"),e=e(),(0,l.popScopeId)(),e),Fo={class:"game-over-modal-header"},Io=["src","alt"],Do={class:"game-over-modal-title"},Ro=To((()=>(0,l.createElementVNode)("h2",null,"Congratulations!",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Oo={key:0},_o=To((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),jo=To((()=>(0,l.createElementVNode)("div",null," Please check the Discord to discuss the game or to check for new content updates! ",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ao=To((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Uo=["href"],qo=To((()=>(0,l.createElementVNode)("span",{class:"material-icons game-over-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var zo=(0,l.defineComponent)({setup(e){const{title:o,logo:t,discordName:n,discordLink:r,versionNumber:a,versionTitle:u}=i,m=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),c=(0,l.computed)((()=>Eo.hasWon.value&&(()=>void 0!==s.Z.keepGoing&&null!==s.Z.keepGoing&&s.Z.keepGoing[Symbol.for("!")]?s.Z.keepGoing[Symbol.for("!")]():!s.Z.keepGoing)())),f=(0,l.toRef)(s.Z,"autosave");function d(){s.Z.keepGoing=!0}function y(){(0,X.uW)((0,X.xM)())}return(e,i)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{"model-value":(0,l.unref)(c)},{header:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",Fo,[(0,l.unref)(t)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,class:"game-over-modal-logo",src:(0,l.unref)(t),alt:(0,l.unref)(o)},null,8,Io)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Do,[Ro,(0,l.createElementVNode)("h4",null,(()=>"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": "!==void 0&&"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": "!==null&&("You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": ")[Symbol.for("+")]?("You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": ")[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(u))):"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(a))+": "+(0,l.toDisplayString)((0,l.unref)(u)))(),1)])])])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createElementBlock)("div",Oo,[(0,l.createElementVNode)("div",null,(()=>"It took you "+(0,l.toDisplayString)((0,l.unref)(m))!==void 0&&"It took you "+(0,l.toDisplayString)((0,l.unref)(m))!==null&&("It took you "+(0,l.toDisplayString)((0,l.unref)(m)))[Symbol.for("+")]?("It took you "+(0,l.toDisplayString)((0,l.unref)(m)))[Symbol.for("+")](" to beat the game."):"It took you "+(0,l.toDisplayString)((0,l.unref)(m))+" to beat the game.")(),1),_o,jo,Ao,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(r),class:"game-over-modal-discord-link"},[qo,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(n))):" "+(0,l.toDisplayString)((0,l.unref)(n)))(),1)],8,Uo)]),(0,l.createVNode)(G.Z,{title:"Autosave",modelValue:(0,l.unref)(f),"onUpdate:modelValue":i[0]||(i[0]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["modelValue"])])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",{class:"game-over-footer"},[(0,l.createElementVNode)("button",{onClick:d,class:"button"},"Keep Going"),(0,l.createElementVNode)("button",{onClick:y,class:"button danger"},"Play Again")])])),_:1},8,["model-value"]))}});const Lo=(0,f.Z)(zo,[["__scopeId","data-v-06188cc8"]]);var Go=Lo,Wo=t(3032);const Ho=e=>((0,l.pushScopeId)("data-v-5935214c"),e=e(),(0,l.popScopeId)(),e),$o=Ho((()=>(0,l.createElementVNode)("div",{class:"nan-modal-header"},[(0,l.createElementVNode)("h2",null,"NaN value detected!")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Yo={key:0},Ko=Ho((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Jo=["href"],Qo=Ho((()=>(0,l.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Xo=Ho((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),et={class:"nan-footer"};var ot=(0,l.defineComponent)({setup(e){const{discordName:o,discordLink:t}=i,n=(0,l.toRef)(s.Z,"autosave"),r=(0,l.toRef)(Wo.Z,"hasNaN"),a=(0,l.ref)(null),u=(0,l.computed)((()=>Wo.Z.NaNPath.join("."))),m=(0,l.computed)((()=>Wo.Z.NaNPath.slice((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())[0])),c=(0,l.computed)((()=>Wo.Z.NaNReceiver&&m.value?Wo.Z.NaNReceiver[m.value]:null)),f=(0,l.computed)({get(){return 0===s.Z.devSpeed},set(e){s.Z.devSpeed=e?null:0}});function d(){Wo.Z.NaNReceiver&&m.value&&(Wo.Z.NaNReceiver[m.value]=new V.ZP(0),Wo.Z.hasNaN=!1)}function y(){Wo.Z.NaNReceiver&&m.value&&(Wo.Z.NaNReceiver[m.value]=new V.ZP(1),Wo.Z.hasNaN=!1)}function h(){Wo.Z.NaNReceiver&&m.value&&(Wo.Z.NaNReceiver[m.value]=new V.ZP(NaN),Wo.Z.hasNaN=!1)}return(e,s)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(b.Z,(0,l.mergeProps)({modelValue:(0,l.unref)(r),"onUpdate:modelValue":s[4]||(s[4]=e=>(0,l.isRef)(r)?r.value=e:null)},e.$attrs),{header:(0,l.withCtx)((()=>[$o])),body:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",null,[(0,l.createTextVNode)((()=>' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u))!==void 0&&' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u))!==null&&(' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u)))[Symbol.for("+")]?(' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u)))[Symbol.for("+")]('" to NaN'):' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(u))+'" to NaN')(),1),(0,l.unref)(c)?((0,l.openBlock)(),(0,l.createElementBlock)("span",Yo,(()=>(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c)))!==void 0&&(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c)))!==null&&((0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c))))[Symbol.for("+")]?((0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c))))[Symbol.for("+")](")"):(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(V.WU)((0,l.unref)(c)))+")")(),1)):(0,l.createCommentVNode)("",!0),(0,l.createTextVNode)((()=>". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled")!==void 0&&". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled")!==null&&(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled"))[Symbol.for("+")]?(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled"))[Symbol.for("+")](". Check the console for more details, and consider sharing it with the developers on discord. "):". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ")(),1)]),Ko,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(t),class:"nan-modal-discord-link"},[Qo,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(o))):" "+(0,l.toDisplayString)((0,l.unref)(o)))(),1)],8,Jo)]),Xo,(0,l.createVNode)(G.Z,{title:"Autosave",modelValue:(0,l.unref)(n),"onUpdate:modelValue":s[0]||(s[0]=e=>(0,l.isRef)(n)?n.value=e:null)},null,8,["modelValue"]),(0,l.unref)(i).enablePausing?((0,l.openBlock)(),(0,l.createBlock)(G.Z,{key:0,title:"Pause game",modelValue:(0,l.unref)(f),"onUpdate:modelValue":s[1]||(s[1]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["modelValue"])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",et,[(0,l.createElementVNode)("button",{onClick:s[2]||(s[2]=e=>a.value?.open()),class:"button"},"Open Saves Manager"),(0,l.createElementVNode)("button",{onClick:d,class:"button"},"Set to 0"),(0,l.createElementVNode)("button",{onClick:y,class:"button"},"Set to 1"),(0,l.unref)(c)&&(0,l.unref)(V.ZP).neq((0,l.unref)(c),0)&&(0,l.unref)(V.ZP).neq((0,l.unref)(c),1)?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:s[3]||(s[3]=e=>r.value=!1),class:"button"}," Set to previous ")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("button",{onClick:h,class:"button danger"},"Ignore")])])),_:1},16,["modelValue"]),(0,l.createVNode)($e,{ref_key:"savesManager",ref:a},null,512)],64))}});const tt=(0,f.Z)(ot,[["__scopeId","data-v-5935214c"]]);var lt=tt;const nt={key:0,class:"tpsDisplay"},rt={key:0,class:"low"};var it=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>V.ZP.div(Wo.Z.lastTenTicks.length,Wo.Z.lastTenTicks.reduce(((e,o)=>(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](o):e+o)()),0)))),t=(0,l.ref)([]);(0,l.watchEffect)((()=>{t.value.push(Math.round(o.value.toNumber())),(()=>void 0!==t.value.length&&null!==t.value.length&&t.value.length[Symbol.for(">")]?t.value.length[Symbol.for(">")](10):t.value.length>10)()&&(t.value=t.value.slice(1))}));const n=(0,l.computed)((()=>t.value.reduce(((e,o)=>V.ZP.max(e,o)),0))),r=(0,l.computed)((()=>V.ZP.sub(o.value,n.value).gt(1)));return(e,t)=>(()=>void 0!==(0,l.unref)(o).isNan()&&null!==(0,l.unref)(o).isNan()&&(0,l.unref)(o).isNan()[Symbol.for("!")]?(0,l.unref)(o).isNan()[Symbol.for("!")]():!(0,l.unref)(o).isNan())()?((0,l.openBlock)(),(0,l.createElementBlock)("div",nt,[(0,l.createTextVNode)((()=>" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o)))!==void 0&&" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o)))!==null&&(" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o))))[Symbol.for("+")]?(" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o))))[Symbol.for("+")](" "):" TPS: "+(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(o)))+" ")(),1),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",rt,(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(n))),1)):(0,l.createCommentVNode)("",!0)])),_:1})])):(0,l.createCommentVNode)("",!0)}});const at=(0,f.Z)(it,[["__scopeId","data-v-c0663118"]]);var st=at,ut=(0,l.defineComponent)({setup(e){const o=i.useHeader,t=(0,l.computed)((()=>q.Z[k.ZP.theme].variables)),a=(0,l.toRef)(k.ZP,"showTPS"),s=(0,l.computed)((()=>(0,r.MM)((0,n.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.t.map(r.sY)]))))));return(e,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createElementVNode)("div",{id:"modal-root",style:(0,l.normalizeStyle)((0,l.unref)(t))},null,4),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["app",{useHeader:(0,l.unref)(o)}]),style:(0,l.normalizeStyle)((0,l.unref)(t))},[(0,l.unref)(o)?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Po),(0,l.unref)((0,l.unref)(a))?((0,l.openBlock)(),(0,l.createBlock)(st,{key:1})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Go),(0,l.createVNode)(lt),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(s))))],6)],64))}});const mt=(0,f.Z)(ut,[["__scopeId","data-v-f13f28b6"]]);var ct=mt;if(document.title=i.title,""===i.id)throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame((async()=>{console.log("%cMade in Profectus%c\nLearn more at www.moddingtree.com","font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await(0,X.zD)();const{globalBus:e,startGameLoop:o}=await t(7302),n=window.vue=(0,l.createApp)(ct);e.emit("setupVue",n),n.mount("#app"),o()})),window.projInfo=i},5613:function(e,o,t){"use strict";t.d(o,{ZP:function(){return be},WU:function(){return ue},mr:function(){return ce},Ht:function(){return me}});var l={};t.r(l),t.d(l,{commaFormat:function(){return z},default:function(){return A},exponentialFormat:function(){return q},format:function(){return ee},formatSmall:function(){return ne},formatTime:function(){return te},formatWhole:function(){return oe},invertOOM:function(){return re},regularFormat:function(){return L},toPlaces:function(){return le}});var n=t(2482);t(1703);let r,i,a,s,u,m,c,f,d,y,b;const h=17,p=9e15,g=Math.log10(9e15),v=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](9e15):1/9e15)(),S=308,N=(()=>324[Symbol.for("minus")]?324[Symbol.for("minus")]():-324)(),k=5,V=!0,x=!1,M=function(){const e=[];for(let t=(()=>void 0!==N&&null!==N&&N[Symbol.for("+")]?N[Symbol.for("+")](1):N+1)();(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")](S):t<=S)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++)())e.push(Number((()=>"1e"[Symbol.for("+")]?"1e"[Symbol.for("+")](t):"1e"+t)()));const o=323;return function(t){return e[(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](o):t+o)()]}}(),C=[2,Math.E,3,4,5,6,7,8,9,10],w=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Z=[[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.9194161097107025[Symbol.for("minus")]?.9194161097107025[Symbol.for("minus")]():-.9194161097107025)(),(()=>.8335625019330468[Symbol.for("minus")]?.8335625019330468[Symbol.for("minus")]():-.8335625019330468)(),(()=>.7425599821143978[Symbol.for("minus")]?.7425599821143978[Symbol.for("minus")]():-.7425599821143978)(),(()=>.6466611521029437[Symbol.for("minus")]?.6466611521029437[Symbol.for("minus")]():-.6466611521029437)(),(()=>.5462617907227869[Symbol.for("minus")]?.5462617907227869[Symbol.for("minus")]():-.5462617907227869)(),(()=>.4419033816638769[Symbol.for("minus")]?.4419033816638769[Symbol.for("minus")]():-.4419033816638769)(),(()=>.3342645487554494[Symbol.for("minus")]?.3342645487554494[Symbol.for("minus")]():-.3342645487554494)(),(()=>.224140440909962[Symbol.for("minus")]?.224140440909962[Symbol.for("minus")]():-.224140440909962)(),(()=>.11241087890006762[Symbol.for("minus")]?.11241087890006762[Symbol.for("minus")]():-.11241087890006762)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.90603157029014[Symbol.for("minus")]?.90603157029014[Symbol.for("minus")]():-.90603157029014)(),(()=>.80786507256596[Symbol.for("minus")]?.80786507256596[Symbol.for("minus")]():-.80786507256596)(),(()=>.7064666939634[Symbol.for("minus")]?.7064666939634[Symbol.for("minus")]():-.7064666939634)(),(()=>.60294836853664[Symbol.for("minus")]?.60294836853664[Symbol.for("minus")]():-.60294836853664)(),(()=>.49849837513117[Symbol.for("minus")]?.49849837513117[Symbol.for("minus")]():-.49849837513117)(),(()=>.39430303318768[Symbol.for("minus")]?.39430303318768[Symbol.for("minus")]():-.39430303318768)(),(()=>.29147201034755[Symbol.for("minus")]?.29147201034755[Symbol.for("minus")]():-.29147201034755)(),(()=>.19097820800866[Symbol.for("minus")]?.19097820800866[Symbol.for("minus")]():-.19097820800866)(),(()=>.09361896280296[Symbol.for("minus")]?.09361896280296[Symbol.for("minus")]():-.09361896280296)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.9021579584316141[Symbol.for("minus")]?.9021579584316141[Symbol.for("minus")]():-.9021579584316141)(),(()=>.8005762598234203[Symbol.for("minus")]?.8005762598234203[Symbol.for("minus")]():-.8005762598234203)(),(()=>.6964780623319391[Symbol.for("minus")]?.6964780623319391[Symbol.for("minus")]():-.6964780623319391)(),(()=>.5911906810998454[Symbol.for("minus")]?.5911906810998454[Symbol.for("minus")]():-.5911906810998454)(),(()=>.486050182576545[Symbol.for("minus")]?.486050182576545[Symbol.for("minus")]():-.486050182576545)(),(()=>.3823089430815083[Symbol.for("minus")]?.3823089430815083[Symbol.for("minus")]():-.3823089430815083)(),(()=>.28106046722897615[Symbol.for("minus")]?.28106046722897615[Symbol.for("minus")]():-.28106046722897615)(),(()=>.1831906535795894[Symbol.for("minus")]?.1831906535795894[Symbol.for("minus")]():-.1831906535795894)(),(()=>.08935809204418144[Symbol.for("minus")]?.08935809204418144[Symbol.for("minus")]():-.08935809204418144)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8917227442365535[Symbol.for("minus")]?.8917227442365535[Symbol.for("minus")]():-.8917227442365535)(),(()=>.781258746326964[Symbol.for("minus")]?.781258746326964[Symbol.for("minus")]():-.781258746326964)(),(()=>.6705130326902455[Symbol.for("minus")]?.6705130326902455[Symbol.for("minus")]():-.6705130326902455)(),(()=>.5612813129406509[Symbol.for("minus")]?.5612813129406509[Symbol.for("minus")]():-.5612813129406509)(),(()=>.4551067709033134[Symbol.for("minus")]?.4551067709033134[Symbol.for("minus")]():-.4551067709033134)(),(()=>.35319256652135966[Symbol.for("minus")]?.35319256652135966[Symbol.for("minus")]():-.35319256652135966)(),(()=>.2563741554088552[Symbol.for("minus")]?.2563741554088552[Symbol.for("minus")]():-.2563741554088552)(),(()=>.1651412821106526[Symbol.for("minus")]?.1651412821106526[Symbol.for("minus")]():-.1651412821106526)(),(()=>.0796919581982668[Symbol.for("minus")]?.0796919581982668[Symbol.for("minus")]():-.0796919581982668)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8843387974366064[Symbol.for("minus")]?.8843387974366064[Symbol.for("minus")]():-.8843387974366064)(),(()=>.7678744063886243[Symbol.for("minus")]?.7678744063886243[Symbol.for("minus")]():-.7678744063886243)(),(()=>.6529563724510552[Symbol.for("minus")]?.6529563724510552[Symbol.for("minus")]():-.6529563724510552)(),(()=>.5415870994657841[Symbol.for("minus")]?.5415870994657841[Symbol.for("minus")]():-.5415870994657841)(),(()=>.4352842206588936[Symbol.for("minus")]?.4352842206588936[Symbol.for("minus")]():-.4352842206588936)(),(()=>.33504449124791424[Symbol.for("minus")]?.33504449124791424[Symbol.for("minus")]():-.33504449124791424)(),(()=>.24138853420685147[Symbol.for("minus")]?.24138853420685147[Symbol.for("minus")]():-.24138853420685147)(),(()=>.15445285440944467[Symbol.for("minus")]?.15445285440944467[Symbol.for("minus")]():-.15445285440944467)(),(()=>.07409659641336663[Symbol.for("minus")]?.07409659641336663[Symbol.for("minus")]():-.07409659641336663)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8786709358426346[Symbol.for("minus")]?.8786709358426346[Symbol.for("minus")]():-.8786709358426346)(),(()=>.7577735191184886[Symbol.for("minus")]?.7577735191184886[Symbol.for("minus")]():-.7577735191184886)(),(()=>.6399546189952064[Symbol.for("minus")]?.6399546189952064[Symbol.for("minus")]():-.6399546189952064)(),(()=>.527284921869926[Symbol.for("minus")]?.527284921869926[Symbol.for("minus")]():-.527284921869926)(),(()=>.4211627631006314[Symbol.for("minus")]?.4211627631006314[Symbol.for("minus")]():-.4211627631006314)(),(()=>.3223479611761232[Symbol.for("minus")]?.3223479611761232[Symbol.for("minus")]():-.3223479611761232)(),(()=>.23107655627789858[Symbol.for("minus")]?.23107655627789858[Symbol.for("minus")]():-.23107655627789858)(),(()=>.1472057700818259[Symbol.for("minus")]?.1472057700818259[Symbol.for("minus")]():-.1472057700818259)(),(()=>.07035171210706326[Symbol.for("minus")]?.07035171210706326[Symbol.for("minus")]():-.07035171210706326)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8740862815291583[Symbol.for("minus")]?.8740862815291583[Symbol.for("minus")]():-.8740862815291583)(),(()=>.7497032990976209[Symbol.for("minus")]?.7497032990976209[Symbol.for("minus")]():-.7497032990976209)(),(()=>.6297119746181752[Symbol.for("minus")]?.6297119746181752[Symbol.for("minus")]():-.6297119746181752)(),(()=>.5161838335958787[Symbol.for("minus")]?.5161838335958787[Symbol.for("minus")]():-.5161838335958787)(),(()=>.41036238255751956[Symbol.for("minus")]?.41036238255751956[Symbol.for("minus")]():-.41036238255751956)(),(()=>.31277212146489963[Symbol.for("minus")]?.31277212146489963[Symbol.for("minus")]():-.31277212146489963)(),(()=>.2233976621705518[Symbol.for("minus")]?.2233976621705518[Symbol.for("minus")]():-.2233976621705518)(),(()=>.1418697367979619[Symbol.for("minus")]?.1418697367979619[Symbol.for("minus")]():-.1418697367979619)(),(()=>.06762117662323441[Symbol.for("minus")]?.06762117662323441[Symbol.for("minus")]():-.06762117662323441)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8702632331800649[Symbol.for("minus")]?.8702632331800649[Symbol.for("minus")]():-.8702632331800649)(),(()=>.7430366914122081[Symbol.for("minus")]?.7430366914122081[Symbol.for("minus")]():-.7430366914122081)(),(()=>.6213373075161548[Symbol.for("minus")]?.6213373075161548[Symbol.for("minus")]():-.6213373075161548)(),(()=>.5072025698095242[Symbol.for("minus")]?.5072025698095242[Symbol.for("minus")]():-.5072025698095242)(),(()=>.40171437727184167[Symbol.for("minus")]?.40171437727184167[Symbol.for("minus")]():-.40171437727184167)(),(()=>.30517930701410456[Symbol.for("minus")]?.30517930701410456[Symbol.for("minus")]():-.30517930701410456)(),(()=>.21736343968190863[Symbol.for("minus")]?.21736343968190863[Symbol.for("minus")]():-.21736343968190863)(),(()=>.137710238299109[Symbol.for("minus")]?.137710238299109[Symbol.for("minus")]():-.137710238299109)(),(()=>.06550774483471955[Symbol.for("minus")]?.06550774483471955[Symbol.for("minus")]():-.06550774483471955)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8670016295947213[Symbol.for("minus")]?.8670016295947213[Symbol.for("minus")]():-.8670016295947213)(),(()=>.7373984232432306[Symbol.for("minus")]?.7373984232432306[Symbol.for("minus")]():-.7373984232432306)(),(()=>.6143173985094293[Symbol.for("minus")]?.6143173985094293[Symbol.for("minus")]():-.6143173985094293)(),(()=>.49973884395492807[Symbol.for("minus")]?.49973884395492807[Symbol.for("minus")]():-.49973884395492807)(),(()=>.394584953527678[Symbol.for("minus")]?.394584953527678[Symbol.for("minus")]():-.394584953527678)(),(()=>.2989649949848695[Symbol.for("minus")]?.2989649949848695[Symbol.for("minus")]():-.2989649949848695)(),(()=>.21245647317021688[Symbol.for("minus")]?.21245647317021688[Symbol.for("minus")]():-.21245647317021688)(),(()=>.13434688362382652[Symbol.for("minus")]?.13434688362382652[Symbol.for("minus")]():-.13434688362382652)(),(()=>.0638072667348083[Symbol.for("minus")]?.0638072667348083[Symbol.for("minus")]():-.0638072667348083)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8641642839543857[Symbol.for("minus")]?.8641642839543857[Symbol.for("minus")]():-.8641642839543857)(),(()=>.732534623168535[Symbol.for("minus")]?.732534623168535[Symbol.for("minus")]():-.732534623168535)(),(()=>.6083127477059322[Symbol.for("minus")]?.6083127477059322[Symbol.for("minus")]():-.6083127477059322)(),(()=>.4934049257184696[Symbol.for("minus")]?.4934049257184696[Symbol.for("minus")]():-.4934049257184696)(),(()=>.3885773075899922[Symbol.for("minus")]?.3885773075899922[Symbol.for("minus")]():-.3885773075899922)(),(()=>.29376029055315767[Symbol.for("minus")]?.29376029055315767[Symbol.for("minus")]():-.29376029055315767)(),(()=>.2083678561173622[Symbol.for("minus")]?.2083678561173622[Symbol.for("minus")]():-.2083678561173622)(),(()=>.13155653399373268[Symbol.for("minus")]?.13155653399373268[Symbol.for("minus")]():-.13155653399373268)(),(()=>.062401588652553186[Symbol.for("minus")]?.062401588652553186[Symbol.for("minus")]():-.062401588652553186)(),0]],B=function(e){return _.fromValue_noAlloc(e)},P=function(e,o,t){return _.fromComponents(e,o,t)},E=function(e,o,t){return _.fromComponents_noNormalize(e,o,t)},T=function(e,o){const t=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),l=Math.ceil(Math.log10(Math.abs(e))),n=(()=>void 0!==Math.round(e*Math.pow(10,t-l))&&null!==Math.round(e*Math.pow(10,t-l))&&Math.round(e*Math.pow(10,t-l))[Symbol.for("*")]?Math.round(e*Math.pow(10,t-l))[Symbol.for("*")](Math.pow(10,l-t)):Math.round(e*Math.pow(10,t-l))*Math.pow(10,l-t))();return parseFloat(n.toFixed(Math.max((()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](l):t-l)(),0)))},F=function(e){return(()=>void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e)))()},I=function(e){if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))())return e;if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50)())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let o=1;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)())o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](e):o*e)(),(()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})();e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)();let t=.9189385332046727;t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]((e+.5)*Math.log(e)):t+(e+.5)*Math.log(e))(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();const l=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let n=e;return t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(12*n)):t+1/(12*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(360*n)):t+1/(360*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1260*n)):t+1/(1260*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1680*n)):t+1/(1680*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1188*n)):t+1/(1188*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](691/(360360*n)):t+691/(360360*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](7/(1092*n)):t+7/(1092*n))(),n=(()=>void 0!==n&&null!==n&&n[Symbol.for("*")]?n[Symbol.for("*")](l):n*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](3617/(122400*n)):t+3617/(122400*n))(),(()=>void 0!==Math.exp(t)&&null!==Math.exp(t)&&Math.exp(t)[Symbol.for("/")]?Math.exp(t)[Symbol.for("/")](o):Math.exp(t)/o)()},D=.5671432904097838,R=function(e,o=1e-10){let t,l;if((()=>void 0!==Number.isFinite(e)&&null!==Number.isFinite(e)&&Number.isFinite(e)[Symbol.for("!")]?Number.isFinite(e)[Symbol.for("!")]():!Number.isFinite(e))())return e;if(0===e)return e;if(1===e)return D;t=(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)()?0:(()=>void 0!==Math.log(e)&&null!==Math.log(e)&&Math.log(e)[Symbol.for("-")]?Math.log(e)[Symbol.for("-")](Math.log(Math.log(e))):Math.log(e)-Math.log(Math.log(e)))();for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](100):n<100)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(l=(()=>e*Math.exp(-t)+t*t!==void 0&&e*Math.exp(-t)+t*t!==null&&(e*Math.exp(-t)+t*t)[Symbol.for("/")]?(e*Math.exp(-t)+t*t)[Symbol.for("/")](t+1):(e*Math.exp(-t)+t*t)/(t+1))(),(()=>void 0!==Math.abs(l-t)&&null!==Math.abs(l-t)&&Math.abs(l-t)[Symbol.for("<")]?Math.abs(l-t)[Symbol.for("<")](o*Math.abs(l)):Math.abs(l-t)<o*Math.abs(l))())return l;t=l}throw Error(`Iteration failed to converge: ${e.toString()}`)};function O(e,o=1e-10){let t,l,n,r;if((()=>void 0!==Number.isFinite(e.mag)&&null!==Number.isFinite(e.mag)&&Number.isFinite(e.mag)[Symbol.for("!")]?Number.isFinite(e.mag)[Symbol.for("!")]():!Number.isFinite(e.mag))())return e;if(e===_.dZero)return e;if(e===_.dOne)return B(D);_.abs(e);t=_.ln(e);for(let i=0;(()=>void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](100):i<100)();(()=>void 0!==i&&null!==i&&"object"===typeof i&&i[Symbol.for("prefix-increment")]?i[Symbol.for("prefix-increment")]():++i)()){if(l=_.exp((()=>void 0!==t&&null!==t&&t[Symbol.for("minus")]?t[Symbol.for("minus")]():-t)()),n=t.sub(e.mul(l)),r=t.sub(n.div(t.add(1).sub(t.add(2).mul(n).div(_.mul(2,t).add(2))))),_.abs(r.sub(t)).lt(_.abs(r).mul(o)))return r;t=r}throw Error(`Iteration failed to converge: ${e.toString()}`)}r=Symbol.for("+"),i=Symbol.for("-"),a=Symbol.for("*"),s=Symbol.for("/"),u=Symbol.for("minus"),m=Symbol.for("=="),c=Symbol.for(">"),f=Symbol.for("<"),d=Symbol.for(">="),y=Symbol.for("<="),b=Symbol.for("!=");class _{constructor(e){(0,n.Z)(this,"sign",Number.NaN),(0,n.Z)(this,"mag",Number.NaN),(0,n.Z)(this,"layer",Number.NaN),e instanceof _||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(0===this.sign)return 0;if(0===this.layer){const e=Math.floor(Math.log10(this.mag));let o;return o=5e-324===this.mag?5:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("/")]?this.mag[Symbol.for("/")](M(e)):this.mag/M(e))(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o):this.sign*o)()}if(1===this.layer){const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](Math.floor(this.mag)):this.mag-Math.floor(this.mag))();return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,e)):this.sign*Math.pow(10,e))()}return this.sign}set m(e){(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](2):this.layer<=2)()?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent))}get e(){return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor((()=>void 0!==Math.sign(this.mag)&&null!==Math.sign(this.mag)&&Math.sign(this.mag)[Symbol.for("*")]?Math.sign(this.mag)[Symbol.for("*")](Math.pow(10,Math.abs(this.mag))):Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag)))()):(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("*")]?this.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):this.mag*Number.POSITIVE_INFINITY)()}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,o,t){return(new _).fromComponents(e,o,t)}static fromComponents_noNormalize(e,o,t){return(new _).fromComponents_noNormalize(e,o,t)}static fromMantissaExponent(e,o){return(new _).fromMantissaExponent(e,o)}static fromMantissaExponent_noNormalize(e,o){return(new _).fromMantissaExponent_noNormalize(e,o)}static fromDecimal(e){return(new _).fromDecimal(e)}static fromNumber(e){return(new _).fromNumber(e)}static fromString(e){return(new _).fromString(e)}static fromValue(e){return(new _).fromValue(e)}static fromValue_noAlloc(e){return e instanceof _?e:new _(e)}static abs(e){return B(e).abs()}static neg(e){return B(e).neg()}static negate(e){return B(e).neg()}static negated(e){return B(e).neg()}static sign(e){return B(e).sign}static sgn(e){return B(e).sign}static round(e){return B(e).round()}static floor(e){return B(e).floor()}static ceil(e){return B(e).ceil()}static trunc(e){return B(e).trunc()}static add(e,o){return B(e).add(o)}static plus(e,o){return B(e).add(o)}static sub(e,o){return B(e).sub(o)}static subtract(e,o){return B(e).sub(o)}static minus(e,o){return B(e).sub(o)}static mul(e,o){return B(e).mul(o)}static multiply(e,o){return B(e).mul(o)}static times(e,o){return B(e).mul(o)}static div(e,o){return B(e).div(o)}static divide(e,o){return B(e).div(o)}static recip(e){return B(e).recip()}static reciprocal(e){return B(e).recip()}static reciprocate(e){return B(e).reciprocate()}static cmp(e,o){return B(e).cmp(o)}static cmpabs(e,o){return B(e).cmpabs(o)}static compare(e,o){return B(e).cmp(o)}static isNaN(e){return e=B(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=B(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,o){return B(e).eq(o)}static equals(e,o){return B(e).eq(o)}static neq(e,o){return B(e).neq(o)}static notEquals(e,o){return B(e).notEquals(o)}static lt(e,o){return B(e).lt(o)}static lte(e,o){return B(e).lte(o)}static gt(e,o){return B(e).gt(o)}static gte(e,o){return B(e).gte(o)}static max(e,o){return B(e).max(o)}static min(e,o){return B(e).min(o)}static minabs(e,o){return B(e).minabs(o)}static maxabs(e,o){return B(e).maxabs(o)}static clamp(e,o,t){return B(e).clamp(o,t)}static clampMin(e,o){return B(e).clampMin(o)}static clampMax(e,o){return B(e).clampMax(o)}static cmp_tolerance(e,o,t){return B(e).cmp_tolerance(o,t)}static compare_tolerance(e,o,t){return B(e).cmp_tolerance(o,t)}static eq_tolerance(e,o,t){return B(e).eq_tolerance(o,t)}static equals_tolerance(e,o,t){return B(e).eq_tolerance(o,t)}static neq_tolerance(e,o,t){return B(e).neq_tolerance(o,t)}static notEquals_tolerance(e,o,t){return B(e).notEquals_tolerance(o,t)}static lt_tolerance(e,o,t){return B(e).lt_tolerance(o,t)}static lte_tolerance(e,o,t){return B(e).lte_tolerance(o,t)}static gt_tolerance(e,o,t){return B(e).gt_tolerance(o,t)}static gte_tolerance(e,o,t){return B(e).gte_tolerance(o,t)}static pLog10(e){return B(e).pLog10()}static absLog10(e){return B(e).absLog10()}static log10(e){return B(e).log10()}static log(e,o){return B(e).log(o)}static log2(e){return B(e).log2()}static ln(e){return B(e).ln()}static logarithm(e,o){return B(e).logarithm(o)}static pow(e,o){return B(e).pow(o)}static pow10(e){return B(e).pow10()}static root(e,o){return B(e).root(o)}static factorial(e,o){return B(e).factorial()}static gamma(e,o){return B(e).gamma()}static lngamma(e,o){return B(e).lngamma()}static exp(e){return B(e).exp()}static sqr(e){return B(e).sqr()}static sqrt(e){return B(e).sqrt()}static cube(e){return B(e).cube()}static cbrt(e){return B(e).cbrt()}static tetrate(e,o=2,t=E(1,0,1)){return B(e).tetrate(o,t)}static iteratedexp(e,o=2,t=E(1,0,1)){return B(e).iteratedexp(o,t)}static iteratedlog(e,o=10,t=1){return B(e).iteratedlog(o,t)}static layeradd10(e,o){return B(e).layeradd10(o)}static layeradd(e,o,t=10){return B(e).layeradd(o,t)}static slog(e,o=10){return B(e).slog(o)}static lambertw(e){return B(e).lambertw()}static ssqrt(e){return B(e).ssqrt()}static pentate(e,o=2,t=E(1,0,1)){return B(e).pentate(o,t)}static affordGeometricSeries(e,o,t,l){return this.affordGeometricSeries_core(B(e),B(o),B(t),l)}static sumGeometricSeries(e,o,t,l){return this.sumGeometricSeries_core(e,B(o),B(t),l)}static affordArithmeticSeries(e,o,t,l){return this.affordArithmeticSeries_core(B(e),B(o),B(t),B(l))}static sumArithmeticSeries(e,o,t,l){return this.sumArithmeticSeries_core(B(e),B(o),B(t),B(l))}static efficiencyOfPurchase(e,o,t){return this.efficiencyOfPurchase_core(B(e),B(o),B(t))}static randomDecimalForTesting(e){if((()=>20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1)())return E(0,0,0);const o=(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.5):Math.random()>.5)()?1:(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)();if((()=>20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1)())return E(o,0,1);const t=Math.floor((()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](e+1):Math.random()*(e+1))());let l=0===t?(()=>616*Math.random()!==void 0&&616*Math.random()!==null&&(616*Math.random())[Symbol.for("-")]?(616*Math.random())[Symbol.for("-")](308):616*Math.random()-308)():(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](16):16*Math.random())();(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(l=Math.trunc(l));let n=Math.pow(10,l);return(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(n=Math.trunc(n)),P(o,t,n)}static affordGeometricSeries_core(e,o,t,l){const n=o.mul(t.pow(l));return _.floor(e.div(n).mul(t.sub(1)).add(1).log10().div(t.log10()))}static sumGeometricSeries_core(e,o,t,l){return o.mul(t.pow(l)).mul(_.sub(1,t.pow(e))).div(_.sub(1,t))}static affordArithmeticSeries_core(e,o,t,l){const n=o.add(l.mul(t)),r=n.sub(t.div(2)),i=r.pow(2);return r.neg().add(i.add(t.mul(e).mul(2)).sqrt()).div(t).floor()}static sumArithmeticSeries_core(e,o,t,l){const n=o.add(l.mul(t));return e.div(2).mul(n.mul(2).plus(e.sub(1).mul(t)))}static efficiencyOfPurchase_core(e,o,t){return e.div(o).add(e.div(t))}[r](e){return this.add(e)}[i](e){return this.sub(e)}[a](e){return this.times(e)}[s](e){return this.div(e)}[u](){return this.neg()}[m](e){return this.eq(e)}[c](e){return this.gt(e)}[f](e){return this.lt(e)}[d](e){return this.gte(e)}[y](e){return this.lte(e)}[b](e){return this.neq(e)}normalize(){if(0===this.sign||0===this.mag&&0===this.layer)return this.sign=0,this.mag=0,this.layer=0,this;if(0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()&&(this.mag=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)(),this.sign=(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)()),0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](v):this.mag<v)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),o=Math.sign(this.mag);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](p):e>=p)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.log10(e)):o*Math.log10(e))(),this;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](g):e<g)()&&(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)())this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),0===this.layer?this.mag=Math.pow(10,this.mag):(this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.pow(10,e)):o*Math.pow(10,e))(),e=Math.abs(this.mag),o=Math.sign(this.mag));return 0===this.layer&&((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?(this.mag=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)(),this.sign=(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)()):0===this.mag&&(this.sign=0)),this}fromComponents(e,o,t){return this.sign=e,this.layer=o,this.mag=t,this.normalize(),this}fromComponents_noNormalize(e,o,t){return this.sign=e,this.layer=o,this.mag=t,this}fromMantissaExponent(e,o){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](Math.log10(e)):o+Math.log10(e))(),this.normalize(),this}fromMantissaExponent_noNormalize(e,o){return this.fromMantissaExponent(e,o),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){V?e=e.replace(",",""):x&&(e=e.replace(",","."));const o=e.split("^^^");if(2===o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";");let n=1;if(2===l.length&&(n=parseFloat(l[1]),(()=>void 0!==isFinite(n)&&null!==isFinite(n)&&isFinite(n)[Symbol.for("!")]?isFinite(n)[Symbol.for("!")]():!isFinite(n))()&&(n=1)),isFinite(e)&&isFinite(t)){const o=_.pentate(e,t,n);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const t=e.split("^^");if(2===t.length){const e=parseFloat(t[0]),o=parseFloat(t[1]),l=t[1].split(";");let n=1;if(2===l.length&&(n=parseFloat(l[1]),(()=>void 0!==isFinite(n)&&null!==isFinite(n)&&isFinite(n)[Symbol.for("!")]?isFinite(n)[Symbol.for("!")]():!isFinite(n))()&&(n=1)),isFinite(e)&&isFinite(o)){const t=_.tetrate(e,o,n);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}const l=e.split("^");if(2===l.length){const e=parseFloat(l[0]),o=parseFloat(l[1]);if(isFinite(e)&&isFinite(o)){const t=_.pow(e,o);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}let n,r;e=e.trim().toLowerCase();let i=e.split("pt");if(2===i.length){n=10,r=parseFloat(i[0]),i[1]=i[1].replace("(",""),i[1]=i[1].replace(")","");let e=parseFloat(i[1]);if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))()&&(e=1),isFinite(n)&&isFinite(r)){const o=_.tetrate(n,r,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}if(i=e.split("p"),2===i.length){n=10,r=parseFloat(i[0]),i[1]=i[1].replace("(",""),i[1]=i[1].replace(")","");let e=parseFloat(i[1]);if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))()&&(e=1),isFinite(n)&&isFinite(r)){const o=_.tetrate(n,r,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const a=e.split("e"),s=(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](1):a.length-1)();if(0===s){const o=parseFloat(e);if(isFinite(o))return this.fromNumber(o)}else if(1===s){const o=parseFloat(e);if(isFinite(o)&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](0):0!==o)())return this.fromNumber(o)}const u=e.split("e^");if(2===u.length){this.sign=1,(()=>void 0!==u[0].charAt(0)&&null!==u[0].charAt(0)&&u[0].charAt(0)[Symbol.for("==")]?u[0].charAt(0)[Symbol.for("==")]("-"):"-"==u[0].charAt(0))()&&(this.sign=(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());let e="";for(let o=0;(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](u[1].length):o<u[1].length)();(()=>void 0!==o&&null!==o&&"object"===typeof o&&o[Symbol.for("prefix-increment")]?o[Symbol.for("prefix-increment")]():++o)()){const t=u[1].charCodeAt(o);if(!((()=>void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](43):t>=43)()&&(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")](57):t<=57)()||101===t))return this.layer=parseFloat(e),this.mag=parseFloat(u[1].substr((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)())),this.normalize(),this;e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](u[1].charAt(o)):e+u[1].charAt(o))()}}if((()=>void 0!==s&&null!==s&&s[Symbol.for("<")]?s[Symbol.for("<")](1):s<1)())return this.sign=0,this.layer=0,this.mag=0,this;const m=parseFloat(a[0]);if(0===m)return this.sign=0,this.layer=0,this.mag=0,this;let c=parseFloat(a[(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](1):a.length-1)()]);if((()=>void 0!==s&&null!==s&&s[Symbol.for(">=")]?s[Symbol.for(">=")](2):s>=2)()){const e=parseFloat(a[(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](2):a.length-2)()]);isFinite(e)&&(c=(()=>void 0!==c&&null!==c&&c[Symbol.for("*")]?c[Symbol.for("*")](Math.sign(e)):c*Math.sign(e))(),c=(()=>void 0!==c&&null!==c&&c[Symbol.for("+")]?c[Symbol.for("+")](F(e)):c+F(e))())}if((()=>void 0!==isFinite(m)&&null!==isFinite(m)&&isFinite(m)[Symbol.for("!")]?isFinite(m)[Symbol.for("!")]():!isFinite(m))())this.sign="-"===a[0]?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():1,this.layer=s,this.mag=c;else if(1===s)this.sign=Math.sign(m),this.layer=1,this.mag=(()=>void 0!==c&&null!==c&&c[Symbol.for("+")]?c[Symbol.for("+")](Math.log10(Math.abs(m))):c+Math.log10(Math.abs(m)))();else{if(this.sign=Math.sign(m),this.layer=s,2===s){const e=_.mul(P(1,2,c),B(m));return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}this.mag=c}return this.normalize(),this}fromValue(e){return e instanceof _||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return(()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()?Number.NaN:0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)():1===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,this.mag)):this.sign*Math.pow(10,this.mag))():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](0):this.sign>0)()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:0===this.m?0:T(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:T(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?1===this.sign?"Infinity":"-Infinity":0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toString():(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():1===this.layer?(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](k):this.layer<=k)()?(()=>(-1===this.sign?"-":"")+"e".repeat(this.layer)!==void 0&&(-1===this.sign?"-":"")+"e".repeat(this.layer)!==null&&((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")]?((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")](this.mag):(-1===this.sign?"-":"")+"e".repeat(this.layer)+this.mag)():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](this.mag):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+this.mag)()}toExponential(e){return 0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return 0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return(()=>void 0!==this.e&&null!==this.e&&this.e[Symbol.for("<=")]?this.e[Symbol.for("<=")](-7):this.e<=-7)()?this.toExponential((()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)()):(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](this.e):e>this.e)()?this.toFixed((()=>e-this.exponent!==void 0&&e-this.exponent!==null&&(e-this.exponent)[Symbol.for("-")]?(e-this.exponent)[Symbol.for("-")](1):e-this.exponent-1)()):this.toExponential((()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)())}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return 0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toFixed(e):(()=>T(this.m,e)+"e"!==void 0&&T(this.m,e)+"e"!==null&&(T(this.m,e)+"e")[Symbol.for("+")]?(T(this.m,e)+"e")[Symbol.for("+")](T(this.e,e)):T(this.m,e)+"e"+T(this.e,e))():1===this.layer?(()=>T(this.m,e)+"e"!==void 0&&T(this.m,e)+"e"!==null&&(T(this.m,e)+"e")[Symbol.for("+")]?(T(this.m,e)+"e")[Symbol.for("+")](T(this.e,e)):T(this.m,e)+"e"+T(this.e,e))():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](k):this.layer<=k)()?(()=>(-1===this.sign?"-":"")+"e".repeat(this.layer)!==void 0&&(-1===this.sign?"-":"")+"e".repeat(this.layer)!==null&&((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")]?((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")](T(this.mag,e)):(-1===this.sign?"-":"")+"e".repeat(this.layer)+T(this.mag,e))():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](T(this.mag,e)):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+T(this.mag,e))()}abs(){return E(0===this.sign?0:1,this.layer,this.mag)}neg(){return E((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)(),this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.round(this.mag)):this}floor(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.floor(this.mag)):this}ceil(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.ceil(this.mag)):this}trunc(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dZero:0===this.layer?P(this.sign,0,Math.trunc(this.mag)):this}add(e){const o=B(e);if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))())return this;if((()=>void 0!==Number.isFinite(o.layer)&&null!==Number.isFinite(o.layer)&&Number.isFinite(o.layer)[Symbol.for("!")]?Number.isFinite(o.layer)[Symbol.for("!")]():!Number.isFinite(o.layer))())return o;if(0===this.sign)return o;if(0===o.sign)return this;if(this.sign===(()=>void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("minus")]?o.sign[Symbol.for("minus")]():-o.sign)()&&this.layer===o.layer&&this.mag===o.mag)return E(0,0,0);let t,l;if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](2):this.layer>=2)()||(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](2):o.layer>=2)())return this.maxabs(o);if((()=>void 0!==_.cmpabs(this,o)&&null!==_.cmpabs(this,o)&&_.cmpabs(this,o)[Symbol.for(">")]?_.cmpabs(this,o)[Symbol.for(">")](0):_.cmpabs(this,o)>0)()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return B((()=>t.sign*t.mag!==void 0&&t.sign*t.mag!==null&&(t.sign*t.mag)[Symbol.for("+")]?(t.sign*t.mag)[Symbol.for("+")](l.sign*l.mag):t.sign*t.mag+l.sign*l.mag)());const n=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("*")]?t.layer[Symbol.for("*")](Math.sign(t.mag)):t.layer*Math.sign(t.mag))(),r=(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("*")]?l.layer[Symbol.for("*")](Math.sign(l.mag)):l.layer*Math.sign(l.mag))();if((()=>n-r!==void 0&&n-r!==null&&(n-r)[Symbol.for(">=")]?(n-r)[Symbol.for(">=")](2):n-r>=2)())return t;if(0===n&&r===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()){if((()=>void 0!==Math.abs(l.mag-Math.log10(t.mag))&&null!==Math.abs(l.mag-Math.log10(t.mag))&&Math.abs(l.mag-Math.log10(t.mag))[Symbol.for(">")]?Math.abs(l.mag-Math.log10(t.mag))[Symbol.for(">")](h):Math.abs(l.mag-Math.log10(t.mag))>h)())return t;{const e=Math.pow(10,(()=>void 0!==Math.log10(t.mag)&&null!==Math.log10(t.mag)&&Math.log10(t.mag)[Symbol.for("-")]?Math.log10(t.mag)[Symbol.for("-")](l.mag):Math.log10(t.mag)-l.mag)()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return P(Math.sign(o),1,(()=>void 0!==l.mag&&null!==l.mag&&l.mag[Symbol.for("+")]?l.mag[Symbol.for("+")](Math.log10(Math.abs(o))):l.mag+Math.log10(Math.abs(o)))())}}if(1===n&&0===r){if((()=>void 0!==Math.abs(t.mag-Math.log10(l.mag))&&null!==Math.abs(t.mag-Math.log10(l.mag))&&Math.abs(t.mag-Math.log10(l.mag))[Symbol.for(">")]?Math.abs(t.mag-Math.log10(l.mag))[Symbol.for(">")](h):Math.abs(t.mag-Math.log10(l.mag))>h)())return t;{const e=Math.pow(10,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("-")]?t.mag[Symbol.for("-")](Math.log10(l.mag)):t.mag-Math.log10(l.mag))()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return P(Math.sign(o),1,(()=>void 0!==Math.log10(l.mag)&&null!==Math.log10(l.mag)&&Math.log10(l.mag)[Symbol.for("+")]?Math.log10(l.mag)[Symbol.for("+")](Math.log10(Math.abs(o))):Math.log10(l.mag)+Math.log10(Math.abs(o)))())}}if((()=>void 0!==Math.abs(t.mag-l.mag)&&null!==Math.abs(t.mag-l.mag)&&Math.abs(t.mag-l.mag)[Symbol.for(">")]?Math.abs(t.mag-l.mag)[Symbol.for(">")](h):Math.abs(t.mag-l.mag)>h)())return t;{const e=Math.pow(10,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("-")]?t.mag[Symbol.for("-")](l.mag):t.mag-l.mag)()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return P(Math.sign(o),1,(()=>void 0!==l.mag&&null!==l.mag&&l.mag[Symbol.for("+")]?l.mag[Symbol.for("+")](Math.log10(Math.abs(o))):l.mag+Math.log10(Math.abs(o)))())}}plus(e){return this.add(e)}sub(e){return this.add(B(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const o=B(e);if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))())return this;if((()=>void 0!==Number.isFinite(o.layer)&&null!==Number.isFinite(o.layer)&&Number.isFinite(o.layer)[Symbol.for("!")]?Number.isFinite(o.layer)[Symbol.for("!")]():!Number.isFinite(o.layer))())return o;if(0===this.sign||0===o.sign)return E(0,0,0);if(this.layer===o.layer&&this.mag===(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag)())return E((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o.sign):this.sign*o.sign)(),0,1);let t,l;if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](o.layer):this.layer>o.layer)()||(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("==")]?this.layer[Symbol.for("==")](o.layer):this.layer==o.layer)()&&(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for(">")]?Math.abs(this.mag)[Symbol.for(">")](Math.abs(o.mag)):Math.abs(this.mag)>Math.abs(o.mag))()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return B((()=>t.sign*l.sign*t.mag!==void 0&&t.sign*l.sign*t.mag!==null&&(t.sign*l.sign*t.mag)[Symbol.for("*")]?(t.sign*l.sign*t.mag)[Symbol.for("*")](l.mag):t.sign*l.sign*t.mag*l.mag)());if((()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for(">=")]?t.layer[Symbol.for(">=")](3):t.layer>=3)()||(()=>t.layer-l.layer!==void 0&&t.layer-l.layer!==null&&(t.layer-l.layer)[Symbol.for(">=")]?(t.layer-l.layer)[Symbol.for(">=")](2):t.layer-l.layer>=2)())return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),t.layer,t.mag);if(1===t.layer&&0===l.layer)return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),1,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("+")]?t.mag[Symbol.for("+")](Math.log10(l.mag)):t.mag+Math.log10(l.mag))());if(1===t.layer&&1===l.layer)return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),1,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("+")]?t.mag[Symbol.for("+")](l.mag):t.mag+l.mag)());if(2===t.layer&&1===l.layer){const e=P(Math.sign(t.mag),(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](1):t.layer-1)(),Math.abs(t.mag)).add(P(Math.sign(l.mag),(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](1):l.layer-1)(),Math.abs(l.mag)));return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)())}if(2===t.layer&&2===l.layer){const e=P(Math.sign(t.mag),(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](1):t.layer-1)(),Math.abs(t.mag)).add(P(Math.sign(l.mag),(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](1):l.layer-1)(),Math.abs(l.mag)));return P((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)())}throw Error((()=>"Bad arguments to mul: "+this+", "!==void 0&&"Bad arguments to mul: "+this+", "!==null&&("Bad arguments to mul: "+this+", ")[Symbol.for("+")]?("Bad arguments to mul: "+this+", ")[Symbol.for("+")](e):"Bad arguments to mul: "+this+", "+e)())}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const o=B(e);return this.mul(o.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return 0===this.mag?_.dNaN:0===this.layer?P(this.sign,0,(()=>1[Symbol.for("/")]?1[Symbol.for("/")](this.mag):1/this.mag)()):P(this.sign,this.layer,(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)())}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const o=B(e);return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](o.sign):this.sign>o.sign)()?1:(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<")]?this.sign[Symbol.for("<")](o.sign):this.sign<o.sign)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.cmpabs(e)):this.sign*this.cmpabs(e))()}cmpabs(e){const o=B(e),t=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?this.layer:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("minus")]?this.layer[Symbol.for("minus")]():-this.layer)(),l=(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">")]?o.mag[Symbol.for(">")](0):o.mag>0)()?o.layer:(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("minus")]?o.layer[Symbol.for("minus")]():-o.layer)();return(()=>void 0!==t&&null!==t&&t[Symbol.for(">")]?t[Symbol.for(">")](l):t>l)()?1:(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](l):t<l)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](o.mag):this.mag>o.mag)()?1:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](o.mag):this.mag<o.mag)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const o=B(e);return this.sign===o.sign&&this.layer===o.layer&&this.mag===o.mag}equals(e){return this.eq(e)}neq(e){return(()=>void 0!==this.eq(e)&&null!==this.eq(e)&&this.eq(e)[Symbol.for("!")]?this.eq(e)[Symbol.for("!")]():!this.eq(e))()}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()}lte(e){return(()=>void 0!==this.gt(e)&&null!==this.gt(e)&&this.gt(e)[Symbol.for("!")]?this.gt(e)[Symbol.for("!")]():!this.gt(e))()}gt(e){return 1===this.cmp(e)}gte(e){return(()=>void 0!==this.lt(e)&&null!==this.lt(e)&&this.lt(e)[Symbol.for("!")]?this.lt(e)[Symbol.for("!")]():!this.lt(e))()}max(e){const o=B(e);return this.lt(o)?o:this}min(e){const o=B(e);return this.gt(o)?o:this}maxabs(e){const o=B(e);return(()=>void 0!==this.cmpabs(o)&&null!==this.cmpabs(o)&&this.cmpabs(o)[Symbol.for("<")]?this.cmpabs(o)[Symbol.for("<")](0):this.cmpabs(o)<0)()?o:this}minabs(e){const o=B(e);return(()=>void 0!==this.cmpabs(o)&&null!==this.cmpabs(o)&&this.cmpabs(o)[Symbol.for(">")]?this.cmpabs(o)[Symbol.for(">")](0):this.cmpabs(o)>0)()?o:this}clamp(e,o){return this.max(e).min(o)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,o){const t=B(e);return this.eq_tolerance(t,o)?0:this.cmp(t)}compare_tolerance(e,o){return this.cmp_tolerance(e,o)}eq_tolerance(e,o){const t=B(e);if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=1e-7),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("!==")]?this.sign[Symbol.for("!==")](t.sign):this.sign!==t.sign)())return!1;if((()=>void 0!==Math.abs(this.layer-t.layer)&&null!==Math.abs(this.layer-t.layer)&&Math.abs(this.layer-t.layer)[Symbol.for(">")]?Math.abs(this.layer-t.layer)[Symbol.for(">")](1):Math.abs(this.layer-t.layer)>1)())return!1;let l=this.mag,n=t.mag;return(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](t.layer):this.layer>t.layer)()&&(n=F(n)),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<")]?this.layer[Symbol.for("<")](t.layer):this.layer<t.layer)()&&(l=F(l)),(()=>void 0!==Math.abs(l-n)&&null!==Math.abs(l-n)&&Math.abs(l-n)[Symbol.for("<=")]?Math.abs(l-n)[Symbol.for("<=")](o*Math.max(Math.abs(l),Math.abs(n))):Math.abs(l-n)<=o*Math.max(Math.abs(l),Math.abs(n)))()}equals_tolerance(e,o){return this.eq_tolerance(e,o)}neq_tolerance(e,o){return(()=>void 0!==this.eq_tolerance(e,o)&&null!==this.eq_tolerance(e,o)&&this.eq_tolerance(e,o)[Symbol.for("!")]?this.eq_tolerance(e,o)[Symbol.for("!")]():!this.eq_tolerance(e,o))()}notEquals_tolerance(e,o){return this.neq_tolerance(e,o)}lt_tolerance(e,o){const t=B(e);return(()=>void 0!==this.eq_tolerance(t,o)&&null!==this.eq_tolerance(t,o)&&this.eq_tolerance(t,o)[Symbol.for("!")]?this.eq_tolerance(t,o)[Symbol.for("!")]():!this.eq_tolerance(t,o))()&&this.lt(t)}lte_tolerance(e,o){const t=B(e);return this.eq_tolerance(t,o)||this.lt(t)}gt_tolerance(e,o){const t=B(e);return(()=>void 0!==this.eq_tolerance(t,o)&&null!==this.eq_tolerance(t,o)&&this.eq_tolerance(t,o)[Symbol.for("!")]?this.eq_tolerance(t,o)[Symbol.for("!")]():!this.eq_tolerance(t,o))()&&this.gt(t)}gte_tolerance(e,o){const t=B(e);return this.eq_tolerance(t,o)||this.gt(t)}pLog10(){return this.lt(_.dZero)?_.dZero:this.log10()}absLog10(){return 0===this.sign?_.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag)):P(1,0,Math.log10(this.mag))}log10(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?_.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag)):P(this.sign,0,Math.log10(this.mag))}log(e){return e=B(e),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()||(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<=")]?e.sign[Symbol.for("<=")](0):e.sign<=0)()||1===e.sign&&0===e.layer&&1===e.mag?_.dNaN:0===this.layer&&0===e.layer?P(this.sign,0,(()=>void 0!==Math.log(this.mag)&&null!==Math.log(this.mag)&&Math.log(this.mag)[Symbol.for("/")]?Math.log(this.mag)[Symbol.for("/")](Math.log(e.mag)):Math.log(this.mag)/Math.log(e.mag))()):_.div(this.log10(),e.log10())}log2(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?_.dNaN:0===this.layer?P(this.sign,0,Math.log2(this.mag)):1===this.layer?P(Math.sign(this.mag),0,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("*")]?Math.abs(this.mag)[Symbol.for("*")](3.321928094887362):3.321928094887362*Math.abs(this.mag))()):2===this.layer?P(Math.sign(this.mag),1,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("+")]?Math.abs(this.mag)[Symbol.for("+")](.5213902276543247):Math.abs(this.mag)+.5213902276543247)()):P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag))}ln(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?_.dNaN:0===this.layer?P(this.sign,0,Math.log(this.mag)):1===this.layer?P(Math.sign(this.mag),0,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("*")]?Math.abs(this.mag)[Symbol.for("*")](2.302585092994046):2.302585092994046*Math.abs(this.mag))()):2===this.layer?P(Math.sign(this.mag),1,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("+")]?Math.abs(this.mag)[Symbol.for("+")](.36221568869946325):Math.abs(this.mag)+.36221568869946325)()):P(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const o=B(e),t=this,l=o;if(0===t.sign)return l.eq(0)?E(1,0,1):t;if(1===t.sign&&0===t.layer&&1===t.mag)return t;if(0===l.sign)return E(1,0,1);if(1===l.sign&&0===l.layer&&1===l.mag)return t;const n=t.absLog10().mul(l).pow10();return this.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()?1===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?n.neg():0===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?n:_.dNaN:n}pow10(){if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()||(()=>void 0!==Number.isFinite(this.mag)&&null!==Number.isFinite(this.mag)&&Number.isFinite(this.mag)[Symbol.for("!")]?Number.isFinite(this.mag)[Symbol.for("!")]():!Number.isFinite(this.mag))())return _.dNaN;let e=this;if(0===e.layer){const o=Math.pow(10,(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)());if(Number.isFinite(o)&&(()=>void 0!==Math.abs(o)&&null!==Math.abs(o)&&Math.abs(o)[Symbol.for(">=")]?Math.abs(o)[Symbol.for(">=")](.1):Math.abs(o)>=.1)())return P(1,0,o);if(0===e.sign)return _.dOne;e=E(e.sign,(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),Math.log10(e.mag))}return(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for(">")]?e.sign[Symbol.for(">")](0):e.sign>0)()&&(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">=")]?e.mag[Symbol.for(">=")](0):e.mag>=0)()?P(e.sign,(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),e.mag):(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)()&&(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">=")]?e.mag[Symbol.for(">=")](0):e.mag>=0)()?P((()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag)()):_.dOne}pow_base(e){return B(e).pow(this)}root(e){const o=B(e);return this.pow(o.recip())}factorial(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||0===this.layer?this.add(1).gamma():1===this.layer?_.exp(_.mul(this,_.ln(this).sub(1))):_.exp(this)}gamma(){if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return this.recip();if(0===this.layer){if(this.lt(E(1,0,24)))return B(I((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](1):this.mag-1)();let o=.9189385332046727;o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e))(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e)();const t=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let l=e,n=(()=>12[Symbol.for("*")]?12[Symbol.for("*")](l):12*l)(),r=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)(),i=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](r):o+r)();if(i===o)return _.exp(o);if(o=i,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),n=(()=>360[Symbol.for("*")]?360[Symbol.for("*")](l):360*l)(),r=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)(),i=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](r):o-r)(),i===o)return _.exp(o);o=i,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),n=(()=>1260[Symbol.for("*")]?1260[Symbol.for("*")](l):1260*l)();let a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)();return o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](a):o+a)(),l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),n=(()=>1680[Symbol.for("*")]?1680[Symbol.for("*")](l):1680*l)(),a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](n):1/n)(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](a):o-a)(),_.exp(o)}return 1===this.layer?_.exp(_.mul(this,_.ln(this).sub(1))):_.exp(this)}lngamma(){return this.gamma().ln()}exp(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dOne:0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<=")]?this.mag[Symbol.for("<=")](709.7):this.mag<=709.7)()?B(Math.exp((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):0===this.layer?P(1,1,(()=>this.sign*Math.log10(Math.E)!==void 0&&this.sign*Math.log10(Math.E)!==null&&(this.sign*Math.log10(Math.E))[Symbol.for("*")]?(this.sign*Math.log10(Math.E))[Symbol.for("*")](this.mag):this.sign*Math.log10(Math.E)*this.mag)()):1===this.layer?P(1,2,(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.log10(.4342944819032518)+this.mag):this.sign*(Math.log10(.4342944819032518)+this.mag))()):P(1,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())}sqr(){return this.pow(2)}sqrt(){if(0===this.layer)return B(Math.sqrt((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));if(1===this.layer)return P(1,2,(()=>void 0!==Math.log10(this.mag)&&null!==Math.log10(this.mag)&&Math.log10(this.mag)[Symbol.for("-")]?Math.log10(this.mag)[Symbol.for("-")](.3010299956639812):Math.log10(this.mag)-.3010299956639812)());{const e=_.div(E(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag),E(1,0,2));return e.layer=(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](3):1/3)())}tetrate(e=2,o=E(1,0,1)){if(1===e)return _.pow(this,o);if(0===e)return new _(o);if(this.eq(_.dOne))return _.dOne;if(this.eq((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))return _.pow(this,o);if(e===Number.POSITIVE_INFINITY){const e=this.toNumber();if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](1.444667861009766):e<=1.444667861009766)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](.06598803584531254):e>=.06598803584531254)()){if((()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009099):e>1.444667861009099)())return new _(Math.E);const o=_.ln(this).neg();return o.lambertw().div(o)}return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009766):e>1.444667861009766)()?new _(Number.POSITIVE_INFINITY):_.dNaN}if(this.eq(_.dZero)){let o=Math.abs((()=>e+1!==void 0&&e+1!==null&&(e+1)[Symbol.for("%")]?(e+1)[Symbol.for("%")](2):(e+1)%2)());return(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](1):o>1)()&&(o=(()=>2[Symbol.for("-")]?2[Symbol.for("-")](o):2-o)()),new _(o)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](0):e<0)())return _.iteratedlog(o,this,(()=>void 0!==e&&null!==e&&e[Symbol.for("minus")]?e[Symbol.for("minus")]():-e)());o=B(o);const t=e;e=Math.trunc(e);const l=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();if(this.gt(_.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let t=0;(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](e):t<e)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("prefix-increment")]?t[Symbol.for("prefix-increment")]():++t)()){const e=o;if(o=this.pow(o),e.eq(o))return o}if((()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](0):0!=l)()){const e=this.pow(o);return o.mul((()=>1[Symbol.for("-")]?1[Symbol.for("-")](l):1-l)()).add(e.mul(l))}return o}(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(_.dOne)?this.gt(10)?o=this.pow(l):(o=B(_.tetrate_critical(this.toNumber(),l)),this.lt(2)&&(o=o.sub(1).mul(this.minus(1)).plus(1))):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](e):n<e)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(o=this.pow(o),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>o.layer-this.layer!==void 0&&o.layer-this.layer!==null&&(o.layer-this.layer)[Symbol.for(">")]?(o.layer-this.layer)[Symbol.for(">")](3):o.layer-this.layer>3)())return E(o.sign,(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](e-n-1):o.layer+(e-n-1))(),o.mag);if((()=>void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](1e4):n>1e4)())return o}return o}iteratedexp(e=2,o=E(1,0,1)){return this.tetrate(e,o)}iteratedlog(e=10,o=1){if((()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)())return _.tetrate(e,(()=>void 0!==o&&null!==o&&o[Symbol.for("minus")]?o[Symbol.for("minus")]():-o)(),this);e=B(e);let t=B(this);const l=o;o=Math.trunc(o);const n=(()=>void 0!==l&&null!==l&&l[Symbol.for("-")]?l[Symbol.for("-")](o):l-o)();if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=Math.min(o,(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](l):o-l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](o):r<o)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(t=t.log(e),(()=>void 0!==isFinite(t.layer)&&null!==isFinite(t.layer)&&isFinite(t.layer)[Symbol.for("!")]?isFinite(t.layer)[Symbol.for("!")]():!isFinite(t.layer))()||(()=>void 0!==isFinite(t.mag)&&null!==isFinite(t.mag)&&isFinite(t.mag)[Symbol.for("!")]?isFinite(t.mag)[Symbol.for("!")]():!isFinite(t.mag))())return t.normalize();if((()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](1e4):r>1e4)())return t}return(()=>void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](0):n>0)()&&(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](1):n<1)()&&(t=e.eq(10)?t.layeradd10((()=>void 0!==n&&null!==n&&n[Symbol.for("minus")]?n[Symbol.for("minus")]():-n)()):t.layeradd((()=>void 0!==n&&null!==n&&n[Symbol.for("minus")]?n[Symbol.for("minus")]():-n)(),e)),t}slog(e=10){if(e=B(e),e.lte(_.dZero))return _.dNaN;if(e.eq(_.dOne))return _.dNaN;if(e.lt(_.dOne))return this.eq(_.dOne)?_.dZero:this.eq(_.dZero)?_.dNegOne:_.dNaN;if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||this.eq(_.dZero))return _.dNegOne;let o=0,t=B(this);if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)();o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](l):o+l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let l=0;(()=>void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100)();(()=>void 0!==l&&null!==l&&"object"===typeof l&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l)())if(t.lt(_.dZero))t=_.pow(e,t),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)();else{if(t.lte(_.dOne))return B((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](_.slog_critical(e.toNumber(),t.toNumber())):o+_.slog_critical(e.toNumber(),t.toNumber()))());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),t=_.log(t,e)}return B(o)}static slog_critical(e,o){return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()?(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)():_.critical_section(e,o,Z)}static tetrate_critical(e,o){return _.critical_section(e,o,w)}static critical_section(e,o,t){o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](10):10*o)(),(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)()&&(o=0),(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](10):o>10)()&&(o=10),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](2):e<2)()&&(e=2),(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()&&(e=10);let l=0,n=0;for(let a=0;(()=>void 0!==a&&null!==a&&a[Symbol.for("<")]?a[Symbol.for("<")](C.length):a<C.length)();(()=>void 0!==a&&null!==a&&"object"===typeof a&&a[Symbol.for("prefix-increment")]?a[Symbol.for("prefix-increment")]():++a)()){if((()=>void 0!==C[a]&&null!==C[a]&&C[a][Symbol.for("==")]?C[a][Symbol.for("==")](e):C[a]==e)()){l=t[a][Math.floor(o)],n=t[a][Math.ceil(o)];break}if((()=>void 0!==C[a]&&null!==C[a]&&C[a][Symbol.for("<")]?C[a][Symbol.for("<")](e):C[a]<e)()&&(()=>void 0!==C[a+1]&&null!==C[a+1]&&C[a+1][Symbol.for(">")]?C[a+1][Symbol.for(">")](e):C[a+1]>e)()){const r=(()=>e-C[a]!==void 0&&e-C[a]!==null&&(e-C[a])[Symbol.for("/")]?(e-C[a])[Symbol.for("/")](C[a+1]-C[a]):(e-C[a])/(C[a+1]-C[a]))();l=(()=>t[a][Math.floor(o)]*(1-r)!==void 0&&t[a][Math.floor(o)]*(1-r)!==null&&(t[a][Math.floor(o)]*(1-r))[Symbol.for("+")]?(t[a][Math.floor(o)]*(1-r))[Symbol.for("+")](t[a+1][Math.floor(o)]*r):t[a][Math.floor(o)]*(1-r)+t[a+1][Math.floor(o)]*r)(),n=(()=>t[a][Math.ceil(o)]*(1-r)!==void 0&&t[a][Math.ceil(o)]*(1-r)!==null&&(t[a][Math.ceil(o)]*(1-r))[Symbol.for("+")]?(t[a][Math.ceil(o)]*(1-r))[Symbol.for("+")](t[a+1][Math.ceil(o)]*r):t[a][Math.ceil(o)]*(1-r)+t[a+1][Math.ceil(o)]*r)();break}}const r=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](Math.floor(o)):o-Math.floor(o))(),i=(()=>l*(1-r)!==void 0&&l*(1-r)!==null&&(l*(1-r))[Symbol.for("+")]?(l*(1-r))[Symbol.for("+")](n*r):l*(1-r)+n*r)();return i}layeradd10(e){e=_.fromValue_noAlloc(e).toNumber();const o=B(this);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](1):e>=1)()){(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0)()&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](0):o.layer>0)()?(o.sign=0,o.mag=0,o.layer=0):o.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("==")]?o.layer[Symbol.for("==")](0):0==o.layer)()&&(o.sign=1,o.mag=(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag)());const t=Math.trunc(e);e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](t):e-t)(),o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t)()}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](-1):e<=-1)()){const t=Math.trunc(e);if(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](t):e-t)(),o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t)(),(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)())for(let e=0;(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](100):e<100)();(()=>void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e)()){if((()=>{void 0!==o.layer&&null!==o.layer&&"object"===typeof o.layer&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag),(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return 0===o.sign&&(o.sign=1),(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)()&&(o.layer=0),o.normalize();if((()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](0):o.layer>=0)())break}}while((()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)())(()=>{void 0!==o.layer&&null!==o.layer&&"object"===typeof o.layer&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag);return 0===o.sign&&(o.sign=1,0===o.mag&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](1):o.layer>=1)()&&(o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1)(),o.mag=1)),o.normalize(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](0):0!==e)()?o.layeradd(e,10):o}layeradd(e,o){const t=this.slog(o).toNumber(),l=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](e):t+e)();return(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](0):l>=0)()?_.tetrate(o,l):(()=>void 0!==Number.isFinite(l)&&null!==Number.isFinite(l)&&Number.isFinite(l)[Symbol.for("!")]?Number.isFinite(l)[Symbol.for("!")]():!Number.isFinite(l))()?_.dNaN:(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](-1):l>=-1)()?_.log(_.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](1):l+1)()),o):_.log(_.log(_.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](2):l+2)()),o),o)}lambertw(){if(this.lt((()=>.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499)()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return B(R(this.toNumber()));if(0===this.layer)return B(R((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));if(1===this.layer)return O(this);if(2===this.layer)return O(this);if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](3):this.layer>=3)())return E(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("==")]?this.sign[Symbol.for("==")](1):1==this.sign)()&&(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](3):this.layer>=3)())return E(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,o=E(1,0,1)){o=B(o);const t=e;e=Math.trunc(e);const l=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(_.dOne)?((()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})(),o=new _(l)):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](e):n<e)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(o=this.tetrate(o.toNumber()),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>void 0!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](10):n>10)())return o}return o}sin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.sin((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(0,0,0)}cos(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?_.dOne:0===this.layer?B(Math.cos((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(0,0,0)}tan(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.tan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(0,0,0)}asin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.asin((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(Number.NaN,Number.NaN,Number.NaN)}acos(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?B(Math.acos(this.toNumber())):0===this.layer?B(Math.acos((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):E(Number.NaN,Number.NaN,Number.NaN)}atan(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?B(Math.atan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(Math.atan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Infinity):Infinity*this.sign)()))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return _.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return _.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?E(Number.NaN,Number.NaN,Number.NaN):_.ln(this.add(1).div(B(1).sub(this))).div(2)}ascensionPenalty(e){return 0===e?this:this.root(_.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](1):this.cmp(e)<1)()}lessThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](0):this.cmp(e)<0)()}greaterThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](-1):this.cmp(e)>-1)()}greaterThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](0):this.cmp(e)>0)()}}(0,n.Z)(_,"dZero",E(0,0,0)),(0,n.Z)(_,"dOne",E(1,0,1)),(0,n.Z)(_,"dNegOne",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),0,1)),(0,n.Z)(_,"dTwo",E(1,0,2)),(0,n.Z)(_,"dTen",E(1,0,10)),(0,n.Z)(_,"dNaN",E(Number.NaN,Number.NaN,Number.NaN)),(0,n.Z)(_,"dInf",E(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,n.Z)(_,"dNegInf",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,n.Z)(_,"dNumberMax",P(1,0,Number.MAX_VALUE)),(0,n.Z)(_,"dNumberMin",P(1,0,Number.MIN_VALUE));var j=t(6453),A=_;const U=new _(1);function q(e,o,t=!0){let l=_.log10(e).floor(),n=_.div(e,_.pow(10,l));"10"===n.toStringWithDecimalPlaces(o)&&(n=U,l=l.add(1));const r=l.gte(1e9)?ee(l,Math.max(Math.max(o,3),j.defaultDecimalsShown)):l.gte(1e4)?z(l,0):l.toStringWithDecimalPlaces(0);return t?(()=>n.toStringWithDecimalPlaces(o)+"e"!==void 0&&n.toStringWithDecimalPlaces(o)+"e"!==null&&(n.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")]?(n.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")](r):n.toStringWithDecimalPlaces(o)+"e"+r)():(()=>"e"[Symbol.for("+")]?"e"[Symbol.for("+")](r):"e"+r)()}function z(e,o){if(null===e||void 0===e)return"NaN";if(e=new _(e),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.001):e.mag<.001)())return(0).toFixed(o);const t=e.toStringWithDecimalPlaces(o),l=t.split(".");return l[0]=l[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),(()=>void 0!==l.length&&null!==l.length&&l.length[Symbol.for("==")]?l.length[Symbol.for("==")](1):1==l.length)()?l[0]:(()=>l[0]+"."!==void 0&&l[0]+"."!==null&&(l[0]+".")[Symbol.for("+")]?(l[0]+".")[Symbol.for("+")](l[1]):l[0]+"."+l[1])()}function L(e,o){return null===e||void 0===e?"NaN":(e=new _(e),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e-4):e.mag<1e-4)()?(0).toFixed(o):((()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.1):e.mag<.1)()&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](0):0!==o)()&&(o=Math.max(Math.max(o,4),j.defaultDecimalsShown)),e.toStringWithDecimalPlaces(o)))}const G=new _("eeee1000"),W=new _("e100000"),H=new _("e1000"),$=new _(1e9),Y=new _(1e6),K=new _(1e3),J=new _(.98),Q=new _(.001),X=new _(0);function ee(e,o,t){if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=j.defaultDecimalsShown),t=t??j.defaultShowSmall,e=new _(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if((()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)())return(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](ee(e.neg(),o)):"-"+ee(e.neg(),o))();if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(G)){const o=e.slog();return o.gte(Y)?(()=>"F"[Symbol.for("+")]?"F"[Symbol.for("+")](ee(o.floor())):"F"+ee(o.floor()))():(()=>_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](z(o.floor(),0)):_.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"+z(o.floor(),0))()}if(e.gte(W))return q(e,0,!1);if(e.gte(H))return q(e,0);if(e.gte($))return q(e,o);if(e.gte(K))return z(e,0);if(e.gte(Q)||(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)())return L(e,o);if(e.eq(X))return(0).toFixed(o);if(e=re(e),e.lt(H)){const t=q(e,o);return t.replace(/([^(?:e|F)]*)$/,"-$1")}return(()=>void 0!==ee(e,o)&&null!==ee(e,o)&&ee(e,o)[Symbol.for("+")]?ee(e,o)[Symbol.for("+")]("⁻¹"):ee(e,o)+"⁻¹")()}function oe(e){return e=new _(e),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)()?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](oe(e.neg())):"-"+oe(e.neg()))():e.gte($)||e.lte(J)&&(()=>void 0!==e.eq(X)&&null!==e.eq(X)&&e.eq(X)[Symbol.for("!")]?e.eq(X)[Symbol.for("!")]():!e.eq(X))()?ee(e):ee(e,0)}function te(e){return _.lt(e,0)?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](te(_.neg(e))):"-"+te(_.neg(e)))():_.gt(e,(()=>2[Symbol.for("**")]?2[Symbol.for("**")](51):2**51)())?(()=>void 0!==ee(_.div(e,31536e3))&&null!==ee(_.div(e,31536e3))&&ee(_.div(e,31536e3))[Symbol.for("+")]?ee(_.div(e,31536e3))[Symbol.for("+")]("y"):ee(_.div(e,31536e3))+"y")():(e=new _(e).toNumber(),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](60):e<60)()?(()=>void 0!==ee(e)&&null!==ee(e)&&ee(e)[Symbol.for("+")]?ee(e)[Symbol.for("+")]("s"):ee(e)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](3600):e<3600)()?(()=>oe(Math.floor(e/60))+"m "+ee(e%60)!==void 0&&oe(Math.floor(e/60))+"m "+ee(e%60)!==null&&(oe(Math.floor(e/60))+"m "+ee(e%60))[Symbol.for("+")]?(oe(Math.floor(e/60))+"m "+ee(e%60))[Symbol.for("+")]("s"):oe(Math.floor(e/60))+"m "+ee(e%60)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](86400):e<86400)()?(()=>oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60)!==void 0&&oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60)!==null&&(oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60))[Symbol.for("+")]?(oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60))[Symbol.for("+")]("s"):oe(Math.floor(e/3600))+"h "+oe(Math.floor(e/60)%60)+"m "+oe(e%60)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](31536e3):e<31536e3)()?(()=>oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60)!==void 0&&oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60)!==null&&(oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60))[Symbol.for("+")]?(oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60))[Symbol.for("+")]("m"):oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h "+oe(Math.floor(e/60)%60)+"m")():(()=>oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)!==void 0&&oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)!==null&&(oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24))[Symbol.for("+")]?(oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24))[Symbol.for("+")]("h"):oe(Math.floor(e/31536e3))+"y "+oe(Math.floor(e/84600)%365)+"d "+oe(Math.floor(e/3600)%24)+"h")())}function le(e,o,t){e=new _(e);let l=e.toStringWithDecimalPlaces(o);return new _(l).gte(t)&&(l=_.sub(t,Math.pow(.1,o)).toStringWithDecimalPlaces(o)),l}function ne(e,o){return ee(e,o,!0)}function re(e){let o=_.log10(e).ceil();const t=_.div(e,_.pow(10,o));return o=o.neg(),e=new _(10).pow(o).times(t),e}const{exponentialFormat:ie,commaFormat:ae,regularFormat:se,format:ue,formatWhole:me,formatTime:ce,toPlaces:fe,formatSmall:de,invertOOM:ye}=l;window.Decimal=A,window.exponentialFormat=ie,window.commaFormat=ae,window.regularFormat=se,window.format=ue,window.formatWhole=me,window.formatTime=ce,window.toPlaces=fe,window.formatSmall=de,window.invertOOM=ye;var be=A},1349:function(e,o,t){"use strict";function l(e){let o=e.replace(/([A-Z])/g," $1");return o=(()=>void 0!==o.charAt(0).toUpperCase()&&null!==o.charAt(0).toUpperCase()&&o.charAt(0).toUpperCase()[Symbol.for("+")]?o.charAt(0).toUpperCase()[Symbol.for("+")](o.slice(1)):o.charAt(0).toUpperCase()+o.slice(1))(),o}function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){return"function"===typeof e}t.d(o,{IJ:function(){return l},PO:function(){return n},mf:function(){return r}})},9583:function(e,o,t){"use strict";t.d(o,{mM:function(){return r},yB:function(){return i},UI:function(){return a}});var l=t(4865),n=t(1349);const r=Symbol("DoNotCache");function i(e,o){const t=e[o];(0,n.mf)(t)&&0===t.length&&(()=>void 0!==t[r]&&null!==t[r]&&t[r][Symbol.for("!")]?t[r][Symbol.for("!")]():!t[r])()&&(e[o]=(0,l.computed)(t.bind(e)))}function a(e){return(0,n.mf)(e)&&(()=>void 0!==e[r]&&null!==e[r]&&e[r][Symbol.for("!")]?e[r][Symbol.for("!")]():!e[r])()&&(e=(0,l.computed)(e)),e}},3273:function(e,o,t){"use strict";t.d(o,{Le:function(){return l},c4:function(){return n},z2:function(){return r}});const l=Symbol("ProxyState"),n=Symbol("ProxyPath");function r(e,o={}){const t=o;let n=!1;function r(){return(()=>void 0!==n&&null!==n&&n[Symbol.for("!")]?n[Symbol.for("!")]():!n)()&&(Object.assign(t,e(t)),n=!0),t}return new Proxy(t,{get(e,o){return o===l?r():r()[o]},set(e,o,t){return r()[o]=t,!0},has(e,o){return o===l||Reflect.has(r(),o)},ownKeys(){return Reflect.ownKeys(r())},getOwnPropertyDescriptor(o,l){return(()=>void 0!==n&&null!==n&&n[Symbol.for("!")]?n[Symbol.for("!")]():!n)()&&(Object.assign(t,e(t)),n=!0),Object.getOwnPropertyDescriptor(o,l)}})}},463:function(e,o,t){"use strict";t.d(o,{a1:function(){return s},zD:function(){return u},xM:function(){return m},QI:function(){return c},uW:function(){return f},y6:function(){return d}});t(2801);var l=t(6453),n=t(5967),r=t(9266),i=t(3273);function a(e={}){return Object.assign({id:`${l.id}-0`,name:"Default Save",tabs:l.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:l.id,modVersion:l.versionNumber,layers:{}},e)}function s(){const e=btoa(unescape(encodeURIComponent((0,n.U)(n.Z[i.Le]))));return localStorage.setItem(n.Z.id,e),e}async function u(){(0,r.ri)();try{const e=localStorage.getItem(r.ZP.active);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void await f(m());const o=JSON.parse(decodeURIComponent(escape(atob(e))));if((()=>void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id)())return void await f(m());o.id=r.ZP.active,await f(o)}catch(e){console.error("Failed to load save. Falling back to new save.\n",e),await f(m())}}function m(){const e=c(),o=a({id:e});return localStorage.setItem(e,btoa(unescape(encodeURIComponent((0,n.U)(o))))),r.ZP.saves.push(e),o}function c(){let e,o=0;do{e=`${l.id}-${(()=>void 0!==o&&null!==o&&"object"===typeof o&&o[Symbol.for("postfix-increment")]?o[Symbol.for("postfix-increment")]():o++)()}`}while(localStorage.getItem(e));return e}async function f(e){console.info("Loading save",e);const{layers:o,removeLayer:i,addLayer:s}=await Promise.resolve().then(t.bind(t,9365)),{fixOldSave:u,getInitialLayers:m}=await Promise.resolve().then(t.bind(t,2561));for(const t in o)i(o[t]);m(e).forEach((o=>s(o,e))),e=a(e),e.offlineProd&&e.time&&((()=>void 0!==e.offlineTime&&null!==e.offlineTime&&e.offlineTime[Symbol.for("==")]?e.offlineTime[Symbol.for("==")](void 0):void 0==e.offlineTime)()&&(e.offlineTime=0),e.offlineTime=(()=>void 0!==e.offlineTime&&null!==e.offlineTime&&e.offlineTime[Symbol.for("+")]?e.offlineTime[Symbol.for("+")]((Date.now()-e.time)/1e3):e.offlineTime+(Date.now()-e.time)/1e3)()),e.time=Date.now(),(()=>void 0!==e.modVersion&&null!==e.modVersion&&e.modVersion[Symbol.for("!==")]?e.modVersion[Symbol.for("!==")](l.versionNumber):e.modVersion!==l.versionNumber)()&&u(e.modVersion,e),Object.assign(n.Z,e),r.ZP.active=n.Z.id}setInterval((()=>{n.Z.autosave&&s()}),1e3),window.onbeforeunload=()=>{n.Z.autosave&&s()},window.save=s;const d=window.hardReset=async()=>{await f(m())}},2561:function(e,o,t){"use strict";t.r(o),t.d(o,{fixOldSave:function(){return ul},getInitialLayers:function(){return al},hasWon:function(){return sl},main:function(){return il}});var l=t(4865);const n=e=>((0,l.pushScopeId)("data-v-07150322"),e=e(),(0,l.popScopeId)(),e),r=n((()=>(0,l.createElementVNode)("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[(0,l.createElementVNode)("g",{id:"P"},[(0,l.createElementVNode)("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),(0,l.createElementVNode)("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),(0,l.createElementVNode)("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),(0,l.createElementVNode)("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),(0,l.createElementVNode)("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),(0,l.createElementVNode)("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),(0,l.createElementVNode)("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));function i(e,o){return(0,l.openBlock)(),(0,l.createBlock)(l.Transition,{appear:""},{default:(0,l.withCtx)((()=>[r])),_:1})}var a=t(3744);const s={},u=(0,a.Z)(s,[["render",i],["__scopeId","data-v-07150322"]]);var m=u,c=(0,l.defineComponent)({props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{style:(0,l.normalizeStyle)({width:e.width,height:e.height})},null,4))}});const f=c;var d=f,y=t(6113),b=t(5613),h=t(7302),p=t(4061);function g(e,o="points",t=0,n){const r=(0,l.isRef)(e)?e:(0,p.ax)(e);return r.displayName=o,r.precision=t,r.small=n,r}function v(e){const o=(0,p.ax)(e.value);return(0,l.watch)(e,(e=>{b.ZP.gt(e,o.value)&&(o.value=e)})),o}function S(e){const o=(0,p.ax)(e.value);return(0,l.watch)(e,((e,t)=>{b.ZP.gt(e,t)&&(o.value=b.ZP.add(o.value,b.ZP.sub(e,t)))})),o}const N=new b.ZP("10^^8"),k=new b.ZP("1e100");function V(e,o){const t=(0,l.ref)(0),n=(0,l.ref)(0),r=(0,l.ref)(0);h.globalBus.on("update",(o=>{if(n.value=0,b.ZP.lte(e.value,k))return void(r.value=e.value);let l=e.value,i=r.value;if(r.value=l,b.ZP.gt(l,i))if(b.ZP.gte(l,N))l=b.ZP.slog(l,1e10),i=b.ZP.slog(i,1e10),t.value=l.sub(i).div(o),n.value=(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)();else while(b.ZP.div(l,i).log(10).div(o).gte("100")&&(()=>void 0!==n.value&&null!==n.value&&n.value[Symbol.for("<=")]?n.value[Symbol.for("<=")](5):n.value<=5)()&&b.ZP.gt(i,0))l=b.ZP.log10(l),i=b.ZP.log10(i),t.value=l.sub(i).div(o),(()=>{void 0!==n.value&&null!==n.value&&"object"===typeof n.value&&n.value[Symbol.for("postfix-increment")]?n.value[Symbol.for("postfix-increment")]():n.value++})()}));const i=(0,l.computed)((()=>0===n.value?o?(()=>(0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName!==void 0&&(0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName!==null&&((0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]?((0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]("/s"):(0,b.WU)(o.value,e.precision,e.small)+" "+e.displayName+"/s")():"":(()=>(0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)!==void 0&&(0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)!==null&&((0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value))[Symbol.for("+")]?((0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value))[Symbol.for("+")]("s/sec"):(0,b.WU)(t.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)+"s/sec")()));return i}function x(e,o){const t=o??e.value;return b.ZP.eq(e.precision,0)?(0,b.Ht)(t):(0,b.WU)(t,e.precision,e.small)}function M(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Links");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.nodesComp))),e.leftNodesComp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.leftNodesComp),{key:0})):(0,l.createCommentVNode)("",!0),e.rightNodesComp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.rightNodesComp),{key:1})):(0,l.createCommentVNode)("",!0),e.branches?((0,l.openBlock)(),(0,l.createBlock)(a,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,l.createCommentVNode)("",!0)],64)}var C=t(1604),w=t(9365);const Z=["x1","y1","x2","y2"];var B=(0,l.defineComponent)({props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,l.computed)((()=>{const e=t.startNode.value.rect,o=t.boundingRect.value,l=o?{x:(()=>e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](o.x):e.x+e.width/2-o.x)(),y:(()=>e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](o.y):e.y+e.height/2-o.y)()}:{x:0,y:0};return t.link.value.offsetStart&&(l.x=(()=>void 0!==l.x&&null!==l.x&&l.x[Symbol.for("+")]?l.x[Symbol.for("+")](t.link.value.offsetStart.x):l.x+t.link.value.offsetStart.x)(),l.y=(()=>void 0!==l.y&&null!==l.y&&l.y[Symbol.for("+")]?l.y[Symbol.for("+")](t.link.value.offsetStart.y):l.y+t.link.value.offsetStart.y)()),l})),r=(0,l.computed)((()=>{const e=t.endNode.value.rect,o=t.boundingRect.value,l=o?{x:(()=>e.x+e.width/2!==void 0&&e.x+e.width/2!==null&&(e.x+e.width/2)[Symbol.for("-")]?(e.x+e.width/2)[Symbol.for("-")](o.x):e.x+e.width/2-o.x)(),y:(()=>e.y+e.height/2!==void 0&&e.y+e.height/2!==null&&(e.y+e.height/2)[Symbol.for("-")]?(e.y+e.height/2)[Symbol.for("-")](o.y):e.y+e.height/2-o.y)()}:{x:0,y:0};return t.link.value.offsetEnd&&(l.x=(()=>void 0!==l.x&&null!==l.x&&l.x[Symbol.for("+")]?l.x[Symbol.for("+")](t.link.value.offsetEnd.x):l.x+t.link.value.offsetEnd.x)(),l.y=(()=>void 0!==l.y&&null!==l.y&&l.y[Symbol.for("+")]?l.y[Symbol.for("+")](t.link.value.offsetEnd.y):l.y+t.link.value.offsetEnd.y)()),l}));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("line",(0,l.mergeProps)({"stroke-width":"15px",stroke:"white"},e.link,{x1:(0,l.unref)(n).x,y1:(0,l.unref)(n).y,x2:(0,l.unref)(r).x,y2:(0,l.unref)(r).y}),null,16,Z))}});const P=B;var E=P,T=(0,l.defineComponent)({props:{links:null},setup(e){const o=e,t=(0,l.toRef)(o,"links"),n=new ResizeObserver(u),r=(0,l.inject)(w.NodesInjectionKey),i=(0,l.ref)(null);(0,l.onMounted)((()=>{const e=i.value;(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&n.observe(e)}));let a=!0,s=(0,l.ref)(i.value?.getBoundingClientRect());function u(){(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!=")]?i.value[Symbol.for("!=")](null):null!=i.value)()&&a&&(a=!1,(0,l.nextTick)((()=>{s.value=i.value?.getBoundingClientRect(),Object.values(r.value).forEach((e=>e.rect=e.element.getBoundingClientRect())),a=!0})))}document.fonts.ready.then(u);const m=(0,l.computed)((()=>{const e=r.value;return t.value?.filter((o=>e[o.startNode.id]?.rect&&e[o.startNode.id]?.rect))??[]}));return(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.unref)(m)?((0,l.openBlock)(),(0,l.createElementBlock)("svg",(0,l.normalizeProps)((0,l.mergeProps)({key:0},e.$attrs)),[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(m),((e,o)=>((0,l.openBlock)(),(0,l.createBlock)(E,{key:o,link:e,boundingRect:(0,l.unref)(s),startNode:(0,l.unref)(r)[e.startNode.id],endNode:(0,l.unref)(r)[e.endNode.id]},null,8,["link","boundingRect","startNode","endNode"])))),128))],16)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});const F=(0,a.Z)(T,[["__scopeId","data-v-e35b0402"]]);var I=F,D=(0,l.defineComponent)({props:{nodes:{type:(0,C.P5)(Array),required:!0},leftSideNodes:(0,C.P5)(Array),rightSideNodes:(0,C.P5)(Array),branches:(0,C.P5)(Array)},components:{Links:I},setup(e){const{nodes:o,leftSideNodes:t,rightSideNodes:n}=(0,l.toRefs)(e),r=(0,l.shallowRef)();(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);r.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[e.map((e=>(0,l.createVNode)("span",{class:"row tree-row",style:"margin: 50px auto;"},[e.map(C.qF)])))]))))}));const i=(0,l.shallowRef)();(0,l.watchEffect)((()=>{const e=(0,C.Uv)(t);i.value=e?(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",{class:"left-side-nodes small"},[e.map(C.qF)])))):""}));const a=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{const e=(0,C.Uv)(n);a.value=e?(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",{class:"side-nodes small"},[e.map(C.qF)])))):""})),{unref:l.unref,nodesComp:r,leftNodesComp:i,rightNodesComp:a}}});const R=(0,a.Z)(D,[["render",M],["__scopeId","data-v-aa87859c"]]);var O=R;function _(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:(0,l.normalizeClass)({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)})},[(0,l.createElementVNode)("div",{onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},e.unref(e.style)??[]])},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp))))],36),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var j=(0,l.defineComponent)({props:{id:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,l.inject)(w.RegisterNodeInjectionKey),r=(0,l.inject)(w.UnregisterNodeInjectionKey),i=(0,l.ref)(null),a=(0,l.computed)((()=>i.value&&i.value.parentElement));return n&&r&&((0,l.watch)([a,t.id],(([e,o],[t,i])=>{t&&r((0,l.unref)(i)),e&&n(o,e)})),(0,l.onUnmounted)((()=>r((0,l.unref)(t.id))))),(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"node",ref_key:"node",ref:i},null,512))}});const A=(0,a.Z)(j,[["__scopeId","data-v-63ded336"]]);var U=A;const q={key:0},z={key:0,class:"mark star"},L=["src"];var G=(0,l.defineComponent)({props:{mark:{type:[Boolean,String]}},setup(e){return(o,t)=>e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",q,[!0===e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",z)):((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,L))])):(0,l.createCommentVNode)("",!0)}});const W=(0,a.Z)(G,[["__scopeId","data-v-c476c56a"]]);var H=W,$=(0,l.defineComponent)({props:{display:(0,C.P5)(Object,String,Function),visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),onClick:Function,onHold:Function,color:(0,C.P5)(String),glowColor:(0,C.P5)(String),canClick:{type:(0,C.P5)(Boolean),required:!0},mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:H,Node:U},setup(e){const{onClick:o,onHold:t,display:n}=(0,l.toRefs)(e),r=(0,C.KO)(n),{start:i,stop:a}=(0,C.ix)(o,t);return{start:i,stop:a,comp:r,unref:l.unref,Visibility:y.EE,isCoercableComponent:C.RU}}});const Y=(0,a.Z)($,[["render",_],["__scopeId","data-v-426d9bce"]]);var K=Y,J=t(9583),Q=t(3273);const X=Symbol("TreeNode"),ee=Symbol("Tree");function oe(e){return(0,Q.z2)((()=>{const o=e();if(o.id=(0,y.QI)("treeNode-"),o.type=X,o[y.wA]=K,(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,J.yB)(o,"color"),(0,J.yB)(o,"display"),(0,J.yB)(o,"glowColor"),(0,J.yB)(o,"classes"),(0,J.yB)(o,"style"),(0,J.yB)(o,"mark"),o.onClick){const e=o.onClick.bind(o);o.onClick=function(){(0,l.unref)(o.canClick)&&e()}}if(o.onHold){const e=o.onHold.bind(o);o.onHold=function(){(0,l.unref)(o.canClick)&&e()}}return o[y.tj]=function(){const{display:e,visibility:o,style:t,classes:l,onClick:n,onHold:r,color:i,glowColor:a,canClick:s,mark:u,id:m}=this;return{display:e,visibility:o,style:t,classes:l,onClick:n,onHold:r,color:i,glowColor:a,canClick:s,mark:u,id:m}},o}))}function te(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("tree-"),o.type=ee,o[y.wA]=O,o.isResetting=(0,l.ref)(!1),o.resettingNode=(0,l.shallowRef)(null),o.reset=function(e){const t=o;t.isResetting.value=!0,t.resettingNode.value=e,t.resetPropagation?.(t,e),t.onReset?.(e),t.isResetting.value=!1,t.resettingNode.value=null},o.links=(0,l.computed)((()=>{const e=o;return(0,l.unref)(e.branches)??[]})),(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"nodes"),(0,J.yB)(o,"leftSideNodes"),(0,J.yB)(o,"rightSideNodes"),(0,J.yB)(o,"branches"),o[y.tj]=function(){const{nodes:e,leftSideNodes:o,rightSideNodes:t,branches:l}=this;return{nodes:e,leftSideNodes:o,rightSideNodes:t,branches:l}},o}))}const le=function(e,o){const t=[o];let n=[o];if((()=>void 0!==e.branches&&null!==e.branches&&e.branches[Symbol.for("!=")]?e.branches[Symbol.for("!=")](null):null!=e.branches)()){const o=(0,l.unref)(e.branches);while((()=>void 0!==n.length&&null!==n.length&&n.length[Symbol.for(">")]?n.length[Symbol.for(">")](0):n.length>0)()){const e=[];n.forEach((l=>{o.filter((e=>e.startNode===l||e.endNode===l)).map((e=>e.startNode===l?e.endNode:e.startNode)).filter((e=>(()=>void 0!==t.includes(e)&&null!==t.includes(e)&&t.includes(e)[Symbol.for("!")]?t.includes(e)[Symbol.for("!")]():!t.includes(e))())).forEach((o=>{(()=>void 0!==e.includes(o)&&null!==e.includes(o)&&e.includes(o)[Symbol.for("!")]?e.includes(o)[Symbol.for("!")]():!e.includes(o))()&&(e.push(o),o.reset?.reset())}))})),n=e,t.push(...n)}}};function ne(e,o=null,t=0){const n=(0,J.UI)(t);return(0,l.computed)((()=>(()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()||b.ZP.gte(e.value,(0,l.unref)(n))?(()=>x(e)+" "!==void 0&&x(e)+" "!==null&&(x(e)+" ")[Symbol.for("+")]?(x(e)+" ")[Symbol.for("+")](e.displayName):x(e)+" "+e.displayName)():`Reach ${b.ZP.eq(o.precision,0)?(0,b.Ht)((0,l.unref)(n)):(0,b.WU)((0,l.unref)(n),o.precision)} ${o.displayName} to unlock (You have ${b.ZP.eq(o.precision,0)?(0,b.Ht)(o.value):(0,b.WU)(o.value,o.precision)})`))}var re=t(5967),ie=t(274),ae=t(264);function se(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},e.unref(e.style)??[]]),class:(0,l.normalizeClass)({feature:!0,achievement:!0,locked:(()=>void 0!==e.unref(e.earned)&&null!==e.unref(e.earned)&&e.unref(e.earned)[Symbol.for("!")]?e.unref(e.earned)[Symbol.for("!")]():!e.unref(e.earned))(),bought:e.unref(e.earned),...e.unref(e.classes)})},[e.component?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var ue=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:(0,C.P5)(Object,String,Function),earned:{type:(0,C.P5)(Boolean),required:!0},image:(0,C.P5)(String),style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:U,MarkNode:H},setup(e){const{display:o}=(0,l.toRefs)(e);return{component:(0,C.KO)(o),unref:l.unref,Visibility:y.EE}}});const me=(0,a.Z)(ue,[["render",se],["__scopeId","data-v-e3f32402"]]);var ce=me,fe=t(3002);t(343);function de(e="white",o="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 ${o} ${e}`,zIndex:1}}function ye(){return de("red","20px")}h.globalBus.on("setupVue",(e=>e.use(fe.ZP)));const be=(0,fe.pm)(),he=Symbol("Achievement");function pe(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());if(t.id=(0,y.QI)("achievement-"),t.type=he,t[y.wA]=ce,t.earned=t[p.n9],t.complete=function(){t[p.n9].value=!0},(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"display"),(0,J.yB)(t,"mark"),(0,J.yB)(t,"image"),(0,J.yB)(t,"style"),(0,J.yB)(t,"classes"),t[y.tj]=function(){const{visibility:e,display:o,earned:t,image:n,style:r,classes:i,mark:a,id:s}=this;return{visibility:e,display:o,earned:t,image:n,style:(0,l.unref)(r),classes:i,mark:a,id:s}},t.shouldEarn){const e=t;(0,l.watchEffect)((()=>{if((()=>void 0!==e.earned.value&&null!==e.earned.value&&e.earned.value[Symbol.for("!")]?e.earned.value[Symbol.for("!")]():!e.earned.value)()&&(0,l.unref)(e.visibility)===y.EE.Visible&&e.shouldEarn?.()&&(e.earned.value=!0,e.onComplete?.(),e.display)){const o=(0,C.MM)((0,l.unref)(e.display));be.info((0,l.createVNode)("div",null,[(0,l.createVNode)("h3",null,[(0,l.createTextVNode)("Achievement earned!")]),(0,l.createVNode)("div",null,[(0,l.createVNode)(o,null,null)])]))}}))}return t}),(0,p.ax)(!1))}function ge(e,o,t,n,r,i){const a=(0,l.resolveComponent)("GridCell");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.rows),(o=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["row",{mergeAdjacent:e.mergeAdjacent}]),key:o},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.cols),(t=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherCellProps(e.unref(e.cells)[(()=>100*o!==void 0&&100*o!==null&&(100*o)[Symbol.for("+")]?(100*o)[Symbol.for("+")](t):100*o+t)()])),null,16)))),128))],2)))),128))],4)):(0,l.createCommentVNode)("",!0)}var ve=t(1037),Se=t(9266);const Ne={key:0};function ke(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,class:(0,l.normalizeClass)({feature:!0,tile:!0,can:e.unref(e.canClick),locked:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))()}),style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o))},[e.title?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ne,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.titleComponent)))])):(0,l.createCommentVNode)("",!0),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{style:{"white-space":"pre-line"}})),(0,l.createVNode)(a,{id:e.id},null,8,["id"])],38)):(0,l.createCommentVNode)("",!0)}var Ve=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,C.P5)(Object,String,Function),required:!0},title:(0,C.P5)(Object,String,Function),style:(0,C.P5)(String,Object,Array),canClick:{type:(0,C.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:U},setup(e){const{onClick:o,onHold:t,title:n,display:r}=(0,l.toRefs)(e),{start:i,stop:a}=(0,C.ix)(o,t),s=(0,C.KO)(n),u=(0,C.vq)(r);return{start:i,stop:a,titleComponent:s,component:u,Visibility:y.EE,unref:l.unref}}});const xe=(0,a.Z)(Ve,[["render",ke],["__scopeId","data-v-b1182ac6"]]);var Me=xe,Ce=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},rows:{type:(0,C.P5)(Number),required:!0},cols:{type:(0,C.P5)(Number),required:!0},cells:{type:(0,C.P5)(Object),required:!0}},components:{GridCell:Me},setup(){const e=(0,l.computed)((()=>ve.Z[Se.ZP.theme].mergeAdjacent));function o(e){const{visibility:o,onClick:t,onHold:l,display:n,title:r,style:i,canClick:a,id:s}=e;return{visibility:o,onClick:t,onHold:l,display:n,title:r,style:i,canClick:a,id:s}}return{unref:l.unref,gatherCellProps:o,Visibility:y.EE,mergeAdjacent:e}}});const we=(0,a.Z)(Ce,[["render",ge]]);var Ze=we,Be=t(1349);Symbol("Grid");function Pe(e){return new Proxy({},Ee(e))}function Ee(e){const o=(0,l.computed)((()=>{const o=[];for(let t=1;(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")]((0,l.unref)(e.rows)):t<=(0,l.unref)(e.rows))();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++)())for(let n=1;(()=>void 0!==n&&null!==n&&n[Symbol.for("<=")]?n[Symbol.for("<=")]((0,l.unref)(e.cols)):n<=(0,l.unref)(e.cols))();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("postfix-increment")]?n[Symbol.for("postfix-increment")]():n++)())o.push((()=>100*t!==void 0&&100*t!==null&&(100*t)[Symbol.for("+")]?(100*t)[Symbol.for("+")](n):100*t+n)().toString());return o}));return{get(t,l){return"isProxy"===l||("symbol"===typeof l?e[l]:(()=>void 0!==o.value.includes(l.toString())&&null!==o.value.includes(l.toString())&&o.value.includes(l.toString())[Symbol.for("!")]?o.value.includes(l.toString())[Symbol.for("!")]():!o.value.includes(l.toString()))()?void 0:((()=>void 0!==t[l]&&null!==t[l]&&t[l][Symbol.for("==")]?t[l][Symbol.for("==")](null):null==t[l])()&&(t[l]=new Proxy(e,Te(l.toString()))),t[l]))},set(e,o,t){return console.warn("Cannot set grid cells",e,o,t),!1},ownKeys(){return o.value},has(e,t){return o.value.includes(t.toString())},getOwnPropertyDescriptor(e,t){if(o.value.includes(t.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function Te(e){const o=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],t={};return{get(o,n,r){if("isProxy"===n)return!0;let i=o[n];return(0,Be.mf)(i)?()=>i.call(r,e,o.getState(e)):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()||"symbol"===typeof n?i:(n=(()=>void 0!==n.slice(0,1).toUpperCase()&&null!==n.slice(0,1).toUpperCase()&&n.slice(0,1).toUpperCase()[Symbol.for("+")]?n.slice(0,1).toUpperCase()[Symbol.for("+")](n.slice(1)):n.slice(0,1).toUpperCase()+n.slice(1))(),"startState"===n?i.call(r,e):(i=o[`get${n}`],(0,Be.mf)(i)?((()=>n in t!==void 0&&n in t!==null&&(n in t)[Symbol.for("!")]?(n in t)[Symbol.for("!")]():!(n in t))()&&(t[n]=(0,l.computed)((()=>i.call(r,e,o.getState(e))))),t[n].value):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()?(0,l.unref)(i):(i=o[`on${n}`],(0,Be.mf)(i)?()=>i.call(r,e,o.getState(e)):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()?i:o[n])))},set(o,t,l,n){return t=`set${(()=>void 0!==t.slice(0,1).toUpperCase()&&null!==t.slice(0,1).toUpperCase()&&t.slice(0,1).toUpperCase()[Symbol.for("+")]?t.slice(0,1).toUpperCase()[Symbol.for("+")](t.slice(1)):t.slice(0,1).toUpperCase()+t.slice(1))()}`,(()=>void 0!==t&&null!==t&&t[Symbol.for("in")]?t[Symbol.for("in")](o):t in o)()&&(0,Be.mf)(o[t])&&(()=>void 0!==o[t].length&&null!==o[t].length&&o[t].length[Symbol.for("<")]?o[t].length[Symbol.for("<")](3):o[t].length<3)()?(o[t].call(n,e,l),!0):(console.warn(`No setter for "${t}".`,o),!1)},ownKeys(){return o},has(e,t){return o.includes(t.toString())},getOwnPropertyDescriptor(e,t){if(o.includes(t.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function Fe(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());if(t.id=(0,y.QI)("grid-"),t[y.wA]=Ze,t.getID=function(e){return(()=>t.id+"-"!==void 0&&t.id+"-"!==null&&(t.id+"-")[Symbol.for("+")]?(t.id+"-")[Symbol.for("+")](e):t.id+"-"+e)()},t.getState=function(e){return(()=>void 0!==this[p.n9].value[e]&&null!==this[p.n9].value[e]&&this[p.n9].value[e][Symbol.for("!=")]?this[p.n9].value[e][Symbol.for("!=")](void 0):void 0!=this[p.n9].value[e])()?this[p.n9].value[e]:this.cells[e].startState},t.setState=function(e,o){this[p.n9].value[e]=o},t.cells=Pe(t),(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"rows"),(0,J.yB)(t,"cols"),(0,J.yB)(t,"getVisibility"),(0,y.Rh)(t,"getVisibility",y.EE.Visible),(0,J.yB)(t,"getCanClick"),(0,y.Rh)(t,"getCanClick",!0),(0,J.yB)(t,"getStartState"),(0,J.yB)(t,"getStyle"),(0,J.yB)(t,"getClasses"),(0,J.yB)(t,"getTitle"),(0,J.yB)(t,"getDisplay"),t.onClick){const e=t.onClick.bind(t);t.onClick=function(o,n){(0,l.unref)(t.cells[o].canClick)&&e(o,n)}}if(t.onHold){const e=t.onHold.bind(t);t.onHold=function(o,n){(0,l.unref)(t.cells[o].canClick)&&e(o,n)}}return t[y.tj]=function(){const{visibility:e,rows:o,cols:t,cells:l,id:n}=this;return{visibility:e,rows:o,cols:t,cells:l,id:n}},t}),(0,p.ax)({}))}function Ie(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??[]]),onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),class:(0,l.normalizeClass)({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))(),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],38)):(0,l.createCommentVNode)("",!0)}var De=(0,l.defineComponent)({props:{display:{type:(0,C.P5)(Object,String,Function),required:!0},visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(Object,String,Array),classes:(0,C.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,C.P5)(Boolean),required:!0},small:Boolean,mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:U,MarkNode:H},setup(e){const{display:o,onClick:t,onHold:n}=(0,l.toRefs)(e),r=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(r.value="");if((0,C.RU)(e))return void(r.value=(0,C.MM)(e));const t=(0,C.MM)(e.title||"","h3"),n=(0,C.MM)(e.description,"div");r.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(t,null,null)]):null,(0,l.createVNode)(n,null,null)]))))}));const{start:i,stop:a}=(0,C.ix)(t,n);return{start:i,stop:a,comp:r,Visibility:y.EE,unref:l.unref}}});const Re=(0,a.Z)(De,[["render",Ie],["__scopeId","data-v-6b39988a"]]);var Oe=Re;const _e=Symbol("Clickable");function je(e){return(0,Q.z2)((()=>{const o=e();if(o.id=(0,y.QI)("clickable-"),o.type=_e,o[y.wA]=Oe,(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,J.yB)(o,"classes"),(0,J.yB)(o,"style"),(0,J.yB)(o,"mark"),(0,J.yB)(o,"display"),o.onClick){const e=o.onClick.bind(o);o.onClick=function(t){(0,l.unref)(o.canClick)&&e(t)}}if(o.onHold){const e=o.onHold.bind(o);o.onHold=function(){(0,l.unref)(o.canClick)&&e()}}return o[y.tj]=function(){const{display:e,visibility:o,style:t,classes:n,onClick:r,onHold:i,canClick:a,small:s,mark:u,id:m}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:n,onClick:r,onHold:i,canClick:a,small:s,mark:u,id:m}},o}))}function Ae(e){return je((()=>{const o=e();(0,J.yB)(o,"showNextAt"),(0,y.Rh)(o,"showNextAt",!0),(0,y.Rh)(o,"minimumGain",1),(()=>void 0!==o.resetDescription&&null!==o.resetDescription&&o.resetDescription[Symbol.for("==")]?o.resetDescription[Symbol.for("==")](null):null==o.resetDescription)()?o.resetDescription=(0,l.computed)((()=>b.ZP.lt(o.conversion.gainResource.value,1e3)?"Reset for ":"")):(0,J.yB)(o,"resetDescription"),(()=>void 0!==o.display&&null!==o.display&&o.display[Symbol.for("==")]?o.display[Symbol.for("==")](null):null==o.display)()&&(o.display=(0,y.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.unref)(o.resetDescription),(0,l.createVNode)("b",null,[x(o.conversion.gainResource,b.ZP.max((0,l.unref)(o.conversion.actualGain),(0,l.unref)(o.minimumGain)))])," ",o.conversion.gainResource.displayName,(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),o.conversion.buyMax?"Next:":"Req:"," ",x(o.conversion.baseResource,o.conversion.buyMax||b.ZP.floor((0,l.unref)(o.conversion.actualGain)).neq(1)?(0,l.unref)(o.conversion.nextAt):(0,l.unref)(o.conversion.currentAt))," ",o.conversion.baseResource.displayName]),[[l.vShow,(0,l.unref)(o.showNextAt)]])])))),(()=>void 0!==o.canClick&&null!==o.canClick&&o.canClick[Symbol.for("==")]?o.canClick[Symbol.for("==")](null):null==o.canClick)()&&(o.canClick=(0,l.computed)((()=>b.ZP.gte((0,l.unref)(o.conversion.actualGain),(0,l.unref)(o.minimumGain)))));const t=o.onClick;return o.onClick=function(){(()=>void 0!==(0,l.unref)(o.canClick)&&null!==(0,l.unref)(o.canClick)&&(0,l.unref)(o.canClick)[Symbol.for("!")]?(0,l.unref)(o.canClick)[Symbol.for("!")]():!(0,l.unref)(o.canClick))()||(o.conversion.convert(),o.tree.reset(o.treeNode),t?.())},o}))}function Ue(e){return oe((()=>{const o=e();return(0,J.yB)(o,"display"),(0,y.Rh)(o,"display",o.layerID),(0,J.yB)(o,"append"),{...o,display:o.layerID,onClick:(0,l.unref)(o.append)?function(){if(re.Z.tabs.includes(o.layerID)){const e=re.Z.tabs.lastIndexOf(o.layerID);re.Z.tabs.splice(e,1)}else re.Z.tabs.push(o.layerID)}:function(){re.Z.tabs.splice(1,1,o.layerID)}}}))}function qe(e){return(0,Q.z2)((()=>{const o=e();return(()=>void 0!==o.currentGain&&null!==o.currentGain&&o.currentGain[Symbol.for("==")]?o.currentGain[Symbol.for("==")](null):null==o.currentGain)()&&(o.currentGain=(0,l.computed)((()=>{let e=o.gainModifier?o.gainModifier.apply(o.scaling.currentGain(o)):o.scaling.currentGain(o);return e=b.ZP.floor(e).max(0),(()=>void 0!==(0,l.unref)(o.buyMax)&&null!==(0,l.unref)(o.buyMax)&&(0,l.unref)(o.buyMax)[Symbol.for("!")]?(0,l.unref)(o.buyMax)[Symbol.for("!")]():!(0,l.unref)(o.buyMax))()&&(e=e.min(1)),e}))),(()=>void 0!==o.actualGain&&null!==o.actualGain&&o.actualGain[Symbol.for("==")]?o.actualGain[Symbol.for("==")](null):null==o.actualGain)()&&(o.actualGain=o.currentGain),(()=>void 0!==o.currentAt&&null!==o.currentAt&&o.currentAt[Symbol.for("==")]?o.currentAt[Symbol.for("==")](null):null==o.currentAt)()&&(o.currentAt=(0,l.computed)((()=>{let e=o.scaling.currentAt(o);return o.roundUpCost&&(e=b.ZP.ceil(e)),e}))),(()=>void 0!==o.nextAt&&null!==o.nextAt&&o.nextAt[Symbol.for("==")]?o.nextAt[Symbol.for("==")](null):null==o.nextAt)()&&(o.nextAt=(0,l.computed)((()=>{let e=o.scaling.nextAt(o);return o.roundUpCost&&(e=b.ZP.ceil(e)),e}))),(()=>void 0!==o.convert&&null!==o.convert&&o.convert[Symbol.for("==")]?o.convert[Symbol.for("==")](null):null==o.convert)()&&(o.convert=function(){o.gainResource.value=b.ZP.add(o.gainResource.value,(0,l.unref)(o.currentGain)),o.baseResource.value=0}),(0,J.yB)(o,"currentGain"),(0,J.yB)(o,"actualGain"),(0,J.yB)(o,"currentAt"),(0,J.yB)(o,"nextAt"),(0,J.yB)(o,"buyMax"),(0,y.Rh)(o,"buyMax",!0),(0,J.yB)(o,"roundUpCost"),(0,y.Rh)(o,"roundUpCost",!0),o}))}function ze(e,o){return{currentGain(t){const n=b.ZP.div(t.baseResource.value,(0,l.unref)(e)).pow((0,l.unref)(o));return n.isNan()?new b.ZP(0):n},currentAt(t){let n=(0,l.unref)(t.currentGain);return t.gainModifier&&(n=t.gainModifier.revert(n)),n=b.ZP.max(0,n),b.ZP.root(n,(0,l.unref)(o)).times((0,l.unref)(e))},nextAt(t){let n=b.ZP.add((0,l.unref)(t.currentGain),1);return t.gainModifier&&(n=t.gainModifier.revert(n)),n=b.ZP.max(0,n),b.ZP.root(n,(0,l.unref)(o)).times((0,l.unref)(e)).max((0,l.unref)(e))}}}function Le(e){return qe(e)}function Ge(e){return qe((()=>{const o=e();return(0,y.Rh)(o,"buyMax",!1),(()=>void 0!==o.currentGain&&null!==o.currentGain&&o.currentGain[Symbol.for("==")]?o.currentGain[Symbol.for("==")](null):null==o.currentGain)()&&(o.currentGain=(0,l.computed)((()=>{let e=o.gainModifier?o.gainModifier.apply(o.scaling.currentGain(o)):o.scaling.currentGain(o);return e=b.ZP.floor(e).max(o.gainResource.value),(()=>void 0!==(0,l.unref)(o.buyMax)&&null!==(0,l.unref)(o.buyMax)&&(0,l.unref)(o.buyMax)[Symbol.for("!")]?(0,l.unref)(o.buyMax)[Symbol.for("!")]():!(0,l.unref)(o.buyMax))()&&(e=e.min(b.ZP.add(o.gainResource.value,1))),e}))),(()=>void 0!==o.actualGain&&null!==o.actualGain&&o.actualGain[Symbol.for("==")]?o.actualGain[Symbol.for("==")](null):null==o.actualGain)()&&(o.actualGain=(0,l.computed)((()=>{let e=b.ZP.sub(o.scaling.currentGain(o),o.gainResource.value).max(0);return(()=>void 0!==(0,l.unref)(o.buyMax)&&null!==(0,l.unref)(o.buyMax)&&(0,l.unref)(o.buyMax)[Symbol.for("!")]?(0,l.unref)(o.buyMax)[Symbol.for("!")]():!(0,l.unref)(o.buyMax))()&&(e=e.min(1)),e}))),(0,y.Rh)(o,"convert",(function(){o.gainResource.value=o.gainModifier?o.gainModifier.apply((0,l.unref)(o.currentGain)):(0,l.unref)(o.currentGain),o.baseResource.value=0})),o}))}function We(e,o,t=.5){return b.ZP.lte(e,o)?e:b.ZP.pow(e,t).times(b.ZP.pow(o,b.ZP.sub(1,t)))}function He(e,o,t=.5){return{...e,currentGain:n=>We(e.currentGain(n),(0,l.unref)(o),(0,l.unref)(t))}}const $e=e=>((0,l.pushScopeId)("data-v-6447a93e"),e=e(),(0,l.popScopeId)(),e),Ye=$e((()=>(0,l.createElementVNode)("span",{class:"toggle"},"▼",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));function Ke(e,o,t,n,r,i){const a=(0,l.resolveComponent)("CollapseTransition"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["infobox",{collapsed:e.unref(e.collapsed),stacked:e.stacked,...e.unref(e.classes)}]),style:(0,l.normalizeStyle)([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}])},[(0,l.createElementVNode)("button",{class:"title",style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:o[0]||(o[0]=o=>e.collapsed.value=(()=>void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed))())},[Ye,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.titleComponent)))],4),(0,l.createVNode)(a,null,{default:(0,l.withCtx)((()=>[(()=>void 0!==e.unref(e.collapsed)&&null!==e.unref(e.collapsed)&&e.unref(e.collapsed)[Symbol.for("!")]?e.unref(e.collapsed)[Symbol.for("!")]():!e.unref(e.collapsed))()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:"body",style:(0,l.normalizeStyle)({backgroundColor:e.unref(e.color)})},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.bodyComponent),{style:(0,l.normalizeStyle)(e.unref(e.bodyStyle))},null,8,["style"]))],4)):(0,l.createCommentVNode)("",!0)])),_:1}),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var Je=t(423),Qe=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:{type:(0,C.P5)(Object,String,Function),required:!0},title:{type:(0,C.P5)(Object,String,Function),required:!0},color:(0,C.P5)(String),collapsed:{type:Object,required:!0},style:(0,C.P5)(Object,String,Array),titleStyle:(0,C.P5)(Object,String,Array),bodyStyle:(0,C.P5)(Object,String,Array),classes:(0,C.P5)(Object),id:{type:String,required:!0}},components:{Node:U,CollapseTransition:Je.Z},setup(e){const{title:o,display:t}=(0,l.toRefs)(e),n=(0,C.vq)(o),r=(0,C.vq)(t),i=(0,l.computed)((()=>ve.Z[Se.ZP.theme].mergeAdjacent));return{titleComponent:n,bodyComponent:r,stacked:i,unref:l.unref,Visibility:y.EE}}});const Xe=(0,a.Z)(Qe,[["render",Ke],["__scopeId","data-v-6447a93e"]]);var eo=Xe;const oo=Symbol("Infobox");function to(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());return t.id=(0,y.QI)("infobox-"),t.type=oo,t[y.wA]=eo,t.collapsed=t[p.n9],(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"color"),(0,J.yB)(t,"style"),(0,J.yB)(t,"titleStyle"),(0,J.yB)(t,"bodyStyle"),(0,J.yB)(t,"classes"),(0,J.yB)(t,"title"),(0,J.yB)(t,"display"),t[y.tj]=function(){const{visibility:e,display:o,title:t,color:n,collapsed:r,style:i,titleStyle:a,bodyStyle:s,classes:u,id:m}=this;return{visibility:e,display:o,title:t,color:n,collapsed:r,style:(0,l.unref)(i),titleStyle:a,bodyStyle:s,classes:u,id:m}},t}),(0,p.ax)(!1))}function lo(e,o,t,n,r,i){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{ref:"resizeListener",class:(0,l.normalizeClass)(["resize-listener",e.unref(e.classes)]),style:(0,l.normalizeStyle)(e.unref(e.style))},null,6)}var no=t(6591),ro=(0,l.defineComponent)({props:{style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const o=(0,l.ref)(null),t=new ResizeObserver(a),n=(0,l.inject)(w.NodesInjectionKey),r=(0,l.ref)(null);(0,l.onMounted)((()=>{const l=r.value;(()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](null):null!=l)()&&(t.observe(l),o.value=new no.MxU({resizeTo:l,backgroundAlpha:0}),r.value?.appendChild(o.value.view),e.onInit(o.value)),a()})),(0,l.onBeforeUnmount)((()=>{o.value?.destroy()}));let i=!0;function a(){i&&(i=!1,(0,l.nextTick)((()=>{(()=>void 0!==r.value&&null!==r.value&&r.value[Symbol.for("!=")]?r.value[Symbol.for("!=")](null):null!=r.value)()&&e.onContainerResized&&(Object.values(n.value).filter((e=>e)).forEach((e=>e.rect=e.element.getBoundingClientRect())),e.onContainerResized(r.value.getBoundingClientRect()),o.value?.resize()),i=!0})))}return document.fonts.ready.then(a),{unref:l.unref,resizeListener:r}}});const io=(0,a.Z)(ro,[["render",lo],["__scopeId","data-v-4e1c0c10"]]);var ao=io,so=t(1845);const uo=Symbol("Particles");function mo(e){return(0,Q.z2)((()=>{const o=e();o.id=(0,y.QI)("particles-"),o.type=uo,o[y.wA]=ao,o.app=(0,l.shallowRef)(null),o.addEmitter=e=>{const l=o;return l.app.value?Promise.resolve(new so.Q5(l.app.value.stage,e)):new Promise((o=>{t.push({resolve:o,config:e})}))};let t=[];function n(e){o.app.value=e,t.forEach((({resolve:o,config:t})=>o(new so.Q5(e.stage,t)))),t=[]}return o.onContainerResized=o.onContainerResized?.bind(o),o[y.tj]=function(){const{id:e,style:o,classes:t,onContainerResized:r,onHotReload:i}=this;return{id:e,style:(0,l.unref)(o),classes:t,onContainerResized:r,onHotReload:i,onInit:n}},o}))}window.upgradeConfig=so.oC;const co=Symbol("Reset");function fo(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("reset-"),o.type=co,o.reset=function(){const e=o=>{o&&"object"===typeof o&&((()=>void 0!==p.n9&&null!==p.n9&&p.n9[Symbol.for("in")]?p.n9[Symbol.for("in")](o):p.n9 in o)()?o[p.n9].value=o[p.nY]:(()=>o instanceof b.ZP!==void 0&&o instanceof b.ZP!==null&&(o instanceof b.ZP)[Symbol.for("!")]?(o instanceof b.ZP)[Symbol.for("!")]():!(o instanceof b.ZP))()&&(()=>void 0!==(0,l.isRef)(o)&&null!==(0,l.isRef)(o)&&(0,l.isRef)(o)[Symbol.for("!")]?(0,l.isRef)(o)[Symbol.for("!")]():!(0,l.isRef)(o))()&&Object.values(o).forEach((o=>e(o))))};(0,l.unref)(o.thingsToReset).forEach(e),h.globalBus.emit("reset",o),o.onReset?.()},(0,J.yB)(o,"thingsToReset"),o}))}const yo={};h.globalBus.on("removeLayer",(e=>{yo[e.id]?.(),yo[e.id]=void 0}));var bo=(0,l.defineComponent)({props:{resource:null,color:null},setup(e){const o=e,t=(0,l.computed)((()=>x(o.resource)));return(o,n)=>((0,l.openBlock)(),(0,l.createElementBlock)("h2",{style:(0,l.normalizeStyle)({color:e.color,"text-shadow":(()=>"0px 0px 10px "[Symbol.for("+")]?"0px 0px 10px "[Symbol.for("+")](e.color):"0px 0px 10px "+e.color)()})},(0,l.toDisplayString)((0,l.unref)(t)),5))}});const ho=bo;var po=ho;const go={key:0},vo={key:1},So=(0,l.createTextVNode)(", "),No=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()),ko=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var Vo=(0,l.defineComponent)({props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,C.KO)(t.effectDisplay),r=(0,l.computed)((()=>b.ZP.lt(t.resource.value,"1e1000")));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",null,[(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",go,"You have ")):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(po,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)(e.resource.displayName)):" "+(0,l.toDisplayString)(e.resource.displayName))(),1),(0,l.unref)(n)?((0,l.openBlock)(),(0,l.createElementBlock)("span",vo,[So,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(n))))])):(0,l.createCommentVNode)("",!0),No,ko]))}});const xo=Vo;var Mo=xo,Co=t(4096);function wo(e,o,t){const n=(0,J.UI)(e),r=(0,J.UI)(o),i=(0,J.UI)(!!(()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)()||t);return{apply:e=>b.ZP.add(e,(0,l.unref)(n)),revert:e=>b.ZP.sub(e,(0,l.unref)(n)),enabled:i,description:(0,y.tZ)((()=>(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,l.createTextVNode)("+"),(0,b.WU)((0,l.unref)(n))]),(0,l.unref)(r)?(0,l.createVNode)("span",{class:"modifier-description"},[(0,C.qF)((0,l.unref)(r))]):null])))}}function Zo(e,o,t){const n=(0,J.UI)(e),r=(0,J.UI)(o),i=(0,J.UI)(!!(()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)()||t);return{apply:e=>b.ZP.times(e,(0,l.unref)(n)),revert:e=>b.ZP.div(e,(0,l.unref)(n)),enabled:i,description:(0,y.tZ)((()=>(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,l.createTextVNode)("x"),(0,b.WU)((0,l.unref)(n))]),(0,l.unref)(r)?(0,l.createVNode)("span",{class:"modifier-description"},[(0,C.qF)((0,l.unref)(r))]):null])))}}function Bo(e,o,t){const n=(0,J.UI)(e),r=(0,J.UI)(o),i=(0,J.UI)(!!(()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)()||t);return{apply:e=>b.ZP.pow(e,(0,l.unref)(n)),revert:e=>b.ZP.root(e,(0,l.unref)(n)),enabled:i,description:(0,y.tZ)((()=>(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,l.createTextVNode)("^"),(0,b.WU)((0,l.unref)(n))]),(0,l.unref)(r)?(0,l.createVNode)("span",{class:"modifier-description"},[(0,C.qF)((0,l.unref)(r))]):null])))}}function Po(...e){return{apply:o=>e.filter((e=>(0,l.unref)(e.enabled))).reduce(((e,o)=>o.apply(e)),o),revert:o=>e.filter((e=>(0,l.unref)(e.enabled))).reduceRight(((e,o)=>o.revert(e)),o),enabled:(0,l.computed)((()=>(()=>void 0!==e.filter((e=>(0,l.unref)(e.enabled))).length&&null!==e.filter((e=>(0,l.unref)(e.enabled))).length&&e.filter((e=>(0,l.unref)(e.enabled))).length[Symbol.for(">")]?e.filter((e=>(0,l.unref)(e.enabled))).length[Symbol.for(">")](0):e.filter((e=>(0,l.unref)(e.enabled))).length>0)())),description:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[e.filter((e=>(0,l.unref)(e.enabled))).map((e=>(0,l.unref)(e.description))).filter((e=>e)).map(C.qF)])))}}function Eo(e,o,t,n=1,r=""){return(0,l.createVNode)("div",null,[(0,l.createVNode)("h3",null,[e,o?(0,l.createVNode)("span",{class:"subtitle"},[(0,l.createTextVNode)(" ("),o,(0,l.createTextVNode)(")")]):null]),(0,l.createVNode)("br",null,null),(0,l.createVNode)("div",{class:"modifier-container"},[(0,l.createVNode)("span",{class:"modifier-amount"},[(0,b.WU)(n),r]),(0,l.createVNode)("span",{class:"modifier-description"},[(0,l.createTextVNode)("Base")])]),(0,C.qF)((0,l.unref)(t.description)),(0,l.createVNode)("hr",null,null),(0,l.createTextVNode)("Total: "),(0,b.WU)(t.apply(n)),r])}const To={class:"field"},Fo={key:0,class:"field-title"},Io=["min","max"];var Do=(0,l.defineComponent)({props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,n=(0,l.toRefs)(t),r=(0,l.computed)({get(){return String((0,l.unref)(n.modelValue)||0)},set(e){o("update:modelValue",Number(e))}});return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",To,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)("span",Fo,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(ae.Z,{display:`${(0,l.unref)(r)}`,class:(0,l.normalizeClass)({fullWidth:(()=>void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title)()})},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("input",{type:"range","onUpdate:modelValue":t[0]||(t[0]=e=>(0,l.isRef)(r)?r.value=e:null),min:e.min,max:e.max},null,8,Io),[[l.vModelText,(0,l.unref)(r)]])])),_:1},8,["display","class"])]))}});const Ro=(0,a.Z)(Do,[["__scopeId","data-v-20a0a34d"]]);var Oo=Ro,_o=t(4520),jo=t(9868),Ao=t(9905),Uo=(0,l.defineComponent)({setup(e){const o=(0,l.ref)("0"),t=new ResizeObserver(r),n=(0,l.ref)(null);function r(){let e=n.value;if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e)())return;let t=0;while(e.previousSibling){const o=e.previousSibling;o.dataset&&(()=>"vSticky"[Symbol.for("in")]?"vSticky"[Symbol.for("in")](o.dataset):"vSticky"in o.dataset)()&&(t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](o.offsetHeight):t+o.offsetHeight)()),e=o}o.value=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]("px"):t+"px")()}return(0,l.nextTick)(r),document.fonts.ready.then(r),(0,l.onMounted)((()=>{const e=n.value?.parentElement;e&&t.observe(e)})),(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"sticky",style:(0,l.normalizeStyle)({top:o.value}),ref_key:"element",ref:n,"data-v-sticky":""},[(0,l.renderSlot)(e.$slots,"default")],4))}});const qo=(0,a.Z)(Uo,[["__scopeId","data-v-6987dd96"]]);var zo=qo,Lo=(0,l.defineComponent)({props:{height:null},setup(e){return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"vr",style:(0,l.normalizeStyle)({height:e.height})},null,4))}});const Go=(0,a.Z)(Lo,[["__scopeId","data-v-15f6e746"]]);var Wo=Go,Ho=t(6948);function $o(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{width:(()=>void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px")(),height:(()=>void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px")(),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),class:(0,l.normalizeClass)({bar:!0,...e.unref(e.classes)})},[(0,l.createElementVNode)("div",{class:"overlayTextContainer border",style:(0,l.normalizeStyle)([{width:(()=>void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px")(),height:(()=>void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px")()},e.unref(e.borderStyle)??{}])},[e.component?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{key:0,class:"overlayText",style:(0,l.normalizeStyle)(e.unref(e.textStyle))},null,8,["style"])):(0,l.createCommentVNode)("",!0)],4),(0,l.createElementVNode)("div",{class:"border",style:(0,l.normalizeStyle)([{width:(()=>void 0!==e.unref(e.width)&&null!==e.unref(e.width)&&e.unref(e.width)[Symbol.for("+")]?e.unref(e.width)[Symbol.for("+")]("px"):e.unref(e.width)+"px")(),height:(()=>void 0!==e.unref(e.height)&&null!==e.unref(e.height)&&e.unref(e.height)[Symbol.for("+")]?e.unref(e.height)[Symbol.for("+")]("px"):e.unref(e.height)+"px")()},e.unref(e.style)??{},e.unref(e.baseStyle)??{},e.unref(e.borderStyle)??{}])},[(0,l.createElementVNode)("div",{class:"fill",style:(0,l.normalizeStyle)([e.barStyle,e.unref(e.style)??{},e.unref(e.fillStyle)??{}])},null,4)],4),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var Yo=(0,l.defineComponent)({props:{progress:{type:(0,C.P5)(String,Object,Number),required:!0},width:{type:(0,C.P5)(Number),required:!0},height:{type:(0,C.P5)(Number),required:!0},direction:{type:(0,C.P5)(String),required:!0},display:(0,C.P5)(Object,String,Function),visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(Object,String,Array),classes:(0,C.P5)(Object),borderStyle:(0,C.P5)(Object,String,Array),textStyle:(0,C.P5)(Object,String,Array),baseStyle:(0,C.P5)(Object,String,Array),fillStyle:(0,C.P5)(Object,String,Array),mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:H,Node:U},setup(e){const{progress:o,width:t,height:n,direction:r,display:i}=(0,l.toRefs)(e),a=(0,l.computed)((()=>{let e=o.value instanceof b.ZP?o.value.toNumber():Number(o.value);return(()=>1-Math.min(Math.max(e,0),1)!==void 0&&1-Math.min(Math.max(e,0),1)!==null&&(1-Math.min(Math.max(e,0),1))[Symbol.for("*")]?(1-Math.min(Math.max(e,0),1))[Symbol.for("*")](100):100*(1-Math.min(Math.max(e,0),1)))()})),s=(0,l.computed)((()=>{const e={width:(()=>(0,C.Uv)(t)+.5!==void 0&&(0,C.Uv)(t)+.5!==null&&((0,C.Uv)(t)+.5)[Symbol.for("+")]?((0,C.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,C.Uv)(t)+.5+"px")(),height:(()=>(0,C.Uv)(n)+.5!==void 0&&(0,C.Uv)(n)+.5!==null&&((0,C.Uv)(n)+.5)[Symbol.for("+")]?((0,C.Uv)(n)+.5)[Symbol.for("+")]("px"):(0,C.Uv)(n)+.5+"px")()};switch((0,l.unref)(r)){case Xo.Up:e.clipPath=`inset(${a.value}% 0% 0% 0%)`,e.width=(()=>(0,C.Uv)(t)+1!==void 0&&(0,C.Uv)(t)+1!==null&&((0,C.Uv)(t)+1)[Symbol.for("+")]?((0,C.Uv)(t)+1)[Symbol.for("+")]("px"):(0,C.Uv)(t)+1+"px")();break;case Xo.Down:e.clipPath=`inset(0% 0% ${a.value}% 0%)`,e.width=(()=>(0,C.Uv)(t)+1!==void 0&&(0,C.Uv)(t)+1!==null&&((0,C.Uv)(t)+1)[Symbol.for("+")]?((0,C.Uv)(t)+1)[Symbol.for("+")]("px"):(0,C.Uv)(t)+1+"px")();break;case Xo.Right:e.clipPath=`inset(0% ${a.value}% 0% 0%)`;break;case Xo.Left:e.clipPath=`inset(0% 0% 0% ${a.value} + '%)`;break;case Xo.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),u=(0,C.KO)(i);return{normalizedProgress:a,barStyle:s,component:u,unref:l.unref,Visibility:y.EE}}});const Ko=(0,a.Z)(Yo,[["render",$o],["__scopeId","data-v-e6e3c366"]]);var Jo=Ko;const Qo=Symbol("Bar");var Xo;function et(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("bar-"),o.type=Qo,o[y.wA]=Jo,(0,J.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,J.yB)(o,"width"),(0,J.yB)(o,"height"),(0,J.yB)(o,"direction"),(0,J.yB)(o,"style"),(0,J.yB)(o,"classes"),(0,J.yB)(o,"borderStyle"),(0,J.yB)(o,"baseStyle"),(0,J.yB)(o,"textStyle"),(0,J.yB)(o,"fillStyle"),(0,J.yB)(o,"progress"),(0,J.yB)(o,"display"),(0,J.yB)(o,"mark"),o[y.tj]=function(){const{progress:e,width:o,height:t,direction:n,display:r,visibility:i,style:a,classes:s,borderStyle:u,textStyle:m,baseStyle:c,fillStyle:f,mark:d,id:y}=this;return{progress:e,width:o,height:t,direction:n,display:r,visibility:i,style:(0,l.unref)(a),classes:s,borderStyle:u,textStyle:m,baseStyle:c,fillStyle:f,mark:d,id:y}},o}))}(function(e){e["Up"]="Up",e["Down"]="Down",e["Left"]="Left",e["Right"]="Right",e["Default"]="Up"})(Xo||(Xo={}));const ot=Symbol("Buyable");function tt(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());if((()=>void 0!==t.canPurchase&&null!==t.canPurchase&&t.canPurchase[Symbol.for("==")]?t.canPurchase[Symbol.for("==")](null):null==t.canPurchase)()&&((()=>void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("==")]?t.resource[Symbol.for("==")](null):null==t.resource)()||(()=>void 0!==t.cost&&null!==t.cost&&t.cost[Symbol.for("==")]?t.cost[Symbol.for("==")](null):null==t.cost)()))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",t),"Cannot create buyable without a canPurchase property or a resource and cost property";t.id=(0,y.QI)("buyable-"),t.type=ot,t[y.wA]=Oe,t.amount=t[p.n9],t.canAfford=(0,l.computed)((()=>{const e=t,o=(0,l.unref)(e.cost);return(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](null):null!=o)()&&b.ZP.gte(e.resource.value,o)})),(()=>void 0!==t.canPurchase&&null!==t.canPurchase&&t.canPurchase[Symbol.for("==")]?t.canPurchase[Symbol.for("==")](null):null==t.canPurchase)()&&(t.canPurchase=(0,l.computed)((()=>(0,l.unref)(t.visibility)===y.EE.Visible&&(0,l.unref)(t.canAfford)&&b.ZP.lt(t.amount.value,(0,l.unref)(t.purchaseLimit))))),t.maxed=(0,l.computed)((()=>b.ZP.gte(t.amount.value,(0,l.unref)(t.purchaseLimit)))),(0,J.yB)(t,"classes");const n=t.classes;t.classes=(0,l.computed)((()=>{const e=(0,l.unref)(n)||{};return t.maxed.value&&(e.bought=!0),e})),(0,J.yB)(t,"canPurchase"),t.canClick=t.canPurchase,t.onClick=t.purchase=function(){const e=t;if((()=>void 0!==(0,l.unref)(e.canPurchase)&&null!==(0,l.unref)(e.canPurchase)&&(0,l.unref)(e.canPurchase)[Symbol.for("!")]?(0,l.unref)(e.canPurchase)[Symbol.for("!")]():!(0,l.unref)(e.canPurchase))()||(()=>void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("==")]?e.cost[Symbol.for("==")](null):null==e.cost)()||(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("==")]?e.resource[Symbol.for("==")](null):null==e.resource)())return;const o=(0,l.unref)(e.cost);e.resource.value=b.ZP.sub(e.resource.value,o),e.amount.value=b.ZP.add(e.amount.value,1),this.onPurchase?.(o)},(0,J.yB)(t,"display");const r=t.display;return t.display=(0,y.tZ)((()=>{const e=(0,l.unref)(r);if((0,C.RU)(e)){const o=(0,C.MM)(e);return(0,l.createVNode)(o,null,null)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&(()=>void 0!==t.cost&&null!==t.cost&&t.cost[Symbol.for("!=")]?t.cost[Symbol.for("!=")](null):null!=t.cost)()&&(()=>void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("!=")]?t.resource[Symbol.for("!=")](null):null!=t.resource)()){const o=t,n=(0,C.MM)(e.title||"","h3"),r=(0,C.MM)(e.description),i=(0,C.MM)(e.effectDisplay||""),a=(0,l.unref)(o.purchaseLimit)===b.ZP.dInf?(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(o.amount.value)]):(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(o.amount.value),(0,l.createTextVNode)(" /")," ",(0,b.Ht)((0,l.unref)(o.purchaseLimit))]);return(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(n,null,null)]):null,(0,l.createVNode)(r,null,null),(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),a]),e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Currently: "),(0,l.createVNode)(i,null,null)]):null,o.cost&&(()=>void 0!==o.maxed.value&&null!==o.maxed.value&&o.maxed.value[Symbol.for("!")]?o.maxed.value[Symbol.for("!")]():!o.maxed.value)()?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Cost: "),(0,b.WU)((0,l.unref)(o.cost)||0)," ",t.resource.displayName]):null])}return""})),(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"cost"),(0,J.yB)(t,"resource"),(0,J.yB)(t,"purchaseLimit"),(0,y.Rh)(t,"purchaseLimit",b.ZP.dInf),(0,J.yB)(t,"style"),(0,J.yB)(t,"mark"),(0,J.yB)(t,"small"),t[y.tj]=function(){const{display:e,visibility:o,style:t,classes:n,onClick:r,canClick:i,small:a,mark:s,id:u}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:n,onClick:r,canClick:i,small:a,mark:s,id:u}},t}),(0,p.ax)(0))}t(3577);const lt=["disabled"];function nt(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,e.unref(e.style)??{}]),class:(0,l.normalizeClass)({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&(()=>void 0!==e.unref(e.maxed)&&null!==e.unref(e.maxed)&&e.unref(e.maxed)[Symbol.for("!")]?e.unref(e.maxed)[Symbol.for("!")]():!e.unref(e.maxed))(),maxed:e.unref(e.maxed),...e.unref(e.classes)})},[(0,l.createElementVNode)("button",{class:"toggleChallenge",onClick:o[0]||(o[0]=(...o)=>e.toggle&&e.toggle(...o)),disabled:(()=>void 0!==e.unref(e.canStart)&&null!==e.unref(e.canStart)&&e.unref(e.canStart)[Symbol.for("!")]?e.unref(e.canStart)[Symbol.for("!")]():!e.unref(e.canStart))()||e.unref(e.maxed)},(0,l.toDisplayString)(e.buttonText),9,lt),e.unref(e.comp)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var rt=(0,l.defineComponent)({props:{active:{type:(0,C.P5)(Boolean),required:!0},maxed:{type:(0,C.P5)(Boolean),required:!0},canComplete:{type:(0,C.P5)(Boolean),required:!0},display:(0,C.P5)(String,Object,Function),visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),completed:{type:(0,C.P5)(Boolean),required:!0},canStart:{type:(0,C.P5)(Boolean),required:!0},mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:H,Node:U},setup(e){const{active:o,maxed:t,canComplete:n,display:r}=(0,l.toRefs)(e),i=(0,l.computed)((()=>o.value?n.value?"Finish":"Exit Early":t.value?"Completed":"Start")),a=(0,l.shallowRef)(""),s=(0,l.computed)((()=>{const e=(0,C.Uv)(o),t=(0,C.Uv)(n);return e?t?ye():de():{}}));return(0,l.watchEffect)((()=>{const e=(0,C.Uv)(r);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(a.value="");if((0,C.RU)(e))return void(a.value=(0,C.MM)(e));const o=(0,C.MM)(e.title||"","h3"),t=(0,C.MM)(e.description,"div"),n=(0,C.MM)(e.goal||""),i=(0,C.MM)(e.reward||""),s=(0,C.MM)(e.effectDisplay||"");a.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(o,null,null)]):null,(0,l.createVNode)(t,null,null),e.goal?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Goal: "),(0,l.createVNode)(n,null,null)]):null,e.reward?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Reward: "),(0,l.createVNode)(i,null,null)]):null,e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Currently: "),(0,l.createVNode)(s,null,null)]):null]))))})),{buttonText:i,notifyStyle:s,comp:a,Visibility:y.EE,unref:l.unref}}});const it=(0,a.Z)(rt,[["render",nt],["__scopeId","data-v-5e580749"]]);var at=it;const st=Symbol("ChallengeType");function ut(e){const o=(0,p.ax)(0),t=(0,p.ax)(!1);return(0,Q.z2)((()=>{const n=e();if((()=>void 0!==n.canComplete&&null!==n.canComplete&&n.canComplete[Symbol.for("==")]?n.canComplete[Symbol.for("==")](null):null==n.canComplete)()&&((()=>void 0!==n.resource&&null!==n.resource&&n.resource[Symbol.for("==")]?n.resource[Symbol.for("==")](null):null==n.resource)()||(()=>void 0!==n.goal&&null!==n.goal&&n.goal[Symbol.for("==")]?n.goal[Symbol.for("==")](null):null==n.goal)()))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",n),"Cannot create challenge without a canComplete property or a resource and goal property";n.id=(0,y.QI)("challenge-"),n.type=st,n[y.wA]=at,n.completions=o,n.active=t,n.completed=(0,l.computed)((()=>b.ZP.gt(n.completions.value,0))),n.maxed=(0,l.computed)((()=>b.ZP.gte(n.completions.value,(0,l.unref)(n.completionLimit)))),n.toggle=function(){const e=n;if(e.active.value){if((0,l.unref)(e.canComplete)&&(()=>void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value)()){let o=(0,l.unref)(e.canComplete);"boolean"===typeof o&&(o=1),e.completions.value=b.ZP.min(b.ZP.add(e.completions.value,o),(0,l.unref)(e.completionLimit)),e.onComplete?.()}e.active.value=!1,e.onExit?.(),e.reset?.reset()}else(0,l.unref)(e.canStart)&&(0,l.unref)(e.visibility)===y.EE.Visible&&(()=>void 0!==e.maxed.value&&null!==e.maxed.value&&e.maxed.value[Symbol.for("!")]?e.maxed.value[Symbol.for("!")]():!e.maxed.value)()&&(e.reset?.reset(),e.active.value=!0,e.onEnter?.())},n.complete=function(e){const o=n;let t=(0,l.unref)(o.canComplete);o.active.value&&(()=>void 0!==t&&null!==t&&t[Symbol.for("!==")]?t[Symbol.for("!==")](!1):!1!==t)()&&(!0===t||b.ZP.neq(0,t))&&(()=>void 0!==o.maxed.value&&null!==o.maxed.value&&o.maxed.value[Symbol.for("!")]?o.maxed.value[Symbol.for("!")]():!o.maxed.value)()&&("boolean"===typeof t&&(t=1),o.completions.value=b.ZP.min(b.ZP.add(o.completions.value,t),(0,l.unref)(o.completionLimit)),o.onComplete?.(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e)()&&(o.active.value=!1,o.onExit?.(),o.reset?.reset()))},(0,J.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible);const r=n.visibility;return n.visibility=(0,l.computed)((()=>!0===Se.ZP.hideChallenges&&(0,l.unref)(n.maxed)?y.EE.None:(0,l.unref)(r))),(()=>void 0!==n.canComplete&&null!==n.canComplete&&n.canComplete[Symbol.for("==")]?n.canComplete[Symbol.for("==")](null):null==n.canComplete)()&&(n.canComplete=(0,l.computed)((()=>{const e=n;return!((()=>void 0!==e.active.value&&null!==e.active.value&&e.active.value[Symbol.for("!")]?e.active.value[Symbol.for("!")]():!e.active.value)()||(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("==")]?e.resource[Symbol.for("==")](null):null==e.resource)()||(()=>void 0!==e.goal&&null!==e.goal&&e.goal[Symbol.for("==")]?e.goal[Symbol.for("==")](null):null==e.goal)())&&b.ZP.gte(e.resource.value,(0,l.unref)(e.goal))}))),(()=>void 0!==n.mark&&null!==n.mark&&n.mark[Symbol.for("==")]?n.mark[Symbol.for("==")](null):null==n.mark)()&&(n.mark=(0,l.computed)((()=>b.ZP.gt((0,l.unref)(n.completionLimit),1)&&(()=>void 0!==!(0,l.unref)(n.maxed)&&null!==!(0,l.unref)(n.maxed)&&(!(0,l.unref)(n.maxed))[Symbol.for("!")]?(!(0,l.unref)(n.maxed))[Symbol.for("!")]():!!(0,l.unref)(n.maxed))()))),(0,J.yB)(n,"canStart"),(0,y.Rh)(n,"canStart",!0),(0,J.yB)(n,"canComplete"),(0,J.yB)(n,"completionLimit"),(0,y.Rh)(n,"completionLimit",1),(0,J.yB)(n,"mark"),(0,J.yB)(n,"goal"),(0,J.yB)(n,"classes"),(0,J.yB)(n,"style"),(0,J.yB)(n,"display"),(()=>void 0!==n.reset&&null!==n.reset&&n.reset[Symbol.for("!=")]?n.reset[Symbol.for("!=")](null):null!=n.reset)()&&h.globalBus.on("reset",(e=>{e===n.reset&&n.active.value&&n.toggle()})),n[y.tj]=function(){const{active:e,maxed:o,canComplete:t,display:n,visibility:r,style:i,classes:a,completed:s,canStart:u,mark:m,id:c,toggle:f}=this;return{active:e,maxed:o,canComplete:t,display:n,visibility:r,style:(0,l.unref)(i),classes:a,completed:s,canStart:u,mark:m,id:c,toggle:f}},n}))}h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"hideChallenges",!1)})),(0,Se.QV)((0,y.tZ)((()=>(0,l.createVNode)(jo.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>Se.ZP.hideChallenges=e,modelValue:Se.ZP.hideChallenges},null))));const mt=(0,l.shallowReactive)({}),ct=Symbol("Hotkey");function ft(e){return(0,Q.z2)((()=>{const o=e();return o.type=ct,(0,J.yB)(o,"enabled"),(0,y.Rh)(o,"enabled",!0),(0,J.yB)(o,"description"),o}))}h.globalBus.on("addLayer",(e=>{(0,y.bD)(e,ct).forEach((e=>{mt[e.key]=e}))})),h.globalBus.on("removeLayer",(e=>{(0,y.bD)(e,ct).forEach((e=>{mt[e.key]=void 0}))})),document.onkeydown=function(e){if("INPUT"===e.target?.tagName)return;if(sl.value&&(()=>void 0!==re.Z.keepGoing&&null!==re.Z.keepGoing&&re.Z.keepGoing[Symbol.for("!")]?re.Z.keepGoing[Symbol.for("!")]():!re.Z.keepGoing)())return;let o=e.key;e.shiftKey&&(o=(()=>"shift+"[Symbol.for("+")]?"shift+"[Symbol.for("+")](o):"shift+"+o)()),e.ctrlKey&&(o=(()=>"ctrl+"[Symbol.for("+")]?"ctrl+"[Symbol.for("+")](o):"ctrl+"+o)());const t=mt[o];t&&(0,l.unref)(t.enabled)&&(e.preventDefault(),t.onPress())},(0,Se.fw)((0,y.tZ)((()=>{const e=Object.values(mt).filter((e=>(0,l.unref)(e?.enabled)));return 0===e.length?"":(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createVNode)("h4",null,[(0,l.createTextVNode)("Hotkeys")]),e.map((e=>(0,l.createVNode)("div",null,[e?.key,(0,l.createTextVNode)(": "),e?.description])))])})));const dt=Symbol("Links");function yt(e){return(0,Q.z2)((()=>{const o=e();return o.type=dt,o[y.wA]=I,(0,J.yB)(o,"links"),o[y.tj]=function(){const{links:e}=this;return{links:e}},o}))}var bt=t(3525);function ht(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),class:(0,l.normalizeClass)({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)))),(0,l.createVNode)(a,{id:e.id},null,8,["id"])],6)):(0,l.createCommentVNode)("",!0)}var pt=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:{type:(0,C.P5)(String,Object,Function),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),earned:{type:(0,C.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:U},setup(e){const{display:o}=(0,l.toRefs)(e),t=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(t.value="");if((0,C.RU)(e))return void(t.value=(0,C.MM)(e));const n=(0,C.MM)(e.requirement,"h3"),r=(0,C.MM)(e.effectDisplay||"","b"),i=(0,C.MM)(e.optionsDisplay||"","span");t.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createVNode)(n,null,null),e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createVNode)(r,null,null)]):null,e.optionsDisplay?(0,l.createVNode)("div",{class:"equal-spaced"},[(0,l.createVNode)(i,null,null)]):null]))))})),{comp:t,unref:l.unref,Visibility:y.EE}}});const gt=(0,a.Z)(pt,[["render",ht],["__scopeId","data-v-0b660ac3"]]);var vt=gt;const St=(0,fe.pm)(),Nt=Symbol("Milestone");var kt;function Vt(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());t.id=(0,y.QI)("milestone-"),t.type=Nt,t[y.wA]=vt,t.earned=t[p.n9],t.complete=function(){t[p.n9].value=!0},(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible);const n=t.visibility;if(t.visibility=(0,l.computed)((()=>{const e=(0,l.unref)(t.display);switch(Se.ZP.msDisplay){default:case kt.All:return(0,l.unref)(n);case kt.Configurable:return(0,l.unref)(t.earned)&&(()=>void 0!==(null!=e&&"object"==typeof e&&"optionsDisplay"in e)&&null!==(null!=e&&"object"==typeof e&&"optionsDisplay"in e)&&(null!=e&&"object"==typeof e&&"optionsDisplay"in e)[Symbol.for("!")]?(null!=e&&"object"==typeof e&&"optionsDisplay"in e)[Symbol.for("!")]():!(null!=e&&"object"==typeof e&&"optionsDisplay"in e))()?y.EE.None:(0,l.unref)(n);case kt.Incomplete:return(0,l.unref)(t.earned)?y.EE.None:(0,l.unref)(n);case kt.None:return y.EE.None}})),(0,J.yB)(t,"style"),(0,J.yB)(t,"classes"),(0,J.yB)(t,"display"),t[y.tj]=function(){const{visibility:e,display:o,style:t,classes:n,earned:r,id:i}=this;return{visibility:e,display:o,style:(0,l.unref)(t),classes:n,earned:r,id:i}},t.shouldEarn){const e=t;(0,l.watchEffect)((()=>{if((()=>void 0!==e.earned.value&&null!==e.earned.value&&e.earned.value[Symbol.for("!")]?e.earned.value[Symbol.for("!")]():!e.earned.value)()&&(0,l.unref)(e.visibility)===y.EE.Visible&&e.shouldEarn?.()&&(e.earned.value=!0,e.onComplete?.(),e.display)){const o=(0,l.unref)(e.display),t=(0,C.MM)((0,C.RU)(o)?o:o.requirement);St((0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)("h3",null,[(0,l.createTextVNode)("Milestone earned!")]),(0,l.createVNode)("div",null,[(0,l.createVNode)(t,null,null)])]))}}))}return t}),(0,p.ax)(!1))}(function(e){e["All"]="all",e["Configurable"]="configurable",e["Incomplete"]="incomplete",e["None"]="none"})(kt||(kt={})),h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"msDisplay",kt.All)}));const xt=Object.values(kt).map((e=>({label:(0,Be.IJ)(e),value:e})));(0,Se.QV)((0,y.tZ)((()=>(0,l.createVNode)(bt.Z,{title:"Show Milestones",options:xt,"onUpdate:modelValue":e=>Se.ZP.msDisplay=e,modelValue:Se.ZP.msDisplay},null))));var Mt=(0,l.defineComponent)({props:{display:null},setup(e){const o=e,{display:t}=(0,l.toRefs)(o),n=(0,C.vq)(t);return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(n))))}});const Ct=Mt;var wt=Ct;const Zt=Symbol("Tab");function Bt(e){return(0,Q.z2)((()=>{const o=e();return o.id=(0,y.QI)("tab-"),o.type=Zt,o[y.wA]=wt,o[y.tj]=function(){const{display:e}=this;return{display:e}},o}))}function Pt(e,o,t,n,r,i){return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:o[0]||(o[0]=(...o)=>e.selectTab&&e.selectTab(...o)),class:(0,l.normalizeClass)(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,e.unref(e.style)??{}])},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component)))],6)):(0,l.createCommentVNode)("",!0)}var Et=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},display:{type:(0,C.P5)(Object,String,Function),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),glowColor:(0,C.P5)(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:o}){const{display:t,glowColor:n,floating:r}=(0,l.toRefs)(e),i=(0,C.vq)(t),a=(0,l.computed)((()=>{const e=(0,C.Uv)(n);return(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?{}:(0,l.unref)(r)?de(e):{boxShadow:`0px 9px 5px -6px ${e}`}}));function s(){o("selectTab")}return{selectTab:s,component:i,glowColorStyle:a,unref:l.unref,Visibility:y.EE}}});const Tt=(0,a.Z)(Et,[["render",Pt],["__scopeId","data-v-361380c0"]]);var Ft=Tt;function It(e,o,t,n,r,i){const a=(0,l.resolveComponent)("TabButton"),s=(0,l.resolveComponent)("Sticky");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??[],e.tabStyle??[]])},[(0,l.createVNode)(s,{class:"tab-buttons-container"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["tab-buttons",{floating:e.floating}])},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.tabs),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({onSelectTab:o=>e.selected.value=t,floating:e.floating,key:t,active:e.unref(o.tab)===e.unref(e.activeTab)},e.gatherButtonProps(o)),null,16,["onSelectTab","floating","active"])))),128))],2)])),_:1}),e.unref(e.activeTab)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)}var Dt=(0,l.defineComponent)({props:{visibility:{type:(0,C.P5)(Number),required:!0},activeTab:{type:(0,C.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,C.P5)(Object),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object)},components:{Sticky:zo,TabButton:Ft},setup(e){const{activeTab:o}=(0,l.toRefs)(e),t=(0,l.computed)((()=>ve.Z[Se.ZP.theme].floatingTabs)),n=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,C.Uv)(o);(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()?n.value="":(0,C.RU)(e)?n.value=(0,C.MM)(e):n.value=(0,C.MM)((0,l.unref)(e.display))}));const r=(0,l.computed)((()=>{const e=(0,C.Uv)(o),t=(0,C.RU)(e)||(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?void 0:(0,l.unref)(e.classes);return t})),i=(0,l.computed)((()=>{const e=(0,C.Uv)(o);return(0,C.RU)(e)||(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?void 0:(0,l.unref)(e.style)}));function a(e){const{display:o,style:t,classes:l,glowColor:n,visibility:r}=e;return{display:o,style:t,classes:l,glowColor:n,visibility:r}}return{floating:t,tabClasses:r,tabStyle:i,Visibility:y.EE,component:n,gatherButtonProps:a,unref:l.unref}}});const Rt=(0,a.Z)(Dt,[["render",It],["__scopeId","data-v-38d5b5f9"]]);var Ot=Rt;const _t=Symbol("TabButton"),jt=Symbol("TabFamily");function At(e,o){if(0===Object.keys(e).length)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";return(0,Q.z2)((t=>{const n=Object.assign(t,o?.());n.id=(0,y.QI)("tabFamily-"),n.type=jt,n[y.wA]=Ot,n.tabs=Object.keys(e).reduce(((o,t)=>{const l=e[t]();return l.type=_t,l[y.wA]=Ft,(0,J.yB)(l,"visibility"),(0,y.Rh)(l,"visibility",y.EE.Visible),(0,J.yB)(l,"tab"),(0,J.yB)(l,"display"),(0,J.yB)(l,"classes"),(0,J.yB)(l,"style"),(0,J.yB)(l,"glowColor"),o[t]=l,o}),{}),n.selected=n[p.n9],n.activeTab=(0,l.computed)((()=>{const e=(0,l.unref)(r.tabs);if((()=>void 0!==n[p.n9].value&&null!==n[p.n9].value&&n[p.n9].value[Symbol.for("in")]?n[p.n9].value[Symbol.for("in")](e):n[p.n9].value in e)()&&(0,l.unref)(e[r[p.n9].value].visibility)===y.EE.Visible)return(0,l.unref)(e[r[p.n9].value].tab);const o=Object.values(e).find((e=>(0,l.unref)(e.visibility)===y.EE.Visible));return o?(0,l.unref)(o.tab):null})),(0,J.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,J.yB)(n,"classes"),(0,J.yB)(n,"style"),n[y.tj]=function(){const{visibility:e,activeTab:o,selected:t,tabs:n,style:r,classes:i}=this;return{visibility:e,activeTab:o,selected:t,tabs:n,style:(0,l.unref)(r),classes:i}};const r=n;return r}),(0,p.ax)(Object.keys(e)[0]))}const Ut=["disabled"];function qt(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,style:(0,l.normalizeStyle)([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.unref(e.style)??{}]),onClick:o[0]||(o[0]=(...o)=>e.purchase&&e.purchase(...o)),class:(0,l.normalizeClass)({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:(()=>void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase))(),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:(()=>void 0!==e.unref(e.canPurchase)&&null!==e.unref(e.canPurchase)&&e.unref(e.canPurchase)[Symbol.for("!")]?e.unref(e.canPurchase)[Symbol.for("!")]():!e.unref(e.canPurchase))()},[e.unref(e.component)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.component)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],14,Ut)):(0,l.createCommentVNode)("",!0)}var zt=(0,l.defineComponent)({props:{display:{type:(0,C.P5)(String,Object,Function),required:!0},visibility:{type:(0,C.P5)(Number),required:!0},style:(0,C.P5)(String,Object,Array),classes:(0,C.P5)(Object),resource:Object,cost:(0,C.P5)(String,Object,Number),canPurchase:{type:(0,C.P5)(Boolean),required:!0},bought:{type:(0,C.P5)(Boolean),required:!0},mark:(0,C.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:U,MarkNode:H},setup(e){const{display:o,cost:t}=(0,l.toRefs)(e),n=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const r=(0,C.Uv)(o);if((()=>void 0!==r&&null!==r&&r[Symbol.for("==")]?r[Symbol.for("==")](null):null==r)())return void(n.value="");if((0,C.RU)(r))return void(n.value=(0,C.MM)(r));const i=(0,C.Uv)(t),a=(0,C.MM)(r.title||"","h3"),s=(0,C.MM)(r.description,"div"),u=(0,C.MM)(r.effectDisplay||"");n.value=(0,C.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[r.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(a,null,null)]):null,(0,l.createVNode)(s,null,null),r.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Currently: "),(0,l.createVNode)(u,null,null)]):null,(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()?(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Cost: "),e.resource&&x(e.resource,i)," ",e.resource?.displayName]):null]))))})),{component:n,unref:l.unref,Visibility:y.EE}}});const Lt=(0,a.Z)(zt,[["render",qt],["__scopeId","data-v-264c96b4"]]);var Gt=Lt;const Wt=Symbol("Upgrade");function Ht(e){return(0,Q.z2)((o=>{const t=Object.assign(o,e());return t.id=(0,y.QI)("upgrade-"),t.type=Wt,t[y.wA]=Gt,(()=>void 0!==t.canAfford&&null!==t.canAfford&&t.canAfford[Symbol.for("==")]?t.canAfford[Symbol.for("==")](null):null==t.canAfford)()&&((()=>void 0!==t.resource&&null!==t.resource&&t.resource[Symbol.for("==")]?t.resource[Symbol.for("==")](null):null==t.resource)()||(()=>void 0!==t.cost&&null!==t.cost&&t.cost[Symbol.for("==")]?t.cost[Symbol.for("==")](null):null==t.cost)())&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",t),t.bought=t[p.n9],(()=>void 0!==t.canAfford&&null!==t.canAfford&&t.canAfford[Symbol.for("==")]?t.canAfford[Symbol.for("==")](null):null==t.canAfford)()?t.canAfford=(0,l.computed)((()=>{const e=t;return(()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()&&(()=>void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("!=")]?e.cost[Symbol.for("!=")](null):null!=e.cost)()&&b.ZP.gte(e.resource.value,(0,l.unref)(e.cost))})):(0,J.yB)(t,"canAfford"),t.canPurchase=(0,l.computed)((()=>(0,l.unref)(t.visibility)===y.EE.Visible&&(0,l.unref)(t.canAfford)&&(()=>void 0!==(0,l.unref)(t.bought)&&null!==(0,l.unref)(t.bought)&&(0,l.unref)(t.bought)[Symbol.for("!")]?(0,l.unref)(t.bought)[Symbol.for("!")]():!(0,l.unref)(t.bought))())),t.purchase=function(){const e=t;(()=>void 0!==(0,l.unref)(e.canPurchase)&&null!==(0,l.unref)(e.canPurchase)&&(0,l.unref)(e.canPurchase)[Symbol.for("!")]?(0,l.unref)(e.canPurchase)[Symbol.for("!")]():!(0,l.unref)(e.canPurchase))()||((()=>void 0!==e.resource&&null!==e.resource&&e.resource[Symbol.for("!=")]?e.resource[Symbol.for("!=")](null):null!=e.resource)()&&(()=>void 0!==e.cost&&null!==e.cost&&e.cost[Symbol.for("!=")]?e.cost[Symbol.for("!=")](null):null!=e.cost)()&&(e.resource.value=b.ZP.sub(e.resource.value,(0,l.unref)(e.cost))),e[p.n9].value=!0,e.onPurchase?.())},(0,J.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,J.yB)(t,"classes"),(0,J.yB)(t,"style"),(0,J.yB)(t,"display"),(0,J.yB)(t,"mark"),(0,J.yB)(t,"cost"),(0,J.yB)(t,"resource"),t[y.tj]=function(){const{display:e,visibility:o,style:t,classes:n,resource:r,cost:i,canPurchase:a,bought:s,mark:u,id:m,purchase:c}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:n,resource:r,cost:i,canPurchase:a,bought:s,mark:u,id:m,purchase:c}},t}),(0,p.ax)(!1))}function $t(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&(()=>void 0!==(0,l.isVNode)(e)&&null!==(0,l.isVNode)(e)&&(0,l.isVNode)(e)[Symbol.for("!")]?(0,l.isVNode)(e)[Symbol.for("!")]():!(0,l.isVNode)(e))()}const Yt="c",Kt=(0,w.createLayer)(Yt,(()=>{const e="#4BDC13",o="Candies",t=g(0,"lollipops"),n=v(t),r=(0,p.ax)(!1),i=(0,p.ax)("pointy"),a=(0,p.ax)(10),s=(0,p.ax)(new b.ZP(10)),u=(0,l.computed)((()=>b.ZP.pow(t.value,.2))),m=(0,l.computed)((()=>b.ZP.times(t.value,10))),c=to((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}))),f=Vt((()=>({shouldEarn(){return b.ZP.gte(n.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}))),h=Vt((()=>({visibility(){return(0,y.Kf)(f.earned.value)},shouldEarn(){return b.ZP.gte(n.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(jo.Z,{title:"beep","onUpdate:modelValue":e=>r.value=e,modelValue:r.value},null),(0,l.createVNode)(jo.Z,{title:"boop","onUpdate:modelValue":e=>ol.boop.value=e,modelValue:ol.boop.value},null)])))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}}))),S=[f,h],N=ut((()=>({title:"Fun",completionLimit:3,display(){return{description:`Makes the game 0% harder<br>${(0,b.Ht)(this.completions.value)}/${this.completionLimit} completions`,goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:(()=>void 0!==(0,b.WU)(k.value)&&null!==(0,b.WU)(k.value)&&(0,b.WU)(k.value)[Symbol.for("+")]?(0,b.WU)(k.value)[Symbol.for("+")]("x"):(0,b.WU)(k.value)+"x")()}},visibility(){return(0,y.Kf)(b.ZP.gt(n.value,0))},goal:20,resource:il.points,onComplete(){console.log("hiii")},onEnter(){il.points.value=0,il.best.value=il.points.value,il.total.value=il.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}}))),k=(0,l.computed)((()=>b.ZP.add(t.value,1).tetrate(.02))),V=Ht((()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:t}))),M=Ht((()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${(0,b.WU)(w.value)}x`}),cost:1,resource:t,visibility:()=>(0,y.Kf)(V.bought.value)}))),w=(0,l.computed)((()=>{let e=b.ZP.add(t.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),Z=Ht((()=>({visibility(){return(0,y.Kf)(M.bought.value)},canAfford(){return b.ZP.lt(il.points.value,7)},onPurchase(){il.points.value=b.ZP.add(il.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style(){return this.bought?{backgroundColor:"#1111dd"}:(()=>void 0!==this.canAfford&&null!==this.canAfford&&this.canAfford[Symbol.for("!")]?this.canAfford[Symbol.for("!")]():!this.canAfford)()?{backgroundColor:"#dd1111"}:{}}}))),B=Ht((()=>({resource:g(E.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}))),P=[V,M,Z],E=tt((()=>({resource:t,cost(){let e=new b.ZP(this.amount.value);e.gte(25)&&(e=e.pow(2).div(25));const o=b.ZP.pow(2,e.pow(1.5));return o.floor()},display(){return{title:"Exhancers",description:`Adds ${(0,b.WU)(T.value)} things and multiplies stuff by ${(0,b.WU)(F.value)}.`}},onPurchase(e){s.value=b.ZP.add(s.value,e)},style:{height:"222px"},purchaseLimit:4}))),T=(0,l.computed)((()=>b.ZP.gte(E.amount.value,0)?b.ZP.pow(25,b.ZP.pow(E.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(E.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),F=(0,l.computed)((()=>b.ZP.gte(E.amount.value,0)?b.ZP.pow(25,b.ZP.pow(E.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(E.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),I=(0,p.ax)(!1),D=(0,l.ref)(!1),R=je((()=>({small:!0,display:"Respec Thingies",onClick(){I.value&&(()=>void 0!==D.value&&null!==D.value&&D.value[Symbol.for("!")]?D.value[Symbol.for("!")]():!D.value)()?D.value=!0:(t.value=b.ZP.add(t.value,s.value),E.amount.value=0,il.tree.reset(G))}}))),O=je((()=>({small:!0,display:"Sell One",onClick(){b.ZP.lte(E.amount.value,0)||(E.amount.value=b.ZP.sub(E.amount.value,1),t.value=b.ZP.add(t.value,E.cost.value),s.value=b.ZP.sub(s.value,E.cost.value))}}))),_=(0,y.tZ)((()=>(0,l.createVNode)(Ao.Z,null,{default:()=>[(0,l.createVNode)(ie.Z,null,{default:()=>[(0,l.createVNode)(jo.Z,{title:"Confirm","onUpdate:modelValue":e=>I.value=e,modelValue:I.value},null),(0,C._4)(R)]}),(0,C._4)(E),(0,C._4)(O),(0,l.createVNode)(Ho.Z,{modelValue:D.value,"onUpdate:modelValue":e=>D.value=e},{header:()=>(0,l.createVNode)("h2",null,[(0,l.createTextVNode)("Confirm Respec")]),body:()=>(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Are you sure? Respeccing these doesn't accomplish much")]),footer:()=>(0,l.createVNode)("div",{class:"modal-default-footer"},[(0,l.createVNode)("div",{class:"modal-default-flex-grow"},null),(0,l.createVNode)("button",{class:"button modal-default-button",onClick:()=>D.value=!1},[(0,l.createTextVNode)("Cancel")]),(0,l.createVNode)("button",{class:"button modal-default-button danger",onClick:()=>{R.onClick(),D.value=!1}},[(0,l.createTextVNode)("Respec")])])})]}))),j=et((()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:Xo.Right,width:300,height:30,progress(){return b.ZP.add(il.points.value,1).log(10).div(10).toNumber()},display(){return(()=>void 0!==(0,b.WU)(il.points.value)&&null!==(0,b.WU)(il.points.value)&&(0,b.WU)(il.points.value)[Symbol.for("+")]?(0,b.WU)(il.points.value)[Symbol.for("+")](" / 1e10 points"):(0,b.WU)(il.points.value)+" / 1e10 points")()}}))),A=et((()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:Xo.Up,width:50,height:200,progress(){return b.ZP.div(il.points.value,100)},display(){return(()=>void 0!==(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))&&null!==(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))&&(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))[Symbol.for("+")]?(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))[Symbol.for("+")]("%"):(0,b.Ht)(b.ZP.div(il.points.value,1).min(100))+"%")()}}))),U=et((()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:Xo.Up,width:100,height:30,progress(){return b.ZP.div(t.value,50)}}))),q=Le((()=>({scaling:He(ze(10,.5),1e100,.5),baseResource:il.points,gainResource:t,roundUpCost:!0,gainModifier:Po(Bo(2,"Because I felt like it"),wo(1,"Nice modifier"))}))),z=fo((()=>({thingsToReset:()=>[Kt]}))),L=[ft((()=>({key:"c",description:"reset for lollipops or whatever",onPress(){W.canClick.value&&W.onClick()}}))),ft((()=>({key:"ctrl+c",description:"respec things",onPress(){R.onClick()}})))],G=Ue((()=>({layerID:Yt,color:e,reset:z,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let e=x(t);return b.ZP.gt(E.amount.value,0)&&(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](`<br><i><br><br><br>${(0,b.Ht)(E.amount.value)} Exhancers</i>`):e+`<br><i><br><br><br>${(0,b.Ht)(E.amount.value)} Exhancers</i>`)()),e},style:{color:"#3325CC",textDecoration:"underline"}})));(0,Co.Z)(G,{display:ne(t),pinnable:!0});const W=Ae((()=>({conversion:q,tree:il.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "})));(0,Co.Z)(W,{display:(0,y.tZ)((()=>Eo("Modifiers","",q.gainModifier,q.scaling.currentGain(q)))),pinnable:!0,direction:Co.A.DOWN,style:"width: 400px; text-align: left"});const H=oe((()=>({display:"TH",color:"#6d3678",canClick(){return b.ZP.gte(il.points.value,10)},tooltip:"Thanos your points",onClick(){il.points.value=b.ZP.div(il.points.value,2),console.log("Thanos'd")},glowColor(){return b.ZP.eq(E.amount.value,1)?"orange":""}}))),$=oe((()=>({display:"h",color(){return ve.Z[Se.ZP.theme].variables["--locked"]},tooltip:{display:(0,l.computed)((()=>`Restore your points to ${(0,b.WU)(a.value)}`)),right:!0},canClick(){return b.ZP.lt(il.points.value,a.value)},onClick(){il.points.value=a.value}}))),Y=oe((()=>({visibility:y.EE.Hidden}))),K=te((()=>({nodes(){return[[ol.treeNode,G],[H,Y,$]]},branches(){return[{startNode:ol.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:H},{startNode:H,endNode:$}]}}))),J=yt((()=>({links:[{startNode:$,endNode:U,"stroke-width":"5px",stroke:"red",offsetEnd:{x:(()=>(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*U.progress.value.toNumber()):100*U.progress.value.toNumber()-50)(),y:0}}]}))),Q=At({first:()=>({tab:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C._4)(...P),(0,C._4)(B),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("confirmed")])]))),display:"first"}),second:()=>({tab:ol.display,display:"second"})},(()=>({style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}))),X=At({mainTab:()=>({tab:Bt((()=>({display:(0,y.tZ)((()=>{let o;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(Mo,{resource:t,color:e,effectDisplay:`which are boosting waffles by ${(0,b.WU)(u.value)} and increasing the Ice Cream cap by ${(0,b.WU)(m.value)}`},null),(0,l.createVNode)(zo,null,$t(o=(0,C.sY)(W))?o:{default:()=>[o]}),(0,l.createVNode)(po,{resource:t,color:e},null),(0,l.createVNode)(d,{height:"5px"},null),(0,l.createVNode)("button",{onClick:()=>console.log("yeet")},[(0,l.createTextVNode)("'HI'")]),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Name your points!")]),(0,l.createVNode)(_o.Z,{modelValue:i.value,"onUpdate:modelValue":e=>i.value=e},null),(0,l.createVNode)(zo,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[(0,l.createTextVNode)("I have "),x(il.points),(0,l.createTextVNode)(" "),i.value,(0,l.createTextVNode)(" points!")]}),(0,l.createVNode)("hr",null,null),(0,C.Dy)(...S),(0,l.createVNode)(d,null,null),(0,C._4)(...P),(0,C._4)(B),(0,C._4)(N)])}))}))),display:"main tab",glowColor(){return V.canPurchase.value||M.canPurchase.value||Z.canPurchase.value||N.canComplete.value?"blue":""},style:{color:"orange"}}),thingies:()=>({tab:Bt((()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(_),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ie.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[(0,l.createVNode)(jo.Z,{"onUpdate:modelValue":e=>r.value=e,modelValue:r.value},null),(0,l.createVNode)(d,{width:"30px",height:"10px"},null),(0,l.createVNode)("div",null,[(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Beep")])]),(0,l.createVNode)(d,null,null),(0,l.createVNode)(Wo,{height:"200px"},null)]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)])))}))),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}),jail:()=>({tab:Bt((()=>({display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(c),(0,C.sY)(j),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ie.Z,null,{default:()=>[(0,l.createVNode)(Ao.Z,{style:"background-color: #555555; padding: 15px"},{default:()=>[(0,l.createVNode)("div",{style:"color: teal"},[(0,l.createTextVNode)("Sugar level:")]),(0,l.createVNode)(d,null,null),(0,C.sY)(A)]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)(Ao.Z,null,{default:()=>[(0,l.createVNode)("div",null,[(0,l.createTextVNode)("idk")]),(0,l.createVNode)(d,{width:"0",height:"50px"},null),(0,C.sY)(U)]})]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)("div",null,[(0,l.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,C.sY)(K)])))}))),display:"jail"}),illuminati:()=>({tab:Bt((()=>({display:(0,y.tZ)((()=>(0,l.createVNode)("div",null,[(0,l.createVNode)("h1",null,[(0,l.createTextVNode)(" C O N F I R M E D ")]),(0,l.createVNode)(d,null,null),(0,C.sY)(Q),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Adjust how many points H gives you!")]),(0,l.createVNode)(Oo,{"onUpdate:modelValue":e=>a.value=e,modelValue:a.value,min:1,max:30},null)]))),style:{backgroundColor:"#3325CC"}}))),visibility(){return(0,y.Kf)(Z.bought.value)},display:"illuminati"})});return{id:Yt,color:e,name:o,points:t,best:n,beep:r,thingy:i,otherThingy:a,spentOnBuyables:s,waffleBoost:u,icecreamCap:m,coolInfo:c,lollipopMilestones:S,funChallenge:N,funEffect:k,generatorUpgrade:V,lollipopMultiplierUpgrade:M,lollipopMultiplierEffect:w,unlockIlluminatiUpgrade:Z,quasiUpgrade:B,exhancers:E,respecBuyables:R,sellExhancer:O,bars:{tallBoi:A,longBoi:j,flatBoi:U},tree:K,g:H,h:$,spook:Y,conversion:q,reset:z,hotkeys:L,treeNode:G,resetButton:W,confirmRespec:I,minWidth:800,tabs:X,display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(X),(0,C.sY)(J)])))}}));var Jt=Kt,Qt=JSON.parse('{"lifetime":{"min":0.5,"max":1},"ease":[{"s":0,"cp":0.329,"e":0.548},{"s":0.548,"cp":0.767,"e":0.876},{"s":0.876,"cp":0.985,"e":1}],"frequency":0.001,"emitterLifetime":0.1,"maxParticles":100,"addAtBack":true,"pos":{"x":0,"y":0},"emit":false,"behaviors":[{"type":"alpha","config":{"alpha":{"list":[{"time":0,"value":0.74},{"time":1,"value":0}]}}},{"type":"moveSpeed","config":{"speed":{"list":[{"time":0,"value":300},{"time":1,"value":0}]},"minMult":1}},{"type":"scale","config":{"scale":{"list":[{"time":0,"value":1},{"time":1,"value":0.25}]},"minMult":1}},{"type":"color","config":{"color":{"list":[{"time":0,"value":"#ffdfa0"},{"time":1,"value":"#100f0c"}]}}},{"type":"rotation","config":{"accel":0,"minSpeed":0,"maxSpeed":200,"minStart":0,"maxStart":360}},{"type":"textureRandom","config":{"textures":["/particle.png"]}},{"type":"spawnShape","config":{"type":"rect","data":{"x":0,"y":0,"w":0,"h":0}}}]}');const Xt="f",el=(0,w.createLayer)(Xt,(()=>{const e="#FE0102",o="Farms",t=g(0,"farm points"),n=(0,p.ax)(!1),r=to((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}))),i=(0,p.ax)("Start"),a=je((()=>({display(){return{title:"Clicky clicky!",description:(()=>"Current state:<br>"[Symbol.for("+")]?"Current state:<br>"[Symbol.for("+")](i.value):"Current state:<br>"+i.value)()}},initialState:"Start",canClick(){return(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!==")]?i.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==i.value)()},onClick(e){switch(i.value){case"Start":i.value="A new state!";break;case"A new state!":i.value="Keep going!";break;case"Keep going!":i.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const o=(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](void 0):void 0==e)()?void 0:(()=>"touches"[Symbol.for("in")]?"touches"[Symbol.for("in")](e):"touches"in e)()?e.touches[0]:e,t=Object.assign({},Qt,{pos:{x:(()=>void 0!==(o?.clientX??0)&&null!==(o?.clientX??0)&&(o?.clientX??0)[Symbol.for("-")]?(o?.clientX??0)[Symbol.for("-")](h.boundingRect?.value?.left??0):(o?.clientX??0)-(h.boundingRect?.value?.left??0))(),y:(()=>void 0!==(o?.clientY??0)&&null!==(o?.clientY??0)&&(o?.clientY??0)[Symbol.for("-")]?(o?.clientY??0)[Symbol.for("-")](h.boundingRect?.value?.top??0):(o?.clientY??0)-(h.boundingRect?.value?.top??0))()}});h.addEmitter(t).then((e=>e.playOnceAndDestroy())),i.value="Borkened...";break;default:i.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(i.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}}))),s=je((()=>({onClick(){(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value)()&&(i.value="Start")},display(){return(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("==")]?i.value[Symbol.for("==")]("Borkened..."):"Borkened..."==i.value)()?"Fix the clickable!":"Does nothing"},small:!0}))),u=fo((()=>({thingsToReset:()=>[el]}))),m=Ge((()=>({scaling:ze(10,.5),baseResource:il.points,gainResource:t,modifyGainAmount:Zo(Jt.otherThingy)}))),c=Ue((()=>({layerID:Xt,color:e,reset:u,tooltip(){return c.canClick.value?`${x(t)} ${t.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${x(il.points)}`},canClick(){return b.ZP.gte(il.points.value,10)}})));(0,Co.Z)(c,{display:ne(t),pinnable:!0});const f=Ae((()=>({conversion:m,tree:il.tree,treeNode:c,display:(0,y.tZ)((()=>f.conversion.buyMax?(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Hi! I'm a "),(0,l.createVNode)("u",null,[(0,l.createTextVNode)("weird dinosaur")]),(0,l.createTextVNode)(" and I'll give you")," ",(0,l.createVNode)("b",null,[(0,b.Ht)(f.conversion.currentGain.value)]),(0,l.createTextVNode)(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",(0,b.Ht)(f.conversion.nextAt.value),(0,l.createTextVNode)(" points)")]):(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Hi! I'm a "),(0,l.createVNode)("u",null,[(0,l.createTextVNode)("weird dinosaur")]),(0,l.createTextVNode)(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",(0,b.Ht)(f.conversion.nextAt.value),(0,l.createTextVNode)(" points)")])))}))),h=mo((()=>({boundingRect:(0,l.ref)(null),onContainerResized(e){this.boundingRect.value=e},style:"z-index: 2"}))),v=(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,C.sY)(r),(0,l.createVNode)(Mo,{resource:t,color:e},null),(0,C.sY)(f),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("You have "),(0,b.Ht)(m.baseResource.value),(0,l.createTextVNode)(" points")]),(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createVNode)("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Bork Bork!")])]),(0,l.createVNode)(d,null,null),(0,C._4)(s),(0,C._4)(a),(0,C.sY)(h)])));return{id:Xt,color:e,name:o,points:t,boop:n,coolInfo:r,clickable:a,clickableState:i,reset:u,conversion:m,treeNode:c,resetButton:f,display:v}}));var ol=el;function tl(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&(()=>void 0!==(0,l.isVNode)(e)&&null!==(0,l.isVNode)(e)&&(0,l.isVNode)(e)[Symbol.for("!")]?(0,l.isVNode)(e)[Symbol.for("!")]():!(0,l.isVNode)(e))()}const ll="a",nl=(0,w.createLayer)(ll,(()=>{const e="yellow",o="Achievements",t=g(0,"achievement power"),n=oe((()=>({display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick(){il.showAchievements()}}))),r=pe((()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,l.computed)((()=>r.earned.value?"You did it!":"How did this happen?")),shouldEarn:()=>!0}))),i=pe((()=>({display:"Impossible!",tooltip:(0,l.computed)((()=>i.earned.value?"HOW????":"Mwahahaha!")),style:{color:"#04e050"}}))),a=pe((()=>({display:"EIEIO",tooltip:"Get a farm point.\n\nReward: The dinosaur is now your friend (you can max Farm Points).",shouldEarn:function(){return b.ZP.gte(ol.points.value,1)},onComplete(){console.log("Bork bork bork!")}}))),s=[r,i,a],u=Fe((()=>({rows:2,cols:2,getStartState(e){return e},getStyle(e,o){return{backgroundColor:`#${(()=>1234*Number(o)!==void 0&&1234*Number(o)!==null&&(1234*Number(o))[Symbol.for("%")]?(1234*Number(o))[Symbol.for("%")](999999):1234*Number(o)%999999)()}`}},getTitle(e){let o="";return"101"===e?o="top":"102"===e?o="bottom":"201"===e?o="left":"202"===e&&(o="right"),(0,y.tZ)((()=>(0,l.createVNode)(ae.Z,(0,l.mergeProps)({display:JSON.stringify(this.cells[e].style)},{[o]:!0}),{default:()=>[(0,l.createVNode)("h3",null,[(0,l.createTextVNode)("Gridable #"),e])]})))},getDisplay(e,o){return String(o)},getCanClick(){return b.ZP.eq(il.points.value,10)},onClick(e,o){this.cells[e].state=(()=>void 0!==Number(o)&&null!==Number(o)&&Number(o)[Symbol.for("+")]?Number(o)[Symbol.for("+")](1):Number(o)+1)()}}))),m=(0,y.tZ)((()=>{let e,o,t;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(ie.Z,null,{default:()=>[(0,l.createVNode)(ae.Z,{display:r.tooltip,bottom:!0},tl(e=(0,C.sY)(r))?e:{default:()=>[e]}),(0,l.createVNode)(ae.Z,{display:i.tooltip,bottom:!0},tl(o=(0,C.sY)(i))?o:{default:()=>[o]}),(0,l.createVNode)(ae.Z,{display:a.tooltip,bottom:!0},tl(t=(0,C.sY)(a))?t:{default:()=>[t]})]}),(0,C._4)(u)])}));return{id:ll,color:e,name:o,points:t,achievements:s,grid:u,treeNode:n,display:m}}));var rl=nl;const il=(0,w.createLayer)("main",(()=>{const e=g(10),o=v(e),t=S(e),n=(0,l.computed)((()=>{if((()=>void 0!==Jt.generatorUpgrade.bought.value&&null!==Jt.generatorUpgrade.bought.value&&Jt.generatorUpgrade.bought.value[Symbol.for("!")]?Jt.generatorUpgrade.bought.value[Symbol.for("!")]():!Jt.generatorUpgrade.bought.value)())return new b.ZP(0);let e=new b.ZP(3.19);return Jt.lollipopMultiplierUpgrade.bought.value&&(e=e.times(Jt.lollipopMultiplierEffect.value)),e}));h.globalBus.on("update",(o=>{e.value=b.ZP.add(e.value,b.ZP.times(n.value,o))}));const r=V(e,n),{openModal:i,modal:a}=(0,w.setupLayerModal)(rl),s=te((()=>({nodes:[[Jt.treeNode],[ol.treeNode,Jt.spook]],leftSideNodes:[rl.treeNode,Jt.h],branches:[{startNode:ol.treeNode,endNode:Jt.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=(0,l.toRaw)(this.resettingNode.value)===(0,l.toRaw)(Jt.treeNode)?0:10,o.value=e.value,t.value=e.value},resetPropagation:le})));return{name:"Tree",display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[0===re.Z.devSpeed?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Game Paused")]):null,re.Z.devSpeed&&(()=>void 0!==re.Z.devSpeed&&null!==re.Z.devSpeed&&re.Z.devSpeed[Symbol.for("!==")]?re.Z.devSpeed[Symbol.for("!==")](1):1!==re.Z.devSpeed)()?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Dev Speed: "),(0,b.WU)(re.Z.devSpeed||0),(0,l.createTextVNode)("x")]):null,(()=>void 0!==re.Z.offlineTime&&null!==re.Z.offlineTime&&re.Z.offlineTime[Symbol.for("!=")]?re.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=re.Z.offlineTime)()?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Offline Time: "),(0,b.mr)(re.Z.offlineTime||0)]):null,(0,l.createVNode)("div",null,[b.ZP.lt(e.value,"1e1000")?(0,l.createVNode)("span",null,[(0,l.createTextVNode)("You have ")]):null,(0,l.createVNode)("h2",null,[(0,b.WU)(e.value)]),b.ZP.lt(e.value,"1e1e6")?(0,l.createVNode)("span",null,[(0,l.createTextVNode)(" points")]):null]),b.ZP.gt(n.value,0)?(0,l.createVNode)("div",null,[(0,l.createTextVNode)("("),r.value,(0,l.createTextVNode)(")")]):null,(0,l.createVNode)(d,null,null),(0,l.createVNode)("button",{onClick:i},[(0,l.createTextVNode)("open achievements")]),(0,C.sY)(a),(0,C.sY)(s),(0,l.createVNode)(m,{height:"200px",style:"margin: 10px auto; display: block"},null)]))),points:e,best:o,total:t,oomps:r,tree:s,showAchievements:i}})),al=e=>[il,ol,Jt,rl],sl=(0,l.computed)((()=>b.ZP.gt(il.points.value,25)));function ul(e,o){}},9365:function(e,o,t){"use strict";t.r(o),t.d(o,{RegisterNodeInjectionKey:function(){return f},UnregisterNodeInjectionKey:function(){return d},NodesInjectionKey:function(){return y},layers:function(){return b},persistentRefs:function(){return h},addingLayers:function(){return p},createLayer:function(){return g},addLayer:function(){return v},getLayer:function(){return S},removeLayer:function(){return N},reloadLayer:function(){return k},setupLayerModal:function(){return V}});var l=t(4865),n=t(6948),r=t(6113),i=t(9583),a=t(3273),s=t(8111),u=t(7302),m=t(4061),c=t(5967);const f=Symbol("RegisterNode"),d=Symbol("UnregisterNode"),y=Symbol("Nodes"),b={};window.layers=b;const h={},p=[];function g(e,o){return(0,a.z2)((()=>{const t={},n=t.emitter=(0,s.i)();if(t.on=n.on.bind(n),t.emit=n.emit.bind(n),t.nodes=(0,l.ref)({}),t.id=e,p.push(e),h[e]=new Set,t.minimized=(0,m.ax)(!1),Object.assign(t,o.call(t)),(()=>void 0!==p[p.length-1]&&null!==p[p.length-1]&&p[p.length-1][Symbol.for("==")]?p[p.length-1][Symbol.for("==")](null):null==p[p.length-1])()||(()=>void 0!==p[p.length-1]&&null!==p[p.length-1]&&p[p.length-1][Symbol.for("!==")]?p[p.length-1][Symbol.for("!==")](e):p[p.length-1]!==e)())throw`Adding layers stack in invalid state. This should not happen\nStack: ${p}\nTrying to pop ${t.id}`;return p.pop(),(0,i.yB)(t,"color"),(0,i.yB)(t,"display"),(0,i.yB)(t,"name"),(0,r.Rh)(t,"name",t.id),(0,i.yB)(t,"minWidth"),(0,r.Rh)(t,"minWidth",600),(0,i.yB)(t,"minimizable"),(0,r.Rh)(t,"minimizable",!0),t}))}function v(e,o){console.info("Adding layer",e.id),b[e.id]?console.error("Attempted to add layer with same ID as existing layer",e.id,b[e.id]):((0,r.Rh)(o,"layers",{}),(()=>void 0!==o.layers[e.id]&&null!==o.layers[e.id]&&o.layers[e.id][Symbol.for("==")]?o.layers[e.id][Symbol.for("==")](null):null==o.layers[e.id])()&&(o.layers[e.id]={}),b[e.id]=e,u.globalBus.emit("addLayer",e,o.layers[e.id]))}function S(e){return b[e]}function N(e){console.info("Removing layer",e.id),u.globalBus.emit("removeLayer",e),b[e.id]=void 0}function k(e){N(e),v(e,c.Z)}function V(e){const o=(0,l.ref)(!1);return{openModal:()=>o.value=!0,modal:(0,r.tZ)((()=>(0,l.createVNode)(n.Z,{modelValue:o.value,"onUpdate:modelValue":e=>o.value=e},{header:()=>(0,l.createVNode)("h2",null,[(0,l.unref)(e.name)]),body:(0,l.unref)(e.display)})))}}u.globalBus.on("update",(function(e){Object.values(b).forEach((o=>{o?.emit("preUpdate",e)})),Object.values(b).forEach((o=>{o?.emit("update",e)})),Object.values(b).forEach((o=>{o?.emit("postUpdate",e)}))}))},1604:function(e,o,t){"use strict";t.d(o,{MM:function(){return u},sY:function(){return m},_4:function(){return c},Dy:function(){return f},qF:function(){return d},RU:function(){return y},ix:function(){return b},vq:function(){return h},KO:function(){return p},o9:function(){return g},Uv:function(){return v},P5:function(){return S}});var l=t(4865),n=t(9905),r=t(274),i=t(6113),a=t(9583);function s(e){return"function"===typeof e||"[object Object]"===Object.prototype.toString.call(e)&&(()=>void 0!==(0,l.isVNode)(e)&&null!==(0,l.isVNode)(e)&&(0,l.isVNode)(e)[Symbol.for("!")]?(0,l.isVNode)(e)[Symbol.for("!")]():!(0,l.isVNode)(e))()}function u(e,o="span"){return"function"===typeof e?(0,l.defineComponent)({render:e}):"string"===typeof e?(()=>void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0)()?(e=e.trim(),(()=>void 0!==e.charAt(0)&&null!==e.charAt(0)&&e.charAt(0)[Symbol.for("!==")]?e.charAt(0)[Symbol.for("!==")]("<"):"<"!==e.charAt(0))()&&(e=`<${o}>${e}</${o}>`),(0,l.defineComponent)({template:e})):(0,l.defineComponent)({render:()=>({})}):e}function m(e){if(y(e))return"function"===typeof e?e():u(e);const o=e[i.wA];return(0,l.createVNode)(o,e[i.tj](),null)}function c(...e){let o;return(0,l.createVNode)(r.Z,null,s(o=e.map(m))?o:{default:()=>[o]})}function f(...e){let o;return(0,l.createVNode)(n.Z,null,s(o=e.map(m))?o:{default:()=>[o]})}function d(e){if(y(e)){if("function"===typeof e)return e();if("string"===typeof e)return(0,l.createVNode)(l.Fragment,null,[e]);const o=e;return(0,l.createVNode)(o,null,null)}const o=e[i.wA];return(0,l.createVNode)(o,e[i.tj](),null)}function y(e){return"string"===typeof e||("object"===typeof e?!(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()&&((()=>"render"[Symbol.for("in")]?"render"[Symbol.for("in")](e):"render"in e)()||(()=>"component"[Symbol.for("in")]?"component"[Symbol.for("in")](e):"component"in e)()):"function"===typeof e&&!0===e[a.mM])}function b(e,o){const t=(0,l.ref)(null),n=(0,l.ref)(void 0);function r(e){(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)()&&(t.value=setInterval(a,250)),n.value=e}function i(){t.value&&(clearInterval(t.value),t.value=null)}function a(){o&&o.value?o.value():e&&e.value&&e.value(n.value)}return(0,l.onUnmounted)(i),{start:r,stop:i,handleHolding:a}}function h(e,o="div"){const t=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{t.value=u(v(e),o)})),t}function p(e,o="div"){const t=(0,l.shallowRef)(null);return(0,l.watchEffect)((()=>{const l=v(e);t.value=(()=>void 0!==l&&null!==l&&l[Symbol.for("==")]?l[Symbol.for("==")](null):null==l)()?null:u(l,o)})),t}function g(e){return(0,l.computed)((()=>v(e)))}function v(e){return(0,l.unref)((0,l.unref)(e))}function S(...e){return(()=>void 0!==e.includes(Object)&&null!==e.includes(Object)&&e.includes(Object)[Symbol.for("!")]?e.includes(Object)[Symbol.for("!")]():!e.includes(Object))()&&e.push(Object),e}},5053:function(e,o,t){"use strict";t.d(o,{Z:function(){return a}});var l=t(4865),n=t(9365),r=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)({});o({nodes:t});const r={attributes:!0,childList:!0,subtree:!1};function i(e){const o=t.value[e];(()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()||(o.rect=o.element.getBoundingClientRect())}return(0,l.provide)(n.RegisterNodeInjectionKey,((e,o)=>{const n=new MutationObserver((()=>i(e)));n.observe(o,r),t.value[e]={element:o,observer:n,rect:o.getBoundingClientRect()},(0,l.nextTick)((()=>i(e)))})),(0,l.provide)(n.UnregisterNodeInjectionKey,(e=>{t.value[e]?.observer.disconnect(),t.value[e]=void 0})),(0,l.provide)(n.NodesInjectionKey,t),(e,o)=>(0,l.renderSlot)(e.$slots,"default")}});const i=r;var a=i},6948:function(e,o,t){"use strict";t.d(o,{Z:function(){return h}});var l=t(4865),n=t(5053);const r=["onPointerdown"],i={class:"modal-wrapper"},a={class:"modal-container"},s={class:"modal-header"},u=(0,l.createTextVNode)(" default header "),m={class:"modal-body"},c=(0,l.createTextVNode)(" default body "),f={class:"modal-footer"},d=(0,l.createElementVNode)("div",{class:"modal-default-flex-grow"},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var y=(0,l.defineComponent)({props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:o,emit:t}){const y=e,b=(0,l.toRefs)(y),h=(0,l.computed)((()=>b.modelValue||g.value));function p(){t("update:modelValue",!1)}const g=(0,l.ref)(!1),v=(0,l.ref)(null),S=(0,l.computed)((()=>v.value?.nodes??null));return o({isOpen:h,nodes:S}),(o,t)=>((0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{to:"#modal-root"},[(0,l.createVNode)(l.Transition,{name:"modal",onBeforeEnter:t[0]||(t[0]=e=>g.value=!0),onAfterLeave:t[1]||(t[1]=e=>g.value=!1)},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",(0,l.mergeProps)({class:"modal-mask",onPointerdown:(0,l.withModifiers)(p,["self"])},o.$attrs),[(0,l.createElementVNode)("div",i,[(0,l.createElementVNode)("div",a,[(0,l.createElementVNode)("div",s,[(0,l.renderSlot)(o.$slots,"header",{shown:(0,l.unref)(h)},(()=>[u]))]),(0,l.createElementVNode)("div",m,[(0,l.createVNode)(n.Z,{ref_key:"contextRef",ref:v},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(o.$slots,"body",{shown:(0,l.unref)(h)},(()=>[c]))])),_:3},512)]),(0,l.createElementVNode)("div",f,[(0,l.renderSlot)(o.$slots,"footer",{shown:(0,l.unref)(h)},(()=>[(0,l.createElementVNode)("div",{class:"modal-default-footer"},[d,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:p}," Close ")])]))])])])],16,r),[[l.vShow,e.modelValue]])])),_:3})]))}});const b=y;var h=b},3525:function(e,o,t){"use strict";t.d(o,{Z:function(){return m}});var l=t(4865),n=t(1604),r=t(9179);const i={class:"field"},a={key:0,class:"field-title"};var s=(0,l.defineComponent)({props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,s=(0,n.KO)((0,l.toRef)(t,"title"),"span"),u=(0,l.ref)(t.options.find((e=>e.value===t.modelValue)));function m(e){o("update:modelValue",e.value)}return(0,l.watch)((0,l.toRef)(t,"modelValue"),(e=>{(()=>void 0!==u.value?.value&&null!==u.value?.value&&u.value?.value[Symbol.for("!==")]?u.value?.value[Symbol.for("!==")](e):u.value?.value!==e)()&&(u.value=t.options.find((o=>o.value===e)))})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.unref)(s)?((0,l.openBlock)(),(0,l.createElementBlock)("span",a,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(s))))])):(0,l.createCommentVNode)("",!0),(0,l.createVNode)((0,l.unref)(r.Z),{options:e.options,modelValue:u.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>u.value=e),m],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const u=s;var m=u},4520:function(e,o,t){"use strict";t.d(o,{Z:function(){return d}});var l=t(4865),n=t(1604),r=t(7197);const i=["onSubmit"],a={class:"field"},s={key:0,class:"field-title"},u=["placeholder"];var m=(0,l.defineComponent)({props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(e,{emit:o}){const t=e,m=(0,l.toRefs)(t),c=(0,l.computed)((()=>m.title?.value&&(0,n.MM)((0,l.unref)(m.title.value),"span"))),f=(0,l.ref)(null);(0,l.onMounted)((()=>{f.value?.focus()}));const d=(0,l.computed)({get(){return(0,l.unref)(m.modelValue)||""},set(e){o("update:modelValue",e)}});function y(){o("submit")}return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("form",{onSubmit:(0,l.withModifiers)(y,["prevent"])},[(0,l.createElementVNode)("div",a,[(0,l.unref)(c)?((0,l.openBlock)(),(0,l.createElementBlock)("span",s,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(c))))])):(0,l.createCommentVNode)("",!0),e.textArea?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(r.Z),{key:1,modelValue:(0,l.unref)(d),"onUpdate:modelValue":t[0]||(t[0]=e=>(0,l.isRef)(d)?d.value=e:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:y,ref_key:"field",ref:f},null,8,["modelValue","placeholder","maxHeight"])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:2,type:"text","onUpdate:modelValue":t[1]||(t[1]=e=>(0,l.isRef)(d)?d.value=e:null),placeholder:e.placeholder,class:(0,l.normalizeClass)({fullWidth:(()=>void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title)()}),onBlur:y,ref_key:"field",ref:f},null,42,u)),[[l.vModelText,(0,l.unref)(d)]])])],40,i))}}),c=t(3744);const f=(0,c.Z)(m,[["__scopeId","data-v-8bda704a"]]);var d=f},9868:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865),n=t(1604);const r={class:"field"};var i=(0,l.defineComponent)({props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,i=(0,l.computed)((()=>(0,n.MM)((0,l.unref)(t.title)||"<span></span>","span"))),a=(0,l.computed)({get(){return(()=>void 0!==!t.modelValue&&null!==!t.modelValue&&(!t.modelValue)[Symbol.for("!")]?(!t.modelValue)[Symbol.for("!")]():!!t.modelValue)()},set(e){o("update:modelValue",e)}});return(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("label",r,[(0,l.withDirectives)((0,l.createElementVNode)("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=e=>(0,l.isRef)(a)?a.value=e:null)},null,512),[[l.vModelCheckbox,(0,l.unref)(a)]]),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(i))))]))}}),a=t(3744);const s=(0,a.Z)(i,[["__scopeId","data-v-43cf95d0"]]);var u=s},9905:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865),n=t(1037),r=t(9266);const i={class:"table"};var a=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>n.Z[r.ZP.theme].mergeAdjacent));return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["col",{mergeAdjacent:(0,l.unref)(o)}])},[(0,l.renderSlot)(e.$slots,"default")],2)]))}});const s=a;var u=s},274:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865),n=t(1037),r=t(9266);const i={class:"table"};var a=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>n.Z[r.ZP.theme].mergeAdjacent));return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["row",{mergeAdjacent:(0,l.unref)(o)}])},[(0,l.renderSlot)(e.$slots,"default")],2)]))}});const s=a;var u=s},264:function(e,o,t){"use strict";t.d(o,{Z:function(){return y}});var l=t(4865);const n={key:0,class:"material-icons pinned"};function r(e,o,t,r,i,a){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:o[0]||(o[0]=o=>e.isHovered=!0),onMouseleave:o[1]||(o[1]=o=>e.isHovered=!1),onClickCapture:o[2]||(o[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[(0,l.renderSlot)(e.$slots,"default",{},void 0,!0),e.elementComp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.elementComp),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[e.isShown?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tooltip",{top:e.unref(e.direction)===e.TooltipDirection.UP,left:e.unref(e.direction)===e.TooltipDirection.LEFT,right:e.unref(e.direction)===e.TooltipDirection.RIGHT,bottom:e.unref(e.direction)===e.TooltipDirection.DOWN,...e.unref(e.classes)}]),style:(0,l.normalizeStyle)([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},e.unref(e.style)??{}])},[e.showPin?((0,l.openBlock)(),(0,l.createElementBlock)("span",n,"push_pin")):(0,l.createCommentVNode)("",!0),e.comp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.comp),{key:1})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)])),_:1})],34)}var i=t(1037),a=t(6113),s=t(9266),u=t(1604),m=t(4096),c=(0,l.defineComponent)({props:{element:(0,u.P5)(Object),display:{type:(0,u.P5)(Object,String,Function),required:!0},style:(0,u.P5)(Object,String,Array),classes:(0,u.P5)(Object),direction:(0,u.P5)(Number),xoffset:(0,u.P5)(String),yoffset:(0,u.P5)(String),pinned:Object},setup(e){const{element:o,display:t,pinned:n}=(0,l.toRefs)(e),r=(0,l.ref)(!1),c=(0,l.computed)((()=>((0,u.Uv)(n)||r.value)&&f.value)),f=(0,u.KO)(t),d=(0,l.shallowRef)(null);function y(e){const o=n;e.shiftKey&&o&&(o.value=(()=>void 0!==o.value&&null!==o.value&&o.value[Symbol.for("!")]?o.value[Symbol.for("!")]():!o.value)(),e.stopPropagation(),e.preventDefault())}(0,l.watchEffect)((()=>{const e=(0,u.Uv)(o);d.value=(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()?null:(0,u.MM)((0,a.tZ)((()=>(0,u.sY)(e))))}));const b=(0,l.computed)((()=>(0,u.Uv)(n)&&i.Z[s.ZP.theme].showPin));return{TooltipDirection:m.A,isHovered:r,isShown:c,comp:f,elementComp:d,unref:l.unref,togglePinned:y,showPin:b}}}),f=t(3744);const d=(0,f.Z)(c,[["render",r],["__scopeId","data-v-adb5f26e"]]);var y=d},7634:function(e){function o(e){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}o.keys=function(){return[]},o.resolve=o,o.id=7634,e.exports=o},6453:function(e){"use strict";e.exports=JSON.parse('{"title":"Profectus","id":"profectus-demo","author":"thepaperpilot","discordName":"The Paper Pilot Community","discordLink":"https://discord.gg/WzejVAx","versionNumber":"0.0","versionTitle":"Initial Commit","allowGoBack":true,"defaultShowSmall":false,"defaultDecimalsShown":2,"useHeader":true,"banner":null,"logo":"Logo.png","initialTabs":["main","c"],"maxTickLength":3600,"offlineLimit":1,"enablePausing":true}')}},o={};function t(l){var n=o[l];if(void 0!==n)return n.exports;var r=o[l]={id:l,loaded:!1,exports:{}};return e[l].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}t.m=e,function(){var e=[];t.O=function(o,l,n,r){if(!l){var i=1/0;for(m=0;m<e.length;m++){l=e[m][0],n=e[m][1],r=e[m][2];for(var a=!0,s=0;s<l.length;s++)(!1&r||i>=r)&&Object.keys(t.O).every((function(e){return t.O[e](l[s])}))?l.splice(s--,1):(a=!1,r<i&&(i=r));if(a){e.splice(m--,1);var u=n();void 0!==u&&(o=u)}}return o}r=r||0;for(var m=e.length;m>0&&e[m-1][2]>r;m--)e[m]=e[m-1];e[m]=[l,n,r]}}(),function(){t.n=function(e){var o=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(o,{a:o}),o}}(),function(){t.d=function(e,o){for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})}}(),function(){t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)}}(),function(){t.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){t.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};t.O.j=function(o){return 0===e[o]};var o=function(o,l){var n,r,i=l[0],a=l[1],s=l[2],u=0;if(i.some((function(o){return 0!==e[o]}))){for(n in a)t.o(a,n)&&(t.m[n]=a[n]);if(s)var m=s(t)}for(o&&o(l);u<i.length;u++)r=i[u],t.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return t.O(m)},l=self["webpackChunkprofectus"]=self["webpackChunkprofectus"]||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))}();var l=t.O(void 0,[998],(function(){return t(6098)}));l=t.O(l)})(); +//# sourceMappingURL=app.a22461db.js.map \ No newline at end of file diff --git a/js/app.a22461db.js.map b/js/app.a22461db.js.map new file mode 100644 index 0000000..93f84dd --- /dev/null +++ b/js/app.a22461db.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js/app.a22461db.js","mappings":"qFAiCA,MAAMA,EAAsB,CACxBC,UA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S2B,MAAK,SAASpwC,GAAM,OAA+B,IAAxB6vC,EAAgB7vC,MAAe,CACrE,IAAImuC,KAAY+B,EACZhC,EAAoBmB,EAAEa,EAAa/B,KACrCD,EAAoBlxB,EAAEmxB,GAAY+B,EAAY/B,IAGhD,GAAGgC,EAAS,IAAIxtB,EAASwtB,EAAQjC,GAGlC,IADG8B,GAA4BA,EAA2BC,GACrDx2B,EAAIg1B,EAASj5B,OAAQiE,IACzBq2B,EAAUrB,EAASh1B,GAChBy0B,EAAoBmB,EAAEQ,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO5B,EAAoBM,EAAE7rB,IAG1B0tB,EAAqBC,KAAK,yBAA2BA,KAAK,0BAA4B,GAC1FD,EAAmB9uC,QAAQwuC,EAAqB1tC,KAAK,KAAM,IAC3DguC,EAAmB7uC,KAAOuuC,EAAqB1tC,KAAK,KAAMguC,EAAmB7uC,KAAKa,KAAKguC,I,GC/CvF,IAAIE,EAAsBrC,EAAoBM,OAAEztC,EAAW,CAAC,MAAM,WAAa,OAAOmtC,EAAoB,SAC1GqC,EAAsBrC,EAAoBM,EAAE+B,I","sources":["webpack://profectus/./src/data/themes.ts","webpack://profectus/./src/features/feature.ts","webpack://profectus/./src/features/tooltips/tooltip.ts","webpack://profectus/./src/game/events.ts","webpack://profectus/./src/game/persistence.ts","webpack://profectus/./src/game/player.ts","webpack://profectus/./src/game/settings.ts","webpack://profectus/./src/game/state.ts","webpack://profectus/./src/components/Layer.vue?55f8","webpack://profectus/./src/components/Layer.vue?ea1e","webpack://profectus/./src/components/Layer.vue","webpack://profectus/./src/data/Changelog.vue?6b26","webpack://profectus/./src/data/Changelog.vue","webpack://profectus/./src/components/Info.vue?962a","webpack://profectus/./src/components/Info.vue","webpack://profectus/./src/components/Options.vue?ba84","webpack://profectus/./src/components/Options.vue","webpack://profectus/./src/components/fields/DangerButton.vue?bf6c","webpack://profectus/./src/components/fields/DangerButton.vue","webpack://profectus/./src/components/fields/FeedbackButton.vue?2dba","webpack://profectus/./src/components/fields/FeedbackButton.vue","webpack://profectus/./src/components/Save.vue?548a","webpack://profectus/./src/components/Save.vue","webpack://profectus/./src/components/SavesManager.vue?f8a3","webpack://profectus/./src/components/SavesManager.vue","webpack://profectus/./src/components/Nav.vue?b4a5","webpack://profectus/./src/components/Nav.vue","webpack://profectus/./src/components/Game.vue?fa24","webpack://profectus/./src/components/Game.vue","webpack://profectus/./src/components/GameOverScreen.vue?ee8d","webpack://profectus/./src/components/GameOverScreen.vue","webpack://profectus/./src/components/NaNScreen.vue?4f64","webpack://profectus/./src/components/NaNScreen.vue","webpack://profectus/./src/components/TPS.vue?e36e","webpack://profectus/./src/components/TPS.vue","webpack://profectus/./src/App.vue?94f9","webpack://profectus/./src/App.vue","webpack://profectus/./src/main.ts","webpack://profectus/./src/lib/break_eternity.ts","webpack://profectus/./src/util/break_eternity.ts","webpack://profectus/./src/util/bignum.ts","webpack://profectus/./src/util/common.ts","webpack://profectus/./src/util/computed.ts","webpack://profectus/./src/util/proxies.ts","webpack://profectus/./src/util/save.ts","webpack://profectus/./src/components/Profectus.vue","webpack://profectus/./src/components/Profectus.vue?94a9","webpack://profectus/./src/components/layout/Spacer.vue?e0bd","webpack://profectus/./src/components/layout/Spacer.vue","webpack://profectus/./src/features/resources/resource.ts","webpack://profectus/./src/features/trees/Tree.vue?d078","webpack://profectus/./src/features/links/Link.vue?f30b","webpack://profectus/./src/features/links/Link.vue","webpack://profectus/./src/features/links/Links.vue?7529","webpack://profectus/./src/features/links/Links.vue","webpack://profectus/./src/features/trees/Tree.vue?698b","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/TreeNode.vue?a4eb","webpack://profectus/./src/components/Node.vue?6bf5","webpack://profectus/./src/components/Node.vue","webpack://profectus/./src/components/MarkNode.vue?acb3","webpack://profectus/./src/components/MarkNode.vue","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?3070","webpack://profectus/./src/features/achievements/Achievement.vue?dcde","webpack://profectus/./src/features/achievements/Achievement.vue","webpack://profectus/./src/game/notifications.ts","webpack://profectus/./src/features/achievements/achievement.tsx","webpack://profectus/./src/features/grids/Grid.vue?6522","webpack://profectus/./src/features/grids/GridCell.vue?534f","webpack://profectus/./src/features/grids/GridCell.vue?58b8","webpack://profectus/./src/features/grids/GridCell.vue","webpack://profectus/./src/features/grids/Grid.vue?3299","webpack://profectus/./src/features/grids/Grid.vue","webpack://profectus/./src/features/grids/grid.ts","webpack://profectus/./src/features/clickables/Clickable.vue?3312","webpack://profectus/./src/features/clickables/Clickable.vue?22aa","webpack://profectus/./src/features/clickables/Clickable.vue","webpack://profectus/./src/features/clickables/clickable.ts","webpack://profectus/./src/data/common.tsx","webpack://profectus/./src/features/conversion.ts","webpack://profectus/./src/features/infoboxes/Infobox.vue?b869","webpack://profectus/./src/features/infoboxes/Infobox.vue?c704","webpack://profectus/./src/features/infoboxes/Infobox.vue","webpack://profectus/./src/features/infoboxes/infobox.ts","webpack://profectus/./src/features/particles/Particles.vue?8e41","webpack://profectus/./src/features/particles/Particles.vue?11ca","webpack://profectus/./src/features/particles/Particles.vue","webpack://profectus/./src/features/particles/particles.tsx","webpack://profectus/./src/features/reset.ts","webpack://profectus/./src/features/resources/Resource.vue?0822","webpack://profectus/./src/features/resources/Resource.vue","webpack://profectus/./src/features/resources/MainDisplay.vue?8bde","webpack://profectus/./src/features/resources/MainDisplay.vue","webpack://profectus/./src/game/modifiers.tsx","webpack://profectus/./src/components/fields/Slider.vue?f27e","webpack://profectus/./src/components/fields/Slider.vue","webpack://profectus/./src/components/layout/Sticky.vue?32f6","webpack://profectus/./src/components/layout/Sticky.vue","webpack://profectus/./src/components/layout/VerticalRule.vue?aaf3","webpack://profectus/./src/components/layout/VerticalRule.vue","webpack://profectus/./src/features/bars/Bar.vue?b455","webpack://profectus/./src/features/bars/Bar.vue?da91","webpack://profectus/./src/features/bars/Bar.vue","webpack://profectus/./src/features/bars/bar.ts","webpack://profectus/./src/features/buyable.tsx","webpack://profectus/./src/features/challenges/Challenge.vue?43ae","webpack://profectus/./src/features/challenges/Challenge.vue?5ee1","webpack://profectus/./src/features/challenges/Challenge.vue","webpack://profectus/./src/features/challenges/challenge.tsx","webpack://profectus/./src/features/hotkey.tsx","webpack://profectus/./src/features/links/links.ts","webpack://profectus/./src/features/milestones/Milestone.vue?08ca","webpack://profectus/./src/features/milestones/Milestone.vue?d607","webpack://profectus/./src/features/milestones/Milestone.vue","webpack://profectus/./src/features/milestones/milestone.tsx","webpack://profectus/./src/features/tabs/Tab.vue?50ee","webpack://profectus/./src/features/tabs/Tab.vue","webpack://profectus/./src/features/tabs/tab.ts","webpack://profectus/./src/features/tabs/TabButton.vue?4c84","webpack://profectus/./src/features/tabs/TabButton.vue?a3c5","webpack://profectus/./src/features/tabs/TabButton.vue","webpack://profectus/./src/features/tabs/TabFamily.vue?e12a","webpack://profectus/./src/features/tabs/TabFamily.vue?2385","webpack://profectus/./src/features/tabs/TabFamily.vue","webpack://profectus/./src/features/tabs/tabFamily.ts","webpack://profectus/./src/features/upgrades/Upgrade.vue?4075","webpack://profectus/./src/features/upgrades/Upgrade.vue?4a14","webpack://profectus/./src/features/upgrades/Upgrade.vue","webpack://profectus/./src/features/upgrades/upgrade.ts","webpack://profectus/./src/data/layers/aca/c.tsx","webpack://profectus/./src/data/layers/aca/f.tsx","webpack://profectus/./src/data/layers/aca/a.tsx","webpack://profectus/./src/data/projEntry.tsx","webpack://profectus/./src/game/layers.tsx","webpack://profectus/./src/util/vue.tsx","webpack://profectus/./src/components/Context.vue?2f6e","webpack://profectus/./src/components/Context.vue","webpack://profectus/./src/components/Modal.vue?1099","webpack://profectus/./src/components/Modal.vue","webpack://profectus/./src/components/fields/Select.vue?c5ab","webpack://profectus/./src/components/fields/Select.vue","webpack://profectus/./src/components/fields/Text.vue?ba89","webpack://profectus/./src/components/fields/Text.vue","webpack://profectus/./src/components/fields/Toggle.vue?20df","webpack://profectus/./src/components/fields/Toggle.vue","webpack://profectus/./src/components/layout/Column.vue?cbbe","webpack://profectus/./src/components/layout/Column.vue","webpack://profectus/./src/components/layout/Row.vue?506d","webpack://profectus/./src/components/layout/Row.vue","webpack://profectus/./src/features/tooltips/Tooltip.vue?8920","webpack://profectus/./src/features/tooltips/Tooltip.vue?9cc7","webpack://profectus/./src/features/tooltips/Tooltip.vue","webpack://profectus/|/\\.txt$/","webpack://profectus/webpack/bootstrap","webpack://profectus/webpack/runtime/chunk loaded","webpack://profectus/webpack/runtime/compat get default export","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/node module decorator","webpack://profectus/webpack/runtime/jsonp chunk loading","webpack://profectus/webpack/startup"],"sourcesContent":["export interface ThemeVars {\n \"--foreground\": string;\n \"--background\": string;\n \"--feature-foreground\": string;\n \"--tooltip-background\": string;\n \"--raised-background\": string;\n \"--points\": string;\n \"--locked\": string;\n \"--highlighted\": string;\n \"--bought\": string;\n \"--danger\": string;\n \"--link\": string;\n \"--outline\": string;\n \"--accent1\": string;\n \"--accent2\": string;\n \"--accent3\": string;\n \"--border-radius\": string;\n \"--modal-border\": string;\n \"--feature-margin\": string;\n}\n\nexport interface Theme {\n variables: ThemeVars;\n floatingTabs: boolean;\n mergeAdjacent: boolean;\n showPin: boolean;\n}\n\ndeclare module \"@vue/runtime-dom\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface CSSProperties extends Partial<ThemeVars> {}\n}\n\nconst defaultTheme: Theme = {\n variables: {\n \"--foreground\": \"#dfdfdf\",\n \"--background\": \"#0f0f0f\",\n \"--feature-foreground\": \"#eee\",\n \"--tooltip-background\": \"rgba(0, 0, 0, 0.75)\",\n \"--raised-background\": \"#0f0f0f\",\n \"--points\": \"#ffffff\",\n \"--locked\": \"#bf8f8f\",\n \"--highlighted\": \"#333\",\n \"--bought\": \"#77bf5f\",\n \"--danger\": \"rgb(220, 53, 69)\",\n \"--link\": \"#02f2f2\",\n \"--outline\": \"#dfdfdf\",\n \"--accent1\": \"#627a82\",\n \"--accent2\": \"#658262\",\n \"--accent3\": \"#7c6282\",\n\n \"--border-radius\": \"15px\",\n \"--modal-border\": \"solid 2px var(--color)\",\n \"--feature-margin\": \"0px\"\n },\n floatingTabs: true,\n mergeAdjacent: true,\n showPin: true\n};\n\nexport enum Themes {\n Classic = \"classic\",\n Paper = \"paper\",\n Nordic = \"nordic\",\n Aqua = \"aqua\"\n}\n\nexport default {\n classic: defaultTheme,\n paper: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--background\": \"#2a323d\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#333c4a\",\n \"--locked\": \"#3a3e45\",\n \"--bought\": \"#5C8A58\",\n \"--outline\": \"#333c4a\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n // Based on https://www.nordtheme.com\n nordic: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#D8DEE9\",\n \"--background\": \"#2E3440\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#3B4252\",\n \"--points\": \"#E5E9F0\",\n \"--locked\": \"#4c566a\",\n \"--highlighted\": \"#434c5e\",\n \"--bought\": \"#8FBCBB\",\n \"--danger\": \"#D08770\",\n \"--link\": \"#88C0D0\",\n \"--outline\": \"#3B4252\",\n \"--accent1\": \"#B48EAD\",\n \"--accent2\": \"#A3BE8C\",\n \"--accent3\": \"#EBCB8B\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"solid 2px #3B4252\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n aqua: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#bfdfff\",\n \"--background\": \"#001f3f\",\n \"--tooltip-background\": \"rgba(0, 15, 31, 0.75)\",\n \"--raised-background\": \"#001f3f\",\n \"--points\": \"#dfefff\",\n \"--locked\": \"#c4a7b3\",\n \"--outline\": \"#bfdfff\"\n }\n } as Theme\n} as Record<Themes, Theme>;\n","import { DefaultValue } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { DoNotCache, ProcessedComputable } from \"util/computed\";\nimport { CSSProperties, DefineComponent, isRef } from \"vue\";\n\nexport const Component = Symbol(\"Component\");\nexport const GatherProps = Symbol(\"GatherProps\");\n\nexport type JSXFunction = (() => JSX.Element) & { [DoNotCache]: true };\nexport type CoercableComponent = string | DefineComponent | JSXFunction;\nexport type StyleValue = string | CSSProperties | Array<string | CSSProperties>;\n\n// TODO if importing .vue components in .tsx can become type safe,\n// this type can probably be safely removed\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type GenericComponent = DefineComponent<any, any, any>;\n\nexport type FeatureComponent<T> = Omit<\n {\n [K in keyof T]: T[K] extends ProcessedComputable<infer S> ? S : T[K];\n },\n typeof Component | typeof DefaultValue\n>;\n\nexport type Replace<T, S> = S & Omit<T, keyof S>;\n\nexport type OptionsFunc<T, S = T, R = Record<string, unknown>> = () => T & ThisType<S> & Partial<R>;\n\nlet id = 0;\n// Get a unique ID to allow a feature to be found for creating branches\n// and any other uses requiring unique identifiers for each feature\n// IDs are gauranteed unique, but should not be saved as they are not\n// guaranteed to be persistent through updates and such\nexport function getUniqueID(prefix = \"feature-\"): string {\n return prefix + id++;\n}\n\nexport enum Visibility {\n Visible,\n Hidden,\n None\n}\n\nexport function jsx(func: () => JSX.Element | \"\"): JSXFunction {\n (func as Partial<JSXFunction>)[DoNotCache] = true;\n return func as JSXFunction;\n}\n\nexport function showIf(condition: boolean, otherwise = Visibility.None): Visibility {\n return condition ? Visibility.Visible : otherwise;\n}\n\nexport function setDefault<T, K extends keyof T>(\n object: T,\n key: K,\n value: T[K]\n): asserts object is Exclude<T, K> & Required<Pick<T, K>> {\n if (object[key] === undefined && value != undefined) {\n object[key] = value;\n }\n}\n\nexport function findFeatures(obj: Record<string, unknown>, type: symbol): unknown[] {\n const objects: unknown[] = [];\n const handleObject = (obj: Record<string, unknown>) => {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if ((value as Record<string, unknown>).type === type) {\n objects.push(value);\n } else if (!(value instanceof Decimal) && !isRef(value)) {\n handleObject(value as Record<string, unknown>);\n }\n }\n });\n };\n handleObject(obj);\n return objects;\n}\n","import TooltipComponent from \"./Tooltip.vue\";\nimport {\n CoercableComponent,\n Component,\n GatherProps,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { VueFeature } from \"util/vue\";\nimport { Ref } from \"vue\";\nimport { persistent } from \"game/persistence\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport enum TooltipDirection {\n UP,\n LEFT,\n RIGHT,\n DOWN\n}\n\nexport interface TooltipOptions {\n pinnable?: boolean;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n direction?: Computable<TooltipDirection>;\n xoffset?: Computable<string>;\n yoffset?: Computable<string>;\n}\n\nexport interface BaseTooltip {\n pinned?: Ref<boolean>;\n}\n\nexport type Tooltip<T extends TooltipOptions> = Replace<\n T & BaseTooltip,\n {\n pinnable: T[\"pinnable\"] extends undefined ? false : T[\"pinnable\"];\n pinned: T[\"pinnable\"] extends true ? Ref<boolean> : undefined;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n direction: GetComputableTypeWithDefault<T[\"direction\"], TooltipDirection.UP>;\n xoffset: GetComputableType<T[\"xoffset\"]>;\n yoffset: GetComputableType<T[\"yoffset\"]>;\n }\n>;\n\nexport type GenericTooltip = Replace<\n Tooltip<TooltipOptions>,\n {\n pinnable: boolean;\n pinned: Ref<boolean> | undefined;\n direction: ProcessedComputable<TooltipDirection>;\n }\n>;\n\nexport function addTooltip<T extends TooltipOptions>(\n element: VueFeature,\n options: T & ThisType<Tooltip<T>> & Partial<BaseTooltip>\n): Tooltip<T> {\n if (options.pinnable) {\n if (\"pinned\" in element) {\n console.error(\n \"Cannot add pinnable tooltip to element that already has a property called 'pinned'\"\n );\n options.pinnable = false;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element as any).pinned = options.pinned = persistent<boolean>(false);\n }\n }\n\n processComputable(options as T, \"display\");\n processComputable(options as T, \"classes\");\n processComputable(options as T, \"style\");\n processComputable(options as T, \"direction\");\n setDefault(options, \"direction\", TooltipDirection.UP);\n processComputable(options as T, \"xoffset\");\n processComputable(options as T, \"yoffset\");\n\n const elementComponent = element[Component];\n element[Component] = TooltipComponent;\n const elementGratherProps = element[GatherProps].bind(element);\n element[GatherProps] = function gatherTooltipProps(this: GenericTooltip) {\n const { display, classes, style, direction, xoffset, yoffset, pinned } = this;\n return {\n element: {\n [Component]: elementComponent,\n [GatherProps]: elementGratherProps\n },\n display,\n classes,\n style,\n direction,\n xoffset,\n yoffset,\n pinned\n };\n }.bind(options as GenericTooltip);\n\n return options as unknown as Tooltip<T>;\n}\n","import projInfo from \"data/projInfo.json\";\nimport Decimal from \"util/bignum\";\nimport { createNanoEvents } from \"nanoevents\";\nimport { App, Ref, watch } from \"vue\";\nimport { GenericLayer } from \"./layers\";\nimport player from \"./player\";\nimport settings, { Settings } from \"./settings\";\nimport state from \"./state\";\n\nexport interface GlobalEvents {\n addLayer: (layer: GenericLayer, saveData: Record<string, unknown>) => void;\n removeLayer: (layer: GenericLayer) => void;\n update: (diff: number, trueDiff: number) => void;\n loadSettings: (settings: Partial<Settings>) => void;\n gameWon: VoidFunction;\n setupVue: (vue: App) => void;\n}\n\nexport const globalBus = createNanoEvents<GlobalEvents>();\n\nlet intervalID: number | null = null;\n\n// Not imported immediately due to dependency cycles\n// This gets set during startGameLoop(), and will only be used in the update function\nlet hasWon: null | Ref<boolean> = null;\n\nfunction update() {\n const now = Date.now();\n let diff = (now - player.time) / 1e3;\n player.time = now;\n const trueDiff = diff;\n\n state.lastTenTicks.push(trueDiff);\n if (state.lastTenTicks.length > 10) {\n state.lastTenTicks = state.lastTenTicks.slice(1);\n }\n\n // Stop here if the game is paused on the win screen\n if (hasWon?.value && !player.keepGoing) {\n return;\n }\n // Stop here if the player had a NaN value\n if (state.hasNaN) {\n return;\n }\n\n diff = Math.max(diff, 0);\n\n if (player.devSpeed === 0) {\n return;\n }\n\n // Add offline time if any\n if (player.offlineTime != undefined) {\n if (Decimal.gt(player.offlineTime, projInfo.offlineLimit * 3600)) {\n player.offlineTime = projInfo.offlineLimit * 3600;\n }\n if (Decimal.gt(player.offlineTime, 0) && player.devSpeed !== 0) {\n const offlineDiff = Math.max(player.offlineTime / 10, diff);\n player.offlineTime = player.offlineTime - offlineDiff;\n diff += offlineDiff;\n } else if (player.devSpeed === 0) {\n player.offlineTime += diff;\n }\n if (!player.offlineProd || Decimal.lt(player.offlineTime, 0)) {\n player.offlineTime = null;\n }\n }\n\n // Cap at max tick length\n diff = Math.min(diff, projInfo.maxTickLength);\n\n // Apply dev speed\n if (player.devSpeed != undefined) {\n diff *= player.devSpeed;\n }\n\n if (!Number.isFinite(diff)) {\n diff = 1e308;\n }\n\n // Update\n if (Decimal.eq(diff, 0)) {\n return;\n }\n\n player.timePlayed += diff;\n if (!Number.isFinite(player.timePlayed)) {\n player.timePlayed = 1e308;\n }\n globalBus.emit(\"update\", diff, trueDiff);\n\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n if (intervalID != null) {\n clearInterval(intervalID);\n intervalID = null;\n }\n } else if (intervalID == null) {\n intervalID = setInterval(update, 50);\n }\n}\n\nexport async function startGameLoop() {\n hasWon = (await import(\"data/projEntry\")).hasWon;\n watch(hasWon, hasWon => {\n if (hasWon) {\n globalBus.emit(\"gameWon\");\n }\n });\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n } else {\n intervalID = setInterval(update, 50);\n }\n}\n","import { globalBus } from \"game/events\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { ProxyState } from \"util/proxies\";\nimport { isArray } from \"@vue/shared\";\nimport { isReactive, isRef, Ref, ref } from \"vue\";\nimport { addingLayers, GenericLayer, persistentRefs } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\nexport const StackTrace = Symbol(\"StackTrace\");\nexport const Deleted = Symbol(\"Deleted\");\n\n// Note: This is a union of things that should be safely stringifiable without needing\n// special processes for knowing what to load them in as\n// - Decimals aren't allowed because we'd need to know to parse them back.\n// - DecimalSources are allowed because the string is a valid value for them\nexport type State =\n | string\n | number\n | boolean\n | DecimalSource\n | { [key: string]: State }\n | { [key: number]: State };\n\nexport type Persistent<T extends State = State> = Ref<T> & {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n [StackTrace]: string;\n [Deleted]: boolean;\n};\n\nfunction getStackTrace() {\n return (\n new Error().stack\n ?.split(\"\\n\")\n .slice(3, 5)\n .map(line => line.trim())\n .join(\"\\n\") || \"\"\n );\n}\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): Persistent<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as Persistent<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n persistent[StackTrace] = getStackTrace();\n persistent[Deleted] = false;\n\n if (addingLayers.length === 0) {\n console.warn(\n \"Creating a persistent ref outside of a layer. This is not officially supported\",\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].add(persistent);\n }\n\n return persistent as Persistent<T>;\n}\n\nexport function deletePersistent(persistent: Persistent) {\n if (addingLayers.length === 0) {\n console.warn(\"Deleting a persistent ref outside of a layer. Ignoring...\", persistent);\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].delete(persistent);\n }\n persistent[Deleted] = true;\n}\n\nglobalBus.on(\"addLayer\", (layer: GenericLayer, saveData: Record<string, unknown>) => {\n const features: { type: typeof Symbol }[] = [];\n const handleObject = (obj: Record<string, unknown>, path: string[] = []): boolean => {\n let foundPersistent = false;\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if (PersistentState in value) {\n foundPersistent = true;\n if ((value as Persistent)[Deleted]) {\n console.warn(\n \"Deleted persistent ref present in returned object. Ignoring...\",\n value,\n \"\\nCreated at:\\n\" + (value as Persistent)[StackTrace]\n );\n return;\n }\n persistentRefs[layer.id].delete(\n ProxyState in value\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((value as any)[ProxyState] as Persistent)\n : (value as Persistent)\n );\n\n // Construct save path if it doesn't exist\n const persistentState = path.reduce<Record<string, unknown>>((acc, curr) => {\n if (!(curr in acc)) {\n acc[curr] = {};\n }\n return acc[curr] as Record<string, unknown>;\n }, saveData);\n\n // Cache currently saved value\n const savedValue = persistentState[key];\n // Add ref to save data\n persistentState[key] = (value as Persistent)[PersistentState];\n // Load previously saved value\n if (isReactive(persistentState)) {\n if (savedValue != null) {\n persistentState[key] = savedValue;\n } else {\n persistentState[key] = (value as Persistent)[DefaultValue];\n }\n } else {\n if (savedValue != null) {\n (persistentState[key] as Ref<unknown>).value = savedValue;\n } else {\n (persistentState[key] as Ref<unknown>).value = (value as Persistent)[\n DefaultValue\n ];\n }\n }\n } else if (\n !(value instanceof Decimal) &&\n !isRef(value) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !features.includes(value as { type: typeof Symbol })\n ) {\n if (typeof (value as { type: typeof Symbol }).type === \"symbol\") {\n features.push(value as { type: typeof Symbol });\n }\n\n // Continue traversing\n const foundPersistentInChild = handleObject(value as Record<string, unknown>, [\n ...path,\n key\n ]);\n\n // Show warning for persistent values inside arrays\n // TODO handle arrays better\n if (foundPersistentInChild) {\n if (isArray(value) && !isArray(obj)) {\n console.warn(\n \"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.\",\n ProxyState in obj\n ? (obj as Record<PropertyKey, unknown>)[ProxyState]\n : obj,\n key\n );\n } else {\n foundPersistent = true;\n }\n }\n }\n }\n });\n return foundPersistent;\n };\n handleObject(layer);\n persistentRefs[layer.id].forEach(persistent => {\n console.error(\n `Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n });\n persistentRefs[layer.id].clear();\n});\n","import Decimal from \"util/bignum\";\nimport { isPlainObject } from \"util/common\";\nimport { ProxiedWithState, ProxyPath, ProxyState } from \"util/proxies\";\nimport { reactive, unref } from \"vue\";\nimport transientState from \"./state\";\n\nexport interface PlayerData {\n id: string;\n devSpeed: number | null;\n name: string;\n tabs: Array<string>;\n time: number;\n autosave: boolean;\n offlineProd: boolean;\n offlineTime: number | null;\n timePlayed: number;\n keepGoing: boolean;\n modID: string;\n modVersion: string;\n layers: Record<string, Record<string, unknown>>;\n}\n\nexport type Player = ProxiedWithState<PlayerData>;\n\nconst state = reactive<PlayerData>({\n id: \"\",\n devSpeed: null,\n name: \"\",\n tabs: [],\n time: -1,\n autosave: true,\n offlineProd: true,\n offlineTime: null,\n timePlayed: 0,\n keepGoing: false,\n modID: \"\",\n modVersion: \"\",\n layers: {}\n});\n\nexport function stringifySave(player: PlayerData): string {\n return JSON.stringify(player, (key, value) => unref(value));\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst playerHandler: ProxyHandler<Record<PropertyKey, any>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Record<PropertyKey, any>, key: PropertyKey): any {\n if (key === ProxyState || key === ProxyPath) {\n return target[key];\n }\n\n const value = target[ProxyState][key];\n if (key !== \"value\" && isPlainObject(value) && !(value instanceof Decimal)) {\n if (value !== target[key]?.[ProxyState]) {\n const path = [...target[ProxyPath], key];\n target[key] = new Proxy({ [ProxyState]: value, [ProxyPath]: path }, playerHandler);\n }\n return target[key];\n }\n\n return value;\n },\n set(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target: Record<PropertyKey, any>,\n property: PropertyKey,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any,\n receiver: ProxyConstructor\n ): boolean {\n if (\n !transientState.hasNaN &&\n ((typeof value === \"number\" && isNaN(value)) ||\n (value instanceof Decimal &&\n (isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag))))\n ) {\n const currentValue = target[ProxyState][property];\n if (\n !(\n (typeof currentValue === \"number\" && isNaN(currentValue)) ||\n (currentValue instanceof Decimal &&\n (isNaN(currentValue.sign) ||\n isNaN(currentValue.layer) ||\n isNaN(currentValue.mag)))\n )\n ) {\n state.autosave = false;\n transientState.hasNaN = true;\n transientState.NaNPath = [...target[ProxyPath], property];\n transientState.NaNReceiver = receiver as unknown as Record<string, unknown>;\n console.error(\n `Attempted to set NaN value`,\n [...target[ProxyPath], property],\n target[ProxyState]\n );\n throw \"Attempted to set NaN value. See above for details\";\n }\n }\n target[ProxyState][property] = value;\n return true;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ownKeys(target: Record<PropertyKey, any>) {\n return Reflect.ownKeys(target[ProxyState]);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n has(target: Record<PropertyKey, any>, key: string) {\n return Reflect.has(target[ProxyState], key);\n },\n getOwnPropertyDescriptor(target, key) {\n return Object.getOwnPropertyDescriptor(target[ProxyState], key);\n }\n};\nexport default window.player = new Proxy(\n { [ProxyState]: state, [ProxyPath]: [\"player\"] },\n playerHandler\n) as Player;\n","import projInfo from \"data/projInfo.json\";\nimport { Themes } from \"data/themes\";\nimport { CoercableComponent } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { hardReset } from \"util/save\";\nimport { reactive, watch } from \"vue\";\n\nexport interface Settings {\n active: string;\n saves: string[];\n showTPS: boolean;\n theme: Themes;\n unthrottled: boolean;\n}\n\nconst state = reactive<Partial<Settings>>({\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic,\n unthrottled: false\n});\n\nwatch(\n state,\n state =>\n localStorage.setItem(\n projInfo.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(state))))\n ),\n { deep: true }\n);\nexport default window.settings = state as Settings;\n\nexport function loadSettings(): void {\n try {\n const item: string | null = localStorage.getItem(projInfo.id);\n if (item != null && item !== \"\") {\n const settings = JSON.parse(decodeURIComponent(escape(atob(item))));\n if (typeof settings === \"object\") {\n Object.assign(state, settings);\n }\n }\n globalBus.emit(\"loadSettings\", state);\n // eslint-disable-next-line no-empty\n } catch {}\n}\n\nexport const hardResetSettings = (window.hardResetSettings = () => {\n const settings = {\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic\n };\n globalBus.emit(\"loadSettings\", settings);\n Object.assign(state, settings);\n hardReset();\n});\n\nexport const settingFields: CoercableComponent[] = reactive([]);\nexport function registerSettingField(component: CoercableComponent) {\n settingFields.push(component);\n}\n\nexport const infoComponents: CoercableComponent[] = reactive([]);\nexport function registerInfoComponent(component: CoercableComponent) {\n infoComponents.push(component);\n}\n\nexport const gameComponents: CoercableComponent[] = reactive([]);\nexport function registerGameComponent(component: CoercableComponent) {\n gameComponents.push(component);\n}\n","import { shallowReactive } from \"vue\";\n\nexport interface Transient {\n lastTenTicks: number[];\n hasNaN: boolean;\n NaNPath?: string[];\n NaNReceiver?: Record<string, unknown>;\n}\n\nexport default window.state = shallowReactive<Transient>({\n lastTenTicks: [],\n hasNaN: false,\n NaNPath: []\n});\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Context = _resolveComponent(\"Context\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"layer-container\",\n style: _normalizeStyle({ '--layer-color': _ctx.unref(_ctx.color) })\n }, [\n (_ctx.showGoBack)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"goBack\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.goBack && _ctx.goBack(...args)))\n }, \"←\"))\n : _createCommentVNode(\"\", true),\n (_ctx.minimized.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"layer-tab minimized\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.minimized.value = false))\n }, [\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.unref(_ctx.name)), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: _normalizeClass([\"layer-tab\", [{ showGoBack: _ctx.showGoBack }, _ctx.unref(_ctx.classes)]]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, [\n _createVNode(_component_Context, { ref: \"contextRef\" }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ]),\n _: 1\n }, 512)\n ], 6)),\n (_ctx.unref(_ctx.minimizable))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 3,\n class: \"minimize\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.minimized.value = true))\n }, \" ▼ \"))\n : _createCommentVNode(\"\", true)\n ], 4))\n}","\nimport projInfo from \"data/projInfo.json\";\nimport { CoercableComponent, StyleValue } from \"features/feature\";\nimport { FeatureNode } from \"game/layers\";\nimport { Persistent } from \"game/persistence\";\nimport player from \"game/player\";\nimport { computeComponent, processedPropType, wrapRef } from \"util/vue\";\nimport { computed, defineComponent, nextTick, PropType, Ref, ref, toRefs, unref, watch } from \"vue\";\nimport Context from \"./Context.vue\";\n\nexport default defineComponent({\n components: { Context },\n props: {\n index: {\n type: Number,\n required: true\n },\n tab: {\n type: Function as PropType<() => HTMLElement | undefined>,\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n minimized: {\n type: Object as PropType<Persistent<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number | string>(Number, String),\n required: true\n },\n name: {\n type: processedPropType<string>(String),\n required: true\n },\n color: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n minimizable: processedPropType<boolean>(Boolean),\n nodes: {\n type: Object as PropType<Ref<Record<string, FeatureNode | undefined>>>,\n required: true\n }\n },\n setup(props) {\n const { display, index, minimized, minWidth, tab } = toRefs(props);\n\n const component = computeComponent(display);\n const showGoBack = computed(\n () => projInfo.allowGoBack && index.value > 0 && !minimized.value\n );\n\n function goBack() {\n player.tabs.splice(unref(props.index), Infinity);\n }\n\n nextTick(() => updateTab(minimized.value, unref(minWidth.value)));\n watch([minimized, wrapRef(minWidth)], ([minimized, minWidth]) =>\n updateTab(minimized, minWidth)\n );\n\n const contextRef = ref<typeof Context | null>(null);\n watch(\n () => contextRef.value?.nodes,\n nodes => {\n if (nodes) {\n props.nodes.value = nodes;\n }\n }\n );\n\n function updateTab(minimized: boolean, minWidth: number | string) {\n const width =\n typeof minWidth === \"number\" || Number.isNaN(parseInt(minWidth))\n ? minWidth + \"px\"\n : minWidth;\n const tabValue = tab.value();\n if (tabValue != undefined) {\n if (minimized) {\n tabValue.style.flexGrow = \"0\";\n tabValue.style.flexShrink = \"0\";\n tabValue.style.width = \"60px\";\n tabValue.style.minWidth = tabValue.style.flexBasis = \"\";\n tabValue.style.margin = \"0\";\n } else {\n tabValue.style.flexGrow = \"\";\n tabValue.style.flexShrink = \"\";\n tabValue.style.width = \"\";\n tabValue.style.minWidth = tabValue.style.flexBasis = `${width}px`;\n tabValue.style.margin = \"\";\n }\n }\n }\n\n return {\n component,\n showGoBack,\n contextRef,\n unref,\n goBack\n };\n }\n});\n","import { render } from \"./Layer.vue?vue&type=template&id=66dc9e3e&scoped=true&ts=true\"\nimport script from \"./Layer.vue?vue&type=script&lang=ts\"\nexport * from \"./Layer.vue?vue&type=script&lang=ts\"\n\nimport \"./Layer.vue?vue&type=style&index=0&id=66dc9e3e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-66dc9e3e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5f8298e6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Changelog\", -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"details\", { open: \"\" }, [\n /*#__PURE__*/_createElementVNode(\"summary\", null, [\n /*#__PURE__*/_createTextVNode(\"v0.0 Initial Commit - \"),\n /*#__PURE__*/_createElementVNode(\"time\", null, \"2021-09-04\")\n ]),\n /*#__PURE__*/_createTextVNode(\" This is the first release :D \"),\n /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"feature\" }, \"Did everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"fix\" }, \"Had some fun\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"breaking\" }, \"Removed everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"balancing\" }, \"Created some bugs to fix later\")\n ])\n], -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Changelog.vue?vue&type=style&index=0&id=5f8298e6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5f8298e6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eb46986\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"info-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"info-modal-title\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_10 = [\"href\"]\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Paper Pilot Community \")\n ])\n], -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Modding Tree \")\n ])\n], -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport type Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport { infoComponents } from \"game/settings\";\nimport { formatTime } from \"util/bignum\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs, unref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n changelog: null\n },\n setup(__props: any, { expose }) {\n\nconst _props = __props as { changelog: typeof Changelog | null }\n\nconst { title, logo, author, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\n\nconst props = toRefs(_props);\n\nconst isOpen = ref(false);\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\n\nconst infoComponent = computed(() => {\n return coerceComponent(jsx(() => <>{infoComponents.map(render)}</>));\n});\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nfunction openChangelog() {\n unref(props.changelog)?.open();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"info-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"h2\", null, _toDisplayString(_unref(title)), 1),\n _createElementVNode(\"h4\", null, [\n _createTextVNode(\" v\" + _toDisplayString(_unref(versionNumber)), 1),\n (_unref(versionTitle))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \": \" + _toDisplayString(_unref(versionTitle)), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n (_unref(author))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"By \" + _toDisplayString(_unref(author)), 1))\n : _createCommentVNode(\"\", true),\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", {\n class: \"link\",\n onClick: openChangelog\n }, \"Changelog\"),\n _hoisted_9,\n _createElementVNode(\"div\", null, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: _unref(discordLink),\n class: \"info-modal-discord-link\"\n }, [\n _hoisted_11,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_10))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_12,\n _hoisted_13,\n _hoisted_14,\n _createElementVNode(\"div\", null, \"Time Played: \" + _toDisplayString(_unref(timePlayed)), 1),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(infoComponent))))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Info.vue?vue&type=style&index=0&id=3eb46986&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eb46986\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, isRef as _isRef, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85d7ae40\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"Options\")\n], -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport rawThemes from \"data/themes\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport settings, { settingFields } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst themes = Object.keys(rawThemes).map(theme => ({\n label: camelToTitle(theme),\n value: theme\n}));\n\nconst settingFieldsComponent = computed(() => {\n return coerceComponent(jsx(() => <>{settingFields.map(render)}</>));\n});\n\nconst { showTPS, theme, unthrottled } = toRefs(settings);\nconst { autosave, offlineProd } = toRefs(player);\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? 0 : null;\n }\n});\n\nconst offlineProdTitle = jsx(() => (\n <span>\n Offline Production<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst autosaveTitle = jsx(() => (\n <span>\n Autosave<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst isPausedTitle = jsx(() => (\n <span>\n Pause game<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createVNode(Select, {\n title: \"Theme\",\n options: _unref(themes),\n modelValue: _unref(theme),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(theme) ? (theme).value = $event : null))\n }, null, 8, [\"options\", \"modelValue\"]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(settingFieldsComponent)))),\n _createVNode(Toggle, {\n title: \"Show TPS\",\n modelValue: _unref(showTPS),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(showTPS) ? (showTPS).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _hoisted_2,\n _createVNode(Toggle, {\n title: \"Unthrottled\",\n modelValue: _unref(unthrottled),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(unthrottled) ? (unthrottled).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(offlineProdTitle),\n modelValue: _unref(offlineProd),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_isRef(offlineProd) ? (offlineProd).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(autosaveTitle),\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: _unref(isPausedTitle),\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Options.vue?vue&type=style&index=0&id=85d7ae40&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85d7ae40\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, withModifiers as _withModifiers, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bf59fca4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = [\"onClick\", \"disabled\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"onClick\"]\n\nimport { ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n disabled: { type: Boolean },\n skipConfirm: { type: Boolean }\n },\n emits: [\"click\", \"confirmingChanged\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n (e: \"confirmingChanged\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n disabled?: boolean;\n skipConfirm?: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isConfirming = ref(false);\n\nwatch(isConfirming, isConfirming => {\n emit(\"confirmingChanged\", isConfirming);\n});\n\nfunction click() {\n if (unref(props.skipConfirm)) {\n emit(\"click\");\n return;\n }\n if (isConfirming.value) {\n emit(\"click\");\n }\n isConfirming.value = !isConfirming.value;\n}\n\nfunction cancel() {\n isConfirming.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"container\", { confirming: isConfirming.value }])\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"Are you sure?\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: \"button danger\",\n disabled: __props.disabled\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Yes\"))\n : _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n ], 8, _hoisted_2),\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"button\",\n onClick: _withModifiers(cancel, [\"stop\"])\n }, \"No\", 8, _hoisted_4))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DangerButton.vue?vue&type=style&index=0&id=bf59fca4&scoped=true&lang=css\"\nimport \"./DangerButton.vue?vue&type=style&index=1&id=bf59fca4&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-bf59fca4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bbcedd3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { nextTick, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n left: { type: Boolean }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\n\n\n\nconst activated = ref(false);\nconst activatedTimeout = ref<number | null>(null);\n\nfunction click() {\n emit(\"click\");\n\n // Give feedback to user\n if (activatedTimeout.value) {\n clearTimeout(activatedTimeout.value);\n }\n activated.value = false;\n nextTick(() => {\n activated.value = true;\n activatedTimeout.value = setTimeout(() => (activated.value = false), 500);\n });\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: _normalizeClass([\"feedback\", { activated: activated.value, left: __props.left }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 10, _hoisted_1))\n}\n}\n\n})","import script from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./FeedbackButton.vue?vue&type=style&index=0&id=5bbcedd3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bbcedd3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6a0cf7ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"handle material-icons\" }, \"drag_handle\", -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"actions\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_paste\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_copy\", -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"edit\", -1))\nconst _hoisted_7 = [\n _hoisted_6\n]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"material-icons\",\n style: {\"margin\":\"-2px\"}\n}, \"delete\", -1))\nconst _hoisted_9 = {\n key: 1,\n class: \"actions\"\n}\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"check\", -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"close\", -1))\nconst _hoisted_13 = [\n _hoisted_12\n]\nconst _hoisted_14 = {\n key: 2,\n class: \"details\"\n}\nconst _hoisted_15 = { class: \"save-version\" }\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_17 = { key: 0 }\nconst _hoisted_18 = {\n key: 3,\n class: \"details\"\n}\nconst _hoisted_19 = {\n key: 4,\n class: \"details error\"\n}\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport player from \"game/player\";\nimport { computed, ref, toRefs, watch } from \"vue\";\nimport DangerButton from \"./fields/DangerButton.vue\";\nimport FeedbackButton from \"./fields/FeedbackButton.vue\";\nimport Text from \"./fields/Text.vue\";\nimport { LoadablePlayerData } from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n save: null\n },\n emits: [\"export\", \"open\", \"duplicate\", \"delete\", \"editName\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"export\"): void;\n (e: \"open\"): void;\n (e: \"duplicate\"): void;\n (e: \"delete\"): void;\n (e: \"editName\", name: string): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n save: LoadablePlayerData;\n}\n\n\nconst { save } = toRefs(_props);\n\n\nconst dateFormat = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n});\n\nconst isEditing = ref(false);\nconst isConfirming = ref(false);\nconst newName = ref(\"\");\n\nwatch(isEditing, () => (newName.value = save.value.name || \"\"));\n\nconst isActive = computed(() => save.value && save.value.id === player.id);\nconst currentTime = computed(() =>\n isActive.value ? player.time : (save.value && save.value.time) || 0\n);\n\nfunction changeName() {\n emit(\"editName\", newName.value);\n isEditing.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"save\", { active: _unref(isActive) }])\n }, [\n _hoisted_1,\n (!isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createBlock(FeedbackButton, {\n key: 0,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('export'))),\n class: \"button\",\n left: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('duplicate'))),\n class: \"button\"\n }, _hoisted_5))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 2,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_7))\n : _createCommentVNode(\"\", true),\n _createVNode(DangerButton, {\n disabled: _unref(isActive),\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('delete'))),\n onConfirmingChanged: _cache[4] || (_cache[4] = value => (isConfirming.value = value))\n }, {\n default: _withCtx(() => [\n _hoisted_8\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n _createElementVNode(\"button\", {\n onClick: changeName,\n class: \"button\"\n }, _hoisted_11),\n _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_13)\n ])),\n (_unref(save).error == undefined && !isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"button\", {\n class: \"button open\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emit('open')))\n }, [\n _createElementVNode(\"h3\", null, _toDisplayString(_unref(save).name), 1)\n ]),\n _createElementVNode(\"span\", _hoisted_15, \"v\" + _toDisplayString(_unref(save).modVersion), 1),\n _hoisted_16,\n (_unref(currentTime))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, \"Last played \" + _toDisplayString(_unref(dateFormat).format(_unref(currentTime))), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : (_unref(save).error == undefined && isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _createVNode(Text, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((newName).value = $event)),\n class: \"editname\",\n onSubmit: changeName\n }, null, 8, [\"modelValue\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createTextVNode(\" Error: Failed to load save with id \" + _toDisplayString(_unref(save).id), 1),\n _hoisted_20,\n _createTextVNode(_toDisplayString(_unref(save).error), 1)\n ]))\n ], 2))\n}\n}\n\n})","import script from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Save.vue?vue&type=style&index=0&id=6a0cf7ac&scoped=true&lang=css\"\nimport \"./Save.vue?vue&type=style&index=1&id=6a0cf7ac&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6a0cf7ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7d95f59e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Saves Manager\", -1))\nconst _hoisted_2 = { class: \"modal-footer\" }\nconst _hoisted_3 = { class: \"field\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"field-title\" }, \"Create Save\", -1))\nconst _hoisted_5 = { class: \"field-buttons\" }\nconst _hoisted_6 = { class: \"footer\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\"} }, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport player, { PlayerData } from \"game/player\";\nimport settings from \"game/settings\";\nimport { getUniqueID, loadSave, save, newSave } from \"util/save\";\nimport {\n ComponentPublicInstance,\n computed,\n nextTick,\n ref,\n shallowReactive,\n unref,\n watch\n} from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Text from \"./fields/Text.vue\";\nimport Save from \"./Save.vue\";\nimport Draggable from \"vuedraggable\";\n\nexport type LoadablePlayerData = Omit<Partial<PlayerData>, \"id\"> & { id: string; error?: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\nconst modal = ref<ComponentPublicInstance<typeof Modal> | null>(null);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst importingFailed = ref(false);\nconst saveToImport = ref(\"\");\n\nwatch(saveToImport, save => {\n if (save) {\n nextTick(() => {\n try {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (typeof playerData !== \"object\") {\n importingFailed.value = true;\n return;\n }\n const id = getUniqueID();\n playerData.id = id;\n localStorage.setItem(\n id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n saveToImport.value = \"\";\n importingFailed.value = false;\n\n settings.saves.push(id);\n } catch (e) {\n importingFailed.value = true;\n }\n });\n } else {\n importingFailed.value = false;\n }\n});\n\nlet bankContext = require.context(\"raw-loader!../../saves\", true, /\\.txt$/);\nlet bank = ref(\n bankContext.keys().reduce((acc: Array<{ label: string; value: string }>, curr) => {\n // .slice(2, -4) strips the leading ./ and the trailing .txt\n acc.push({\n label: curr.slice(2, -4),\n value: bankContext(curr).default\n });\n return acc;\n }, [])\n);\n\nconst cachedSaves = shallowReactive<Record<string, LoadablePlayerData | undefined>>({});\nfunction getCachedSave(id: string) {\n if (cachedSaves[id] == null) {\n const save = localStorage.getItem(id);\n if (save == null) {\n cachedSaves[id] = { error: `Save doesn't exist in localStorage`, id };\n } else if (save === \"dW5kZWZpbmVk\") {\n cachedSaves[id] = { error: `Save is undefined`, id };\n } else {\n try {\n cachedSaves[id] = { ...JSON.parse(decodeURIComponent(escape(atob(save)))), id };\n } catch (error) {\n cachedSaves[id] = { error, id };\n console.warn(\n `SavesManager: Failed to load info about save with id ${id}:\\n${error}\\n${save}`\n );\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return cachedSaves[id]!;\n}\n// Wipe cache whenever the modal is opened\nwatch(isOpen, isOpen => {\n if (isOpen) {\n Object.keys(cachedSaves).forEach(key => delete cachedSaves[key]);\n }\n});\n\nconst saves = computed(() =>\n settings.saves.reduce((acc: Record<string, LoadablePlayerData>, curr: string) => {\n acc[curr] = getCachedSave(curr);\n return acc;\n }, {})\n);\n\nfunction exportSave(id: string) {\n let saveToExport;\n if (player.id === id) {\n saveToExport = save();\n } else {\n saveToExport = btoa(unescape(encodeURIComponent(JSON.stringify(saves.value[id]))));\n }\n\n // Put on clipboard. Using the clipboard API asks for permissions and stuff\n const el = document.createElement(\"textarea\");\n el.value = saveToExport;\n document.body.appendChild(el);\n el.select();\n el.setSelectionRange(0, 99999);\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n}\n\nfunction duplicateSave(id: string) {\n if (player.id === id) {\n save();\n }\n\n const playerData = { ...saves.value[id], id: getUniqueID() };\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction deleteSave(id: string) {\n settings.saves = settings.saves.filter((save: string) => save !== id);\n localStorage.removeItem(id);\n cachedSaves[id] = undefined;\n}\n\nfunction openSave(id: string) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n saves.value[player.id]!.time = player.time;\n save();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n loadSave(saves.value[id]!);\n // Delete cached version in case of opening it again\n cachedSaves[id] = undefined;\n}\n\nfunction newFromPreset(preset: string) {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(preset))));\n playerData.id = getUniqueID();\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction editSave(id: string, newName: string) {\n const currSave = saves.value[id];\n if (currSave) {\n currSave.name = newName;\n if (player.id === id) {\n player.name = newName;\n save();\n } else {\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(JSON.stringify(currSave)))));\n cachedSaves[id] = undefined;\n }\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((isOpen).value = $event)),\n ref_key: \"modal\",\n ref: modal\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createBlock(_unref(Draggable), {\n key: 0,\n list: _unref(settings).saves,\n handle: \".handle\",\n itemKey: (save) => save\n }, {\n item: _withCtx(({ element }) => [\n _createVNode(Save, {\n save: _unref(saves)[element],\n onOpen: ($event: any) => (openSave(element)),\n onExport: ($event: any) => (exportSave(element)),\n onEditName: name => editSave(element, name),\n onDuplicate: ($event: any) => (duplicateSave(element)),\n onDelete: ($event: any) => (deleteSave(element))\n }, null, 8, [\"save\", \"onOpen\", \"onExport\", \"onEditName\", \"onDuplicate\", \"onDelete\"])\n ]),\n _: 1\n }, 8, [\"list\", \"itemKey\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Text, {\n modelValue: saveToImport.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((saveToImport).value = $event)),\n title: \"Import Save\",\n placeholder: \"Paste your save here!\",\n class: _normalizeClass({ importingFailed: importingFailed.value })\n }, null, 8, [\"modelValue\", \"class\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"button\", {\n class: \"button\",\n onClick: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_unref(newSave) && _unref(newSave)(...args)))\n }, \"New Game\"),\n (Object.keys(_unref(bank)).length > 0)\n ? (_openBlock(), _createBlock(Select, {\n key: 0,\n options: _unref(bank),\n modelValue: undefined,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = preset => newFromPreset(preset as string)),\n closeOnSelect: \"\",\n placeholder: \"Select preset\",\n class: \"presets\"\n }, null, 8, [\"options\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (isOpen.value = false))\n }, \" Close \")\n ])\n ])\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SavesManager.vue?vue&type=style&index=0&id=7d95f59e&scoped=true&lang=css\"\nimport \"./SavesManager.vue?vue&type=style&index=1&id=7d95f59e&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7d95f59e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71847eca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"alt\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"title\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\",\"cursor\":\"unset\"} }, null, -1))\nconst _hoisted_4 = { class: \"discord\" }\nconst _hoisted_5 = { class: \"discord-links\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = [\"href\"]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\nconst _hoisted_10 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_18 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_20 = { class: \"discord\" }\nconst _hoisted_21 = { class: \"discord-links\" }\nconst _hoisted_22 = { key: 0 }\nconst _hoisted_23 = [\"href\"]\nconst _hoisted_24 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\n\nimport Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { ComponentPublicInstance, ref } from \"vue\";\nimport Info from \"./Info.vue\";\nimport Options from \"./Options.vue\";\nimport SavesManager from \"./SavesManager.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { TooltipDirection } from \"features/tooltips/tooltip\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst info = ref<ComponentPublicInstance<typeof Info> | null>(null);\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\nconst options = ref<ComponentPublicInstance<typeof Options> | null>(null);\n// For some reason Info won't accept the changelog unless I do this:\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst changelog = ref<ComponentPublicInstance<any> | null>(null);\n\nconst { useHeader, banner, title, discordName, discordLink, versionNumber } = projInfo;\n\nfunction openDiscord() {\n window.open(discordLink, \"mywindow\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(useHeader))\n ? (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 0,\n class: \"nav\"\n }, _ctx.$attrs), [\n (_unref(banner))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: _unref(banner),\n class: \"banner\",\n alt: _unref(title)\n }, null, 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _toDisplayString(_unref(title)), 1)),\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_5, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_6, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_7)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_8,\n _hoisted_9\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_10, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).DOWN,\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ], 16))\n : (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 1,\n class: \"overlay-nav\"\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_21, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_22, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_23)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_24,\n _hoisted_25\n ])\n ])\n ], 16)),\n _createVNode(Info, {\n ref_key: \"info\",\n ref: info,\n changelog: changelog.value\n }, null, 8, [\"changelog\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512),\n _createVNode(Options, {\n ref_key: \"options\",\n ref: options\n }, null, 512),\n _createVNode(Changelog, {\n ref_key: \"changelog\",\n ref: changelog\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Nav.vue?vue&type=style&index=0&id=71847eca&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-71847eca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4fd7697b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"inner-tab\" }\nconst _hoisted_2 = {\n key: 1,\n class: \"separator\"\n}\n\nimport projInfo from \"data/projInfo.json\";\nimport { GenericLayer, layers } from \"game/layers\";\nimport player from \"game/player\";\nimport { computed, toRef } from \"vue\";\nimport Layer from \"./Layer.vue\";\nimport Nav from \"./Nav.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tabs = toRef(player, \"tabs\");\nconst layerKeys = computed(() => Object.keys(layers));\nconst useHeader = projInfo.useHeader;\n\nfunction gatherLayerProps(layer: GenericLayer) {\n const { display, minimized, minWidth, name, color, style, classes, minimizable, nodes } = layer;\n return { display, minimized, minWidth, name, color, style, classes, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs-container\", { useHeader: _unref(useHeader) }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(tabs), (tab, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: index,\n class: \"tab\",\n ref_for: true,\n ref: `tab-${index}`\n }, [\n (index === 0 && !_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(layerKeys).includes(tab))\n ? (_openBlock(), _createBlock(Layer, _mergeProps({ key: 0 }, gatherLayerProps(_unref(layers)[tab]!), {\n index: index,\n tab: () => ((_ctx.$refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])\n }), null, 16, [\"index\", \"tab\"]))\n : (_openBlock(), _createBlock(_resolveDynamicComponent(tab), {\n key: 1,\n index: index\n }, null, 8, [\"index\"]))\n ]),\n (index !== _unref(tabs).length - 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ], 2))\n}\n}\n\n})","import script from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Game.vue?vue&type=style&index=0&id=4fd7697b&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=4fd7697b&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4fd7697b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-06188cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"game-over-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"game-over-modal-title\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Congratulations!\", -1))\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Please check the Discord to discuss the game or to check for new content updates! \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = [\"href\"]\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons game-over-modal-discord\" }, \"discord\", -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { hasWon } from \"data/projEntry\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport { formatTime } from \"util/bignum\";\nimport { loadSave, newSave } from \"util/save\";\nimport { computed, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { title, logo, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\nconst isOpen = computed(() => hasWon.value && !player.keepGoing);\nconst autosave = toRef(player, \"autosave\");\n\nfunction keepGoing() {\n player.keepGoing = true;\n}\n\nfunction playAgain() {\n loadSave(newSave());\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, { \"model-value\": _unref(isOpen) }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"game-over-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"h4\", null, \"You've beaten \" + _toDisplayString(_unref(title)) + \" v\" + _toDisplayString(_unref(versionNumber)) + \": \" + _toDisplayString(_unref(versionTitle)), 1)\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", null, \"It took you \" + _toDisplayString(_unref(timePlayed)) + \" to beat the game.\", 1),\n _hoisted_6,\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"game-over-modal-discord-link\"\n }, [\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_9)\n ]),\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", { class: \"game-over-footer\" }, [\n _createElementVNode(\"button\", {\n onClick: keepGoing,\n class: \"button\"\n }, \"Keep Going\"),\n _createElementVNode(\"button\", {\n onClick: playAgain,\n class: \"button danger\"\n }, \"Play Again\")\n ])\n ]),\n _: 1\n }, 8, [\"model-value\"]))\n}\n}\n\n})","import script from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GameOverScreen.vue?vue&type=style&index=0&id=06188cc8&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-06188cc8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, createBlock as _createBlock, mergeProps as _mergeProps, withCtx as _withCtx, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5935214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"nan-modal-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"NaN value detected!\")\n], -1))\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_4 = [\"href\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons nan-modal-discord\" }, \"discord\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = { class: \"nan-footer\" }\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { ComponentPublicInstance, computed, ref, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport SavesManager from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { discordName, discordLink } = projInfo;\nconst autosave = toRef(player, \"autosave\");\nconst hasNaN = toRef(state, \"hasNaN\");\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\n\nconst path = computed(() => state.NaNPath?.join(\".\"));\nconst property = computed(() => state.NaNPath?.slice(-1)[0]);\nconst previous = computed<DecimalSource | null>(() => {\n if (state.NaNReceiver && property.value) {\n return state.NaNReceiver[property.value] as DecimalSource;\n }\n return null;\n});\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? null : 0;\n }\n});\n\nfunction setZero() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(0);\n state.hasNaN = false;\n }\n}\n\nfunction setOne() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(1);\n state.hasNaN = false;\n }\n}\n\nfunction ignore() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(NaN);\n state.hasNaN = false;\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(Modal, _mergeProps({\n modelValue: _unref(hasNaN),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(hasNaN) ? (hasNaN).value = $event : null))\n }, _ctx.$attrs), {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createElementVNode(\"div\", null, [\n _createTextVNode(\" Attempted to assign \\\"\" + _toDisplayString(_unref(path)) + \"\\\" to NaN\", 1),\n (_unref(previous))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(\" \") + \"(previously \" + _toDisplayString(_unref(format)(_unref(previous))) + \")\", 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\". Auto-saving has been \" + _toDisplayString(_unref(autosave) ? \"enabled\" : \"disabled\") + \". Check the console for more details, and consider sharing it with the developers on discord. \", 1)\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"nan-modal-discord-link\"\n }, [\n _hoisted_5,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_4)\n ]),\n _hoisted_6,\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: \"Pause game\",\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open())),\n class: \"button\"\n }, \"Open Saves Manager\"),\n _createElementVNode(\"button\", {\n onClick: setZero,\n class: \"button\"\n }, \"Set to 0\"),\n _createElementVNode(\"button\", {\n onClick: setOne,\n class: \"button\"\n }, \"Set to 1\"),\n (_unref(previous) && _unref(Decimal).neq(_unref(previous), 0) && _unref(Decimal).neq(_unref(previous), 1))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (hasNaN.value = false)),\n class: \"button\"\n }, \" Set to previous \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: ignore,\n class: \"button danger\"\n }, \"Ignore\")\n ])\n ]),\n _: 1\n }, 16, [\"modelValue\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./NaNScreen.vue?vue&type=style&index=0&id=5935214c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5935214c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c0663118\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"tpsDisplay\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"low\"\n}\n\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { computed, ref, watchEffect } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tps = computed(() =>\n Decimal.div(\n state.lastTenTicks.length,\n state.lastTenTicks.reduce((acc, curr) => acc + curr, 0)\n )\n);\n\nconst lastTenFPS = ref<number[]>([]);\nwatchEffect(() => {\n lastTenFPS.value.push(Math.round(tps.value.toNumber()));\n if (lastTenFPS.value.length > 10) {\n lastTenFPS.value = lastTenFPS.value.slice(1);\n }\n});\n\nconst low = computed(() =>\n lastTenFPS.value.reduce<DecimalSource>((acc, curr) => Decimal.max(acc, curr), 0)\n);\n\nconst showLow = computed(() => Decimal.sub(tps.value, low.value).gt(1));\n\nreturn (_ctx: any,_cache: any) => {\n return (!_unref(tps).isNan())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createTextVNode(\" TPS: \" + _toDisplayString(_unref(formatWhole)(_unref(tps))) + \" \", 1),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_unref(showLow))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(_unref(formatWhole)(_unref(low))), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./TPS.vue?vue&type=style&index=0&id=c0663118&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c0663118\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { jsx } from \"features/feature\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, toRef, unref } from \"vue\";\nimport Game from \"./components/Game.vue\";\nimport GameOverScreen from \"./components/GameOverScreen.vue\";\nimport NaNScreen from \"./components/NaNScreen.vue\";\nimport Nav from \"./components/Nav.vue\";\nimport TPS from \"./components/TPS.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport themes from \"./data/themes\";\nimport settings, { gameComponents } from \"./game/settings\";\nimport \"./main.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst useHeader = projInfo.useHeader;\nconst theme = computed(() => themes[settings.theme].variables);\nconst showTPS = toRef(settings, \"showTPS\");\n\nconst gameComponent = computed(() => {\n return coerceComponent(jsx(() => <>{gameComponents.map(render)}</>));\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n id: \"modal-root\",\n style: _normalizeStyle(_unref(theme))\n }, null, 4),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"app\", { useHeader: _unref(useHeader) }]),\n style: _normalizeStyle(_unref(theme))\n }, [\n (_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(Game),\n (unref(_unref(showTPS)))\n ? (_openBlock(), _createBlock(TPS, { key: 1 }))\n : _createCommentVNode(\"\", true),\n _createVNode(GameOverScreen),\n _createVNode(NaNScreen),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(gameComponent))))\n ], 6)\n ], 64))\n}\n}\n\n})","import script from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./App.vue?vue&type=style&index=0&id=f13f28b6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f13f28b6\"]])\n\nexport default __exports__","import { App as VueApp, createApp } from \"vue\";\nimport App from \"./App.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport { GenericLayer } from \"./game/layers\";\nimport { PlayerData } from \"./game/player\";\nimport { Settings } from \"./game/settings\";\nimport { Transient } from \"./game/state\";\nimport Decimal, { DecimalSource } from \"./util/bignum\";\nimport { load } from \"./util/save\";\n\ndocument.title = projInfo.title;\nif (projInfo.id === \"\") {\n throw \"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json\";\n}\n\ndeclare global {\n interface Window {\n vue: VueApp;\n save: VoidFunction;\n hardReset: VoidFunction;\n hardResetSettings: VoidFunction;\n layers: Record<string, Readonly<GenericLayer> | undefined>;\n player: PlayerData;\n state: Transient;\n settings: Settings;\n Decimal: typeof Decimal;\n exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;\n commaFormat: (num: DecimalSource, precision: number) => string;\n regularFormat: (num: DecimalSource, precision: number) => string;\n format: (num: DecimalSource, precision?: number, small?: boolean) => string;\n formatWhole: (num: DecimalSource) => string;\n formatTime: (s: number) => string;\n toPlaces: (x: DecimalSource, precision: number, maxAccepted: DecimalSource) => string;\n formatSmall: (x: DecimalSource, precision?: number) => string;\n invertOOM: (x: DecimalSource) => Decimal;\n projInfo: typeof projInfo;\n }\n}\n\nrequestAnimationFrame(async () => {\n console.log(\n \"%cMade in Profectus%c\\nLearn more at www.moddingtree.com\",\n \"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;\",\n \"padding: 4px;\"\n );\n await load();\n const { globalBus, startGameLoop } = await require(\"./game/events\");\n\n // Create Vue\n const vue = (window.vue = createApp(App));\n globalBus.emit(\"setupVue\", vue);\n vue.mount(\"#app\");\n\n startGameLoop();\n});\n\nwindow.projInfo = projInfo;\n","/* eslint-disable @typescript-eslint/no-this-alias */\nexport type CompareResult = -1 | 0 | 1;\n\nconst MAX_SIGNIFICANT_DIGITS = 17; //Maximum number of digits of precision to assume in Number\n\nconst EXP_LIMIT = 9e15; //If we're ABOVE this value, increase a layer. (9e15 is close to the largest integer that can fit in a Number.)\n\nconst LAYER_DOWN: number = Math.log10(9e15);\n\nconst FIRST_NEG_LAYER = 1 / 9e15; //At layer 0, smaller non-zero numbers than this become layer 1 numbers with negative mag. After that the pattern continues as normal.\n\nconst NUMBER_EXP_MAX = 308; //The largest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst NUMBER_EXP_MIN = -324; //The smallest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst MAX_ES_IN_A_ROW = 5; //For default toString behaviour, when to swap from eee... to (e^n) syntax.\n\nconst IGNORE_COMMAS = true;\nconst COMMAS_ARE_DECIMAL_POINTS = false;\n\nconst powerOf10 = (function() {\n // We need this lookup table because Math.pow(10, exponent)\n // when exponent's absolute value is large is slightly inaccurate.\n // You can fix it with the power of math... or just make a lookup table.\n // Faster AND simpler\n const powersOf10: number[] = [];\n\n for (let i = NUMBER_EXP_MIN + 1; i <= NUMBER_EXP_MAX; i++) {\n powersOf10.push(Number(\"1e\" + i));\n }\n\n const indexOf0InPowersOf10 = 323;\n return function(power: number) {\n return powersOf10[power + indexOf0InPowersOf10];\n };\n})();\n\n//tetration/slog to real height stuff\n//background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\nconst critical_headers = [2, Math.E, 3, 4, 5, 6, 7, 8, 9, 10];\nconst critical_tetr_values = [\n [\n // Base 2\n 1,\n 1.0891168053867777,\n 1.1789745164521264,\n 1.2701428397304229,\n 1.3632066654400328,\n 1.4587804913784246,\n 1.557523817412741,\n 1.660158301473385,\n 1.767487542936873,\n 1.8804205225512542,\n 2\n ],\n [\n // Base E\n 1, //0.0\n 1.1121114330934, //0.1\n 1.23103892493161, //0.2\n 1.35838369631113, //0.3\n 1.49605193039935, //0.4\n 1.64635423375119, //0.5\n 1.81213853570186, //0.6\n 1.99697132461829, //0.7\n 2.20538955455724, //0.8\n 2.44325744833852, //0.9\n Math.E //1.0\n ],\n [\n // Base 3\n 1,\n 1.1187738849693603,\n 1.2464963939368214,\n 1.38527004705667,\n 1.5376664685821402,\n 1.7068895236551784,\n 1.897001227148399,\n 2.1132403089001035,\n 2.362480153784171,\n 2.6539010333870774,\n 3\n ],\n [\n // Base 4\n 1,\n 1.1367350847096405,\n 1.2889510672956703,\n 1.4606478703324786,\n 1.6570295196661111,\n 1.8850062585672889,\n 2.1539465047453485,\n 2.476829779693097,\n 2.872061932789197,\n 3.3664204535587183,\n 4\n ],\n [\n // Base 5\n 1,\n 1.1494592900767588,\n 1.319708228183931,\n 1.5166291280087583,\n 1.748171114438024,\n 2.0253263297298045,\n 2.3636668498288547,\n 2.7858359149579424,\n 3.3257226212448145,\n 4.035730287722532,\n 5\n ],\n [\n // Base 6\n 1,\n 1.159225940787673,\n 1.343712473580932,\n 1.5611293155111927,\n 1.8221199554561318,\n 2.14183924486326,\n 2.542468319282638,\n 3.0574682501653316,\n 3.7390572020926873,\n 4.6719550537360774,\n 6\n ],\n [\n // Base 7\n 1,\n 1.1670905356972596,\n 1.3632807444991446,\n 1.5979222279405536,\n 1.8842640123816674,\n 2.2416069644878687,\n 2.69893426559423,\n 3.3012632110403577,\n 4.121250340630164,\n 5.281493033448316,\n 7\n ],\n [\n // Base 8\n 1,\n 1.1736630594087796,\n 1.379783782386201,\n 1.6292821855668218,\n 1.9378971836180754,\n 2.3289975651071977,\n 2.8384347394720835,\n 3.5232708454565906,\n 4.478242031114584,\n 5.868592169644505,\n 8\n ],\n [\n // Base 9\n 1,\n 1.1793017514670474,\n 1.394054150657457,\n 1.65664127441059,\n 1.985170999970283,\n 2.4069682290577457,\n 2.9647310119960752,\n 3.7278665320924946,\n 4.814462547283592,\n 6.436522247411611,\n 9\n ],\n [\n // Base 10\n 1,\n 1.18422737399915,\n 1.4066113788546144,\n 1.680911177655277,\n 2.027492094355525,\n 2.4775152854601967,\n 3.080455730250329,\n 3.918234505962507,\n 5.1332705696484595,\n 6.9878696918072905,\n 10\n ]\n];\nconst critical_slog_values = [\n [\n // Base 2\n -1,\n -0.9194161097107025,\n -0.8335625019330468,\n -0.7425599821143978,\n -0.6466611521029437,\n -0.5462617907227869,\n -0.4419033816638769,\n -0.3342645487554494,\n -0.224140440909962,\n -0.11241087890006762,\n 0\n ],\n [\n // Base E\n -1, //0.0\n -0.90603157029014, //0.1\n -0.80786507256596, //0.2\n -0.7064666939634, //0.3\n -0.60294836853664, //0.4\n -0.49849837513117, //0.5\n -0.39430303318768, //0.6\n -0.29147201034755, //0.7\n -0.19097820800866, //0.8\n -0.09361896280296, //0.9\n 0 //1.0\n ],\n [\n // Base 3\n -1,\n -0.9021579584316141,\n -0.8005762598234203,\n -0.6964780623319391,\n -0.5911906810998454,\n -0.486050182576545,\n -0.3823089430815083,\n -0.28106046722897615,\n -0.1831906535795894,\n -0.08935809204418144,\n 0\n ],\n [\n // Base 4\n -1,\n -0.8917227442365535,\n -0.781258746326964,\n -0.6705130326902455,\n -0.5612813129406509,\n -0.4551067709033134,\n -0.35319256652135966,\n -0.2563741554088552,\n -0.1651412821106526,\n -0.0796919581982668,\n 0\n ],\n [\n // Base 5\n -1,\n -0.8843387974366064,\n -0.7678744063886243,\n -0.6529563724510552,\n -0.5415870994657841,\n -0.4352842206588936,\n -0.33504449124791424,\n -0.24138853420685147,\n -0.15445285440944467,\n -0.07409659641336663,\n 0\n ],\n [\n // Base 6\n -1,\n -0.8786709358426346,\n -0.7577735191184886,\n -0.6399546189952064,\n -0.527284921869926,\n -0.4211627631006314,\n -0.3223479611761232,\n -0.23107655627789858,\n -0.1472057700818259,\n -0.07035171210706326,\n 0\n ],\n [\n // Base 7\n -1,\n -0.8740862815291583,\n -0.7497032990976209,\n -0.6297119746181752,\n -0.5161838335958787,\n -0.41036238255751956,\n -0.31277212146489963,\n -0.2233976621705518,\n -0.1418697367979619,\n -0.06762117662323441,\n 0\n ],\n [\n // Base 8\n -1,\n -0.8702632331800649,\n -0.7430366914122081,\n -0.6213373075161548,\n -0.5072025698095242,\n -0.40171437727184167,\n -0.30517930701410456,\n -0.21736343968190863,\n -0.137710238299109,\n -0.06550774483471955,\n 0\n ],\n [\n // Base 9\n -1,\n -0.8670016295947213,\n -0.7373984232432306,\n -0.6143173985094293,\n -0.49973884395492807,\n -0.394584953527678,\n -0.2989649949848695,\n -0.21245647317021688,\n -0.13434688362382652,\n -0.0638072667348083,\n 0\n ],\n [\n // Base 10\n -1,\n -0.8641642839543857,\n -0.732534623168535,\n -0.6083127477059322,\n -0.4934049257184696,\n -0.3885773075899922,\n -0.29376029055315767,\n -0.2083678561173622,\n -0.13155653399373268,\n -0.062401588652553186,\n 0\n ]\n];\n\nconst D = function D(value: DecimalSource): Decimal {\n return Decimal.fromValue_noAlloc(value);\n};\n\nconst FC = function(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents(sign, layer, mag);\n};\n\nconst FC_NN = function FC_NN(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents_noNormalize(sign, layer, mag);\n};\n\nconst ME = function ME(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent(mantissa, exponent);\n};\n\nconst ME_NN = function ME_NN(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent_noNormalize(mantissa, exponent);\n};\n\nconst decimalPlaces = function decimalPlaces(value: number, places: number): number {\n const len = places + 1;\n const numDigits = Math.ceil(Math.log10(Math.abs(value)));\n const rounded =\n Math.round(value * Math.pow(10, len - numDigits)) * Math.pow(10, numDigits - len);\n return parseFloat(rounded.toFixed(Math.max(len - numDigits, 0)));\n};\n\nconst f_maglog10 = function(n: number) {\n return Math.sign(n) * Math.log10(Math.abs(n));\n};\n\n//from HyperCalc source code\nconst f_gamma = function(n: number) {\n if (!isFinite(n)) {\n return n;\n }\n if (n < -50) {\n if (n === Math.trunc(n)) {\n return Number.NEGATIVE_INFINITY;\n }\n return 0;\n }\n\n let scal1 = 1;\n while (n < 10) {\n scal1 = scal1 * n;\n ++n;\n }\n\n n -= 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (n + 0.5) * Math.log(n);\n l = l - n;\n const n2 = n * n;\n let np = n;\n l = l + 1 / (12 * np);\n np = np * n2;\n l = l + 1 / (360 * np);\n np = np * n2;\n l = l + 1 / (1260 * np);\n np = np * n2;\n l = l + 1 / (1680 * np);\n np = np * n2;\n l = l + 1 / (1188 * np);\n np = np * n2;\n l = l + 691 / (360360 * np);\n np = np * n2;\n l = l + 7 / (1092 * np);\n np = np * n2;\n l = l + 3617 / (122400 * np);\n\n return Math.exp(l) / scal1;\n};\n\nconst _twopi = 6.2831853071795864769252842; // 2*pi\nconst _EXPN1 = 0.36787944117144232159553; // exp(-1)\nconst OMEGA = 0.56714329040978387299997; // W(1, 0)\n//from https://math.stackexchange.com/a/465183\n// The evaluation can become inaccurate very close to the branch point\nconst f_lambertw = function(z: number, tol = 1e-10): number {\n let w;\n let wn;\n\n if (!Number.isFinite(z)) {\n return z;\n }\n if (z === 0) {\n return z;\n }\n if (z === 1) {\n return OMEGA;\n }\n\n if (z < 10) {\n w = 0;\n } else {\n w = Math.log(z) - Math.log(Math.log(z));\n }\n\n for (let i = 0; i < 100; ++i) {\n wn = (z * Math.exp(-w) + w * w) / (w + 1);\n if (Math.abs(wn - w) < tol * Math.abs(wn)) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Number.NaN;\n};\n\n//from https://github.com/scipy/scipy/blob/8dba340293fe20e62e173bdf2c10ae208286692f/scipy/special/lambertw.pxd\n// The evaluation can become inaccurate very close to the branch point\n// at ``-1/e``. In some corner cases, `lambertw` might currently\n// fail to converge, or can end up on the wrong branch.\nfunction d_lambertw(z: Decimal, tol = 1e-10): Decimal {\n let w;\n let ew, wew, wewz, wn;\n\n if (!Number.isFinite(z.mag)) {\n return z;\n }\n if (z === Decimal.dZero) {\n return z;\n }\n if (z === Decimal.dOne) {\n //Split out this case because the asymptotic series blows up\n return D(OMEGA);\n }\n\n const absz = Decimal.abs(z);\n //Get an initial guess for Halley's method\n w = Decimal.ln(z);\n\n //Halley's method; see 5.9 in [1]\n\n for (let i = 0; i < 100; ++i) {\n ew = Decimal.exp(-w);\n wewz = w.sub(z.mul(ew));\n wn = w.sub(\n wewz.div(\n w.add(1).sub(\n w\n .add(2)\n .mul(wewz)\n .div(Decimal.mul(2, w).add(2))\n )\n )\n );\n if (Decimal.abs(wn.sub(w)).lt(Decimal.abs(wn).mul(tol))) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Decimal.dNaN;\n}\n\nexport type DecimalSource = Decimal | number | string;\n\n/**\n * The Decimal's value is simply mantissa * 10^exponent.\n */\nexport default class Decimal {\n public static readonly dZero = FC_NN(0, 0, 0);\n public static readonly dOne = FC_NN(1, 0, 1);\n public static readonly dNegOne = FC_NN(-1, 0, 1);\n public static readonly dTwo = FC_NN(1, 0, 2);\n public static readonly dTen = FC_NN(1, 0, 10);\n public static readonly dNaN = FC_NN(Number.NaN, Number.NaN, Number.NaN);\n public static readonly dInf = FC_NN(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n public static readonly dNegInf = FC_NN(-1, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n public static readonly dNumberMax = FC(1, 0, Number.MAX_VALUE);\n public static readonly dNumberMin = FC(1, 0, Number.MIN_VALUE);\n\n public sign: number = Number.NaN;\n public mag: number = Number.NaN;\n public layer: number = Number.NaN;\n\n constructor(value?: DecimalSource) {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n this.fromDecimal(value);\n } else if (typeof value === \"number\") {\n this.fromNumber(value);\n } else if (typeof value === \"string\") {\n this.fromString(value);\n } else {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n }\n }\n\n get m(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n const exp = Math.floor(Math.log10(this.mag));\n //handle special case 5e-324\n let man;\n if (this.mag === 5e-324) {\n man = 5;\n } else {\n man = this.mag / powerOf10(exp);\n }\n return this.sign * man;\n } else if (this.layer === 1) {\n const residue = this.mag - Math.floor(this.mag);\n return this.sign * Math.pow(10, residue);\n } else {\n //mantissa stops being relevant past 1e9e15 / ee15.954\n return this.sign;\n }\n }\n\n set m(value: number) {\n if (this.layer <= 2) {\n this.fromMantissaExponent(value, this.e);\n } else {\n //don't even pretend mantissa is meaningful\n this.sign = Math.sign(value);\n if (this.sign === 0) {\n this.layer === 0;\n this.exponent === 0;\n }\n }\n }\n\n get e(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n return Math.floor(Math.log10(this.mag));\n } else if (this.layer === 1) {\n return Math.floor(this.mag);\n } else if (this.layer === 2) {\n return Math.floor(Math.sign(this.mag) * Math.pow(10, Math.abs(this.mag)));\n } else {\n return this.mag * Number.POSITIVE_INFINITY;\n }\n }\n set e(value: number) {\n this.fromMantissaExponent(this.m, value);\n }\n\n get s(): number {\n return this.sign;\n }\n set s(value: number) {\n if (value === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n } else {\n this.sign = value;\n }\n }\n\n // Object.defineProperty(Decimal.prototype, \"mantissa\", {\n get mantissa(): number {\n return this.m;\n }\n\n set mantissa(value: number) {\n this.m = value;\n }\n\n get exponent(): number {\n return this.e;\n }\n set exponent(value: number) {\n this.e = value;\n }\n\n public static fromComponents(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents(sign, layer, mag);\n }\n\n public static fromComponents_noNormalize(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents_noNormalize(sign, layer, mag);\n }\n\n public static fromMantissaExponent(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent(mantissa, exponent);\n }\n\n public static fromMantissaExponent_noNormalize(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent_noNormalize(mantissa, exponent);\n }\n\n public static fromDecimal(value: Decimal): Decimal {\n return new Decimal().fromDecimal(value);\n }\n\n public static fromNumber(value: number): Decimal {\n return new Decimal().fromNumber(value);\n }\n\n public static fromString(value: string): Decimal {\n return new Decimal().fromString(value);\n }\n\n public static fromValue(value: DecimalSource): Decimal {\n return new Decimal().fromValue(value);\n }\n\n public static fromValue_noAlloc(value: DecimalSource): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n }\n\n public static abs(value: DecimalSource): Decimal {\n return D(value).abs();\n }\n\n public static neg(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negate(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negated(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static sign(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static sgn(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static round(value: DecimalSource): Decimal {\n return D(value).round();\n }\n\n public static floor(value: DecimalSource): Decimal {\n return D(value).floor();\n }\n\n public static ceil(value: DecimalSource): Decimal {\n return D(value).ceil();\n }\n\n public static trunc(value: DecimalSource): Decimal {\n return D(value).trunc();\n }\n\n public static add(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static plus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static sub(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static subtract(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static minus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static mul(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static multiply(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static times(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static div(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static divide(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static recip(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocal(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocate(value: DecimalSource): Decimal {\n return D(value).reciprocate();\n }\n\n public static cmp(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static cmpabs(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmpabs(other);\n }\n\n public static compare(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static isNaN(value: DecimalSource): boolean {\n value = D(value);\n return isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag);\n }\n\n public static isFinite(value: DecimalSource): boolean {\n value = D(value);\n return isFinite(value.sign) && isFinite(value.layer) && isFinite(value.mag);\n }\n\n public static eq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static equals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static neq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).neq(other);\n }\n\n public static notEquals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).notEquals(other);\n }\n\n public static lt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lt(other);\n }\n\n public static lte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lte(other);\n }\n\n public static gt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gt(other);\n }\n\n public static gte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gte(other);\n }\n\n public static max(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).max(other);\n }\n\n public static min(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).min(other);\n }\n\n public static minabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).minabs(other);\n }\n\n public static maxabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).maxabs(other);\n }\n\n public static clamp(value: DecimalSource, min: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clamp(min, max);\n }\n\n public static clampMin(value: DecimalSource, min: DecimalSource): Decimal {\n return D(value).clampMin(min);\n }\n\n public static clampMax(value: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clampMax(max);\n }\n\n public static cmp_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static compare_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static eq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static equals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static neq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).neq_tolerance(other, tolerance);\n }\n\n public static notEquals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).notEquals_tolerance(other, tolerance);\n }\n\n public static lt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lt_tolerance(other, tolerance);\n }\n\n public static lte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lte_tolerance(other, tolerance);\n }\n\n public static gt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gt_tolerance(other, tolerance);\n }\n\n public static gte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gte_tolerance(other, tolerance);\n }\n\n public static pLog10(value: DecimalSource): Decimal {\n return D(value).pLog10();\n }\n\n public static absLog10(value: DecimalSource): Decimal {\n return D(value).absLog10();\n }\n\n public static log10(value: DecimalSource): Decimal {\n return D(value).log10();\n }\n\n public static log(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).log(base);\n }\n\n public static log2(value: DecimalSource): Decimal {\n return D(value).log2();\n }\n\n public static ln(value: DecimalSource): Decimal {\n return D(value).ln();\n }\n\n public static logarithm(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).logarithm(base);\n }\n\n public static pow(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).pow(other);\n }\n\n public static pow10(value: DecimalSource): Decimal {\n return D(value).pow10();\n }\n\n public static root(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).root(other);\n }\n\n public static factorial(value: DecimalSource, _other?: never): Decimal {\n return D(value).factorial();\n }\n\n public static gamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).gamma();\n }\n\n public static lngamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).lngamma();\n }\n\n public static exp(value: DecimalSource): Decimal {\n return D(value).exp();\n }\n\n public static sqr(value: DecimalSource): Decimal {\n return D(value).sqr();\n }\n\n public static sqrt(value: DecimalSource): Decimal {\n return D(value).sqrt();\n }\n\n public static cube(value: DecimalSource): Decimal {\n return D(value).cube();\n }\n\n public static cbrt(value: DecimalSource): Decimal {\n return D(value).cbrt();\n }\n\n public static tetrate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).tetrate(height, payload);\n }\n\n public static iteratedexp(value: DecimalSource, height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return D(value).iteratedexp(height, payload);\n }\n\n public static iteratedlog(value: DecimalSource, base: DecimalSource = 10, times = 1): Decimal {\n return D(value).iteratedlog(base, times);\n }\n\n public static layeradd10(value: DecimalSource, diff: DecimalSource): Decimal {\n return D(value).layeradd10(diff);\n }\n\n public static layeradd(value: DecimalSource, diff: number, base = 10): Decimal {\n return D(value).layeradd(diff, base);\n }\n\n public static slog(value: DecimalSource, base = 10): Decimal {\n return D(value).slog(base);\n }\n\n public static lambertw(value: DecimalSource): Decimal {\n return D(value).lambertw();\n }\n\n public static ssqrt(value: DecimalSource): Decimal {\n return D(value).ssqrt();\n }\n\n public static pentate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).pentate(height, payload);\n }\n\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something\n * with exponentially increasing cost each purchase (start at priceStart,\n * multiply by priceRatio, already own currentOwned), how much of it can you buy?\n * Adapted from Trimps source code.\n */\n\n public static affordGeometricSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordGeometricSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceRatio),\n currentOwned\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it multiplies by priceRatio each purchase?\n */\n\n public static sumGeometricSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumGeometricSeries_core(numItems, D(priceStart), D(priceRatio), currentOwned);\n }\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something with additively\n * increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned),\n * how much of it can you buy?\n */\n\n public static affordArithmeticSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordArithmeticSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it adds priceAdd each purchase?\n * Adapted from http://www.mathwords.com/a/arithmetic_series.htm\n */\n\n public static sumArithmeticSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumArithmeticSeries_core(\n D(numItems),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * When comparing two purchases that cost (resource) and increase your resource/sec by (deltaRpS),\n * the lowest efficiency score is the better one to purchase.\n * From Frozen Cookies:\n * http://cookieclicker.wikia.com/wiki/Frozen_Cookies_(JavaScript_Add-on)#Efficiency.3F_What.27s_that.3F\n */\n\n public static efficiencyOfPurchase(\n cost: DecimalSource,\n currentRpS: DecimalSource,\n deltaRpS: DecimalSource\n ): Decimal {\n return this.efficiencyOfPurchase_core(D(cost), D(currentRpS), D(deltaRpS));\n }\n\n public static randomDecimalForTesting(maxLayers: number): Decimal {\n // NOTE: This doesn't follow any kind of sane random distribution, so use this for testing purposes only.\n //5% of the time, return 0\n if (Math.random() * 20 < 1) {\n return FC_NN(0, 0, 0);\n }\n\n const randomsign = Math.random() > 0.5 ? 1 : -1;\n\n //5% of the time, return 1 or -1\n if (Math.random() * 20 < 1) {\n return FC_NN(randomsign, 0, 1);\n }\n\n //pick a random layer\n const layer = Math.floor(Math.random() * (maxLayers + 1));\n\n let randomexp = layer === 0 ? Math.random() * 616 - 308 : Math.random() * 16;\n //10% of the time, make it a simple power of 10\n if (Math.random() > 0.9) {\n randomexp = Math.trunc(randomexp);\n }\n let randommag = Math.pow(10, randomexp);\n //10% of the time, trunc mag\n if (Math.random() > 0.9) {\n randommag = Math.trunc(randommag);\n }\n return FC(randomsign, layer, randommag);\n }\n\n public static affordGeometricSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n const actualStart = priceStart.mul(priceRatio.pow(currentOwned));\n return Decimal.floor(\n resourcesAvailable\n .div(actualStart)\n .mul(priceRatio.sub(1))\n .add(1)\n .log10()\n .div(priceRatio.log10())\n );\n }\n\n public static sumGeometricSeries_core(\n numItems: DecimalSource,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n return priceStart\n .mul(priceRatio.pow(currentOwned))\n .mul(Decimal.sub(1, priceRatio.pow(numItems)))\n .div(Decimal.sub(1, priceRatio));\n }\n\n public static affordArithmeticSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n // n = (-(a-d/2) + sqrt((a-d/2)^2+2dS))/d\n // where a is actualStart, d is priceAdd and S is resourcesAvailable\n // then floor it and you're done!\n const actualStart = priceStart.add(currentOwned.mul(priceAdd));\n const b = actualStart.sub(priceAdd.div(2));\n const b2 = b.pow(2);\n return b\n .neg()\n .add(b2.add(priceAdd.mul(resourcesAvailable).mul(2)).sqrt())\n .div(priceAdd)\n .floor();\n }\n\n public static sumArithmeticSeries_core(\n numItems: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n const actualStart = priceStart.add(currentOwned.mul(priceAdd)); // (n/2)*(2*a+(n-1)*d)\n\n return numItems.div(2).mul(actualStart.mul(2).plus(numItems.sub(1).mul(priceAdd)));\n }\n\n public static efficiencyOfPurchase_core(\n cost: Decimal,\n currentRpS: Decimal,\n deltaRpS: Decimal\n ): Decimal {\n return cost.div(currentRpS).add(cost.div(deltaRpS));\n }\n\n public [Symbol.for(\"+\")](other: DecimalSource): DecimalSource {\n return this.add(other);\n }\n\n public [Symbol.for(\"-\")](other: DecimalSource): DecimalSource {\n return this.sub(other);\n }\n\n public [Symbol.for(\"*\")](other: DecimalSource): DecimalSource {\n return this.times(other);\n }\n\n public [Symbol.for(\"/\")](other: DecimalSource): DecimalSource {\n return this.div(other);\n }\n\n public [Symbol.for(\"minus\")](): DecimalSource {\n return this.neg();\n }\n\n public [Symbol.for(\"==\")](other: DecimalSource): boolean {\n return this.eq(other);\n }\n\n public [Symbol.for(\">\")](other: DecimalSource): boolean {\n return this.gt(other);\n }\n\n public [Symbol.for(\"<\")](other: DecimalSource): boolean {\n return this.lt(other);\n }\n\n public [Symbol.for(\">=\")](other: DecimalSource): boolean {\n return this.gte(other);\n }\n\n public [Symbol.for(\"<=\")](other: DecimalSource): boolean {\n return this.lte(other);\n }\n\n public [Symbol.for(\"!=\")](other: DecimalSource): boolean {\n return this.neq(other);\n }\n\n public normalize(): this {\n /*\n PSEUDOCODE:\n Whenever we are partially 0 (sign is 0 or mag and layer is 0), make it fully 0.\n Whenever we are at or hit layer 0, extract sign from negative mag.\n If layer === 0 and mag < FIRST_NEG_LAYER (1/9e15), shift to 'first negative layer' (add layer, log10 mag).\n While abs(mag) > EXP_LIMIT (9e15), layer += 1, mag = maglog10(mag).\n While abs(mag) < LAYER_DOWN (15.954) and layer > 0, layer -= 1, mag = pow(10, mag).\n\n When we're done, all of the following should be true OR one of the numbers is not IsFinite OR layer is not IsInteger (error state):\n Any 0 is totally zero (0, 0, 0).\n Anything layer 0 has mag 0 OR mag > 1/9e15 and < 9e15.\n Anything layer 1 or higher has abs(mag) >= 15.954 and < 9e15.\n We will assume in calculations that all Decimals are either erroneous or satisfy these criteria. (Otherwise: Garbage in, garbage out.)\n */\n if (this.sign === 0 || (this.mag === 0 && this.layer === 0)) {\n this.sign = 0;\n this.mag = 0;\n this.layer = 0;\n return this;\n }\n\n if (this.layer === 0 && this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n }\n\n //Handle shifting from layer 0 to negative layers.\n if (this.layer === 0 && this.mag < FIRST_NEG_LAYER) {\n this.layer += 1;\n this.mag = Math.log10(this.mag);\n return this;\n }\n\n let absmag = Math.abs(this.mag);\n let signmag = Math.sign(this.mag);\n\n if (absmag >= EXP_LIMIT) {\n this.layer += 1;\n this.mag = signmag * Math.log10(absmag);\n return this;\n } else {\n while (absmag < LAYER_DOWN && this.layer > 0) {\n this.layer -= 1;\n if (this.layer === 0) {\n this.mag = Math.pow(10, this.mag);\n } else {\n this.mag = signmag * Math.pow(10, absmag);\n absmag = Math.abs(this.mag);\n signmag = Math.sign(this.mag);\n }\n }\n if (this.layer === 0) {\n if (this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n } else if (this.mag === 0) {\n //excessive rounding can give us all zeroes\n this.sign = 0;\n }\n }\n }\n\n return this;\n }\n\n public fromComponents(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n\n this.normalize();\n return this;\n }\n\n public fromComponents_noNormalize(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n return this;\n }\n\n public fromMantissaExponent(mantissa: number, exponent: number): this {\n this.layer = 1;\n this.sign = Math.sign(mantissa);\n mantissa = Math.abs(mantissa);\n this.mag = exponent + Math.log10(mantissa);\n\n this.normalize();\n return this;\n }\n\n public fromMantissaExponent_noNormalize(mantissa: number, exponent: number): this {\n //The idea of 'normalizing' a break_infinity.js style Decimal doesn't really apply. So just do the same thing.\n this.fromMantissaExponent(mantissa, exponent);\n return this;\n }\n\n public fromDecimal(value: Decimal): this {\n this.sign = value.sign;\n this.layer = value.layer;\n this.mag = value.mag;\n return this;\n }\n\n public fromNumber(value: number): this {\n this.mag = Math.abs(value);\n this.sign = Math.sign(value);\n this.layer = 0;\n this.normalize();\n return this;\n }\n\n public fromString(value: string): Decimal {\n if (IGNORE_COMMAS) {\n value = value.replace(\",\", \"\");\n } else if (COMMAS_ARE_DECIMAL_POINTS) {\n value = value.replace(\",\", \".\");\n }\n\n //Handle x^^^y format.\n const pentationparts = value.split(\"^^^\");\n if (pentationparts.length === 2) {\n const base = parseFloat(pentationparts[0]);\n const height = parseFloat(pentationparts[1]);\n const heightparts = pentationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.pentate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^^y format.\n const tetrationparts = value.split(\"^^\");\n if (tetrationparts.length === 2) {\n const base = parseFloat(tetrationparts[0]);\n const height = parseFloat(tetrationparts[1]);\n const heightparts = tetrationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^y format.\n const powparts = value.split(\"^\");\n if (powparts.length === 2) {\n const base = parseFloat(powparts[0]);\n const exponent = parseFloat(powparts[1]);\n if (isFinite(base) && isFinite(exponent)) {\n const result = Decimal.pow(base, exponent);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle various cases involving it being a Big Number.\n value = value.trim().toLowerCase();\n\n //handle X PT Y format.\n let base;\n let height;\n let ptparts = value.split(\"pt\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //handle XpY format (it's the same thing just with p).\n ptparts = value.split(\"p\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n const parts = value.split(\"e\");\n const ecount = parts.length - 1;\n\n //Handle numbers that are exactly floats (0 or 1 es).\n if (ecount === 0) {\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt)) {\n return this.fromNumber(numberAttempt);\n }\n } else if (ecount === 1) {\n //Very small numbers (\"2e-3000\" and so on) may look like valid floats but round to 0.\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt) && numberAttempt !== 0) {\n return this.fromNumber(numberAttempt);\n }\n }\n\n //Handle new (e^N)X format.\n const newparts = value.split(\"e^\");\n if (newparts.length === 2) {\n this.sign = 1;\n if (newparts[0].charAt(0) == \"-\") {\n this.sign = -1;\n }\n let layerstring = \"\";\n for (let i = 0; i < newparts[1].length; ++i) {\n const chrcode = newparts[1].charCodeAt(i);\n if ((chrcode >= 43 && chrcode <= 57) || chrcode === 101) {\n //is \"0\" to \"9\" or \"+\" or \"-\" or \".\" or \"e\" (or \",\" or \"/\")\n layerstring += newparts[1].charAt(i);\n } //we found the end of the layer count\n else {\n this.layer = parseFloat(layerstring);\n this.mag = parseFloat(newparts[1].substr(i + 1));\n this.normalize();\n return this;\n }\n }\n }\n\n if (ecount < 1) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n const mantissa = parseFloat(parts[0]);\n if (mantissa === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n let exponent = parseFloat(parts[parts.length - 1]);\n //handle numbers like AeBeC and AeeeeBeC\n if (ecount >= 2) {\n const me = parseFloat(parts[parts.length - 2]);\n if (isFinite(me)) {\n exponent *= Math.sign(me);\n exponent += f_maglog10(me);\n }\n }\n\n //Handle numbers written like eee... (N es) X\n if (!isFinite(mantissa)) {\n this.sign = parts[0] === \"-\" ? -1 : 1;\n this.layer = ecount;\n this.mag = exponent;\n }\n //Handle numbers written like XeY\n else if (ecount === 1) {\n this.sign = Math.sign(mantissa);\n this.layer = 1;\n //Example: 2e10 is equal to 10^log10(2e10) which is equal to 10^(10+log10(2))\n this.mag = exponent + Math.log10(Math.abs(mantissa));\n }\n //Handle numbers written like Xeee... (N es) Y\n else {\n this.sign = Math.sign(mantissa);\n this.layer = ecount;\n if (ecount === 2) {\n const result = Decimal.mul(FC(1, 2, exponent), D(mantissa));\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n } else {\n //at eee and above, mantissa is too small to be recognizable!\n this.mag = exponent;\n }\n }\n\n this.normalize();\n return this;\n }\n\n public fromValue(value: DecimalSource): Decimal {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n return this.fromDecimal(value);\n }\n\n if (typeof value === \"number\") {\n return this.fromNumber(value);\n }\n\n if (typeof value === \"string\") {\n return this.fromString(value);\n }\n\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n\n public toNumber(): number {\n if (!Number.isFinite(this.layer)) {\n return Number.NaN;\n }\n if (this.layer === 0) {\n return this.sign * this.mag;\n } else if (this.layer === 1) {\n return this.sign * Math.pow(10, this.mag);\n } //overflow for any normalized Decimal\n else {\n return this.mag > 0\n ? this.sign > 0\n ? Number.POSITIVE_INFINITY\n : Number.NEGATIVE_INFINITY\n : 0;\n }\n }\n\n public mantissaWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.m)) {\n return Number.NaN;\n }\n\n if (this.m === 0) {\n return 0;\n }\n\n return decimalPlaces(this.m, places);\n }\n\n public magnitudeWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.mag)) {\n return Number.NaN;\n }\n\n if (this.mag === 0) {\n return 0;\n }\n\n return decimalPlaces(this.mag, places);\n }\n\n public toString(): string {\n if (isNaN(this.layer) || isNaN(this.sign) || isNaN(this.mag)) {\n return \"NaN\";\n }\n if (this.mag === Number.POSITIVE_INFINITY || this.layer === Number.POSITIVE_INFINITY) {\n return this.sign === 1 ? \"Infinity\" : \"-Infinity\";\n }\n\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toString();\n }\n return this.m + \"e\" + this.e;\n } else if (this.layer === 1) {\n return this.m + \"e\" + this.e;\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (this.sign === -1 ? \"-\" : \"\") + \"e\".repeat(this.layer) + this.mag;\n } else {\n return (this.sign === -1 ? \"-\" : \"\") + \"(e^\" + this.layer + \")\" + this.mag;\n }\n }\n }\n\n public toExponential(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toExponential(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toFixed(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toPrecision(places: number): string {\n if (this.e <= -7) {\n return this.toExponential(places - 1);\n }\n\n if (places > this.e) {\n return this.toFixed(places - this.exponent - 1);\n }\n\n return this.toExponential(places - 1);\n }\n\n public valueOf(): string {\n return this.toString();\n }\n\n public toJSON(): string {\n return this.toString();\n }\n\n public toStringWithDecimalPlaces(places: number): string {\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else if (this.layer === 1) {\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"e\".repeat(this.layer) +\n decimalPlaces(this.mag, places)\n );\n } else {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"(e^\" +\n this.layer +\n \")\" +\n decimalPlaces(this.mag, places)\n );\n }\n }\n }\n\n public abs(): Decimal {\n return FC_NN(this.sign === 0 ? 0 : 1, this.layer, this.mag);\n }\n\n public neg(): Decimal {\n return FC_NN(-this.sign, this.layer, this.mag);\n }\n\n public negate(): Decimal {\n return this.neg();\n }\n\n public negated(): Decimal {\n return this.neg();\n }\n\n // public sign () {\n // return this.sign;\n // }\n\n public sgn(): number {\n return this.sign;\n }\n\n public round(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.round(this.mag));\n }\n return this;\n }\n\n public floor(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.floor(this.mag));\n }\n return this;\n }\n\n public ceil(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.ceil(this.mag));\n }\n return this;\n }\n\n public trunc(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.trunc(this.mag));\n }\n return this;\n }\n\n public add(value: DecimalSource): this | Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return the other number.\n if (this.sign === 0) {\n return decimal;\n }\n if (decimal.sign === 0) {\n return this;\n }\n\n //Special case - Adding a number to its negation produces 0, no matter how large.\n if (\n this.sign === -decimal.sign &&\n this.layer === decimal.layer &&\n this.mag === decimal.mag\n ) {\n return FC_NN(0, 0, 0);\n }\n\n let a;\n let b;\n\n //Special case: If one of the numbers is layer 2 or higher, just take the bigger number.\n if (this.layer >= 2 || decimal.layer >= 2) {\n return this.maxabs(decimal);\n }\n\n if (Decimal.cmpabs(this, decimal) > 0) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * a.mag + b.sign * b.mag);\n }\n\n const layera = a.layer * Math.sign(a.mag);\n const layerb = b.layer * Math.sign(b.mag);\n\n //If one of the numbers is 2+ layers higher than the other, just take the bigger number.\n if (layera - layerb >= 2) {\n return a;\n }\n\n if (layera === 0 && layerb === -1) {\n if (Math.abs(b.mag - Math.log10(a.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, Math.log10(a.mag) - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n }\n\n if (layera === 1 && layerb === 0) {\n if (Math.abs(a.mag - Math.log10(b.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - Math.log10(b.mag));\n const mantissa = b.sign + a.sign * magdiff;\n return FC(\n Math.sign(mantissa),\n 1,\n Math.log10(b.mag) + Math.log10(Math.abs(mantissa))\n );\n }\n }\n\n if (Math.abs(a.mag - b.mag) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n\n throw Error(\"Bad arguments to add: \" + this + \", \" + value);\n }\n\n public plus(value: DecimalSource): Decimal {\n return this.add(value);\n }\n\n public sub(value: DecimalSource): Decimal {\n return this.add(D(value).neg());\n }\n\n public subtract(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public minus(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public mul(value: DecimalSource): Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return 0.\n if (this.sign === 0 || decimal.sign === 0) {\n return FC_NN(0, 0, 0);\n }\n\n //Special case - Multiplying a number by its own reciprocal yields +/- 1, no matter how large.\n if (this.layer === decimal.layer && this.mag === -decimal.mag) {\n return FC_NN(this.sign * decimal.sign, 0, 1);\n }\n\n let a;\n let b;\n\n //Which number is bigger in terms of its multiplicative distance from 1?\n if (\n this.layer > decimal.layer ||\n (this.layer == decimal.layer && Math.abs(this.mag) > Math.abs(decimal.mag))\n ) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * b.sign * a.mag * b.mag);\n }\n\n //Special case: If one of the numbers is layer 3 or higher or one of the numbers is 2+ layers bigger than the other, just take the bigger number.\n if (a.layer >= 3 || a.layer - b.layer >= 2) {\n return FC(a.sign * b.sign, a.layer, a.mag);\n }\n\n if (a.layer === 1 && b.layer === 0) {\n return FC(a.sign * b.sign, 1, a.mag + Math.log10(b.mag));\n }\n\n if (a.layer === 1 && b.layer === 1) {\n return FC(a.sign * b.sign, 1, a.mag + b.mag);\n }\n\n if (a.layer === 2 && b.layer === 1) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n if (a.layer === 2 && b.layer === 2) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n throw Error(\"Bad arguments to mul: \" + this + \", \" + value);\n }\n\n public multiply(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public times(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public div(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.mul(decimal.recip());\n }\n\n public divide(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public divideBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public dividedBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public recip(): Decimal {\n if (this.mag === 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, 1 / this.mag);\n } else {\n return FC(this.sign, this.layer, -this.mag);\n }\n }\n\n public reciprocal(): Decimal {\n return this.recip();\n }\n\n public reciprocate(): Decimal {\n return this.recip();\n }\n\n /**\n * -1 for less than value, 0 for equals value, 1 for greater than value\n */\n public cmp(value: DecimalSource): CompareResult {\n const decimal = D(value);\n if (this.sign > decimal.sign) {\n return 1;\n }\n if (this.sign < decimal.sign) {\n return -1;\n }\n return (this.sign * this.cmpabs(value)) as CompareResult;\n }\n\n public cmpabs(value: DecimalSource): CompareResult {\n const decimal = D(value);\n const layera = this.mag > 0 ? this.layer : -this.layer;\n const layerb = decimal.mag > 0 ? decimal.layer : -decimal.layer;\n if (layera > layerb) {\n return 1;\n }\n if (layera < layerb) {\n return -1;\n }\n if (this.mag > decimal.mag) {\n return 1;\n }\n if (this.mag < decimal.mag) {\n return -1;\n }\n return 0;\n }\n\n public compare(value: DecimalSource): CompareResult {\n return this.cmp(value);\n }\n\n public isNan(): boolean {\n return isNaN(this.sign) || isNaN(this.layer) || isNaN(this.mag);\n }\n\n public isFinite(): boolean {\n return isFinite(this.sign) && isFinite(this.layer) && isFinite(this.mag);\n }\n\n public eq(value: DecimalSource): boolean {\n const decimal = D(value);\n return (\n this.sign === decimal.sign && this.layer === decimal.layer && this.mag === decimal.mag\n );\n }\n\n public equals(value: DecimalSource): boolean {\n return this.eq(value);\n }\n\n public neq(value: DecimalSource): boolean {\n return !this.eq(value);\n }\n\n public notEquals(value: DecimalSource): boolean {\n return this.neq(value);\n }\n\n public lt(value: DecimalSource): boolean {\n return this.cmp(value) === -1;\n }\n\n public lte(value: DecimalSource): boolean {\n return !this.gt(value);\n }\n\n public gt(value: DecimalSource): boolean {\n return this.cmp(value) === 1;\n }\n\n public gte(value: DecimalSource): boolean {\n return !this.lt(value);\n }\n\n public max(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.lt(decimal) ? decimal : this;\n }\n\n public min(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.gt(decimal) ? decimal : this;\n }\n\n public maxabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) < 0 ? decimal : this;\n }\n\n public minabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) > 0 ? decimal : this;\n }\n\n public clamp(min: DecimalSource, max: DecimalSource): Decimal {\n return this.max(min).min(max);\n }\n\n public clampMin(min: DecimalSource): Decimal {\n return this.max(min);\n }\n\n public clampMax(max: DecimalSource): Decimal {\n return this.min(max);\n }\n\n public cmp_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) ? 0 : this.cmp(decimal);\n }\n\n public compare_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n return this.cmp_tolerance(value, tolerance);\n }\n\n /**\n * Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments.\n * For example, if you put in 1e-9, then any number closer to the\n * larger number than (larger number)*1e-9 will be considered equal.\n */\n public eq_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value); // https://stackoverflow.com/a/33024979\n if (tolerance == null) {\n tolerance = 1e-7;\n }\n //Numbers that are too far away are never close.\n if (this.sign !== decimal.sign) {\n return false;\n }\n if (Math.abs(this.layer - decimal.layer) > 1) {\n return false;\n }\n // return abs(a-b) <= tolerance * max(abs(a), abs(b))\n let magA = this.mag;\n let magB = decimal.mag;\n if (this.layer > decimal.layer) {\n magB = f_maglog10(magB);\n }\n if (this.layer < decimal.layer) {\n magA = f_maglog10(magA);\n }\n return Math.abs(magA - magB) <= tolerance * Math.max(Math.abs(magA), Math.abs(magB));\n }\n\n public equals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.eq_tolerance(value, tolerance);\n }\n\n public neq_tolerance(value: DecimalSource, tolerance: number): boolean {\n return !this.eq_tolerance(value, tolerance);\n }\n\n public notEquals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.neq_tolerance(value, tolerance);\n }\n\n public lt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.lt(decimal);\n }\n\n public lte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.lt(decimal);\n }\n\n public gt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.gt(decimal);\n }\n\n public gte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.gt(decimal);\n }\n\n public pLog10(): Decimal {\n if (this.lt(Decimal.dZero)) {\n return Decimal.dZero;\n }\n return this.log10();\n }\n\n public absLog10(): Decimal {\n if (this.sign === 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(1, 0, Math.log10(this.mag));\n }\n }\n\n public log10(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(this.sign, 0, Math.log10(this.mag));\n }\n }\n\n public log(base: DecimalSource): Decimal {\n base = D(base);\n if (this.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign === 1 && base.layer === 0 && base.mag === 1) {\n return Decimal.dNaN;\n } else if (this.layer === 0 && base.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag) / Math.log(base.mag));\n }\n\n return Decimal.div(this.log10(), base.log10());\n }\n\n public log2(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log2(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 3.321928094887362); //log2(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.5213902276543247); //-log10(log10(2))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public ln(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 2.302585092994046); //ln(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.36221568869946325); //log10(log10(e))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public logarithm(base: DecimalSource): Decimal {\n return this.log(base);\n }\n\n public pow(value: DecimalSource): Decimal {\n const decimal = D(value);\n const a = this;\n const b = decimal;\n\n //special case: if a is 0, then return 0 (UNLESS b is 0, then return 1)\n if (a.sign === 0) {\n return b.eq(0) ? FC_NN(1, 0, 1) : a;\n }\n //special case: if a is 1, then return 1\n if (a.sign === 1 && a.layer === 0 && a.mag === 1) {\n return a;\n }\n //special case: if b is 0, then return 1\n if (b.sign === 0) {\n return FC_NN(1, 0, 1);\n }\n //special case: if b is 1, then return a\n if (b.sign === 1 && b.layer === 0 && b.mag === 1) {\n return a;\n }\n\n const result = a\n .absLog10()\n .mul(b)\n .pow10();\n\n if (this.sign === -1) {\n if (Math.abs(b.toNumber() % 2) % 2 === 1) {\n return result.neg();\n } else if (Math.abs(b.toNumber() % 2) % 2 === 0) {\n return result;\n }\n return Decimal.dNaN;\n }\n\n return result;\n }\n\n public pow10(): Decimal {\n /*\n There are four cases we need to consider:\n 1) positive sign, positive mag (e15, ee15): +1 layer (e.g. 10^15 becomes e15, 10^e15 becomes ee15)\n 2) negative sign, positive mag (-e15, -ee15): +1 layer but sign and mag sign are flipped (e.g. 10^-15 becomes e-15, 10^-e15 becomes ee-15)\n 3) positive sign, negative mag (e-15, ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n 4) negative sign, negative mag (-e-15, -ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n */\n\n if (!Number.isFinite(this.layer) || !Number.isFinite(this.mag)) {\n return Decimal.dNaN;\n }\n\n let a = this;\n\n //handle layer 0 case - if no precision is lost just use Math.pow, else promote one layer\n if (a.layer === 0) {\n const newmag = Math.pow(10, a.sign * a.mag);\n if (Number.isFinite(newmag) && Math.abs(newmag) >= 0.1) {\n return FC(1, 0, newmag);\n } else {\n if (a.sign === 0) {\n return Decimal.dOne;\n } else {\n a = FC_NN(a.sign, a.layer + 1, Math.log10(a.mag)) as this;\n }\n }\n }\n\n //handle all 4 layer 1+ cases individually\n if (a.sign > 0 && a.mag >= 0) {\n return FC(a.sign, a.layer + 1, a.mag);\n }\n if (a.sign < 0 && a.mag >= 0) {\n return FC(-a.sign, a.layer + 1, -a.mag);\n }\n //both the negative mag cases are identical: one +/- rounding error\n return Decimal.dOne;\n }\n\n public pow_base(value: DecimalSource): Decimal {\n return D(value).pow(this);\n }\n\n public root(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.pow(decimal.recip());\n }\n\n public factorial(): Decimal {\n if (this.mag < 0) {\n return this.add(1).gamma();\n } else if (this.layer === 0) {\n return this.add(1).gamma();\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n //from HyperCalc source code\n public gamma(): Decimal {\n if (this.mag < 0) {\n return this.recip();\n } else if (this.layer === 0) {\n if (this.lt(FC_NN(1, 0, 24))) {\n return D(f_gamma(this.sign * this.mag));\n }\n\n const t = this.mag - 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (t + 0.5) * Math.log(t);\n l = l - t;\n const n2 = t * t;\n let np = t;\n let lm = 12 * np;\n let adj = 1 / lm;\n let l2 = l + adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 360 * np;\n adj = 1 / lm;\n l2 = l - adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 1260 * np;\n let lt = 1 / lm;\n l = l + lt;\n np = np * n2;\n lm = 1680 * np;\n lt = 1 / lm;\n l = l - lt;\n return Decimal.exp(l);\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n public lngamma(): Decimal {\n return this.gamma().ln();\n }\n\n public exp(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0 && this.mag <= 709.7) {\n return D(Math.exp(this.sign * this.mag));\n } else if (this.layer === 0) {\n return FC(1, 1, this.sign * Math.log10(Math.E) * this.mag);\n } else if (this.layer === 1) {\n return FC(1, 2, this.sign * (Math.log10(0.4342944819032518) + this.mag));\n } else {\n return FC(1, this.layer + 1, this.sign * this.mag);\n }\n }\n\n public sqr(): Decimal {\n return this.pow(2);\n }\n\n public sqrt(): Decimal {\n if (this.layer === 0) {\n return D(Math.sqrt(this.sign * this.mag));\n } else if (this.layer === 1) {\n return FC(1, 2, Math.log10(this.mag) - 0.3010299956639812);\n } else {\n const result = Decimal.div(FC_NN(this.sign, this.layer - 1, this.mag), FC_NN(1, 0, 2));\n result.layer += 1;\n result.normalize();\n return result;\n }\n }\n\n public cube(): Decimal {\n return this.pow(3);\n }\n\n public cbrt(): Decimal {\n return this.pow(1 / 3);\n }\n\n //Tetration/tetrate: The result of exponentiating 'this' to 'this' 'height' times in a row. https://en.wikipedia.org/wiki/Tetration\n //If payload != 1, then this is 'iterated exponentiation', the result of exping (payload) to base (this) (height) times. https://andydude.github.io/tetration/archives/tetration2/ident.html\n //Works with negative and positive real heights.\n public tetrate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n //x^^1 == x\n if (height === 1) {\n return Decimal.pow(this, payload);\n }\n //x^^0 == 1\n if (height === 0) {\n return new Decimal(payload);\n }\n //1^^x == 1\n if (this.eq(Decimal.dOne)) {\n return Decimal.dOne;\n }\n //-1^^x == -1\n if (this.eq(-1)) {\n return Decimal.pow(this, payload);\n }\n\n if (height === Number.POSITIVE_INFINITY) {\n const this_num = this.toNumber();\n //within the convergence range?\n if (this_num <= 1.44466786100976613366 && this_num >= 0.06598803584531253708) {\n //hotfix for the very edge of the number range not being handled properly\n if (this_num > 1.444667861009099) {\n return new Decimal(Math.E);\n }\n //Formula for infinite height power tower.\n const negln = Decimal.ln(this).neg();\n return negln.lambertw().div(negln);\n } else if (this_num > 1.44466786100976613366) {\n //explodes to infinity\n return new Decimal(Number.POSITIVE_INFINITY);\n } else {\n //0.06598803584531253708 > this_num >= 0: never converges\n //this_num < 0: quickly becomes a complex number\n return Decimal.dNaN;\n }\n }\n\n //0^^x oscillates if we define 0^0 == 1 (which in javascript land we do), since then 0^^1 is 0, 0^^2 is 1, 0^^3 is 0, etc. payload is ignored\n //using the linear approximation for height (TODO: don't know a better way to calculate it ATM, but it wouldn't surprise me if it's just NaN)\n if (this.eq(Decimal.dZero)) {\n let result = Math.abs((height + 1) % 2);\n if (result > 1) {\n result = 2 - result;\n }\n return new Decimal(result);\n }\n\n if (height < 0) {\n return Decimal.iteratedlog(payload, this, -height);\n }\n\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n if (this.gt(Decimal.dZero) && this.lte(1.44466786100976613366)) {\n //similar to 0^^n, flip-flops between two values, converging slowly (or if it's below 0.06598803584531253708, never. so once again, the fractional part at the end will be a linear approximation (TODO: again pending knowledge of how to approximate better, although tbh I think it should in reality just be NaN)\n height = Math.min(10000, height);\n for (let i = 0; i < height; ++i) {\n const old_payload: Decimal = payload;\n payload = this.pow(payload);\n //stop early if we converge\n if (old_payload.eq(payload)) {\n return payload;\n }\n }\n if (fracheight != 0) {\n const next_payload = this.pow(payload);\n return payload.mul(1 - fracheight).add(next_payload.mul(fracheight));\n }\n return payload;\n }\n //TODO: base < 0, but it's hard for me to reason about (probably all non-integer heights are NaN automatically?)\n\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (this.gt(10)) {\n payload = this.pow(fracheight);\n } else {\n payload = D(Decimal.tetrate_critical(this.toNumber(), fracheight));\n //TODO: until the critical section grid can handle numbers below 2, scale them to the base\n //TODO: maybe once the critical section grid has very large bases, this math can be appropriate for them too? I'll think about it\n if (this.lt(2)) {\n payload = payload\n .sub(1)\n .mul(this.minus(1))\n .plus(1);\n }\n }\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.pow(payload);\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //shortcut\n if (payload.layer - this.layer > 3) {\n return FC_NN(payload.sign, payload.layer + (height - i - 1), payload.mag);\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return payload;\n }\n }\n return payload;\n }\n\n //iteratedexp/iterated exponentiation: - all cases handled in tetrate, so just call it\n public iteratedexp(height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return this.tetrate(height, payload);\n }\n\n //iterated log/repeated log: The result of applying log(base) 'times' times in a row. Approximately equal to subtracting (times) from the number's slog representation. Equivalent to tetrating to a negative height.\n //Works with negative and positive real heights.\n public iteratedlog(base: DecimalSource = 10, times = 1): Decimal {\n if (times < 0) {\n return Decimal.tetrate(base, -times, this);\n }\n\n base = D(base);\n let result = D(this);\n const fulltimes = times;\n times = Math.trunc(times);\n const fraction = fulltimes - times;\n if (result.layer - base.layer > 3) {\n const layerloss = Math.min(times, result.layer - base.layer - 3);\n times -= layerloss;\n result.layer -= layerloss;\n }\n\n for (let i = 0; i < times; ++i) {\n result = result.log(base);\n //bail if we're NaN\n if (!isFinite(result.layer) || !isFinite(result.mag)) {\n return result.normalize();\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return result;\n }\n }\n\n //handle fractional part\n if (fraction > 0 && fraction < 1) {\n if (base.eq(10)) {\n result = result.layeradd10(-fraction);\n } else {\n result = result.layeradd(-fraction, base);\n }\n }\n\n return result;\n }\n\n //Super-logarithm, one of tetration's inverses, tells you what size power tower you'd have to tetrate base to to get number. By definition, will never be higher than 1.8e308 in break_eternity.js, since a power tower 1.8e308 numbers tall is the largest representable number.\n // https://en.wikipedia.org/wiki/Super-logarithm\n public slog(base: DecimalSource = 10): Decimal {\n base = D(base);\n\n //special cases:\n //slog base 0 or lower is NaN\n if (base.lte(Decimal.dZero)) {\n return Decimal.dNaN;\n }\n //slog base 1 is NaN\n if (base.eq(Decimal.dOne)) {\n return Decimal.dNaN;\n }\n //need to handle these small, wobbling bases specially\n if (base.lt(Decimal.dOne)) {\n if (this.eq(Decimal.dOne)) {\n return Decimal.dZero;\n }\n if (this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n //0 < this < 1: ambiguous (happens multiple times)\n //this < 0: impossible (as far as I can tell)\n //this > 1: partially complex (http://myweb.astate.edu/wpaulsen/tetcalc/tetcalc.html base 0.25 for proof)\n return Decimal.dNaN;\n }\n //slog_n(0) is -1\n if (this.mag < 0 || this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n\n let result = 0;\n let copy = D(this);\n if (copy.layer - base.layer > 3) {\n const layerloss = copy.layer - base.layer - 3;\n result += layerloss;\n copy.layer -= layerloss;\n }\n\n for (let i = 0; i < 100; ++i) {\n if (copy.lt(Decimal.dZero)) {\n copy = Decimal.pow(base, copy);\n result -= 1;\n } else if (copy.lte(Decimal.dOne)) {\n return D(result + Decimal.slog_critical(base.toNumber(), copy.toNumber()));\n } else {\n result += 1;\n copy = Decimal.log(copy, base);\n }\n }\n return D(result);\n }\n\n //background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\n public static slog_critical(base: number, height: number): number {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (base > 10) {\n return height - 1;\n }\n return Decimal.critical_section(base, height, critical_slog_values);\n }\n\n public static tetrate_critical(base: number, height: number): number {\n return Decimal.critical_section(base, height, critical_tetr_values);\n }\n\n public static critical_section(base: number, height: number, grid: number[][]): number {\n //this part is simple at least, since it's just 0.1 to 0.9\n height *= 10;\n if (height < 0) {\n height = 0;\n }\n if (height > 10) {\n height = 10;\n }\n //have to do this complicated song and dance since one of the critical_headers is Math.E, and in the future I'd like 1.5 as well\n if (base < 2) {\n base = 2;\n }\n if (base > 10) {\n base = 10;\n }\n let lower = 0;\n let upper = 0;\n //basically, if we're between bases, we interpolate each bases' relevant values together\n //then we interpolate based on what the fractional height is.\n //accuracy could be improved by doing a non-linear interpolation (maybe), by adding more bases and heights (definitely) but this is AFAIK the best you can get without running some pari.gp or mathematica program to calculate exact values\n for (let i = 0; i < critical_headers.length; ++i) {\n if (critical_headers[i] == base) {\n // exact match\n lower = grid[i][Math.floor(height)];\n upper = grid[i][Math.ceil(height)];\n break;\n } else if (critical_headers[i] < base && critical_headers[i + 1] > base) {\n // interpolate between this and the next\n const basefrac =\n (base - critical_headers[i]) / (critical_headers[i + 1] - critical_headers[i]);\n lower =\n grid[i][Math.floor(height)] * (1 - basefrac) +\n grid[i + 1][Math.floor(height)] * basefrac;\n upper =\n grid[i][Math.ceil(height)] * (1 - basefrac) +\n grid[i + 1][Math.ceil(height)] * basefrac;\n break;\n }\n }\n const frac = height - Math.floor(height);\n const result = lower * (1 - frac) + upper * frac;\n return result;\n }\n\n //Function for adding/removing layers from a Decimal, even fractional layers (e.g. its slog10 representation).\n //Moved this over to use the same critical section as tetrate/slog.\n public layeradd10(diff: DecimalSource): Decimal {\n diff = Decimal.fromValue_noAlloc(diff).toNumber();\n const result = D(this);\n if (diff >= 1) {\n //bug fix: if result is very smol (mag < 0, layer > 0) turn it into 0 first\n if (result.mag < 0 && result.layer > 0) {\n result.sign = 0;\n result.mag = 0;\n result.layer = 0;\n } else if (result.sign === -1 && result.layer == 0) {\n //bug fix - for stuff like -3.layeradd10(1) we need to move the sign to the mag\n result.sign = 1;\n result.mag = -result.mag;\n }\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n }\n if (diff <= -1) {\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n if (result.layer < 0) {\n for (let i = 0; i < 100; ++i) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n if (!isFinite(result.mag)) {\n //another bugfix: if we hit -Infinity mag, then we should return negative infinity, not 0. 0.layeradd10(-1) h its this\n if (result.sign === 0) {\n result.sign = 1;\n }\n //also this, for 0.layeradd10(-2)\n if (result.layer < 0) {\n result.layer = 0;\n }\n return result.normalize();\n }\n if (result.layer >= 0) {\n break;\n }\n }\n }\n }\n\n while (result.layer < 0) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n }\n //bugfix: before we normalize: if we started with 0, we now need to manually fix a layer ourselves!\n if (result.sign === 0) {\n result.sign = 1;\n if (result.mag === 0 && result.layer >= 1) {\n result.layer -= 1;\n result.mag = 1;\n }\n }\n result.normalize();\n\n //layeradd10: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 10 and iterated log base 10. Also equivalent to adding a fractional amount to the number's layer in its break_eternity.js representation.\n if (diff !== 0) {\n return result.layeradd(diff, 10); //safe, only calls positive height 1 payload tetration, slog and log\n }\n\n return result;\n }\n\n //layeradd: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 'base' and iterated log base 'base'.\n public layeradd(diff: number, base: DecimalSource): Decimal {\n const slogthis = this.slog(base).toNumber();\n const slogdest = slogthis + diff;\n if (slogdest >= 0) {\n return Decimal.tetrate(base, slogdest);\n } else if (!Number.isFinite(slogdest)) {\n return Decimal.dNaN;\n } else if (slogdest >= -1) {\n return Decimal.log(Decimal.tetrate(base, slogdest + 1), base);\n } else {\n return Decimal.log(Decimal.log(Decimal.tetrate(base, slogdest + 2), base), base);\n }\n }\n\n //The Lambert W function, also called the omega function or product logarithm, is the solution W(x) === x*e^x.\n // https://en.wikipedia.org/wiki/Lambert_W_function\n //Some special values, for testing: https://en.wikipedia.org/wiki/Lambert_W_function#Special_values\n public lambertw(): Decimal {\n if (this.lt(-0.3678794411710499)) {\n throw Error(\"lambertw is unimplemented for results less than -1, sorry!\");\n } else if (this.mag < 0) {\n return D(f_lambertw(this.toNumber()));\n } else if (this.layer === 0) {\n return D(f_lambertw(this.sign * this.mag));\n } else if (this.layer === 1) {\n return d_lambertw(this);\n } else if (this.layer === 2) {\n return d_lambertw(this);\n }\n if (this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n\n throw \"Unhandled behavior in lambertw()\";\n }\n\n //The super square-root function - what number, tetrated to height 2, equals this?\n //Other sroots are possible to calculate probably through guess and check methods, this one is easy though.\n // https://en.wikipedia.org/wiki/Tetration#Super-root\n public ssqrt(): Decimal {\n if (this.sign == 1 && this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n const lnx = this.ln();\n return lnx.div(lnx.lambertw());\n }\n /*\n\nUnit tests for tetrate/iteratedexp/iteratedlog/layeradd10/layeradd/slog:\n(note: these won't be exactly precise with the new slog implementation, but that's okay)\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var expected = first+both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(-both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n var expected = first+both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(-both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar tetrateonly = Decimal.tetrate(10, first);\nvar tetrateandlog = Decimal.tetrate(10, first+both).iteratedlog(10, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first);\nvar tetrateandlog = Decimal.tetrate(base, first+both).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first, base);\nvar tetrateandlog = Decimal.tetrate(base, first+both, base).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.random()*100);\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.exp(Math.random()*100));\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n var b = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.add(b).toNumber();\n if (Number.isFinite(c) && !Decimal.eq_tolerance(c, a.toNumber()+b.toNumber()))\n {\n console.log(a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 100; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.mul(b).toNumber();\n if (Number.isFinite(c) && Number.isFinite(a.toNumber()) && Number.isFinite(b.toNumber()) && a.toNumber() != 0 && b.toNumber() != 0 && c != 0 && !Decimal.eq_tolerance(c, a.toNumber()*b.toNumber()))\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n else if (!Decimal.mul(a.recip(), b.recip()).eq_tolerance(Decimal.mul(a, b).recip()))\n {\n console.log(\"Test 3: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5 && a.sign !== 0) { a = a.recip(); }\n if (Math.random() > 0.5 && b.sign !== 0) { b = b.recip(); }\n var c = a.pow(b);\n var d = a.root(b.recip());\n var e = a.pow(b.recip());\n var f = a.root(b);\n\n if (!c.eq_tolerance(d) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n if (!e.eq_tolerance(f) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 2: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Math.round(Math.random()*18-9);\n var b = Math.round(Math.random()*100-50);\n var c = Math.round(Math.random()*18-9);\n var d = Math.round(Math.random()*100-50);\n console.log(\"Decimal.pow(Decimal.fromMantissaExponent(\" + a + \", \" + b + \"), Decimal.fromMantissaExponent(\" + c + \", \" + d + \")).toString()\");\n}\n\n*/\n\n //Pentation/pentate: The result of tetrating 'height' times in a row. An absurdly strong operator - Decimal.pentate(2, 4.28) and Decimal.pentate(10, 2.37) are already too huge for break_eternity.js!\n // https://en.wikipedia.org/wiki/Pentation\n public pentate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n //I have no idea if this is a meaningful approximation for pentation to continuous heights, but it is monotonic and continuous.\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n ++height;\n payload = new Decimal(fracheight);\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.tetrate(payload.toNumber());\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //give up after 10 iterations if nothing is happening\n if (i > 10) {\n return payload;\n }\n }\n\n return payload;\n }\n\n // trig functions!\n public sin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.sin(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public cos(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0) {\n return D(Math.cos(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public tan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.tan(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public asin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.asin(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public acos(): Decimal {\n if (this.mag < 0) {\n return D(Math.acos(this.toNumber()));\n }\n if (this.layer === 0) {\n return D(Math.acos(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public atan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.atan(this.sign * this.mag));\n }\n return D(Math.atan(this.sign * 1.8e308));\n }\n\n public sinh(): Decimal {\n return this.exp()\n .sub(this.negate().exp())\n .div(2);\n }\n\n public cosh(): Decimal {\n return this.exp()\n .add(this.negate().exp())\n .div(2);\n }\n\n public tanh(): Decimal {\n return this.sinh().div(this.cosh());\n }\n\n public asinh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .add(1)\n .sqrt()\n )\n );\n }\n\n public acosh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .sub(1)\n .sqrt()\n )\n );\n }\n\n public atanh(): Decimal {\n if (this.abs().gte(1)) {\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n return Decimal.ln(this.add(1).div(D(1).sub(this))).div(2);\n }\n\n /**\n * Joke function from Realm Grinder\n */\n public ascensionPenalty(ascensions: DecimalSource): Decimal {\n if (ascensions === 0) {\n return this;\n }\n\n return this.root(Decimal.pow(10, ascensions));\n }\n\n /**\n * Joke function from Cookie Clicker. It's 'egg'\n */\n public egg(): Decimal {\n return this.add(9);\n }\n\n public lessThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) < 1;\n }\n\n public lessThan(other: DecimalSource): boolean {\n return this.cmp(other) < 0;\n }\n\n public greaterThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) > -1;\n }\n\n public greaterThan(other: DecimalSource): boolean {\n return this.cmp(other) > 0;\n }\n\n // return Decimal;\n}\n\n// return Decimal;\n","import Decimal, { DecimalSource } from \"lib/break_eternity\";\nimport projInfo from \"data/projInfo.json\";\n\nexport default Decimal;\n\nconst decimalOne = new Decimal(1);\n\nexport function exponentialFormat(num: DecimalSource, precision: number, mantissa = true): string {\n let e = Decimal.log10(num).floor();\n let m = Decimal.div(num, Decimal.pow(10, e));\n if (m.toStringWithDecimalPlaces(precision) === \"10\") {\n m = decimalOne;\n e = e.add(1);\n }\n const eString = e.gte(1e9)\n ? format(e, Math.max(Math.max(precision, 3), projInfo.defaultDecimalsShown))\n : e.gte(10000)\n ? commaFormat(e, 0)\n : e.toStringWithDecimalPlaces(0);\n if (mantissa) {\n return m.toStringWithDecimalPlaces(precision) + \"e\" + eString;\n } else {\n return \"e\" + eString;\n }\n}\n\nexport function commaFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.001) {\n return (0).toFixed(precision);\n }\n const init = num.toStringWithDecimalPlaces(precision);\n const portions = init.split(\".\");\n portions[0] = portions[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1,\");\n if (portions.length == 1) return portions[0];\n return portions[0] + \".\" + portions[1];\n}\n\nexport function regularFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.0001) {\n return (0).toFixed(precision);\n }\n if (num.mag < 0.1 && precision !== 0) {\n precision = Math.max(Math.max(precision, 4), projInfo.defaultDecimalsShown);\n }\n return num.toStringWithDecimalPlaces(precision);\n}\n\nconst eeee1000 = new Decimal(\"eeee1000\");\nconst e100000 = new Decimal(\"e100000\");\nconst e1000 = new Decimal(\"e1000\");\nconst e9 = new Decimal(1e9);\nconst e6 = new Decimal(1e6);\nconst e3 = new Decimal(1e3);\nconst nearOne = new Decimal(0.98);\nconst thousandth = new Decimal(0.001);\nconst zero = new Decimal(0);\nexport function format(num: DecimalSource, precision?: number, small?: boolean): string {\n if (precision == null) precision = projInfo.defaultDecimalsShown;\n small = small ?? projInfo.defaultShowSmall;\n num = new Decimal(num);\n if (isNaN(num.sign) || isNaN(num.layer) || isNaN(num.mag)) {\n return \"NaN\";\n }\n if (num.sign < 0) {\n return \"-\" + format(num.neg(), precision);\n }\n if (num.mag === Number.POSITIVE_INFINITY) {\n return \"Infinity\";\n }\n if (num.gte(eeee1000)) {\n const slog = num.slog();\n if (slog.gte(e6)) {\n return \"F\" + format(slog.floor());\n } else {\n return (\n Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) +\n \"F\" +\n commaFormat(slog.floor(), 0)\n );\n }\n } else if (num.gte(e100000)) {\n return exponentialFormat(num, 0, false);\n } else if (num.gte(e1000)) {\n return exponentialFormat(num, 0);\n } else if (num.gte(e9)) {\n return exponentialFormat(num, precision);\n } else if (num.gte(e3)) {\n return commaFormat(num, 0);\n } else if (num.gte(thousandth) || !small) {\n return regularFormat(num, precision);\n } else if (num.eq(zero)) {\n return (0).toFixed(precision);\n }\n\n num = invertOOM(num);\n if (num.lt(e1000)) {\n const val = exponentialFormat(num, precision);\n return val.replace(/([^(?:e|F)]*)$/, \"-$1\");\n } else {\n return format(num, precision) + \"⁻¹\";\n }\n}\n\nexport function formatWhole(num: DecimalSource): string {\n num = new Decimal(num);\n if (num.sign < 0) {\n return \"-\" + formatWhole(num.neg());\n }\n if (num.gte(e9)) {\n return format(num);\n }\n if (num.lte(nearOne) && !num.eq(zero)) {\n return format(num);\n }\n return format(num, 0);\n}\n\nexport function formatTime(seconds: DecimalSource): string {\n if (Decimal.lt(seconds, 0)) {\n return \"-\" + formatTime(Decimal.neg(seconds));\n }\n if (Decimal.gt(seconds, 2 ** 51)) {\n // integer precision limit\n return format(Decimal.div(seconds, 31536000)) + \"y\";\n }\n seconds = new Decimal(seconds).toNumber();\n if (seconds < 60) {\n return format(seconds) + \"s\";\n } else if (seconds < 3600) {\n return formatWhole(Math.floor(seconds / 60)) + \"m \" + format(seconds % 60) + \"s\";\n } else if (seconds < 86400) {\n return (\n formatWhole(Math.floor(seconds / 3600)) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m \" +\n formatWhole(seconds % 60) +\n \"s\"\n );\n } else if (seconds < 31536000) {\n return (\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m\"\n );\n } else {\n return (\n formatWhole(Math.floor(seconds / 31536000)) +\n \"y \" +\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h\"\n );\n }\n}\n\nexport function toPlaces(x: DecimalSource, precision: number, maxAccepted: DecimalSource): string {\n x = new Decimal(x);\n let result = x.toStringWithDecimalPlaces(precision);\n if (new Decimal(result).gte(maxAccepted)) {\n result = Decimal.sub(maxAccepted, Math.pow(0.1, precision)).toStringWithDecimalPlaces(\n precision\n );\n }\n return result;\n}\n\n// Will also display very small numbers\nexport function formatSmall(x: DecimalSource, precision?: number): string {\n return format(x, precision, true);\n}\n\nexport function invertOOM(x: DecimalSource): Decimal {\n let e = Decimal.log10(x).ceil();\n const m = Decimal.div(x, Decimal.pow(10, e));\n e = e.neg();\n x = new Decimal(10).pow(e).times(m);\n\n return x;\n}\n","// Import Decimal and numberUtils from a different file to globally change which big num library gets used\n// This way switching out big number libraries just needs to happen here, not every file that needs big numbers\nimport { DecimalSource as RawDecimalSource } from \"lib/break_eternity\";\nimport Decimal, * as numberUtils from \"util/break_eternity\";\n\nexport const {\n exponentialFormat,\n commaFormat,\n regularFormat,\n format,\n formatWhole,\n formatTime,\n toPlaces,\n formatSmall,\n invertOOM\n} = numberUtils;\n\nexport type DecimalSource = RawDecimalSource;\n\nwindow.Decimal = Decimal;\nwindow.exponentialFormat = exponentialFormat;\nwindow.commaFormat = commaFormat;\nwindow.regularFormat = regularFormat;\nwindow.format = format;\nwindow.formatWhole = formatWhole;\nwindow.formatTime = formatTime;\nwindow.toPlaces = toPlaces;\nwindow.formatSmall = formatSmall;\nwindow.invertOOM = invertOOM;\n\nexport default Decimal;\n","// Reference:\n// https://stackoverflow.com/questions/7225407/convert-camelcasetext-to-sentence-case-text\nexport function camelToTitle(camel: string): string {\n let title = camel.replace(/([A-Z])/g, \" $1\");\n title = title.charAt(0).toUpperCase() + title.slice(1);\n return title;\n}\n\nexport function isPlainObject(object: unknown): boolean {\n return Object.prototype.toString.call(object) === \"[object Object]\";\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(func: unknown): func is Function {\n return typeof func === \"function\";\n}\n","import { computed, Ref } from \"vue\";\nimport { isFunction } from \"./common\";\n\nexport const DoNotCache = Symbol(\"DoNotCache\");\n\nexport type Computable<T> = T | Ref<T> | (() => T);\nexport type ProcessedComputable<T> = T | Ref<T>;\nexport type GetComputableType<T> = T extends { [DoNotCache]: true }\n ? T\n : T extends () => infer S\n ? Ref<S>\n : undefined extends T\n ? undefined\n : T;\nexport type GetComputableTypeWithDefault<T, S> = undefined extends T\n ? S\n : GetComputableType<NonNullable<T>>;\nexport type UnwrapComputableType<T> = T extends Ref<infer S> ? S : T extends () => infer S ? S : T;\n\nexport type ComputableKeysOf<T> = Pick<\n T,\n {\n [K in keyof T]: T[K] extends Computable<unknown> ? K : never;\n }[keyof T]\n>;\n\n// TODO fix the typing of this function, such that casting isn't necessary and can be used to\n// detect if a createX function is validly written\nexport function processComputable<T, S extends keyof ComputableKeysOf<T>>(\n obj: T,\n key: S\n): asserts obj is T & { [K in S]: ProcessedComputable<UnwrapComputableType<T[S]>> } {\n const computable = obj[key];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(computable) && computable.length === 0 && !(computable as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj[key] = computed(computable.bind(obj));\n }\n}\n\nexport function convertComputable<T>(obj: Computable<T>): ProcessedComputable<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(obj) && !(obj as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj = computed(obj);\n }\n return obj as ProcessedComputable<T>;\n}\n","import Decimal from \"./bignum\";\n\nexport const ProxyState = Symbol(\"ProxyState\");\nexport const ProxyPath = Symbol(\"ProxyPath\");\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ProxiedWithState<T> = NonNullable<T> extends Record<PropertyKey, any>\n ? NonNullable<T> extends Decimal\n ? T\n : {\n [K in keyof T]: ProxiedWithState<T[K]>;\n } & {\n [ProxyState]: T;\n [ProxyPath]: string[];\n }\n : T;\n\n// Takes a function that returns an object and pretends to be that object\n// Note that the object is lazily calculated\nexport function createLazyProxy<T extends object, S>(\n objectFunc: (baseObject: S) => T & S,\n baseObject: S = {} as S\n): T {\n const obj: S & Partial<T> = baseObject;\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return obj as S & T;\n }\n\n return new Proxy(obj, {\n get(target, key) {\n if (key === ProxyState) {\n return calculateObj();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (calculateObj() as any)[key];\n },\n set(target, key, value) {\n // TODO give warning about this? It should only be done with caution\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (calculateObj() as any)[key] = value;\n return true;\n },\n has(target, key) {\n if (key === ProxyState) {\n return true;\n }\n return Reflect.has(calculateObj(), key);\n },\n ownKeys() {\n return Reflect.ownKeys(calculateObj());\n },\n getOwnPropertyDescriptor(target, key) {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as S & T;\n}\n","import projInfo from \"data/projInfo.json\";\nimport player, { Player, PlayerData, stringifySave } from \"game/player\";\nimport settings, { loadSettings } from \"game/settings\";\nimport { ProxyState } from \"./proxies\";\n\nexport function setupInitialStore(player: Partial<PlayerData> = {}): Player {\n return Object.assign(\n {\n id: `${projInfo.id}-0`,\n name: \"Default Save\",\n tabs: projInfo.initialTabs.slice(),\n time: Date.now(),\n autosave: true,\n offlineProd: true,\n offlineTime: 0,\n timePlayed: 0,\n keepGoing: false,\n modID: projInfo.id,\n modVersion: projInfo.versionNumber,\n layers: {}\n },\n player\n ) as Player;\n}\n\nexport function save(): string {\n const stringifiedSave = btoa(unescape(encodeURIComponent(stringifySave(player[ProxyState]))));\n localStorage.setItem(player.id, stringifiedSave);\n return stringifiedSave;\n}\n\nexport async function load(): Promise<void> {\n // Load global settings\n loadSettings();\n\n try {\n const save = localStorage.getItem(settings.active);\n if (save == null) {\n await loadSave(newSave());\n return;\n }\n const player = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (player.modID !== projInfo.id) {\n await loadSave(newSave());\n return;\n }\n player.id = settings.active;\n await loadSave(player);\n } catch (e) {\n console.error(\"Failed to load save. Falling back to new save.\\n\", e);\n await loadSave(newSave());\n }\n}\n\nexport function newSave(): PlayerData {\n const id = getUniqueID();\n const player = setupInitialStore({ id });\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(stringifySave(player)))));\n\n settings.saves.push(id);\n\n return player;\n}\n\nexport function getUniqueID(): string {\n let id,\n i = 0;\n do {\n id = `${projInfo.id}-${i++}`;\n } while (localStorage.getItem(id));\n return id;\n}\n\nexport async function loadSave(playerObj: Partial<PlayerData>): Promise<void> {\n console.info(\"Loading save\", playerObj);\n const { layers, removeLayer, addLayer } = await import(\"game/layers\");\n const { fixOldSave, getInitialLayers } = await import(\"data/projEntry\");\n\n for (const layer in layers) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n removeLayer(layers[layer]!);\n }\n getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));\n\n playerObj = setupInitialStore(playerObj);\n if (playerObj.offlineProd && playerObj.time) {\n if (playerObj.offlineTime == undefined) playerObj.offlineTime = 0;\n playerObj.offlineTime += (Date.now() - playerObj.time) / 1000;\n }\n playerObj.time = Date.now();\n if (playerObj.modVersion !== projInfo.versionNumber) {\n fixOldSave(playerObj.modVersion, playerObj);\n }\n\n Object.assign(player, playerObj);\n settings.active = player.id;\n}\n\nsetInterval(() => {\n if (player.autosave) {\n save();\n }\n}, 1000);\nwindow.onbeforeunload = () => {\n if (player.autosave) {\n save();\n }\n};\nwindow.save = save;\nexport const hardReset = (window.hardReset = async () => {\n await loadSave(newSave());\n});\n","<template>\n <transition appear>\n <svg\n id=\"eaRe02fYmMp1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 228 521\"\n shape-rendering=\"geometricPrecision\"\n text-rendering=\"geometricPrecision\"\n >\n <g id=\"P\">\n <path\n d=\"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 10;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"trunk\"\n class=\"svg-elem-1\"\n ></path>\n <path\n d=\"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine2\"\n class=\"svg-elem-2\"\n ></path>\n <path\n d=\"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine4\"\n class=\"svg-elem-3\"\n ></path>\n <path\n d=\"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine3\"\n class=\"svg-elem-4\"\n ></path>\n <path\n d=\"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine1\"\n class=\"svg-elem-5\"\n ></path>\n <path\n d=\"M 21,47.8775 38.674,131\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine2\"\n class=\"svg-elem-6\"\n ></path>\n <path\n d=\"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine1\"\n class=\"svg-elem-7\"\n ></path>\n </g>\n </svg>\n </transition>\n</template>\n\n<style scoped>\nsvg {\n background: #2e3440;\n}\n\n/***************************************************\n * Generated by SVG Artista on 1/7/2022, 4:39:47 PM\n * MIT license (https://opensource.org/licenses/MIT)\n * W. https://svgartista.net\n **************************************************/\n\nsvg .svg-elem-1 {\n stroke-dashoffset: 2648.758056640625px;\n stroke-dasharray: 1324.3790283203125px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0s;\n}\n\nsvg.v-enter-from .svg-elem-1,\nsvg.v-leave-to .svg-elem-1 {\n stroke-dashoffset: 1324.3790283203125px;\n}\n\nsvg .svg-elem-2 {\n stroke-dashoffset: 680.4000854492188px;\n stroke-dasharray: 340.2000427246094px;\n transition: stroke-dashoffset 1s ease-out 0.4s;\n}\n\nsvg.v-enter-from .svg-elem-2,\nsvg.v-leave-to .svg-elem-2 {\n stroke-dashoffset: 340.2000427246094px;\n}\n\nsvg .svg-elem-3 {\n stroke-dashoffset: 76.21031951904297px;\n stroke-dasharray: 38.105159759521484px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-3,\nsvg.v-leave-to .svg-elem-3 {\n stroke-dashoffset: 38.105159759521484px;\n}\n\nsvg .svg-elem-4 {\n stroke-dashoffset: 175.18072509765625px;\n stroke-dasharray: 87.59036254882812px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0.36s;\n}\n\nsvg.v-enter-from .svg-elem-4,\nsvg.v-leave-to .svg-elem-4 {\n stroke-dashoffset: 87.59036254882812px;\n}\n\nsvg .svg-elem-5 {\n stroke-dashoffset: 671.9447021484375px;\n stroke-dasharray: 335.97235107421875px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-5,\nsvg.v-leave-to .svg-elem-5 {\n stroke-dashoffset: 335.97235107421875px;\n}\n\nsvg .svg-elem-6 {\n stroke-dashoffset: 173.96141052246094px;\n stroke-dasharray: 86.98070526123047px;\n transition: stroke-dashoffset 1s ease-out 1s;\n}\n\nsvg.v-enter-from .svg-elem-6,\nsvg.v-leave-to .svg-elem-6 {\n stroke-dashoffset: 86.98070526123047px;\n}\n\nsvg .svg-elem-7 {\n stroke-dashoffset: 172.99151611328125px;\n stroke-dasharray: 86.49575805664062px;\n transition: stroke-dashoffset 1s ease-out 0.85s;\n}\n\nsvg.v-enter-from .svg-elem-7,\nsvg.v-leave-to .svg-elem-7 {\n stroke-dashoffset: 86.49575805664062px;\n}\n</style>\n","import { render } from \"./Profectus.vue?vue&type=template&id=07150322&scoped=true\"\nconst script = {}\n\nimport \"./Profectus.vue?vue&type=style&index=0&id=07150322&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-07150322\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n width: { default: \"8px\" },\n height: { default: \"17px\" }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n style: _normalizeStyle({ width: __props.width, height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport { computed, ComputedRef, isRef, ref, Ref, watch } from \"vue\";\nimport { globalBus } from \"game/events\";\nimport { State, persistent } from \"game/persistence\";\n\nexport interface Resource<T = DecimalSource> extends Ref<T> {\n displayName: string;\n precision: number;\n small?: boolean;\n}\n\nexport function createResource<T extends State>(\n defaultValue: T | Ref<T>,\n displayName = \"points\",\n precision = 0,\n small = undefined\n): Resource<T> {\n const resource: Partial<Resource<T>> = isRef(defaultValue)\n ? defaultValue\n : persistent(defaultValue);\n resource.displayName = displayName;\n resource.precision = precision;\n resource.small = small;\n return resource as Resource<T>;\n}\n\nexport function trackBest(resource: Resource): Ref<DecimalSource> {\n const best = persistent(resource.value);\n watch(resource, amount => {\n if (Decimal.gt(amount, best.value)) {\n best.value = amount;\n }\n });\n return best;\n}\n\nexport function trackTotal(resource: Resource): Ref<DecimalSource> {\n const total = persistent(resource.value);\n watch(resource, (amount, prevAmount) => {\n if (Decimal.gt(amount, prevAmount)) {\n total.value = Decimal.add(total.value, Decimal.sub(amount, prevAmount));\n }\n });\n return total;\n}\n\nconst tetra8 = new Decimal(\"10^^8\");\nconst e100 = new Decimal(\"1e100\");\nexport function trackOOMPS(\n resource: Resource,\n pointGain?: ComputedRef<DecimalSource>\n): Ref<string> {\n const oomps = ref<DecimalSource>(0);\n const oompsMag = ref(0);\n const lastPoints = ref<DecimalSource>(0);\n\n globalBus.on(\"update\", diff => {\n oompsMag.value = 0;\n if (Decimal.lte(resource.value, e100)) {\n lastPoints.value = resource.value;\n return;\n }\n\n let curr = resource.value;\n let prev = lastPoints.value;\n lastPoints.value = curr;\n if (Decimal.gt(curr, prev)) {\n if (Decimal.gte(curr, tetra8)) {\n curr = Decimal.slog(curr, 1e10);\n prev = Decimal.slog(prev, 1e10);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value = -1;\n } else {\n while (\n Decimal.div(curr, prev).log(10).div(diff).gte(\"100\") &&\n oompsMag.value <= 5 &&\n Decimal.gt(prev, 0)\n ) {\n curr = Decimal.log10(curr);\n prev = Decimal.log10(prev);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value++;\n }\n }\n }\n });\n\n const oompsString = computed(() => {\n if (oompsMag.value === 0) {\n return pointGain\n ? format(pointGain.value, resource.precision, resource.small) +\n \" \" +\n resource.displayName +\n \"/s\"\n : \"\";\n }\n return (\n format(oomps.value) +\n \" OOM\" +\n (oompsMag.value < 0 ? \"^OOM\" : \"^\" + oompsMag.value) +\n \"s/sec\"\n );\n });\n return oompsString;\n}\n\nexport function displayResource(resource: Resource, overrideAmount?: DecimalSource): string {\n const amount = overrideAmount ?? resource.value;\n if (Decimal.eq(resource.precision, 0)) {\n return formatWhole(amount);\n }\n return format(amount, resource.precision, resource.small);\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.nodesComp))),\n (_ctx.leftNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.leftNodesComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_ctx.rightNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.rightNodesComp), { key: 1 }))\n : _createCommentVNode(\"\", true),\n (_ctx.branches)\n ? (_openBlock(), _createBlock(_component_Links, {\n key: 2,\n links: _ctx.unref(_ctx.branches)\n }, null, 8, [\"links\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode } from \"game/layers\";\nimport { computed, toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n link: null,\n startNode: null,\n endNode: null,\n boundingRect: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n link: Link;\n startNode: FeatureNode;\n endNode: FeatureNode;\n boundingRect: DOMRect | undefined;\n}\n\n\nconst props = toRefs(_props);\n\nconst startPosition = computed(() => {\n const rect = props.startNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetStart) {\n position.x += props.link.value.offsetStart.x;\n position.y += props.link.value.offsetStart.y;\n }\n return position;\n});\n\nconst endPosition = computed(() => {\n const rect = props.endNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetEnd) {\n position.x += props.link.value.offsetEnd.x;\n position.y += props.link.value.offsetEnd.y;\n }\n return position;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"line\", _mergeProps({\n \"stroke-width\": \"15px\",\n stroke: \"white\"\n }, __props.link, {\n x1: _unref(startPosition).x,\n y1: _unref(startPosition).y,\n x2: _unref(endPosition).x,\n y2: _unref(endPosition).y\n }), null, 16, _hoisted_1))\n}\n}\n\n})","import script from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { computed, inject, nextTick, onMounted, ref, toRef } from \"vue\";\nimport LinkVue from \"./Link.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n links: null\n },\n setup(__props: any) {\n\nconst _props = __props as { links?: Link[] }\n\n\nconst links = toRef(_props, \"links\");\n\nconst resizeObserver = new ResizeObserver(updateNodes);\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst nodes = inject(NodesInjectionKey)!;\n\nconst resizeListener = ref<Element | null>(null);\n\nonMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n }\n});\n\nlet isDirty = true;\nlet boundingRect = ref(resizeListener.value?.getBoundingClientRect());\nfunction updateNodes() {\n if (resizeListener.value != null && isDirty) {\n isDirty = false;\n nextTick(() => {\n boundingRect.value = resizeListener.value?.getBoundingClientRect();\n (Object.values(nodes.value) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n isDirty = true;\n });\n }\n}\ndocument.fonts.ready.then(updateNodes);\n\nconst validLinks = computed(() => {\n const n = nodes.value;\n return (\n links.value?.filter(link => n[link.startNode.id]?.rect && n[link.startNode.id]?.rect) ?? []\n );\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(validLinks))\n ? (_openBlock(), _createElementBlock(\"svg\", _normalizeProps(_mergeProps({ key: 0 }, _ctx.$attrs)), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(validLinks), (link, index) => {\n return (_openBlock(), _createBlock(LinkVue, {\n key: index,\n link: link,\n boundingRect: _unref(boundingRect),\n startNode: _unref(nodes)[link.startNode.id]!,\n endNode: _unref(nodes)[link.endNode.id]!\n }, null, 8, [\"link\", \"boundingRect\", \"startNode\", \"endNode\"]))\n }), 128))\n ], 16))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n ref_key: \"resizeListener\",\n ref: resizeListener,\n class: \"resize-listener\"\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Links.vue?vue&type=style&index=0&id=e35b0402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e35b0402\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { coerceComponent, processedPropType, renderJSX, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, watchEffect } from \"vue\";\nimport Links from \"features/links/Links.vue\";\nimport { jsx } from \"features/feature\";\n\nexport default defineComponent({\n props: {\n nodes: {\n type: processedPropType<GenericTreeNode[][]>(Array),\n required: true\n },\n leftSideNodes: processedPropType<GenericTreeNode[]>(Array),\n rightSideNodes: processedPropType<GenericTreeNode[]>(Array),\n branches: processedPropType<TreeBranch[]>(Array)\n },\n components: { Links },\n setup(props) {\n const { nodes, leftSideNodes, rightSideNodes } = toRefs(props);\n\n const nodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(nodes);\n nodesComp.value = coerceComponent(\n jsx(() => (\n <>\n {currNodes.map(row => (\n <span class=\"row tree-row\" style=\"margin: 50px auto;\">\n {row.map(renderJSX)}\n </span>\n ))}\n </>\n ))\n );\n });\n\n const leftNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(leftSideNodes);\n leftNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => (\n <span class=\"left-side-nodes small\">{currNodes.map(renderJSX)}</span>\n ))\n )\n : \"\";\n });\n\n const rightNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(rightSideNodes);\n rightNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => <span class=\"side-nodes small\">{currNodes.map(renderJSX)}</span>)\n )\n : \"\";\n });\n\n return {\n unref,\n nodesComp,\n leftNodesComp,\n rightNodesComp\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=aa87859c&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=tsx\"\nexport * from \"./Tree.vue?vue&type=script&lang=tsx\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=aa87859c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-aa87859c\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({ visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined }),\n class: _normalizeClass({\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n style: _normalizeStyle([\n {\n backgroundColor: _ctx.unref(_ctx.color),\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${_ctx.unref(\n _ctx.glowColor\n )}`\n },\n _ctx.unref(_ctx.style) ?? []\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp))))\n ], 36),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { RegisterNodeInjectionKey, UnregisterNodeInjectionKey } from \"game/layers\";\nimport { computed, inject, onUnmounted, ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n id: null\n },\n setup(__props: any) {\n\nconst _props = __props as { id: string }\n\n\nconst props = toRefs(_props);\n\nconst register = inject(RegisterNodeInjectionKey);\nconst unregister = inject(UnregisterNodeInjectionKey);\n\nconst node = ref<HTMLElement | null>(null);\nconst parentNode = computed(() => node.value && node.value.parentElement);\n\nif (register && unregister) {\n watch([parentNode, props.id], ([newNode, newID], [prevNode, prevID]) => {\n if (prevNode) {\n unregister(unref(prevID));\n }\n if (newNode) {\n register(newID, newNode);\n }\n });\n\n onUnmounted(() => unregister(unref(props.id)));\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"node\",\n ref_key: \"node\",\n ref: node\n }, null, 512))\n}\n}\n\n})","import script from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Node.vue?vue&type=style&index=0&id=63ded336&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-63ded336\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c476c56a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = {\n key: 0,\n class: \"mark star\"\n}\nconst _hoisted_3 = [\"src\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n mark: { type: [Boolean, String] }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (__props.mark)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.mark === true)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"img\", {\n key: 1,\n class: \"mark\",\n src: __props.mark\n }, null, 8, _hoisted_3))\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./MarkNode.vue?vue&type=style&index=0&id=c476c56a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c476c56a\"]])\n\nexport default __exports__","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n color: processedPropType<string>(String),\n glowColor: processedPropType<string>(String),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { onClick, onHold, display } = toRefs(props);\n\n const comp = computeOptionalComponent(display);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n unref,\n Visibility,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=426d9bce&scoped=true&ts=true\"\nimport script from \"./TreeNode.vue?vue&type=script&lang=ts\"\nexport * from \"./TreeNode.vue?vue&type=script&lang=ts\"\n\nimport \"./TreeNode.vue?vue&type=style&index=0&id=426d9bce&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-426d9bce\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Link } from \"features/links/links\";\nimport { GenericReset } from \"features/reset\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport TreeNodeComponent from \"features/trees/TreeNode.vue\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n convertComputable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, ref, Ref, shallowRef, unref } from \"vue\";\n\nexport const TreeNodeType = Symbol(\"TreeNode\");\nexport const TreeType = Symbol(\"Tree\");\n\nexport interface TreeNodeOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n color?: Computable<string>;\n display?: Computable<CoercableComponent>;\n glowColor?: Computable<string>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n reset?: GenericReset;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseTreeNode {\n id: string;\n type: typeof TreeNodeType;\n [Component]: typeof TreeNodeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TreeNode<T extends TreeNodeOptions> = Replace<\n T & BaseTreeNode,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericTreeNode = Replace<\n TreeNode<TreeNodeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createTreeNode<T extends TreeNodeOptions>(\n optionsFunc: OptionsFunc<T, TreeNode<T>, BaseTreeNode>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n treeNode[Component] = TreeNodeComponent;\n\n processComputable(treeNode as T, \"visibility\");\n setDefault(treeNode, \"visibility\", Visibility.Visible);\n processComputable(treeNode as T, \"canClick\");\n setDefault(treeNode, \"canClick\", true);\n processComputable(treeNode as T, \"color\");\n processComputable(treeNode as T, \"display\");\n processComputable(treeNode as T, \"glowColor\");\n processComputable(treeNode as T, \"classes\");\n processComputable(treeNode as T, \"style\");\n processComputable(treeNode as T, \"mark\");\n\n if (treeNode.onClick) {\n const onClick = treeNode.onClick.bind(treeNode);\n treeNode.onClick = function () {\n if (unref(treeNode.canClick)) {\n onClick();\n }\n };\n }\n if (treeNode.onHold) {\n const onHold = treeNode.onHold.bind(treeNode);\n treeNode.onHold = function () {\n if (unref(treeNode.canClick)) {\n onHold();\n }\n };\n }\n\n treeNode[GatherProps] = function (this: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n };\n };\n\n return treeNode as unknown as TreeNode<T>;\n });\n}\n\nexport interface TreeBranch extends Omit<Link, \"startNode\" | \"endNode\"> {\n startNode: GenericTreeNode;\n endNode: GenericTreeNode;\n}\n\nexport interface TreeOptions {\n visibility?: Computable<Visibility>;\n nodes: Computable<GenericTreeNode[][]>;\n leftSideNodes?: Computable<GenericTreeNode[]>;\n rightSideNodes?: Computable<GenericTreeNode[]>;\n branches?: Computable<TreeBranch[]>;\n resetPropagation?: ResetPropagation;\n onReset?: (node: GenericTreeNode) => void;\n}\n\nexport interface BaseTree {\n id: string;\n links: Ref<Link[]>;\n reset: (node: GenericTreeNode) => void;\n isResetting: Ref<boolean>;\n resettingNode: Ref<GenericTreeNode | null>;\n type: typeof TreeType;\n [Component]: typeof TreeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tree<T extends TreeOptions> = Replace<\n T & BaseTree,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n nodes: GetComputableType<T[\"nodes\"]>;\n leftSideNodes: GetComputableType<T[\"leftSideNodes\"]>;\n rightSideNodes: GetComputableType<T[\"rightSideNodes\"]>;\n branches: GetComputableType<T[\"branches\"]>;\n }\n>;\n\nexport type GenericTree = Replace<\n Tree<TreeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTree<T extends TreeOptions>(\n optionsFunc: OptionsFunc<T, Tree<T>, BaseTree>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree = optionsFunc();\n tree.id = getUniqueID(\"tree-\");\n tree.type = TreeType;\n tree[Component] = TreeComponent;\n\n tree.isResetting = ref(false);\n tree.resettingNode = shallowRef(null);\n\n tree.reset = function (node) {\n const genericTree = tree as GenericTree;\n genericTree.isResetting.value = true;\n genericTree.resettingNode.value = node;\n genericTree.resetPropagation?.(genericTree, node);\n genericTree.onReset?.(node);\n genericTree.isResetting.value = false;\n genericTree.resettingNode.value = null;\n };\n tree.links = computed(() => {\n const genericTree = tree as GenericTree;\n return unref(genericTree.branches) ?? [];\n });\n\n processComputable(tree as T, \"visibility\");\n setDefault(tree, \"visibility\", Visibility.Visible);\n processComputable(tree as T, \"nodes\");\n processComputable(tree as T, \"leftSideNodes\");\n processComputable(tree as T, \"rightSideNodes\");\n processComputable(tree as T, \"branches\");\n\n tree[GatherProps] = function (this: GenericTree) {\n const { nodes, leftSideNodes, rightSideNodes, branches } = this;\n return { nodes, leftSideNodes, rightSideNodes, branches };\n };\n\n return tree as unknown as Tree<T>;\n });\n}\n\nexport type ResetPropagation = {\n (tree: GenericTree, resettingNode: GenericTreeNode): void;\n};\n\nexport const defaultResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) - 1;\n for (let x = row; x >= 0; x--) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const invertedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) + 1;\n for (let x = row; x < nodes.length; x++) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const branchedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const visitedNodes = [resettingNode];\n let currentNodes = [resettingNode];\n if (tree.branches != null) {\n const branches = unref(tree.branches);\n while (currentNodes.length > 0) {\n const nextNodes: GenericTreeNode[] = [];\n currentNodes.forEach(node => {\n branches\n .filter(branch => branch.startNode === node || branch.endNode === node)\n .map(branch => {\n if (branch.startNode === node) {\n return branch.endNode;\n }\n return branch.startNode;\n })\n .filter(node => !visitedNodes.includes(node))\n .forEach(node => {\n // Check here instead of in the filter because this check's results may\n // change as we go through each node\n if (!nextNodes.includes(node)) {\n nextNodes.push(node);\n node.reset?.reset();\n }\n });\n });\n currentNodes = nextNodes;\n visitedNodes.push(...currentNodes);\n }\n }\n};\n\nexport function createResourceTooltip(\n resource: Resource,\n requiredResource: Resource | null = null,\n requirement: Computable<DecimalSource> = 0\n): Ref<string> {\n const req = convertComputable(requirement);\n return computed(() => {\n if (requiredResource == null || Decimal.gte(resource.value, unref(req))) {\n return displayResource(resource) + \" \" + resource.displayName;\n }\n return `Reach ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(unref(req))\n : format(unref(req), requiredResource.precision)\n } ${requiredResource.displayName} to unlock (You have ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(requiredResource.value)\n : format(requiredResource.value, requiredResource.precision)\n })`;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined,\n backgroundImage: (_ctx.earned && _ctx.image && `url(${_ctx.image})`) || ''\n },\n _ctx.unref(_ctx.style) ?? []\n ]),\n class: _normalizeClass({\n feature: true,\n achievement: true,\n locked: !_ctx.unref(_ctx.earned),\n bought: _ctx.unref(_ctx.earned),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType } from \"util/vue\";\nimport { defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport \"components/common/features.css\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n image: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display } = toRefs(props);\n\n return {\n component: computeOptionalComponent(display),\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Achievement.vue?vue&type=template&id=e3f32402&scoped=true&ts=true\"\nimport script from \"./Achievement.vue?vue&type=script&lang=ts\"\nexport * from \"./Achievement.vue?vue&type=script&lang=ts\"\n\nimport \"./Achievement.vue?vue&type=style&index=0&id=e3f32402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e3f32402\"]])\n\nexport default __exports__","import { globalBus } from \"game/events\";\nimport Toast from \"vue-toastification\";\nimport \"vue-toastification/dist/index.css\";\n\nglobalBus.on(\"setupVue\", vue => vue.use(Toast));\n\nexport function getNotifyStyle(color = \"white\", strength = \"8px\") {\n return {\n transform: \"scale(1.05, 1.05)\",\n borderColor: \"rgba(0, 0, 0, 0.125)\",\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${strength} ${color}`,\n zIndex: 1\n };\n}\n\nexport function getHighNotifyStyle() {\n return getNotifyStyle(\"red\", \"20px\");\n}\n","import AchievementComponent from \"features/achievements/Achievement.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent } from \"util/vue\";\nimport { Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const AchievementType = Symbol(\"Achievement\");\n\nexport interface AchievementOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n image?: Computable<string>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseAchievement extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof AchievementType;\n [Component]: typeof AchievementComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Achievement<T extends AchievementOptions> = Replace<\n T & BaseAchievement,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n image: GetComputableType<T[\"image\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n }\n>;\n\nexport type GenericAchievement = Replace<\n Achievement<AchievementOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createAchievement<T extends AchievementOptions>(\n optionsFunc: OptionsFunc<T, Achievement<T>, BaseAchievement>\n): Achievement<T> {\n return createLazyProxy(persistent => {\n const achievement = Object.assign(persistent, optionsFunc());\n achievement.id = getUniqueID(\"achievement-\");\n achievement.type = AchievementType;\n achievement[Component] = AchievementComponent;\n\n achievement.earned = achievement[PersistentState];\n achievement.complete = function () {\n achievement[PersistentState].value = true;\n };\n\n processComputable(achievement as T, \"visibility\");\n setDefault(achievement, \"visibility\", Visibility.Visible);\n processComputable(achievement as T, \"display\");\n processComputable(achievement as T, \"mark\");\n processComputable(achievement as T, \"image\");\n processComputable(achievement as T, \"style\");\n processComputable(achievement as T, \"classes\");\n\n achievement[GatherProps] = function (this: GenericAchievement) {\n const { visibility, display, earned, image, style, classes, mark, id } = this;\n return { visibility, display, earned, image, style: unref(style), classes, mark, id };\n };\n\n if (achievement.shouldEarn) {\n const genericAchievement = achievement as GenericAchievement;\n watchEffect(() => {\n if (\n !genericAchievement.earned.value &&\n unref(genericAchievement.visibility) === Visibility.Visible &&\n genericAchievement.shouldEarn?.()\n ) {\n genericAchievement.earned.value = true;\n genericAchievement.onComplete?.();\n if (genericAchievement.display) {\n const Display = coerceComponent(unref(genericAchievement.display));\n toast.info(\n <div>\n <h3>Achievement earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </div>\n );\n }\n }\n });\n }\n\n return achievement as unknown as Achievement<T>;\n }, persistent<boolean>(false));\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_GridCell = _resolveComponent(\"GridCell\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n }),\n class: \"table\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rows), (row) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _ctx.mergeAdjacent }]),\n key: row\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.cols), (col) => {\n return (_openBlock(), _createBlock(_component_GridCell, _mergeProps({ key: col }, _ctx.gatherCellProps(_ctx.unref(_ctx.cells)[row * 100 + col])), null, 16))\n }), 128))\n ], 2))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n}","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b1182ac6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: _normalizeClass({ feature: true, tile: true, can: _ctx.unref(_ctx.canClick), locked: !_ctx.unref(_ctx.canClick) }),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args)))\n }, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { style: {\"white-space\":\"pre-line\"} })),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeComponent,\n computeOptionalComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: processedPropType<CoercableComponent>(Object, String, Function),\n style: processedPropType<StyleValue>(String, Object, Array),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { onClick, onHold, title, display } = toRefs(props);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n const titleComponent = computeOptionalComponent(title);\n const component = computeComponent(display);\n\n return {\n start,\n stop,\n titleComponent,\n component,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./GridCell.vue?vue&type=template&id=b1182ac6&scoped=true&ts=true\"\nimport script from \"./GridCell.vue?vue&type=script&lang=ts\"\nexport * from \"./GridCell.vue?vue&type=script&lang=ts\"\n\nimport \"./GridCell.vue?vue&type=style&index=0&id=b1182ac6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b1182ac6\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport { Visibility } from \"features/feature\";\nimport { GridCell } from \"features/grids/grid\";\nimport settings from \"game/settings\";\nimport { processedPropType } from \"util/vue\";\nimport { computed, defineComponent, unref } from \"vue\";\nimport GridCellVue from \"./GridCell.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n rows: {\n type: processedPropType<number>(Number),\n required: true\n },\n cols: {\n type: processedPropType<number>(Number),\n required: true\n },\n cells: {\n type: processedPropType<Record<string, GridCell>>(Object),\n required: true\n }\n },\n components: { GridCell: GridCellVue },\n setup() {\n const mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\n function gatherCellProps(cell: GridCell) {\n const { visibility, onClick, onHold, display, title, style, canClick, id } = cell;\n return { visibility, onClick, onHold, display, title, style, canClick, id };\n }\n\n return { unref, gatherCellProps, Visibility, mergeAdjacent };\n }\n});\n","import { render } from \"./Grid.vue?vue&type=template&id=4f6b6717&ts=true\"\nimport script from \"./Grid.vue?vue&type=script&lang=ts\"\nexport * from \"./Grid.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import GridComponent from \"features/grids/Grid.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { State, Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const GridType = Symbol(\"Grid\");\n\nexport type CellComputable<T> = Computable<T> | ((id: string | number, state: State) => T);\n\nfunction createGridProxy(grid: GenericGrid): Record<string | number, GridCell> {\n return new Proxy({}, getGridHandler(grid)) as Record<string | number, GridCell>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getGridHandler(grid: GenericGrid): ProxyHandler<Record<string | number, GridCell>> {\n const keys = computed(() => {\n const keys = [];\n for (let row = 1; row <= unref(grid.rows); row++) {\n for (let col = 1; col <= unref(grid.cols); col++) {\n keys.push((row * 100 + col).toString());\n }\n }\n return keys;\n });\n return {\n get(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (key === \"isProxy\") {\n return true;\n }\n\n if (typeof key === \"symbol\") {\n return (grid as never)[key];\n }\n\n if (!keys.value.includes(key.toString())) {\n return undefined;\n }\n\n if (target[key] == null) {\n target[key] = new Proxy(\n grid,\n getCellHandler(key.toString())\n ) as unknown as GridCell;\n }\n\n return target[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string | number, GridCell>, key: PropertyKey, value: any) {\n console.warn(\"Cannot set grid cells\", target, key, value);\n return false;\n },\n ownKeys() {\n return keys.value;\n },\n has(target: Record<string | number, GridCell>, key: PropertyKey) {\n return keys.value.includes(key.toString());\n },\n getOwnPropertyDescriptor(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (keys.value.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nfunction getCellHandler(id: string): ProxyHandler<GenericGrid> {\n const keys = [\n \"id\",\n \"visibility\",\n \"canClick\",\n \"startState\",\n \"state\",\n \"style\",\n \"classes\",\n \"title\",\n \"display\",\n \"onClick\",\n \"onHold\"\n ];\n const cache: Record<string, Ref<unknown>> = {};\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target, key, receiver): any {\n if (key === \"isProxy\") {\n return true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let prop = (target as any)[key];\n\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n }\n if (prop != undefined || typeof key === \"symbol\") {\n return prop;\n }\n\n key = key.slice(0, 1).toUpperCase() + key.slice(1);\n\n if (key === \"startState\") {\n return prop.call(receiver, id);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`get${key}`];\n if (isFunction(prop)) {\n if (!(key in cache)) {\n cache[key] = computed(() => prop.call(receiver, id, target.getState(id)));\n }\n return cache[key].value;\n } else if (prop != undefined) {\n return unref(prop);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`on${key}`];\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n } else if (prop != undefined) {\n return prop;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string, any>, key: string, value: any, receiver: typeof Proxy): boolean {\n key = `set${key.slice(0, 1).toUpperCase() + key.slice(1)}`;\n if (key in target && isFunction(target[key]) && target[key].length < 3) {\n target[key].call(receiver, id, value);\n return true;\n } else {\n console.warn(`No setter for \"${key}\".`, target);\n return false;\n }\n },\n ownKeys() {\n return keys;\n },\n has(target, key) {\n return keys.includes(key.toString());\n },\n getOwnPropertyDescriptor(target, key) {\n if (keys.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nexport interface GridCell {\n id: string;\n visibility: Visibility;\n canClick: boolean;\n startState: State;\n state: State;\n style?: StyleValue;\n classes?: Record<string, boolean>;\n title?: CoercableComponent;\n display: CoercableComponent;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface GridOptions {\n visibility?: Computable<Visibility>;\n rows: Computable<number>;\n cols: Computable<number>;\n getVisibility?: CellComputable<Visibility>;\n getCanClick?: CellComputable<boolean>;\n getStartState: Computable<State> | ((id: string | number) => State);\n getStyle?: CellComputable<StyleValue>;\n getClasses?: CellComputable<Record<string, boolean>>;\n getTitle?: CellComputable<CoercableComponent>;\n getDisplay: CellComputable<CoercableComponent>;\n onClick?: (id: string | number, state: State, e?: MouseEvent | TouchEvent) => void;\n onHold?: (id: string | number, state: State) => void;\n}\n\nexport interface BaseGrid extends Persistent<Record<string | number, State>> {\n id: string;\n getID: (id: string | number, state: State) => string;\n getState: (id: string | number) => State;\n setState: (id: string | number, state: State) => void;\n cells: Record<string | number, GridCell>;\n type: typeof GridType;\n [Component]: typeof GridComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Grid<T extends GridOptions> = Replace<\n T & BaseGrid,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n rows: GetComputableType<T[\"rows\"]>;\n cols: GetComputableType<T[\"cols\"]>;\n getVisibility: GetComputableTypeWithDefault<T[\"getVisibility\"], Visibility.Visible>;\n getCanClick: GetComputableTypeWithDefault<T[\"getCanClick\"], true>;\n getStartState: GetComputableType<T[\"getStartState\"]>;\n getStyle: GetComputableType<T[\"getStyle\"]>;\n getClasses: GetComputableType<T[\"getClasses\"]>;\n getTitle: GetComputableType<T[\"getTitle\"]>;\n getDisplay: GetComputableType<T[\"getDisplay\"]>;\n }\n>;\n\nexport type GenericGrid = Replace<\n Grid<GridOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n getVisibility: ProcessedComputable<Visibility>;\n getCanClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createGrid<T extends GridOptions>(\n optionsFunc: OptionsFunc<T, Grid<T>, BaseGrid>\n): Grid<T> {\n return createLazyProxy(persistent => {\n const grid = Object.assign(persistent, optionsFunc());\n grid.id = getUniqueID(\"grid-\");\n grid[Component] = GridComponent;\n\n grid.getID = function (this: GenericGrid, cell: string | number) {\n return grid.id + \"-\" + cell;\n };\n grid.getState = function (this: GenericGrid, cell: string | number) {\n if (this[PersistentState].value[cell] != undefined) {\n return this[PersistentState].value[cell];\n }\n return this.cells[cell].startState;\n };\n grid.setState = function (this: GenericGrid, cell: string | number, state: State) {\n this[PersistentState].value[cell] = state;\n };\n\n grid.cells = createGridProxy(grid as GenericGrid);\n\n processComputable(grid as T, \"visibility\");\n setDefault(grid, \"visibility\", Visibility.Visible);\n processComputable(grid as T, \"rows\");\n processComputable(grid as T, \"cols\");\n processComputable(grid as T, \"getVisibility\");\n setDefault(grid, \"getVisibility\", Visibility.Visible);\n processComputable(grid as T, \"getCanClick\");\n setDefault(grid, \"getCanClick\", true);\n processComputable(grid as T, \"getStartState\");\n processComputable(grid as T, \"getStyle\");\n processComputable(grid as T, \"getClasses\");\n processComputable(grid as T, \"getTitle\");\n processComputable(grid as T, \"getDisplay\");\n\n if (grid.onClick) {\n const onClick = grid.onClick.bind(grid);\n grid.onClick = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onClick(id, state);\n }\n };\n }\n if (grid.onHold) {\n const onHold = grid.onHold.bind(grid);\n grid.onHold = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onHold(id, state);\n }\n };\n }\n\n grid[GatherProps] = function (this: GenericGrid) {\n const { visibility, rows, cols, cells, id } = this;\n return { visibility, rows, cols, cells, id };\n };\n\n return grid as unknown as Grid<T>;\n }, persistent({}));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n _ctx.unref(_ctx.style) ?? []\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n class: _normalizeClass({\n feature: true,\n clickable: true,\n can: _ctx.unref(_ctx.canClick),\n locked: !_ctx.unref(_ctx.canClick),\n small: _ctx.small,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { GenericClickable } from \"features/clickables/clickable\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport {\n coerceComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericClickable[\"display\"]>>(\n Object,\n String,\n Function\n ),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n small: Boolean,\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, onClick, onHold } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n </span>\n ))\n );\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Clickable.vue?vue&type=template&id=6b39988a&scoped=true&ts=true\"\nimport script from \"./Clickable.vue?vue&type=script&lang=tsx\"\nexport * from \"./Clickable.vue?vue&type=script&lang=tsx\"\n\nimport \"./Clickable.vue?vue&type=style&index=0&id=6b39988a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6b39988a\"]])\n\nexport default __exports__","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericLayer } from \"game/layers\";\nimport { Unsubscribe } from \"nanoevents\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, unref } from \"vue\";\n\nexport const ClickableType = Symbol(\"Clickable\");\n\nexport interface ClickableOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n }\n >;\n small?: boolean;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseClickable {\n id: string;\n type: typeof ClickableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Clickable<T extends ClickableOptions> = Replace<\n T & BaseClickable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericClickable = Replace<\n Clickable<ClickableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createClickable<T extends ClickableOptions>(\n optionsFunc: OptionsFunc<T, Clickable<T>, BaseClickable>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable = optionsFunc();\n clickable.id = getUniqueID(\"clickable-\");\n clickable.type = ClickableType;\n clickable[Component] = ClickableComponent;\n\n processComputable(clickable as T, \"visibility\");\n setDefault(clickable, \"visibility\", Visibility.Visible);\n processComputable(clickable as T, \"canClick\");\n setDefault(clickable, \"canClick\", true);\n processComputable(clickable as T, \"classes\");\n processComputable(clickable as T, \"style\");\n processComputable(clickable as T, \"mark\");\n processComputable(clickable as T, \"display\");\n\n if (clickable.onClick) {\n const onClick = clickable.onClick.bind(clickable);\n clickable.onClick = function (e) {\n if (unref(clickable.canClick)) {\n onClick(e);\n }\n };\n }\n if (clickable.onHold) {\n const onHold = clickable.onHold.bind(clickable);\n clickable.onHold = function () {\n if (unref(clickable.canClick)) {\n onHold();\n }\n };\n }\n\n clickable[GatherProps] = function (this: GenericClickable) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return clickable as unknown as Clickable<T>;\n });\n}\n\nexport function setupAutoClick(\n layer: GenericLayer,\n clickable: GenericClickable,\n autoActive: Computable<boolean> = true\n): Unsubscribe {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return layer.on(\"update\", () => {\n if (unref(isActive) && unref(clickable.canClick)) {\n clickable.onClick?.();\n }\n });\n}\n","import {\n Clickable,\n ClickableOptions,\n createClickable,\n GenericClickable\n} from \"features/clickables/clickable\";\nimport { GenericConversion } from \"features/conversion\";\nimport { CoercableComponent, jsx, OptionsFunc, Replace, setDefault } from \"features/feature\";\nimport { displayResource } from \"features/resources/resource\";\nimport {\n createTreeNode,\n GenericTree,\n GenericTreeNode,\n TreeNode,\n TreeNodeOptions\n} from \"features/trees/tree\";\nimport player from \"game/player\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { computed, Ref, unref } from \"vue\";\n\nexport interface ResetButtonOptions extends ClickableOptions {\n conversion: GenericConversion;\n tree: GenericTree;\n treeNode: GenericTreeNode;\n resetDescription?: Computable<string>;\n showNextAt?: Computable<boolean>;\n display?: Computable<CoercableComponent>;\n canClick?: Computable<boolean>;\n minimumGain?: Computable<DecimalSource>;\n}\n\nexport type ResetButton<T extends ResetButtonOptions> = Replace<\n Clickable<T>,\n {\n resetDescription: GetComputableTypeWithDefault<T[\"resetDescription\"], Ref<string>>;\n showNextAt: GetComputableTypeWithDefault<T[\"showNextAt\"], true>;\n display: GetComputableTypeWithDefault<T[\"display\"], Ref<JSX.Element>>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], Ref<boolean>>;\n minimumGain: GetComputableTypeWithDefault<T[\"minimumGain\"], 1>;\n onClick: VoidFunction;\n }\n>;\n\nexport type GenericResetButton = Replace<\n GenericClickable & ResetButton<ResetButtonOptions>,\n {\n resetDescription: ProcessedComputable<string>;\n showNextAt: ProcessedComputable<boolean>;\n display: ProcessedComputable<CoercableComponent>;\n canClick: ProcessedComputable<boolean>;\n minimumGain: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n optionsFunc: OptionsFunc<T>\n): ResetButton<T> {\n return createClickable(() => {\n const resetButton = optionsFunc();\n\n processComputable(resetButton as T, \"showNextAt\");\n setDefault(resetButton, \"showNextAt\", true);\n setDefault(resetButton, \"minimumGain\", 1);\n\n if (resetButton.resetDescription == null) {\n resetButton.resetDescription = computed(() =>\n Decimal.lt(resetButton.conversion.gainResource.value, 1e3) ? \"Reset for \" : \"\"\n );\n } else {\n processComputable(resetButton as T, \"resetDescription\");\n }\n\n if (resetButton.display == null) {\n resetButton.display = jsx(() => (\n <span>\n {unref(resetButton.resetDescription as ProcessedComputable<string>)}\n <b>\n {displayResource(\n resetButton.conversion.gainResource,\n Decimal.max(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n {resetButton.conversion.buyMax ? \"Next:\" : \"Req:\"}{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n resetButton.conversion.buyMax ||\n Decimal.floor(unref(resetButton.conversion.actualGain)).neq(1)\n ? unref(resetButton.conversion.nextAt)\n : unref(resetButton.conversion.currentAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gte(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n );\n }\n\n const onClick = resetButton.onClick;\n resetButton.onClick = function () {\n if (!unref(resetButton.canClick)) {\n return;\n }\n resetButton.conversion.convert();\n resetButton.tree.reset(resetButton.treeNode);\n onClick?.();\n };\n\n return resetButton;\n }) as unknown as ResetButton<T>;\n}\n\nexport interface LayerTreeNodeOptions extends TreeNodeOptions {\n layerID: string;\n color: Computable<string>; // marking as required\n display?: Computable<string>;\n append?: Computable<boolean>;\n}\nexport type LayerTreeNode<T extends LayerTreeNodeOptions> = Replace<\n TreeNode<T>,\n {\n display: GetComputableTypeWithDefault<T[\"display\"], T[\"layerID\"]>;\n append: GetComputableType<T[\"append\"]>;\n }\n>;\nexport type GenericLayerTreeNode = Replace<\n LayerTreeNode<LayerTreeNodeOptions>,\n {\n display: ProcessedComputable<string>;\n append?: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createLayerTreeNode<T extends LayerTreeNodeOptions>(\n optionsFunc: OptionsFunc<T>\n): LayerTreeNode<T> {\n return createTreeNode(() => {\n const options = optionsFunc();\n processComputable(options as T, \"display\");\n setDefault(options, \"display\", options.layerID);\n processComputable(options as T, \"append\");\n return {\n ...options,\n display: options.layerID,\n onClick: unref((options as unknown as GenericLayerTreeNode).append)\n ? function () {\n if (player.tabs.includes(options.layerID)) {\n const index = player.tabs.lastIndexOf(options.layerID);\n player.tabs.splice(index, 1);\n } else {\n player.tabs.push(options.layerID);\n }\n }\n : function () {\n player.tabs.splice(1, 1, options.layerID);\n }\n };\n }) as unknown as LayerTreeNode<T>;\n}\n","import { GenericLayer } from \"game/layers\";\nimport { Modifier } from \"game/modifiers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, isRef, Ref, unref } from \"vue\";\nimport { OptionsFunc, Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: Computable<DecimalSource>;\n actualGain?: Computable<DecimalSource>;\n currentAt?: Computable<DecimalSource>;\n nextAt?: Computable<DecimalSource>;\n baseResource: Resource;\n gainResource: Resource;\n buyMax?: Computable<boolean>;\n roundUpCost?: Computable<boolean>;\n convert?: VoidFunction;\n gainModifier?: Modifier;\n}\n\nexport interface BaseConversion {\n convert: VoidFunction;\n}\n\nexport type Conversion<T extends ConversionOptions> = Replace<\n T & BaseConversion,\n {\n currentGain: GetComputableTypeWithDefault<T[\"currentGain\"], Ref<DecimalSource>>;\n actualGain: GetComputableTypeWithDefault<T[\"actualGain\"], Ref<DecimalSource>>;\n currentAt: GetComputableTypeWithDefault<T[\"currentAt\"], Ref<DecimalSource>>;\n nextAt: GetComputableTypeWithDefault<T[\"nextAt\"], Ref<DecimalSource>>;\n buyMax: GetComputableTypeWithDefault<T[\"buyMax\"], true>;\n roundUpCost: GetComputableTypeWithDefault<T[\"roundUpCost\"], true>;\n }\n>;\n\nexport type GenericConversion = Replace<\n Conversion<ConversionOptions>,\n {\n currentGain: ProcessedComputable<DecimalSource>;\n actualGain: ProcessedComputable<DecimalSource>;\n currentAt: ProcessedComputable<DecimalSource>;\n nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: OptionsFunc<T, Conversion<T>, BaseConversion>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = conversion.currentGain;\n }\n if (conversion.currentAt == null) {\n conversion.currentAt = computed(() => {\n let current = conversion.scaling.currentAt(conversion as GenericConversion);\n if (conversion.roundUpCost) current = Decimal.ceil(current);\n return current;\n });\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() => {\n let next = conversion.scaling.nextAt(conversion as GenericConversion);\n if (conversion.roundUpCost) next = Decimal.ceil(next);\n return next;\n });\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n unref((conversion as GenericConversion).currentGain)\n );\n // TODO just subtract cost?\n conversion.baseResource.value = 0;\n };\n }\n\n processComputable(conversion as T, \"currentGain\");\n processComputable(conversion as T, \"actualGain\");\n processComputable(conversion as T, \"currentAt\");\n processComputable(conversion as T, \"nextAt\");\n processComputable(conversion as T, \"buyMax\");\n setDefault(conversion, \"buyMax\", true);\n processComputable(conversion as T, \"roundUpCost\");\n setDefault(conversion, \"roundUpCost\", true);\n\n return conversion as unknown as Conversion<T>;\n });\n}\n\nexport type ScalingFunction = {\n currentGain: (conversion: GenericConversion) => DecimalSource;\n currentAt: (conversion: GenericConversion) => DecimalSource;\n nextAt: (conversion: GenericConversion) => DecimalSource;\n};\n\n// Gain formula is (baseResource - base) * coefficient\n// e.g. if base is 10 and coefficient is 0.5, 10 points makes 1 gain, 12 points is 2\nexport function createLinearScaling(\n base: DecimalSource | Ref<DecimalSource>,\n coefficient: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n if (Decimal.lt(conversion.baseResource.value, unref(base))) {\n return 0;\n }\n\n return Decimal.sub(conversion.baseResource.value, unref(base))\n .sub(1)\n .times(unref(coefficient))\n .add(1);\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.times(current, unref(coefficient)).add(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.times(next, unref(coefficient)).add(unref(base)).max(unref(base));\n }\n };\n}\n\n// Gain formula is (baseResource / base) ^ exponent\n// e.g. if exponent is 0.5 and base is 10, then having 10 points makes gain 1, and 40 points is 2\nexport function createPolynomialScaling(\n base: DecimalSource | Ref<DecimalSource>,\n exponent: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n const gain = Decimal.div(conversion.baseResource.value, unref(base)).pow(\n unref(exponent)\n );\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n return gain;\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.root(current, unref(exponent)).times(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.root(next, unref(exponent)).times(unref(base)).max(unref(base));\n }\n };\n}\n\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(() => {\n const conversion: S = optionsFunc();\n\n setDefault(conversion, \"buyMax\", false);\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(conversion.gainResource.value);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(Decimal.add(conversion.gainResource.value, 1));\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = computed(() => {\n let gain = Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n ).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.gainModifier\n ? conversion.gainModifier.apply(\n unref((conversion as GenericConversion).currentGain)\n )\n : unref((conversion as GenericConversion).currentGain);\n // TODO just subtract cost?\n // Maybe by adding a cost function to scaling and nextAt just calls the cost function\n // with 1 + currentGain\n conversion.baseResource.value = 0;\n });\n\n return conversion;\n });\n}\n\nexport function setupPassiveGeneration(\n layer: GenericLayer,\n conversion: GenericConversion,\n rate: ProcessedComputable<DecimalSource> = 1\n): void {\n layer.on(\"preUpdate\", diff => {\n const currRate = isRef(rate) ? rate.value : rate;\n if (Decimal.neq(currRate, 0)) {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n Decimal.times(currRate, diff).times(unref(conversion.currentGain))\n );\n }\n });\n}\n\nfunction softcap(\n value: DecimalSource,\n cap: DecimalSource,\n power: DecimalSource = 0.5\n): DecimalSource {\n if (Decimal.lte(value, cap)) {\n return value;\n } else {\n return Decimal.pow(value, power).times(Decimal.pow(cap, Decimal.sub(1, power)));\n }\n}\n\nexport function addSoftcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>,\n power: ProcessedComputable<DecimalSource> = 0.5\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion =>\n softcap(scaling.currentGain(conversion), unref(cap), unref(power))\n };\n}\n\nexport function addHardcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion => Decimal.min(scaling.currentGain(conversion), unref(cap))\n };\n}\n","import { createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6447a93e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"toggle\" }, \"▼\", -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_CollapseTransition = _resolveComponent(\"CollapseTransition\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"infobox\", { collapsed: _ctx.unref(_ctx.collapsed), stacked: _ctx.stacked, ..._ctx.unref(_ctx.classes) }]),\n style: _normalizeStyle([\n {\n borderColor: _ctx.unref(_ctx.color),\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n _createElementVNode(\"button\", {\n class: \"title\",\n style: _normalizeStyle([{ backgroundColor: _ctx.unref(_ctx.color) }, _ctx.unref(_ctx.titleStyle) || []]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.collapsed.value = !_ctx.unref(_ctx.collapsed)))\n }, [\n _hoisted_1,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ], 4),\n _createVNode(_component_CollapseTransition, null, {\n default: _withCtx(() => [\n (!_ctx.unref(_ctx.collapsed))\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"body\",\n style: _normalizeStyle({ backgroundColor: _ctx.unref(_ctx.color) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.bodyComponent), {\n style: _normalizeStyle(_ctx.unref(_ctx.bodyStyle))\n }, null, 8, [\"style\"]))\n ], 4))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Node from \"components/Node.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport settings from \"game/settings\";\nimport { computeComponent, processedPropType } from \"util/vue\";\nimport CollapseTransition from \"@ivanv/vue-collapse-transition/src/CollapseTransition.vue\";\nimport { computed, defineComponent, PropType, Ref, StyleValue, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n color: processedPropType<string>(String),\n collapsed: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n titleStyle: processedPropType<StyleValue>(Object, String, Array),\n bodyStyle: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n CollapseTransition\n },\n setup(props) {\n const { title, display } = toRefs(props);\n\n const titleComponent = computeComponent(title);\n const bodyComponent = computeComponent(display);\n const stacked = computed(() => themes[settings.theme].mergeAdjacent);\n\n return {\n titleComponent,\n bodyComponent,\n stacked,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Infobox.vue?vue&type=template&id=6447a93e&scoped=true&ts=true\"\nimport script from \"./Infobox.vue?vue&type=script&lang=ts\"\nexport * from \"./Infobox.vue?vue&type=script&lang=ts\"\n\nimport \"./Infobox.vue?vue&type=style&index=0&id=6447a93e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6447a93e\"]])\n\nexport default __exports__","import InfoboxComponent from \"features/infoboxes/Infobox.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Ref, unref } from \"vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const InfoboxType = Symbol(\"Infobox\");\n\nexport interface InfoboxOptions {\n visibility?: Computable<Visibility>;\n color?: Computable<string>;\n style?: Computable<StyleValue>;\n titleStyle?: Computable<StyleValue>;\n bodyStyle?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n title: Computable<CoercableComponent>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseInfobox extends Persistent<boolean> {\n id: string;\n collapsed: Ref<boolean>;\n type: typeof InfoboxType;\n [Component]: typeof InfoboxComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Infobox<T extends InfoboxOptions> = Replace<\n T & BaseInfobox,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n color: GetComputableType<T[\"color\"]>;\n style: GetComputableType<T[\"style\"]>;\n titleStyle: GetComputableType<T[\"titleStyle\"]>;\n bodyStyle: GetComputableType<T[\"bodyStyle\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n title: GetComputableType<T[\"title\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericInfobox = Replace<\n Infobox<InfoboxOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createInfobox<T extends InfoboxOptions>(\n optionsFunc: OptionsFunc<T, Infobox<T>, BaseInfobox>\n): Infobox<T> {\n return createLazyProxy(persistent => {\n const infobox = Object.assign(persistent, optionsFunc());\n infobox.id = getUniqueID(\"infobox-\");\n infobox.type = InfoboxType;\n infobox[Component] = InfoboxComponent;\n\n infobox.collapsed = infobox[PersistentState];\n\n processComputable(infobox as T, \"visibility\");\n setDefault(infobox, \"visibility\", Visibility.Visible);\n processComputable(infobox as T, \"color\");\n processComputable(infobox as T, \"style\");\n processComputable(infobox as T, \"titleStyle\");\n processComputable(infobox as T, \"bodyStyle\");\n processComputable(infobox as T, \"classes\");\n processComputable(infobox as T, \"title\");\n processComputable(infobox as T, \"display\");\n\n infobox[GatherProps] = function (this: GenericInfobox) {\n const {\n visibility,\n display,\n title,\n color,\n collapsed,\n style,\n titleStyle,\n bodyStyle,\n classes,\n id\n } = this;\n return {\n visibility,\n display,\n title,\n color,\n collapsed,\n style: unref(style),\n titleStyle,\n bodyStyle,\n classes,\n id\n };\n };\n\n return infobox as unknown as Infobox<T>;\n }, persistent<boolean>(false));\n}\n","import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n ref: \"resizeListener\",\n class: _normalizeClass([\"resize-listener\", _ctx.unref(_ctx.classes)]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, null, 6))\n}","\nimport { StyleValue } from \"features/feature\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { Application } from \"pixi.js\";\nimport { processedPropType } from \"util/vue\";\nimport {\n defineComponent,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n PropType,\n ref,\n unref\n} from \"vue\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onInit: {\n type: Function as PropType<(app: Application) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>,\n onHotReload: Function as PropType<VoidFunction>\n },\n setup(props) {\n const app = ref<null | Application>(null);\n\n const resizeObserver = new ResizeObserver(updateBounds);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const nodes = inject(NodesInjectionKey)!;\n\n const resizeListener = ref<HTMLElement | null>(null);\n\n onMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n app.value = new Application({\n resizeTo: resListener,\n backgroundAlpha: 0\n });\n resizeListener.value?.appendChild(app.value.view);\n props.onInit(app.value as Application);\n }\n updateBounds();\n if (module.hot?.status() === \"apply\" && props.onHotReload) {\n nextTick(props.onHotReload);\n }\n });\n onBeforeUnmount(() => {\n app.value?.destroy();\n });\n\n let isDirty = true;\n function updateBounds() {\n if (isDirty) {\n isDirty = false;\n nextTick(() => {\n if (resizeListener.value != null && props.onContainerResized) {\n // TODO don't overlap with Links.vue\n (Object.values(nodes.value).filter(n => n) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n app.value?.resize();\n }\n isDirty = true;\n });\n }\n }\n document.fonts.ready.then(updateBounds);\n\n return {\n unref,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=4e1c0c10&scoped=true&ts=true\"\nimport script from \"./Particles.vue?vue&type=script&lang=tsx\"\nexport * from \"./Particles.vue?vue&type=script&lang=tsx\"\n\nimport \"./Particles.vue?vue&type=style&index=0&id=4e1c0c10&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4e1c0c10\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Ref, shallowRef, unref } from \"vue\";\nimport {\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Application } from \"pixi.js\";\nimport { Emitter, EmitterConfigV3, upgradeConfig } from \"@pixi/particle-emitter\";\nimport { Computable, GetComputableType } from \"util/computed\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n onContainerResized?: (boundingRect: DOMRect) => void;\n onHotReload?: VoidFunction;\n}\n\nexport interface BaseParticles {\n id: string;\n app: Ref<null | Application>;\n addEmitter: (config: EmitterConfigV3) => Promise<Emitter>;\n type: typeof ParticlesType;\n [Component]: typeof ParticlesComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Particles<T extends ParticlesOptions> = Replace<\n T & BaseParticles,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n }\n>;\n\nexport type GenericParticles = Particles<ParticlesOptions>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: OptionsFunc<T, Particles<T>, BaseParticles>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.app = shallowRef(null);\n particles.addEmitter = (config: EmitterConfigV3): Promise<Emitter> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.app.value) {\n return Promise.resolve(new Emitter(genericParticles.app.value.stage, config));\n }\n return new Promise<Emitter>(resolve => {\n emittersToAdd.push({ resolve, config });\n });\n };\n\n let emittersToAdd: {\n resolve: (value: Emitter | PromiseLike<Emitter>) => void;\n config: EmitterConfigV3;\n }[] = [];\n\n function onInit(app: Application) {\n (particles as GenericParticles).app.value = app;\n emittersToAdd.forEach(({ resolve, config }) => resolve(new Emitter(app.stage, config)));\n emittersToAdd = [];\n }\n\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, style, classes, onContainerResized, onHotReload } = this;\n return {\n id,\n style: unref(style),\n classes,\n onContainerResized,\n onHotReload,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n\ndeclare global {\n interface Window {\n upgradeConfig: typeof upgradeConfig;\n }\n}\nwindow.upgradeConfig = upgradeConfig;\n","import { OptionsFunc, getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport { DefaultValue, Persistent, persistent, PersistentState } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { Computable, GetComputableType, processComputable } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Unsubscribe } from \"nanoevents\";\nimport { isRef, unref } from \"vue\";\n\nexport const ResetType = Symbol(\"Reset\");\n\nexport interface ResetOptions {\n thingsToReset: Computable<Record<string, unknown>[]>;\n onReset?: VoidFunction;\n}\n\nexport interface BaseReset {\n id: string;\n reset: VoidFunction;\n type: typeof ResetType;\n}\n\nexport type Reset<T extends ResetOptions> = Replace<\n T & BaseReset,\n {\n thingsToReset: GetComputableType<T[\"thingsToReset\"]>;\n }\n>;\n\nexport type GenericReset = Reset<ResetOptions>;\n\nexport function createReset<T extends ResetOptions>(\n optionsFunc: OptionsFunc<T, Reset<T>, BaseReset>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset = optionsFunc();\n reset.id = getUniqueID(\"reset-\");\n reset.type = ResetType;\n\n reset.reset = function () {\n const handleObject = (obj: unknown) => {\n if (obj && typeof obj === \"object\") {\n if (PersistentState in obj) {\n (obj as Persistent)[PersistentState].value = (obj as Persistent)[\n DefaultValue\n ];\n } else if (!(obj instanceof Decimal) && !isRef(obj)) {\n Object.values(obj).forEach(obj =>\n handleObject(obj as Record<string, unknown>)\n );\n }\n }\n };\n unref((reset as GenericReset).thingsToReset).forEach(handleObject);\n globalBus.emit(\"reset\", reset as GenericReset);\n reset.onReset?.();\n };\n\n processComputable(reset as T, \"thingsToReset\");\n\n return reset as unknown as Reset<T>;\n });\n}\n\nconst listeners: Record<string, Unsubscribe | undefined> = {};\nexport function trackResetTime(layer: GenericLayer, reset: GenericReset): Persistent<Decimal> {\n const resetTime = persistent<Decimal>(new Decimal(0));\n listeners[layer.id] = layer.on(\"preUpdate\", diff => {\n resetTime.value = Decimal.add(resetTime.value, diff);\n });\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === reset) {\n resetTime.value = new Decimal(0);\n }\n });\n return resetTime;\n}\nglobalBus.on(\"removeLayer\", layer => {\n // unsubscribe from preUpdate\n listeners[layer.id]?.();\n listeners[layer.id] = undefined;\n});\n\ndeclare module \"game/events\" {\n interface GlobalEvents {\n reset: (reset: GenericReset) => void;\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n resource: Resource;\n color: string;\n}\n\n\n\nconst amount = computed(() => displayResource(props.resource));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"h2\", {\n style: _normalizeStyle({ color: __props.color, 'text-shadow': '0px 0px 10px ' + __props.color })\n }, _toDisplayString(_unref(amount)), 5))\n}\n}\n\n})","import script from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = { key: 1 }\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\", \")\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\n\nimport { CoercableComponent } from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport Decimal from \"util/bignum\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { computed, Ref, StyleValue, toRefs } from \"vue\";\nimport ResourceVue from \"features/resources/Resource.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null,\n classes: null,\n style: null,\n effectDisplay: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n resource: Resource;\n color?: string;\n classes?: Record<string, boolean>;\n style?: StyleValue;\n effectDisplay?: CoercableComponent;\n}\n\n\nconst props = toRefs(_props);\n\nconst effectComponent = computeOptionalComponent(\n props.effectDisplay as Ref<CoercableComponent | undefined>\n);\n\nconst showPrefix = computed(() => {\n return Decimal.lt(props.resource.value, \"1e1000\");\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (_unref(showPrefix))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"You have \"))\n : _createCommentVNode(\"\", true),\n _createVNode(ResourceVue, {\n resource: __props.resource,\n color: __props.color || 'white'\n }, null, 8, [\"resource\", \"color\"]),\n _createTextVNode(\" \" + _toDisplayString(__props.resource.displayName), 1),\n (_unref(effectComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _hoisted_3,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(effectComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_4,\n _hoisted_5\n ]))\n}\n}\n\n})","import script from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { CoercableComponent, jsx } from \"features/feature\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { Computable, convertComputable, ProcessedComputable } from \"util/computed\";\nimport { renderJSX } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/modifiers.css\";\n\nexport interface Modifier {\n apply: (gain: DecimalSource) => DecimalSource;\n revert: (gain: DecimalSource) => DecimalSource;\n enabled: ProcessedComputable<boolean>;\n description?: ProcessedComputable<CoercableComponent>;\n}\n\nexport function createAdditiveModifier(\n addend: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedAddend = convertComputable(addend);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.add(gain, unref(processedAddend)),\n revert: gain => Decimal.sub(gain, unref(processedAddend)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">+{format(unref(processedAddend))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createMultiplicativeModifier(\n multiplier: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedMultiplier = convertComputable(multiplier);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.times(gain, unref(processedMultiplier)),\n revert: gain => Decimal.div(gain, unref(processedMultiplier)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">x{format(unref(processedMultiplier))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createExponentialModifier(\n exponent: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedExponent = convertComputable(exponent);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.pow(gain, unref(processedExponent)),\n revert: gain => Decimal.root(gain, unref(processedExponent)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">^{format(unref(processedExponent))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createSequentialModifier(...modifiers: Modifier[]): Required<Modifier> {\n return {\n apply: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduceRight((gain, modifier) => modifier.revert(gain), gain),\n enabled: computed(() => modifiers.filter(m => unref(m.enabled)).length > 0),\n description: jsx(() => (\n <>\n {(\n modifiers\n .filter(m => unref(m.enabled))\n .map(m => unref(m.description))\n .filter(d => d) as CoercableComponent[]\n ).map(renderJSX)}\n </>\n ))\n };\n}\n\nexport function createModifierSection(\n title: string,\n subtitle: string,\n modifier: Required<Modifier>,\n base: DecimalSource = 1,\n unit = \"\"\n) {\n return (\n <div>\n <h3>\n {title}\n {subtitle ? <span class=\"subtitle\"> ({subtitle})</span> : null}\n </h3>\n <br />\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {format(base)}\n {unit}\n </span>\n <span class=\"modifier-description\">Base</span>\n </div>\n {renderJSX(unref(modifier.description))}\n <hr />\n Total: {format(modifier.apply(base))}\n {unit}\n </div>\n );\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, isRef as _isRef, vModelText as _vModelText, createElementVNode as _createElementVNode, withDirectives as _withDirectives, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-20a0a34d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_3 = [\"min\", \"max\"]\n\nimport { computed, toRefs, unref } from \"vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n min: null,\n max: null\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: number): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: string;\n modelValue?: number;\n min?: number;\n max?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst value = computed({\n get() {\n return String(unref(props.modelValue) || 0);\n },\n set(value: string) {\n emit(\"update:modelValue\", Number(value));\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.title)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(__props.title), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(Tooltip, {\n display: `${_unref(value)}`,\n class: _normalizeClass({ fullWidth: !__props.title })\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"range\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n min: __props.min,\n max: __props.max\n }, null, 8, _hoisted_3), [\n [_vModelText, _unref(value)]\n ])\n ]),\n _: 1\n }, 8, [\"display\", \"class\"])\n ]))\n}\n}\n\n})","import script from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Slider.vue?vue&type=style&index=0&id=20a0a34d&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-20a0a34d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { nextTick, onMounted, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst top = ref(\"0\");\nconst observer = new ResizeObserver(updateTop);\nconst element = ref<HTMLElement | null>(null);\n\nfunction updateTop() {\n let el = element.value;\n if (el == undefined) {\n return;\n }\n\n let newTop = 0;\n while (el.previousSibling) {\n const sibling = el.previousSibling as HTMLElement;\n if (sibling.dataset && \"vSticky\" in sibling.dataset) {\n newTop += sibling.offsetHeight;\n }\n el = sibling;\n }\n top.value = newTop + \"px\";\n}\n\nnextTick(updateTop);\ndocument.fonts.ready.then(updateTop);\n\nonMounted(() => {\n const el = element.value?.parentElement;\n if (el) {\n observer.observe(el);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"sticky\",\n style: _normalizeStyle({ top: top.value }),\n ref_key: \"element\",\n ref: element,\n \"data-v-sticky\": \"\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n}\n}\n\n})","import script from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Sticky.vue?vue&type=style&index=0&id=6987dd96&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6987dd96\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n height: null\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"vr\",\n style: _normalizeStyle({ height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./VerticalRule.vue?vue&type=style&index=0&id=15f6e746&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15f6e746\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n width: _ctx.unref(_ctx.width) + 'px',\n height: _ctx.unref(_ctx.height) + 'px',\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n bar: true,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"overlayTextContainer border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), {\n key: 0,\n class: \"overlayText\",\n style: _normalizeStyle(_ctx.unref(_ctx.textStyle))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.style) ?? {},\n _ctx.unref(_ctx.baseStyle) ?? {},\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n _createElementVNode(\"div\", {\n class: \"fill\",\n style: _normalizeStyle([_ctx.barStyle, _ctx.unref(_ctx.style) ?? {}, _ctx.unref(_ctx.fillStyle) ?? {}])\n }, null, 4)\n ], 4),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { Direction } from \"./bar\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, CSSProperties, defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n progress: {\n type: processedPropType<DecimalSource>(String, Object, Number),\n required: true\n },\n width: {\n type: processedPropType<number>(Number),\n required: true\n },\n height: {\n type: processedPropType<number>(Number),\n required: true\n },\n direction: {\n type: processedPropType<Direction>(String),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n borderStyle: processedPropType<StyleValue>(Object, String, Array),\n textStyle: processedPropType<StyleValue>(Object, String, Array),\n baseStyle: processedPropType<StyleValue>(Object, String, Array),\n fillStyle: processedPropType<StyleValue>(Object, String, Array),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { progress, width, height, direction, display } = toRefs(props);\n\n const normalizedProgress = computed(() => {\n let progressNumber =\n progress.value instanceof Decimal\n ? progress.value.toNumber()\n : Number(progress.value);\n return (1 - Math.min(Math.max(progressNumber, 0), 1)) * 100;\n });\n\n const barStyle = computed(() => {\n const barStyle: Partial<CSSProperties> = {\n width: unwrapRef(width) + 0.5 + \"px\",\n height: unwrapRef(height) + 0.5 + \"px\"\n };\n switch (unref(direction)) {\n case Direction.Up:\n barStyle.clipPath = `inset(${normalizedProgress.value}% 0% 0% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Down:\n barStyle.clipPath = `inset(0% 0% ${normalizedProgress.value}% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Right:\n barStyle.clipPath = `inset(0% ${normalizedProgress.value}% 0% 0%)`;\n break;\n case Direction.Left:\n barStyle.clipPath = `inset(0% 0% 0% ${normalizedProgress.value} + '%)`;\n break;\n case Direction.Default:\n barStyle.clipPath = \"inset(0% 50% 0% 0%)\";\n break;\n }\n return barStyle;\n });\n\n const component = computeOptionalComponent(display);\n\n return {\n normalizedProgress,\n barStyle,\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Bar.vue?vue&type=template&id=e6e3c366&scoped=true&ts=true\"\nimport script from \"./Bar.vue?vue&type=script&lang=ts\"\nexport * from \"./Bar.vue?vue&type=script&lang=ts\"\n\nimport \"./Bar.vue?vue&type=style&index=0&id=e6e3c366&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e6e3c366\"]])\n\nexport default __exports__","import BarComponent from \"features/bars/Bar.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { unref } from \"vue\";\n\nexport const BarType = Symbol(\"Bar\");\n\nexport enum Direction {\n Up = \"Up\",\n Down = \"Down\",\n Left = \"Left\",\n Right = \"Right\",\n Default = \"Up\"\n}\n\nexport interface BarOptions {\n visibility?: Computable<Visibility>;\n width: Computable<number>;\n height: Computable<number>;\n direction: Computable<Direction>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n borderStyle?: Computable<StyleValue>;\n baseStyle?: Computable<StyleValue>;\n textStyle?: Computable<StyleValue>;\n fillStyle?: Computable<StyleValue>;\n progress: Computable<DecimalSource>;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n}\n\nexport interface BaseBar {\n id: string;\n type: typeof BarType;\n [Component]: typeof BarComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Bar<T extends BarOptions> = Replace<\n T & BaseBar,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n width: GetComputableType<T[\"width\"]>;\n height: GetComputableType<T[\"height\"]>;\n direction: GetComputableType<T[\"direction\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n borderStyle: GetComputableType<T[\"borderStyle\"]>;\n baseStyle: GetComputableType<T[\"baseStyle\"]>;\n textStyle: GetComputableType<T[\"textStyle\"]>;\n fillStyle: GetComputableType<T[\"fillStyle\"]>;\n progress: GetComputableType<T[\"progress\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericBar = Replace<\n Bar<BarOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createBar<T extends BarOptions>(\n optionsFunc: OptionsFunc<T, Bar<T>, BaseBar>\n): Bar<T> {\n return createLazyProxy(() => {\n const bar = optionsFunc();\n bar.id = getUniqueID(\"bar-\");\n bar.type = BarType;\n bar[Component] = BarComponent;\n\n processComputable(bar as T, \"visibility\");\n setDefault(bar, \"visibility\", Visibility.Visible);\n processComputable(bar as T, \"width\");\n processComputable(bar as T, \"height\");\n processComputable(bar as T, \"direction\");\n processComputable(bar as T, \"style\");\n processComputable(bar as T, \"classes\");\n processComputable(bar as T, \"borderStyle\");\n processComputable(bar as T, \"baseStyle\");\n processComputable(bar as T, \"textStyle\");\n processComputable(bar as T, \"fillStyle\");\n processComputable(bar as T, \"progress\");\n processComputable(bar as T, \"display\");\n processComputable(bar as T, \"mark\");\n\n bar[GatherProps] = function (this: GenericBar) {\n const {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style,\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n } = this;\n return {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style: unref(style),\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n };\n };\n\n return bar as unknown as Bar<T>;\n });\n}\n","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport { Resource } from \"features/resources/resource\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref } from \"vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"./feature\";\n\nexport const BuyableType = Symbol(\"Buyable\");\n\nexport type BuyableDisplay =\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n };\n\nexport interface BuyableOptions {\n visibility?: Computable<Visibility>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canPurchase?: Computable<boolean>;\n purchaseLimit?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n small?: Computable<boolean>;\n display?: Computable<BuyableDisplay>;\n onPurchase?: (cost: DecimalSource) => void;\n}\n\nexport interface BaseBuyable extends Persistent<DecimalSource> {\n id: string;\n amount: Ref<DecimalSource>;\n maxed: Ref<boolean>;\n canAfford: Ref<boolean>;\n canClick: ProcessedComputable<boolean>;\n onClick: VoidFunction;\n purchase: VoidFunction;\n type: typeof BuyableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Buyable<T extends BuyableOptions> = Replace<\n T & BaseBuyable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n cost: GetComputableType<T[\"cost\"]>;\n resource: GetComputableType<T[\"resource\"]>;\n canPurchase: GetComputableTypeWithDefault<T[\"canPurchase\"], Ref<boolean>>;\n purchaseLimit: GetComputableTypeWithDefault<T[\"purchaseLimit\"], Decimal>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n small: GetComputableType<T[\"small\"]>;\n display: Ref<CoercableComponent>;\n }\n>;\n\nexport type GenericBuyable = Replace<\n Buyable<BuyableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n purchaseLimit: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createBuyable<T extends BuyableOptions>(\n optionsFunc: OptionsFunc<T, Buyable<T>, BaseBuyable>\n): Buyable<T> {\n return createLazyProxy(persistent => {\n const buyable = Object.assign(persistent, optionsFunc());\n\n if (buyable.canPurchase == null && (buyable.resource == null || buyable.cost == null)) {\n console.warn(\n \"Cannot create buyable without a canPurchase property or a resource and cost property\",\n buyable\n );\n throw \"Cannot create buyable without a canPurchase property or a resource and cost property\";\n }\n\n buyable.id = getUniqueID(\"buyable-\");\n buyable.type = BuyableType;\n buyable[Component] = ClickableComponent;\n\n buyable.amount = buyable[PersistentState];\n buyable.canAfford = computed(() => {\n const genericBuyable = buyable as GenericBuyable;\n const cost = unref(genericBuyable.cost);\n return (\n genericBuyable.resource != null &&\n cost != null &&\n Decimal.gte(genericBuyable.resource.value, cost)\n );\n });\n if (buyable.canPurchase == null) {\n buyable.canPurchase = computed(\n () =>\n unref((buyable as GenericBuyable).visibility) === Visibility.Visible &&\n unref((buyable as GenericBuyable).canAfford) &&\n Decimal.lt(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n }\n buyable.maxed = computed(() =>\n Decimal.gte(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n processComputable(buyable as T, \"classes\");\n const classes = buyable.classes as ProcessedComputable<Record<string, boolean>> | undefined;\n buyable.classes = computed(() => {\n const currClasses = unref(classes) || {};\n if ((buyable as GenericBuyable).maxed.value) {\n currClasses.bought = true;\n }\n return currClasses;\n });\n processComputable(buyable as T, \"canPurchase\");\n buyable.canClick = buyable.canPurchase as ProcessedComputable<boolean>;\n buyable.onClick = buyable.purchase = function () {\n const genericBuyable = buyable as GenericBuyable;\n if (\n !unref(genericBuyable.canPurchase) ||\n genericBuyable.cost == null ||\n genericBuyable.resource == null\n ) {\n return;\n }\n const cost = unref(genericBuyable.cost);\n genericBuyable.resource.value = Decimal.sub(genericBuyable.resource.value, cost);\n genericBuyable.amount.value = Decimal.add(genericBuyable.amount.value, 1);\n this.onPurchase?.(cost);\n };\n processComputable(buyable as T, \"display\");\n const display = buyable.display;\n buyable.display = jsx(() => {\n // TODO once processComputable types correctly, remove this \"as X\"\n const currDisplay = unref(display) as BuyableDisplay;\n if (isCoercableComponent(currDisplay)) {\n const CurrDisplay = coerceComponent(currDisplay);\n return <CurrDisplay />;\n }\n if (currDisplay != null && buyable.cost != null && buyable.resource != null) {\n const genericBuyable = buyable as GenericBuyable;\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description);\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n const amountDisplay =\n unref(genericBuyable.purchaseLimit) === Decimal.dInf ? (\n <>Amount: {formatWhole(genericBuyable.amount.value)}</>\n ) : (\n <>\n Amount: {formatWhole(genericBuyable.amount.value)} /{\" \"}\n {formatWhole(unref(genericBuyable.purchaseLimit))}\n </>\n );\n\n return (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n <div>\n <br />\n {amountDisplay}\n </div>\n {currDisplay.effectDisplay ? (\n <div>\n <br />\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {genericBuyable.cost && !genericBuyable.maxed.value ? (\n <div>\n <br />\n Cost: {format(unref(genericBuyable.cost) || 0)}{\" \"}\n {buyable.resource.displayName}\n </div>\n ) : null}\n </span>\n );\n }\n return \"\";\n });\n\n processComputable(buyable as T, \"visibility\");\n setDefault(buyable, \"visibility\", Visibility.Visible);\n processComputable(buyable as T, \"cost\");\n processComputable(buyable as T, \"resource\");\n processComputable(buyable as T, \"purchaseLimit\");\n setDefault(buyable, \"purchaseLimit\", Decimal.dInf);\n processComputable(buyable as T, \"style\");\n processComputable(buyable as T, \"mark\");\n processComputable(buyable as T, \"small\");\n\n buyable[GatherProps] = function (this: GenericBuyable) {\n const { display, visibility, style, classes, onClick, canClick, small, mark, id } =\n this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return buyable as unknown as Buyable<T>;\n }, persistent<DecimalSource>(0));\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e580749\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.notifyStyle,\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n feature: true,\n challenge: true,\n done: _ctx.unref(_ctx.completed),\n canStart: _ctx.unref(_ctx.canStart) && !_ctx.unref(_ctx.maxed),\n maxed: _ctx.unref(_ctx.maxed),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"button\", {\n class: \"toggleChallenge\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.toggle && _ctx.toggle(...args))),\n disabled: !_ctx.unref(_ctx.canStart) || _ctx.unref(_ctx.maxed)\n }, _toDisplayString(_ctx.buttonText), 9, _hoisted_1),\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { GenericChallenge } from \"features/challenges/challenge\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { getHighNotifyStyle, getNotifyStyle } from \"game/notifications\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n active: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n maxed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canComplete: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n display: processedPropType<UnwrapRef<GenericChallenge[\"display\"]>>(\n String,\n Object,\n Function\n ),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n completed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canStart: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n toggle: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { active, maxed, canComplete, display } = toRefs(props);\n\n const buttonText = computed(() => {\n if (active.value) {\n return canComplete.value ? \"Finish\" : \"Exit Early\";\n }\n if (maxed.value) {\n return \"Completed\";\n }\n return \"Start\";\n });\n\n const comp = shallowRef<Component | string>(\"\");\n\n const notifyStyle = computed(() => {\n const currActive = unwrapRef(active);\n const currCanComplete = unwrapRef(canComplete);\n if (currActive) {\n if (currCanComplete) {\n return getHighNotifyStyle();\n }\n return getNotifyStyle();\n }\n return {};\n });\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const Goal = coerceComponent(currDisplay.goal || \"\");\n const Reward = coerceComponent(currDisplay.reward || \"\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.goal ? (\n <div>\n <br />\n Goal: <Goal />\n </div>\n ) : null}\n {currDisplay.reward ? (\n <div>\n <br />\n Reward: <Reward />\n </div>\n ) : null}\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n buttonText,\n notifyStyle,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Challenge.vue?vue&type=template&id=5e580749&scoped=true&ts=true\"\nimport script from \"./Challenge.vue?vue&type=script&lang=tsx\"\nexport * from \"./Challenge.vue?vue&type=script&lang=tsx\"\n\nimport \"./Challenge.vue?vue&type=style&index=0&id=5e580749&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5e580749\"]])\n\nexport default __exports__","import { isArray } from \"@vue/shared\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport ChallengeComponent from \"features/challenges/Challenge.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericReset } from \"features/reset\";\nimport { Resource } from \"features/resources/resource\";\nimport { globalBus } from \"game/events\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref, watch, WatchStopHandle } from \"vue\";\n\nexport const ChallengeType = Symbol(\"ChallengeType\");\n\nexport interface ChallengeOptions {\n visibility?: Computable<Visibility>;\n canStart?: Computable<boolean>;\n reset?: GenericReset;\n canComplete?: Computable<boolean | DecimalSource>;\n completionLimit?: Computable<DecimalSource>;\n mark?: Computable<boolean | string>;\n resource?: Resource;\n goal?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n goal?: CoercableComponent;\n reward?: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n onExit?: VoidFunction;\n onEnter?: VoidFunction;\n}\n\nexport interface BaseChallenge {\n id: string;\n completions: Persistent<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: Persistent<boolean>;\n toggle: VoidFunction;\n complete: (remainInChallenge?: boolean) => void;\n type: typeof ChallengeType;\n [Component]: typeof ChallengeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Challenge<T extends ChallengeOptions> = Replace<\n T & BaseChallenge,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canStart: GetComputableTypeWithDefault<T[\"canStart\"], true>;\n canComplete: GetComputableTypeWithDefault<T[\"canComplete\"], Ref<boolean>>;\n completionLimit: GetComputableTypeWithDefault<T[\"completionLimit\"], 1>;\n mark: GetComputableTypeWithDefault<T[\"mark\"], Ref<boolean>>;\n goal: GetComputableType<T[\"goal\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericChallenge = Replace<\n Challenge<ChallengeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canStart: ProcessedComputable<boolean>;\n canComplete: ProcessedComputable<boolean | DecimalSource>;\n completionLimit: ProcessedComputable<DecimalSource>;\n mark: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createChallenge<T extends ChallengeOptions>(\n optionsFunc: OptionsFunc<T, Challenge<T>, BaseChallenge>\n): Challenge<T> {\n const completions = persistent(0);\n const active = persistent(false);\n return createLazyProxy(() => {\n const challenge = optionsFunc();\n\n if (\n challenge.canComplete == null &&\n (challenge.resource == null || challenge.goal == null)\n ) {\n console.warn(\n \"Cannot create challenge without a canComplete property or a resource and goal property\",\n challenge\n );\n throw \"Cannot create challenge without a canComplete property or a resource and goal property\";\n }\n\n challenge.id = getUniqueID(\"challenge-\");\n challenge.type = ChallengeType;\n challenge[Component] = ChallengeComponent;\n\n challenge.completions = completions;\n challenge.active = active;\n challenge.completed = computed(() =>\n Decimal.gt((challenge as GenericChallenge).completions.value, 0)\n );\n challenge.maxed = computed(() =>\n Decimal.gte(\n (challenge as GenericChallenge).completions.value,\n unref((challenge as GenericChallenge).completionLimit)\n )\n );\n challenge.toggle = function () {\n const genericChallenge = challenge as GenericChallenge;\n if (genericChallenge.active.value) {\n if (unref(genericChallenge.canComplete) && !genericChallenge.maxed.value) {\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n }\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n } else if (\n unref(genericChallenge.canStart) &&\n unref(genericChallenge.visibility) === Visibility.Visible &&\n !genericChallenge.maxed.value\n ) {\n genericChallenge.reset?.reset();\n genericChallenge.active.value = true;\n genericChallenge.onEnter?.();\n }\n };\n challenge.complete = function (remainInChallenge?: boolean) {\n const genericChallenge = challenge as GenericChallenge;\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (\n genericChallenge.active.value &&\n completions !== false &&\n (completions === true || Decimal.neq(0, completions)) &&\n !genericChallenge.maxed.value\n ) {\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n if (remainInChallenge !== true) {\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n }\n }\n };\n processComputable(challenge as T, \"visibility\");\n setDefault(challenge, \"visibility\", Visibility.Visible);\n const visibility = challenge.visibility as ProcessedComputable<Visibility>;\n challenge.visibility = computed(() => {\n if (settings.hideChallenges === true && unref(challenge.maxed)) {\n return Visibility.None;\n }\n return unref(visibility);\n });\n if (challenge.canComplete == null) {\n challenge.canComplete = computed(() => {\n const genericChallenge = challenge as GenericChallenge;\n if (\n !genericChallenge.active.value ||\n genericChallenge.resource == null ||\n genericChallenge.goal == null\n ) {\n return false;\n }\n return Decimal.gte(genericChallenge.resource.value, unref(genericChallenge.goal));\n });\n }\n if (challenge.mark == null) {\n challenge.mark = computed(\n () =>\n Decimal.gt(unref((challenge as GenericChallenge).completionLimit), 1) &&\n !!unref(challenge.maxed)\n );\n }\n\n processComputable(challenge as T, \"canStart\");\n setDefault(challenge, \"canStart\", true);\n processComputable(challenge as T, \"canComplete\");\n processComputable(challenge as T, \"completionLimit\");\n setDefault(challenge, \"completionLimit\", 1);\n processComputable(challenge as T, \"mark\");\n processComputable(challenge as T, \"goal\");\n processComputable(challenge as T, \"classes\");\n processComputable(challenge as T, \"style\");\n processComputable(challenge as T, \"display\");\n\n if (challenge.reset != null) {\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === challenge.reset && (challenge.active as Ref<boolean>).value) {\n (challenge.toggle as VoidFunction)();\n }\n });\n }\n\n challenge[GatherProps] = function (this: GenericChallenge) {\n const {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style,\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n } = this;\n return {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style: unref(style),\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n };\n };\n\n return challenge as unknown as Challenge<T>;\n });\n}\n\nexport function setupAutoComplete(\n challenge: GenericChallenge,\n autoActive: Computable<boolean> = true,\n exitOnComplete = true\n): WatchStopHandle {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return watch([challenge.canComplete, isActive], ([canComplete, isActive]) => {\n if (canComplete && isActive) {\n challenge.complete(!exitOnComplete);\n }\n });\n}\n\nexport function createActiveChallenge(\n challenges: GenericChallenge[]\n): Ref<GenericChallenge | undefined> {\n return computed(() => challenges.find(challenge => challenge.active.value));\n}\n\nexport function isAnyChallengeActive(\n challenges: GenericChallenge[] | Ref<GenericChallenge | undefined>\n): Ref<boolean> {\n if (isArray(challenges)) {\n challenges = createActiveChallenge(challenges);\n }\n return computed(() => (challenges as Ref<GenericChallenge | undefined>).value != null);\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n hideChallenges: boolean;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"hideChallenges\", false);\n});\n\nregisterSettingField(\n jsx(() => (\n <Toggle\n title=\"Hide Maxed Challenges\"\n onUpdate:modelValue={value => (settings.hideChallenges = value)}\n modelValue={settings.hideChallenges}\n />\n ))\n);\n","import { hasWon } from \"data/projEntry\";\nimport { globalBus } from \"game/events\";\nimport player from \"game/player\";\nimport { registerInfoComponent } from \"game/settings\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n GetComputableType,\n ProcessedComputable,\n processComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { shallowReactive, unref } from \"vue\";\nimport { OptionsFunc, findFeatures, jsx, Replace, setDefault } from \"./feature\";\n\nexport const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});\nexport const HotkeyType = Symbol(\"Hotkey\");\n\nexport interface HotkeyOptions {\n enabled?: Computable<boolean>;\n key: string;\n description: Computable<string>;\n onPress: VoidFunction;\n}\n\nexport interface BaseHotkey {\n type: typeof HotkeyType;\n}\n\nexport type Hotkey<T extends HotkeyOptions> = Replace<\n T & BaseHotkey,\n {\n enabled: GetComputableTypeWithDefault<T[\"enabled\"], true>;\n description: GetComputableType<T[\"description\"]>;\n }\n>;\n\nexport type GenericHotkey = Replace<\n Hotkey<HotkeyOptions>,\n {\n enabled: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createHotkey<T extends HotkeyOptions>(\n optionsFunc: OptionsFunc<T, Hotkey<T>, BaseHotkey>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey = optionsFunc();\n hotkey.type = HotkeyType;\n\n processComputable(hotkey as T, \"enabled\");\n setDefault(hotkey, \"enabled\", true);\n processComputable(hotkey as T, \"description\");\n\n return hotkey as unknown as Hotkey<T>;\n });\n}\n\nglobalBus.on(\"addLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = hotkey;\n });\n});\n\nglobalBus.on(\"removeLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = undefined;\n });\n});\n\ndocument.onkeydown = function (e) {\n if ((e.target as HTMLElement | null)?.tagName === \"INPUT\") {\n return;\n }\n if (hasWon.value && !player.keepGoing) {\n return;\n }\n let key = e.key;\n if (e.shiftKey) {\n key = \"shift+\" + key;\n }\n if (e.ctrlKey) {\n key = \"ctrl+\" + key;\n }\n const hotkey = hotkeys[key];\n if (hotkey && unref(hotkey.enabled)) {\n e.preventDefault();\n hotkey.onPress();\n }\n};\n\nregisterInfoComponent(\n jsx(() => {\n const keys = Object.values(hotkeys).filter(hotkey => unref(hotkey?.enabled));\n if (keys.length === 0) {\n return \"\";\n }\n return (\n <div>\n <br />\n <h4>Hotkeys</h4>\n {keys.map(hotkey => (\n <div>\n {hotkey?.key}: {hotkey?.description}\n </div>\n ))}\n </div>\n );\n })\n);\n","import LinksComponent from \"./Links.vue\";\nimport { Component, OptionsFunc, GatherProps, Replace } from \"features/feature\";\nimport { Position } from \"game/layers\";\nimport {\n Computable,\n GetComputableType,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { SVGAttributes } from \"vue\";\n\nexport const LinksType = Symbol(\"Links\");\n\nexport interface Link extends SVGAttributes {\n startNode: { id: string };\n endNode: { id: string };\n offsetStart?: Position;\n offsetEnd?: Position;\n}\n\nexport interface LinksOptions {\n links?: Computable<Link[]>;\n}\n\nexport interface BaseLinks {\n type: typeof LinksType;\n [Component]: typeof LinksComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Links<T extends LinksOptions> = Replace<\n T & BaseLinks,\n {\n links: GetComputableType<T[\"links\"]>;\n }\n>;\n\nexport type GenericLinks = Replace<\n Links<LinksOptions>,\n {\n links: ProcessedComputable<Link[]>;\n }\n>;\n\nexport function createLinks<T extends LinksOptions>(\n optionsFunc: OptionsFunc<T, Links<T>, BaseLinks>\n): Links<T> {\n return createLazyProxy(() => {\n const links = optionsFunc();\n links.type = LinksType;\n links[Component] = LinksComponent;\n\n processComputable(links as T, \"links\");\n\n links[GatherProps] = function (this: GenericLinks) {\n const { links } = this;\n return {\n links\n };\n };\n\n return links as unknown as Links<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({ feature: true, milestone: true, done: _ctx.unref(_ctx.earned), ..._ctx.unref(_ctx.classes) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)))),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { GenericMilestone } from \"features/milestones/milestone\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, UnwrapRef, watchEffect } from \"vue\";\nimport Node from \"../../components/Node.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<UnwrapRef<GenericMilestone[\"display\"]>>(\n String,\n Object,\n Function\n ),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { display } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Requirement = coerceComponent(currDisplay.requirement, \"h3\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\", \"b\");\n const OptionsDisplay = coerceComponent(currDisplay.optionsDisplay || \"\", \"span\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n <Requirement />\n {currDisplay.effectDisplay ? (\n <div>\n <EffectDisplay />\n </div>\n ) : null}\n {currDisplay.optionsDisplay ? (\n <div class=\"equal-spaced\">\n <OptionsDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n comp,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Milestone.vue?vue&type=template&id=0b660ac3&scoped=true&ts=true\"\nimport script from \"./Milestone.vue?vue&type=script&lang=tsx\"\nexport * from \"./Milestone.vue?vue&type=script&lang=tsx\"\n\nimport \"./Milestone.vue?vue&type=style&index=0&id=0b660ac3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0b660ac3\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport MilestoneComponent from \"features/milestones/Milestone.vue\";\nimport { globalBus } from \"game/events\";\nimport \"game/notifications\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const MilestoneType = Symbol(\"Milestone\");\n\nexport enum MilestoneDisplay {\n All = \"all\",\n //Last = \"last\",\n Configurable = \"configurable\",\n Incomplete = \"incomplete\",\n None = \"none\"\n}\n\nexport interface MilestoneOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n display?: Computable<\n | CoercableComponent\n | {\n requirement: CoercableComponent;\n effectDisplay?: CoercableComponent;\n optionsDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseMilestone extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof MilestoneType;\n [Component]: typeof MilestoneComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Milestone<T extends MilestoneOptions> = Replace<\n T & BaseMilestone,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericMilestone = Replace<\n Milestone<MilestoneOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createMilestone<T extends MilestoneOptions>(\n optionsFunc: OptionsFunc<T, Milestone<T>, BaseMilestone>\n): Milestone<T> {\n return createLazyProxy(persistent => {\n const milestone = Object.assign(persistent, optionsFunc());\n milestone.id = getUniqueID(\"milestone-\");\n milestone.type = MilestoneType;\n milestone[Component] = MilestoneComponent;\n\n milestone.earned = milestone[PersistentState];\n milestone.complete = function () {\n milestone[PersistentState].value = true;\n };\n\n processComputable(milestone as T, \"visibility\");\n setDefault(milestone, \"visibility\", Visibility.Visible);\n const visibility = milestone.visibility as ProcessedComputable<Visibility>;\n milestone.visibility = computed(() => {\n const display = unref((milestone as GenericMilestone).display);\n switch (settings.msDisplay) {\n default:\n case MilestoneDisplay.All:\n return unref(visibility);\n case MilestoneDisplay.Configurable:\n if (\n unref(milestone.earned) &&\n !(\n display != null &&\n typeof display == \"object\" &&\n \"optionsDisplay\" in (display as Record<string, unknown>)\n )\n ) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.Incomplete:\n if (unref(milestone.earned)) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.None:\n return Visibility.None;\n }\n });\n\n processComputable(milestone as T, \"style\");\n processComputable(milestone as T, \"classes\");\n processComputable(milestone as T, \"display\");\n\n milestone[GatherProps] = function (this: GenericMilestone) {\n const { visibility, display, style, classes, earned, id } = this;\n return { visibility, display, style: unref(style), classes, earned, id };\n };\n\n if (milestone.shouldEarn) {\n const genericMilestone = milestone as GenericMilestone;\n watchEffect(() => {\n if (\n !genericMilestone.earned.value &&\n unref(genericMilestone.visibility) === Visibility.Visible &&\n genericMilestone.shouldEarn?.()\n ) {\n genericMilestone.earned.value = true;\n genericMilestone.onComplete?.();\n if (genericMilestone.display) {\n const display = unref(genericMilestone.display);\n const Display = coerceComponent(\n isCoercableComponent(display) ? display : display.requirement\n );\n toast(\n <>\n <h3>Milestone earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </>\n );\n }\n }\n });\n }\n\n return milestone as unknown as Milestone<T>;\n }, persistent<boolean>(false));\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n msDisplay: MilestoneDisplay;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"msDisplay\", MilestoneDisplay.All);\n});\n\nconst msDisplayOptions = Object.values(MilestoneDisplay).map(option => ({\n label: camelToTitle(option),\n value: option\n}));\n\nregisterSettingField(\n jsx(() => (\n <Select\n title=\"Show Milestones\"\n options={msDisplayOptions}\n onUpdate:modelValue={value => (settings.msDisplay = value as MilestoneDisplay)}\n modelValue={settings.msDisplay}\n />\n ))\n);\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CoercableComponent } from \"features/feature\";\nimport { computeComponent } from \"util/vue\";\nimport { toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n display: null\n },\n setup(__props: any) {\n\nconst _props = __props as { display: CoercableComponent }\n\n\nconst { display } = toRefs(_props);\nconst component = computeComponent(display);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n}\n}\n\n})","import script from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport TabComponent from \"features/tabs/Tab.vue\";\nimport { Computable, GetComputableType } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const TabType = Symbol(\"Tab\");\n\nexport interface TabOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseTab {\n id: string;\n type: typeof TabType;\n [Component]: typeof TabComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tab<T extends TabOptions> = Replace<\n T & BaseTab,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericTab = Tab<TabOptions>;\n\nexport function createTab<T extends TabOptions>(\n optionsFunc: OptionsFunc<T, Tab<T>, BaseTab>\n): Tab<T> {\n return createLazyProxy(() => {\n const tab = optionsFunc();\n tab.id = getUniqueID(\"tab-\");\n tab.type = TabType;\n tab[Component] = TabComponent;\n\n tab[GatherProps] = function (this: GenericTab) {\n const { display } = this;\n return { display };\n };\n\n return tab as unknown as Tab<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.selectTab && _ctx.selectTab(...args))),\n class: _normalizeClass([\"tabButton\", {\n active: _ctx.active,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.glowColorStyle,\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { getNotifyStyle } from \"game/notifications\";\nimport { computeComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n glowColor: processedPropType<string>(String),\n active: Boolean,\n floating: Boolean\n },\n emits: [\"selectTab\"],\n setup(props, { emit }) {\n const { display, glowColor, floating } = toRefs(props);\n\n const component = computeComponent(display);\n\n const glowColorStyle = computed(() => {\n const color = unwrapRef(glowColor);\n if (!color) {\n return {};\n }\n if (unref(floating)) {\n return getNotifyStyle(color);\n }\n return { boxShadow: `0px 9px 5px -6px ${color}` };\n });\n\n function selectTab() {\n emit(\"selectTab\");\n }\n\n return {\n selectTab,\n component,\n glowColorStyle,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./TabButton.vue?vue&type=template&id=361380c0&scoped=true&ts=true\"\nimport script from \"./TabButton.vue?vue&type=script&lang=ts\"\nexport * from \"./TabButton.vue?vue&type=script&lang=ts\"\n\nimport \"./TabButton.vue?vue&type=style&index=0&id=361380c0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-361380c0\"]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TabButton = _resolveComponent(\"TabButton\")!\n const _component_Sticky = _resolveComponent(\"Sticky\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tab-family-container\", { ..._ctx.unref(_ctx.classes), ..._ctx.tabClasses }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? [],\n _ctx.tabStyle ?? []\n ])\n }, [\n _createVNode(_component_Sticky, { class: \"tab-buttons-container\" }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tab-buttons\", { floating: _ctx.floating }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.tabs), (button, id) => {\n return (_openBlock(), _createBlock(_component_TabButton, _mergeProps({\n onSelectTab: ($event: any) => (_ctx.selected.value = id),\n floating: _ctx.floating,\n key: id,\n active: _ctx.unref(button.tab) === _ctx.unref(_ctx.activeTab)\n }, _ctx.gatherButtonProps(button)), null, 16, [\"onSelectTab\", \"floating\", \"active\"]))\n }), 128))\n ], 2)\n ]),\n _: 1\n }),\n (_ctx.unref(_ctx.activeTab))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Sticky from \"components/layout/Sticky.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { GenericTab } from \"features/tabs/tab\";\nimport TabButton from \"features/tabs/TabButton.vue\";\nimport { GenericTabButton } from \"features/tabs/tabFamily\";\nimport settings from \"game/settings\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n Ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n activeTab: {\n type: processedPropType<GenericTab | CoercableComponent | null>(Object),\n required: true\n },\n selected: {\n type: Object as PropType<Ref<string>>,\n required: true\n },\n tabs: {\n type: processedPropType<Record<string, GenericTabButton>>(Object),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object)\n },\n components: {\n Sticky,\n TabButton\n },\n setup(props) {\n const { activeTab } = toRefs(props);\n\n const floating = computed(() => {\n return themes[settings.theme].floatingTabs;\n });\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currActiveTab = unwrapRef(activeTab);\n if (currActiveTab == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currActiveTab)) {\n component.value = coerceComponent(currActiveTab);\n return;\n }\n component.value = coerceComponent(unref(currActiveTab.display));\n });\n\n const tabClasses = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n const tabClasses =\n isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.classes);\n return tabClasses;\n });\n\n const tabStyle = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n return isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.style);\n });\n\n function gatherButtonProps(button: GenericTabButton) {\n const { display, style, classes, glowColor, visibility } = button;\n return { display, style, classes, glowColor, visibility };\n }\n\n return {\n floating,\n tabClasses,\n tabStyle,\n Visibility,\n component,\n gatherButtonProps,\n unref\n };\n }\n});\n","import { render } from \"./TabFamily.vue?vue&type=template&id=38d5b5f9&scoped=true&ts=true\"\nimport script from \"./TabFamily.vue?vue&type=script&lang=ts\"\nexport * from \"./TabFamily.vue?vue&type=script&lang=ts\"\n\nimport \"./TabFamily.vue?vue&type=style&index=0&id=38d5b5f9&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-38d5b5f9\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport TabButtonComponent from \"features/tabs/TabButton.vue\";\nimport TabFamilyComponent from \"features/tabs/TabFamily.vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { GenericTab } from \"./tab\";\n\nexport const TabButtonType = Symbol(\"TabButton\");\nexport const TabFamilyType = Symbol(\"TabFamily\");\n\nexport interface TabButtonOptions {\n visibility?: Computable<Visibility>;\n tab: Computable<GenericTab | CoercableComponent>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n glowColor?: Computable<string>;\n}\n\nexport interface BaseTabButton {\n type: typeof TabButtonType;\n [Component]: typeof TabButtonComponent;\n}\n\nexport type TabButton<T extends TabButtonOptions> = Replace<\n T & BaseTabButton,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tab: GetComputableType<T[\"tab\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n }\n>;\n\nexport type GenericTabButton = Replace<\n TabButton<TabButtonOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport interface TabFamilyOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\n tabs: Record<string, TabButtonOptions>;\n activeTab: Ref<GenericTab | CoercableComponent | null>;\n selected: Ref<string>;\n type: typeof TabFamilyType;\n [Component]: typeof TabFamilyComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TabFamily<T extends TabFamilyOptions> = Replace<\n T & BaseTabFamily,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tabs: Record<string, GenericTabButton>;\n }\n>;\n\nexport type GenericTabFamily = Replace<\n TabFamily<TabFamilyOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTabFamily<T extends TabFamilyOptions>(\n tabs: Record<string, () => TabButtonOptions>,\n optionsFunc?: OptionsFunc<T, TabFamily<T>, BaseTabFamily>\n): TabFamily<T> {\n if (Object.keys(tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\");\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n return createLazyProxy(persistent => {\n const tabFamily = Object.assign(persistent, optionsFunc?.());\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n tabFamily.tabs = Object.keys(tabs).reduce<Record<string, GenericTabButton>>(\n (parsedTabs, tab) => {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabs[tab]();\n tabButton.type = TabButtonType;\n tabButton[Component] = TabButtonComponent;\n\n processComputable(tabButton as TabButtonOptions, \"visibility\");\n setDefault(tabButton, \"visibility\", Visibility.Visible);\n processComputable(tabButton as TabButtonOptions, \"tab\");\n processComputable(tabButton as TabButtonOptions, \"display\");\n processComputable(tabButton as TabButtonOptions, \"classes\");\n processComputable(tabButton as TabButtonOptions, \"style\");\n processComputable(tabButton as TabButtonOptions, \"glowColor\");\n parsedTabs[tab] = tabButton as GenericTabButton;\n return parsedTabs;\n },\n {}\n );\n tabFamily.selected = tabFamily[PersistentState];\n tabFamily.activeTab = computed(() => {\n const tabs = unref(processedTabFamily.tabs);\n if (\n tabFamily[PersistentState].value in tabs &&\n unref(tabs[processedTabFamily[PersistentState].value].visibility) ===\n Visibility.Visible\n ) {\n return unref(tabs[processedTabFamily[PersistentState].value].tab);\n }\n const firstTab = Object.values(tabs).find(\n tab => unref(tab.visibility) === Visibility.Visible\n );\n if (firstTab) {\n return unref(firstTab.tab);\n }\n return null;\n });\n\n processComputable(tabFamily as T, \"visibility\");\n setDefault(tabFamily, \"visibility\", Visibility.Visible);\n processComputable(tabFamily as T, \"classes\");\n processComputable(tabFamily as T, \"style\");\n\n tabFamily[GatherProps] = function (this: GenericTabFamily) {\n const { visibility, activeTab, selected, tabs, style, classes } = this;\n return { visibility, activeTab, selected, tabs, style: unref(style), classes };\n };\n\n // This is necessary because board.types is different from T and TabFamily\n const processedTabFamily = tabFamily as unknown as TabFamily<T>;\n return processedTabFamily;\n }, persistent(Object.keys(tabs)[0]));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-264c96b4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.purchase && _ctx.purchase(...args))),\n class: _normalizeClass({\n feature: true,\n upgrade: true,\n can: _ctx.unref(_ctx.canPurchase),\n locked: !_ctx.unref(_ctx.canPurchase),\n bought: _ctx.unref(_ctx.bought),\n ..._ctx.unref(_ctx.classes)\n }),\n disabled: !_ctx.unref(_ctx.canPurchase)\n }, [\n (_ctx.unref(_ctx.component))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { GenericUpgrade } from \"features/upgrades/upgrade\";\nimport { DecimalSource } from \"util/bignum\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericUpgrade[\"display\"]>>(String, Object, Function),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n resource: Object as PropType<Resource>,\n cost: processedPropType<DecimalSource>(String, Object, Number),\n canPurchase: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n bought: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n purchase: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, cost } = toRefs(props);\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n component.value = coerceComponent(currDisplay);\n return;\n }\n const currCost = unwrapRef(cost);\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n component.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {props.resource != null ? (\n <>\n <br />\n Cost: {props.resource &&\n displayResource(props.resource, currCost)}{\" \"}\n {props.resource?.displayName}\n </>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Upgrade.vue?vue&type=template&id=264c96b4&scoped=true&ts=true\"\nimport script from \"./Upgrade.vue?vue&type=script&lang=tsx\"\nexport * from \"./Upgrade.vue?vue&type=script&lang=tsx\"\n\nimport \"./Upgrade.vue?vue&type=style&index=0&id=264c96b4&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-264c96b4\"]])\n\nexport default __exports__","import UpgradeComponent from \"features/upgrades/Upgrade.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n findFeatures,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport { GenericLayer } from \"game/layers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\n\nexport const UpgradeType = Symbol(\"Upgrade\");\n\nexport interface UpgradeOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n mark?: Computable<boolean | string>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canAfford?: Computable<boolean>;\n onPurchase?: VoidFunction;\n}\n\nexport interface BaseUpgrade extends Persistent<boolean> {\n id: string;\n bought: Ref<boolean>;\n canPurchase: Ref<boolean>;\n purchase: VoidFunction;\n type: typeof UpgradeType;\n [Component]: typeof UpgradeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Upgrade<T extends UpgradeOptions> = Replace<\n T & BaseUpgrade,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n cost: GetComputableType<T[\"cost\"]>;\n canAfford: GetComputableTypeWithDefault<T[\"canAfford\"], Ref<boolean>>;\n }\n>;\n\nexport type GenericUpgrade = Replace<\n Upgrade<UpgradeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createUpgrade<T extends UpgradeOptions>(\n optionsFunc: OptionsFunc<T, Upgrade<T>, BaseUpgrade>\n): Upgrade<T> {\n return createLazyProxy(persistent => {\n const upgrade = Object.assign(persistent, optionsFunc());\n upgrade.id = getUniqueID(\"upgrade-\");\n upgrade.type = UpgradeType;\n upgrade[Component] = UpgradeComponent;\n\n if (upgrade.canAfford == null && (upgrade.resource == null || upgrade.cost == null)) {\n console.warn(\n \"Error: can't create upgrade without a canAfford property or a resource and cost property\",\n upgrade\n );\n }\n\n upgrade.bought = upgrade[PersistentState];\n if (upgrade.canAfford == null) {\n upgrade.canAfford = computed(() => {\n const genericUpgrade = upgrade as GenericUpgrade;\n return (\n genericUpgrade.resource != null &&\n genericUpgrade.cost != null &&\n Decimal.gte(genericUpgrade.resource.value, unref(genericUpgrade.cost))\n );\n });\n } else {\n processComputable(upgrade as T, \"canAfford\");\n }\n upgrade.canPurchase = computed(\n () =>\n unref((upgrade as GenericUpgrade).visibility) === Visibility.Visible &&\n unref((upgrade as GenericUpgrade).canAfford) &&\n !unref(upgrade.bought)\n );\n upgrade.purchase = function () {\n const genericUpgrade = upgrade as GenericUpgrade;\n if (!unref(genericUpgrade.canPurchase)) {\n return;\n }\n if (genericUpgrade.resource != null && genericUpgrade.cost != null) {\n genericUpgrade.resource.value = Decimal.sub(\n genericUpgrade.resource.value,\n unref(genericUpgrade.cost)\n );\n }\n genericUpgrade[PersistentState].value = true;\n genericUpgrade.onPurchase?.();\n };\n\n processComputable(upgrade as T, \"visibility\");\n setDefault(upgrade, \"visibility\", Visibility.Visible);\n processComputable(upgrade as T, \"classes\");\n processComputable(upgrade as T, \"style\");\n processComputable(upgrade as T, \"display\");\n processComputable(upgrade as T, \"mark\");\n processComputable(upgrade as T, \"cost\");\n processComputable(upgrade as T, \"resource\");\n\n upgrade[GatherProps] = function (this: GenericUpgrade) {\n const {\n display,\n visibility,\n style,\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n };\n };\n\n return upgrade as unknown as Upgrade<T>;\n }, persistent<boolean>(false));\n}\n\nexport function setupAutoPurchase(\n layer: GenericLayer,\n autoActive: Computable<boolean>,\n upgrades: GenericUpgrade[] = []\n): void {\n upgrades = upgrades || findFeatures(layer, UpgradeType);\n const isAutoActive = isFunction(autoActive) ? computed(autoActive) : autoActive;\n layer.on(\"update\", () => {\n if (unref(isAutoActive)) {\n upgrades.forEach(upgrade => upgrade.purchase());\n }\n });\n}\n","import Slider from \"components/fields/Slider.vue\";\nimport Text from \"components/fields/Text.vue\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport Column from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport Sticky from \"components/layout/Sticky.vue\";\nimport VerticalRule from \"components/layout/VerticalRule.vue\";\nimport Modal from \"components/Modal.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport themes from \"data/themes\";\nimport { createBar, Direction } from \"features/bars/bar\";\nimport { createBuyable } from \"features/buyable\";\nimport { createChallenge } from \"features/challenges/challenge\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport {\n addSoftcap,\n createCumulativeConversion,\n createPolynomialScaling\n} from \"features/conversion\";\nimport { jsx, showIf, Visibility } from \"features/feature\";\nimport { createHotkey } from \"features/hotkey\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createLinks } from \"features/links/links\";\nimport { createMilestone } from \"features/milestones/milestone\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource, trackBest } from \"features/resources/resource\";\nimport Resource from \"features/resources/Resource.vue\";\nimport { createTab } from \"features/tabs/tab\";\nimport { createTabFamily } from \"features/tabs/tabFamily\";\nimport { addTooltip, TooltipDirection } from \"features/tooltips/tooltip\";\nimport {\n createResourceTooltip,\n createTree,\n createTreeNode,\n GenericTreeNode,\n TreeBranch\n} from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\nimport {\n createAdditiveModifier,\n createExponentialModifier,\n createModifierSection,\n createSequentialModifier\n} from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal, { format, formatWhole } from \"util/bignum\";\nimport { render, renderCol, renderRow } from \"util/vue\";\nimport { computed, ComputedRef, ref } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"c\";\nconst layer = createLayer(id, () => {\n const color = \"#4BDC13\";\n const name = \"Candies\";\n const points = createResource<DecimalSource>(0, \"lollipops\");\n const best = trackBest(points);\n const beep = persistent<boolean>(false);\n const thingy = persistent<string>(\"pointy\");\n const otherThingy = persistent<number>(10);\n const spentOnBuyables = persistent(new Decimal(10));\n\n const waffleBoost = computed(() => Decimal.pow(points.value, 0.2));\n const icecreamCap = computed(() => Decimal.times(points.value, 10));\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" },\n color: \"rgb(75, 220, 19)\"\n }));\n\n const lollipopMilestone3 = createMilestone(() => ({\n shouldEarn() {\n return Decimal.gte(best.value, 3);\n },\n display: {\n requirement: \"3 Lollipops\",\n effectDisplay: \"Unlock the next milestone\"\n }\n }));\n const lollipopMilestone4 = createMilestone(() => ({\n visibility() {\n return showIf(lollipopMilestone3.earned.value);\n },\n shouldEarn() {\n return Decimal.gte(best.value, 4);\n },\n display: {\n requirement: \"4 Lollipops\",\n effectDisplay: \"You can toggle beep and boop (which do nothing)\",\n optionsDisplay: jsx(() => (\n <>\n <Toggle\n title=\"beep\"\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Toggle\n title=\"boop\"\n onUpdate:modelValue={value => (f.boop.value = value)}\n modelValue={f.boop.value}\n />\n </>\n ))\n },\n style() {\n if (this.earned) {\n return { backgroundColor: \"#1111DD\" };\n }\n return {};\n }\n }));\n const lollipopMilestones = [lollipopMilestone3, lollipopMilestone4];\n\n const funChallenge = createChallenge(() => ({\n title: \"Fun\",\n completionLimit: 3,\n display() {\n return {\n description: `Makes the game 0% harder<br>${formatWhole(this.completions.value)}/${\n this.completionLimit\n } completions`,\n goal: \"Have 20 points I guess\",\n reward: \"Says hi\",\n effectDisplay: format(funEffect.value) + \"x\"\n };\n },\n visibility() {\n return showIf(Decimal.gt(best.value, 0));\n },\n goal: 20,\n resource: main.points,\n onComplete() {\n console.log(\"hiii\");\n },\n onEnter() {\n main.points.value = 0;\n main.best.value = main.points.value;\n main.total.value = main.points.value;\n console.log(\"So challenging\");\n },\n onExit() {\n console.log(\"Sweet freedom!\");\n },\n style: {\n height: \"200px\"\n }\n }));\n const funEffect = computed(() => Decimal.add(points.value, 1).tetrate(0.02));\n\n const generatorUpgrade = createUpgrade(() => ({\n display: {\n title: \"Generator of Genericness\",\n description: \"Gain 1 point every second\"\n },\n cost: 1,\n resource: points\n }));\n const lollipopMultiplierUpgrade = createUpgrade(() => ({\n display: () => ({\n description: \"Point generation is faster based on your unspent Lollipops\",\n effectDisplay: `${format(lollipopMultiplierEffect.value)}x`\n }),\n cost: 1,\n resource: points,\n visibility: () => showIf(generatorUpgrade.bought.value)\n }));\n const lollipopMultiplierEffect = computed(() => {\n let ret = Decimal.add(points.value, 1).pow(0.5);\n if (ret.gte(\"1e20000000\")) ret = ret.sqrt().times(\"1e10000000\");\n return ret;\n });\n const unlockIlluminatiUpgrade = createUpgrade(() => ({\n visibility() {\n return showIf(lollipopMultiplierUpgrade.bought.value);\n },\n canAfford() {\n return Decimal.lt(main.points.value, 7);\n },\n onPurchase() {\n main.points.value = Decimal.add(main.points.value, 7);\n },\n display:\n \"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.\",\n style() {\n if (this.bought) {\n return { backgroundColor: \"#1111dd\" };\n }\n if (!this.canAfford) {\n return { backgroundColor: \"#dd1111\" };\n }\n return {};\n }\n }));\n const quasiUpgrade = createUpgrade(() => ({\n resource: createResource(exhancers.amount, \"Exhancers\", 0),\n cost: 3,\n display: {\n title: \"This upgrade doesn't exist\",\n description: \"Or does it?\"\n }\n }));\n const upgrades = [generatorUpgrade, lollipopMultiplierUpgrade, unlockIlluminatiUpgrade];\n\n const exhancers = createBuyable(() => ({\n resource: points,\n cost() {\n let x = new Decimal(this.amount.value);\n if (x.gte(25)) {\n x = x.pow(2).div(25);\n }\n const cost = Decimal.pow(2, x.pow(1.5));\n return cost.floor();\n },\n display() {\n return {\n title: \"Exhancers\",\n description: `Adds ${format(\n thingEffect.value\n )} things and multiplies stuff by ${format(stuffEffect.value)}.`\n };\n },\n onPurchase(cost) {\n spentOnBuyables.value = Decimal.add(spentOnBuyables.value, cost);\n },\n style: { height: \"222px\" },\n purchaseLimit: 4\n }));\n // The following need redundant ComputedRef<Decimal> type annotations because otherwise the ts\n // interpreter thinks exhancers are cyclically referenced\n const thingEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const stuffEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const confirmRespec = persistent<boolean>(false);\n const confirming = ref(false);\n const respecBuyables = createClickable(() => ({\n small: true,\n display: \"Respec Thingies\",\n onClick() {\n if (confirmRespec.value && !confirming.value) {\n confirming.value = true;\n return;\n }\n\n points.value = Decimal.add(points.value, spentOnBuyables.value);\n exhancers.amount.value = 0;\n main.tree.reset(treeNode);\n }\n }));\n const sellExhancer = createClickable(() => ({\n small: true,\n display: \"Sell One\",\n onClick() {\n if (Decimal.lte(exhancers.amount.value, 0)) {\n return;\n }\n exhancers.amount.value = Decimal.sub(exhancers.amount.value, 1);\n points.value = Decimal.add(points.value, exhancers.cost.value);\n spentOnBuyables.value = Decimal.sub(spentOnBuyables.value, exhancers.cost.value);\n }\n }));\n const buyablesDisplay = jsx(() => (\n <Column>\n <Row>\n <Toggle\n title=\"Confirm\"\n onUpdate:modelValue={value => (confirmRespec.value = value)}\n modelValue={confirmRespec.value}\n />\n {renderRow(respecBuyables)}\n </Row>\n {renderRow(exhancers)}\n {renderRow(sellExhancer)}\n <Modal\n modelValue={confirming.value}\n onUpdate:modelValue={value => (confirming.value = value)}\n v-slots={{\n header: () => <h2>Confirm Respec</h2>,\n body: () => <>Are you sure? Respeccing these doesn't accomplish much</>,\n footer: () => (\n <div class=\"modal-default-footer\">\n <div class=\"modal-default-flex-grow\"></div>\n <button\n class=\"button modal-default-button\"\n onClick={() => (confirming.value = false)}\n >\n Cancel\n </button>\n <button\n class=\"button modal-default-button danger\"\n onClick={() => {\n respecBuyables.onClick();\n confirming.value = false;\n }}\n >\n Respec\n </button>\n </div>\n )\n }}\n />\n </Column>\n ));\n\n const longBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FFFFFF\" },\n baseStyle: { backgroundColor: \"#696969\" },\n textStyle: { color: \"#04e050\" },\n direction: Direction.Right,\n width: 300,\n height: 30,\n progress() {\n return Decimal.add(main.points.value, 1).log(10).div(10).toNumber();\n },\n display() {\n return format(main.points.value) + \" / 1e10 points\";\n }\n }));\n const tallBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#4BEC13\" },\n baseStyle: { backgroundColor: \"#000000\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n borderStyle: { borderWidth: \"7px\" },\n direction: Direction.Up,\n width: 50,\n height: 200,\n progress() {\n return Decimal.div(main.points.value, 100);\n },\n display() {\n return formatWhole(Decimal.div(main.points.value, 1).min(100)) + \"%\";\n }\n }));\n const flatBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FE0102\" },\n baseStyle: { backgroundColor: \"#222222\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n direction: Direction.Up,\n width: 100,\n height: 30,\n progress() {\n return Decimal.div(points.value, 50);\n }\n }));\n\n const conversion = createCumulativeConversion(() => ({\n scaling: addSoftcap(createPolynomialScaling(10, 0.5), 1e100, 0.5),\n baseResource: main.points,\n gainResource: points,\n roundUpCost: true,\n gainModifier: createSequentialModifier(\n createExponentialModifier(2, \"Because I felt like it\"),\n createAdditiveModifier(1, \"Nice modifier\")\n )\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const hotkeys = [\n createHotkey(() => ({\n key: \"c\",\n description: \"reset for lollipops or whatever\",\n onPress() {\n if (resetButton.canClick.value) {\n resetButton.onClick();\n }\n }\n })),\n createHotkey(() => ({\n key: \"ctrl+c\",\n description: \"respec things\",\n onPress() {\n respecBuyables.onClick();\n }\n }))\n ];\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n mark: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n tooltip() {\n let tooltip = displayResource(points);\n if (Decimal.gt(exhancers.amount.value, 0)) {\n tooltip += `<br><i><br><br><br>${formatWhole(\n exhancers.amount.value\n )} Exhancers</i>`;\n }\n return tooltip;\n },\n style: {\n color: \"#3325CC\",\n textDecoration: \"underline\"\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n style: {\n color: \"#AA66AA\"\n },\n resetDescription: \"Melt your points into \"\n }));\n addTooltip(resetButton, {\n display: jsx(() =>\n createModifierSection(\n \"Modifiers\",\n \"\",\n conversion.gainModifier,\n conversion.scaling.currentGain(conversion)\n )\n ),\n pinnable: true,\n direction: TooltipDirection.DOWN,\n style: \"width: 400px; text-align: left\"\n });\n\n const g = createTreeNode(() => ({\n display: \"TH\",\n color: \"#6d3678\",\n canClick() {\n return Decimal.gte(main.points.value, 10);\n },\n tooltip: \"Thanos your points\",\n onClick() {\n main.points.value = Decimal.div(main.points.value, 2);\n console.log(\"Thanos'd\");\n },\n glowColor() {\n if (Decimal.eq(exhancers.amount.value, 1)) {\n return \"orange\";\n }\n return \"\";\n }\n }));\n const h = createTreeNode(() => ({\n display: \"h\",\n color() {\n return themes[settings.theme].variables[\"--locked\"];\n },\n tooltip: {\n display: computed(() => `Restore your points to ${format(otherThingy.value)}`),\n right: true\n },\n canClick() {\n return Decimal.lt(main.points.value, otherThingy.value);\n },\n onClick() {\n main.points.value = otherThingy.value;\n }\n }));\n const spook = createTreeNode(() => ({\n visibility: Visibility.Hidden\n }));\n const tree = createTree(() => ({\n nodes(): GenericTreeNode[][] {\n return [\n [f.treeNode, treeNode],\n [g, spook, h]\n ];\n },\n branches(): TreeBranch[] {\n return [\n {\n startNode: f.treeNode,\n endNode: treeNode,\n \"stroke-width\": \"25px\",\n stroke: \"green\",\n style: {\n filter: \"blur(5px)\"\n }\n },\n { startNode: treeNode, endNode: g },\n { startNode: g, endNode: h }\n ];\n }\n }));\n\n const links = createLinks(() => ({\n links: [\n {\n startNode: h,\n endNode: flatBoi,\n \"stroke-width\": \"5px\",\n stroke: \"red\",\n offsetEnd: { x: -50 + 100 * flatBoi.progress.value.toNumber(), y: 0 }\n }\n ]\n }));\n\n const illuminatiTabs = createTabFamily(\n {\n first: () => ({\n tab: jsx(() => (\n <>\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n <div>confirmed</div>\n </>\n )),\n display: \"first\"\n }),\n second: () => ({\n tab: f.display,\n display: \"second\"\n })\n },\n () => ({\n style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n })\n );\n\n const tabs = createTabFamily({\n mainTab: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n <MainDisplay\n resource={points}\n color={color}\n effectDisplay={`which are boosting waffles by ${format(\n waffleBoost.value\n )} and increasing the Ice Cream cap by ${format(icecreamCap.value)}`}\n />\n <Sticky>{render(resetButton)}</Sticky>\n <Resource resource={points} color={color} />\n <Spacer height=\"5px\" />\n <button onClick={() => console.log(\"yeet\")}>'HI'</button>\n <div>Name your points!</div>\n <Text\n modelValue={thingy.value}\n onUpdate:modelValue={value => (thingy.value = value)}\n />\n <Sticky style=\"color: red; font-size: 32px; font-family: Comic Sans MS;\">\n I have {displayResource(main.points)} {thingy.value} points!\n </Sticky>\n <hr />\n {renderCol(...lollipopMilestones)}\n <Spacer />\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n {renderRow(funChallenge)}\n </>\n ))\n })),\n display: \"main tab\",\n glowColor() {\n if (\n generatorUpgrade.canPurchase.value ||\n lollipopMultiplierUpgrade.canPurchase.value ||\n unlockIlluminatiUpgrade.canPurchase.value ||\n funChallenge.canComplete.value\n ) {\n return \"blue\";\n }\n return \"\";\n },\n style: { color: \"orange\" }\n }),\n thingies: () => ({\n tab: createTab(() => ({\n style() {\n return { backgroundColor: \"#222222\", \"--background\": \"#222222\" };\n },\n display: jsx(() => (\n <>\n {render(buyablesDisplay)}\n <Spacer />\n <Row style=\"width: 600px; height: 350px; background-color: green; border-style: solid;\">\n <Toggle\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Spacer width=\"30px\" height=\"10px\" />\n <div>\n <span>Beep</span>\n </div>\n <Spacer />\n <VerticalRule height=\"200px\" />\n </Row>\n <Spacer />\n <img src=\"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\" />\n </>\n ))\n })),\n glowColor: \"white\",\n display: \"thingies\",\n style: { borderColor: \"orange\" }\n }),\n jail: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n {render(coolInfo)}\n {render(longBoi)}\n <Spacer />\n <Row>\n <Column style=\"background-color: #555555; padding: 15px\">\n <div style=\"color: teal\">Sugar level:</div>\n <Spacer />\n {render(tallBoi)}\n </Column>\n <Spacer />\n <Column>\n <div>idk</div>\n <Spacer width=\"0\" height=\"50px\" />\n {render(flatBoi)}\n </Column>\n </Row>\n <Spacer />\n <div>It's jail because \"bars\"! So funny! Ha ha!</div>\n {render(tree)}\n </>\n ))\n })),\n display: \"jail\"\n }),\n illuminati: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n // This should really just be <> and </>, however for some reason the\n // typescript interpreter can't figure out this layer and f.tsx otherwise\n <div>\n <h1> C O N F I R M E D </h1>\n <Spacer />\n {render(illuminatiTabs)}\n <div>Adjust how many points H gives you!</div>\n <Slider\n onUpdate:modelValue={value => (otherThingy.value = value)}\n modelValue={otherThingy.value}\n min={1}\n max={30}\n />\n </div>\n )),\n style: {\n backgroundColor: \"#3325CC\"\n }\n })),\n visibility() {\n return showIf(unlockIlluminatiUpgrade.bought.value);\n },\n display: \"illuminati\"\n })\n });\n\n return {\n id,\n color,\n name,\n points,\n best,\n beep,\n thingy,\n otherThingy,\n spentOnBuyables,\n waffleBoost,\n icecreamCap,\n coolInfo,\n lollipopMilestones,\n funChallenge,\n funEffect,\n generatorUpgrade,\n lollipopMultiplierUpgrade,\n lollipopMultiplierEffect,\n unlockIlluminatiUpgrade,\n quasiUpgrade,\n exhancers,\n respecBuyables,\n sellExhancer,\n bars: { tallBoi, longBoi, flatBoi },\n tree,\n g,\n h,\n spook,\n conversion,\n reset,\n hotkeys,\n treeNode,\n resetButton,\n confirmRespec,\n minWidth: 800,\n tabs,\n display: jsx(() => (\n <>\n {render(tabs)}\n {render(links)}\n </>\n ))\n };\n});\n\nexport default layer;\n","import Spacer from \"components/layout/Spacer.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport { createPolynomialScaling, createIndependentConversion } from \"features/conversion\";\nimport { jsx } from \"features/feature\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createParticles } from \"features/particles/particles\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource } from \"features/resources/resource\";\nimport { addTooltip } from \"features/tooltips/tooltip\";\nimport { createResourceTooltip } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { createMultiplicativeModifier } from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { ref } from \"vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst id = \"f\";\nconst layer = createLayer(id, () => {\n const color = \"#FE0102\";\n const name = \"Farms\";\n const points = createResource<DecimalSource>(0, \"farm points\");\n const boop = persistent<boolean>(false);\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" }\n }));\n\n const clickableState = persistent<string>(\"Start\");\n const clickable = createClickable(() => ({\n display() {\n return {\n title: \"Clicky clicky!\",\n description: \"Current state:<br>\" + clickableState.value\n };\n },\n initialState: \"Start\",\n canClick() {\n return clickableState.value !== \"Borkened...\";\n },\n onClick(e) {\n switch (clickableState.value) {\n case \"Start\":\n clickableState.value = \"A new state!\";\n break;\n case \"A new state!\":\n clickableState.value = \"Keep going!\";\n break;\n case \"Keep going!\":\n clickableState.value = \"Maybe that's a bit too far...\";\n break;\n case \"Maybe that's a bit too far...\":\n const pos = e == undefined ? undefined : \"touches\" in e ? e.touches[0] : e;\n const confettiParticles = Object.assign({}, confetti, {\n pos: {\n x: (pos?.clientX ?? 0) - (particles.boundingRect?.value?.left ?? 0),\n y: (pos?.clientY ?? 0) - (particles.boundingRect?.value?.top ?? 0)\n }\n });\n particles.addEmitter(confettiParticles).then(e => e.playOnceAndDestroy());\n clickableState.value = \"Borkened...\";\n break;\n default:\n clickableState.value = \"Start\";\n break;\n }\n },\n onHold() {\n console.log(\"Clickkkkk...\");\n },\n style() {\n switch (clickableState.value) {\n case \"Start\":\n return { \"background-color\": \"green\" };\n case \"A new state!\":\n return { \"background-color\": \"yellow\" };\n case \"Keep going!\":\n return { \"background-color\": \"orange\" };\n case \"Maybe that's a bit too far...\":\n return { \"background-color\": \"red\" };\n default:\n return {};\n }\n }\n }));\n\n const resetClickable = createClickable(() => ({\n onClick() {\n if (clickableState.value == \"Borkened...\") {\n clickableState.value = \"Start\";\n }\n },\n display() {\n return clickableState.value == \"Borkened...\" ? \"Fix the clickable!\" : \"Does nothing\";\n },\n small: true\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const conversion = createIndependentConversion(() => ({\n scaling: createPolynomialScaling(10, 0.5),\n baseResource: main.points,\n gainResource: points,\n modifyGainAmount: createMultiplicativeModifier(c.otherThingy)\n }));\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n tooltip() {\n if (treeNode.canClick.value) {\n return `${displayResource(points)} ${points.displayName}`;\n }\n return `This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${displayResource(\n main.points\n )}`;\n },\n canClick() {\n return Decimal.gte(main.points.value, 10);\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n display: jsx(() => {\n if (resetButton.conversion.buyMax) {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you{\" \"}\n <b>{formatWhole(resetButton.conversion.currentGain.value)}</b> Farm Points\n in exchange for all of your points and lollipops! (You'll get another one at{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n } else {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange\n for all of your points and lollipops! (At least{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n }\n })\n }));\n\n const particles = createParticles(() => ({\n boundingRect: ref<null | DOMRect>(null),\n onContainerResized(boundingRect) {\n this.boundingRect.value = boundingRect;\n },\n style: \"z-index: 2\"\n }));\n\n const tab = jsx(() => (\n <>\n {render(coolInfo)}\n <MainDisplay resource={points} color={color} />\n {render(resetButton)}\n <div>You have {formatWhole(conversion.baseResource.value)} points</div>\n <div>\n <br />\n <img src=\"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390\" />\n <div>Bork Bork!</div>\n </div>\n <Spacer />\n {renderRow(resetClickable)}\n {renderRow(clickable)}\n {render(particles)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n boop,\n coolInfo,\n clickable,\n clickableState,\n reset,\n conversion,\n treeNode,\n resetButton,\n display: tab\n };\n});\n\nexport default layer;\n","import Row from \"components/layout/Row.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { main } from \"data/projEntry\";\nimport { createAchievement } from \"features/achievements/achievement\";\nimport { jsx } from \"features/feature\";\nimport { createGrid } from \"features/grids/grid\";\nimport { createResource } from \"features/resources/resource\";\nimport { createTreeNode } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { computed } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"a\";\nconst layer = createLayer(id, () => {\n const color = \"yellow\";\n const name = \"Achievements\";\n const points = createResource<DecimalSource>(0, \"achievement power\");\n\n const treeNode = createTreeNode(() => ({\n display: \"A\",\n color,\n tooltip: {\n display: \"Achievements\",\n right: true\n },\n onClick() {\n main.showAchievements();\n }\n }));\n\n const ach1 = createAchievement(() => ({\n image: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n display: \"Get me!\",\n tooltip: computed(() => {\n if (ach1.earned.value) {\n return \"You did it!\";\n }\n return \"How did this happen?\";\n }),\n shouldEarn: () => true\n }));\n const ach2 = createAchievement(() => ({\n display: \"Impossible!\",\n tooltip: computed(() => {\n if (ach2.earned.value) {\n return \"HOW????\";\n }\n return \"Mwahahaha!\";\n }),\n style: { color: \"#04e050\" }\n }));\n const ach3 = createAchievement(() => ({\n display: \"EIEIO\",\n tooltip:\n \"Get a farm point.\\n\\nReward: The dinosaur is now your friend (you can max Farm Points).\",\n shouldEarn: function () {\n return Decimal.gte(f.points.value, 1);\n },\n onComplete() {\n console.log(\"Bork bork bork!\");\n }\n }));\n const achievements = [ach1, ach2, ach3];\n\n const grid = createGrid(() => ({\n rows: 2,\n cols: 2,\n getStartState(id) {\n return id;\n },\n getStyle(id, state) {\n return { backgroundColor: `#${(Number(state) * 1234) % 999999}` };\n },\n // TODO display should return an object\n getTitle(id) {\n let direction = \"\";\n if (id === \"101\") {\n direction = \"top\";\n } else if (id === \"102\") {\n direction = \"bottom\";\n } else if (id === \"201\") {\n direction = \"left\";\n } else if (id === \"202\") {\n direction = \"right\";\n }\n return jsx(() => (\n <Tooltip display={JSON.stringify(this.cells[id].style)} {...{ [direction]: true }}>\n <h3>Gridable #{id}</h3>\n </Tooltip>\n ));\n },\n getDisplay(id, state) {\n return String(state);\n },\n getCanClick() {\n return Decimal.eq(main.points.value, 10);\n },\n onClick(id, state) {\n this.cells[id].state = Number(state) + 1;\n }\n }));\n\n const display = jsx(() => (\n <>\n <Row>\n <Tooltip display={ach1.tooltip} bottom>\n {render(ach1)}\n </Tooltip>\n <Tooltip display={ach2.tooltip} bottom>\n {render(ach2)}\n </Tooltip>\n <Tooltip display={ach3.tooltip} bottom>\n {render(ach3)}\n </Tooltip>\n </Row>\n {renderRow(grid)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n achievements,\n grid,\n treeNode,\n display\n };\n});\n\nexport default layer;\n","import Profectus from \"components/Profectus.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport { jsx } from \"features/feature\";\nimport { createResource, trackBest, trackOOMPS, trackTotal } from \"features/resources/resource\";\nimport { branchedResetPropagation, createTree, GenericTree } from \"features/trees/tree\";\nimport { globalBus } from \"game/events\";\nimport { createLayer, GenericLayer, setupLayerModal } from \"game/layers\";\nimport player, { PlayerData } from \"game/player\";\nimport Decimal, { DecimalSource, format, formatTime } from \"util/bignum\";\nimport { render } from \"util/vue\";\nimport { computed, toRaw } from \"vue\";\nimport a from \"./layers/aca/a\";\nimport c from \"./layers/aca/c\";\nimport f from \"./layers/aca/f\";\n\n/**\n * @hidden\n */\nexport const main = createLayer(\"main\", () => {\n const points = createResource<DecimalSource>(10);\n const best = trackBest(points);\n const total = trackTotal(points);\n\n const pointGain = computed(() => {\n if (!c.generatorUpgrade.bought.value) return new Decimal(0);\n let gain = new Decimal(3.19);\n if (c.lollipopMultiplierUpgrade.bought.value)\n gain = gain.times(c.lollipopMultiplierEffect.value);\n return gain;\n });\n globalBus.on(\"update\", diff => {\n points.value = Decimal.add(points.value, Decimal.times(pointGain.value, diff));\n });\n const oomps = trackOOMPS(points, pointGain);\n\n const { openModal, modal } = setupLayerModal(a);\n\n // Note: Casting as generic tree to avoid recursive type definitions\n const tree = createTree(() => ({\n nodes: [[c.treeNode], [f.treeNode, c.spook]],\n leftSideNodes: [a.treeNode, c.h],\n branches: [\n {\n startNode: f.treeNode,\n endNode: c.treeNode,\n stroke: \"blue\",\n \"stroke-width\": \"25px\",\n style: {\n filter: \"blur(5px)\"\n }\n }\n ],\n onReset() {\n points.value = toRaw(this.resettingNode.value) === toRaw(c.treeNode) ? 0 : 10;\n best.value = points.value;\n total.value = points.value;\n },\n resetPropagation: branchedResetPropagation\n })) as GenericTree;\n\n // Note: layers don't _need_ a reference to everything,\n // but I'd recommend it over trying to remember what does and doesn't need to be included.\n // Officially all you need are anything with persistency or that you want to access elsewhere\n return {\n name: \"Tree\",\n display: jsx(() => (\n <>\n {player.devSpeed === 0 ? <div>Game Paused</div> : null}\n {player.devSpeed && player.devSpeed !== 1 ? (\n <div>Dev Speed: {format(player.devSpeed || 0)}x</div>\n ) : null}\n {player.offlineTime != undefined ? (\n <div>Offline Time: {formatTime(player.offlineTime || 0)}</div>\n ) : null}\n <div>\n {Decimal.lt(points.value, \"1e1000\") ? <span>You have </span> : null}\n <h2>{format(points.value)}</h2>\n {Decimal.lt(points.value, \"1e1e6\") ? <span> points</span> : null}\n </div>\n {Decimal.gt(pointGain.value, 0) ? <div>({oomps.value})</div> : null}\n <Spacer />\n <button onClick={openModal}>open achievements</button>\n {render(modal)}\n {render(tree)}\n <Profectus height=\"200px\" style=\"margin: 10px auto; display: block\" />\n </>\n )),\n points,\n best,\n total,\n oomps,\n tree,\n showAchievements: openModal\n };\n});\n\nexport const getInitialLayers = (\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars */\n player: Partial<PlayerData>\n): Array<GenericLayer> => [main, f, c, a];\n\nexport const hasWon = computed(() => {\n return Decimal.gt(main.points.value, 25);\n});\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport function fixOldSave(\n oldVersion: string | undefined,\n player: Partial<PlayerData>\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n): void {}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import Modal from \"components/Modal.vue\";\nimport {\n CoercableComponent,\n OptionsFunc,\n jsx,\n JSXFunction,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { createNanoEvents, Emitter } from \"nanoevents\";\nimport { InjectionKey, Ref, ref, unref } from \"vue\";\nimport { globalBus } from \"./events\";\nimport { Persistent, persistent } from \"./persistence\";\nimport player from \"./player\";\n\nexport interface FeatureNode {\n rect: DOMRect;\n observer: MutationObserver;\n element: HTMLElement;\n}\n\nexport const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =\n Symbol(\"RegisterNode\");\nexport const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =\n Symbol(\"UnregisterNode\");\nexport const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =\n Symbol(\"Nodes\");\n\nexport interface LayerEvents {\n // Generation\n preUpdate: (diff: number) => void;\n // Actions (e.g. automation)\n update: (diff: number) => void;\n // Effects (e.g. milestones)\n postUpdate: (diff: number) => void;\n}\n\nexport const layers: Record<string, Readonly<GenericLayer> | undefined> = {};\nwindow.layers = layers;\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--layer-color\"?: string;\n }\n}\n\nexport interface Position {\n x: number;\n y: number;\n}\n\nexport interface LayerOptions {\n color?: Computable<string>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n name?: Computable<string>;\n minimizable?: Computable<boolean>;\n forceHideGoBack?: Computable<boolean>;\n minWidth?: Computable<number | string>;\n}\n\nexport interface BaseLayer {\n id: string;\n minimized: Persistent<boolean>;\n emitter: Emitter<LayerEvents>;\n on: OmitThisParameter<Emitter<LayerEvents>[\"on\"]>;\n emit: <K extends keyof LayerEvents>(event: K, ...args: Parameters<LayerEvents[K]>) => void;\n nodes: Ref<Record<string, FeatureNode | undefined>>;\n}\n\nexport type Layer<T extends LayerOptions> = Replace<\n T & BaseLayer,\n {\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n name: GetComputableTypeWithDefault<T[\"name\"], string>;\n minWidth: GetComputableTypeWithDefault<T[\"minWidth\"], 600>;\n minimizable: GetComputableTypeWithDefault<T[\"minimizable\"], true>;\n forceHideGoBack: GetComputableType<T[\"forceHideGoBack\"]>;\n }\n>;\n\nexport type GenericLayer = Replace<\n Layer<LayerOptions>,\n {\n name: ProcessedComputable<string>;\n minWidth: ProcessedComputable<number>;\n minimizable: ProcessedComputable<boolean>;\n }\n>;\n\nexport const persistentRefs: Record<string, Set<Persistent>> = {};\nexport const addingLayers: string[] = [];\nexport function createLayer<T extends LayerOptions>(\n id: string,\n optionsFunc: OptionsFunc<T, BaseLayer, BaseLayer>\n): Layer<T> {\n return createLazyProxy(() => {\n const layer = {} as T & Partial<BaseLayer>;\n const emitter = (layer.emitter = createNanoEvents<LayerEvents>());\n layer.on = emitter.on.bind(emitter);\n layer.emit = emitter.emit.bind(emitter);\n layer.nodes = ref({});\n layer.id = id;\n\n addingLayers.push(id);\n persistentRefs[id] = new Set();\n layer.minimized = persistent(false);\n Object.assign(layer, optionsFunc.call(layer));\n if (\n addingLayers[addingLayers.length - 1] == null ||\n addingLayers[addingLayers.length - 1] !== id\n ) {\n throw `Adding layers stack in invalid state. This should not happen\\nStack: ${addingLayers}\\nTrying to pop ${layer.id}`;\n }\n addingLayers.pop();\n\n processComputable(layer as T, \"color\");\n processComputable(layer as T, \"display\");\n processComputable(layer as T, \"name\");\n setDefault(layer, \"name\", layer.id);\n processComputable(layer as T, \"minWidth\");\n setDefault(layer, \"minWidth\", 600);\n processComputable(layer as T, \"minimizable\");\n setDefault(layer, \"minimizable\", true);\n\n return layer as unknown as Layer<T>;\n });\n}\n\nexport function addLayer(\n layer: GenericLayer,\n player: { layers?: Record<string, Record<string, unknown>> }\n): void {\n console.info(\"Adding layer\", layer.id);\n if (layers[layer.id]) {\n console.error(\n \"Attempted to add layer with same ID as existing layer\",\n layer.id,\n layers[layer.id]\n );\n return;\n }\n\n setDefault(player, \"layers\", {});\n if (player.layers[layer.id] == null) {\n player.layers[layer.id] = {};\n }\n layers[layer.id] = layer;\n\n globalBus.emit(\"addLayer\", layer, player.layers[layer.id]);\n}\n\nexport function getLayer<T extends GenericLayer>(layerID: string): T {\n return layers[layerID] as T;\n}\n\nexport function removeLayer(layer: GenericLayer): void {\n console.info(\"Removing layer\", layer.id);\n globalBus.emit(\"removeLayer\", layer);\n\n layers[layer.id] = undefined;\n}\n\nexport function reloadLayer(layer: GenericLayer): void {\n removeLayer(layer);\n\n // Re-create layer\n addLayer(layer, player);\n}\n\nexport function setupLayerModal(layer: GenericLayer): {\n openModal: VoidFunction;\n modal: JSXFunction;\n} {\n const showModal = ref(false);\n return {\n openModal: () => (showModal.value = true),\n modal: jsx(() => (\n <Modal\n modelValue={showModal.value}\n onUpdate:modelValue={value => (showModal.value = value)}\n v-slots={{\n header: () => <h2>{unref(layer.name)}</h2>,\n body: unref(layer.display)\n }}\n />\n ))\n };\n}\n\nglobalBus.on(\"update\", function updateLayers(diff) {\n Object.values(layers).forEach(layer => {\n layer?.emit(\"preUpdate\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"update\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"postUpdate\", diff);\n });\n});\n","import Col from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport {\n CoercableComponent,\n Component as ComponentKey,\n GatherProps,\n GenericComponent,\n JSXFunction,\n Visibility\n} from \"features/feature\";\nimport {\n Component,\n computed,\n ComputedRef,\n DefineComponent,\n defineComponent,\n isRef,\n onUnmounted,\n PropType,\n ref,\n Ref,\n ShallowRef,\n shallowRef,\n unref,\n watchEffect\n} from \"vue\";\nimport { DoNotCache, ProcessedComputable } from \"./computed\";\n\nexport function coerceComponent(\n component: CoercableComponent,\n defaultWrapper = \"span\"\n): DefineComponent {\n if (typeof component === \"function\") {\n return defineComponent({ render: component });\n }\n if (typeof component === \"string\") {\n if (component.length > 0) {\n component = component.trim();\n if (component.charAt(0) !== \"<\") {\n component = `<${defaultWrapper}>${component}</${defaultWrapper}>`;\n }\n\n return defineComponent({ template: component });\n }\n return defineComponent({ render: () => ({}) });\n }\n return component;\n}\n\nexport type VueFeature = {\n [ComponentKey]: GenericComponent;\n [GatherProps]: () => Record<string, unknown>;\n};\n\nexport function render(object: VueFeature | CoercableComponent): JSX.Element | DefineComponent {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n return coerceComponent(object);\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRow(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(render)}</Row>;\n}\n\nexport function renderCol(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(render)}</Col>;\n}\n\nexport function renderJSX(object: VueFeature | CoercableComponent): JSX.Element {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n if (typeof object === \"string\") {\n return <>{object}</>;\n }\n // TODO why is object typed as never?\n const Comp = object as DefineComponent;\n return <Comp />;\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRowJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(renderJSX)}</Row>;\n}\n\nexport function renderColJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(renderJSX)}</Col>;\n}\n\nexport function isCoercableComponent(component: unknown): component is CoercableComponent {\n if (typeof component === \"string\") {\n return true;\n } else if (typeof component === \"object\") {\n if (component == null) {\n return false;\n }\n return \"render\" in component || \"component\" in component;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } else if (typeof component === \"function\" && (component as any)[DoNotCache] === true) {\n return true;\n }\n return false;\n}\n\nexport function setupHoldToClick(\n onClick?: Ref<((e?: MouseEvent | TouchEvent) => void) | undefined>,\n onHold?: Ref<VoidFunction | undefined>\n): {\n start: (e: MouseEvent | TouchEvent) => void;\n stop: VoidFunction;\n handleHolding: VoidFunction;\n} {\n const interval = ref<null | number>(null);\n const event = ref<MouseEvent | TouchEvent | undefined>(undefined);\n\n function start(e: MouseEvent | TouchEvent) {\n if (!interval.value) {\n interval.value = setInterval(handleHolding, 250);\n }\n event.value = e;\n }\n function stop() {\n if (interval.value) {\n clearInterval(interval.value);\n interval.value = null;\n }\n }\n function handleHolding() {\n if (onHold && onHold.value) {\n onHold.value();\n } else if (onClick && onClick.value) {\n onClick.value(event.value);\n }\n }\n\n onUnmounted(stop);\n\n return { start, stop, handleHolding };\n}\n\nexport function getFirstFeature<T extends { visibility: ProcessedComputable<Visibility> }>(\n features: T[],\n filter: (feature: T) => boolean\n): { firstFeature: Ref<T | undefined>; hiddenFeatures: Ref<T[]> } {\n const filteredFeatures = computed(() =>\n features.filter(\n feature => unref(feature.visibility) === Visibility.Visible && filter(feature)\n )\n );\n return {\n firstFeature: computed(() => filteredFeatures.value[0]),\n hiddenFeatures: computed(() => filteredFeatures.value.slice(1))\n };\n}\n\nexport function computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\"> {\n const comp = shallowRef<Component | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\" | null> {\n const comp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(component);\n comp.value = currComponent == null ? null : coerceComponent(currComponent, defaultWrapper);\n });\n return comp;\n}\n\nexport function wrapRef<T>(ref: Ref<ProcessedComputable<T>>): ComputedRef<T> {\n return computed(() => unwrapRef(ref));\n}\n\nexport function unwrapRef<T>(ref: Ref<ProcessedComputable<T>>): T {\n return unref<T>(unref(ref));\n}\n\nexport function setRefValue<T>(ref: Ref<T | Ref<T>>, value: T) {\n if (isRef(ref.value)) {\n ref.value.value = value;\n } else {\n ref.value = value;\n }\n}\n\nexport type PropTypes =\n | typeof Boolean\n | typeof String\n | typeof Number\n | typeof Function\n | typeof Object\n | typeof Array;\n// TODO Unfortunately, the typescript engine gives up on typing completely when you use this method,\n// Even though it has the same typing as when doing it manually\nexport function processedPropType<T>(...types: PropTypes[]): PropType<ProcessedComputable<T>> {\n if (!types.includes(Object)) {\n types.push(Object);\n }\n return types as PropType<ProcessedComputable<T>>;\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot } from \"vue\"\n\nimport {\n RegisterNodeInjectionKey,\n UnregisterNodeInjectionKey,\n NodesInjectionKey,\n FeatureNode\n} from \"game/layers\";\nimport { nextTick, provide, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst nodes = ref<Record<string, FeatureNode | undefined>>({});\n\nexpose({ nodes });\n\nconst observerOptions = {\n attributes: true,\n childList: true,\n subtree: false\n};\n\nprovide(RegisterNodeInjectionKey, (id, element) => {\n const observer = new MutationObserver(() => updateNode(id));\n observer.observe(element, observerOptions);\n nodes.value[id] = { element, observer, rect: element.getBoundingClientRect() };\n nextTick(() => updateNode(id));\n});\nprovide(UnregisterNodeInjectionKey, id => {\n nodes.value[id]?.observer.disconnect();\n nodes.value[id] = undefined;\n});\nprovide(NodesInjectionKey, nodes);\n\nfunction updateNode(id: string) {\n const node = nodes.value[id];\n if (node == null) {\n return;\n }\n node.rect = node.element.getBoundingClientRect();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return _renderSlot(_ctx.$slots, \"default\")\n}\n}\n\n})","import script from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withModifiers as _withModifiers, mergeProps as _mergeProps, withDirectives as _withDirectives, Transition as _Transition, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"onPointerdown\"]\nconst _hoisted_2 = { class: \"modal-wrapper\" }\nconst _hoisted_3 = { class: \"modal-container\" }\nconst _hoisted_4 = { class: \"modal-header\" }\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\" default header \")\nconst _hoisted_6 = { class: \"modal-body\" }\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" default body \")\nconst _hoisted_8 = { class: \"modal-footer\" }\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"modal-default-flex-grow\" }, null, -1)\n\nimport { FeatureNode } from \"game/layers\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Context from \"./Context.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { expose, emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n modelValue: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isOpen = computed(() => props.modelValue || isAnimating.value);\nfunction close() {\n emit(\"update:modelValue\", false);\n}\n\nconst isAnimating = ref(false);\n\nconst contextRef = ref<typeof Context | null>(null);\nconst nodes = computed<Record<string, FeatureNode | undefined> | null>(\n () => contextRef.value?.nodes ?? null\n);\n\nexpose({ isOpen, nodes });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"#modal-root\" }, [\n _createVNode(_Transition, {\n name: \"modal\",\n onBeforeEnter: _cache[0] || (_cache[0] = ($event: any) => (isAnimating.value = true)),\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (isAnimating.value = false))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", _mergeProps({\n class: \"modal-mask\",\n onPointerdown: _withModifiers(close, [\"self\"])\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"header\", { shown: _unref(isOpen) }, () => [\n _hoisted_5\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(Context, {\n ref_key: \"contextRef\",\n ref: contextRef\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"body\", { shown: _unref(isOpen) }, () => [\n _hoisted_7\n ])\n ]),\n _: 3\n }, 512)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _renderSlot(_ctx.$slots, \"footer\", { shown: _unref(isOpen) }, () => [\n _createElementVNode(\"div\", { class: \"modal-default-footer\" }, [\n _hoisted_9,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: close\n }, \" Close \")\n ])\n ])\n ])\n ])\n ])\n ], 16, _hoisted_1), [\n [_vShow, __props.modelValue]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","import script from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=d02c1f40&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\n\nimport \"components/common/fields.css\";\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { ref, toRef, watch } from \"vue\";\nimport VueNextSelect from \"vue-next-select\";\nimport \"vue-next-select/dist/index.css\";\n\nexport type SelectOption = { label: string; value: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n options: null,\n placeholder: null,\n closeOnSelect: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: unknown): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: unknown;\n options: SelectOption[];\n placeholder?: string;\n closeOnSelect?: boolean;\n}\n\n\n\n\nconst titleComponent = computeOptionalComponent(toRef(props, \"title\"), \"span\");\n\nconst value = ref<SelectOption | undefined>(\n props.options.find(option => option.value === props.modelValue)\n);\nwatch(toRef(props, \"modelValue\"), modelValue => {\n if (value.value?.value !== modelValue) {\n value.value = props.options.find(option => option.value === modelValue);\n }\n});\n\nfunction onUpdate(value: SelectOption) {\n emit(\"update:modelValue\", value.value);\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(VueNextSelect), {\n options: __props.options,\n modelValue: value.value,\n \"onUpdate:modelValue\": [\n _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onUpdate\n ],\n min: 1,\n \"label-by\": \"label\",\n placeholder: __props.placeholder,\n \"close-on-select\": __props.closeOnSelect\n }, null, 8, [\"options\", \"modelValue\", \"placeholder\", \"close-on-select\"])\n ]))\n}\n}\n\n})","import script from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=0f1110ed&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, isRef as _isRef, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, createElementVNode as _createElementVNode, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8bda704a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onSubmit\"]\nconst _hoisted_2 = { class: \"field\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_4 = [\"placeholder\"]\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, onMounted, ref, toRefs, unref } from \"vue\";\nimport VueTextareaAutosize from \"vue-textarea-autosize\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n textArea: { type: Boolean },\n placeholder: null,\n maxHeight: null\n },\n emits: [\"update:modelValue\", \"submit\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: string): void;\n (e: \"submit\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: CoercableComponent;\n modelValue?: string;\n textArea?: boolean;\n placeholder?: string;\n maxHeight?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst titleComponent = computed(\n () => props.title?.value && coerceComponent(unref(props.title.value), \"span\")\n);\n\nconst field = ref<HTMLElement | null>(null);\nonMounted(() => {\n field.value?.focus();\n});\n\nconst value = computed({\n get() {\n return unref(props.modelValue) || \"\";\n },\n set(value: string) {\n emit(\"update:modelValue\", value);\n }\n});\n\nfunction submit() {\n emit(\"submit\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"form\", {\n onSubmit: _withModifiers(submit, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n (__props.textArea)\n ? (_openBlock(), _createBlock(_unref(VueTextareaAutosize), {\n key: 1,\n modelValue: _unref(value),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n maxHeight: __props.maxHeight,\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 8, [\"modelValue\", \"placeholder\", \"maxHeight\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"input\", {\n key: 2,\n type: \"text\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n class: _normalizeClass({ fullWidth: !__props.title }),\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 42, _hoisted_4)), [\n [_vModelText, _unref(value)]\n ])\n ])\n ], 40, _hoisted_1))\n}\n}\n\n})","import script from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Text.vue?vue&type=style&index=0&id=8bda704a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8bda704a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, isRef as _isRef, vModelCheckbox as _vModelCheckbox, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43cf95d0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: boolean;\n}\n\n\n\n\nconst component = computed(() => coerceComponent(unref(props.title) || \"<span></span>\", \"span\"));\n\nconst value = computed({\n get() {\n return !!props.modelValue;\n },\n set(value: boolean) {\n emit(\"update:modelValue\", value);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"checkbox\",\n class: \"toggle\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null))\n }, null, 512), [\n [_vModelCheckbox, _unref(value)]\n ]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n ]))\n}\n}\n\n})","import script from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Toggle.vue?vue&type=style&index=0&id=43cf95d0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43cf95d0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"col\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-adb5f26e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"material-icons pinned\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tooltip-container\", { shown: _ctx.isShown }]),\n onMouseenter: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHovered = true)),\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHovered = false)),\n onClickCapture: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.togglePinned && _ctx.togglePinned(...args)))\n }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, true),\n (_ctx.elementComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.elementComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_ctx.isShown)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tooltip\", {\n top: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.UP,\n left: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.LEFT,\n right: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.RIGHT,\n bottom: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.DOWN,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_ctx.showPin)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"push_pin\"))\n : _createCommentVNode(\"\", true),\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 1 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport themes from \"data/themes\";\nimport { CoercableComponent, jsx, StyleValue } from \"features/feature\";\nimport { Persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport {\n coerceComponent,\n computeOptionalComponent,\n processedPropType,\n render,\n unwrapRef,\n VueFeature\n} from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\nimport { TooltipDirection } from \"./tooltip\";\n\nexport default defineComponent({\n props: {\n element: processedPropType<VueFeature>(Object),\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n direction: processedPropType<TooltipDirection>(Number),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n pinned: Object as PropType<Persistent<boolean>>\n },\n setup(props) {\n const { element, display, pinned } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(pinned) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n const elementComp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(element);\n elementComp.value =\n currComponent == null\n ? null\n : coerceComponent(jsx(() => render(currComponent) as JSX.Element));\n });\n\n function togglePinned(e: MouseEvent) {\n const isPinned = pinned as unknown as Persistent<boolean> | undefined; // Vue typing :/\n if (e.shiftKey && isPinned) {\n isPinned.value = !isPinned.value;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n const showPin = computed(() => unwrapRef(pinned) && themes[settings.theme].showPin);\n\n return {\n TooltipDirection,\n isHovered,\n isShown,\n comp,\n elementComp,\n unref,\n togglePinned,\n showPin\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=adb5f26e&scoped=true&ts=true\"\nimport script from \"./Tooltip.vue?vue&type=script&lang=ts\"\nexport * from \"./Tooltip.vue?vue&type=script&lang=ts\"\n\nimport \"./Tooltip.vue?vue&type=style&index=0&id=adb5f26e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-adb5f26e\"]])\n\nexport default __exports__","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 7634;\nmodule.exports = webpackEmptyContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkprofectus\"] = self[\"webpackChunkprofectus\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(6098); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["defaultTheme","variables","floatingTabs","mergeAdjacent","showPin","Themes","classic","paper","nordic","aqua","Component","Symbol","GatherProps","id","getUniqueID","prefix","Visibility","jsx","func","showIf","condition","otherwise","None","Visible","setDefault","object","key","value","undefined","findFeatures","obj","type","objects","handleObject","Object","keys","forEach","push","isRef","TooltipDirection","addTooltip","element","options","pinnable","console","error","pinned","UP","elementComponent","elementGratherProps","bind","display","classes","style","direction","xoffset","yoffset","this","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","async","startGameLoop","watch","PersistentState","DefaultValue","StackTrace","Deleted","getStackTrace","Error","stack","split","slice","map","line","trim","join","persistent","defaultValue","ref","addingLayers","warn","persistentRefs","add","layer","saveData","features","path","foundPersistent","delete","persistentState","reduce","acc","curr","savedValue","isReactive","includes","foundPersistentInChild","clear","state","reactive","devSpeed","name","tabs","time","autosave","offlineProd","offlineTime","timePlayed","keepGoing","modID","modVersion","layers","stringifySave","player","JSON","stringify","unref","playerHandler","get","target","Proxy","set","property","receiver","isNaN","sign","mag","currentValue","ownKeys","Reflect","has","getOwnPropertyDescriptor","window","active","saves","showTPS","theme","unthrottled","loadSettings","item","localStorage","getItem","settings","parse","decodeURIComponent","escape","atob","assign","setItem","btoa","unescape","encodeURIComponent","deep","hardResetSettings","settingFields","registerSettingField","component","infoComponents","registerInfoComponent","gameComponents","shallowReactive","lastTenTicks","hasNaN","NaNPath","render","_ctx","_cache","$props","$setup","$data","$options","_component_Context","class","color","showGoBack","onClick","args","goBack","minimized","$event","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","width","parseInt","tabValue","flexGrow","flexShrink","flexBasis","margin","__exports__","_withScopeId","n","_hoisted_1","_hoisted_2","open","__props","expose","isOpen","Modal","modelValue","header","body","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","href","_hoisted_13","_hoisted_14","changelog","_props","title","logo","author","discordName","discordLink","versionNumber","versionTitle","infoComponent","openChangelog","src","alt","shown","themes","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","Toggle","enablePausing","disabled","skipConfirm","emits","isConfirming","click","cancel","confirming","$slots","left","activated","activatedTimeout","clearTimeout","setTimeout","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","save","dateFormat","Intl","DateTimeFormat","year","month","day","hour","minute","second","isEditing","newName","isActive","currentTime","changeName","FeedbackButton","DangerButton","onConfirmingChanged","format","Text","onSubmit","modal","importingFailed","saveToImport","playerData","e","bankContext","bank","cachedSaves","getCachedSave","exportSave","saveToExport","el","document","createElement","appendChild","select","setSelectionRange","execCommand","removeChild","duplicateSave","deleteSave","removeItem","openSave","newFromPreset","preset","editSave","currSave","ref_key","list","handle","itemKey","Save","onOpen","onExport","onEditName","onDuplicate","onDelete","footer","placeholder","length","closeOnSelect","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","info","savesManager","useHeader","banner","openDiscord","$attrs","Tooltip","DOWN","RIGHT","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","ref_for","Nav","Layer","$refs","playAgain","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","gameComponent","Game","TPS","GameOverScreen","NaNScreen","log","vue","createApp","App","mount","MAX_SIGNIFICANT_DIGITS","EXP_LIMIT","LAYER_DOWN","log10","FIRST_NEG_LAYER","NUMBER_EXP_MAX","NUMBER_EXP_MIN","MAX_ES_IN_A_ROW","IGNORE_COMMAS","COMMAS_ARE_DECIMAL_POINTS","powerOf10","powersOf10","i","for","indexOf0InPowersOf10","power","critical_headers","E","critical_tetr_values","critical_slog_values","D","Decimal","fromValue_noAlloc","FC","fromComponents","FC_NN","fromComponents_noNormalize","decimalPlaces","places","len","numDigits","ceil","abs","rounded","pow","parseFloat","toFixed","f_maglog10","f_gamma","trunc","NEGATIVE_INFINITY","scal1","l","n2","np","exp","OMEGA","f_lambertw","z","tol","w","wn","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","lt","constructor","fromDecimal","fromNumber","fromString","m","floor","man","residue","fromMantissaExponent","exponent","POSITIVE_INFINITY","s","mantissa","fromMantissaExponent_noNormalize","fromValue","neg","other","recip","reciprocate","cmp","cmpabs","eq","notEquals","lte","gte","minabs","maxabs","clamp","clampMin","clampMax","tolerance","cmp_tolerance","eq_tolerance","neq_tolerance","notEquals_tolerance","lt_tolerance","lte_tolerance","gt_tolerance","gte_tolerance","pLog10","absLog10","base","log2","logarithm","pow10","root","_other","factorial","gamma","lngamma","sqr","sqrt","cube","cbrt","height","payload","tetrate","iteratedexp","times","iteratedlog","layeradd10","layeradd","slog","lambertw","ssqrt","pentate","resourcesAvailable","priceStart","priceRatio","currentOwned","affordGeometricSeries_core","numItems","sumGeometricSeries_core","priceAdd","affordArithmeticSeries_core","sumArithmeticSeries_core","cost","currentRpS","deltaRpS","efficiencyOfPurchase_core","maxLayers","random","randomsign","randomexp","randommag","actualStart","b","b2","plus","normalize","absmag","signmag","replace","pentationparts","heightparts","result","tetrationparts","powparts","toLowerCase","ptparts","parts","ecount","numberAttempt","newparts","charAt","layerstring","chrcode","charCodeAt","substr","me","mantissaWithDecimalPlaces","magnitudeWithDecimalPlaces","repeat","toExponential","toStringWithDecimalPlaces","toPrecision","valueOf","toJSON","negate","negated","sgn","decimal","a","layera","layerb","magdiff","subtract","minus","newmag","multiply","divide","divideBy","dividedBy","dNaN","reciprocal","compare","equals","compare_tolerance","magA","magB","equals_tolerance","pow_base","t","lm","adj","l2","this_num","negln","oldheight","fracheight","old_payload","next_payload","tetrate_critical","fulltimes","fraction","layerloss","dNegOne","copy","slog_critical","critical_section","grid","lower","upper","basefrac","frac","slogthis","slogdest","lnx","sin","cos","tan","asin","acos","atan","sinh","cosh","tanh","asinh","acosh","atanh","ascensionPenalty","ascensions","egg","lessThanOrEqualTo","lessThan","greaterThanOrEqualTo","greaterThan","MAX_VALUE","MIN_VALUE","decimalOne","exponentialFormat","num","precision","eString","defaultDecimalsShown","commaFormat","init","portions","regularFormat","eeee1000","e100000","e1000","e9","e6","e3","nearOne","thousandth","zero","small","defaultShowSmall","invertOOM","val","formatWhole","formatTime","seconds","toPlaces","x","maxAccepted","formatSmall","camelToTitle","camel","toUpperCase","isPlainObject","prototype","call","isFunction","DoNotCache","processComputable","computable","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","baseObject","calculated","calculateObj","setupInitialStore","stringifiedSave","load","loadSave","newSave","playerObj","removeLayer","addLayer","fixOldSave","getInitialLayers","onbeforeunload","hardReset","xmlns","viewBox","d","appear","script","createResource","displayName","resource","trackBest","best","amount","trackTotal","total","prevAmount","tetra8","e100","trackOOMPS","pointGain","oomps","oompsMag","lastPoints","prev","oompsString","displayResource","overrideAmount","_component_Links","nodesComp","leftNodesComp","rightNodesComp","branches","links","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeObserver","ResizeObserver","updateNodes","inject","NodesInjectionKey","resizeListener","onMounted","resListener","observe","isDirty","getBoundingClientRect","values","node","fonts","ready","then","validLinks","filter","Link","leftSideNodes","rightSideNodes","Links","shallowRef","currNodes","row","_component_MarkNode","_component_Node","visibility","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","onHold","MarkNode","Node","isCoercableComponent","TreeNodeType","TreeType","createTreeNode","optionsFunc","TreeNode","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","createResourceTooltip","requiredResource","requirement","req","backgroundImage","earned","image","feature","achievement","locked","bought","getNotifyStyle","strength","transform","borderColor","zIndex","getHighNotifyStyle","use","toast","AchievementType","createAchievement","Achievement","complete","shouldEarn","genericAchievement","onComplete","Display","_component_GridCell","rows","cols","col","gatherCellProps","cells","tile","titleComponent","GridCell","cell","createGridProxy","getGridHandler","getCellHandler","configurable","enumerable","writable","cache","prop","getState","createGrid","Grid","getID","startState","setState","clickable","currDisplay","Title","Description","description","ClickableType","createClickable","Clickable","createResetButton","resetButton","resetDescription","conversion","gainResource","actualGain","minimumGain","buyMax","baseResource","nextAt","currentAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","currentGain","gain","gainModifier","apply","scaling","current","roundUpCost","next","createPolynomialScaling","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","onInit","onContainerResized","onHotReload","app","updateBounds","resizeTo","backgroundAlpha","view","onBeforeUnmount","destroy","resize","ParticlesType","createParticles","particles","Particles","addEmitter","config","genericParticles","Promise","resolve","stage","emittersToAdd","upgradeConfig","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","createAdditiveModifier","addend","enabled","processedAddend","processedDescription","processedEnabled","createMultiplicativeModifier","multiplier","processedMultiplier","createExponentialModifier","processedExponent","createSequentialModifier","modifiers","modifier","reduceRight","createModifierSection","subtitle","unit","fullWidth","top","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","normalizedProgress","progressNumber","Direction","Up","clipPath","Down","Right","Left","Default","BarType","createBar","Bar","BuyableType","createBuyable","buyable","canPurchase","canAfford","genericBuyable","purchaseLimit","maxed","currClasses","purchase","onPurchase","CurrDisplay","EffectDisplay","amountDisplay","notifyStyle","challenge","done","completed","canStart","toggle","buttonText","canComplete","currActive","currCanComplete","Goal","goal","Reward","reward","ChallengeType","createChallenge","completions","Challenge","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","shiftKey","ctrlKey","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","OptionsDisplay","optionsDisplay","MilestoneType","MilestoneDisplay","createMilestone","Milestone","All","Configurable","Incomplete","genericMilestone","msDisplayOptions","option","TabType","createTab","Tab","selectTab","glowColorStyle","floating","_component_TabButton","_component_Sticky","tabClasses","tabStyle","button","onSelectTab","selected","activeTab","gatherButtonProps","Sticky","TabButton","currActiveTab","TabButtonType","TabFamilyType","createTabFamily","tabFamily","TabFamily","parsedTabs","tabButton","processedTabFamily","firstTab","find","upgrade","currCost","UpgradeType","createUpgrade","Upgrade","genericUpgrade","createLayer","points","beep","thingy","otherThingy","spentOnBuyables","waffleBoost","icecreamCap","coolInfo","lollipopMilestone3","lollipopMilestone4","f","boop","lollipopMilestones","funChallenge","funEffect","main","generatorUpgrade","lollipopMultiplierUpgrade","lollipopMultiplierEffect","ret","unlockIlluminatiUpgrade","quasiUpgrade","exhancers","upgrades","thingEffect","stuffEffect","confirmRespec","respecBuyables","sellExhancer","buyablesDisplay","longBoi","tallBoi","textShadow","borderWidth","flatBoi","tooltip","textDecoration","g","h","right","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","confettiParticles","clientX","clientY","playOnceAndDestroy","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","openModal","setupLayerModal","toRaw","showAchievements","oldVersion","emitter","on","Set","pop","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","renderJSX","Comp","setupHoldToClick","interval","event","handleHolding","computeComponent","unwrapRef","computeOptionalComponent","currComponent","wrapRef","processedPropType","types","observerOptions","attributes","childList","subtree","updateNode","provide","MutationObserver","disconnect","isAnimating","close","to","onBeforeEnter","onAfterLeave","onPointerdown","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","isShown","onMouseenter","isHovered","onClickCapture","togglePinned","elementComp","LEFT","bottom","isPinned","stopPropagation","webpackEmptyContext","code","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","definition","o","defineProperty","globalThis","hasOwnProperty","toStringTag","nmd","paths","children","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.bd74b40f.js.map b/js/app.bd74b40f.js.map deleted file mode 100644 index 873cc9d..0000000 --- a/js/app.bd74b40f.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/app.bd74b40f.js","mappings":"qFAiCA,MAAMA,EAAsB,CACxBC,UAAW,CACP,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,OACxB,uBAAwB,sBACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,gBAAiB,OACjB,WAAY,UACZ,WAAY,mBACZ,SAAU,UACV,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UAEb,kBAAmB,OACnB,iBAAkB,yBAClB,mBAAoB,OAExBC,cAAc,EACdC,eAAe,EACfC,SAAS,GAGb,IAAYC,GAAZ,SAAYA,GACR,uBACA,mBACA,qBACA,kBAJJ,CAAYA,IAAAA,EAAM,KAOlB,QACIC,QAASN,EACTO,MAAO,IACAP,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,UACb,kBAAmB,MACnB,iBAAkB,GAClB,mBAAoB,OAExBC,cAAc,GAGlBM,OAAQ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,KAAMguC,EAAmB7uC,KAAKa,KAAKguC,I,GC/CvF,IAAIE,EAAsBrC,EAAoBM,OAAEztC,EAAW,CAAC,MAAM,WAAa,OAAOmtC,EAAoB,SAC1GqC,EAAsBrC,EAAoBM,EAAE+B,I","sources":["webpack://profectus/./src/data/themes.ts","webpack://profectus/./src/features/feature.ts","webpack://profectus/./src/features/tooltips/tooltip.ts","webpack://profectus/./src/game/events.ts","webpack://profectus/./src/game/persistence.ts","webpack://profectus/./src/game/player.ts","webpack://profectus/./src/game/settings.ts","webpack://profectus/./src/game/state.ts","webpack://profectus/./src/components/Layer.vue?55f8","webpack://profectus/./src/components/Layer.vue?ea1e","webpack://profectus/./src/components/Layer.vue","webpack://profectus/./src/data/Changelog.vue?6b26","webpack://profectus/./src/data/Changelog.vue","webpack://profectus/./src/components/Info.vue?962a","webpack://profectus/./src/components/Info.vue","webpack://profectus/./src/components/Options.vue?ba84","webpack://profectus/./src/components/Options.vue","webpack://profectus/./src/components/fields/DangerButton.vue?bf6c","webpack://profectus/./src/components/fields/DangerButton.vue","webpack://profectus/./src/components/fields/FeedbackButton.vue?2dba","webpack://profectus/./src/components/fields/FeedbackButton.vue","webpack://profectus/./src/components/Save.vue?548a","webpack://profectus/./src/components/Save.vue","webpack://profectus/./src/components/SavesManager.vue?f8a3","webpack://profectus/./src/components/SavesManager.vue","webpack://profectus/./src/components/Nav.vue?b4a5","webpack://profectus/./src/components/Nav.vue","webpack://profectus/./src/components/Game.vue?fa24","webpack://profectus/./src/components/Game.vue","webpack://profectus/./src/components/GameOverScreen.vue?ee8d","webpack://profectus/./src/components/GameOverScreen.vue","webpack://profectus/./src/components/NaNScreen.vue?4f64","webpack://profectus/./src/components/NaNScreen.vue","webpack://profectus/./src/components/TPS.vue?e36e","webpack://profectus/./src/components/TPS.vue","webpack://profectus/./src/App.vue?94f9","webpack://profectus/./src/App.vue","webpack://profectus/./src/main.ts","webpack://profectus/./src/lib/break_eternity.ts","webpack://profectus/./src/util/break_eternity.ts","webpack://profectus/./src/util/bignum.ts","webpack://profectus/./src/util/common.ts","webpack://profectus/./src/util/computed.ts","webpack://profectus/./src/util/proxies.ts","webpack://profectus/./src/util/save.ts","webpack://profectus/./src/components/Profectus.vue","webpack://profectus/./src/components/Profectus.vue?94a9","webpack://profectus/./src/components/layout/Spacer.vue?e0bd","webpack://profectus/./src/components/layout/Spacer.vue","webpack://profectus/./src/features/resources/resource.ts","webpack://profectus/./src/features/trees/Tree.vue?d942","webpack://profectus/./src/features/links/Link.vue?f30b","webpack://profectus/./src/features/links/Link.vue","webpack://profectus/./src/features/links/Links.vue?7529","webpack://profectus/./src/features/links/Links.vue","webpack://profectus/./src/features/trees/Tree.vue?698b","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/TreeNode.vue?a4eb","webpack://profectus/./src/components/Node.vue?6bf5","webpack://profectus/./src/components/Node.vue","webpack://profectus/./src/components/MarkNode.vue?acb3","webpack://profectus/./src/components/MarkNode.vue","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?3070","webpack://profectus/./src/features/achievements/Achievement.vue?dcde","webpack://profectus/./src/features/achievements/Achievement.vue","webpack://profectus/./src/game/notifications.ts","webpack://profectus/./src/features/achievements/achievement.tsx","webpack://profectus/./src/features/grids/Grid.vue?6522","webpack://profectus/./src/features/grids/GridCell.vue?534f","webpack://profectus/./src/features/grids/GridCell.vue?58b8","webpack://profectus/./src/features/grids/GridCell.vue","webpack://profectus/./src/features/grids/Grid.vue?3299","webpack://profectus/./src/features/grids/Grid.vue","webpack://profectus/./src/features/grids/grid.ts","webpack://profectus/./src/features/clickables/Clickable.vue?3312","webpack://profectus/./src/features/clickables/Clickable.vue?22aa","webpack://profectus/./src/features/clickables/Clickable.vue","webpack://profectus/./src/features/clickables/clickable.ts","webpack://profectus/./src/data/common.tsx","webpack://profectus/./src/features/conversion.ts","webpack://profectus/./src/features/infoboxes/Infobox.vue?b869","webpack://profectus/./src/features/infoboxes/Infobox.vue?c704","webpack://profectus/./src/features/infoboxes/Infobox.vue","webpack://profectus/./src/features/infoboxes/infobox.ts","webpack://profectus/./src/features/particles/Particles.vue?8e41","webpack://profectus/./src/features/particles/Particles.vue?11ca","webpack://profectus/./src/features/particles/Particles.vue","webpack://profectus/./src/features/particles/particles.tsx","webpack://profectus/./src/features/reset.ts","webpack://profectus/./src/features/resources/Resource.vue?0822","webpack://profectus/./src/features/resources/Resource.vue","webpack://profectus/./src/features/resources/MainDisplay.vue?8bde","webpack://profectus/./src/features/resources/MainDisplay.vue","webpack://profectus/./src/game/modifiers.tsx","webpack://profectus/./src/components/fields/Slider.vue?f27e","webpack://profectus/./src/components/fields/Slider.vue","webpack://profectus/./src/components/layout/Sticky.vue?32f6","webpack://profectus/./src/components/layout/Sticky.vue","webpack://profectus/./src/components/layout/VerticalRule.vue?aaf3","webpack://profectus/./src/components/layout/VerticalRule.vue","webpack://profectus/./src/features/bars/Bar.vue?b455","webpack://profectus/./src/features/bars/Bar.vue?da91","webpack://profectus/./src/features/bars/Bar.vue","webpack://profectus/./src/features/bars/bar.ts","webpack://profectus/./src/features/buyable.tsx","webpack://profectus/./src/features/challenges/Challenge.vue?43ae","webpack://profectus/./src/features/challenges/Challenge.vue?5ee1","webpack://profectus/./src/features/challenges/Challenge.vue","webpack://profectus/./src/features/challenges/challenge.tsx","webpack://profectus/./src/features/hotkey.tsx","webpack://profectus/./src/features/links/links.ts","webpack://profectus/./src/features/milestones/Milestone.vue?08ca","webpack://profectus/./src/features/milestones/Milestone.vue?d607","webpack://profectus/./src/features/milestones/Milestone.vue","webpack://profectus/./src/features/milestones/milestone.tsx","webpack://profectus/./src/features/tabs/Tab.vue?50ee","webpack://profectus/./src/features/tabs/Tab.vue","webpack://profectus/./src/features/tabs/tab.ts","webpack://profectus/./src/features/tabs/TabButton.vue?4c84","webpack://profectus/./src/features/tabs/TabButton.vue?a3c5","webpack://profectus/./src/features/tabs/TabButton.vue","webpack://profectus/./src/features/tabs/TabFamily.vue?e12a","webpack://profectus/./src/features/tabs/TabFamily.vue?2385","webpack://profectus/./src/features/tabs/TabFamily.vue","webpack://profectus/./src/features/tabs/tabFamily.ts","webpack://profectus/./src/features/upgrades/Upgrade.vue?4075","webpack://profectus/./src/features/upgrades/Upgrade.vue?4a14","webpack://profectus/./src/features/upgrades/Upgrade.vue","webpack://profectus/./src/features/upgrades/upgrade.ts","webpack://profectus/./src/data/layers/aca/c.tsx","webpack://profectus/./src/data/layers/aca/f.tsx","webpack://profectus/./src/data/layers/aca/a.tsx","webpack://profectus/./src/data/projEntry.tsx","webpack://profectus/./src/game/layers.tsx","webpack://profectus/./src/util/vue.tsx","webpack://profectus/./src/components/Context.vue?2f6e","webpack://profectus/./src/components/Context.vue","webpack://profectus/./src/components/Modal.vue?1099","webpack://profectus/./src/components/Modal.vue","webpack://profectus/./src/components/fields/Select.vue?c5ab","webpack://profectus/./src/components/fields/Select.vue","webpack://profectus/./src/components/fields/Text.vue?ba89","webpack://profectus/./src/components/fields/Text.vue","webpack://profectus/./src/components/fields/Toggle.vue?20df","webpack://profectus/./src/components/fields/Toggle.vue","webpack://profectus/./src/components/layout/Column.vue?cbbe","webpack://profectus/./src/components/layout/Column.vue","webpack://profectus/./src/components/layout/Row.vue?506d","webpack://profectus/./src/components/layout/Row.vue","webpack://profectus/./src/features/tooltips/Tooltip.vue?8920","webpack://profectus/./src/features/tooltips/Tooltip.vue?9cc7","webpack://profectus/./src/features/tooltips/Tooltip.vue","webpack://profectus/|/\\.txt$/","webpack://profectus/webpack/bootstrap","webpack://profectus/webpack/runtime/chunk loaded","webpack://profectus/webpack/runtime/compat get default export","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/node module decorator","webpack://profectus/webpack/runtime/jsonp chunk loading","webpack://profectus/webpack/startup"],"sourcesContent":["export interface ThemeVars {\n \"--foreground\": string;\n \"--background\": string;\n \"--feature-foreground\": string;\n \"--tooltip-background\": string;\n \"--raised-background\": string;\n \"--points\": string;\n \"--locked\": string;\n \"--highlighted\": string;\n \"--bought\": string;\n \"--danger\": string;\n \"--link\": string;\n \"--outline\": string;\n \"--accent1\": string;\n \"--accent2\": string;\n \"--accent3\": string;\n \"--border-radius\": string;\n \"--modal-border\": string;\n \"--feature-margin\": string;\n}\n\nexport interface Theme {\n variables: ThemeVars;\n floatingTabs: boolean;\n mergeAdjacent: boolean;\n showPin: boolean;\n}\n\ndeclare module \"@vue/runtime-dom\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface CSSProperties extends Partial<ThemeVars> {}\n}\n\nconst defaultTheme: Theme = {\n variables: {\n \"--foreground\": \"#dfdfdf\",\n \"--background\": \"#0f0f0f\",\n \"--feature-foreground\": \"#eee\",\n \"--tooltip-background\": \"rgba(0, 0, 0, 0.75)\",\n \"--raised-background\": \"#0f0f0f\",\n \"--points\": \"#ffffff\",\n \"--locked\": \"#bf8f8f\",\n \"--highlighted\": \"#333\",\n \"--bought\": \"#77bf5f\",\n \"--danger\": \"rgb(220, 53, 69)\",\n \"--link\": \"#02f2f2\",\n \"--outline\": \"#dfdfdf\",\n \"--accent1\": \"#627a82\",\n \"--accent2\": \"#658262\",\n \"--accent3\": \"#7c6282\",\n\n \"--border-radius\": \"15px\",\n \"--modal-border\": \"solid 2px var(--color)\",\n \"--feature-margin\": \"0px\"\n },\n floatingTabs: true,\n mergeAdjacent: true,\n showPin: true\n};\n\nexport enum Themes {\n Classic = \"classic\",\n Paper = \"paper\",\n Nordic = \"nordic\",\n Aqua = \"aqua\"\n}\n\nexport default {\n classic: defaultTheme,\n paper: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--background\": \"#2a323d\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#333c4a\",\n \"--locked\": \"#3a3e45\",\n \"--bought\": \"#5C8A58\",\n \"--outline\": \"#333c4a\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n // Based on https://www.nordtheme.com\n nordic: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#D8DEE9\",\n \"--background\": \"#2E3440\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#3B4252\",\n \"--points\": \"#E5E9F0\",\n \"--locked\": \"#4c566a\",\n \"--highlighted\": \"#434c5e\",\n \"--bought\": \"#8FBCBB\",\n \"--danger\": \"#D08770\",\n \"--link\": \"#88C0D0\",\n \"--outline\": \"#3B4252\",\n \"--accent1\": \"#B48EAD\",\n \"--accent2\": \"#A3BE8C\",\n \"--accent3\": \"#EBCB8B\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"solid 2px #3B4252\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n aqua: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#bfdfff\",\n \"--background\": \"#001f3f\",\n \"--tooltip-background\": \"rgba(0, 15, 31, 0.75)\",\n \"--raised-background\": \"#001f3f\",\n \"--points\": \"#dfefff\",\n \"--locked\": \"#c4a7b3\",\n \"--outline\": \"#bfdfff\"\n }\n } as Theme\n} as Record<Themes, Theme>;\n","import { DefaultValue } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { DoNotCache, ProcessedComputable } from \"util/computed\";\nimport { CSSProperties, DefineComponent, isRef } from \"vue\";\n\nexport const Component = Symbol(\"Component\");\nexport const GatherProps = Symbol(\"GatherProps\");\n\nexport type JSXFunction = (() => JSX.Element) & { [DoNotCache]: true };\nexport type CoercableComponent = string | DefineComponent | JSXFunction;\nexport type StyleValue = string | CSSProperties | Array<string | CSSProperties>;\n\n// TODO if importing .vue components in .tsx can become type safe,\n// this type can probably be safely removed\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type GenericComponent = DefineComponent<any, any, any>;\n\nexport type FeatureComponent<T> = Omit<\n {\n [K in keyof T]: T[K] extends ProcessedComputable<infer S> ? S : T[K];\n },\n typeof Component | typeof DefaultValue\n>;\n\nexport type Replace<T, S> = S & Omit<T, keyof S>;\n\nexport type OptionsFunc<T, S = T, R = Record<string, unknown>> = () => T & ThisType<S> & Partial<R>;\n\nlet id = 0;\n// Get a unique ID to allow a feature to be found for creating branches\n// and any other uses requiring unique identifiers for each feature\n// IDs are gauranteed unique, but should not be saved as they are not\n// guaranteed to be persistent through updates and such\nexport function getUniqueID(prefix = \"feature-\"): string {\n return prefix + id++;\n}\n\nexport enum Visibility {\n Visible,\n Hidden,\n None\n}\n\nexport function jsx(func: () => JSX.Element | \"\"): JSXFunction {\n (func as Partial<JSXFunction>)[DoNotCache] = true;\n return func as JSXFunction;\n}\n\nexport function showIf(condition: boolean, otherwise = Visibility.None): Visibility {\n return condition ? Visibility.Visible : otherwise;\n}\n\nexport function setDefault<T, K extends keyof T>(\n object: T,\n key: K,\n value: T[K]\n): asserts object is Exclude<T, K> & Required<Pick<T, K>> {\n if (object[key] === undefined && value != undefined) {\n object[key] = value;\n }\n}\n\nexport function findFeatures(obj: Record<string, unknown>, type: symbol): unknown[] {\n const objects: unknown[] = [];\n const handleObject = (obj: Record<string, unknown>) => {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if ((value as Record<string, unknown>).type === type) {\n objects.push(value);\n } else if (!(value instanceof Decimal) && !isRef(value)) {\n handleObject(value as Record<string, unknown>);\n }\n }\n });\n };\n handleObject(obj);\n return objects;\n}\n","import TooltipComponent from \"./Tooltip.vue\";\nimport {\n CoercableComponent,\n Component,\n GatherProps,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { VueFeature } from \"util/vue\";\nimport { Ref } from \"vue\";\nimport { persistent } from \"game/persistence\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport enum TooltipDirection {\n UP,\n LEFT,\n RIGHT,\n DOWN\n}\n\nexport interface TooltipOptions {\n pinnable?: boolean;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n direction?: Computable<TooltipDirection>;\n xoffset?: Computable<string>;\n yoffset?: Computable<string>;\n}\n\nexport interface BaseTooltip {\n pinned?: Ref<boolean>;\n}\n\nexport type Tooltip<T extends TooltipOptions> = Replace<\n T & BaseTooltip,\n {\n pinnable: T[\"pinnable\"] extends undefined ? false : T[\"pinnable\"];\n pinned: T[\"pinnable\"] extends true ? Ref<boolean> : undefined;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n direction: GetComputableTypeWithDefault<T[\"direction\"], TooltipDirection.UP>;\n xoffset: GetComputableType<T[\"xoffset\"]>;\n yoffset: GetComputableType<T[\"yoffset\"]>;\n }\n>;\n\nexport type GenericTooltip = Replace<\n Tooltip<TooltipOptions>,\n {\n pinnable: boolean;\n pinned: Ref<boolean> | undefined;\n direction: ProcessedComputable<TooltipDirection>;\n }\n>;\n\nexport function addTooltip<T extends TooltipOptions>(\n element: VueFeature,\n options: T & ThisType<Tooltip<T>> & Partial<BaseTooltip>\n): Tooltip<T> {\n if (options.pinnable) {\n if (\"pinned\" in element) {\n console.error(\n \"Cannot add pinnable tooltip to element that already has a property called 'pinned'\"\n );\n options.pinnable = false;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element as any).pinned = options.pinned = persistent<boolean>(false);\n }\n }\n\n processComputable(options as T, \"display\");\n processComputable(options as T, \"classes\");\n processComputable(options as T, \"style\");\n processComputable(options as T, \"direction\");\n setDefault(options, \"direction\", TooltipDirection.UP);\n processComputable(options as T, \"xoffset\");\n processComputable(options as T, \"yoffset\");\n\n const elementComponent = element[Component];\n element[Component] = TooltipComponent;\n const elementGratherProps = element[GatherProps].bind(element);\n element[GatherProps] = function gatherTooltipProps(this: GenericTooltip) {\n const { display, classes, style, direction, xoffset, yoffset, pinned } = this;\n return {\n element: {\n [Component]: elementComponent,\n [GatherProps]: elementGratherProps\n },\n display,\n classes,\n style,\n direction,\n xoffset,\n yoffset,\n pinned\n };\n }.bind(options as GenericTooltip);\n\n return options as unknown as Tooltip<T>;\n}\n","import projInfo from \"data/projInfo.json\";\nimport Decimal from \"util/bignum\";\nimport { createNanoEvents } from \"nanoevents\";\nimport { App, Ref, watch } from \"vue\";\nimport { GenericLayer } from \"./layers\";\nimport player from \"./player\";\nimport settings, { Settings } from \"./settings\";\nimport state from \"./state\";\n\nexport interface GlobalEvents {\n addLayer: (layer: GenericLayer, saveData: Record<string, unknown>) => void;\n removeLayer: (layer: GenericLayer) => void;\n update: (diff: number, trueDiff: number) => void;\n loadSettings: (settings: Partial<Settings>) => void;\n gameWon: VoidFunction;\n setupVue: (vue: App) => void;\n}\n\nexport const globalBus = createNanoEvents<GlobalEvents>();\n\nlet intervalID: number | null = null;\n\n// Not imported immediately due to dependency cycles\n// This gets set during startGameLoop(), and will only be used in the update function\nlet hasWon: null | Ref<boolean> = null;\n\nfunction update() {\n const now = Date.now();\n let diff = (now - player.time) / 1e3;\n player.time = now;\n const trueDiff = diff;\n\n state.lastTenTicks.push(trueDiff);\n if (state.lastTenTicks.length > 10) {\n state.lastTenTicks = state.lastTenTicks.slice(1);\n }\n\n // Stop here if the game is paused on the win screen\n if (hasWon?.value && !player.keepGoing) {\n return;\n }\n // Stop here if the player had a NaN value\n if (state.hasNaN) {\n return;\n }\n\n diff = Math.max(diff, 0);\n\n if (player.devSpeed === 0) {\n return;\n }\n\n // Add offline time if any\n if (player.offlineTime != undefined) {\n if (Decimal.gt(player.offlineTime, projInfo.offlineLimit * 3600)) {\n player.offlineTime = projInfo.offlineLimit * 3600;\n }\n if (Decimal.gt(player.offlineTime, 0) && player.devSpeed !== 0) {\n const offlineDiff = Math.max(player.offlineTime / 10, diff);\n player.offlineTime = player.offlineTime - offlineDiff;\n diff += offlineDiff;\n } else if (player.devSpeed === 0) {\n player.offlineTime += diff;\n }\n if (!player.offlineProd || Decimal.lt(player.offlineTime, 0)) {\n player.offlineTime = null;\n }\n }\n\n // Cap at max tick length\n diff = Math.min(diff, projInfo.maxTickLength);\n\n // Apply dev speed\n if (player.devSpeed != undefined) {\n diff *= player.devSpeed;\n }\n\n if (!Number.isFinite(diff)) {\n diff = 1e308;\n }\n\n // Update\n if (Decimal.eq(diff, 0)) {\n return;\n }\n\n player.timePlayed += diff;\n if (!Number.isFinite(player.timePlayed)) {\n player.timePlayed = 1e308;\n }\n globalBus.emit(\"update\", diff, trueDiff);\n\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n if (intervalID != null) {\n clearInterval(intervalID);\n intervalID = null;\n }\n } else if (intervalID == null) {\n intervalID = setInterval(update, 50);\n }\n}\n\nexport async function startGameLoop() {\n hasWon = (await import(\"data/projEntry\")).hasWon;\n watch(hasWon, hasWon => {\n if (hasWon) {\n globalBus.emit(\"gameWon\");\n }\n });\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n } else {\n intervalID = setInterval(update, 50);\n }\n}\n","import { globalBus } from \"game/events\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { ProxyState } from \"util/proxies\";\nimport { isArray } from \"@vue/shared\";\nimport { isReactive, isRef, Ref, ref } from \"vue\";\nimport { addingLayers, GenericLayer, persistentRefs } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\nexport const StackTrace = Symbol(\"StackTrace\");\nexport const Deleted = Symbol(\"Deleted\");\n\n// Note: This is a union of things that should be safely stringifiable without needing\n// special processes for knowing what to load them in as\n// - Decimals aren't allowed because we'd need to know to parse them back.\n// - DecimalSources are allowed because the string is a valid value for them\nexport type State =\n | string\n | number\n | boolean\n | DecimalSource\n | { [key: string]: State }\n | { [key: number]: State };\n\nexport type Persistent<T extends State = State> = Ref<T> & {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n [StackTrace]: string;\n [Deleted]: boolean;\n};\n\nfunction getStackTrace() {\n return (\n new Error().stack\n ?.split(\"\\n\")\n .slice(3, 5)\n .map(line => line.trim())\n .join(\"\\n\") || \"\"\n );\n}\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): Persistent<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as Persistent<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n persistent[StackTrace] = getStackTrace();\n persistent[Deleted] = false;\n\n if (addingLayers.length === 0) {\n console.warn(\n \"Creating a persistent ref outside of a layer. This is not officially supported\",\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].add(persistent);\n }\n\n return persistent as Persistent<T>;\n}\n\nexport function deletePersistent(persistent: Persistent) {\n if (addingLayers.length === 0) {\n console.warn(\"Deleting a persistent ref outside of a layer. Ignoring...\", persistent);\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].delete(persistent);\n }\n persistent[Deleted] = true;\n}\n\nglobalBus.on(\"addLayer\", (layer: GenericLayer, saveData: Record<string, unknown>) => {\n const features: { type: typeof Symbol }[] = [];\n const handleObject = (obj: Record<string, unknown>, path: string[] = []): boolean => {\n let foundPersistent = false;\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if (PersistentState in value) {\n foundPersistent = true;\n if ((value as Persistent)[Deleted]) {\n console.warn(\n \"Deleted persistent ref present in returned object. Ignoring...\",\n value,\n \"\\nCreated at:\\n\" + (value as Persistent)[StackTrace]\n );\n return;\n }\n persistentRefs[layer.id].delete(\n ProxyState in value\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((value as any)[ProxyState] as Persistent)\n : (value as Persistent)\n );\n\n // Construct save path if it doesn't exist\n const persistentState = path.reduce<Record<string, unknown>>((acc, curr) => {\n if (!(curr in acc)) {\n acc[curr] = {};\n }\n return acc[curr] as Record<string, unknown>;\n }, saveData);\n\n // Cache currently saved value\n const savedValue = persistentState[key];\n // Add ref to save data\n persistentState[key] = (value as Persistent)[PersistentState];\n // Load previously saved value\n if (isReactive(persistentState)) {\n if (savedValue != null) {\n persistentState[key] = savedValue;\n } else {\n persistentState[key] = (value as Persistent)[DefaultValue];\n }\n } else {\n if (savedValue != null) {\n (persistentState[key] as Ref<unknown>).value = savedValue;\n } else {\n (persistentState[key] as Ref<unknown>).value = (value as Persistent)[\n DefaultValue\n ];\n }\n }\n } else if (\n !(value instanceof Decimal) &&\n !isRef(value) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !features.includes(value as { type: typeof Symbol })\n ) {\n if (typeof (value as { type: typeof Symbol }).type === \"symbol\") {\n features.push(value as { type: typeof Symbol });\n }\n\n // Continue traversing\n const foundPersistentInChild = handleObject(value as Record<string, unknown>, [\n ...path,\n key\n ]);\n\n // Show warning for persistent values inside arrays\n // TODO handle arrays better\n if (foundPersistentInChild) {\n if (isArray(value) && !isArray(obj)) {\n console.warn(\n \"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.\",\n ProxyState in obj\n ? (obj as Record<PropertyKey, unknown>)[ProxyState]\n : obj,\n key\n );\n } else {\n foundPersistent = true;\n }\n }\n }\n }\n });\n return foundPersistent;\n };\n handleObject(layer);\n persistentRefs[layer.id].forEach(persistent => {\n console.error(\n `Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n });\n persistentRefs[layer.id].clear();\n});\n","import Decimal from \"util/bignum\";\nimport { isPlainObject } from \"util/common\";\nimport { ProxiedWithState, ProxyPath, ProxyState } from \"util/proxies\";\nimport { reactive, unref } from \"vue\";\nimport transientState from \"./state\";\n\nexport interface PlayerData {\n id: string;\n devSpeed: number | null;\n name: string;\n tabs: Array<string>;\n time: number;\n autosave: boolean;\n offlineProd: boolean;\n offlineTime: number | null;\n timePlayed: number;\n keepGoing: boolean;\n modID: string;\n modVersion: string;\n layers: Record<string, Record<string, unknown>>;\n}\n\nexport type Player = ProxiedWithState<PlayerData>;\n\nconst state = reactive<PlayerData>({\n id: \"\",\n devSpeed: null,\n name: \"\",\n tabs: [],\n time: -1,\n autosave: true,\n offlineProd: true,\n offlineTime: null,\n timePlayed: 0,\n keepGoing: false,\n modID: \"\",\n modVersion: \"\",\n layers: {}\n});\n\nexport function stringifySave(player: PlayerData): string {\n return JSON.stringify(player, (key, value) => unref(value));\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst playerHandler: ProxyHandler<Record<PropertyKey, any>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Record<PropertyKey, any>, key: PropertyKey): any {\n if (key === ProxyState || key === ProxyPath) {\n return target[key];\n }\n\n const value = target[ProxyState][key];\n if (key !== \"value\" && isPlainObject(value) && !(value instanceof Decimal)) {\n if (value !== target[key]?.[ProxyState]) {\n const path = [...target[ProxyPath], key];\n target[key] = new Proxy({ [ProxyState]: value, [ProxyPath]: path }, playerHandler);\n }\n return target[key];\n }\n\n return value;\n },\n set(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target: Record<PropertyKey, any>,\n property: PropertyKey,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any,\n receiver: ProxyConstructor\n ): boolean {\n if (\n !transientState.hasNaN &&\n ((typeof value === \"number\" && isNaN(value)) ||\n (value instanceof Decimal &&\n (isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag))))\n ) {\n const currentValue = target[ProxyState][property];\n if (\n !(\n (typeof currentValue === \"number\" && isNaN(currentValue)) ||\n (currentValue instanceof Decimal &&\n (isNaN(currentValue.sign) ||\n isNaN(currentValue.layer) ||\n isNaN(currentValue.mag)))\n )\n ) {\n state.autosave = false;\n transientState.hasNaN = true;\n transientState.NaNPath = [...target[ProxyPath], property];\n transientState.NaNReceiver = receiver as unknown as Record<string, unknown>;\n console.error(\n `Attempted to set NaN value`,\n [...target[ProxyPath], property],\n target[ProxyState]\n );\n throw \"Attempted to set NaN value. See above for details\";\n }\n }\n target[ProxyState][property] = value;\n return true;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ownKeys(target: Record<PropertyKey, any>) {\n return Reflect.ownKeys(target[ProxyState]);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n has(target: Record<PropertyKey, any>, key: string) {\n return Reflect.has(target[ProxyState], key);\n },\n getOwnPropertyDescriptor(target, key) {\n return Object.getOwnPropertyDescriptor(target[ProxyState], key);\n }\n};\nexport default window.player = new Proxy(\n { [ProxyState]: state, [ProxyPath]: [\"player\"] },\n playerHandler\n) as Player;\n","import projInfo from \"data/projInfo.json\";\nimport { Themes } from \"data/themes\";\nimport { CoercableComponent } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { hardReset } from \"util/save\";\nimport { reactive, watch } from \"vue\";\n\nexport interface Settings {\n active: string;\n saves: string[];\n showTPS: boolean;\n theme: Themes;\n unthrottled: boolean;\n}\n\nconst state = reactive<Partial<Settings>>({\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic,\n unthrottled: false\n});\n\nwatch(\n state,\n state =>\n localStorage.setItem(\n projInfo.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(state))))\n ),\n { deep: true }\n);\nexport default window.settings = state as Settings;\n\nexport function loadSettings(): void {\n try {\n const item: string | null = localStorage.getItem(projInfo.id);\n if (item != null && item !== \"\") {\n const settings = JSON.parse(decodeURIComponent(escape(atob(item))));\n if (typeof settings === \"object\") {\n Object.assign(state, settings);\n }\n }\n globalBus.emit(\"loadSettings\", state);\n // eslint-disable-next-line no-empty\n } catch {}\n}\n\nexport const hardResetSettings = (window.hardResetSettings = () => {\n const settings = {\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic\n };\n globalBus.emit(\"loadSettings\", settings);\n Object.assign(state, settings);\n hardReset();\n});\n\nexport const settingFields: CoercableComponent[] = reactive([]);\nexport function registerSettingField(component: CoercableComponent) {\n settingFields.push(component);\n}\n\nexport const infoComponents: CoercableComponent[] = reactive([]);\nexport function registerInfoComponent(component: CoercableComponent) {\n infoComponents.push(component);\n}\n\nexport const gameComponents: CoercableComponent[] = reactive([]);\nexport function registerGameComponent(component: CoercableComponent) {\n gameComponents.push(component);\n}\n","import { shallowReactive } from \"vue\";\n\nexport interface Transient {\n lastTenTicks: number[];\n hasNaN: boolean;\n NaNPath?: string[];\n NaNReceiver?: Record<string, unknown>;\n}\n\nexport default window.state = shallowReactive<Transient>({\n lastTenTicks: [],\n hasNaN: false,\n NaNPath: []\n});\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Context = _resolveComponent(\"Context\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"layer-container\",\n style: _normalizeStyle({ '--layer-color': _ctx.unref(_ctx.color) })\n }, [\n (_ctx.showGoBack)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"goBack\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.goBack && _ctx.goBack(...args)))\n }, \"←\"))\n : _createCommentVNode(\"\", true),\n (_ctx.minimized.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"layer-tab minimized\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.minimized.value = false))\n }, [\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.unref(_ctx.name)), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: _normalizeClass([\"layer-tab\", [{ showGoBack: _ctx.showGoBack }, _ctx.unref(_ctx.classes)]]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, [\n _createVNode(_component_Context, { ref: \"contextRef\" }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ]),\n _: 1\n }, 512)\n ], 6)),\n (_ctx.unref(_ctx.minimizable))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 3,\n class: \"minimize\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.minimized.value = true))\n }, \" ▼ \"))\n : _createCommentVNode(\"\", true)\n ], 4))\n}","\nimport projInfo from \"data/projInfo.json\";\nimport { CoercableComponent, StyleValue } from \"features/feature\";\nimport { FeatureNode } from \"game/layers\";\nimport { Persistent } from \"game/persistence\";\nimport player from \"game/player\";\nimport { computeComponent, processedPropType, wrapRef } from \"util/vue\";\nimport { computed, defineComponent, nextTick, PropType, Ref, ref, toRefs, unref, watch } from \"vue\";\nimport Context from \"./Context.vue\";\n\nexport default defineComponent({\n components: { Context },\n props: {\n index: {\n type: Number,\n required: true\n },\n tab: {\n type: Function as PropType<() => HTMLElement | undefined>,\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n minimized: {\n type: Object as PropType<Persistent<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number | string>(Number, String),\n required: true\n },\n name: {\n type: processedPropType<string>(String),\n required: true\n },\n color: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n minimizable: processedPropType<boolean>(Boolean),\n nodes: {\n type: Object as PropType<Ref<Record<string, FeatureNode | undefined>>>,\n required: true\n }\n },\n setup(props) {\n const { display, index, minimized, minWidth, tab } = toRefs(props);\n\n const component = computeComponent(display);\n const showGoBack = computed(\n () => projInfo.allowGoBack && index.value > 0 && !minimized.value\n );\n\n function goBack() {\n player.tabs.splice(unref(props.index), Infinity);\n }\n\n nextTick(() => updateTab(minimized.value, unref(minWidth.value)));\n watch([minimized, wrapRef(minWidth)], ([minimized, minWidth]) =>\n updateTab(minimized, minWidth)\n );\n\n const contextRef = ref<typeof Context | null>(null);\n watch(\n () => contextRef.value?.nodes,\n nodes => {\n if (nodes) {\n props.nodes.value = nodes;\n }\n }\n );\n\n function updateTab(minimized: boolean, minWidth: number | string) {\n const width =\n typeof minWidth === \"number\" || Number.isNaN(parseInt(minWidth))\n ? minWidth + \"px\"\n : minWidth;\n const tabValue = tab.value();\n if (tabValue != undefined) {\n if (minimized) {\n tabValue.style.flexGrow = \"0\";\n tabValue.style.flexShrink = \"0\";\n tabValue.style.width = \"60px\";\n tabValue.style.minWidth = tabValue.style.flexBasis = \"\";\n tabValue.style.margin = \"0\";\n } else {\n tabValue.style.flexGrow = \"\";\n tabValue.style.flexShrink = \"\";\n tabValue.style.width = \"\";\n tabValue.style.minWidth = tabValue.style.flexBasis = `${width}px`;\n tabValue.style.margin = \"\";\n }\n }\n }\n\n return {\n component,\n showGoBack,\n contextRef,\n unref,\n goBack\n };\n }\n});\n","import { render } from \"./Layer.vue?vue&type=template&id=66dc9e3e&scoped=true&ts=true\"\nimport script from \"./Layer.vue?vue&type=script&lang=ts\"\nexport * from \"./Layer.vue?vue&type=script&lang=ts\"\n\nimport \"./Layer.vue?vue&type=style&index=0&id=66dc9e3e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-66dc9e3e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5f8298e6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Changelog\", -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"details\", { open: \"\" }, [\n /*#__PURE__*/_createElementVNode(\"summary\", null, [\n /*#__PURE__*/_createTextVNode(\"v0.0 Initial Commit - \"),\n /*#__PURE__*/_createElementVNode(\"time\", null, \"2021-09-04\")\n ]),\n /*#__PURE__*/_createTextVNode(\" This is the first release :D \"),\n /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"feature\" }, \"Did everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"fix\" }, \"Had some fun\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"breaking\" }, \"Removed everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"balancing\" }, \"Created some bugs to fix later\")\n ])\n], -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Changelog.vue?vue&type=style&index=0&id=5f8298e6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5f8298e6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eb46986\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"info-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"info-modal-title\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_10 = [\"href\"]\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Paper Pilot Community \")\n ])\n], -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Modding Tree \")\n ])\n], -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport type Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport { infoComponents } from \"game/settings\";\nimport { formatTime } from \"util/bignum\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs, unref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n changelog: null\n },\n setup(__props: any, { expose }) {\n\nconst _props = __props as { changelog: typeof Changelog | null }\n\nconst { title, logo, author, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\n\nconst props = toRefs(_props);\n\nconst isOpen = ref(false);\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\n\nconst infoComponent = computed(() => {\n return coerceComponent(jsx(() => <>{infoComponents.map(render)}</>));\n});\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nfunction openChangelog() {\n unref(props.changelog)?.open();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"info-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"h2\", null, _toDisplayString(_unref(title)), 1),\n _createElementVNode(\"h4\", null, [\n _createTextVNode(\" v\" + _toDisplayString(_unref(versionNumber)), 1),\n (_unref(versionTitle))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \": \" + _toDisplayString(_unref(versionTitle)), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n (_unref(author))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"By \" + _toDisplayString(_unref(author)), 1))\n : _createCommentVNode(\"\", true),\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", {\n class: \"link\",\n onClick: openChangelog\n }, \"Changelog\"),\n _hoisted_9,\n _createElementVNode(\"div\", null, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: _unref(discordLink),\n class: \"info-modal-discord-link\"\n }, [\n _hoisted_11,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_10))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_12,\n _hoisted_13,\n _hoisted_14,\n _createElementVNode(\"div\", null, \"Time Played: \" + _toDisplayString(_unref(timePlayed)), 1),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(infoComponent))))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Info.vue?vue&type=style&index=0&id=3eb46986&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eb46986\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, isRef as _isRef, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85d7ae40\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"Options\")\n], -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport rawThemes from \"data/themes\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport settings, { settingFields } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst themes = Object.keys(rawThemes).map(theme => ({\n label: camelToTitle(theme),\n value: theme\n}));\n\nconst settingFieldsComponent = computed(() => {\n return coerceComponent(jsx(() => <>{settingFields.map(render)}</>));\n});\n\nconst { showTPS, theme, unthrottled } = toRefs(settings);\nconst { autosave, offlineProd } = toRefs(player);\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? 0 : null;\n }\n});\n\nconst offlineProdTitle = jsx(() => (\n <span>\n Offline Production<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst autosaveTitle = jsx(() => (\n <span>\n Autosave<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst isPausedTitle = jsx(() => (\n <span>\n Pause game<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createVNode(Select, {\n title: \"Theme\",\n options: _unref(themes),\n modelValue: _unref(theme),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(theme) ? (theme).value = $event : null))\n }, null, 8, [\"options\", \"modelValue\"]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(settingFieldsComponent)))),\n _createVNode(Toggle, {\n title: \"Show TPS\",\n modelValue: _unref(showTPS),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(showTPS) ? (showTPS).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _hoisted_2,\n _createVNode(Toggle, {\n title: \"Unthrottled\",\n modelValue: _unref(unthrottled),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(unthrottled) ? (unthrottled).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(offlineProdTitle),\n modelValue: _unref(offlineProd),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_isRef(offlineProd) ? (offlineProd).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(autosaveTitle),\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: _unref(isPausedTitle),\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Options.vue?vue&type=style&index=0&id=85d7ae40&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85d7ae40\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, withModifiers as _withModifiers, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bf59fca4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = [\"onClick\", \"disabled\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"onClick\"]\n\nimport { ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n disabled: { type: Boolean },\n skipConfirm: { type: Boolean }\n },\n emits: [\"click\", \"confirmingChanged\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n (e: \"confirmingChanged\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n disabled?: boolean;\n skipConfirm?: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isConfirming = ref(false);\n\nwatch(isConfirming, isConfirming => {\n emit(\"confirmingChanged\", isConfirming);\n});\n\nfunction click() {\n if (unref(props.skipConfirm)) {\n emit(\"click\");\n return;\n }\n if (isConfirming.value) {\n emit(\"click\");\n }\n isConfirming.value = !isConfirming.value;\n}\n\nfunction cancel() {\n isConfirming.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"container\", { confirming: isConfirming.value }])\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"Are you sure?\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: \"button danger\",\n disabled: __props.disabled\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Yes\"))\n : _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n ], 8, _hoisted_2),\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"button\",\n onClick: _withModifiers(cancel, [\"stop\"])\n }, \"No\", 8, _hoisted_4))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DangerButton.vue?vue&type=style&index=0&id=bf59fca4&scoped=true&lang=css\"\nimport \"./DangerButton.vue?vue&type=style&index=1&id=bf59fca4&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-bf59fca4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bbcedd3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { nextTick, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n left: { type: Boolean }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\n\n\n\nconst activated = ref(false);\nconst activatedTimeout = ref<number | null>(null);\n\nfunction click() {\n emit(\"click\");\n\n // Give feedback to user\n if (activatedTimeout.value) {\n clearTimeout(activatedTimeout.value);\n }\n activated.value = false;\n nextTick(() => {\n activated.value = true;\n activatedTimeout.value = setTimeout(() => (activated.value = false), 500);\n });\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: _normalizeClass([\"feedback\", { activated: activated.value, left: __props.left }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 10, _hoisted_1))\n}\n}\n\n})","import script from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./FeedbackButton.vue?vue&type=style&index=0&id=5bbcedd3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bbcedd3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6a0cf7ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"handle material-icons\" }, \"drag_handle\", -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"actions\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_paste\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_copy\", -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"edit\", -1))\nconst _hoisted_7 = [\n _hoisted_6\n]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"material-icons\",\n style: {\"margin\":\"-2px\"}\n}, \"delete\", -1))\nconst _hoisted_9 = {\n key: 1,\n class: \"actions\"\n}\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"check\", -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"close\", -1))\nconst _hoisted_13 = [\n _hoisted_12\n]\nconst _hoisted_14 = {\n key: 2,\n class: \"details\"\n}\nconst _hoisted_15 = { class: \"save-version\" }\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_17 = { key: 0 }\nconst _hoisted_18 = {\n key: 3,\n class: \"details\"\n}\nconst _hoisted_19 = {\n key: 4,\n class: \"details error\"\n}\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport player from \"game/player\";\nimport { computed, ref, toRefs, watch } from \"vue\";\nimport DangerButton from \"./fields/DangerButton.vue\";\nimport FeedbackButton from \"./fields/FeedbackButton.vue\";\nimport Text from \"./fields/Text.vue\";\nimport { LoadablePlayerData } from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n save: null\n },\n emits: [\"export\", \"open\", \"duplicate\", \"delete\", \"editName\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"export\"): void;\n (e: \"open\"): void;\n (e: \"duplicate\"): void;\n (e: \"delete\"): void;\n (e: \"editName\", name: string): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n save: LoadablePlayerData;\n}\n\n\nconst { save } = toRefs(_props);\n\n\nconst dateFormat = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n});\n\nconst isEditing = ref(false);\nconst isConfirming = ref(false);\nconst newName = ref(\"\");\n\nwatch(isEditing, () => (newName.value = save.value.name || \"\"));\n\nconst isActive = computed(() => save.value && save.value.id === player.id);\nconst currentTime = computed(() =>\n isActive.value ? player.time : (save.value && save.value.time) || 0\n);\n\nfunction changeName() {\n emit(\"editName\", newName.value);\n isEditing.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"save\", { active: _unref(isActive) }])\n }, [\n _hoisted_1,\n (!isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createBlock(FeedbackButton, {\n key: 0,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('export'))),\n class: \"button\",\n left: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('duplicate'))),\n class: \"button\"\n }, _hoisted_5))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 2,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_7))\n : _createCommentVNode(\"\", true),\n _createVNode(DangerButton, {\n disabled: _unref(isActive),\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('delete'))),\n onConfirmingChanged: _cache[4] || (_cache[4] = value => (isConfirming.value = value))\n }, {\n default: _withCtx(() => [\n _hoisted_8\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n _createElementVNode(\"button\", {\n onClick: changeName,\n class: \"button\"\n }, _hoisted_11),\n _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, _hoisted_13)\n ])),\n (_unref(save).error == undefined && !isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"button\", {\n class: \"button open\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emit('open')))\n }, [\n _createElementVNode(\"h3\", null, _toDisplayString(_unref(save).name), 1)\n ]),\n _createElementVNode(\"span\", _hoisted_15, \"v\" + _toDisplayString(_unref(save).modVersion), 1),\n _hoisted_16,\n (_unref(currentTime))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, \"Last played \" + _toDisplayString(_unref(dateFormat).format(_unref(currentTime))), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : (_unref(save).error == undefined && isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _createVNode(Text, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((newName).value = $event)),\n class: \"editname\",\n onSubmit: changeName\n }, null, 8, [\"modelValue\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createTextVNode(\" Error: Failed to load save with id \" + _toDisplayString(_unref(save).id), 1),\n _hoisted_20,\n _createTextVNode(_toDisplayString(_unref(save).error), 1)\n ]))\n ], 2))\n}\n}\n\n})","import script from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Save.vue?vue&type=style&index=0&id=6a0cf7ac&scoped=true&lang=css\"\nimport \"./Save.vue?vue&type=style&index=1&id=6a0cf7ac&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6a0cf7ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7d95f59e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Saves Manager\", -1))\nconst _hoisted_2 = { class: \"modal-footer\" }\nconst _hoisted_3 = { class: \"field\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"field-title\" }, \"Create Save\", -1))\nconst _hoisted_5 = { class: \"field-buttons\" }\nconst _hoisted_6 = { class: \"footer\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\"} }, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport player, { PlayerData } from \"game/player\";\nimport settings from \"game/settings\";\nimport { getUniqueID, loadSave, save, newSave } from \"util/save\";\nimport {\n ComponentPublicInstance,\n computed,\n nextTick,\n ref,\n shallowReactive,\n unref,\n watch\n} from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Text from \"./fields/Text.vue\";\nimport Save from \"./Save.vue\";\nimport Draggable from \"vuedraggable\";\n\nexport type LoadablePlayerData = Omit<Partial<PlayerData>, \"id\"> & { id: string; error?: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\nconst modal = ref<ComponentPublicInstance<typeof Modal> | null>(null);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst importingFailed = ref(false);\nconst saveToImport = ref(\"\");\n\nwatch(saveToImport, save => {\n if (save) {\n nextTick(() => {\n try {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (typeof playerData !== \"object\") {\n importingFailed.value = true;\n return;\n }\n const id = getUniqueID();\n playerData.id = id;\n localStorage.setItem(\n id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n saveToImport.value = \"\";\n importingFailed.value = false;\n\n settings.saves.push(id);\n } catch (e) {\n importingFailed.value = true;\n }\n });\n } else {\n importingFailed.value = false;\n }\n});\n\nlet bankContext = require.context(\"raw-loader!../../saves\", true, /\\.txt$/);\nlet bank = ref(\n bankContext.keys().reduce((acc: Array<{ label: string; value: string }>, curr) => {\n // .slice(2, -4) strips the leading ./ and the trailing .txt\n acc.push({\n label: curr.slice(2, -4),\n value: bankContext(curr).default\n });\n return acc;\n }, [])\n);\n\nconst cachedSaves = shallowReactive<Record<string, LoadablePlayerData | undefined>>({});\nfunction getCachedSave(id: string) {\n if (cachedSaves[id] == null) {\n const save = localStorage.getItem(id);\n if (save == null) {\n cachedSaves[id] = { error: `Save doesn't exist in localStorage`, id };\n } else if (save === \"dW5kZWZpbmVk\") {\n cachedSaves[id] = { error: `Save is undefined`, id };\n } else {\n try {\n cachedSaves[id] = { ...JSON.parse(decodeURIComponent(escape(atob(save)))), id };\n } catch (error) {\n cachedSaves[id] = { error, id };\n console.warn(\n `SavesManager: Failed to load info about save with id ${id}:\\n${error}\\n${save}`\n );\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return cachedSaves[id]!;\n}\n// Wipe cache whenever the modal is opened\nwatch(isOpen, isOpen => {\n if (isOpen) {\n Object.keys(cachedSaves).forEach(key => delete cachedSaves[key]);\n }\n});\n\nconst saves = computed(() =>\n settings.saves.reduce((acc: Record<string, LoadablePlayerData>, curr: string) => {\n acc[curr] = getCachedSave(curr);\n return acc;\n }, {})\n);\n\nfunction exportSave(id: string) {\n let saveToExport;\n if (player.id === id) {\n saveToExport = save();\n } else {\n saveToExport = btoa(unescape(encodeURIComponent(JSON.stringify(saves.value[id]))));\n }\n\n // Put on clipboard. Using the clipboard API asks for permissions and stuff\n const el = document.createElement(\"textarea\");\n el.value = saveToExport;\n document.body.appendChild(el);\n el.select();\n el.setSelectionRange(0, 99999);\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n}\n\nfunction duplicateSave(id: string) {\n if (player.id === id) {\n save();\n }\n\n const playerData = { ...saves.value[id], id: getUniqueID() };\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction deleteSave(id: string) {\n settings.saves = settings.saves.filter((save: string) => save !== id);\n localStorage.removeItem(id);\n cachedSaves[id] = undefined;\n}\n\nfunction openSave(id: string) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n saves.value[player.id]!.time = player.time;\n save();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n loadSave(saves.value[id]!);\n // Delete cached version in case of opening it again\n cachedSaves[id] = undefined;\n}\n\nfunction newFromPreset(preset: string) {\n const playerData = JSON.parse(decodeURIComponent(escape(atob(preset))));\n playerData.id = getUniqueID();\n localStorage.setItem(\n playerData.id,\n btoa(unescape(encodeURIComponent(JSON.stringify(playerData))))\n );\n\n settings.saves.push(playerData.id);\n}\n\nfunction editSave(id: string, newName: string) {\n const currSave = saves.value[id];\n if (currSave) {\n currSave.name = newName;\n if (player.id === id) {\n player.name = newName;\n save();\n } else {\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(JSON.stringify(currSave)))));\n cachedSaves[id] = undefined;\n }\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((isOpen).value = $event)),\n ref_key: \"modal\",\n ref: modal\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createBlock(_unref(Draggable), {\n key: 0,\n list: _unref(settings).saves,\n handle: \".handle\",\n itemKey: (save) => save\n }, {\n item: _withCtx(({ element }) => [\n _createVNode(Save, {\n save: _unref(saves)[element],\n onOpen: ($event: any) => (openSave(element)),\n onExport: ($event: any) => (exportSave(element)),\n onEditName: name => editSave(element, name),\n onDuplicate: ($event: any) => (duplicateSave(element)),\n onDelete: ($event: any) => (deleteSave(element))\n }, null, 8, [\"save\", \"onOpen\", \"onExport\", \"onEditName\", \"onDuplicate\", \"onDelete\"])\n ]),\n _: 1\n }, 8, [\"list\", \"itemKey\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Text, {\n modelValue: saveToImport.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((saveToImport).value = $event)),\n title: \"Import Save\",\n placeholder: \"Paste your save here!\",\n class: _normalizeClass({ importingFailed: importingFailed.value })\n }, null, 8, [\"modelValue\", \"class\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"button\", {\n class: \"button\",\n onClick: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_unref(newSave) && _unref(newSave)(...args)))\n }, \"New Game\"),\n (Object.keys(_unref(bank)).length > 0)\n ? (_openBlock(), _createBlock(Select, {\n key: 0,\n options: _unref(bank),\n modelValue: undefined,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = preset => newFromPreset(preset as string)),\n closeOnSelect: \"\",\n placeholder: \"Select preset\",\n class: \"presets\"\n }, null, 8, [\"options\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (isOpen.value = false))\n }, \" Close \")\n ])\n ])\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SavesManager.vue?vue&type=style&index=0&id=7d95f59e&scoped=true&lang=css\"\nimport \"./SavesManager.vue?vue&type=style&index=1&id=7d95f59e&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7d95f59e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71847eca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"alt\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"title\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\",\"cursor\":\"unset\"} }, null, -1))\nconst _hoisted_4 = { class: \"discord\" }\nconst _hoisted_5 = { class: \"discord-links\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = [\"href\"]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\nconst _hoisted_10 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_18 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_20 = { class: \"discord\" }\nconst _hoisted_21 = { class: \"discord-links\" }\nconst _hoisted_22 = { key: 0 }\nconst _hoisted_23 = [\"href\"]\nconst _hoisted_24 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\n\nimport Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { ComponentPublicInstance, ref } from \"vue\";\nimport Info from \"./Info.vue\";\nimport Options from \"./Options.vue\";\nimport SavesManager from \"./SavesManager.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { TooltipDirection } from \"features/tooltips/tooltip\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst info = ref<ComponentPublicInstance<typeof Info> | null>(null);\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\nconst options = ref<ComponentPublicInstance<typeof Options> | null>(null);\n// For some reason Info won't accept the changelog unless I do this:\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst changelog = ref<ComponentPublicInstance<any> | null>(null);\n\nconst { useHeader, banner, title, discordName, discordLink, versionNumber } = projInfo;\n\nfunction openDiscord() {\n window.open(discordLink, \"mywindow\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(useHeader))\n ? (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 0,\n class: \"nav\"\n }, _ctx.$attrs), [\n (_unref(banner))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: _unref(banner),\n class: \"banner\",\n alt: _unref(title)\n }, null, 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _toDisplayString(_unref(title)), 1)),\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_5, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_6, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_7)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_8,\n _hoisted_9\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_10, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).DOWN,\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).DOWN,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).DOWN,\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ], 16))\n : (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 1,\n class: \"overlay-nav\"\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(TooltipDirection).RIGHT\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(TooltipDirection).RIGHT,\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_21, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_22, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_23)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_24,\n _hoisted_25\n ])\n ])\n ], 16)),\n _createVNode(Info, {\n ref_key: \"info\",\n ref: info,\n changelog: changelog.value\n }, null, 8, [\"changelog\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512),\n _createVNode(Options, {\n ref_key: \"options\",\n ref: options\n }, null, 512),\n _createVNode(Changelog, {\n ref_key: \"changelog\",\n ref: changelog\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Nav.vue?vue&type=style&index=0&id=71847eca&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-71847eca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4fd7697b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"inner-tab\" }\nconst _hoisted_2 = {\n key: 1,\n class: \"separator\"\n}\n\nimport projInfo from \"data/projInfo.json\";\nimport { GenericLayer, layers } from \"game/layers\";\nimport player from \"game/player\";\nimport { computed, toRef } from \"vue\";\nimport Layer from \"./Layer.vue\";\nimport Nav from \"./Nav.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tabs = toRef(player, \"tabs\");\nconst layerKeys = computed(() => Object.keys(layers));\nconst useHeader = projInfo.useHeader;\n\nfunction gatherLayerProps(layer: GenericLayer) {\n const { display, minimized, minWidth, name, color, style, classes, minimizable, nodes } = layer;\n return { display, minimized, minWidth, name, color, style, classes, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs-container\", { useHeader: _unref(useHeader) }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(tabs), (tab, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: index,\n class: \"tab\",\n ref_for: true,\n ref: `tab-${index}`\n }, [\n (index === 0 && !_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(layerKeys).includes(tab))\n ? (_openBlock(), _createBlock(Layer, _mergeProps({ key: 0 }, gatherLayerProps(_unref(layers)[tab]!), {\n index: index,\n tab: () => ((_ctx.$refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])\n }), null, 16, [\"index\", \"tab\"]))\n : (_openBlock(), _createBlock(_resolveDynamicComponent(tab), {\n key: 1,\n index: index\n }, null, 8, [\"index\"]))\n ]),\n (index !== _unref(tabs).length - 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ], 2))\n}\n}\n\n})","import script from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Game.vue?vue&type=style&index=0&id=4fd7697b&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=4fd7697b&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4fd7697b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-06188cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"game-over-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"game-over-modal-title\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Congratulations!\", -1))\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Please check the Discord to discuss the game or to check for new content updates! \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = [\"href\"]\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons game-over-modal-discord\" }, \"discord\", -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { hasWon } from \"data/projEntry\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport { formatTime } from \"util/bignum\";\nimport { loadSave, newSave } from \"util/save\";\nimport { computed, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { title, logo, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\nconst isOpen = computed(() => hasWon.value && !player.keepGoing);\nconst autosave = toRef(player, \"autosave\");\n\nfunction keepGoing() {\n player.keepGoing = true;\n}\n\nfunction playAgain() {\n loadSave(newSave());\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, { \"model-value\": _unref(isOpen) }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"game-over-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"h4\", null, \"You've beaten \" + _toDisplayString(_unref(title)) + \" v\" + _toDisplayString(_unref(versionNumber)) + \": \" + _toDisplayString(_unref(versionTitle)), 1)\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", null, \"It took you \" + _toDisplayString(_unref(timePlayed)) + \" to beat the game.\", 1),\n _hoisted_6,\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"game-over-modal-discord-link\"\n }, [\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_9)\n ]),\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", { class: \"game-over-footer\" }, [\n _createElementVNode(\"button\", {\n onClick: keepGoing,\n class: \"button\"\n }, \"Keep Going\"),\n _createElementVNode(\"button\", {\n onClick: playAgain,\n class: \"button danger\"\n }, \"Play Again\")\n ])\n ]),\n _: 1\n }, 8, [\"model-value\"]))\n}\n}\n\n})","import script from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GameOverScreen.vue?vue&type=style&index=0&id=06188cc8&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-06188cc8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, createBlock as _createBlock, mergeProps as _mergeProps, withCtx as _withCtx, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5935214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"nan-modal-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"NaN value detected!\")\n], -1))\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_4 = [\"href\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons nan-modal-discord\" }, \"discord\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = { class: \"nan-footer\" }\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { ComponentPublicInstance, computed, ref, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport SavesManager from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { discordName, discordLink } = projInfo;\nconst autosave = toRef(player, \"autosave\");\nconst hasNaN = toRef(state, \"hasNaN\");\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\n\nconst path = computed(() => state.NaNPath?.join(\".\"));\nconst property = computed(() => state.NaNPath?.slice(-1)[0]);\nconst previous = computed<DecimalSource | null>(() => {\n if (state.NaNReceiver && property.value) {\n return state.NaNReceiver[property.value] as DecimalSource;\n }\n return null;\n});\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? null : 0;\n }\n});\n\nfunction setZero() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(0);\n state.hasNaN = false;\n }\n}\n\nfunction setOne() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(1);\n state.hasNaN = false;\n }\n}\n\nfunction ignore() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(NaN);\n state.hasNaN = false;\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(Modal, _mergeProps({\n modelValue: _unref(hasNaN),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(hasNaN) ? (hasNaN).value = $event : null))\n }, _ctx.$attrs), {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createElementVNode(\"div\", null, [\n _createTextVNode(\" Attempted to assign \\\"\" + _toDisplayString(_unref(path)) + \"\\\" to NaN\", 1),\n (_unref(previous))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(\" \") + \"(previously \" + _toDisplayString(_unref(format)(_unref(previous))) + \")\", 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\". Auto-saving has been \" + _toDisplayString(_unref(autosave) ? \"enabled\" : \"disabled\") + \". Check the console for more details, and consider sharing it with the developers on discord. \", 1)\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"nan-modal-discord-link\"\n }, [\n _hoisted_5,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_4)\n ]),\n _hoisted_6,\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: \"Pause game\",\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open())),\n class: \"button\"\n }, \"Open Saves Manager\"),\n _createElementVNode(\"button\", {\n onClick: setZero,\n class: \"button\"\n }, \"Set to 0\"),\n _createElementVNode(\"button\", {\n onClick: setOne,\n class: \"button\"\n }, \"Set to 1\"),\n (_unref(previous) && _unref(Decimal).neq(_unref(previous), 0) && _unref(Decimal).neq(_unref(previous), 1))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (hasNaN.value = false)),\n class: \"button\"\n }, \" Set to previous \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: ignore,\n class: \"button danger\"\n }, \"Ignore\")\n ])\n ]),\n _: 1\n }, 16, [\"modelValue\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./NaNScreen.vue?vue&type=style&index=0&id=5935214c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5935214c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c0663118\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"tpsDisplay\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"low\"\n}\n\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { computed, ref, watchEffect } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tps = computed(() =>\n Decimal.div(\n state.lastTenTicks.length,\n state.lastTenTicks.reduce((acc, curr) => acc + curr, 0)\n )\n);\n\nconst lastTenFPS = ref<number[]>([]);\nwatchEffect(() => {\n lastTenFPS.value.push(Math.round(tps.value.toNumber()));\n if (lastTenFPS.value.length > 10) {\n lastTenFPS.value = lastTenFPS.value.slice(1);\n }\n});\n\nconst low = computed(() =>\n lastTenFPS.value.reduce<DecimalSource>((acc, curr) => Decimal.max(acc, curr), 0)\n);\n\nconst showLow = computed(() => Decimal.sub(tps.value, low.value).gt(1));\n\nreturn (_ctx: any,_cache: any) => {\n return (!_unref(tps).isNan())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createTextVNode(\" TPS: \" + _toDisplayString(_unref(formatWhole)(_unref(tps))) + \" \", 1),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_unref(showLow))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(_unref(formatWhole)(_unref(low))), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./TPS.vue?vue&type=style&index=0&id=c0663118&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c0663118\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { jsx } from \"features/feature\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, toRef, unref } from \"vue\";\nimport Game from \"./components/Game.vue\";\nimport GameOverScreen from \"./components/GameOverScreen.vue\";\nimport NaNScreen from \"./components/NaNScreen.vue\";\nimport Nav from \"./components/Nav.vue\";\nimport TPS from \"./components/TPS.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport themes from \"./data/themes\";\nimport settings, { gameComponents } from \"./game/settings\";\nimport \"./main.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst useHeader = projInfo.useHeader;\nconst theme = computed(() => themes[settings.theme].variables);\nconst showTPS = toRef(settings, \"showTPS\");\n\nconst gameComponent = computed(() => {\n return coerceComponent(jsx(() => <>{gameComponents.map(render)}</>));\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n id: \"modal-root\",\n style: _normalizeStyle(_unref(theme))\n }, null, 4),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"app\", { useHeader: _unref(useHeader) }]),\n style: _normalizeStyle(_unref(theme))\n }, [\n (_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(Game),\n (unref(_unref(showTPS)))\n ? (_openBlock(), _createBlock(TPS, { key: 1 }))\n : _createCommentVNode(\"\", true),\n _createVNode(GameOverScreen),\n _createVNode(NaNScreen),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(gameComponent))))\n ], 6)\n ], 64))\n}\n}\n\n})","import script from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./App.vue?vue&type=style&index=0&id=f13f28b6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f13f28b6\"]])\n\nexport default __exports__","import { App as VueApp, createApp } from \"vue\";\nimport App from \"./App.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport { GenericLayer } from \"./game/layers\";\nimport { PlayerData } from \"./game/player\";\nimport { Settings } from \"./game/settings\";\nimport { Transient } from \"./game/state\";\nimport Decimal, { DecimalSource } from \"./util/bignum\";\nimport { load } from \"./util/save\";\n\ndocument.title = projInfo.title;\nif (projInfo.id === \"\") {\n throw \"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json\";\n}\n\ndeclare global {\n interface Window {\n vue: VueApp;\n save: VoidFunction;\n hardReset: VoidFunction;\n hardResetSettings: VoidFunction;\n layers: Record<string, Readonly<GenericLayer> | undefined>;\n player: PlayerData;\n state: Transient;\n settings: Settings;\n Decimal: typeof Decimal;\n exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;\n commaFormat: (num: DecimalSource, precision: number) => string;\n regularFormat: (num: DecimalSource, precision: number) => string;\n format: (num: DecimalSource, precision?: number, small?: boolean) => string;\n formatWhole: (num: DecimalSource) => string;\n formatTime: (s: number) => string;\n toPlaces: (x: DecimalSource, precision: number, maxAccepted: DecimalSource) => string;\n formatSmall: (x: DecimalSource, precision?: number) => string;\n invertOOM: (x: DecimalSource) => Decimal;\n projInfo: typeof projInfo;\n }\n}\n\nrequestAnimationFrame(async () => {\n console.log(\n \"%cMade in Profectus%c\\nLearn more at www.moddingtree.com\",\n \"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;\",\n \"padding: 4px;\"\n );\n await load();\n const { globalBus, startGameLoop } = await require(\"./game/events\");\n\n // Create Vue\n const vue = (window.vue = createApp(App));\n globalBus.emit(\"setupVue\", vue);\n vue.mount(\"#app\");\n\n startGameLoop();\n});\n\nwindow.projInfo = projInfo;\n","/* eslint-disable @typescript-eslint/no-this-alias */\nexport type CompareResult = -1 | 0 | 1;\n\nconst MAX_SIGNIFICANT_DIGITS = 17; //Maximum number of digits of precision to assume in Number\n\nconst EXP_LIMIT = 9e15; //If we're ABOVE this value, increase a layer. (9e15 is close to the largest integer that can fit in a Number.)\n\nconst LAYER_DOWN: number = Math.log10(9e15);\n\nconst FIRST_NEG_LAYER = 1 / 9e15; //At layer 0, smaller non-zero numbers than this become layer 1 numbers with negative mag. After that the pattern continues as normal.\n\nconst NUMBER_EXP_MAX = 308; //The largest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst NUMBER_EXP_MIN = -324; //The smallest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst MAX_ES_IN_A_ROW = 5; //For default toString behaviour, when to swap from eee... to (e^n) syntax.\n\nconst IGNORE_COMMAS = true;\nconst COMMAS_ARE_DECIMAL_POINTS = false;\n\nconst powerOf10 = (function() {\n // We need this lookup table because Math.pow(10, exponent)\n // when exponent's absolute value is large is slightly inaccurate.\n // You can fix it with the power of math... or just make a lookup table.\n // Faster AND simpler\n const powersOf10: number[] = [];\n\n for (let i = NUMBER_EXP_MIN + 1; i <= NUMBER_EXP_MAX; i++) {\n powersOf10.push(Number(\"1e\" + i));\n }\n\n const indexOf0InPowersOf10 = 323;\n return function(power: number) {\n return powersOf10[power + indexOf0InPowersOf10];\n };\n})();\n\n//tetration/slog to real height stuff\n//background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\nconst critical_headers = [2, Math.E, 3, 4, 5, 6, 7, 8, 9, 10];\nconst critical_tetr_values = [\n [\n // Base 2\n 1,\n 1.0891168053867777,\n 1.1789745164521264,\n 1.2701428397304229,\n 1.3632066654400328,\n 1.4587804913784246,\n 1.557523817412741,\n 1.660158301473385,\n 1.767487542936873,\n 1.8804205225512542,\n 2\n ],\n [\n // Base E\n 1, //0.0\n 1.1121114330934, //0.1\n 1.23103892493161, //0.2\n 1.35838369631113, //0.3\n 1.49605193039935, //0.4\n 1.64635423375119, //0.5\n 1.81213853570186, //0.6\n 1.99697132461829, //0.7\n 2.20538955455724, //0.8\n 2.44325744833852, //0.9\n Math.E //1.0\n ],\n [\n // Base 3\n 1,\n 1.1187738849693603,\n 1.2464963939368214,\n 1.38527004705667,\n 1.5376664685821402,\n 1.7068895236551784,\n 1.897001227148399,\n 2.1132403089001035,\n 2.362480153784171,\n 2.6539010333870774,\n 3\n ],\n [\n // Base 4\n 1,\n 1.1367350847096405,\n 1.2889510672956703,\n 1.4606478703324786,\n 1.6570295196661111,\n 1.8850062585672889,\n 2.1539465047453485,\n 2.476829779693097,\n 2.872061932789197,\n 3.3664204535587183,\n 4\n ],\n [\n // Base 5\n 1,\n 1.1494592900767588,\n 1.319708228183931,\n 1.5166291280087583,\n 1.748171114438024,\n 2.0253263297298045,\n 2.3636668498288547,\n 2.7858359149579424,\n 3.3257226212448145,\n 4.035730287722532,\n 5\n ],\n [\n // Base 6\n 1,\n 1.159225940787673,\n 1.343712473580932,\n 1.5611293155111927,\n 1.8221199554561318,\n 2.14183924486326,\n 2.542468319282638,\n 3.0574682501653316,\n 3.7390572020926873,\n 4.6719550537360774,\n 6\n ],\n [\n // Base 7\n 1,\n 1.1670905356972596,\n 1.3632807444991446,\n 1.5979222279405536,\n 1.8842640123816674,\n 2.2416069644878687,\n 2.69893426559423,\n 3.3012632110403577,\n 4.121250340630164,\n 5.281493033448316,\n 7\n ],\n [\n // Base 8\n 1,\n 1.1736630594087796,\n 1.379783782386201,\n 1.6292821855668218,\n 1.9378971836180754,\n 2.3289975651071977,\n 2.8384347394720835,\n 3.5232708454565906,\n 4.478242031114584,\n 5.868592169644505,\n 8\n ],\n [\n // Base 9\n 1,\n 1.1793017514670474,\n 1.394054150657457,\n 1.65664127441059,\n 1.985170999970283,\n 2.4069682290577457,\n 2.9647310119960752,\n 3.7278665320924946,\n 4.814462547283592,\n 6.436522247411611,\n 9\n ],\n [\n // Base 10\n 1,\n 1.18422737399915,\n 1.4066113788546144,\n 1.680911177655277,\n 2.027492094355525,\n 2.4775152854601967,\n 3.080455730250329,\n 3.918234505962507,\n 5.1332705696484595,\n 6.9878696918072905,\n 10\n ]\n];\nconst critical_slog_values = [\n [\n // Base 2\n -1,\n -0.9194161097107025,\n -0.8335625019330468,\n -0.7425599821143978,\n -0.6466611521029437,\n -0.5462617907227869,\n -0.4419033816638769,\n -0.3342645487554494,\n -0.224140440909962,\n -0.11241087890006762,\n 0\n ],\n [\n // Base E\n -1, //0.0\n -0.90603157029014, //0.1\n -0.80786507256596, //0.2\n -0.7064666939634, //0.3\n -0.60294836853664, //0.4\n -0.49849837513117, //0.5\n -0.39430303318768, //0.6\n -0.29147201034755, //0.7\n -0.19097820800866, //0.8\n -0.09361896280296, //0.9\n 0 //1.0\n ],\n [\n // Base 3\n -1,\n -0.9021579584316141,\n -0.8005762598234203,\n -0.6964780623319391,\n -0.5911906810998454,\n -0.486050182576545,\n -0.3823089430815083,\n -0.28106046722897615,\n -0.1831906535795894,\n -0.08935809204418144,\n 0\n ],\n [\n // Base 4\n -1,\n -0.8917227442365535,\n -0.781258746326964,\n -0.6705130326902455,\n -0.5612813129406509,\n -0.4551067709033134,\n -0.35319256652135966,\n -0.2563741554088552,\n -0.1651412821106526,\n -0.0796919581982668,\n 0\n ],\n [\n // Base 5\n -1,\n -0.8843387974366064,\n -0.7678744063886243,\n -0.6529563724510552,\n -0.5415870994657841,\n -0.4352842206588936,\n -0.33504449124791424,\n -0.24138853420685147,\n -0.15445285440944467,\n -0.07409659641336663,\n 0\n ],\n [\n // Base 6\n -1,\n -0.8786709358426346,\n -0.7577735191184886,\n -0.6399546189952064,\n -0.527284921869926,\n -0.4211627631006314,\n -0.3223479611761232,\n -0.23107655627789858,\n -0.1472057700818259,\n -0.07035171210706326,\n 0\n ],\n [\n // Base 7\n -1,\n -0.8740862815291583,\n -0.7497032990976209,\n -0.6297119746181752,\n -0.5161838335958787,\n -0.41036238255751956,\n -0.31277212146489963,\n -0.2233976621705518,\n -0.1418697367979619,\n -0.06762117662323441,\n 0\n ],\n [\n // Base 8\n -1,\n -0.8702632331800649,\n -0.7430366914122081,\n -0.6213373075161548,\n -0.5072025698095242,\n -0.40171437727184167,\n -0.30517930701410456,\n -0.21736343968190863,\n -0.137710238299109,\n -0.06550774483471955,\n 0\n ],\n [\n // Base 9\n -1,\n -0.8670016295947213,\n -0.7373984232432306,\n -0.6143173985094293,\n -0.49973884395492807,\n -0.394584953527678,\n -0.2989649949848695,\n -0.21245647317021688,\n -0.13434688362382652,\n -0.0638072667348083,\n 0\n ],\n [\n // Base 10\n -1,\n -0.8641642839543857,\n -0.732534623168535,\n -0.6083127477059322,\n -0.4934049257184696,\n -0.3885773075899922,\n -0.29376029055315767,\n -0.2083678561173622,\n -0.13155653399373268,\n -0.062401588652553186,\n 0\n ]\n];\n\nconst D = function D(value: DecimalSource): Decimal {\n return Decimal.fromValue_noAlloc(value);\n};\n\nconst FC = function(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents(sign, layer, mag);\n};\n\nconst FC_NN = function FC_NN(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents_noNormalize(sign, layer, mag);\n};\n\nconst ME = function ME(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent(mantissa, exponent);\n};\n\nconst ME_NN = function ME_NN(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent_noNormalize(mantissa, exponent);\n};\n\nconst decimalPlaces = function decimalPlaces(value: number, places: number): number {\n const len = places + 1;\n const numDigits = Math.ceil(Math.log10(Math.abs(value)));\n const rounded =\n Math.round(value * Math.pow(10, len - numDigits)) * Math.pow(10, numDigits - len);\n return parseFloat(rounded.toFixed(Math.max(len - numDigits, 0)));\n};\n\nconst f_maglog10 = function(n: number) {\n return Math.sign(n) * Math.log10(Math.abs(n));\n};\n\n//from HyperCalc source code\nconst f_gamma = function(n: number) {\n if (!isFinite(n)) {\n return n;\n }\n if (n < -50) {\n if (n === Math.trunc(n)) {\n return Number.NEGATIVE_INFINITY;\n }\n return 0;\n }\n\n let scal1 = 1;\n while (n < 10) {\n scal1 = scal1 * n;\n ++n;\n }\n\n n -= 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (n + 0.5) * Math.log(n);\n l = l - n;\n const n2 = n * n;\n let np = n;\n l = l + 1 / (12 * np);\n np = np * n2;\n l = l + 1 / (360 * np);\n np = np * n2;\n l = l + 1 / (1260 * np);\n np = np * n2;\n l = l + 1 / (1680 * np);\n np = np * n2;\n l = l + 1 / (1188 * np);\n np = np * n2;\n l = l + 691 / (360360 * np);\n np = np * n2;\n l = l + 7 / (1092 * np);\n np = np * n2;\n l = l + 3617 / (122400 * np);\n\n return Math.exp(l) / scal1;\n};\n\nconst _twopi = 6.2831853071795864769252842; // 2*pi\nconst _EXPN1 = 0.36787944117144232159553; // exp(-1)\nconst OMEGA = 0.56714329040978387299997; // W(1, 0)\n//from https://math.stackexchange.com/a/465183\n// The evaluation can become inaccurate very close to the branch point\nconst f_lambertw = function(z: number, tol = 1e-10): number {\n let w;\n let wn;\n\n if (!Number.isFinite(z)) {\n return z;\n }\n if (z === 0) {\n return z;\n }\n if (z === 1) {\n return OMEGA;\n }\n\n if (z < 10) {\n w = 0;\n } else {\n w = Math.log(z) - Math.log(Math.log(z));\n }\n\n for (let i = 0; i < 100; ++i) {\n wn = (z * Math.exp(-w) + w * w) / (w + 1);\n if (Math.abs(wn - w) < tol * Math.abs(wn)) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Number.NaN;\n};\n\n//from https://github.com/scipy/scipy/blob/8dba340293fe20e62e173bdf2c10ae208286692f/scipy/special/lambertw.pxd\n// The evaluation can become inaccurate very close to the branch point\n// at ``-1/e``. In some corner cases, `lambertw` might currently\n// fail to converge, or can end up on the wrong branch.\nfunction d_lambertw(z: Decimal, tol = 1e-10): Decimal {\n let w;\n let ew, wew, wewz, wn;\n\n if (!Number.isFinite(z.mag)) {\n return z;\n }\n if (z === Decimal.dZero) {\n return z;\n }\n if (z === Decimal.dOne) {\n //Split out this case because the asymptotic series blows up\n return D(OMEGA);\n }\n\n const absz = Decimal.abs(z);\n //Get an initial guess for Halley's method\n w = Decimal.ln(z);\n\n //Halley's method; see 5.9 in [1]\n\n for (let i = 0; i < 100; ++i) {\n ew = Decimal.exp(-w);\n wewz = w.sub(z.mul(ew));\n wn = w.sub(\n wewz.div(\n w.add(1).sub(\n w\n .add(2)\n .mul(wewz)\n .div(Decimal.mul(2, w).add(2))\n )\n )\n );\n if (Decimal.abs(wn.sub(w)).lt(Decimal.abs(wn).mul(tol))) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Decimal.dNaN;\n}\n\nexport type DecimalSource = Decimal | number | string;\n\n/**\n * The Decimal's value is simply mantissa * 10^exponent.\n */\nexport default class Decimal {\n public static readonly dZero = FC_NN(0, 0, 0);\n public static readonly dOne = FC_NN(1, 0, 1);\n public static readonly dNegOne = FC_NN(-1, 0, 1);\n public static readonly dTwo = FC_NN(1, 0, 2);\n public static readonly dTen = FC_NN(1, 0, 10);\n public static readonly dNaN = FC_NN(Number.NaN, Number.NaN, Number.NaN);\n public static readonly dInf = FC_NN(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n public static readonly dNegInf = FC_NN(-1, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n public static readonly dNumberMax = FC(1, 0, Number.MAX_VALUE);\n public static readonly dNumberMin = FC(1, 0, Number.MIN_VALUE);\n\n public sign: number = Number.NaN;\n public mag: number = Number.NaN;\n public layer: number = Number.NaN;\n\n constructor(value?: DecimalSource) {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n this.fromDecimal(value);\n } else if (typeof value === \"number\") {\n this.fromNumber(value);\n } else if (typeof value === \"string\") {\n this.fromString(value);\n } else {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n }\n }\n\n get m(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n const exp = Math.floor(Math.log10(this.mag));\n //handle special case 5e-324\n let man;\n if (this.mag === 5e-324) {\n man = 5;\n } else {\n man = this.mag / powerOf10(exp);\n }\n return this.sign * man;\n } else if (this.layer === 1) {\n const residue = this.mag - Math.floor(this.mag);\n return this.sign * Math.pow(10, residue);\n } else {\n //mantissa stops being relevant past 1e9e15 / ee15.954\n return this.sign;\n }\n }\n\n set m(value: number) {\n if (this.layer <= 2) {\n this.fromMantissaExponent(value, this.e);\n } else {\n //don't even pretend mantissa is meaningful\n this.sign = Math.sign(value);\n if (this.sign === 0) {\n this.layer === 0;\n this.exponent === 0;\n }\n }\n }\n\n get e(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n return Math.floor(Math.log10(this.mag));\n } else if (this.layer === 1) {\n return Math.floor(this.mag);\n } else if (this.layer === 2) {\n return Math.floor(Math.sign(this.mag) * Math.pow(10, Math.abs(this.mag)));\n } else {\n return this.mag * Number.POSITIVE_INFINITY;\n }\n }\n set e(value: number) {\n this.fromMantissaExponent(this.m, value);\n }\n\n get s(): number {\n return this.sign;\n }\n set s(value: number) {\n if (value === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n } else {\n this.sign = value;\n }\n }\n\n // Object.defineProperty(Decimal.prototype, \"mantissa\", {\n get mantissa(): number {\n return this.m;\n }\n\n set mantissa(value: number) {\n this.m = value;\n }\n\n get exponent(): number {\n return this.e;\n }\n set exponent(value: number) {\n this.e = value;\n }\n\n public static fromComponents(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents(sign, layer, mag);\n }\n\n public static fromComponents_noNormalize(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents_noNormalize(sign, layer, mag);\n }\n\n public static fromMantissaExponent(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent(mantissa, exponent);\n }\n\n public static fromMantissaExponent_noNormalize(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent_noNormalize(mantissa, exponent);\n }\n\n public static fromDecimal(value: Decimal): Decimal {\n return new Decimal().fromDecimal(value);\n }\n\n public static fromNumber(value: number): Decimal {\n return new Decimal().fromNumber(value);\n }\n\n public static fromString(value: string): Decimal {\n return new Decimal().fromString(value);\n }\n\n public static fromValue(value: DecimalSource): Decimal {\n return new Decimal().fromValue(value);\n }\n\n public static fromValue_noAlloc(value: DecimalSource): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n }\n\n public static abs(value: DecimalSource): Decimal {\n return D(value).abs();\n }\n\n public static neg(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negate(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negated(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static sign(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static sgn(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static round(value: DecimalSource): Decimal {\n return D(value).round();\n }\n\n public static floor(value: DecimalSource): Decimal {\n return D(value).floor();\n }\n\n public static ceil(value: DecimalSource): Decimal {\n return D(value).ceil();\n }\n\n public static trunc(value: DecimalSource): Decimal {\n return D(value).trunc();\n }\n\n public static add(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static plus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static sub(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static subtract(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static minus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static mul(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static multiply(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static times(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static div(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static divide(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static recip(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocal(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocate(value: DecimalSource): Decimal {\n return D(value).reciprocate();\n }\n\n public static cmp(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static cmpabs(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmpabs(other);\n }\n\n public static compare(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static isNaN(value: DecimalSource): boolean {\n value = D(value);\n return isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag);\n }\n\n public static isFinite(value: DecimalSource): boolean {\n value = D(value);\n return isFinite(value.sign) && isFinite(value.layer) && isFinite(value.mag);\n }\n\n public static eq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static equals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static neq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).neq(other);\n }\n\n public static notEquals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).notEquals(other);\n }\n\n public static lt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lt(other);\n }\n\n public static lte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lte(other);\n }\n\n public static gt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gt(other);\n }\n\n public static gte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gte(other);\n }\n\n public static max(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).max(other);\n }\n\n public static min(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).min(other);\n }\n\n public static minabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).minabs(other);\n }\n\n public static maxabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).maxabs(other);\n }\n\n public static clamp(value: DecimalSource, min: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clamp(min, max);\n }\n\n public static clampMin(value: DecimalSource, min: DecimalSource): Decimal {\n return D(value).clampMin(min);\n }\n\n public static clampMax(value: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clampMax(max);\n }\n\n public static cmp_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static compare_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static eq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static equals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static neq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).neq_tolerance(other, tolerance);\n }\n\n public static notEquals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).notEquals_tolerance(other, tolerance);\n }\n\n public static lt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lt_tolerance(other, tolerance);\n }\n\n public static lte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lte_tolerance(other, tolerance);\n }\n\n public static gt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gt_tolerance(other, tolerance);\n }\n\n public static gte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gte_tolerance(other, tolerance);\n }\n\n public static pLog10(value: DecimalSource): Decimal {\n return D(value).pLog10();\n }\n\n public static absLog10(value: DecimalSource): Decimal {\n return D(value).absLog10();\n }\n\n public static log10(value: DecimalSource): Decimal {\n return D(value).log10();\n }\n\n public static log(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).log(base);\n }\n\n public static log2(value: DecimalSource): Decimal {\n return D(value).log2();\n }\n\n public static ln(value: DecimalSource): Decimal {\n return D(value).ln();\n }\n\n public static logarithm(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).logarithm(base);\n }\n\n public static pow(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).pow(other);\n }\n\n public static pow10(value: DecimalSource): Decimal {\n return D(value).pow10();\n }\n\n public static root(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).root(other);\n }\n\n public static factorial(value: DecimalSource, _other?: never): Decimal {\n return D(value).factorial();\n }\n\n public static gamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).gamma();\n }\n\n public static lngamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).lngamma();\n }\n\n public static exp(value: DecimalSource): Decimal {\n return D(value).exp();\n }\n\n public static sqr(value: DecimalSource): Decimal {\n return D(value).sqr();\n }\n\n public static sqrt(value: DecimalSource): Decimal {\n return D(value).sqrt();\n }\n\n public static cube(value: DecimalSource): Decimal {\n return D(value).cube();\n }\n\n public static cbrt(value: DecimalSource): Decimal {\n return D(value).cbrt();\n }\n\n public static tetrate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).tetrate(height, payload);\n }\n\n public static iteratedexp(value: DecimalSource, height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return D(value).iteratedexp(height, payload);\n }\n\n public static iteratedlog(value: DecimalSource, base: DecimalSource = 10, times = 1): Decimal {\n return D(value).iteratedlog(base, times);\n }\n\n public static layeradd10(value: DecimalSource, diff: DecimalSource): Decimal {\n return D(value).layeradd10(diff);\n }\n\n public static layeradd(value: DecimalSource, diff: number, base = 10): Decimal {\n return D(value).layeradd(diff, base);\n }\n\n public static slog(value: DecimalSource, base = 10): Decimal {\n return D(value).slog(base);\n }\n\n public static lambertw(value: DecimalSource): Decimal {\n return D(value).lambertw();\n }\n\n public static ssqrt(value: DecimalSource): Decimal {\n return D(value).ssqrt();\n }\n\n public static pentate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).pentate(height, payload);\n }\n\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something\n * with exponentially increasing cost each purchase (start at priceStart,\n * multiply by priceRatio, already own currentOwned), how much of it can you buy?\n * Adapted from Trimps source code.\n */\n\n public static affordGeometricSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordGeometricSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceRatio),\n currentOwned\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it multiplies by priceRatio each purchase?\n */\n\n public static sumGeometricSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumGeometricSeries_core(numItems, D(priceStart), D(priceRatio), currentOwned);\n }\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something with additively\n * increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned),\n * how much of it can you buy?\n */\n\n public static affordArithmeticSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordArithmeticSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it adds priceAdd each purchase?\n * Adapted from http://www.mathwords.com/a/arithmetic_series.htm\n */\n\n public static sumArithmeticSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumArithmeticSeries_core(\n D(numItems),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * When comparing two purchases that cost (resource) and increase your resource/sec by (deltaRpS),\n * the lowest efficiency score is the better one to purchase.\n * From Frozen Cookies:\n * http://cookieclicker.wikia.com/wiki/Frozen_Cookies_(JavaScript_Add-on)#Efficiency.3F_What.27s_that.3F\n */\n\n public static efficiencyOfPurchase(\n cost: DecimalSource,\n currentRpS: DecimalSource,\n deltaRpS: DecimalSource\n ): Decimal {\n return this.efficiencyOfPurchase_core(D(cost), D(currentRpS), D(deltaRpS));\n }\n\n public static randomDecimalForTesting(maxLayers: number): Decimal {\n // NOTE: This doesn't follow any kind of sane random distribution, so use this for testing purposes only.\n //5% of the time, return 0\n if (Math.random() * 20 < 1) {\n return FC_NN(0, 0, 0);\n }\n\n const randomsign = Math.random() > 0.5 ? 1 : -1;\n\n //5% of the time, return 1 or -1\n if (Math.random() * 20 < 1) {\n return FC_NN(randomsign, 0, 1);\n }\n\n //pick a random layer\n const layer = Math.floor(Math.random() * (maxLayers + 1));\n\n let randomexp = layer === 0 ? Math.random() * 616 - 308 : Math.random() * 16;\n //10% of the time, make it a simple power of 10\n if (Math.random() > 0.9) {\n randomexp = Math.trunc(randomexp);\n }\n let randommag = Math.pow(10, randomexp);\n //10% of the time, trunc mag\n if (Math.random() > 0.9) {\n randommag = Math.trunc(randommag);\n }\n return FC(randomsign, layer, randommag);\n }\n\n public static affordGeometricSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n const actualStart = priceStart.mul(priceRatio.pow(currentOwned));\n return Decimal.floor(\n resourcesAvailable\n .div(actualStart)\n .mul(priceRatio.sub(1))\n .add(1)\n .log10()\n .div(priceRatio.log10())\n );\n }\n\n public static sumGeometricSeries_core(\n numItems: DecimalSource,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n return priceStart\n .mul(priceRatio.pow(currentOwned))\n .mul(Decimal.sub(1, priceRatio.pow(numItems)))\n .div(Decimal.sub(1, priceRatio));\n }\n\n public static affordArithmeticSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n // n = (-(a-d/2) + sqrt((a-d/2)^2+2dS))/d\n // where a is actualStart, d is priceAdd and S is resourcesAvailable\n // then floor it and you're done!\n const actualStart = priceStart.add(currentOwned.mul(priceAdd));\n const b = actualStart.sub(priceAdd.div(2));\n const b2 = b.pow(2);\n return b\n .neg()\n .add(b2.add(priceAdd.mul(resourcesAvailable).mul(2)).sqrt())\n .div(priceAdd)\n .floor();\n }\n\n public static sumArithmeticSeries_core(\n numItems: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n const actualStart = priceStart.add(currentOwned.mul(priceAdd)); // (n/2)*(2*a+(n-1)*d)\n\n return numItems.div(2).mul(actualStart.mul(2).plus(numItems.sub(1).mul(priceAdd)));\n }\n\n public static efficiencyOfPurchase_core(\n cost: Decimal,\n currentRpS: Decimal,\n deltaRpS: Decimal\n ): Decimal {\n return cost.div(currentRpS).add(cost.div(deltaRpS));\n }\n\n public [Symbol.for(\"+\")](other: DecimalSource): DecimalSource {\n return this.add(other);\n }\n\n public [Symbol.for(\"-\")](other: DecimalSource): DecimalSource {\n return this.sub(other);\n }\n\n public [Symbol.for(\"*\")](other: DecimalSource): DecimalSource {\n return this.times(other);\n }\n\n public [Symbol.for(\"/\")](other: DecimalSource): DecimalSource {\n return this.div(other);\n }\n\n public [Symbol.for(\"minus\")](): DecimalSource {\n return this.neg();\n }\n\n public [Symbol.for(\"==\")](other: DecimalSource): boolean {\n return this.eq(other);\n }\n\n public [Symbol.for(\">\")](other: DecimalSource): boolean {\n return this.gt(other);\n }\n\n public [Symbol.for(\"<\")](other: DecimalSource): boolean {\n return this.lt(other);\n }\n\n public [Symbol.for(\">=\")](other: DecimalSource): boolean {\n return this.gte(other);\n }\n\n public [Symbol.for(\"<=\")](other: DecimalSource): boolean {\n return this.lte(other);\n }\n\n public [Symbol.for(\"!=\")](other: DecimalSource): boolean {\n return this.neq(other);\n }\n\n public normalize(): this {\n /*\n PSEUDOCODE:\n Whenever we are partially 0 (sign is 0 or mag and layer is 0), make it fully 0.\n Whenever we are at or hit layer 0, extract sign from negative mag.\n If layer === 0 and mag < FIRST_NEG_LAYER (1/9e15), shift to 'first negative layer' (add layer, log10 mag).\n While abs(mag) > EXP_LIMIT (9e15), layer += 1, mag = maglog10(mag).\n While abs(mag) < LAYER_DOWN (15.954) and layer > 0, layer -= 1, mag = pow(10, mag).\n\n When we're done, all of the following should be true OR one of the numbers is not IsFinite OR layer is not IsInteger (error state):\n Any 0 is totally zero (0, 0, 0).\n Anything layer 0 has mag 0 OR mag > 1/9e15 and < 9e15.\n Anything layer 1 or higher has abs(mag) >= 15.954 and < 9e15.\n We will assume in calculations that all Decimals are either erroneous or satisfy these criteria. (Otherwise: Garbage in, garbage out.)\n */\n if (this.sign === 0 || (this.mag === 0 && this.layer === 0)) {\n this.sign = 0;\n this.mag = 0;\n this.layer = 0;\n return this;\n }\n\n if (this.layer === 0 && this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n }\n\n //Handle shifting from layer 0 to negative layers.\n if (this.layer === 0 && this.mag < FIRST_NEG_LAYER) {\n this.layer += 1;\n this.mag = Math.log10(this.mag);\n return this;\n }\n\n let absmag = Math.abs(this.mag);\n let signmag = Math.sign(this.mag);\n\n if (absmag >= EXP_LIMIT) {\n this.layer += 1;\n this.mag = signmag * Math.log10(absmag);\n return this;\n } else {\n while (absmag < LAYER_DOWN && this.layer > 0) {\n this.layer -= 1;\n if (this.layer === 0) {\n this.mag = Math.pow(10, this.mag);\n } else {\n this.mag = signmag * Math.pow(10, absmag);\n absmag = Math.abs(this.mag);\n signmag = Math.sign(this.mag);\n }\n }\n if (this.layer === 0) {\n if (this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n } else if (this.mag === 0) {\n //excessive rounding can give us all zeroes\n this.sign = 0;\n }\n }\n }\n\n return this;\n }\n\n public fromComponents(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n\n this.normalize();\n return this;\n }\n\n public fromComponents_noNormalize(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n return this;\n }\n\n public fromMantissaExponent(mantissa: number, exponent: number): this {\n this.layer = 1;\n this.sign = Math.sign(mantissa);\n mantissa = Math.abs(mantissa);\n this.mag = exponent + Math.log10(mantissa);\n\n this.normalize();\n return this;\n }\n\n public fromMantissaExponent_noNormalize(mantissa: number, exponent: number): this {\n //The idea of 'normalizing' a break_infinity.js style Decimal doesn't really apply. So just do the same thing.\n this.fromMantissaExponent(mantissa, exponent);\n return this;\n }\n\n public fromDecimal(value: Decimal): this {\n this.sign = value.sign;\n this.layer = value.layer;\n this.mag = value.mag;\n return this;\n }\n\n public fromNumber(value: number): this {\n this.mag = Math.abs(value);\n this.sign = Math.sign(value);\n this.layer = 0;\n this.normalize();\n return this;\n }\n\n public fromString(value: string): Decimal {\n if (IGNORE_COMMAS) {\n value = value.replace(\",\", \"\");\n } else if (COMMAS_ARE_DECIMAL_POINTS) {\n value = value.replace(\",\", \".\");\n }\n\n //Handle x^^^y format.\n const pentationparts = value.split(\"^^^\");\n if (pentationparts.length === 2) {\n const base = parseFloat(pentationparts[0]);\n const height = parseFloat(pentationparts[1]);\n const heightparts = pentationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.pentate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^^y format.\n const tetrationparts = value.split(\"^^\");\n if (tetrationparts.length === 2) {\n const base = parseFloat(tetrationparts[0]);\n const height = parseFloat(tetrationparts[1]);\n const heightparts = tetrationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^y format.\n const powparts = value.split(\"^\");\n if (powparts.length === 2) {\n const base = parseFloat(powparts[0]);\n const exponent = parseFloat(powparts[1]);\n if (isFinite(base) && isFinite(exponent)) {\n const result = Decimal.pow(base, exponent);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle various cases involving it being a Big Number.\n value = value.trim().toLowerCase();\n\n //handle X PT Y format.\n let base;\n let height;\n let ptparts = value.split(\"pt\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //handle XpY format (it's the same thing just with p).\n ptparts = value.split(\"p\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n const parts = value.split(\"e\");\n const ecount = parts.length - 1;\n\n //Handle numbers that are exactly floats (0 or 1 es).\n if (ecount === 0) {\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt)) {\n return this.fromNumber(numberAttempt);\n }\n } else if (ecount === 1) {\n //Very small numbers (\"2e-3000\" and so on) may look like valid floats but round to 0.\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt) && numberAttempt !== 0) {\n return this.fromNumber(numberAttempt);\n }\n }\n\n //Handle new (e^N)X format.\n const newparts = value.split(\"e^\");\n if (newparts.length === 2) {\n this.sign = 1;\n if (newparts[0].charAt(0) == \"-\") {\n this.sign = -1;\n }\n let layerstring = \"\";\n for (let i = 0; i < newparts[1].length; ++i) {\n const chrcode = newparts[1].charCodeAt(i);\n if ((chrcode >= 43 && chrcode <= 57) || chrcode === 101) {\n //is \"0\" to \"9\" or \"+\" or \"-\" or \".\" or \"e\" (or \",\" or \"/\")\n layerstring += newparts[1].charAt(i);\n } //we found the end of the layer count\n else {\n this.layer = parseFloat(layerstring);\n this.mag = parseFloat(newparts[1].substr(i + 1));\n this.normalize();\n return this;\n }\n }\n }\n\n if (ecount < 1) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n const mantissa = parseFloat(parts[0]);\n if (mantissa === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n let exponent = parseFloat(parts[parts.length - 1]);\n //handle numbers like AeBeC and AeeeeBeC\n if (ecount >= 2) {\n const me = parseFloat(parts[parts.length - 2]);\n if (isFinite(me)) {\n exponent *= Math.sign(me);\n exponent += f_maglog10(me);\n }\n }\n\n //Handle numbers written like eee... (N es) X\n if (!isFinite(mantissa)) {\n this.sign = parts[0] === \"-\" ? -1 : 1;\n this.layer = ecount;\n this.mag = exponent;\n }\n //Handle numbers written like XeY\n else if (ecount === 1) {\n this.sign = Math.sign(mantissa);\n this.layer = 1;\n //Example: 2e10 is equal to 10^log10(2e10) which is equal to 10^(10+log10(2))\n this.mag = exponent + Math.log10(Math.abs(mantissa));\n }\n //Handle numbers written like Xeee... (N es) Y\n else {\n this.sign = Math.sign(mantissa);\n this.layer = ecount;\n if (ecount === 2) {\n const result = Decimal.mul(FC(1, 2, exponent), D(mantissa));\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n } else {\n //at eee and above, mantissa is too small to be recognizable!\n this.mag = exponent;\n }\n }\n\n this.normalize();\n return this;\n }\n\n public fromValue(value: DecimalSource): Decimal {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n return this.fromDecimal(value);\n }\n\n if (typeof value === \"number\") {\n return this.fromNumber(value);\n }\n\n if (typeof value === \"string\") {\n return this.fromString(value);\n }\n\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n\n public toNumber(): number {\n if (!Number.isFinite(this.layer)) {\n return Number.NaN;\n }\n if (this.layer === 0) {\n return this.sign * this.mag;\n } else if (this.layer === 1) {\n return this.sign * Math.pow(10, this.mag);\n } //overflow for any normalized Decimal\n else {\n return this.mag > 0\n ? this.sign > 0\n ? Number.POSITIVE_INFINITY\n : Number.NEGATIVE_INFINITY\n : 0;\n }\n }\n\n public mantissaWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.m)) {\n return Number.NaN;\n }\n\n if (this.m === 0) {\n return 0;\n }\n\n return decimalPlaces(this.m, places);\n }\n\n public magnitudeWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.mag)) {\n return Number.NaN;\n }\n\n if (this.mag === 0) {\n return 0;\n }\n\n return decimalPlaces(this.mag, places);\n }\n\n public toString(): string {\n if (isNaN(this.layer) || isNaN(this.sign) || isNaN(this.mag)) {\n return \"NaN\";\n }\n if (this.mag === Number.POSITIVE_INFINITY || this.layer === Number.POSITIVE_INFINITY) {\n return this.sign === 1 ? \"Infinity\" : \"-Infinity\";\n }\n\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toString();\n }\n return this.m + \"e\" + this.e;\n } else if (this.layer === 1) {\n return this.m + \"e\" + this.e;\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (this.sign === -1 ? \"-\" : \"\") + \"e\".repeat(this.layer) + this.mag;\n } else {\n return (this.sign === -1 ? \"-\" : \"\") + \"(e^\" + this.layer + \")\" + this.mag;\n }\n }\n }\n\n public toExponential(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toExponential(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toFixed(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toPrecision(places: number): string {\n if (this.e <= -7) {\n return this.toExponential(places - 1);\n }\n\n if (places > this.e) {\n return this.toFixed(places - this.exponent - 1);\n }\n\n return this.toExponential(places - 1);\n }\n\n public valueOf(): string {\n return this.toString();\n }\n\n public toJSON(): string {\n return this.toString();\n }\n\n public toStringWithDecimalPlaces(places: number): string {\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else if (this.layer === 1) {\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"e\".repeat(this.layer) +\n decimalPlaces(this.mag, places)\n );\n } else {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"(e^\" +\n this.layer +\n \")\" +\n decimalPlaces(this.mag, places)\n );\n }\n }\n }\n\n public abs(): Decimal {\n return FC_NN(this.sign === 0 ? 0 : 1, this.layer, this.mag);\n }\n\n public neg(): Decimal {\n return FC_NN(-this.sign, this.layer, this.mag);\n }\n\n public negate(): Decimal {\n return this.neg();\n }\n\n public negated(): Decimal {\n return this.neg();\n }\n\n // public sign () {\n // return this.sign;\n // }\n\n public sgn(): number {\n return this.sign;\n }\n\n public round(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.round(this.mag));\n }\n return this;\n }\n\n public floor(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.floor(this.mag));\n }\n return this;\n }\n\n public ceil(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.ceil(this.mag));\n }\n return this;\n }\n\n public trunc(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.trunc(this.mag));\n }\n return this;\n }\n\n public add(value: DecimalSource): this | Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return the other number.\n if (this.sign === 0) {\n return decimal;\n }\n if (decimal.sign === 0) {\n return this;\n }\n\n //Special case - Adding a number to its negation produces 0, no matter how large.\n if (\n this.sign === -decimal.sign &&\n this.layer === decimal.layer &&\n this.mag === decimal.mag\n ) {\n return FC_NN(0, 0, 0);\n }\n\n let a;\n let b;\n\n //Special case: If one of the numbers is layer 2 or higher, just take the bigger number.\n if (this.layer >= 2 || decimal.layer >= 2) {\n return this.maxabs(decimal);\n }\n\n if (Decimal.cmpabs(this, decimal) > 0) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * a.mag + b.sign * b.mag);\n }\n\n const layera = a.layer * Math.sign(a.mag);\n const layerb = b.layer * Math.sign(b.mag);\n\n //If one of the numbers is 2+ layers higher than the other, just take the bigger number.\n if (layera - layerb >= 2) {\n return a;\n }\n\n if (layera === 0 && layerb === -1) {\n if (Math.abs(b.mag - Math.log10(a.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, Math.log10(a.mag) - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n }\n\n if (layera === 1 && layerb === 0) {\n if (Math.abs(a.mag - Math.log10(b.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - Math.log10(b.mag));\n const mantissa = b.sign + a.sign * magdiff;\n return FC(\n Math.sign(mantissa),\n 1,\n Math.log10(b.mag) + Math.log10(Math.abs(mantissa))\n );\n }\n }\n\n if (Math.abs(a.mag - b.mag) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n\n throw Error(\"Bad arguments to add: \" + this + \", \" + value);\n }\n\n public plus(value: DecimalSource): Decimal {\n return this.add(value);\n }\n\n public sub(value: DecimalSource): Decimal {\n return this.add(D(value).neg());\n }\n\n public subtract(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public minus(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public mul(value: DecimalSource): Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return 0.\n if (this.sign === 0 || decimal.sign === 0) {\n return FC_NN(0, 0, 0);\n }\n\n //Special case - Multiplying a number by its own reciprocal yields +/- 1, no matter how large.\n if (this.layer === decimal.layer && this.mag === -decimal.mag) {\n return FC_NN(this.sign * decimal.sign, 0, 1);\n }\n\n let a;\n let b;\n\n //Which number is bigger in terms of its multiplicative distance from 1?\n if (\n this.layer > decimal.layer ||\n (this.layer == decimal.layer && Math.abs(this.mag) > Math.abs(decimal.mag))\n ) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * b.sign * a.mag * b.mag);\n }\n\n //Special case: If one of the numbers is layer 3 or higher or one of the numbers is 2+ layers bigger than the other, just take the bigger number.\n if (a.layer >= 3 || a.layer - b.layer >= 2) {\n return FC(a.sign * b.sign, a.layer, a.mag);\n }\n\n if (a.layer === 1 && b.layer === 0) {\n return FC(a.sign * b.sign, 1, a.mag + Math.log10(b.mag));\n }\n\n if (a.layer === 1 && b.layer === 1) {\n return FC(a.sign * b.sign, 1, a.mag + b.mag);\n }\n\n if (a.layer === 2 && b.layer === 1) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n if (a.layer === 2 && b.layer === 2) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n throw Error(\"Bad arguments to mul: \" + this + \", \" + value);\n }\n\n public multiply(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public times(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public div(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.mul(decimal.recip());\n }\n\n public divide(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public divideBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public dividedBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public recip(): Decimal {\n if (this.mag === 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, 1 / this.mag);\n } else {\n return FC(this.sign, this.layer, -this.mag);\n }\n }\n\n public reciprocal(): Decimal {\n return this.recip();\n }\n\n public reciprocate(): Decimal {\n return this.recip();\n }\n\n /**\n * -1 for less than value, 0 for equals value, 1 for greater than value\n */\n public cmp(value: DecimalSource): CompareResult {\n const decimal = D(value);\n if (this.sign > decimal.sign) {\n return 1;\n }\n if (this.sign < decimal.sign) {\n return -1;\n }\n return (this.sign * this.cmpabs(value)) as CompareResult;\n }\n\n public cmpabs(value: DecimalSource): CompareResult {\n const decimal = D(value);\n const layera = this.mag > 0 ? this.layer : -this.layer;\n const layerb = decimal.mag > 0 ? decimal.layer : -decimal.layer;\n if (layera > layerb) {\n return 1;\n }\n if (layera < layerb) {\n return -1;\n }\n if (this.mag > decimal.mag) {\n return 1;\n }\n if (this.mag < decimal.mag) {\n return -1;\n }\n return 0;\n }\n\n public compare(value: DecimalSource): CompareResult {\n return this.cmp(value);\n }\n\n public isNan(): boolean {\n return isNaN(this.sign) || isNaN(this.layer) || isNaN(this.mag);\n }\n\n public isFinite(): boolean {\n return isFinite(this.sign) && isFinite(this.layer) && isFinite(this.mag);\n }\n\n public eq(value: DecimalSource): boolean {\n const decimal = D(value);\n return (\n this.sign === decimal.sign && this.layer === decimal.layer && this.mag === decimal.mag\n );\n }\n\n public equals(value: DecimalSource): boolean {\n return this.eq(value);\n }\n\n public neq(value: DecimalSource): boolean {\n return !this.eq(value);\n }\n\n public notEquals(value: DecimalSource): boolean {\n return this.neq(value);\n }\n\n public lt(value: DecimalSource): boolean {\n return this.cmp(value) === -1;\n }\n\n public lte(value: DecimalSource): boolean {\n return !this.gt(value);\n }\n\n public gt(value: DecimalSource): boolean {\n return this.cmp(value) === 1;\n }\n\n public gte(value: DecimalSource): boolean {\n return !this.lt(value);\n }\n\n public max(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.lt(decimal) ? decimal : this;\n }\n\n public min(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.gt(decimal) ? decimal : this;\n }\n\n public maxabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) < 0 ? decimal : this;\n }\n\n public minabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) > 0 ? decimal : this;\n }\n\n public clamp(min: DecimalSource, max: DecimalSource): Decimal {\n return this.max(min).min(max);\n }\n\n public clampMin(min: DecimalSource): Decimal {\n return this.max(min);\n }\n\n public clampMax(max: DecimalSource): Decimal {\n return this.min(max);\n }\n\n public cmp_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) ? 0 : this.cmp(decimal);\n }\n\n public compare_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n return this.cmp_tolerance(value, tolerance);\n }\n\n /**\n * Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments.\n * For example, if you put in 1e-9, then any number closer to the\n * larger number than (larger number)*1e-9 will be considered equal.\n */\n public eq_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value); // https://stackoverflow.com/a/33024979\n if (tolerance == null) {\n tolerance = 1e-7;\n }\n //Numbers that are too far away are never close.\n if (this.sign !== decimal.sign) {\n return false;\n }\n if (Math.abs(this.layer - decimal.layer) > 1) {\n return false;\n }\n // return abs(a-b) <= tolerance * max(abs(a), abs(b))\n let magA = this.mag;\n let magB = decimal.mag;\n if (this.layer > decimal.layer) {\n magB = f_maglog10(magB);\n }\n if (this.layer < decimal.layer) {\n magA = f_maglog10(magA);\n }\n return Math.abs(magA - magB) <= tolerance * Math.max(Math.abs(magA), Math.abs(magB));\n }\n\n public equals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.eq_tolerance(value, tolerance);\n }\n\n public neq_tolerance(value: DecimalSource, tolerance: number): boolean {\n return !this.eq_tolerance(value, tolerance);\n }\n\n public notEquals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.neq_tolerance(value, tolerance);\n }\n\n public lt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.lt(decimal);\n }\n\n public lte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.lt(decimal);\n }\n\n public gt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.gt(decimal);\n }\n\n public gte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.gt(decimal);\n }\n\n public pLog10(): Decimal {\n if (this.lt(Decimal.dZero)) {\n return Decimal.dZero;\n }\n return this.log10();\n }\n\n public absLog10(): Decimal {\n if (this.sign === 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(1, 0, Math.log10(this.mag));\n }\n }\n\n public log10(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(this.sign, 0, Math.log10(this.mag));\n }\n }\n\n public log(base: DecimalSource): Decimal {\n base = D(base);\n if (this.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign === 1 && base.layer === 0 && base.mag === 1) {\n return Decimal.dNaN;\n } else if (this.layer === 0 && base.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag) / Math.log(base.mag));\n }\n\n return Decimal.div(this.log10(), base.log10());\n }\n\n public log2(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log2(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 3.321928094887362); //log2(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.5213902276543247); //-log10(log10(2))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public ln(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 2.302585092994046); //ln(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.36221568869946325); //log10(log10(e))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public logarithm(base: DecimalSource): Decimal {\n return this.log(base);\n }\n\n public pow(value: DecimalSource): Decimal {\n const decimal = D(value);\n const a = this;\n const b = decimal;\n\n //special case: if a is 0, then return 0 (UNLESS b is 0, then return 1)\n if (a.sign === 0) {\n return b.eq(0) ? FC_NN(1, 0, 1) : a;\n }\n //special case: if a is 1, then return 1\n if (a.sign === 1 && a.layer === 0 && a.mag === 1) {\n return a;\n }\n //special case: if b is 0, then return 1\n if (b.sign === 0) {\n return FC_NN(1, 0, 1);\n }\n //special case: if b is 1, then return a\n if (b.sign === 1 && b.layer === 0 && b.mag === 1) {\n return a;\n }\n\n const result = a\n .absLog10()\n .mul(b)\n .pow10();\n\n if (this.sign === -1) {\n if (Math.abs(b.toNumber() % 2) % 2 === 1) {\n return result.neg();\n } else if (Math.abs(b.toNumber() % 2) % 2 === 0) {\n return result;\n }\n return Decimal.dNaN;\n }\n\n return result;\n }\n\n public pow10(): Decimal {\n /*\n There are four cases we need to consider:\n 1) positive sign, positive mag (e15, ee15): +1 layer (e.g. 10^15 becomes e15, 10^e15 becomes ee15)\n 2) negative sign, positive mag (-e15, -ee15): +1 layer but sign and mag sign are flipped (e.g. 10^-15 becomes e-15, 10^-e15 becomes ee-15)\n 3) positive sign, negative mag (e-15, ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n 4) negative sign, negative mag (-e-15, -ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n */\n\n if (!Number.isFinite(this.layer) || !Number.isFinite(this.mag)) {\n return Decimal.dNaN;\n }\n\n let a = this;\n\n //handle layer 0 case - if no precision is lost just use Math.pow, else promote one layer\n if (a.layer === 0) {\n const newmag = Math.pow(10, a.sign * a.mag);\n if (Number.isFinite(newmag) && Math.abs(newmag) >= 0.1) {\n return FC(1, 0, newmag);\n } else {\n if (a.sign === 0) {\n return Decimal.dOne;\n } else {\n a = FC_NN(a.sign, a.layer + 1, Math.log10(a.mag)) as this;\n }\n }\n }\n\n //handle all 4 layer 1+ cases individually\n if (a.sign > 0 && a.mag >= 0) {\n return FC(a.sign, a.layer + 1, a.mag);\n }\n if (a.sign < 0 && a.mag >= 0) {\n return FC(-a.sign, a.layer + 1, -a.mag);\n }\n //both the negative mag cases are identical: one +/- rounding error\n return Decimal.dOne;\n }\n\n public pow_base(value: DecimalSource): Decimal {\n return D(value).pow(this);\n }\n\n public root(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.pow(decimal.recip());\n }\n\n public factorial(): Decimal {\n if (this.mag < 0) {\n return this.add(1).gamma();\n } else if (this.layer === 0) {\n return this.add(1).gamma();\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n //from HyperCalc source code\n public gamma(): Decimal {\n if (this.mag < 0) {\n return this.recip();\n } else if (this.layer === 0) {\n if (this.lt(FC_NN(1, 0, 24))) {\n return D(f_gamma(this.sign * this.mag));\n }\n\n const t = this.mag - 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (t + 0.5) * Math.log(t);\n l = l - t;\n const n2 = t * t;\n let np = t;\n let lm = 12 * np;\n let adj = 1 / lm;\n let l2 = l + adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 360 * np;\n adj = 1 / lm;\n l2 = l - adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 1260 * np;\n let lt = 1 / lm;\n l = l + lt;\n np = np * n2;\n lm = 1680 * np;\n lt = 1 / lm;\n l = l - lt;\n return Decimal.exp(l);\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n public lngamma(): Decimal {\n return this.gamma().ln();\n }\n\n public exp(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0 && this.mag <= 709.7) {\n return D(Math.exp(this.sign * this.mag));\n } else if (this.layer === 0) {\n return FC(1, 1, this.sign * Math.log10(Math.E) * this.mag);\n } else if (this.layer === 1) {\n return FC(1, 2, this.sign * (Math.log10(0.4342944819032518) + this.mag));\n } else {\n return FC(1, this.layer + 1, this.sign * this.mag);\n }\n }\n\n public sqr(): Decimal {\n return this.pow(2);\n }\n\n public sqrt(): Decimal {\n if (this.layer === 0) {\n return D(Math.sqrt(this.sign * this.mag));\n } else if (this.layer === 1) {\n return FC(1, 2, Math.log10(this.mag) - 0.3010299956639812);\n } else {\n const result = Decimal.div(FC_NN(this.sign, this.layer - 1, this.mag), FC_NN(1, 0, 2));\n result.layer += 1;\n result.normalize();\n return result;\n }\n }\n\n public cube(): Decimal {\n return this.pow(3);\n }\n\n public cbrt(): Decimal {\n return this.pow(1 / 3);\n }\n\n //Tetration/tetrate: The result of exponentiating 'this' to 'this' 'height' times in a row. https://en.wikipedia.org/wiki/Tetration\n //If payload != 1, then this is 'iterated exponentiation', the result of exping (payload) to base (this) (height) times. https://andydude.github.io/tetration/archives/tetration2/ident.html\n //Works with negative and positive real heights.\n public tetrate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n //x^^1 == x\n if (height === 1) {\n return Decimal.pow(this, payload);\n }\n //x^^0 == 1\n if (height === 0) {\n return new Decimal(payload);\n }\n //1^^x == 1\n if (this.eq(Decimal.dOne)) {\n return Decimal.dOne;\n }\n //-1^^x == -1\n if (this.eq(-1)) {\n return Decimal.pow(this, payload);\n }\n\n if (height === Number.POSITIVE_INFINITY) {\n const this_num = this.toNumber();\n //within the convergence range?\n if (this_num <= 1.44466786100976613366 && this_num >= 0.06598803584531253708) {\n //hotfix for the very edge of the number range not being handled properly\n if (this_num > 1.444667861009099) {\n return new Decimal(Math.E);\n }\n //Formula for infinite height power tower.\n const negln = Decimal.ln(this).neg();\n return negln.lambertw().div(negln);\n } else if (this_num > 1.44466786100976613366) {\n //explodes to infinity\n return new Decimal(Number.POSITIVE_INFINITY);\n } else {\n //0.06598803584531253708 > this_num >= 0: never converges\n //this_num < 0: quickly becomes a complex number\n return Decimal.dNaN;\n }\n }\n\n //0^^x oscillates if we define 0^0 == 1 (which in javascript land we do), since then 0^^1 is 0, 0^^2 is 1, 0^^3 is 0, etc. payload is ignored\n //using the linear approximation for height (TODO: don't know a better way to calculate it ATM, but it wouldn't surprise me if it's just NaN)\n if (this.eq(Decimal.dZero)) {\n let result = Math.abs((height + 1) % 2);\n if (result > 1) {\n result = 2 - result;\n }\n return new Decimal(result);\n }\n\n if (height < 0) {\n return Decimal.iteratedlog(payload, this, -height);\n }\n\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n if (this.gt(Decimal.dZero) && this.lte(1.44466786100976613366)) {\n //similar to 0^^n, flip-flops between two values, converging slowly (or if it's below 0.06598803584531253708, never. so once again, the fractional part at the end will be a linear approximation (TODO: again pending knowledge of how to approximate better, although tbh I think it should in reality just be NaN)\n height = Math.min(10000, height);\n for (let i = 0; i < height; ++i) {\n const old_payload: Decimal = payload;\n payload = this.pow(payload);\n //stop early if we converge\n if (old_payload.eq(payload)) {\n return payload;\n }\n }\n if (fracheight != 0) {\n const next_payload = this.pow(payload);\n return payload.mul(1 - fracheight).add(next_payload.mul(fracheight));\n }\n return payload;\n }\n //TODO: base < 0, but it's hard for me to reason about (probably all non-integer heights are NaN automatically?)\n\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (this.gt(10)) {\n payload = this.pow(fracheight);\n } else {\n payload = D(Decimal.tetrate_critical(this.toNumber(), fracheight));\n //TODO: until the critical section grid can handle numbers below 2, scale them to the base\n //TODO: maybe once the critical section grid has very large bases, this math can be appropriate for them too? I'll think about it\n if (this.lt(2)) {\n payload = payload\n .sub(1)\n .mul(this.minus(1))\n .plus(1);\n }\n }\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.pow(payload);\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //shortcut\n if (payload.layer - this.layer > 3) {\n return FC_NN(payload.sign, payload.layer + (height - i - 1), payload.mag);\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return payload;\n }\n }\n return payload;\n }\n\n //iteratedexp/iterated exponentiation: - all cases handled in tetrate, so just call it\n public iteratedexp(height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return this.tetrate(height, payload);\n }\n\n //iterated log/repeated log: The result of applying log(base) 'times' times in a row. Approximately equal to subtracting (times) from the number's slog representation. Equivalent to tetrating to a negative height.\n //Works with negative and positive real heights.\n public iteratedlog(base: DecimalSource = 10, times = 1): Decimal {\n if (times < 0) {\n return Decimal.tetrate(base, -times, this);\n }\n\n base = D(base);\n let result = D(this);\n const fulltimes = times;\n times = Math.trunc(times);\n const fraction = fulltimes - times;\n if (result.layer - base.layer > 3) {\n const layerloss = Math.min(times, result.layer - base.layer - 3);\n times -= layerloss;\n result.layer -= layerloss;\n }\n\n for (let i = 0; i < times; ++i) {\n result = result.log(base);\n //bail if we're NaN\n if (!isFinite(result.layer) || !isFinite(result.mag)) {\n return result.normalize();\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return result;\n }\n }\n\n //handle fractional part\n if (fraction > 0 && fraction < 1) {\n if (base.eq(10)) {\n result = result.layeradd10(-fraction);\n } else {\n result = result.layeradd(-fraction, base);\n }\n }\n\n return result;\n }\n\n //Super-logarithm, one of tetration's inverses, tells you what size power tower you'd have to tetrate base to to get number. By definition, will never be higher than 1.8e308 in break_eternity.js, since a power tower 1.8e308 numbers tall is the largest representable number.\n // https://en.wikipedia.org/wiki/Super-logarithm\n public slog(base: DecimalSource = 10): Decimal {\n base = D(base);\n\n //special cases:\n //slog base 0 or lower is NaN\n if (base.lte(Decimal.dZero)) {\n return Decimal.dNaN;\n }\n //slog base 1 is NaN\n if (base.eq(Decimal.dOne)) {\n return Decimal.dNaN;\n }\n //need to handle these small, wobbling bases specially\n if (base.lt(Decimal.dOne)) {\n if (this.eq(Decimal.dOne)) {\n return Decimal.dZero;\n }\n if (this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n //0 < this < 1: ambiguous (happens multiple times)\n //this < 0: impossible (as far as I can tell)\n //this > 1: partially complex (http://myweb.astate.edu/wpaulsen/tetcalc/tetcalc.html base 0.25 for proof)\n return Decimal.dNaN;\n }\n //slog_n(0) is -1\n if (this.mag < 0 || this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n\n let result = 0;\n let copy = D(this);\n if (copy.layer - base.layer > 3) {\n const layerloss = copy.layer - base.layer - 3;\n result += layerloss;\n copy.layer -= layerloss;\n }\n\n for (let i = 0; i < 100; ++i) {\n if (copy.lt(Decimal.dZero)) {\n copy = Decimal.pow(base, copy);\n result -= 1;\n } else if (copy.lte(Decimal.dOne)) {\n return D(result + Decimal.slog_critical(base.toNumber(), copy.toNumber()));\n } else {\n result += 1;\n copy = Decimal.log(copy, base);\n }\n }\n return D(result);\n }\n\n //background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\n public static slog_critical(base: number, height: number): number {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (base > 10) {\n return height - 1;\n }\n return Decimal.critical_section(base, height, critical_slog_values);\n }\n\n public static tetrate_critical(base: number, height: number): number {\n return Decimal.critical_section(base, height, critical_tetr_values);\n }\n\n public static critical_section(base: number, height: number, grid: number[][]): number {\n //this part is simple at least, since it's just 0.1 to 0.9\n height *= 10;\n if (height < 0) {\n height = 0;\n }\n if (height > 10) {\n height = 10;\n }\n //have to do this complicated song and dance since one of the critical_headers is Math.E, and in the future I'd like 1.5 as well\n if (base < 2) {\n base = 2;\n }\n if (base > 10) {\n base = 10;\n }\n let lower = 0;\n let upper = 0;\n //basically, if we're between bases, we interpolate each bases' relevant values together\n //then we interpolate based on what the fractional height is.\n //accuracy could be improved by doing a non-linear interpolation (maybe), by adding more bases and heights (definitely) but this is AFAIK the best you can get without running some pari.gp or mathematica program to calculate exact values\n for (let i = 0; i < critical_headers.length; ++i) {\n if (critical_headers[i] == base) {\n // exact match\n lower = grid[i][Math.floor(height)];\n upper = grid[i][Math.ceil(height)];\n break;\n } else if (critical_headers[i] < base && critical_headers[i + 1] > base) {\n // interpolate between this and the next\n const basefrac =\n (base - critical_headers[i]) / (critical_headers[i + 1] - critical_headers[i]);\n lower =\n grid[i][Math.floor(height)] * (1 - basefrac) +\n grid[i + 1][Math.floor(height)] * basefrac;\n upper =\n grid[i][Math.ceil(height)] * (1 - basefrac) +\n grid[i + 1][Math.ceil(height)] * basefrac;\n break;\n }\n }\n const frac = height - Math.floor(height);\n const result = lower * (1 - frac) + upper * frac;\n return result;\n }\n\n //Function for adding/removing layers from a Decimal, even fractional layers (e.g. its slog10 representation).\n //Moved this over to use the same critical section as tetrate/slog.\n public layeradd10(diff: DecimalSource): Decimal {\n diff = Decimal.fromValue_noAlloc(diff).toNumber();\n const result = D(this);\n if (diff >= 1) {\n //bug fix: if result is very smol (mag < 0, layer > 0) turn it into 0 first\n if (result.mag < 0 && result.layer > 0) {\n result.sign = 0;\n result.mag = 0;\n result.layer = 0;\n } else if (result.sign === -1 && result.layer == 0) {\n //bug fix - for stuff like -3.layeradd10(1) we need to move the sign to the mag\n result.sign = 1;\n result.mag = -result.mag;\n }\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n }\n if (diff <= -1) {\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n if (result.layer < 0) {\n for (let i = 0; i < 100; ++i) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n if (!isFinite(result.mag)) {\n //another bugfix: if we hit -Infinity mag, then we should return negative infinity, not 0. 0.layeradd10(-1) h its this\n if (result.sign === 0) {\n result.sign = 1;\n }\n //also this, for 0.layeradd10(-2)\n if (result.layer < 0) {\n result.layer = 0;\n }\n return result.normalize();\n }\n if (result.layer >= 0) {\n break;\n }\n }\n }\n }\n\n while (result.layer < 0) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n }\n //bugfix: before we normalize: if we started with 0, we now need to manually fix a layer ourselves!\n if (result.sign === 0) {\n result.sign = 1;\n if (result.mag === 0 && result.layer >= 1) {\n result.layer -= 1;\n result.mag = 1;\n }\n }\n result.normalize();\n\n //layeradd10: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 10 and iterated log base 10. Also equivalent to adding a fractional amount to the number's layer in its break_eternity.js representation.\n if (diff !== 0) {\n return result.layeradd(diff, 10); //safe, only calls positive height 1 payload tetration, slog and log\n }\n\n return result;\n }\n\n //layeradd: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 'base' and iterated log base 'base'.\n public layeradd(diff: number, base: DecimalSource): Decimal {\n const slogthis = this.slog(base).toNumber();\n const slogdest = slogthis + diff;\n if (slogdest >= 0) {\n return Decimal.tetrate(base, slogdest);\n } else if (!Number.isFinite(slogdest)) {\n return Decimal.dNaN;\n } else if (slogdest >= -1) {\n return Decimal.log(Decimal.tetrate(base, slogdest + 1), base);\n } else {\n return Decimal.log(Decimal.log(Decimal.tetrate(base, slogdest + 2), base), base);\n }\n }\n\n //The Lambert W function, also called the omega function or product logarithm, is the solution W(x) === x*e^x.\n // https://en.wikipedia.org/wiki/Lambert_W_function\n //Some special values, for testing: https://en.wikipedia.org/wiki/Lambert_W_function#Special_values\n public lambertw(): Decimal {\n if (this.lt(-0.3678794411710499)) {\n throw Error(\"lambertw is unimplemented for results less than -1, sorry!\");\n } else if (this.mag < 0) {\n return D(f_lambertw(this.toNumber()));\n } else if (this.layer === 0) {\n return D(f_lambertw(this.sign * this.mag));\n } else if (this.layer === 1) {\n return d_lambertw(this);\n } else if (this.layer === 2) {\n return d_lambertw(this);\n }\n if (this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n\n throw \"Unhandled behavior in lambertw()\";\n }\n\n //The super square-root function - what number, tetrated to height 2, equals this?\n //Other sroots are possible to calculate probably through guess and check methods, this one is easy though.\n // https://en.wikipedia.org/wiki/Tetration#Super-root\n public ssqrt(): Decimal {\n if (this.sign == 1 && this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n const lnx = this.ln();\n return lnx.div(lnx.lambertw());\n }\n /*\n\nUnit tests for tetrate/iteratedexp/iteratedlog/layeradd10/layeradd/slog:\n(note: these won't be exactly precise with the new slog implementation, but that's okay)\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var expected = first+both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(-both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n var expected = first+both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(-both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar tetrateonly = Decimal.tetrate(10, first);\nvar tetrateandlog = Decimal.tetrate(10, first+both).iteratedlog(10, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first);\nvar tetrateandlog = Decimal.tetrate(base, first+both).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first, base);\nvar tetrateandlog = Decimal.tetrate(base, first+both, base).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.random()*100);\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.exp(Math.random()*100));\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n var b = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.add(b).toNumber();\n if (Number.isFinite(c) && !Decimal.eq_tolerance(c, a.toNumber()+b.toNumber()))\n {\n console.log(a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 100; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.mul(b).toNumber();\n if (Number.isFinite(c) && Number.isFinite(a.toNumber()) && Number.isFinite(b.toNumber()) && a.toNumber() != 0 && b.toNumber() != 0 && c != 0 && !Decimal.eq_tolerance(c, a.toNumber()*b.toNumber()))\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n else if (!Decimal.mul(a.recip(), b.recip()).eq_tolerance(Decimal.mul(a, b).recip()))\n {\n console.log(\"Test 3: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5 && a.sign !== 0) { a = a.recip(); }\n if (Math.random() > 0.5 && b.sign !== 0) { b = b.recip(); }\n var c = a.pow(b);\n var d = a.root(b.recip());\n var e = a.pow(b.recip());\n var f = a.root(b);\n\n if (!c.eq_tolerance(d) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n if (!e.eq_tolerance(f) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 2: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Math.round(Math.random()*18-9);\n var b = Math.round(Math.random()*100-50);\n var c = Math.round(Math.random()*18-9);\n var d = Math.round(Math.random()*100-50);\n console.log(\"Decimal.pow(Decimal.fromMantissaExponent(\" + a + \", \" + b + \"), Decimal.fromMantissaExponent(\" + c + \", \" + d + \")).toString()\");\n}\n\n*/\n\n //Pentation/pentate: The result of tetrating 'height' times in a row. An absurdly strong operator - Decimal.pentate(2, 4.28) and Decimal.pentate(10, 2.37) are already too huge for break_eternity.js!\n // https://en.wikipedia.org/wiki/Pentation\n public pentate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n //I have no idea if this is a meaningful approximation for pentation to continuous heights, but it is monotonic and continuous.\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n ++height;\n payload = new Decimal(fracheight);\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.tetrate(payload.toNumber());\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //give up after 10 iterations if nothing is happening\n if (i > 10) {\n return payload;\n }\n }\n\n return payload;\n }\n\n // trig functions!\n public sin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.sin(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public cos(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0) {\n return D(Math.cos(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public tan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.tan(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public asin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.asin(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public acos(): Decimal {\n if (this.mag < 0) {\n return D(Math.acos(this.toNumber()));\n }\n if (this.layer === 0) {\n return D(Math.acos(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public atan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.atan(this.sign * this.mag));\n }\n return D(Math.atan(this.sign * 1.8e308));\n }\n\n public sinh(): Decimal {\n return this.exp()\n .sub(this.negate().exp())\n .div(2);\n }\n\n public cosh(): Decimal {\n return this.exp()\n .add(this.negate().exp())\n .div(2);\n }\n\n public tanh(): Decimal {\n return this.sinh().div(this.cosh());\n }\n\n public asinh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .add(1)\n .sqrt()\n )\n );\n }\n\n public acosh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .sub(1)\n .sqrt()\n )\n );\n }\n\n public atanh(): Decimal {\n if (this.abs().gte(1)) {\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n return Decimal.ln(this.add(1).div(D(1).sub(this))).div(2);\n }\n\n /**\n * Joke function from Realm Grinder\n */\n public ascensionPenalty(ascensions: DecimalSource): Decimal {\n if (ascensions === 0) {\n return this;\n }\n\n return this.root(Decimal.pow(10, ascensions));\n }\n\n /**\n * Joke function from Cookie Clicker. It's 'egg'\n */\n public egg(): Decimal {\n return this.add(9);\n }\n\n public lessThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) < 1;\n }\n\n public lessThan(other: DecimalSource): boolean {\n return this.cmp(other) < 0;\n }\n\n public greaterThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) > -1;\n }\n\n public greaterThan(other: DecimalSource): boolean {\n return this.cmp(other) > 0;\n }\n\n // return Decimal;\n}\n\n// return Decimal;\n","import Decimal, { DecimalSource } from \"lib/break_eternity\";\nimport projInfo from \"data/projInfo.json\";\n\nexport default Decimal;\n\nconst decimalOne = new Decimal(1);\n\nexport function exponentialFormat(num: DecimalSource, precision: number, mantissa = true): string {\n let e = Decimal.log10(num).floor();\n let m = Decimal.div(num, Decimal.pow(10, e));\n if (m.toStringWithDecimalPlaces(precision) === \"10\") {\n m = decimalOne;\n e = e.add(1);\n }\n const eString = e.gte(1e9)\n ? format(e, Math.max(Math.max(precision, 3), projInfo.defaultDecimalsShown))\n : e.gte(10000)\n ? commaFormat(e, 0)\n : e.toStringWithDecimalPlaces(0);\n if (mantissa) {\n return m.toStringWithDecimalPlaces(precision) + \"e\" + eString;\n } else {\n return \"e\" + eString;\n }\n}\n\nexport function commaFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.001) {\n return (0).toFixed(precision);\n }\n const init = num.toStringWithDecimalPlaces(precision);\n const portions = init.split(\".\");\n portions[0] = portions[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1,\");\n if (portions.length == 1) return portions[0];\n return portions[0] + \".\" + portions[1];\n}\n\nexport function regularFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.0001) {\n return (0).toFixed(precision);\n }\n if (num.mag < 0.1 && precision !== 0) {\n precision = Math.max(Math.max(precision, 4), projInfo.defaultDecimalsShown);\n }\n return num.toStringWithDecimalPlaces(precision);\n}\n\nconst eeee1000 = new Decimal(\"eeee1000\");\nconst e100000 = new Decimal(\"e100000\");\nconst e1000 = new Decimal(\"e1000\");\nconst e9 = new Decimal(1e9);\nconst e6 = new Decimal(1e6);\nconst e3 = new Decimal(1e3);\nconst nearOne = new Decimal(0.98);\nconst thousandth = new Decimal(0.001);\nconst zero = new Decimal(0);\nexport function format(num: DecimalSource, precision?: number, small?: boolean): string {\n if (precision == null) precision = projInfo.defaultDecimalsShown;\n small = small ?? projInfo.defaultShowSmall;\n num = new Decimal(num);\n if (isNaN(num.sign) || isNaN(num.layer) || isNaN(num.mag)) {\n return \"NaN\";\n }\n if (num.sign < 0) {\n return \"-\" + format(num.neg(), precision);\n }\n if (num.mag === Number.POSITIVE_INFINITY) {\n return \"Infinity\";\n }\n if (num.gte(eeee1000)) {\n const slog = num.slog();\n if (slog.gte(e6)) {\n return \"F\" + format(slog.floor());\n } else {\n return (\n Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) +\n \"F\" +\n commaFormat(slog.floor(), 0)\n );\n }\n } else if (num.gte(e100000)) {\n return exponentialFormat(num, 0, false);\n } else if (num.gte(e1000)) {\n return exponentialFormat(num, 0);\n } else if (num.gte(e9)) {\n return exponentialFormat(num, precision);\n } else if (num.gte(e3)) {\n return commaFormat(num, 0);\n } else if (num.gte(thousandth) || !small) {\n return regularFormat(num, precision);\n } else if (num.eq(zero)) {\n return (0).toFixed(precision);\n }\n\n num = invertOOM(num);\n if (num.lt(e1000)) {\n const val = exponentialFormat(num, precision);\n return val.replace(/([^(?:e|F)]*)$/, \"-$1\");\n } else {\n return format(num, precision) + \"⁻¹\";\n }\n}\n\nexport function formatWhole(num: DecimalSource): string {\n num = new Decimal(num);\n if (num.sign < 0) {\n return \"-\" + formatWhole(num.neg());\n }\n if (num.gte(e9)) {\n return format(num);\n }\n if (num.lte(nearOne) && !num.eq(zero)) {\n return format(num);\n }\n return format(num, 0);\n}\n\nexport function formatTime(seconds: DecimalSource): string {\n if (Decimal.lt(seconds, 0)) {\n return \"-\" + formatTime(Decimal.neg(seconds));\n }\n if (Decimal.gt(seconds, 2 ** 51)) {\n // integer precision limit\n return format(Decimal.div(seconds, 31536000)) + \"y\";\n }\n seconds = new Decimal(seconds).toNumber();\n if (seconds < 60) {\n return format(seconds) + \"s\";\n } else if (seconds < 3600) {\n return formatWhole(Math.floor(seconds / 60)) + \"m \" + format(seconds % 60) + \"s\";\n } else if (seconds < 86400) {\n return (\n formatWhole(Math.floor(seconds / 3600)) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m \" +\n formatWhole(seconds % 60) +\n \"s\"\n );\n } else if (seconds < 31536000) {\n return (\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m\"\n );\n } else {\n return (\n formatWhole(Math.floor(seconds / 31536000)) +\n \"y \" +\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h\"\n );\n }\n}\n\nexport function toPlaces(x: DecimalSource, precision: number, maxAccepted: DecimalSource): string {\n x = new Decimal(x);\n let result = x.toStringWithDecimalPlaces(precision);\n if (new Decimal(result).gte(maxAccepted)) {\n result = Decimal.sub(maxAccepted, Math.pow(0.1, precision)).toStringWithDecimalPlaces(\n precision\n );\n }\n return result;\n}\n\n// Will also display very small numbers\nexport function formatSmall(x: DecimalSource, precision?: number): string {\n return format(x, precision, true);\n}\n\nexport function invertOOM(x: DecimalSource): Decimal {\n let e = Decimal.log10(x).ceil();\n const m = Decimal.div(x, Decimal.pow(10, e));\n e = e.neg();\n x = new Decimal(10).pow(e).times(m);\n\n return x;\n}\n","// Import Decimal and numberUtils from a different file to globally change which big num library gets used\n// This way switching out big number libraries just needs to happen here, not every file that needs big numbers\nimport { DecimalSource as RawDecimalSource } from \"lib/break_eternity\";\nimport Decimal, * as numberUtils from \"util/break_eternity\";\n\nexport const {\n exponentialFormat,\n commaFormat,\n regularFormat,\n format,\n formatWhole,\n formatTime,\n toPlaces,\n formatSmall,\n invertOOM\n} = numberUtils;\n\nexport type DecimalSource = RawDecimalSource;\n\nwindow.Decimal = Decimal;\nwindow.exponentialFormat = exponentialFormat;\nwindow.commaFormat = commaFormat;\nwindow.regularFormat = regularFormat;\nwindow.format = format;\nwindow.formatWhole = formatWhole;\nwindow.formatTime = formatTime;\nwindow.toPlaces = toPlaces;\nwindow.formatSmall = formatSmall;\nwindow.invertOOM = invertOOM;\n\nexport default Decimal;\n","// Reference:\n// https://stackoverflow.com/questions/7225407/convert-camelcasetext-to-sentence-case-text\nexport function camelToTitle(camel: string): string {\n let title = camel.replace(/([A-Z])/g, \" $1\");\n title = title.charAt(0).toUpperCase() + title.slice(1);\n return title;\n}\n\nexport function isPlainObject(object: unknown): boolean {\n return Object.prototype.toString.call(object) === \"[object Object]\";\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(func: unknown): func is Function {\n return typeof func === \"function\";\n}\n","import { computed, Ref } from \"vue\";\nimport { isFunction } from \"./common\";\n\nexport const DoNotCache = Symbol(\"DoNotCache\");\n\nexport type Computable<T> = T | Ref<T> | (() => T);\nexport type ProcessedComputable<T> = T | Ref<T>;\nexport type GetComputableType<T> = T extends { [DoNotCache]: true }\n ? T\n : T extends () => infer S\n ? Ref<S>\n : undefined extends T\n ? undefined\n : T;\nexport type GetComputableTypeWithDefault<T, S> = undefined extends T\n ? S\n : GetComputableType<NonNullable<T>>;\nexport type UnwrapComputableType<T> = T extends Ref<infer S> ? S : T extends () => infer S ? S : T;\n\nexport type ComputableKeysOf<T> = Pick<\n T,\n {\n [K in keyof T]: T[K] extends Computable<unknown> ? K : never;\n }[keyof T]\n>;\n\n// TODO fix the typing of this function, such that casting isn't necessary and can be used to\n// detect if a createX function is validly written\nexport function processComputable<T, S extends keyof ComputableKeysOf<T>>(\n obj: T,\n key: S\n): asserts obj is T & { [K in S]: ProcessedComputable<UnwrapComputableType<T[S]>> } {\n const computable = obj[key];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(computable) && computable.length === 0 && !(computable as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj[key] = computed(computable.bind(obj));\n }\n}\n\nexport function convertComputable<T>(obj: Computable<T>): ProcessedComputable<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(obj) && !(obj as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj = computed(obj);\n }\n return obj as ProcessedComputable<T>;\n}\n","import Decimal from \"./bignum\";\n\nexport const ProxyState = Symbol(\"ProxyState\");\nexport const ProxyPath = Symbol(\"ProxyPath\");\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ProxiedWithState<T> = NonNullable<T> extends Record<PropertyKey, any>\n ? NonNullable<T> extends Decimal\n ? T\n : {\n [K in keyof T]: ProxiedWithState<T[K]>;\n } & {\n [ProxyState]: T;\n [ProxyPath]: string[];\n }\n : T;\n\n// Takes a function that returns an object and pretends to be that object\n// Note that the object is lazily calculated\nexport function createLazyProxy<T extends object, S>(\n objectFunc: (baseObject: S) => T & S,\n baseObject: S = {} as S\n): T {\n const obj: S & Partial<T> = baseObject;\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return obj as S & T;\n }\n\n return new Proxy(obj, {\n get(target, key) {\n if (key === ProxyState) {\n return calculateObj();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (calculateObj() as any)[key];\n },\n set(target, key, value) {\n // TODO give warning about this? It should only be done with caution\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (calculateObj() as any)[key] = value;\n return true;\n },\n has(target, key) {\n if (key === ProxyState) {\n return true;\n }\n return Reflect.has(calculateObj(), key);\n },\n ownKeys() {\n return Reflect.ownKeys(calculateObj());\n },\n getOwnPropertyDescriptor(target, key) {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as S & T;\n}\n","import projInfo from \"data/projInfo.json\";\nimport player, { Player, PlayerData, stringifySave } from \"game/player\";\nimport settings, { loadSettings } from \"game/settings\";\nimport { ProxyState } from \"./proxies\";\n\nexport function setupInitialStore(player: Partial<PlayerData> = {}): Player {\n return Object.assign(\n {\n id: `${projInfo.id}-0`,\n name: \"Default Save\",\n tabs: projInfo.initialTabs.slice(),\n time: Date.now(),\n autosave: true,\n offlineProd: true,\n offlineTime: 0,\n timePlayed: 0,\n keepGoing: false,\n modID: projInfo.id,\n modVersion: projInfo.versionNumber,\n layers: {}\n },\n player\n ) as Player;\n}\n\nexport function save(): string {\n const stringifiedSave = btoa(unescape(encodeURIComponent(stringifySave(player[ProxyState]))));\n localStorage.setItem(player.id, stringifiedSave);\n return stringifiedSave;\n}\n\nexport async function load(): Promise<void> {\n // Load global settings\n loadSettings();\n\n try {\n const save = localStorage.getItem(settings.active);\n if (save == null) {\n await loadSave(newSave());\n return;\n }\n const player = JSON.parse(decodeURIComponent(escape(atob(save))));\n if (player.modID !== projInfo.id) {\n await loadSave(newSave());\n return;\n }\n player.id = settings.active;\n await loadSave(player);\n } catch (e) {\n console.error(\"Failed to load save. Falling back to new save.\\n\", e);\n await loadSave(newSave());\n }\n}\n\nexport function newSave(): PlayerData {\n const id = getUniqueID();\n const player = setupInitialStore({ id });\n localStorage.setItem(id, btoa(unescape(encodeURIComponent(stringifySave(player)))));\n\n settings.saves.push(id);\n\n return player;\n}\n\nexport function getUniqueID(): string {\n let id,\n i = 0;\n do {\n id = `${projInfo.id}-${i++}`;\n } while (localStorage.getItem(id));\n return id;\n}\n\nexport async function loadSave(playerObj: Partial<PlayerData>): Promise<void> {\n console.info(\"Loading save\", playerObj);\n const { layers, removeLayer, addLayer } = await import(\"game/layers\");\n const { fixOldSave, getInitialLayers } = await import(\"data/projEntry\");\n\n for (const layer in layers) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n removeLayer(layers[layer]!);\n }\n getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));\n\n playerObj = setupInitialStore(playerObj);\n if (playerObj.offlineProd && playerObj.time) {\n if (playerObj.offlineTime == undefined) playerObj.offlineTime = 0;\n playerObj.offlineTime += (Date.now() - playerObj.time) / 1000;\n }\n playerObj.time = Date.now();\n if (playerObj.modVersion !== projInfo.versionNumber) {\n fixOldSave(playerObj.modVersion, playerObj);\n }\n\n Object.assign(player, playerObj);\n settings.active = player.id;\n}\n\nsetInterval(() => {\n if (player.autosave) {\n save();\n }\n}, 1000);\nwindow.onbeforeunload = () => {\n if (player.autosave) {\n save();\n }\n};\nwindow.save = save;\nexport const hardReset = (window.hardReset = async () => {\n await loadSave(newSave());\n});\n","<template>\n <transition appear>\n <svg\n id=\"eaRe02fYmMp1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 228 521\"\n shape-rendering=\"geometricPrecision\"\n text-rendering=\"geometricPrecision\"\n >\n <g id=\"P\">\n <path\n d=\"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 10;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"trunk\"\n class=\"svg-elem-1\"\n ></path>\n <path\n d=\"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine2\"\n class=\"svg-elem-2\"\n ></path>\n <path\n d=\"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine4\"\n class=\"svg-elem-3\"\n ></path>\n <path\n d=\"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine3\"\n class=\"svg-elem-4\"\n ></path>\n <path\n d=\"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine1\"\n class=\"svg-elem-5\"\n ></path>\n <path\n d=\"M 21,47.8775 38.674,131\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine2\"\n class=\"svg-elem-6\"\n ></path>\n <path\n d=\"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine1\"\n class=\"svg-elem-7\"\n ></path>\n </g>\n </svg>\n </transition>\n</template>\n\n<style scoped>\nsvg {\n background: #2e3440;\n}\n\n/***************************************************\n * Generated by SVG Artista on 1/7/2022, 4:39:47 PM\n * MIT license (https://opensource.org/licenses/MIT)\n * W. https://svgartista.net\n **************************************************/\n\nsvg .svg-elem-1 {\n stroke-dashoffset: 2648.758056640625px;\n stroke-dasharray: 1324.3790283203125px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0s;\n}\n\nsvg.v-enter-from .svg-elem-1,\nsvg.v-leave-to .svg-elem-1 {\n stroke-dashoffset: 1324.3790283203125px;\n}\n\nsvg .svg-elem-2 {\n stroke-dashoffset: 680.4000854492188px;\n stroke-dasharray: 340.2000427246094px;\n transition: stroke-dashoffset 1s ease-out 0.4s;\n}\n\nsvg.v-enter-from .svg-elem-2,\nsvg.v-leave-to .svg-elem-2 {\n stroke-dashoffset: 340.2000427246094px;\n}\n\nsvg .svg-elem-3 {\n stroke-dashoffset: 76.21031951904297px;\n stroke-dasharray: 38.105159759521484px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-3,\nsvg.v-leave-to .svg-elem-3 {\n stroke-dashoffset: 38.105159759521484px;\n}\n\nsvg .svg-elem-4 {\n stroke-dashoffset: 175.18072509765625px;\n stroke-dasharray: 87.59036254882812px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0.36s;\n}\n\nsvg.v-enter-from .svg-elem-4,\nsvg.v-leave-to .svg-elem-4 {\n stroke-dashoffset: 87.59036254882812px;\n}\n\nsvg .svg-elem-5 {\n stroke-dashoffset: 671.9447021484375px;\n stroke-dasharray: 335.97235107421875px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-5,\nsvg.v-leave-to .svg-elem-5 {\n stroke-dashoffset: 335.97235107421875px;\n}\n\nsvg .svg-elem-6 {\n stroke-dashoffset: 173.96141052246094px;\n stroke-dasharray: 86.98070526123047px;\n transition: stroke-dashoffset 1s ease-out 1s;\n}\n\nsvg.v-enter-from .svg-elem-6,\nsvg.v-leave-to .svg-elem-6 {\n stroke-dashoffset: 86.98070526123047px;\n}\n\nsvg .svg-elem-7 {\n stroke-dashoffset: 172.99151611328125px;\n stroke-dasharray: 86.49575805664062px;\n transition: stroke-dashoffset 1s ease-out 0.85s;\n}\n\nsvg.v-enter-from .svg-elem-7,\nsvg.v-leave-to .svg-elem-7 {\n stroke-dashoffset: 86.49575805664062px;\n}\n</style>\n","import { render } from \"./Profectus.vue?vue&type=template&id=07150322&scoped=true\"\nconst script = {}\n\nimport \"./Profectus.vue?vue&type=style&index=0&id=07150322&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-07150322\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n width: { default: \"8px\" },\n height: { default: \"17px\" }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n style: _normalizeStyle({ width: __props.width, height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport { computed, ComputedRef, isRef, ref, Ref, watch } from \"vue\";\nimport { globalBus } from \"game/events\";\nimport { State, persistent } from \"game/persistence\";\n\nexport interface Resource<T = DecimalSource> extends Ref<T> {\n displayName: string;\n precision: number;\n small?: boolean;\n}\n\nexport function createResource<T extends State>(\n defaultValue: T | Ref<T>,\n displayName = \"points\",\n precision = 0,\n small = undefined\n): Resource<T> {\n const resource: Partial<Resource<T>> = isRef(defaultValue)\n ? defaultValue\n : persistent(defaultValue);\n resource.displayName = displayName;\n resource.precision = precision;\n resource.small = small;\n return resource as Resource<T>;\n}\n\nexport function trackBest(resource: Resource): Ref<DecimalSource> {\n const best = persistent(resource.value);\n watch(resource, amount => {\n if (Decimal.gt(amount, best.value)) {\n best.value = amount;\n }\n });\n return best;\n}\n\nexport function trackTotal(resource: Resource): Ref<DecimalSource> {\n const total = persistent(resource.value);\n watch(resource, (amount, prevAmount) => {\n if (Decimal.gt(amount, prevAmount)) {\n total.value = Decimal.add(total.value, Decimal.sub(amount, prevAmount));\n }\n });\n return total;\n}\n\nconst tetra8 = new Decimal(\"10^^8\");\nconst e100 = new Decimal(\"1e100\");\nexport function trackOOMPS(\n resource: Resource,\n pointGain?: ComputedRef<DecimalSource>\n): Ref<string> {\n const oomps = ref<DecimalSource>(0);\n const oompsMag = ref(0);\n const lastPoints = ref<DecimalSource>(0);\n\n globalBus.on(\"update\", diff => {\n oompsMag.value = 0;\n if (Decimal.lte(resource.value, e100)) {\n lastPoints.value = resource.value;\n return;\n }\n\n let curr = resource.value;\n let prev = lastPoints.value;\n lastPoints.value = curr;\n if (Decimal.gt(curr, prev)) {\n if (Decimal.gte(curr, tetra8)) {\n curr = Decimal.slog(curr, 1e10);\n prev = Decimal.slog(prev, 1e10);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value = -1;\n } else {\n while (\n Decimal.div(curr, prev).log(10).div(diff).gte(\"100\") &&\n oompsMag.value <= 5 &&\n Decimal.gt(prev, 0)\n ) {\n curr = Decimal.log10(curr);\n prev = Decimal.log10(prev);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value++;\n }\n }\n }\n });\n\n const oompsString = computed(() => {\n if (oompsMag.value === 0) {\n return pointGain\n ? format(pointGain.value, resource.precision, resource.small) +\n \" \" +\n resource.displayName +\n \"/s\"\n : \"\";\n }\n return (\n format(oomps.value) +\n \" OOM\" +\n (oompsMag.value < 0 ? \"^OOM\" : \"^\" + oompsMag.value) +\n \"s/sec\"\n );\n });\n return oompsString;\n}\n\nexport function displayResource(resource: Resource, overrideAmount?: DecimalSource): string {\n const amount = overrideAmount ?? resource.value;\n if (Decimal.eq(resource.precision, 0)) {\n return formatWhole(amount);\n }\n return format(amount, resource.precision, resource.small);\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.nodesComp))),\n (_ctx.leftNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.leftNodesComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_ctx.rightNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.rightNodesComp), { key: 1 }))\n : _createCommentVNode(\"\", true),\n (_ctx.branches)\n ? (_openBlock(), _createBlock(_component_Links, {\n key: 2,\n links: _ctx.unref(_ctx.branches)\n }, null, 8, [\"links\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode } from \"game/layers\";\nimport { computed, toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n link: null,\n startNode: null,\n endNode: null,\n boundingRect: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n link: Link;\n startNode: FeatureNode;\n endNode: FeatureNode;\n boundingRect: DOMRect | undefined;\n}\n\n\nconst props = toRefs(_props);\n\nconst startPosition = computed(() => {\n const rect = props.startNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetStart) {\n position.x += props.link.value.offsetStart.x;\n position.y += props.link.value.offsetStart.y;\n }\n return position;\n});\n\nconst endPosition = computed(() => {\n const rect = props.endNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetEnd) {\n position.x += props.link.value.offsetEnd.x;\n position.y += props.link.value.offsetEnd.y;\n }\n return position;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"line\", _mergeProps({\n \"stroke-width\": \"15px\",\n stroke: \"white\"\n }, __props.link, {\n x1: _unref(startPosition).x,\n y1: _unref(startPosition).y,\n x2: _unref(endPosition).x,\n y2: _unref(endPosition).y\n }), null, 16, _hoisted_1))\n}\n}\n\n})","import script from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { computed, inject, nextTick, onMounted, ref, toRef } from \"vue\";\nimport LinkVue from \"./Link.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n links: null\n },\n setup(__props: any) {\n\nconst _props = __props as { links?: Link[] }\n\n\nconst links = toRef(_props, \"links\");\n\nconst resizeObserver = new ResizeObserver(updateNodes);\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst nodes = inject(NodesInjectionKey)!;\n\nconst resizeListener = ref<Element | null>(null);\n\nonMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n }\n});\n\nlet isDirty = true;\nlet boundingRect = ref(resizeListener.value?.getBoundingClientRect());\nfunction updateNodes() {\n if (resizeListener.value != null && isDirty) {\n isDirty = false;\n nextTick(() => {\n boundingRect.value = resizeListener.value?.getBoundingClientRect();\n (Object.values(nodes.value) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n isDirty = true;\n });\n }\n}\ndocument.fonts.ready.then(updateNodes);\n\nconst validLinks = computed(() => {\n const n = nodes.value;\n return (\n links.value?.filter(link => n[link.startNode.id]?.rect && n[link.startNode.id]?.rect) ?? []\n );\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(validLinks))\n ? (_openBlock(), _createElementBlock(\"svg\", _normalizeProps(_mergeProps({ key: 0 }, _ctx.$attrs)), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(validLinks), (link, index) => {\n return (_openBlock(), _createBlock(LinkVue, {\n key: index,\n link: link,\n boundingRect: _unref(boundingRect),\n startNode: _unref(nodes)[link.startNode.id]!,\n endNode: _unref(nodes)[link.endNode.id]!\n }, null, 8, [\"link\", \"boundingRect\", \"startNode\", \"endNode\"]))\n }), 128))\n ], 16))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n ref_key: \"resizeListener\",\n ref: resizeListener,\n class: \"resize-listener\"\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Links.vue?vue&type=style&index=0&id=e35b0402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e35b0402\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { coerceComponent, processedPropType, renderJSX, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, watchEffect } from \"vue\";\nimport Links from \"features/links/Links.vue\";\nimport { jsx } from \"features/feature\";\n\nexport default defineComponent({\n props: {\n nodes: {\n type: processedPropType<GenericTreeNode[][]>(Array),\n required: true\n },\n leftSideNodes: processedPropType<GenericTreeNode[]>(Array),\n rightSideNodes: processedPropType<GenericTreeNode[]>(Array),\n branches: processedPropType<TreeBranch[]>(Array)\n },\n components: { Links },\n setup(props) {\n const { nodes, leftSideNodes, rightSideNodes } = toRefs(props);\n\n const nodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(nodes);\n nodesComp.value = coerceComponent(\n jsx(() => (\n <>\n {currNodes.map(row => (\n <span class=\"row\">{row.map(renderJSX)}</span>\n ))}\n </>\n ))\n );\n });\n\n const leftNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(leftSideNodes);\n leftNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => (\n <span class=\"left-side-nodes small\">{currNodes.map(renderJSX)}</span>\n ))\n )\n : \"\";\n });\n\n const rightNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(rightSideNodes);\n rightNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => <span class=\"side-nodes small\">{currNodes.map(renderJSX)}</span>)\n )\n : \"\";\n });\n\n return {\n unref,\n nodesComp,\n leftNodesComp,\n rightNodesComp\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=51e99c22&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=tsx\"\nexport * from \"./Tree.vue?vue&type=script&lang=tsx\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=51e99c22&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-51e99c22\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({ visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined }),\n class: _normalizeClass({\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n style: _normalizeStyle([\n {\n backgroundColor: _ctx.unref(_ctx.color),\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${_ctx.unref(\n _ctx.glowColor\n )}`\n },\n _ctx.unref(_ctx.style) ?? []\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp))))\n ], 36),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { RegisterNodeInjectionKey, UnregisterNodeInjectionKey } from \"game/layers\";\nimport { computed, inject, onUnmounted, ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n id: null\n },\n setup(__props: any) {\n\nconst _props = __props as { id: string }\n\n\nconst props = toRefs(_props);\n\nconst register = inject(RegisterNodeInjectionKey);\nconst unregister = inject(UnregisterNodeInjectionKey);\n\nconst node = ref<HTMLElement | null>(null);\nconst parentNode = computed(() => node.value && node.value.parentElement);\n\nif (register && unregister) {\n watch([parentNode, props.id], ([newNode, newID], [prevNode, prevID]) => {\n if (prevNode) {\n unregister(unref(prevID));\n }\n if (newNode) {\n register(newID, newNode);\n }\n });\n\n onUnmounted(() => unregister(unref(props.id)));\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"node\",\n ref_key: \"node\",\n ref: node\n }, null, 512))\n}\n}\n\n})","import script from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Node.vue?vue&type=style&index=0&id=63ded336&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-63ded336\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c476c56a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = {\n key: 0,\n class: \"mark star\"\n}\nconst _hoisted_3 = [\"src\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n mark: { type: [Boolean, String] }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (__props.mark)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.mark === true)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"img\", {\n key: 1,\n class: \"mark\",\n src: __props.mark\n }, null, 8, _hoisted_3))\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./MarkNode.vue?vue&type=style&index=0&id=c476c56a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c476c56a\"]])\n\nexport default __exports__","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n color: processedPropType<string>(String),\n glowColor: processedPropType<string>(String),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { onClick, onHold, display } = toRefs(props);\n\n const comp = computeOptionalComponent(display);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n unref,\n Visibility,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=426d9bce&scoped=true&ts=true\"\nimport script from \"./TreeNode.vue?vue&type=script&lang=ts\"\nexport * from \"./TreeNode.vue?vue&type=script&lang=ts\"\n\nimport \"./TreeNode.vue?vue&type=style&index=0&id=426d9bce&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-426d9bce\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Link } from \"features/links/links\";\nimport { GenericReset } from \"features/reset\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport TreeNodeComponent from \"features/trees/TreeNode.vue\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n convertComputable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, ref, Ref, shallowRef, unref } from \"vue\";\n\nexport const TreeNodeType = Symbol(\"TreeNode\");\nexport const TreeType = Symbol(\"Tree\");\n\nexport interface TreeNodeOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n color?: Computable<string>;\n display?: Computable<CoercableComponent>;\n glowColor?: Computable<string>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n reset?: GenericReset;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseTreeNode {\n id: string;\n type: typeof TreeNodeType;\n [Component]: typeof TreeNodeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TreeNode<T extends TreeNodeOptions> = Replace<\n T & BaseTreeNode,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericTreeNode = Replace<\n TreeNode<TreeNodeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createTreeNode<T extends TreeNodeOptions>(\n optionsFunc: OptionsFunc<T, TreeNode<T>, BaseTreeNode>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n treeNode[Component] = TreeNodeComponent;\n\n processComputable(treeNode as T, \"visibility\");\n setDefault(treeNode, \"visibility\", Visibility.Visible);\n processComputable(treeNode as T, \"canClick\");\n setDefault(treeNode, \"canClick\", true);\n processComputable(treeNode as T, \"color\");\n processComputable(treeNode as T, \"display\");\n processComputable(treeNode as T, \"glowColor\");\n processComputable(treeNode as T, \"classes\");\n processComputable(treeNode as T, \"style\");\n processComputable(treeNode as T, \"mark\");\n\n if (treeNode.onClick) {\n const onClick = treeNode.onClick.bind(treeNode);\n treeNode.onClick = function () {\n if (unref(treeNode.canClick)) {\n onClick();\n }\n };\n }\n if (treeNode.onHold) {\n const onHold = treeNode.onHold.bind(treeNode);\n treeNode.onHold = function () {\n if (unref(treeNode.canClick)) {\n onHold();\n }\n };\n }\n\n treeNode[GatherProps] = function (this: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n };\n };\n\n return treeNode as unknown as TreeNode<T>;\n });\n}\n\nexport interface TreeBranch extends Omit<Link, \"startNode\" | \"endNode\"> {\n startNode: GenericTreeNode;\n endNode: GenericTreeNode;\n}\n\nexport interface TreeOptions {\n visibility?: Computable<Visibility>;\n nodes: Computable<GenericTreeNode[][]>;\n leftSideNodes?: Computable<GenericTreeNode[]>;\n rightSideNodes?: Computable<GenericTreeNode[]>;\n branches?: Computable<TreeBranch[]>;\n resetPropagation?: ResetPropagation;\n onReset?: (node: GenericTreeNode) => void;\n}\n\nexport interface BaseTree {\n id: string;\n links: Ref<Link[]>;\n reset: (node: GenericTreeNode) => void;\n isResetting: Ref<boolean>;\n resettingNode: Ref<GenericTreeNode | null>;\n type: typeof TreeType;\n [Component]: typeof TreeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tree<T extends TreeOptions> = Replace<\n T & BaseTree,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n nodes: GetComputableType<T[\"nodes\"]>;\n leftSideNodes: GetComputableType<T[\"leftSideNodes\"]>;\n rightSideNodes: GetComputableType<T[\"rightSideNodes\"]>;\n branches: GetComputableType<T[\"branches\"]>;\n }\n>;\n\nexport type GenericTree = Replace<\n Tree<TreeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTree<T extends TreeOptions>(\n optionsFunc: OptionsFunc<T, Tree<T>, BaseTree>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree = optionsFunc();\n tree.id = getUniqueID(\"tree-\");\n tree.type = TreeType;\n tree[Component] = TreeComponent;\n\n tree.isResetting = ref(false);\n tree.resettingNode = shallowRef(null);\n\n tree.reset = function (node) {\n const genericTree = tree as GenericTree;\n genericTree.isResetting.value = true;\n genericTree.resettingNode.value = node;\n genericTree.resetPropagation?.(genericTree, node);\n genericTree.onReset?.(node);\n genericTree.isResetting.value = false;\n genericTree.resettingNode.value = null;\n };\n tree.links = computed(() => {\n const genericTree = tree as GenericTree;\n return unref(genericTree.branches) ?? [];\n });\n\n processComputable(tree as T, \"visibility\");\n setDefault(tree, \"visibility\", Visibility.Visible);\n processComputable(tree as T, \"nodes\");\n processComputable(tree as T, \"leftSideNodes\");\n processComputable(tree as T, \"rightSideNodes\");\n processComputable(tree as T, \"branches\");\n\n tree[GatherProps] = function (this: GenericTree) {\n const { nodes, leftSideNodes, rightSideNodes, branches } = this;\n return { nodes, leftSideNodes, rightSideNodes, branches };\n };\n\n return tree as unknown as Tree<T>;\n });\n}\n\nexport type ResetPropagation = {\n (tree: GenericTree, resettingNode: GenericTreeNode): void;\n};\n\nexport const defaultResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) - 1;\n for (let x = row; x >= 0; x--) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const invertedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) + 1;\n for (let x = row; x < nodes.length; x++) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const branchedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const visitedNodes = [resettingNode];\n let currentNodes = [resettingNode];\n if (tree.branches != null) {\n const branches = unref(tree.branches);\n while (currentNodes.length > 0) {\n const nextNodes: GenericTreeNode[] = [];\n currentNodes.forEach(node => {\n branches\n .filter(branch => branch.startNode === node || branch.endNode === node)\n .map(branch => {\n if (branch.startNode === node) {\n return branch.endNode;\n }\n return branch.startNode;\n })\n .filter(node => !visitedNodes.includes(node))\n .forEach(node => {\n // Check here instead of in the filter because this check's results may\n // change as we go through each node\n if (!nextNodes.includes(node)) {\n nextNodes.push(node);\n node.reset?.reset();\n }\n });\n });\n currentNodes = nextNodes;\n visitedNodes.push(...currentNodes);\n }\n }\n};\n\nexport function createResourceTooltip(\n resource: Resource,\n requiredResource: Resource | null = null,\n requirement: Computable<DecimalSource> = 0\n): Ref<string> {\n const req = convertComputable(requirement);\n return computed(() => {\n if (requiredResource == null || Decimal.gte(resource.value, unref(req))) {\n return displayResource(resource) + \" \" + resource.displayName;\n }\n return `Reach ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(unref(req))\n : format(unref(req), requiredResource.precision)\n } ${requiredResource.displayName} to unlock (You have ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(requiredResource.value)\n : format(requiredResource.value, requiredResource.precision)\n })`;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined,\n backgroundImage: (_ctx.earned && _ctx.image && `url(${_ctx.image})`) || ''\n },\n _ctx.unref(_ctx.style) ?? []\n ]),\n class: _normalizeClass({\n feature: true,\n achievement: true,\n locked: !_ctx.unref(_ctx.earned),\n bought: _ctx.unref(_ctx.earned),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType } from \"util/vue\";\nimport { defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport \"components/common/features.css\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n image: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display } = toRefs(props);\n\n return {\n component: computeOptionalComponent(display),\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Achievement.vue?vue&type=template&id=e3f32402&scoped=true&ts=true\"\nimport script from \"./Achievement.vue?vue&type=script&lang=ts\"\nexport * from \"./Achievement.vue?vue&type=script&lang=ts\"\n\nimport \"./Achievement.vue?vue&type=style&index=0&id=e3f32402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e3f32402\"]])\n\nexport default __exports__","import { globalBus } from \"game/events\";\nimport Toast from \"vue-toastification\";\nimport \"vue-toastification/dist/index.css\";\n\nglobalBus.on(\"setupVue\", vue => vue.use(Toast));\n\nexport function getNotifyStyle(color = \"white\", strength = \"8px\") {\n return {\n transform: \"scale(1.05, 1.05)\",\n borderColor: \"rgba(0, 0, 0, 0.125)\",\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${strength} ${color}`,\n zIndex: 1\n };\n}\n\nexport function getHighNotifyStyle() {\n return getNotifyStyle(\"red\", \"20px\");\n}\n","import AchievementComponent from \"features/achievements/Achievement.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent } from \"util/vue\";\nimport { Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const AchievementType = Symbol(\"Achievement\");\n\nexport interface AchievementOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n image?: Computable<string>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseAchievement extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof AchievementType;\n [Component]: typeof AchievementComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Achievement<T extends AchievementOptions> = Replace<\n T & BaseAchievement,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n image: GetComputableType<T[\"image\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n }\n>;\n\nexport type GenericAchievement = Replace<\n Achievement<AchievementOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createAchievement<T extends AchievementOptions>(\n optionsFunc: OptionsFunc<T, Achievement<T>, BaseAchievement>\n): Achievement<T> {\n return createLazyProxy(persistent => {\n const achievement = Object.assign(persistent, optionsFunc());\n achievement.id = getUniqueID(\"achievement-\");\n achievement.type = AchievementType;\n achievement[Component] = AchievementComponent;\n\n achievement.earned = achievement[PersistentState];\n achievement.complete = function () {\n achievement[PersistentState].value = true;\n };\n\n processComputable(achievement as T, \"visibility\");\n setDefault(achievement, \"visibility\", Visibility.Visible);\n processComputable(achievement as T, \"display\");\n processComputable(achievement as T, \"mark\");\n processComputable(achievement as T, \"image\");\n processComputable(achievement as T, \"style\");\n processComputable(achievement as T, \"classes\");\n\n achievement[GatherProps] = function (this: GenericAchievement) {\n const { visibility, display, earned, image, style, classes, mark, id } = this;\n return { visibility, display, earned, image, style: unref(style), classes, mark, id };\n };\n\n if (achievement.shouldEarn) {\n const genericAchievement = achievement as GenericAchievement;\n watchEffect(() => {\n if (\n !genericAchievement.earned.value &&\n unref(genericAchievement.visibility) === Visibility.Visible &&\n genericAchievement.shouldEarn?.()\n ) {\n genericAchievement.earned.value = true;\n genericAchievement.onComplete?.();\n if (genericAchievement.display) {\n const Display = coerceComponent(unref(genericAchievement.display));\n toast.info(\n <div>\n <h3>Achievement earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </div>\n );\n }\n }\n });\n }\n\n return achievement as unknown as Achievement<T>;\n }, persistent<boolean>(false));\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_GridCell = _resolveComponent(\"GridCell\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n }),\n class: \"table\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rows), (row) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _ctx.mergeAdjacent }]),\n key: row\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.cols), (col) => {\n return (_openBlock(), _createBlock(_component_GridCell, _mergeProps({ key: col }, _ctx.gatherCellProps(_ctx.unref(_ctx.cells)[row * 100 + col])), null, 16))\n }), 128))\n ], 2))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n}","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b1182ac6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: _normalizeClass({ feature: true, tile: true, can: _ctx.unref(_ctx.canClick), locked: !_ctx.unref(_ctx.canClick) }),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args)))\n }, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { style: {\"white-space\":\"pre-line\"} })),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeComponent,\n computeOptionalComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: processedPropType<CoercableComponent>(Object, String, Function),\n style: processedPropType<StyleValue>(String, Object, Array),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { onClick, onHold, title, display } = toRefs(props);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n const titleComponent = computeOptionalComponent(title);\n const component = computeComponent(display);\n\n return {\n start,\n stop,\n titleComponent,\n component,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./GridCell.vue?vue&type=template&id=b1182ac6&scoped=true&ts=true\"\nimport script from \"./GridCell.vue?vue&type=script&lang=ts\"\nexport * from \"./GridCell.vue?vue&type=script&lang=ts\"\n\nimport \"./GridCell.vue?vue&type=style&index=0&id=b1182ac6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b1182ac6\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport { Visibility } from \"features/feature\";\nimport { GridCell } from \"features/grids/grid\";\nimport settings from \"game/settings\";\nimport { processedPropType } from \"util/vue\";\nimport { computed, defineComponent, unref } from \"vue\";\nimport GridCellVue from \"./GridCell.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n rows: {\n type: processedPropType<number>(Number),\n required: true\n },\n cols: {\n type: processedPropType<number>(Number),\n required: true\n },\n cells: {\n type: processedPropType<Record<string, GridCell>>(Object),\n required: true\n }\n },\n components: { GridCell: GridCellVue },\n setup() {\n const mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\n function gatherCellProps(cell: GridCell) {\n const { visibility, onClick, onHold, display, title, style, canClick, id } = cell;\n return { visibility, onClick, onHold, display, title, style, canClick, id };\n }\n\n return { unref, gatherCellProps, Visibility, mergeAdjacent };\n }\n});\n","import { render } from \"./Grid.vue?vue&type=template&id=4f6b6717&ts=true\"\nimport script from \"./Grid.vue?vue&type=script&lang=ts\"\nexport * from \"./Grid.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import GridComponent from \"features/grids/Grid.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { State, Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const GridType = Symbol(\"Grid\");\n\nexport type CellComputable<T> = Computable<T> | ((id: string | number, state: State) => T);\n\nfunction createGridProxy(grid: GenericGrid): Record<string | number, GridCell> {\n return new Proxy({}, getGridHandler(grid)) as Record<string | number, GridCell>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getGridHandler(grid: GenericGrid): ProxyHandler<Record<string | number, GridCell>> {\n const keys = computed(() => {\n const keys = [];\n for (let row = 1; row <= unref(grid.rows); row++) {\n for (let col = 1; col <= unref(grid.cols); col++) {\n keys.push((row * 100 + col).toString());\n }\n }\n return keys;\n });\n return {\n get(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (key === \"isProxy\") {\n return true;\n }\n\n if (typeof key === \"symbol\") {\n return (grid as never)[key];\n }\n\n if (!keys.value.includes(key.toString())) {\n return undefined;\n }\n\n if (target[key] == null) {\n target[key] = new Proxy(\n grid,\n getCellHandler(key.toString())\n ) as unknown as GridCell;\n }\n\n return target[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string | number, GridCell>, key: PropertyKey, value: any) {\n console.warn(\"Cannot set grid cells\", target, key, value);\n return false;\n },\n ownKeys() {\n return keys.value;\n },\n has(target: Record<string | number, GridCell>, key: PropertyKey) {\n return keys.value.includes(key.toString());\n },\n getOwnPropertyDescriptor(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (keys.value.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nfunction getCellHandler(id: string): ProxyHandler<GenericGrid> {\n const keys = [\n \"id\",\n \"visibility\",\n \"canClick\",\n \"startState\",\n \"state\",\n \"style\",\n \"classes\",\n \"title\",\n \"display\",\n \"onClick\",\n \"onHold\"\n ];\n const cache: Record<string, Ref<unknown>> = {};\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target, key, receiver): any {\n if (key === \"isProxy\") {\n return true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let prop = (target as any)[key];\n\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n }\n if (prop != undefined || typeof key === \"symbol\") {\n return prop;\n }\n\n key = key.slice(0, 1).toUpperCase() + key.slice(1);\n\n if (key === \"startState\") {\n return prop.call(receiver, id);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`get${key}`];\n if (isFunction(prop)) {\n if (!(key in cache)) {\n cache[key] = computed(() => prop.call(receiver, id, target.getState(id)));\n }\n return cache[key].value;\n } else if (prop != undefined) {\n return unref(prop);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`on${key}`];\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n } else if (prop != undefined) {\n return prop;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string, any>, key: string, value: any, receiver: typeof Proxy): boolean {\n key = `set${key.slice(0, 1).toUpperCase() + key.slice(1)}`;\n if (key in target && isFunction(target[key]) && target[key].length < 3) {\n target[key].call(receiver, id, value);\n return true;\n } else {\n console.warn(`No setter for \"${key}\".`, target);\n return false;\n }\n },\n ownKeys() {\n return keys;\n },\n has(target, key) {\n return keys.includes(key.toString());\n },\n getOwnPropertyDescriptor(target, key) {\n if (keys.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nexport interface GridCell {\n id: string;\n visibility: Visibility;\n canClick: boolean;\n startState: State;\n state: State;\n style?: StyleValue;\n classes?: Record<string, boolean>;\n title?: CoercableComponent;\n display: CoercableComponent;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface GridOptions {\n visibility?: Computable<Visibility>;\n rows: Computable<number>;\n cols: Computable<number>;\n getVisibility?: CellComputable<Visibility>;\n getCanClick?: CellComputable<boolean>;\n getStartState: Computable<State> | ((id: string | number) => State);\n getStyle?: CellComputable<StyleValue>;\n getClasses?: CellComputable<Record<string, boolean>>;\n getTitle?: CellComputable<CoercableComponent>;\n getDisplay: CellComputable<CoercableComponent>;\n onClick?: (id: string | number, state: State, e?: MouseEvent | TouchEvent) => void;\n onHold?: (id: string | number, state: State) => void;\n}\n\nexport interface BaseGrid extends Persistent<Record<string | number, State>> {\n id: string;\n getID: (id: string | number, state: State) => string;\n getState: (id: string | number) => State;\n setState: (id: string | number, state: State) => void;\n cells: Record<string | number, GridCell>;\n type: typeof GridType;\n [Component]: typeof GridComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Grid<T extends GridOptions> = Replace<\n T & BaseGrid,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n rows: GetComputableType<T[\"rows\"]>;\n cols: GetComputableType<T[\"cols\"]>;\n getVisibility: GetComputableTypeWithDefault<T[\"getVisibility\"], Visibility.Visible>;\n getCanClick: GetComputableTypeWithDefault<T[\"getCanClick\"], true>;\n getStartState: GetComputableType<T[\"getStartState\"]>;\n getStyle: GetComputableType<T[\"getStyle\"]>;\n getClasses: GetComputableType<T[\"getClasses\"]>;\n getTitle: GetComputableType<T[\"getTitle\"]>;\n getDisplay: GetComputableType<T[\"getDisplay\"]>;\n }\n>;\n\nexport type GenericGrid = Replace<\n Grid<GridOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n getVisibility: ProcessedComputable<Visibility>;\n getCanClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createGrid<T extends GridOptions>(\n optionsFunc: OptionsFunc<T, Grid<T>, BaseGrid>\n): Grid<T> {\n return createLazyProxy(persistent => {\n const grid = Object.assign(persistent, optionsFunc());\n grid.id = getUniqueID(\"grid-\");\n grid[Component] = GridComponent;\n\n grid.getID = function (this: GenericGrid, cell: string | number) {\n return grid.id + \"-\" + cell;\n };\n grid.getState = function (this: GenericGrid, cell: string | number) {\n if (this[PersistentState].value[cell] != undefined) {\n return this[PersistentState].value[cell];\n }\n return this.cells[cell].startState;\n };\n grid.setState = function (this: GenericGrid, cell: string | number, state: State) {\n this[PersistentState].value[cell] = state;\n };\n\n grid.cells = createGridProxy(grid as GenericGrid);\n\n processComputable(grid as T, \"visibility\");\n setDefault(grid, \"visibility\", Visibility.Visible);\n processComputable(grid as T, \"rows\");\n processComputable(grid as T, \"cols\");\n processComputable(grid as T, \"getVisibility\");\n setDefault(grid, \"getVisibility\", Visibility.Visible);\n processComputable(grid as T, \"getCanClick\");\n setDefault(grid, \"getCanClick\", true);\n processComputable(grid as T, \"getStartState\");\n processComputable(grid as T, \"getStyle\");\n processComputable(grid as T, \"getClasses\");\n processComputable(grid as T, \"getTitle\");\n processComputable(grid as T, \"getDisplay\");\n\n if (grid.onClick) {\n const onClick = grid.onClick.bind(grid);\n grid.onClick = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onClick(id, state);\n }\n };\n }\n if (grid.onHold) {\n const onHold = grid.onHold.bind(grid);\n grid.onHold = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onHold(id, state);\n }\n };\n }\n\n grid[GatherProps] = function (this: GenericGrid) {\n const { visibility, rows, cols, cells, id } = this;\n return { visibility, rows, cols, cells, id };\n };\n\n return grid as unknown as Grid<T>;\n }, persistent({}));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n _ctx.unref(_ctx.style) ?? []\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstart: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchend: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancel: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n class: _normalizeClass({\n feature: true,\n clickable: true,\n can: _ctx.unref(_ctx.canClick),\n locked: !_ctx.unref(_ctx.canClick),\n small: _ctx.small,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { GenericClickable } from \"features/clickables/clickable\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport {\n coerceComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericClickable[\"display\"]>>(\n Object,\n String,\n Function\n ),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n small: Boolean,\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, onClick, onHold } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n </span>\n ))\n );\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Clickable.vue?vue&type=template&id=6b39988a&scoped=true&ts=true\"\nimport script from \"./Clickable.vue?vue&type=script&lang=tsx\"\nexport * from \"./Clickable.vue?vue&type=script&lang=tsx\"\n\nimport \"./Clickable.vue?vue&type=style&index=0&id=6b39988a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6b39988a\"]])\n\nexport default __exports__","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericLayer } from \"game/layers\";\nimport { Unsubscribe } from \"nanoevents\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, unref } from \"vue\";\n\nexport const ClickableType = Symbol(\"Clickable\");\n\nexport interface ClickableOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n }\n >;\n small?: boolean;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseClickable {\n id: string;\n type: typeof ClickableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Clickable<T extends ClickableOptions> = Replace<\n T & BaseClickable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericClickable = Replace<\n Clickable<ClickableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createClickable<T extends ClickableOptions>(\n optionsFunc: OptionsFunc<T, Clickable<T>, BaseClickable>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable = optionsFunc();\n clickable.id = getUniqueID(\"clickable-\");\n clickable.type = ClickableType;\n clickable[Component] = ClickableComponent;\n\n processComputable(clickable as T, \"visibility\");\n setDefault(clickable, \"visibility\", Visibility.Visible);\n processComputable(clickable as T, \"canClick\");\n setDefault(clickable, \"canClick\", true);\n processComputable(clickable as T, \"classes\");\n processComputable(clickable as T, \"style\");\n processComputable(clickable as T, \"mark\");\n processComputable(clickable as T, \"display\");\n\n if (clickable.onClick) {\n const onClick = clickable.onClick.bind(clickable);\n clickable.onClick = function (e) {\n if (unref(clickable.canClick)) {\n onClick(e);\n }\n };\n }\n if (clickable.onHold) {\n const onHold = clickable.onHold.bind(clickable);\n clickable.onHold = function () {\n if (unref(clickable.canClick)) {\n onHold();\n }\n };\n }\n\n clickable[GatherProps] = function (this: GenericClickable) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return clickable as unknown as Clickable<T>;\n });\n}\n\nexport function setupAutoClick(\n layer: GenericLayer,\n clickable: GenericClickable,\n autoActive: Computable<boolean> = true\n): Unsubscribe {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return layer.on(\"update\", () => {\n if (unref(isActive) && unref(clickable.canClick)) {\n clickable.onClick?.();\n }\n });\n}\n","import {\n Clickable,\n ClickableOptions,\n createClickable,\n GenericClickable\n} from \"features/clickables/clickable\";\nimport { GenericConversion } from \"features/conversion\";\nimport { CoercableComponent, jsx, OptionsFunc, Replace, setDefault } from \"features/feature\";\nimport { displayResource } from \"features/resources/resource\";\nimport {\n createTreeNode,\n GenericTree,\n GenericTreeNode,\n TreeNode,\n TreeNodeOptions\n} from \"features/trees/tree\";\nimport player from \"game/player\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { computed, Ref, unref } from \"vue\";\n\nexport interface ResetButtonOptions extends ClickableOptions {\n conversion: GenericConversion;\n tree: GenericTree;\n treeNode: GenericTreeNode;\n resetDescription?: Computable<string>;\n showNextAt?: Computable<boolean>;\n display?: Computable<CoercableComponent>;\n canClick?: Computable<boolean>;\n minimumGain?: Computable<DecimalSource>;\n}\n\nexport type ResetButton<T extends ResetButtonOptions> = Replace<\n Clickable<T>,\n {\n resetDescription: GetComputableTypeWithDefault<T[\"resetDescription\"], Ref<string>>;\n showNextAt: GetComputableTypeWithDefault<T[\"showNextAt\"], true>;\n display: GetComputableTypeWithDefault<T[\"display\"], Ref<JSX.Element>>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], Ref<boolean>>;\n minimumGain: GetComputableTypeWithDefault<T[\"minimumGain\"], 1>;\n onClick: VoidFunction;\n }\n>;\n\nexport type GenericResetButton = Replace<\n GenericClickable & ResetButton<ResetButtonOptions>,\n {\n resetDescription: ProcessedComputable<string>;\n showNextAt: ProcessedComputable<boolean>;\n display: ProcessedComputable<CoercableComponent>;\n canClick: ProcessedComputable<boolean>;\n minimumGain: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n optionsFunc: OptionsFunc<T>\n): ResetButton<T> {\n return createClickable(() => {\n const resetButton = optionsFunc();\n\n processComputable(resetButton as T, \"showNextAt\");\n setDefault(resetButton, \"showNextAt\", true);\n setDefault(resetButton, \"minimumGain\", 1);\n\n if (resetButton.resetDescription == null) {\n resetButton.resetDescription = computed(() =>\n Decimal.lt(resetButton.conversion.gainResource.value, 1e3) ? \"Reset for \" : \"\"\n );\n } else {\n processComputable(resetButton as T, \"resetDescription\");\n }\n\n if (resetButton.display == null) {\n resetButton.display = jsx(() => (\n <span>\n {unref(resetButton.resetDescription as ProcessedComputable<string>)}\n <b>\n {displayResource(\n resetButton.conversion.gainResource,\n Decimal.max(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n {resetButton.conversion.buyMax ? \"Next:\" : \"Req:\"}{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n resetButton.conversion.buyMax ||\n Decimal.floor(unref(resetButton.conversion.actualGain)).neq(1)\n ? unref(resetButton.conversion.nextAt)\n : unref(resetButton.conversion.currentAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gte(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n );\n }\n\n const onClick = resetButton.onClick;\n resetButton.onClick = function () {\n if (!unref(resetButton.canClick)) {\n return;\n }\n resetButton.conversion.convert();\n resetButton.tree.reset(resetButton.treeNode);\n onClick?.();\n };\n\n return resetButton;\n }) as unknown as ResetButton<T>;\n}\n\nexport interface LayerTreeNodeOptions extends TreeNodeOptions {\n layerID: string;\n color: Computable<string>; // marking as required\n display?: Computable<string>;\n append?: Computable<boolean>;\n}\nexport type LayerTreeNode<T extends LayerTreeNodeOptions> = Replace<\n TreeNode<T>,\n {\n display: GetComputableTypeWithDefault<T[\"display\"], T[\"layerID\"]>;\n append: GetComputableType<T[\"append\"]>;\n }\n>;\nexport type GenericLayerTreeNode = Replace<\n LayerTreeNode<LayerTreeNodeOptions>,\n {\n display: ProcessedComputable<string>;\n append?: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createLayerTreeNode<T extends LayerTreeNodeOptions>(\n optionsFunc: OptionsFunc<T>\n): LayerTreeNode<T> {\n return createTreeNode(() => {\n const options = optionsFunc();\n processComputable(options as T, \"display\");\n setDefault(options, \"display\", options.layerID);\n processComputable(options as T, \"append\");\n return {\n ...options,\n display: options.layerID,\n onClick: unref((options as unknown as GenericLayerTreeNode).append)\n ? function () {\n if (player.tabs.includes(options.layerID)) {\n const index = player.tabs.lastIndexOf(options.layerID);\n player.tabs.splice(index, 1);\n } else {\n player.tabs.push(options.layerID);\n }\n }\n : function () {\n player.tabs.splice(1, 1, options.layerID);\n }\n };\n }) as unknown as LayerTreeNode<T>;\n}\n","import { GenericLayer } from \"game/layers\";\nimport { Modifier } from \"game/modifiers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, isRef, Ref, unref } from \"vue\";\nimport { OptionsFunc, Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: Computable<DecimalSource>;\n actualGain?: Computable<DecimalSource>;\n currentAt?: Computable<DecimalSource>;\n nextAt?: Computable<DecimalSource>;\n baseResource: Resource;\n gainResource: Resource;\n buyMax?: Computable<boolean>;\n roundUpCost?: Computable<boolean>;\n convert?: VoidFunction;\n gainModifier?: Modifier;\n}\n\nexport interface BaseConversion {\n convert: VoidFunction;\n}\n\nexport type Conversion<T extends ConversionOptions> = Replace<\n T & BaseConversion,\n {\n currentGain: GetComputableTypeWithDefault<T[\"currentGain\"], Ref<DecimalSource>>;\n actualGain: GetComputableTypeWithDefault<T[\"actualGain\"], Ref<DecimalSource>>;\n currentAt: GetComputableTypeWithDefault<T[\"currentAt\"], Ref<DecimalSource>>;\n nextAt: GetComputableTypeWithDefault<T[\"nextAt\"], Ref<DecimalSource>>;\n buyMax: GetComputableTypeWithDefault<T[\"buyMax\"], true>;\n roundUpCost: GetComputableTypeWithDefault<T[\"roundUpCost\"], true>;\n }\n>;\n\nexport type GenericConversion = Replace<\n Conversion<ConversionOptions>,\n {\n currentGain: ProcessedComputable<DecimalSource>;\n actualGain: ProcessedComputable<DecimalSource>;\n currentAt: ProcessedComputable<DecimalSource>;\n nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: OptionsFunc<T, Conversion<T>, BaseConversion>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = conversion.currentGain;\n }\n if (conversion.currentAt == null) {\n conversion.currentAt = computed(() => {\n let current = conversion.scaling.currentAt(conversion as GenericConversion);\n if (conversion.roundUpCost) current = Decimal.ceil(current);\n return current;\n });\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() => {\n let next = conversion.scaling.nextAt(conversion as GenericConversion);\n if (conversion.roundUpCost) next = Decimal.ceil(next);\n return next;\n });\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n unref((conversion as GenericConversion).currentGain)\n );\n // TODO just subtract cost?\n conversion.baseResource.value = 0;\n };\n }\n\n processComputable(conversion as T, \"currentGain\");\n processComputable(conversion as T, \"actualGain\");\n processComputable(conversion as T, \"currentAt\");\n processComputable(conversion as T, \"nextAt\");\n processComputable(conversion as T, \"buyMax\");\n setDefault(conversion, \"buyMax\", true);\n processComputable(conversion as T, \"roundUpCost\");\n setDefault(conversion, \"roundUpCost\", true);\n\n return conversion as unknown as Conversion<T>;\n });\n}\n\nexport type ScalingFunction = {\n currentGain: (conversion: GenericConversion) => DecimalSource;\n currentAt: (conversion: GenericConversion) => DecimalSource;\n nextAt: (conversion: GenericConversion) => DecimalSource;\n};\n\n// Gain formula is (baseResource - base) * coefficient\n// e.g. if base is 10 and coefficient is 0.5, 10 points makes 1 gain, 12 points is 2\nexport function createLinearScaling(\n base: DecimalSource | Ref<DecimalSource>,\n coefficient: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n if (Decimal.lt(conversion.baseResource.value, unref(base))) {\n return 0;\n }\n\n return Decimal.sub(conversion.baseResource.value, unref(base))\n .sub(1)\n .times(unref(coefficient))\n .add(1);\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.times(current, unref(coefficient)).add(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.times(next, unref(coefficient)).add(unref(base)).max(unref(base));\n }\n };\n}\n\n// Gain formula is (baseResource / base) ^ exponent\n// e.g. if exponent is 0.5 and base is 10, then having 10 points makes gain 1, and 40 points is 2\nexport function createPolynomialScaling(\n base: DecimalSource | Ref<DecimalSource>,\n exponent: DecimalSource | Ref<DecimalSource>\n): ScalingFunction {\n return {\n currentGain(conversion) {\n const gain = Decimal.div(conversion.baseResource.value, unref(base)).pow(\n unref(exponent)\n );\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n return gain;\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.root(current, unref(exponent)).times(unref(base));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.root(next, unref(exponent)).times(unref(base)).max(unref(base));\n }\n };\n}\n\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(() => {\n const conversion: S = optionsFunc();\n\n setDefault(conversion, \"buyMax\", false);\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(conversion.gainResource.value);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(Decimal.add(conversion.gainResource.value, 1));\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = computed(() => {\n let gain = Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n ).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.gainModifier\n ? conversion.gainModifier.apply(\n unref((conversion as GenericConversion).currentGain)\n )\n : unref((conversion as GenericConversion).currentGain);\n // TODO just subtract cost?\n // Maybe by adding a cost function to scaling and nextAt just calls the cost function\n // with 1 + currentGain\n conversion.baseResource.value = 0;\n });\n\n return conversion;\n });\n}\n\nexport function setupPassiveGeneration(\n layer: GenericLayer,\n conversion: GenericConversion,\n rate: ProcessedComputable<DecimalSource> = 1\n): void {\n layer.on(\"preUpdate\", diff => {\n const currRate = isRef(rate) ? rate.value : rate;\n if (Decimal.neq(currRate, 0)) {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n Decimal.times(currRate, diff).times(unref(conversion.currentGain))\n );\n }\n });\n}\n\nfunction softcap(\n value: DecimalSource,\n cap: DecimalSource,\n power: DecimalSource = 0.5\n): DecimalSource {\n if (Decimal.lte(value, cap)) {\n return value;\n } else {\n return Decimal.pow(value, power).times(Decimal.pow(cap, Decimal.sub(1, power)));\n }\n}\n\nexport function addSoftcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>,\n power: ProcessedComputable<DecimalSource> = 0.5\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion =>\n softcap(scaling.currentGain(conversion), unref(cap), unref(power))\n };\n}\n\nexport function addHardcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion => Decimal.min(scaling.currentGain(conversion), unref(cap))\n };\n}\n","import { createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6447a93e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"toggle\" }, \"▼\", -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_CollapseTransition = _resolveComponent(\"CollapseTransition\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"infobox\", { collapsed: _ctx.unref(_ctx.collapsed), stacked: _ctx.stacked, ..._ctx.unref(_ctx.classes) }]),\n style: _normalizeStyle([\n {\n borderColor: _ctx.unref(_ctx.color),\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n _createElementVNode(\"button\", {\n class: \"title\",\n style: _normalizeStyle([{ backgroundColor: _ctx.unref(_ctx.color) }, _ctx.unref(_ctx.titleStyle) || []]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.collapsed.value = !_ctx.unref(_ctx.collapsed)))\n }, [\n _hoisted_1,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ], 4),\n _createVNode(_component_CollapseTransition, null, {\n default: _withCtx(() => [\n (!_ctx.unref(_ctx.collapsed))\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"body\",\n style: _normalizeStyle({ backgroundColor: _ctx.unref(_ctx.color) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.bodyComponent), {\n style: _normalizeStyle(_ctx.unref(_ctx.bodyStyle))\n }, null, 8, [\"style\"]))\n ], 4))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Node from \"components/Node.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport settings from \"game/settings\";\nimport { computeComponent, processedPropType } from \"util/vue\";\nimport CollapseTransition from \"@ivanv/vue-collapse-transition/src/CollapseTransition.vue\";\nimport { computed, defineComponent, PropType, Ref, StyleValue, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n color: processedPropType<string>(String),\n collapsed: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n titleStyle: processedPropType<StyleValue>(Object, String, Array),\n bodyStyle: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n CollapseTransition\n },\n setup(props) {\n const { title, display } = toRefs(props);\n\n const titleComponent = computeComponent(title);\n const bodyComponent = computeComponent(display);\n const stacked = computed(() => themes[settings.theme].mergeAdjacent);\n\n return {\n titleComponent,\n bodyComponent,\n stacked,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Infobox.vue?vue&type=template&id=6447a93e&scoped=true&ts=true\"\nimport script from \"./Infobox.vue?vue&type=script&lang=ts\"\nexport * from \"./Infobox.vue?vue&type=script&lang=ts\"\n\nimport \"./Infobox.vue?vue&type=style&index=0&id=6447a93e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6447a93e\"]])\n\nexport default __exports__","import InfoboxComponent from \"features/infoboxes/Infobox.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Ref, unref } from \"vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\n\nexport const InfoboxType = Symbol(\"Infobox\");\n\nexport interface InfoboxOptions {\n visibility?: Computable<Visibility>;\n color?: Computable<string>;\n style?: Computable<StyleValue>;\n titleStyle?: Computable<StyleValue>;\n bodyStyle?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n title: Computable<CoercableComponent>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseInfobox extends Persistent<boolean> {\n id: string;\n collapsed: Ref<boolean>;\n type: typeof InfoboxType;\n [Component]: typeof InfoboxComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Infobox<T extends InfoboxOptions> = Replace<\n T & BaseInfobox,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n color: GetComputableType<T[\"color\"]>;\n style: GetComputableType<T[\"style\"]>;\n titleStyle: GetComputableType<T[\"titleStyle\"]>;\n bodyStyle: GetComputableType<T[\"bodyStyle\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n title: GetComputableType<T[\"title\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericInfobox = Replace<\n Infobox<InfoboxOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createInfobox<T extends InfoboxOptions>(\n optionsFunc: OptionsFunc<T, Infobox<T>, BaseInfobox>\n): Infobox<T> {\n return createLazyProxy(persistent => {\n const infobox = Object.assign(persistent, optionsFunc());\n infobox.id = getUniqueID(\"infobox-\");\n infobox.type = InfoboxType;\n infobox[Component] = InfoboxComponent;\n\n infobox.collapsed = infobox[PersistentState];\n\n processComputable(infobox as T, \"visibility\");\n setDefault(infobox, \"visibility\", Visibility.Visible);\n processComputable(infobox as T, \"color\");\n processComputable(infobox as T, \"style\");\n processComputable(infobox as T, \"titleStyle\");\n processComputable(infobox as T, \"bodyStyle\");\n processComputable(infobox as T, \"classes\");\n processComputable(infobox as T, \"title\");\n processComputable(infobox as T, \"display\");\n\n infobox[GatherProps] = function (this: GenericInfobox) {\n const {\n visibility,\n display,\n title,\n color,\n collapsed,\n style,\n titleStyle,\n bodyStyle,\n classes,\n id\n } = this;\n return {\n visibility,\n display,\n title,\n color,\n collapsed,\n style: unref(style),\n titleStyle,\n bodyStyle,\n classes,\n id\n };\n };\n\n return infobox as unknown as Infobox<T>;\n }, persistent<boolean>(false));\n}\n","import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n ref: \"resizeListener\",\n class: _normalizeClass([\"resize-listener\", _ctx.unref(_ctx.classes)]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, null, 6))\n}","\nimport { StyleValue } from \"features/feature\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\nimport { Application } from \"pixi.js\";\nimport { processedPropType } from \"util/vue\";\nimport {\n defineComponent,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n PropType,\n ref,\n unref\n} from \"vue\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onInit: {\n type: Function as PropType<(app: Application) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>,\n onHotReload: Function as PropType<VoidFunction>\n },\n setup(props) {\n const app = ref<null | Application>(null);\n\n const resizeObserver = new ResizeObserver(updateBounds);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const nodes = inject(NodesInjectionKey)!;\n\n const resizeListener = ref<HTMLElement | null>(null);\n\n onMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n app.value = new Application({\n resizeTo: resListener,\n backgroundAlpha: 0\n });\n resizeListener.value?.appendChild(app.value.view);\n props.onInit(app.value as Application);\n }\n updateBounds();\n if (module.hot?.status() === \"apply\" && props.onHotReload) {\n nextTick(props.onHotReload);\n }\n });\n onBeforeUnmount(() => {\n app.value?.destroy();\n });\n\n let isDirty = true;\n function updateBounds() {\n if (isDirty) {\n isDirty = false;\n nextTick(() => {\n if (resizeListener.value != null && props.onContainerResized) {\n // TODO don't overlap with Links.vue\n (Object.values(nodes.value).filter(n => n) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n app.value?.resize();\n }\n isDirty = true;\n });\n }\n }\n document.fonts.ready.then(updateBounds);\n\n return {\n unref,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=4e1c0c10&scoped=true&ts=true\"\nimport script from \"./Particles.vue?vue&type=script&lang=tsx\"\nexport * from \"./Particles.vue?vue&type=script&lang=tsx\"\n\nimport \"./Particles.vue?vue&type=style&index=0&id=4e1c0c10&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4e1c0c10\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Ref, shallowRef, unref } from \"vue\";\nimport {\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Application } from \"pixi.js\";\nimport { Emitter, EmitterConfigV3, upgradeConfig } from \"@pixi/particle-emitter\";\nimport { Computable, GetComputableType } from \"util/computed\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n onContainerResized?: (boundingRect: DOMRect) => void;\n onHotReload?: VoidFunction;\n}\n\nexport interface BaseParticles {\n id: string;\n app: Ref<null | Application>;\n addEmitter: (config: EmitterConfigV3) => Promise<Emitter>;\n type: typeof ParticlesType;\n [Component]: typeof ParticlesComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Particles<T extends ParticlesOptions> = Replace<\n T & BaseParticles,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n }\n>;\n\nexport type GenericParticles = Particles<ParticlesOptions>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: OptionsFunc<T, Particles<T>, BaseParticles>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.app = shallowRef(null);\n particles.addEmitter = (config: EmitterConfigV3): Promise<Emitter> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.app.value) {\n return Promise.resolve(new Emitter(genericParticles.app.value.stage, config));\n }\n return new Promise<Emitter>(resolve => {\n emittersToAdd.push({ resolve, config });\n });\n };\n\n let emittersToAdd: {\n resolve: (value: Emitter | PromiseLike<Emitter>) => void;\n config: EmitterConfigV3;\n }[] = [];\n\n function onInit(app: Application) {\n (particles as GenericParticles).app.value = app;\n emittersToAdd.forEach(({ resolve, config }) => resolve(new Emitter(app.stage, config)));\n emittersToAdd = [];\n }\n\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, style, classes, onContainerResized, onHotReload } = this;\n return {\n id,\n style: unref(style),\n classes,\n onContainerResized,\n onHotReload,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n\ndeclare global {\n interface Window {\n upgradeConfig: typeof upgradeConfig;\n }\n}\nwindow.upgradeConfig = upgradeConfig;\n","import { OptionsFunc, getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport { DefaultValue, Persistent, persistent, PersistentState } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { Computable, GetComputableType, processComputable } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Unsubscribe } from \"nanoevents\";\nimport { isRef, unref } from \"vue\";\n\nexport const ResetType = Symbol(\"Reset\");\n\nexport interface ResetOptions {\n thingsToReset: Computable<Record<string, unknown>[]>;\n onReset?: VoidFunction;\n}\n\nexport interface BaseReset {\n id: string;\n reset: VoidFunction;\n type: typeof ResetType;\n}\n\nexport type Reset<T extends ResetOptions> = Replace<\n T & BaseReset,\n {\n thingsToReset: GetComputableType<T[\"thingsToReset\"]>;\n }\n>;\n\nexport type GenericReset = Reset<ResetOptions>;\n\nexport function createReset<T extends ResetOptions>(\n optionsFunc: OptionsFunc<T, Reset<T>, BaseReset>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset = optionsFunc();\n reset.id = getUniqueID(\"reset-\");\n reset.type = ResetType;\n\n reset.reset = function () {\n const handleObject = (obj: unknown) => {\n if (obj && typeof obj === \"object\") {\n if (PersistentState in obj) {\n (obj as Persistent)[PersistentState].value = (obj as Persistent)[\n DefaultValue\n ];\n } else if (!(obj instanceof Decimal) && !isRef(obj)) {\n Object.values(obj).forEach(obj =>\n handleObject(obj as Record<string, unknown>)\n );\n }\n }\n };\n unref((reset as GenericReset).thingsToReset).forEach(handleObject);\n globalBus.emit(\"reset\", reset as GenericReset);\n reset.onReset?.();\n };\n\n processComputable(reset as T, \"thingsToReset\");\n\n return reset as unknown as Reset<T>;\n });\n}\n\nconst listeners: Record<string, Unsubscribe | undefined> = {};\nexport function trackResetTime(layer: GenericLayer, reset: GenericReset): Persistent<Decimal> {\n const resetTime = persistent<Decimal>(new Decimal(0));\n listeners[layer.id] = layer.on(\"preUpdate\", diff => {\n resetTime.value = Decimal.add(resetTime.value, diff);\n });\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === reset) {\n resetTime.value = new Decimal(0);\n }\n });\n return resetTime;\n}\nglobalBus.on(\"removeLayer\", layer => {\n // unsubscribe from preUpdate\n listeners[layer.id]?.();\n listeners[layer.id] = undefined;\n});\n\ndeclare module \"game/events\" {\n interface GlobalEvents {\n reset: (reset: GenericReset) => void;\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n resource: Resource;\n color: string;\n}\n\n\n\nconst amount = computed(() => displayResource(props.resource));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"h2\", {\n style: _normalizeStyle({ color: __props.color, 'text-shadow': '0px 0px 10px ' + __props.color })\n }, _toDisplayString(_unref(amount)), 5))\n}\n}\n\n})","import script from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = { key: 1 }\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\", \")\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\n\nimport { CoercableComponent } from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport Decimal from \"util/bignum\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { computed, Ref, StyleValue, toRefs } from \"vue\";\nimport ResourceVue from \"features/resources/Resource.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null,\n classes: null,\n style: null,\n effectDisplay: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n resource: Resource;\n color?: string;\n classes?: Record<string, boolean>;\n style?: StyleValue;\n effectDisplay?: CoercableComponent;\n}\n\n\nconst props = toRefs(_props);\n\nconst effectComponent = computeOptionalComponent(\n props.effectDisplay as Ref<CoercableComponent | undefined>\n);\n\nconst showPrefix = computed(() => {\n return Decimal.lt(props.resource.value, \"1e1000\");\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (_unref(showPrefix))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"You have \"))\n : _createCommentVNode(\"\", true),\n _createVNode(ResourceVue, {\n resource: __props.resource,\n color: __props.color || 'white'\n }, null, 8, [\"resource\", \"color\"]),\n _createTextVNode(\" \" + _toDisplayString(__props.resource.displayName), 1),\n (_unref(effectComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _hoisted_3,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(effectComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_4,\n _hoisted_5\n ]))\n}\n}\n\n})","import script from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { CoercableComponent, jsx } from \"features/feature\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { Computable, convertComputable, ProcessedComputable } from \"util/computed\";\nimport { renderJSX } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/modifiers.css\";\n\nexport interface Modifier {\n apply: (gain: DecimalSource) => DecimalSource;\n revert: (gain: DecimalSource) => DecimalSource;\n enabled: ProcessedComputable<boolean>;\n description?: ProcessedComputable<CoercableComponent>;\n}\n\nexport function createAdditiveModifier(\n addend: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedAddend = convertComputable(addend);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.add(gain, unref(processedAddend)),\n revert: gain => Decimal.sub(gain, unref(processedAddend)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">+{format(unref(processedAddend))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createMultiplicativeModifier(\n multiplier: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedMultiplier = convertComputable(multiplier);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.times(gain, unref(processedMultiplier)),\n revert: gain => Decimal.div(gain, unref(processedMultiplier)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">x{format(unref(processedMultiplier))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createExponentialModifier(\n exponent: Computable<DecimalSource>,\n description?: Computable<CoercableComponent>,\n enabled?: Computable<boolean>\n): Modifier {\n const processedExponent = convertComputable(exponent);\n const processedDescription = convertComputable(description);\n const processedEnabled = convertComputable(enabled == null ? true : enabled);\n return {\n apply: gain => Decimal.pow(gain, unref(processedExponent)),\n revert: gain => Decimal.root(gain, unref(processedExponent)),\n enabled: processedEnabled,\n description: jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">^{format(unref(processedExponent))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n };\n}\n\nexport function createSequentialModifier(...modifiers: Modifier[]): Required<Modifier> {\n return {\n apply: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: gain =>\n modifiers\n .filter(m => unref(m.enabled))\n .reduceRight((gain, modifier) => modifier.revert(gain), gain),\n enabled: computed(() => modifiers.filter(m => unref(m.enabled)).length > 0),\n description: jsx(() => (\n <>\n {(\n modifiers\n .filter(m => unref(m.enabled))\n .map(m => unref(m.description))\n .filter(d => d) as CoercableComponent[]\n ).map(renderJSX)}\n </>\n ))\n };\n}\n\nexport function createModifierSection(\n title: string,\n subtitle: string,\n modifier: Required<Modifier>,\n base: DecimalSource = 1,\n unit = \"\"\n) {\n return (\n <div>\n <h3>\n {title}\n {subtitle ? <span class=\"subtitle\"> ({subtitle})</span> : null}\n </h3>\n <br />\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {format(base)}\n {unit}\n </span>\n <span class=\"modifier-description\">Base</span>\n </div>\n {renderJSX(unref(modifier.description))}\n <hr />\n Total: {format(modifier.apply(base))}\n {unit}\n </div>\n );\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, isRef as _isRef, vModelText as _vModelText, createElementVNode as _createElementVNode, withDirectives as _withDirectives, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-20a0a34d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_3 = [\"min\", \"max\"]\n\nimport { computed, toRefs, unref } from \"vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n min: null,\n max: null\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: number): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: string;\n modelValue?: number;\n min?: number;\n max?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst value = computed({\n get() {\n return String(unref(props.modelValue) || 0);\n },\n set(value: string) {\n emit(\"update:modelValue\", Number(value));\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.title)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(__props.title), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(Tooltip, {\n display: `${_unref(value)}`,\n class: _normalizeClass({ fullWidth: !__props.title })\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"range\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n min: __props.min,\n max: __props.max\n }, null, 8, _hoisted_3), [\n [_vModelText, _unref(value)]\n ])\n ]),\n _: 1\n }, 8, [\"display\", \"class\"])\n ]))\n}\n}\n\n})","import script from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Slider.vue?vue&type=style&index=0&id=20a0a34d&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-20a0a34d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { nextTick, onMounted, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst top = ref(\"0\");\nconst observer = new ResizeObserver(updateTop);\nconst element = ref<HTMLElement | null>(null);\n\nfunction updateTop() {\n let el = element.value;\n if (el == undefined) {\n return;\n }\n\n let newTop = 0;\n while (el.previousSibling) {\n const sibling = el.previousSibling as HTMLElement;\n if (sibling.dataset && \"vSticky\" in sibling.dataset) {\n newTop += sibling.offsetHeight;\n }\n el = sibling;\n }\n top.value = newTop + \"px\";\n}\n\nnextTick(updateTop);\ndocument.fonts.ready.then(updateTop);\n\nonMounted(() => {\n const el = element.value?.parentElement;\n if (el) {\n observer.observe(el);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"sticky\",\n style: _normalizeStyle({ top: top.value }),\n ref_key: \"element\",\n ref: element,\n \"data-v-sticky\": \"\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n}\n}\n\n})","import script from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Sticky.vue?vue&type=style&index=0&id=6987dd96&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6987dd96\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n height: null\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"vr\",\n style: _normalizeStyle({ height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./VerticalRule.vue?vue&type=style&index=0&id=15f6e746&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15f6e746\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n width: _ctx.unref(_ctx.width) + 'px',\n height: _ctx.unref(_ctx.height) + 'px',\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n bar: true,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"overlayTextContainer border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), {\n key: 0,\n class: \"overlayText\",\n style: _normalizeStyle(_ctx.unref(_ctx.textStyle))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.style) ?? {},\n _ctx.unref(_ctx.baseStyle) ?? {},\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n _createElementVNode(\"div\", {\n class: \"fill\",\n style: _normalizeStyle([_ctx.barStyle, _ctx.unref(_ctx.style) ?? {}, _ctx.unref(_ctx.fillStyle) ?? {}])\n }, null, 4)\n ], 4),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { Direction } from \"./bar\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, CSSProperties, defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n progress: {\n type: processedPropType<DecimalSource>(String, Object, Number),\n required: true\n },\n width: {\n type: processedPropType<number>(Number),\n required: true\n },\n height: {\n type: processedPropType<number>(Number),\n required: true\n },\n direction: {\n type: processedPropType<Direction>(String),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n borderStyle: processedPropType<StyleValue>(Object, String, Array),\n textStyle: processedPropType<StyleValue>(Object, String, Array),\n baseStyle: processedPropType<StyleValue>(Object, String, Array),\n fillStyle: processedPropType<StyleValue>(Object, String, Array),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { progress, width, height, direction, display } = toRefs(props);\n\n const normalizedProgress = computed(() => {\n let progressNumber =\n progress.value instanceof Decimal\n ? progress.value.toNumber()\n : Number(progress.value);\n return (1 - Math.min(Math.max(progressNumber, 0), 1)) * 100;\n });\n\n const barStyle = computed(() => {\n const barStyle: Partial<CSSProperties> = {\n width: unwrapRef(width) + 0.5 + \"px\",\n height: unwrapRef(height) + 0.5 + \"px\"\n };\n switch (unref(direction)) {\n case Direction.Up:\n barStyle.clipPath = `inset(${normalizedProgress.value}% 0% 0% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Down:\n barStyle.clipPath = `inset(0% 0% ${normalizedProgress.value}% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Right:\n barStyle.clipPath = `inset(0% ${normalizedProgress.value}% 0% 0%)`;\n break;\n case Direction.Left:\n barStyle.clipPath = `inset(0% 0% 0% ${normalizedProgress.value} + '%)`;\n break;\n case Direction.Default:\n barStyle.clipPath = \"inset(0% 50% 0% 0%)\";\n break;\n }\n return barStyle;\n });\n\n const component = computeOptionalComponent(display);\n\n return {\n normalizedProgress,\n barStyle,\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Bar.vue?vue&type=template&id=e6e3c366&scoped=true&ts=true\"\nimport script from \"./Bar.vue?vue&type=script&lang=ts\"\nexport * from \"./Bar.vue?vue&type=script&lang=ts\"\n\nimport \"./Bar.vue?vue&type=style&index=0&id=e6e3c366&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e6e3c366\"]])\n\nexport default __exports__","import BarComponent from \"features/bars/Bar.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { unref } from \"vue\";\n\nexport const BarType = Symbol(\"Bar\");\n\nexport enum Direction {\n Up = \"Up\",\n Down = \"Down\",\n Left = \"Left\",\n Right = \"Right\",\n Default = \"Up\"\n}\n\nexport interface BarOptions {\n visibility?: Computable<Visibility>;\n width: Computable<number>;\n height: Computable<number>;\n direction: Computable<Direction>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n borderStyle?: Computable<StyleValue>;\n baseStyle?: Computable<StyleValue>;\n textStyle?: Computable<StyleValue>;\n fillStyle?: Computable<StyleValue>;\n progress: Computable<DecimalSource>;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n}\n\nexport interface BaseBar {\n id: string;\n type: typeof BarType;\n [Component]: typeof BarComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Bar<T extends BarOptions> = Replace<\n T & BaseBar,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n width: GetComputableType<T[\"width\"]>;\n height: GetComputableType<T[\"height\"]>;\n direction: GetComputableType<T[\"direction\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n borderStyle: GetComputableType<T[\"borderStyle\"]>;\n baseStyle: GetComputableType<T[\"baseStyle\"]>;\n textStyle: GetComputableType<T[\"textStyle\"]>;\n fillStyle: GetComputableType<T[\"fillStyle\"]>;\n progress: GetComputableType<T[\"progress\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericBar = Replace<\n Bar<BarOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createBar<T extends BarOptions>(\n optionsFunc: OptionsFunc<T, Bar<T>, BaseBar>\n): Bar<T> {\n return createLazyProxy(() => {\n const bar = optionsFunc();\n bar.id = getUniqueID(\"bar-\");\n bar.type = BarType;\n bar[Component] = BarComponent;\n\n processComputable(bar as T, \"visibility\");\n setDefault(bar, \"visibility\", Visibility.Visible);\n processComputable(bar as T, \"width\");\n processComputable(bar as T, \"height\");\n processComputable(bar as T, \"direction\");\n processComputable(bar as T, \"style\");\n processComputable(bar as T, \"classes\");\n processComputable(bar as T, \"borderStyle\");\n processComputable(bar as T, \"baseStyle\");\n processComputable(bar as T, \"textStyle\");\n processComputable(bar as T, \"fillStyle\");\n processComputable(bar as T, \"progress\");\n processComputable(bar as T, \"display\");\n processComputable(bar as T, \"mark\");\n\n bar[GatherProps] = function (this: GenericBar) {\n const {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style,\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n } = this;\n return {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style: unref(style),\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n };\n };\n\n return bar as unknown as Bar<T>;\n });\n}\n","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport { Resource } from \"features/resources/resource\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref } from \"vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"./feature\";\n\nexport const BuyableType = Symbol(\"Buyable\");\n\nexport type BuyableDisplay =\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n };\n\nexport interface BuyableOptions {\n visibility?: Computable<Visibility>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canPurchase?: Computable<boolean>;\n purchaseLimit?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n small?: Computable<boolean>;\n display?: Computable<BuyableDisplay>;\n onPurchase?: (cost: DecimalSource) => void;\n}\n\nexport interface BaseBuyable extends Persistent<DecimalSource> {\n id: string;\n amount: Ref<DecimalSource>;\n maxed: Ref<boolean>;\n canAfford: Ref<boolean>;\n canClick: ProcessedComputable<boolean>;\n onClick: VoidFunction;\n purchase: VoidFunction;\n type: typeof BuyableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Buyable<T extends BuyableOptions> = Replace<\n T & BaseBuyable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n cost: GetComputableType<T[\"cost\"]>;\n resource: GetComputableType<T[\"resource\"]>;\n canPurchase: GetComputableTypeWithDefault<T[\"canPurchase\"], Ref<boolean>>;\n purchaseLimit: GetComputableTypeWithDefault<T[\"purchaseLimit\"], Decimal>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n small: GetComputableType<T[\"small\"]>;\n display: Ref<CoercableComponent>;\n }\n>;\n\nexport type GenericBuyable = Replace<\n Buyable<BuyableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n purchaseLimit: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createBuyable<T extends BuyableOptions>(\n optionsFunc: OptionsFunc<T, Buyable<T>, BaseBuyable>\n): Buyable<T> {\n return createLazyProxy(persistent => {\n const buyable = Object.assign(persistent, optionsFunc());\n\n if (buyable.canPurchase == null && (buyable.resource == null || buyable.cost == null)) {\n console.warn(\n \"Cannot create buyable without a canPurchase property or a resource and cost property\",\n buyable\n );\n throw \"Cannot create buyable without a canPurchase property or a resource and cost property\";\n }\n\n buyable.id = getUniqueID(\"buyable-\");\n buyable.type = BuyableType;\n buyable[Component] = ClickableComponent;\n\n buyable.amount = buyable[PersistentState];\n buyable.canAfford = computed(() => {\n const genericBuyable = buyable as GenericBuyable;\n const cost = unref(genericBuyable.cost);\n return (\n genericBuyable.resource != null &&\n cost != null &&\n Decimal.gte(genericBuyable.resource.value, cost)\n );\n });\n if (buyable.canPurchase == null) {\n buyable.canPurchase = computed(\n () =>\n unref((buyable as GenericBuyable).visibility) === Visibility.Visible &&\n unref((buyable as GenericBuyable).canAfford) &&\n Decimal.lt(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n }\n buyable.maxed = computed(() =>\n Decimal.gte(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n processComputable(buyable as T, \"classes\");\n const classes = buyable.classes as ProcessedComputable<Record<string, boolean>> | undefined;\n buyable.classes = computed(() => {\n const currClasses = unref(classes) || {};\n if ((buyable as GenericBuyable).maxed.value) {\n currClasses.bought = true;\n }\n return currClasses;\n });\n processComputable(buyable as T, \"canPurchase\");\n buyable.canClick = buyable.canPurchase as ProcessedComputable<boolean>;\n buyable.onClick = buyable.purchase = function () {\n const genericBuyable = buyable as GenericBuyable;\n if (\n !unref(genericBuyable.canPurchase) ||\n genericBuyable.cost == null ||\n genericBuyable.resource == null\n ) {\n return;\n }\n const cost = unref(genericBuyable.cost);\n genericBuyable.resource.value = Decimal.sub(genericBuyable.resource.value, cost);\n genericBuyable.amount.value = Decimal.add(genericBuyable.amount.value, 1);\n this.onPurchase?.(cost);\n };\n processComputable(buyable as T, \"display\");\n const display = buyable.display;\n buyable.display = jsx(() => {\n // TODO once processComputable types correctly, remove this \"as X\"\n const currDisplay = unref(display) as BuyableDisplay;\n if (isCoercableComponent(currDisplay)) {\n const CurrDisplay = coerceComponent(currDisplay);\n return <CurrDisplay />;\n }\n if (currDisplay != null && buyable.cost != null && buyable.resource != null) {\n const genericBuyable = buyable as GenericBuyable;\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description);\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n const amountDisplay =\n unref(genericBuyable.purchaseLimit) === Decimal.dInf ? (\n <>Amount: {formatWhole(genericBuyable.amount.value)}</>\n ) : (\n <>\n Amount: {formatWhole(genericBuyable.amount.value)} /{\" \"}\n {formatWhole(unref(genericBuyable.purchaseLimit))}\n </>\n );\n\n return (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n <div>\n <br />\n {amountDisplay}\n </div>\n {currDisplay.effectDisplay ? (\n <div>\n <br />\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {genericBuyable.cost && !genericBuyable.maxed.value ? (\n <div>\n <br />\n Cost: {format(unref(genericBuyable.cost) || 0)}{\" \"}\n {buyable.resource.displayName}\n </div>\n ) : null}\n </span>\n );\n }\n return \"\";\n });\n\n processComputable(buyable as T, \"visibility\");\n setDefault(buyable, \"visibility\", Visibility.Visible);\n processComputable(buyable as T, \"cost\");\n processComputable(buyable as T, \"resource\");\n processComputable(buyable as T, \"purchaseLimit\");\n setDefault(buyable, \"purchaseLimit\", Decimal.dInf);\n processComputable(buyable as T, \"style\");\n processComputable(buyable as T, \"mark\");\n processComputable(buyable as T, \"small\");\n\n buyable[GatherProps] = function (this: GenericBuyable) {\n const { display, visibility, style, classes, onClick, canClick, small, mark, id } =\n this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return buyable as unknown as Buyable<T>;\n }, persistent<DecimalSource>(0));\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e580749\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.notifyStyle,\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n feature: true,\n challenge: true,\n done: _ctx.unref(_ctx.completed),\n canStart: _ctx.unref(_ctx.canStart) && !_ctx.unref(_ctx.maxed),\n maxed: _ctx.unref(_ctx.maxed),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"button\", {\n class: \"toggleChallenge\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.toggle && _ctx.toggle(...args))),\n disabled: !_ctx.unref(_ctx.canStart) || _ctx.unref(_ctx.maxed)\n }, _toDisplayString(_ctx.buttonText), 9, _hoisted_1),\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { GenericChallenge } from \"features/challenges/challenge\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { getHighNotifyStyle, getNotifyStyle } from \"game/notifications\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n active: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n maxed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canComplete: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n display: processedPropType<UnwrapRef<GenericChallenge[\"display\"]>>(\n String,\n Object,\n Function\n ),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n completed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canStart: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n toggle: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { active, maxed, canComplete, display } = toRefs(props);\n\n const buttonText = computed(() => {\n if (active.value) {\n return canComplete.value ? \"Finish\" : \"Exit Early\";\n }\n if (maxed.value) {\n return \"Completed\";\n }\n return \"Start\";\n });\n\n const comp = shallowRef<Component | string>(\"\");\n\n const notifyStyle = computed(() => {\n const currActive = unwrapRef(active);\n const currCanComplete = unwrapRef(canComplete);\n if (currActive) {\n if (currCanComplete) {\n return getHighNotifyStyle();\n }\n return getNotifyStyle();\n }\n return {};\n });\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const Goal = coerceComponent(currDisplay.goal || \"\");\n const Reward = coerceComponent(currDisplay.reward || \"\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.goal ? (\n <div>\n <br />\n Goal: <Goal />\n </div>\n ) : null}\n {currDisplay.reward ? (\n <div>\n <br />\n Reward: <Reward />\n </div>\n ) : null}\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n buttonText,\n notifyStyle,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Challenge.vue?vue&type=template&id=5e580749&scoped=true&ts=true\"\nimport script from \"./Challenge.vue?vue&type=script&lang=tsx\"\nexport * from \"./Challenge.vue?vue&type=script&lang=tsx\"\n\nimport \"./Challenge.vue?vue&type=style&index=0&id=5e580749&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5e580749\"]])\n\nexport default __exports__","import { isArray } from \"@vue/shared\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport ChallengeComponent from \"features/challenges/Challenge.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericReset } from \"features/reset\";\nimport { Resource } from \"features/resources/resource\";\nimport { globalBus } from \"game/events\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref, watch, WatchStopHandle } from \"vue\";\n\nexport const ChallengeType = Symbol(\"ChallengeType\");\n\nexport interface ChallengeOptions {\n visibility?: Computable<Visibility>;\n canStart?: Computable<boolean>;\n reset?: GenericReset;\n canComplete?: Computable<boolean | DecimalSource>;\n completionLimit?: Computable<DecimalSource>;\n mark?: Computable<boolean | string>;\n resource?: Resource;\n goal?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n goal?: CoercableComponent;\n reward?: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n onExit?: VoidFunction;\n onEnter?: VoidFunction;\n}\n\nexport interface BaseChallenge {\n id: string;\n completions: Persistent<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: Persistent<boolean>;\n toggle: VoidFunction;\n complete: (remainInChallenge?: boolean) => void;\n type: typeof ChallengeType;\n [Component]: typeof ChallengeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Challenge<T extends ChallengeOptions> = Replace<\n T & BaseChallenge,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canStart: GetComputableTypeWithDefault<T[\"canStart\"], true>;\n canComplete: GetComputableTypeWithDefault<T[\"canComplete\"], Ref<boolean>>;\n completionLimit: GetComputableTypeWithDefault<T[\"completionLimit\"], 1>;\n mark: GetComputableTypeWithDefault<T[\"mark\"], Ref<boolean>>;\n goal: GetComputableType<T[\"goal\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericChallenge = Replace<\n Challenge<ChallengeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canStart: ProcessedComputable<boolean>;\n canComplete: ProcessedComputable<boolean | DecimalSource>;\n completionLimit: ProcessedComputable<DecimalSource>;\n mark: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createChallenge<T extends ChallengeOptions>(\n optionsFunc: OptionsFunc<T, Challenge<T>, BaseChallenge>\n): Challenge<T> {\n const completions = persistent(0);\n const active = persistent(false);\n return createLazyProxy(() => {\n const challenge = optionsFunc();\n\n if (\n challenge.canComplete == null &&\n (challenge.resource == null || challenge.goal == null)\n ) {\n console.warn(\n \"Cannot create challenge without a canComplete property or a resource and goal property\",\n challenge\n );\n throw \"Cannot create challenge without a canComplete property or a resource and goal property\";\n }\n\n challenge.id = getUniqueID(\"challenge-\");\n challenge.type = ChallengeType;\n challenge[Component] = ChallengeComponent;\n\n challenge.completions = completions;\n challenge.active = active;\n challenge.completed = computed(() =>\n Decimal.gt((challenge as GenericChallenge).completions.value, 0)\n );\n challenge.maxed = computed(() =>\n Decimal.gte(\n (challenge as GenericChallenge).completions.value,\n unref((challenge as GenericChallenge).completionLimit)\n )\n );\n challenge.toggle = function () {\n const genericChallenge = challenge as GenericChallenge;\n if (genericChallenge.active.value) {\n if (unref(genericChallenge.canComplete) && !genericChallenge.maxed.value) {\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n }\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n } else if (\n unref(genericChallenge.canStart) &&\n unref(genericChallenge.visibility) === Visibility.Visible &&\n !genericChallenge.maxed.value\n ) {\n genericChallenge.reset?.reset();\n genericChallenge.active.value = true;\n genericChallenge.onEnter?.();\n }\n };\n challenge.complete = function (remainInChallenge?: boolean) {\n const genericChallenge = challenge as GenericChallenge;\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (\n genericChallenge.active.value &&\n completions !== false &&\n (completions === true || Decimal.neq(0, completions)) &&\n !genericChallenge.maxed.value\n ) {\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n if (remainInChallenge !== true) {\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n }\n }\n };\n processComputable(challenge as T, \"visibility\");\n setDefault(challenge, \"visibility\", Visibility.Visible);\n const visibility = challenge.visibility as ProcessedComputable<Visibility>;\n challenge.visibility = computed(() => {\n if (settings.hideChallenges === true && unref(challenge.maxed)) {\n return Visibility.None;\n }\n return unref(visibility);\n });\n if (challenge.canComplete == null) {\n challenge.canComplete = computed(() => {\n const genericChallenge = challenge as GenericChallenge;\n if (\n !genericChallenge.active.value ||\n genericChallenge.resource == null ||\n genericChallenge.goal == null\n ) {\n return false;\n }\n return Decimal.gte(genericChallenge.resource.value, unref(genericChallenge.goal));\n });\n }\n if (challenge.mark == null) {\n challenge.mark = computed(\n () =>\n Decimal.gt(unref((challenge as GenericChallenge).completionLimit), 1) &&\n !!unref(challenge.maxed)\n );\n }\n\n processComputable(challenge as T, \"canStart\");\n setDefault(challenge, \"canStart\", true);\n processComputable(challenge as T, \"canComplete\");\n processComputable(challenge as T, \"completionLimit\");\n setDefault(challenge, \"completionLimit\", 1);\n processComputable(challenge as T, \"mark\");\n processComputable(challenge as T, \"goal\");\n processComputable(challenge as T, \"classes\");\n processComputable(challenge as T, \"style\");\n processComputable(challenge as T, \"display\");\n\n if (challenge.reset != null) {\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === challenge.reset && (challenge.active as Ref<boolean>).value) {\n (challenge.toggle as VoidFunction)();\n }\n });\n }\n\n challenge[GatherProps] = function (this: GenericChallenge) {\n const {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style,\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n } = this;\n return {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style: unref(style),\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n };\n };\n\n return challenge as unknown as Challenge<T>;\n });\n}\n\nexport function setupAutoComplete(\n challenge: GenericChallenge,\n autoActive: Computable<boolean> = true,\n exitOnComplete = true\n): WatchStopHandle {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return watch([challenge.canComplete, isActive], ([canComplete, isActive]) => {\n if (canComplete && isActive) {\n challenge.complete(!exitOnComplete);\n }\n });\n}\n\nexport function createActiveChallenge(\n challenges: GenericChallenge[]\n): Ref<GenericChallenge | undefined> {\n return computed(() => challenges.find(challenge => challenge.active.value));\n}\n\nexport function isAnyChallengeActive(\n challenges: GenericChallenge[] | Ref<GenericChallenge | undefined>\n): Ref<boolean> {\n if (isArray(challenges)) {\n challenges = createActiveChallenge(challenges);\n }\n return computed(() => (challenges as Ref<GenericChallenge | undefined>).value != null);\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n hideChallenges: boolean;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"hideChallenges\", false);\n});\n\nregisterSettingField(\n jsx(() => (\n <Toggle\n title=\"Hide Maxed Challenges\"\n onUpdate:modelValue={value => (settings.hideChallenges = value)}\n modelValue={settings.hideChallenges}\n />\n ))\n);\n","import { hasWon } from \"data/projEntry\";\nimport { globalBus } from \"game/events\";\nimport player from \"game/player\";\nimport { registerInfoComponent } from \"game/settings\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n GetComputableType,\n ProcessedComputable,\n processComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { shallowReactive, unref } from \"vue\";\nimport { OptionsFunc, findFeatures, jsx, Replace, setDefault } from \"./feature\";\n\nexport const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});\nexport const HotkeyType = Symbol(\"Hotkey\");\n\nexport interface HotkeyOptions {\n enabled?: Computable<boolean>;\n key: string;\n description: Computable<string>;\n onPress: VoidFunction;\n}\n\nexport interface BaseHotkey {\n type: typeof HotkeyType;\n}\n\nexport type Hotkey<T extends HotkeyOptions> = Replace<\n T & BaseHotkey,\n {\n enabled: GetComputableTypeWithDefault<T[\"enabled\"], true>;\n description: GetComputableType<T[\"description\"]>;\n }\n>;\n\nexport type GenericHotkey = Replace<\n Hotkey<HotkeyOptions>,\n {\n enabled: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createHotkey<T extends HotkeyOptions>(\n optionsFunc: OptionsFunc<T, Hotkey<T>, BaseHotkey>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey = optionsFunc();\n hotkey.type = HotkeyType;\n\n processComputable(hotkey as T, \"enabled\");\n setDefault(hotkey, \"enabled\", true);\n processComputable(hotkey as T, \"description\");\n\n return hotkey as unknown as Hotkey<T>;\n });\n}\n\nglobalBus.on(\"addLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = hotkey;\n });\n});\n\nglobalBus.on(\"removeLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = undefined;\n });\n});\n\ndocument.onkeydown = function (e) {\n if ((e.target as HTMLElement | null)?.tagName === \"INPUT\") {\n return;\n }\n if (hasWon.value && !player.keepGoing) {\n return;\n }\n let key = e.key;\n if (e.shiftKey) {\n key = \"shift+\" + key;\n }\n if (e.ctrlKey) {\n key = \"ctrl+\" + key;\n }\n const hotkey = hotkeys[key];\n if (hotkey && unref(hotkey.enabled)) {\n e.preventDefault();\n hotkey.onPress();\n }\n};\n\nregisterInfoComponent(\n jsx(() => {\n const keys = Object.values(hotkeys).filter(hotkey => unref(hotkey?.enabled));\n if (keys.length === 0) {\n return \"\";\n }\n return (\n <div>\n <br />\n <h4>Hotkeys</h4>\n {keys.map(hotkey => (\n <div>\n {hotkey?.key}: {hotkey?.description}\n </div>\n ))}\n </div>\n );\n })\n);\n","import LinksComponent from \"./Links.vue\";\nimport { Component, OptionsFunc, GatherProps, Replace } from \"features/feature\";\nimport { Position } from \"game/layers\";\nimport {\n Computable,\n GetComputableType,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { SVGAttributes } from \"vue\";\n\nexport const LinksType = Symbol(\"Links\");\n\nexport interface Link extends SVGAttributes {\n startNode: { id: string };\n endNode: { id: string };\n offsetStart?: Position;\n offsetEnd?: Position;\n}\n\nexport interface LinksOptions {\n links?: Computable<Link[]>;\n}\n\nexport interface BaseLinks {\n type: typeof LinksType;\n [Component]: typeof LinksComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Links<T extends LinksOptions> = Replace<\n T & BaseLinks,\n {\n links: GetComputableType<T[\"links\"]>;\n }\n>;\n\nexport type GenericLinks = Replace<\n Links<LinksOptions>,\n {\n links: ProcessedComputable<Link[]>;\n }\n>;\n\nexport function createLinks<T extends LinksOptions>(\n optionsFunc: OptionsFunc<T, Links<T>, BaseLinks>\n): Links<T> {\n return createLazyProxy(() => {\n const links = optionsFunc();\n links.type = LinksType;\n links[Component] = LinksComponent;\n\n processComputable(links as T, \"links\");\n\n links[GatherProps] = function (this: GenericLinks) {\n const { links } = this;\n return {\n links\n };\n };\n\n return links as unknown as Links<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({ feature: true, milestone: true, done: _ctx.unref(_ctx.earned), ..._ctx.unref(_ctx.classes) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)))),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { GenericMilestone } from \"features/milestones/milestone\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, UnwrapRef, watchEffect } from \"vue\";\nimport Node from \"../../components/Node.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<UnwrapRef<GenericMilestone[\"display\"]>>(\n String,\n Object,\n Function\n ),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { display } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Requirement = coerceComponent(currDisplay.requirement, \"h3\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\", \"b\");\n const OptionsDisplay = coerceComponent(currDisplay.optionsDisplay || \"\", \"span\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n <Requirement />\n {currDisplay.effectDisplay ? (\n <div>\n <EffectDisplay />\n </div>\n ) : null}\n {currDisplay.optionsDisplay ? (\n <div class=\"equal-spaced\">\n <OptionsDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n comp,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Milestone.vue?vue&type=template&id=0b660ac3&scoped=true&ts=true\"\nimport script from \"./Milestone.vue?vue&type=script&lang=tsx\"\nexport * from \"./Milestone.vue?vue&type=script&lang=tsx\"\n\nimport \"./Milestone.vue?vue&type=style&index=0&id=0b660ac3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0b660ac3\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport MilestoneComponent from \"features/milestones/Milestone.vue\";\nimport { globalBus } from \"game/events\";\nimport \"game/notifications\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const MilestoneType = Symbol(\"Milestone\");\n\nexport enum MilestoneDisplay {\n All = \"all\",\n //Last = \"last\",\n Configurable = \"configurable\",\n Incomplete = \"incomplete\",\n None = \"none\"\n}\n\nexport interface MilestoneOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n display?: Computable<\n | CoercableComponent\n | {\n requirement: CoercableComponent;\n effectDisplay?: CoercableComponent;\n optionsDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseMilestone extends Persistent<boolean> {\n id: string;\n earned: Ref<boolean>;\n complete: VoidFunction;\n type: typeof MilestoneType;\n [Component]: typeof MilestoneComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Milestone<T extends MilestoneOptions> = Replace<\n T & BaseMilestone,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericMilestone = Replace<\n Milestone<MilestoneOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createMilestone<T extends MilestoneOptions>(\n optionsFunc: OptionsFunc<T, Milestone<T>, BaseMilestone>\n): Milestone<T> {\n return createLazyProxy(persistent => {\n const milestone = Object.assign(persistent, optionsFunc());\n milestone.id = getUniqueID(\"milestone-\");\n milestone.type = MilestoneType;\n milestone[Component] = MilestoneComponent;\n\n milestone.earned = milestone[PersistentState];\n milestone.complete = function () {\n milestone[PersistentState].value = true;\n };\n\n processComputable(milestone as T, \"visibility\");\n setDefault(milestone, \"visibility\", Visibility.Visible);\n const visibility = milestone.visibility as ProcessedComputable<Visibility>;\n milestone.visibility = computed(() => {\n const display = unref((milestone as GenericMilestone).display);\n switch (settings.msDisplay) {\n default:\n case MilestoneDisplay.All:\n return unref(visibility);\n case MilestoneDisplay.Configurable:\n if (\n unref(milestone.earned) &&\n !(\n display != null &&\n typeof display == \"object\" &&\n \"optionsDisplay\" in (display as Record<string, unknown>)\n )\n ) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.Incomplete:\n if (unref(milestone.earned)) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.None:\n return Visibility.None;\n }\n });\n\n processComputable(milestone as T, \"style\");\n processComputable(milestone as T, \"classes\");\n processComputable(milestone as T, \"display\");\n\n milestone[GatherProps] = function (this: GenericMilestone) {\n const { visibility, display, style, classes, earned, id } = this;\n return { visibility, display, style: unref(style), classes, earned, id };\n };\n\n if (milestone.shouldEarn) {\n const genericMilestone = milestone as GenericMilestone;\n watchEffect(() => {\n if (\n !genericMilestone.earned.value &&\n unref(genericMilestone.visibility) === Visibility.Visible &&\n genericMilestone.shouldEarn?.()\n ) {\n genericMilestone.earned.value = true;\n genericMilestone.onComplete?.();\n if (genericMilestone.display) {\n const display = unref(genericMilestone.display);\n const Display = coerceComponent(\n isCoercableComponent(display) ? display : display.requirement\n );\n toast(\n <>\n <h3>Milestone earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </>\n );\n }\n }\n });\n }\n\n return milestone as unknown as Milestone<T>;\n }, persistent<boolean>(false));\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n msDisplay: MilestoneDisplay;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"msDisplay\", MilestoneDisplay.All);\n});\n\nconst msDisplayOptions = Object.values(MilestoneDisplay).map(option => ({\n label: camelToTitle(option),\n value: option\n}));\n\nregisterSettingField(\n jsx(() => (\n <Select\n title=\"Show Milestones\"\n options={msDisplayOptions}\n onUpdate:modelValue={value => (settings.msDisplay = value as MilestoneDisplay)}\n modelValue={settings.msDisplay}\n />\n ))\n);\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CoercableComponent } from \"features/feature\";\nimport { computeComponent } from \"util/vue\";\nimport { toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n display: null\n },\n setup(__props: any) {\n\nconst _props = __props as { display: CoercableComponent }\n\n\nconst { display } = toRefs(_props);\nconst component = computeComponent(display);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n}\n}\n\n})","import script from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport TabComponent from \"features/tabs/Tab.vue\";\nimport { Computable, GetComputableType } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const TabType = Symbol(\"Tab\");\n\nexport interface TabOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseTab {\n id: string;\n type: typeof TabType;\n [Component]: typeof TabComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tab<T extends TabOptions> = Replace<\n T & BaseTab,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericTab = Tab<TabOptions>;\n\nexport function createTab<T extends TabOptions>(\n optionsFunc: OptionsFunc<T, Tab<T>, BaseTab>\n): Tab<T> {\n return createLazyProxy(() => {\n const tab = optionsFunc();\n tab.id = getUniqueID(\"tab-\");\n tab.type = TabType;\n tab[Component] = TabComponent;\n\n tab[GatherProps] = function (this: GenericTab) {\n const { display } = this;\n return { display };\n };\n\n return tab as unknown as Tab<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.selectTab && _ctx.selectTab(...args))),\n class: _normalizeClass([\"tabButton\", {\n active: _ctx.active,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.glowColorStyle,\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { getNotifyStyle } from \"game/notifications\";\nimport { computeComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n glowColor: processedPropType<string>(String),\n active: Boolean,\n floating: Boolean\n },\n emits: [\"selectTab\"],\n setup(props, { emit }) {\n const { display, glowColor, floating } = toRefs(props);\n\n const component = computeComponent(display);\n\n const glowColorStyle = computed(() => {\n const color = unwrapRef(glowColor);\n if (!color) {\n return {};\n }\n if (unref(floating)) {\n return getNotifyStyle(color);\n }\n return { boxShadow: `0px 9px 5px -6px ${color}` };\n });\n\n function selectTab() {\n emit(\"selectTab\");\n }\n\n return {\n selectTab,\n component,\n glowColorStyle,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./TabButton.vue?vue&type=template&id=361380c0&scoped=true&ts=true\"\nimport script from \"./TabButton.vue?vue&type=script&lang=ts\"\nexport * from \"./TabButton.vue?vue&type=script&lang=ts\"\n\nimport \"./TabButton.vue?vue&type=style&index=0&id=361380c0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-361380c0\"]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TabButton = _resolveComponent(\"TabButton\")!\n const _component_Sticky = _resolveComponent(\"Sticky\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tab-family-container\", { ..._ctx.unref(_ctx.classes), ..._ctx.tabClasses }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? [],\n _ctx.tabStyle ?? []\n ])\n }, [\n _createVNode(_component_Sticky, { class: \"tab-buttons-container\" }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tab-buttons\", { floating: _ctx.floating }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.tabs), (button, id) => {\n return (_openBlock(), _createBlock(_component_TabButton, _mergeProps({\n onSelectTab: ($event: any) => (_ctx.selected.value = id),\n floating: _ctx.floating,\n key: id,\n active: _ctx.unref(button.tab) === _ctx.unref(_ctx.activeTab)\n }, _ctx.gatherButtonProps(button)), null, 16, [\"onSelectTab\", \"floating\", \"active\"]))\n }), 128))\n ], 2)\n ]),\n _: 1\n }),\n (_ctx.unref(_ctx.activeTab))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Sticky from \"components/layout/Sticky.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { GenericTab } from \"features/tabs/tab\";\nimport TabButton from \"features/tabs/TabButton.vue\";\nimport { GenericTabButton } from \"features/tabs/tabFamily\";\nimport settings from \"game/settings\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n Ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n activeTab: {\n type: processedPropType<GenericTab | CoercableComponent | null>(Object),\n required: true\n },\n selected: {\n type: Object as PropType<Ref<string>>,\n required: true\n },\n tabs: {\n type: processedPropType<Record<string, GenericTabButton>>(Object),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object)\n },\n components: {\n Sticky,\n TabButton\n },\n setup(props) {\n const { activeTab } = toRefs(props);\n\n const floating = computed(() => {\n return themes[settings.theme].floatingTabs;\n });\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currActiveTab = unwrapRef(activeTab);\n if (currActiveTab == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currActiveTab)) {\n component.value = coerceComponent(currActiveTab);\n return;\n }\n component.value = coerceComponent(unref(currActiveTab.display));\n });\n\n const tabClasses = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n const tabClasses =\n isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.classes);\n return tabClasses;\n });\n\n const tabStyle = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n return isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.style);\n });\n\n function gatherButtonProps(button: GenericTabButton) {\n const { display, style, classes, glowColor, visibility } = button;\n return { display, style, classes, glowColor, visibility };\n }\n\n return {\n floating,\n tabClasses,\n tabStyle,\n Visibility,\n component,\n gatherButtonProps,\n unref\n };\n }\n});\n","import { render } from \"./TabFamily.vue?vue&type=template&id=38d5b5f9&scoped=true&ts=true\"\nimport script from \"./TabFamily.vue?vue&type=script&lang=ts\"\nexport * from \"./TabFamily.vue?vue&type=script&lang=ts\"\n\nimport \"./TabFamily.vue?vue&type=style&index=0&id=38d5b5f9&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-38d5b5f9\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport TabButtonComponent from \"features/tabs/TabButton.vue\";\nimport TabFamilyComponent from \"features/tabs/TabFamily.vue\";\nimport { Persistent, PersistentState, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { GenericTab } from \"./tab\";\n\nexport const TabButtonType = Symbol(\"TabButton\");\nexport const TabFamilyType = Symbol(\"TabFamily\");\n\nexport interface TabButtonOptions {\n visibility?: Computable<Visibility>;\n tab: Computable<GenericTab | CoercableComponent>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n glowColor?: Computable<string>;\n}\n\nexport interface BaseTabButton {\n type: typeof TabButtonType;\n [Component]: typeof TabButtonComponent;\n}\n\nexport type TabButton<T extends TabButtonOptions> = Replace<\n T & BaseTabButton,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tab: GetComputableType<T[\"tab\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n }\n>;\n\nexport type GenericTabButton = Replace<\n TabButton<TabButtonOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport interface TabFamilyOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\n tabs: Record<string, TabButtonOptions>;\n activeTab: Ref<GenericTab | CoercableComponent | null>;\n selected: Ref<string>;\n type: typeof TabFamilyType;\n [Component]: typeof TabFamilyComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TabFamily<T extends TabFamilyOptions> = Replace<\n T & BaseTabFamily,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tabs: Record<string, GenericTabButton>;\n }\n>;\n\nexport type GenericTabFamily = Replace<\n TabFamily<TabFamilyOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTabFamily<T extends TabFamilyOptions>(\n tabs: Record<string, () => TabButtonOptions>,\n optionsFunc?: OptionsFunc<T, TabFamily<T>, BaseTabFamily>\n): TabFamily<T> {\n if (Object.keys(tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\");\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n return createLazyProxy(persistent => {\n const tabFamily = Object.assign(persistent, optionsFunc?.());\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n tabFamily.tabs = Object.keys(tabs).reduce<Record<string, GenericTabButton>>(\n (parsedTabs, tab) => {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabs[tab]();\n tabButton.type = TabButtonType;\n tabButton[Component] = TabButtonComponent;\n\n processComputable(tabButton as TabButtonOptions, \"visibility\");\n setDefault(tabButton, \"visibility\", Visibility.Visible);\n processComputable(tabButton as TabButtonOptions, \"tab\");\n processComputable(tabButton as TabButtonOptions, \"display\");\n processComputable(tabButton as TabButtonOptions, \"classes\");\n processComputable(tabButton as TabButtonOptions, \"style\");\n processComputable(tabButton as TabButtonOptions, \"glowColor\");\n parsedTabs[tab] = tabButton as GenericTabButton;\n return parsedTabs;\n },\n {}\n );\n tabFamily.selected = tabFamily[PersistentState];\n tabFamily.activeTab = computed(() => {\n const tabs = unref(processedTabFamily.tabs);\n if (\n tabFamily[PersistentState].value in tabs &&\n unref(tabs[processedTabFamily[PersistentState].value].visibility) ===\n Visibility.Visible\n ) {\n return unref(tabs[processedTabFamily[PersistentState].value].tab);\n }\n const firstTab = Object.values(tabs).find(\n tab => unref(tab.visibility) === Visibility.Visible\n );\n if (firstTab) {\n return unref(firstTab.tab);\n }\n return null;\n });\n\n processComputable(tabFamily as T, \"visibility\");\n setDefault(tabFamily, \"visibility\", Visibility.Visible);\n processComputable(tabFamily as T, \"classes\");\n processComputable(tabFamily as T, \"style\");\n\n tabFamily[GatherProps] = function (this: GenericTabFamily) {\n const { visibility, activeTab, selected, tabs, style, classes } = this;\n return { visibility, activeTab, selected, tabs, style: unref(style), classes };\n };\n\n // This is necessary because board.types is different from T and TabFamily\n const processedTabFamily = tabFamily as unknown as TabFamily<T>;\n return processedTabFamily;\n }, persistent(Object.keys(tabs)[0]));\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-264c96b4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.purchase && _ctx.purchase(...args))),\n class: _normalizeClass({\n feature: true,\n upgrade: true,\n can: _ctx.unref(_ctx.canPurchase),\n locked: !_ctx.unref(_ctx.canPurchase),\n bought: _ctx.unref(_ctx.bought),\n ..._ctx.unref(_ctx.classes)\n }),\n disabled: !_ctx.unref(_ctx.canPurchase)\n }, [\n (_ctx.unref(_ctx.component))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { GenericUpgrade } from \"features/upgrades/upgrade\";\nimport { DecimalSource } from \"util/bignum\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericUpgrade[\"display\"]>>(String, Object, Function),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n resource: Object as PropType<Resource>,\n cost: processedPropType<DecimalSource>(String, Object, Number),\n canPurchase: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n bought: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n purchase: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, cost } = toRefs(props);\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n component.value = coerceComponent(currDisplay);\n return;\n }\n const currCost = unwrapRef(cost);\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n component.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {props.resource != null ? (\n <>\n <br />\n Cost: {props.resource &&\n displayResource(props.resource, currCost)}{\" \"}\n {props.resource?.displayName}\n </>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Upgrade.vue?vue&type=template&id=264c96b4&scoped=true&ts=true\"\nimport script from \"./Upgrade.vue?vue&type=script&lang=tsx\"\nexport * from \"./Upgrade.vue?vue&type=script&lang=tsx\"\n\nimport \"./Upgrade.vue?vue&type=style&index=0&id=264c96b4&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-264c96b4\"]])\n\nexport default __exports__","import UpgradeComponent from \"features/upgrades/Upgrade.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n findFeatures,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport { GenericLayer } from \"game/layers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { persistent, Persistent, PersistentState } from \"game/persistence\";\n\nexport const UpgradeType = Symbol(\"Upgrade\");\n\nexport interface UpgradeOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n mark?: Computable<boolean | string>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canAfford?: Computable<boolean>;\n onPurchase?: VoidFunction;\n}\n\nexport interface BaseUpgrade extends Persistent<boolean> {\n id: string;\n bought: Ref<boolean>;\n canPurchase: Ref<boolean>;\n purchase: VoidFunction;\n type: typeof UpgradeType;\n [Component]: typeof UpgradeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Upgrade<T extends UpgradeOptions> = Replace<\n T & BaseUpgrade,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n cost: GetComputableType<T[\"cost\"]>;\n canAfford: GetComputableTypeWithDefault<T[\"canAfford\"], Ref<boolean>>;\n }\n>;\n\nexport type GenericUpgrade = Replace<\n Upgrade<UpgradeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createUpgrade<T extends UpgradeOptions>(\n optionsFunc: OptionsFunc<T, Upgrade<T>, BaseUpgrade>\n): Upgrade<T> {\n return createLazyProxy(persistent => {\n const upgrade = Object.assign(persistent, optionsFunc());\n upgrade.id = getUniqueID(\"upgrade-\");\n upgrade.type = UpgradeType;\n upgrade[Component] = UpgradeComponent;\n\n if (upgrade.canAfford == null && (upgrade.resource == null || upgrade.cost == null)) {\n console.warn(\n \"Error: can't create upgrade without a canAfford property or a resource and cost property\",\n upgrade\n );\n }\n\n upgrade.bought = upgrade[PersistentState];\n if (upgrade.canAfford == null) {\n upgrade.canAfford = computed(() => {\n const genericUpgrade = upgrade as GenericUpgrade;\n return (\n genericUpgrade.resource != null &&\n genericUpgrade.cost != null &&\n Decimal.gte(genericUpgrade.resource.value, unref(genericUpgrade.cost))\n );\n });\n } else {\n processComputable(upgrade as T, \"canAfford\");\n }\n upgrade.canPurchase = computed(\n () =>\n unref((upgrade as GenericUpgrade).visibility) === Visibility.Visible &&\n unref((upgrade as GenericUpgrade).canAfford) &&\n !unref(upgrade.bought)\n );\n upgrade.purchase = function () {\n const genericUpgrade = upgrade as GenericUpgrade;\n if (!unref(genericUpgrade.canPurchase)) {\n return;\n }\n if (genericUpgrade.resource != null && genericUpgrade.cost != null) {\n genericUpgrade.resource.value = Decimal.sub(\n genericUpgrade.resource.value,\n unref(genericUpgrade.cost)\n );\n }\n genericUpgrade[PersistentState].value = true;\n genericUpgrade.onPurchase?.();\n };\n\n processComputable(upgrade as T, \"visibility\");\n setDefault(upgrade, \"visibility\", Visibility.Visible);\n processComputable(upgrade as T, \"classes\");\n processComputable(upgrade as T, \"style\");\n processComputable(upgrade as T, \"display\");\n processComputable(upgrade as T, \"mark\");\n processComputable(upgrade as T, \"cost\");\n processComputable(upgrade as T, \"resource\");\n\n upgrade[GatherProps] = function (this: GenericUpgrade) {\n const {\n display,\n visibility,\n style,\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n };\n };\n\n return upgrade as unknown as Upgrade<T>;\n }, persistent<boolean>(false));\n}\n\nexport function setupAutoPurchase(\n layer: GenericLayer,\n autoActive: Computable<boolean>,\n upgrades: GenericUpgrade[] = []\n): void {\n upgrades = upgrades || findFeatures(layer, UpgradeType);\n const isAutoActive = isFunction(autoActive) ? computed(autoActive) : autoActive;\n layer.on(\"update\", () => {\n if (unref(isAutoActive)) {\n upgrades.forEach(upgrade => upgrade.purchase());\n }\n });\n}\n","import Slider from \"components/fields/Slider.vue\";\nimport Text from \"components/fields/Text.vue\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport Column from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport Sticky from \"components/layout/Sticky.vue\";\nimport VerticalRule from \"components/layout/VerticalRule.vue\";\nimport Modal from \"components/Modal.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport themes from \"data/themes\";\nimport { createBar, Direction } from \"features/bars/bar\";\nimport { createBuyable } from \"features/buyable\";\nimport { createChallenge } from \"features/challenges/challenge\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport {\n addSoftcap,\n createCumulativeConversion,\n createPolynomialScaling\n} from \"features/conversion\";\nimport { jsx, showIf, Visibility } from \"features/feature\";\nimport { createHotkey } from \"features/hotkey\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createLinks } from \"features/links/links\";\nimport { createMilestone } from \"features/milestones/milestone\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource, trackBest } from \"features/resources/resource\";\nimport Resource from \"features/resources/Resource.vue\";\nimport { createTab } from \"features/tabs/tab\";\nimport { createTabFamily } from \"features/tabs/tabFamily\";\nimport { addTooltip, TooltipDirection } from \"features/tooltips/tooltip\";\nimport {\n createResourceTooltip,\n createTree,\n createTreeNode,\n GenericTreeNode,\n TreeBranch\n} from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\nimport {\n createAdditiveModifier,\n createExponentialModifier,\n createModifierSection,\n createSequentialModifier\n} from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal, { format, formatWhole } from \"util/bignum\";\nimport { render, renderCol, renderRow } from \"util/vue\";\nimport { computed, ComputedRef, ref } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"c\";\nconst layer = createLayer(id, () => {\n const color = \"#4BDC13\";\n const name = \"Candies\";\n const points = createResource<DecimalSource>(0, \"lollipops\");\n const best = trackBest(points);\n const beep = persistent<boolean>(false);\n const thingy = persistent<string>(\"pointy\");\n const otherThingy = persistent<number>(10);\n const spentOnBuyables = persistent(new Decimal(10));\n\n const waffleBoost = computed(() => Decimal.pow(points.value, 0.2));\n const icecreamCap = computed(() => Decimal.times(points.value, 10));\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" },\n color: \"rgb(75, 220, 19)\"\n }));\n\n const lollipopMilestone3 = createMilestone(() => ({\n shouldEarn() {\n return Decimal.gte(best.value, 3);\n },\n display: {\n requirement: \"3 Lollipops\",\n effectDisplay: \"Unlock the next milestone\"\n }\n }));\n const lollipopMilestone4 = createMilestone(() => ({\n visibility() {\n return showIf(lollipopMilestone3.earned.value);\n },\n shouldEarn() {\n return Decimal.gte(best.value, 4);\n },\n display: {\n requirement: \"4 Lollipops\",\n effectDisplay: \"You can toggle beep and boop (which do nothing)\",\n optionsDisplay: jsx(() => (\n <>\n <Toggle\n title=\"beep\"\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Toggle\n title=\"boop\"\n onUpdate:modelValue={value => (f.boop.value = value)}\n modelValue={f.boop.value}\n />\n </>\n ))\n },\n style() {\n if (this.earned) {\n return { backgroundColor: \"#1111DD\" };\n }\n return {};\n }\n }));\n const lollipopMilestones = [lollipopMilestone3, lollipopMilestone4];\n\n const funChallenge = createChallenge(() => ({\n title: \"Fun\",\n completionLimit: 3,\n display() {\n return {\n description: `Makes the game 0% harder<br>${formatWhole(this.completions.value)}/${\n this.completionLimit\n } completions`,\n goal: \"Have 20 points I guess\",\n reward: \"Says hi\",\n effectDisplay: format(funEffect.value) + \"x\"\n };\n },\n visibility() {\n return showIf(Decimal.gt(best.value, 0));\n },\n goal: 20,\n resource: main.points,\n onComplete() {\n console.log(\"hiii\");\n },\n onEnter() {\n main.points.value = 0;\n main.best.value = main.points.value;\n main.total.value = main.points.value;\n console.log(\"So challenging\");\n },\n onExit() {\n console.log(\"Sweet freedom!\");\n },\n style: {\n height: \"200px\"\n }\n }));\n const funEffect = computed(() => Decimal.add(points.value, 1).tetrate(0.02));\n\n const generatorUpgrade = createUpgrade(() => ({\n display: {\n title: \"Generator of Genericness\",\n description: \"Gain 1 point every second\"\n },\n cost: 1,\n resource: points\n }));\n const lollipopMultiplierUpgrade = createUpgrade(() => ({\n display: () => ({\n description: \"Point generation is faster based on your unspent Lollipops\",\n effectDisplay: `${format(lollipopMultiplierEffect.value)}x`\n }),\n cost: 1,\n resource: points,\n visibility: () => showIf(generatorUpgrade.bought.value)\n }));\n const lollipopMultiplierEffect = computed(() => {\n let ret = Decimal.add(points.value, 1).pow(0.5);\n if (ret.gte(\"1e20000000\")) ret = ret.sqrt().times(\"1e10000000\");\n return ret;\n });\n const unlockIlluminatiUpgrade = createUpgrade(() => ({\n visibility() {\n return showIf(lollipopMultiplierUpgrade.bought.value);\n },\n canAfford() {\n return Decimal.lt(main.points.value, 7);\n },\n onPurchase() {\n main.points.value = Decimal.add(main.points.value, 7);\n },\n display:\n \"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.\",\n style() {\n if (this.bought) {\n return { backgroundColor: \"#1111dd\" };\n }\n if (!this.canAfford) {\n return { backgroundColor: \"#dd1111\" };\n }\n return {};\n }\n }));\n const quasiUpgrade = createUpgrade(() => ({\n resource: createResource(exhancers.amount, \"Exhancers\", 0),\n cost: 3,\n display: {\n title: \"This upgrade doesn't exist\",\n description: \"Or does it?\"\n }\n }));\n const upgrades = [generatorUpgrade, lollipopMultiplierUpgrade, unlockIlluminatiUpgrade];\n\n const exhancers = createBuyable(() => ({\n resource: points,\n cost() {\n let x = new Decimal(this.amount.value);\n if (x.gte(25)) {\n x = x.pow(2).div(25);\n }\n const cost = Decimal.pow(2, x.pow(1.5));\n return cost.floor();\n },\n display() {\n return {\n title: \"Exhancers\",\n description: `Adds ${format(\n thingEffect.value\n )} things and multiplies stuff by ${format(stuffEffect.value)}.`\n };\n },\n onPurchase(cost) {\n spentOnBuyables.value = Decimal.add(spentOnBuyables.value, cost);\n },\n style: { height: \"222px\" },\n purchaseLimit: 4\n }));\n // The following need redundant ComputedRef<Decimal> type annotations because otherwise the ts\n // interpreter thinks exhancers are cyclically referenced\n const thingEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const stuffEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const confirmRespec = persistent<boolean>(false);\n const confirming = ref(false);\n const respecBuyables = createClickable(() => ({\n small: true,\n display: \"Respec Thingies\",\n onClick() {\n if (confirmRespec.value && !confirming.value) {\n confirming.value = true;\n return;\n }\n\n points.value = Decimal.add(points.value, spentOnBuyables.value);\n exhancers.amount.value = 0;\n main.tree.reset(treeNode);\n }\n }));\n const sellExhancer = createClickable(() => ({\n small: true,\n display: \"Sell One\",\n onClick() {\n if (Decimal.lte(exhancers.amount.value, 0)) {\n return;\n }\n exhancers.amount.value = Decimal.sub(exhancers.amount.value, 1);\n points.value = Decimal.add(points.value, exhancers.cost.value);\n spentOnBuyables.value = Decimal.sub(spentOnBuyables.value, exhancers.cost.value);\n }\n }));\n const buyablesDisplay = jsx(() => (\n <Column>\n <Row>\n <Toggle\n title=\"Confirm\"\n onUpdate:modelValue={value => (confirmRespec.value = value)}\n modelValue={confirmRespec.value}\n />\n {renderRow(respecBuyables)}\n </Row>\n {renderRow(exhancers)}\n {renderRow(sellExhancer)}\n <Modal\n modelValue={confirming.value}\n onUpdate:modelValue={value => (confirming.value = value)}\n v-slots={{\n header: () => <h2>Confirm Respec</h2>,\n body: () => <>Are you sure? Respeccing these doesn't accomplish much</>,\n footer: () => (\n <div class=\"modal-default-footer\">\n <div class=\"modal-default-flex-grow\"></div>\n <button\n class=\"button modal-default-button\"\n onClick={() => (confirming.value = false)}\n >\n Cancel\n </button>\n <button\n class=\"button modal-default-button danger\"\n onClick={() => {\n respecBuyables.onClick();\n confirming.value = false;\n }}\n >\n Respec\n </button>\n </div>\n )\n }}\n />\n </Column>\n ));\n\n const longBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FFFFFF\" },\n baseStyle: { backgroundColor: \"#696969\" },\n textStyle: { color: \"#04e050\" },\n direction: Direction.Right,\n width: 300,\n height: 30,\n progress() {\n return Decimal.add(main.points.value, 1).log(10).div(10).toNumber();\n },\n display() {\n return format(main.points.value) + \" / 1e10 points\";\n }\n }));\n const tallBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#4BEC13\" },\n baseStyle: { backgroundColor: \"#000000\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n borderStyle: { borderWidth: \"7px\" },\n direction: Direction.Up,\n width: 50,\n height: 200,\n progress() {\n return Decimal.div(main.points.value, 100);\n },\n display() {\n return formatWhole(Decimal.div(main.points.value, 1).min(100)) + \"%\";\n }\n }));\n const flatBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FE0102\" },\n baseStyle: { backgroundColor: \"#222222\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n direction: Direction.Up,\n width: 100,\n height: 30,\n progress() {\n return Decimal.div(points.value, 50);\n }\n }));\n\n const conversion = createCumulativeConversion(() => ({\n scaling: addSoftcap(createPolynomialScaling(10, 0.5), 1e100, 0.5),\n baseResource: main.points,\n gainResource: points,\n roundUpCost: true,\n gainModifier: createSequentialModifier(\n createExponentialModifier(2, \"Because I felt like it\"),\n createAdditiveModifier(1, \"Nice modifier\")\n )\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const hotkeys = [\n createHotkey(() => ({\n key: \"c\",\n description: \"reset for lollipops or whatever\",\n onPress() {\n if (resetButton.canClick.value) {\n resetButton.onClick();\n }\n }\n })),\n createHotkey(() => ({\n key: \"ctrl+c\",\n description: \"respec things\",\n onPress() {\n respecBuyables.onClick();\n }\n }))\n ];\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n mark: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n tooltip() {\n let tooltip = displayResource(points);\n if (Decimal.gt(exhancers.amount.value, 0)) {\n tooltip += `<br><i><br><br><br>${formatWhole(\n exhancers.amount.value\n )} Exhancers</i>`;\n }\n return tooltip;\n },\n style: {\n color: \"#3325CC\",\n textDecoration: \"underline\"\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n style: {\n color: \"#AA66AA\"\n },\n resetDescription: \"Melt your points into \"\n }));\n addTooltip(resetButton, {\n display: jsx(() =>\n createModifierSection(\n \"Modifiers\",\n \"\",\n conversion.gainModifier,\n conversion.scaling.currentGain(conversion)\n )\n ),\n pinnable: true,\n direction: TooltipDirection.DOWN,\n style: \"width: 400px; text-align: left\"\n });\n\n const g = createTreeNode(() => ({\n display: \"TH\",\n color: \"#6d3678\",\n canClick() {\n return Decimal.gte(main.points.value, 10);\n },\n tooltip: \"Thanos your points\",\n onClick() {\n main.points.value = Decimal.div(main.points.value, 2);\n console.log(\"Thanos'd\");\n },\n glowColor() {\n if (Decimal.eq(exhancers.amount.value, 1)) {\n return \"orange\";\n }\n return \"\";\n }\n }));\n const h = createTreeNode(() => ({\n display: \"h\",\n color() {\n return themes[settings.theme].variables[\"--locked\"];\n },\n tooltip: {\n display: computed(() => `Restore your points to ${format(otherThingy.value)}`),\n right: true\n },\n canClick() {\n return Decimal.lt(main.points.value, otherThingy.value);\n },\n onClick() {\n main.points.value = otherThingy.value;\n }\n }));\n const spook = createTreeNode(() => ({\n visibility: Visibility.Hidden\n }));\n const tree = createTree(() => ({\n nodes(): GenericTreeNode[][] {\n return [\n [f.treeNode, treeNode],\n [g, spook, h]\n ];\n },\n branches(): TreeBranch[] {\n return [\n {\n startNode: f.treeNode,\n endNode: treeNode,\n \"stroke-width\": \"25px\",\n stroke: \"green\",\n style: {\n filter: \"blur(5px)\"\n }\n },\n { startNode: treeNode, endNode: g },\n { startNode: g, endNode: h }\n ];\n }\n }));\n\n const links = createLinks(() => ({\n links: [\n {\n startNode: h,\n endNode: flatBoi,\n \"stroke-width\": \"5px\",\n stroke: \"red\",\n offsetEnd: { x: -50 + 100 * flatBoi.progress.value.toNumber(), y: 0 }\n }\n ]\n }));\n\n const illuminatiTabs = createTabFamily(\n {\n first: () => ({\n tab: jsx(() => (\n <>\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n <div>confirmed</div>\n </>\n )),\n display: \"first\"\n }),\n second: () => ({\n tab: f.display,\n display: \"second\"\n })\n },\n () => ({\n style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n })\n );\n\n const tabs = createTabFamily({\n mainTab: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n <MainDisplay\n resource={points}\n color={color}\n effectDisplay={`which are boosting waffles by ${format(\n waffleBoost.value\n )} and increasing the Ice Cream cap by ${format(icecreamCap.value)}`}\n />\n <Sticky>{render(resetButton)}</Sticky>\n <Resource resource={points} color={color} />\n <Spacer height=\"5px\" />\n <button onClick={() => console.log(\"yeet\")}>'HI'</button>\n <div>Name your points!</div>\n <Text\n modelValue={thingy.value}\n onUpdate:modelValue={value => (thingy.value = value)}\n />\n <Sticky style=\"color: red; font-size: 32px; font-family: Comic Sans MS;\">\n I have {displayResource(main.points)} {thingy.value} points!\n </Sticky>\n <hr />\n {renderCol(...lollipopMilestones)}\n <Spacer />\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n {renderRow(funChallenge)}\n </>\n ))\n })),\n display: \"main tab\",\n glowColor() {\n if (\n generatorUpgrade.canPurchase.value ||\n lollipopMultiplierUpgrade.canPurchase.value ||\n unlockIlluminatiUpgrade.canPurchase.value ||\n funChallenge.canComplete.value\n ) {\n return \"blue\";\n }\n return \"\";\n },\n style: { color: \"orange\" }\n }),\n thingies: () => ({\n tab: createTab(() => ({\n style() {\n return { backgroundColor: \"#222222\", \"--background\": \"#222222\" };\n },\n display: jsx(() => (\n <>\n {render(buyablesDisplay)}\n <Spacer />\n <Row style=\"width: 600px; height: 350px; background-color: green; border-style: solid;\">\n <Toggle\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Spacer width=\"30px\" height=\"10px\" />\n <div>\n <span>Beep</span>\n </div>\n <Spacer />\n <VerticalRule height=\"200px\" />\n </Row>\n <Spacer />\n <img src=\"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\" />\n </>\n ))\n })),\n glowColor: \"white\",\n display: \"thingies\",\n style: { borderColor: \"orange\" }\n }),\n jail: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n {render(coolInfo)}\n {render(longBoi)}\n <Spacer />\n <Row>\n <Column style=\"background-color: #555555; padding: 15px\">\n <div style=\"color: teal\">Sugar level:</div>\n <Spacer />\n {render(tallBoi)}\n </Column>\n <Spacer />\n <Column>\n <div>idk</div>\n <Spacer width=\"0\" height=\"50px\" />\n {render(flatBoi)}\n </Column>\n </Row>\n <Spacer />\n <div>It's jail because \"bars\"! So funny! Ha ha!</div>\n {render(tree)}\n </>\n ))\n })),\n display: \"jail\"\n }),\n illuminati: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n // This should really just be <> and </>, however for some reason the\n // typescript interpreter can't figure out this layer and f.tsx otherwise\n <div>\n <h1> C O N F I R M E D </h1>\n <Spacer />\n {render(illuminatiTabs)}\n <div>Adjust how many points H gives you!</div>\n <Slider\n onUpdate:modelValue={value => (otherThingy.value = value)}\n modelValue={otherThingy.value}\n min={1}\n max={30}\n />\n </div>\n )),\n style: {\n backgroundColor: \"#3325CC\"\n }\n })),\n visibility() {\n return showIf(unlockIlluminatiUpgrade.bought.value);\n },\n display: \"illuminati\"\n })\n });\n\n return {\n id,\n color,\n name,\n points,\n best,\n beep,\n thingy,\n otherThingy,\n spentOnBuyables,\n waffleBoost,\n icecreamCap,\n coolInfo,\n lollipopMilestones,\n funChallenge,\n funEffect,\n generatorUpgrade,\n lollipopMultiplierUpgrade,\n lollipopMultiplierEffect,\n unlockIlluminatiUpgrade,\n quasiUpgrade,\n exhancers,\n respecBuyables,\n sellExhancer,\n bars: { tallBoi, longBoi, flatBoi },\n tree,\n g,\n h,\n spook,\n conversion,\n reset,\n hotkeys,\n treeNode,\n resetButton,\n confirmRespec,\n minWidth: 800,\n tabs,\n display: jsx(() => (\n <>\n {render(tabs)}\n {render(links)}\n </>\n ))\n };\n});\n\nexport default layer;\n","import Spacer from \"components/layout/Spacer.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport { createPolynomialScaling, createIndependentConversion } from \"features/conversion\";\nimport { jsx } from \"features/feature\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createParticles } from \"features/particles/particles\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource } from \"features/resources/resource\";\nimport { addTooltip } from \"features/tooltips/tooltip\";\nimport { createResourceTooltip } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { createMultiplicativeModifier } from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { ref } from \"vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst id = \"f\";\nconst layer = createLayer(id, () => {\n const color = \"#FE0102\";\n const name = \"Farms\";\n const points = createResource<DecimalSource>(0, \"farm points\");\n const boop = persistent<boolean>(false);\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" }\n }));\n\n const clickableState = persistent<string>(\"Start\");\n const clickable = createClickable(() => ({\n display() {\n return {\n title: \"Clicky clicky!\",\n description: \"Current state:<br>\" + clickableState.value\n };\n },\n initialState: \"Start\",\n canClick() {\n return clickableState.value !== \"Borkened...\";\n },\n onClick(e) {\n switch (clickableState.value) {\n case \"Start\":\n clickableState.value = \"A new state!\";\n break;\n case \"A new state!\":\n clickableState.value = \"Keep going!\";\n break;\n case \"Keep going!\":\n clickableState.value = \"Maybe that's a bit too far...\";\n break;\n case \"Maybe that's a bit too far...\":\n const pos = e == undefined ? undefined : \"touches\" in e ? e.touches[0] : e;\n const confettiParticles = Object.assign({}, confetti, {\n pos: {\n x: (pos?.clientX ?? 0) - (particles.boundingRect?.value?.left ?? 0),\n y: (pos?.clientY ?? 0) - (particles.boundingRect?.value?.top ?? 0)\n }\n });\n particles.addEmitter(confettiParticles).then(e => e.playOnceAndDestroy());\n clickableState.value = \"Borkened...\";\n break;\n default:\n clickableState.value = \"Start\";\n break;\n }\n },\n onHold() {\n console.log(\"Clickkkkk...\");\n },\n style() {\n switch (clickableState.value) {\n case \"Start\":\n return { \"background-color\": \"green\" };\n case \"A new state!\":\n return { \"background-color\": \"yellow\" };\n case \"Keep going!\":\n return { \"background-color\": \"orange\" };\n case \"Maybe that's a bit too far...\":\n return { \"background-color\": \"red\" };\n default:\n return {};\n }\n }\n }));\n\n const resetClickable = createClickable(() => ({\n onClick() {\n if (clickableState.value == \"Borkened...\") {\n clickableState.value = \"Start\";\n }\n },\n display() {\n return clickableState.value == \"Borkened...\" ? \"Fix the clickable!\" : \"Does nothing\";\n },\n small: true\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const conversion = createIndependentConversion(() => ({\n scaling: createPolynomialScaling(10, 0.5),\n baseResource: main.points,\n gainResource: points,\n modifyGainAmount: createMultiplicativeModifier(c.otherThingy)\n }));\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n tooltip() {\n if (treeNode.canClick.value) {\n return `${displayResource(points)} ${points.displayName}`;\n }\n return `This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${displayResource(\n main.points\n )}`;\n },\n canClick() {\n return Decimal.gte(main.points.value, 10);\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n display: jsx(() => {\n if (resetButton.conversion.buyMax) {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you{\" \"}\n <b>{formatWhole(resetButton.conversion.currentGain.value)}</b> Farm Points\n in exchange for all of your points and lollipops! (You'll get another one at{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n } else {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange\n for all of your points and lollipops! (At least{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n }\n })\n }));\n\n const particles = createParticles(() => ({\n boundingRect: ref<null | DOMRect>(null),\n onContainerResized(boundingRect) {\n this.boundingRect.value = boundingRect;\n },\n style: \"z-index: 2\"\n }));\n\n const tab = jsx(() => (\n <>\n {render(coolInfo)}\n <MainDisplay resource={points} color={color} />\n {render(resetButton)}\n <div>You have {formatWhole(conversion.baseResource.value)} points</div>\n <div>\n <br />\n <img src=\"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390\" />\n <div>Bork Bork!</div>\n </div>\n <Spacer />\n {renderRow(resetClickable)}\n {renderRow(clickable)}\n {render(particles)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n boop,\n coolInfo,\n clickable,\n clickableState,\n reset,\n conversion,\n treeNode,\n resetButton,\n display: tab\n };\n});\n\nexport default layer;\n","import Row from \"components/layout/Row.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { main } from \"data/projEntry\";\nimport { createAchievement } from \"features/achievements/achievement\";\nimport { jsx } from \"features/feature\";\nimport { createGrid } from \"features/grids/grid\";\nimport { createResource } from \"features/resources/resource\";\nimport { createTreeNode } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { computed } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"a\";\nconst layer = createLayer(id, () => {\n const color = \"yellow\";\n const name = \"Achievements\";\n const points = createResource<DecimalSource>(0, \"achievement power\");\n\n const treeNode = createTreeNode(() => ({\n display: \"A\",\n color,\n tooltip: {\n display: \"Achievements\",\n right: true\n },\n onClick() {\n main.showAchievements();\n }\n }));\n\n const ach1 = createAchievement(() => ({\n image: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n display: \"Get me!\",\n tooltip: computed(() => {\n if (ach1.earned.value) {\n return \"You did it!\";\n }\n return \"How did this happen?\";\n }),\n shouldEarn: () => true\n }));\n const ach2 = createAchievement(() => ({\n display: \"Impossible!\",\n tooltip: computed(() => {\n if (ach2.earned.value) {\n return \"HOW????\";\n }\n return \"Mwahahaha!\";\n }),\n style: { color: \"#04e050\" }\n }));\n const ach3 = createAchievement(() => ({\n display: \"EIEIO\",\n tooltip:\n \"Get a farm point.\\n\\nReward: The dinosaur is now your friend (you can max Farm Points).\",\n shouldEarn: function () {\n return Decimal.gte(f.points.value, 1);\n },\n onComplete() {\n console.log(\"Bork bork bork!\");\n }\n }));\n const achievements = [ach1, ach2, ach3];\n\n const grid = createGrid(() => ({\n rows: 2,\n cols: 2,\n getStartState(id) {\n return id;\n },\n getStyle(id, state) {\n return { backgroundColor: `#${(Number(state) * 1234) % 999999}` };\n },\n // TODO display should return an object\n getTitle(id) {\n let direction = \"\";\n if (id === \"101\") {\n direction = \"top\";\n } else if (id === \"102\") {\n direction = \"bottom\";\n } else if (id === \"201\") {\n direction = \"left\";\n } else if (id === \"202\") {\n direction = \"right\";\n }\n return jsx(() => (\n <Tooltip display={JSON.stringify(this.cells[id].style)} {...{ [direction]: true }}>\n <h3>Gridable #{id}</h3>\n </Tooltip>\n ));\n },\n getDisplay(id, state) {\n return String(state);\n },\n getCanClick() {\n return Decimal.eq(main.points.value, 10);\n },\n onClick(id, state) {\n this.cells[id].state = Number(state) + 1;\n }\n }));\n\n const display = jsx(() => (\n <>\n <Row>\n <Tooltip display={ach1.tooltip} bottom>\n {render(ach1)}\n </Tooltip>\n <Tooltip display={ach2.tooltip} bottom>\n {render(ach2)}\n </Tooltip>\n <Tooltip display={ach3.tooltip} bottom>\n {render(ach3)}\n </Tooltip>\n </Row>\n {renderRow(grid)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n achievements,\n grid,\n treeNode,\n display\n };\n});\n\nexport default layer;\n","import Profectus from \"components/Profectus.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport { jsx } from \"features/feature\";\nimport { createResource, trackBest, trackOOMPS, trackTotal } from \"features/resources/resource\";\nimport { branchedResetPropagation, createTree, GenericTree } from \"features/trees/tree\";\nimport { globalBus } from \"game/events\";\nimport { createLayer, GenericLayer, setupLayerModal } from \"game/layers\";\nimport player, { PlayerData } from \"game/player\";\nimport Decimal, { DecimalSource, format, formatTime } from \"util/bignum\";\nimport { render } from \"util/vue\";\nimport { computed, toRaw } from \"vue\";\nimport a from \"./layers/aca/a\";\nimport c from \"./layers/aca/c\";\nimport f from \"./layers/aca/f\";\n\n/**\n * @hidden\n */\nexport const main = createLayer(\"main\", () => {\n const points = createResource<DecimalSource>(10);\n const best = trackBest(points);\n const total = trackTotal(points);\n\n const pointGain = computed(() => {\n if (!c.generatorUpgrade.bought.value) return new Decimal(0);\n let gain = new Decimal(3.19);\n if (c.lollipopMultiplierUpgrade.bought.value)\n gain = gain.times(c.lollipopMultiplierEffect.value);\n return gain;\n });\n globalBus.on(\"update\", diff => {\n points.value = Decimal.add(points.value, Decimal.times(pointGain.value, diff));\n });\n const oomps = trackOOMPS(points, pointGain);\n\n const { openModal, modal } = setupLayerModal(a);\n\n // Note: Casting as generic tree to avoid recursive type definitions\n const tree = createTree(() => ({\n nodes: [[c.treeNode], [f.treeNode, c.spook]],\n leftSideNodes: [a.treeNode, c.h],\n branches: [\n {\n startNode: f.treeNode,\n endNode: c.treeNode,\n stroke: \"blue\",\n \"stroke-width\": \"25px\",\n style: {\n filter: \"blur(5px)\"\n }\n }\n ],\n onReset() {\n points.value = toRaw(this.resettingNode.value) === toRaw(c.treeNode) ? 0 : 10;\n best.value = points.value;\n total.value = points.value;\n },\n resetPropagation: branchedResetPropagation\n })) as GenericTree;\n\n // Note: layers don't _need_ a reference to everything,\n // but I'd recommend it over trying to remember what does and doesn't need to be included.\n // Officially all you need are anything with persistency or that you want to access elsewhere\n return {\n name: \"Tree\",\n display: jsx(() => (\n <>\n {player.devSpeed === 0 ? <div>Game Paused</div> : null}\n {player.devSpeed && player.devSpeed !== 1 ? (\n <div>Dev Speed: {format(player.devSpeed || 0)}x</div>\n ) : null}\n {player.offlineTime != undefined ? (\n <div>Offline Time: {formatTime(player.offlineTime || 0)}</div>\n ) : null}\n <div>\n {Decimal.lt(points.value, \"1e1000\") ? <span>You have </span> : null}\n <h2>{format(points.value)}</h2>\n {Decimal.lt(points.value, \"1e1e6\") ? <span> points</span> : null}\n </div>\n {Decimal.gt(pointGain.value, 0) ? <div>({oomps.value})</div> : null}\n <Spacer />\n <button onClick={openModal}>open achievements</button>\n {render(modal)}\n {render(tree)}\n <Profectus height=\"200px\" style=\"margin: 10px auto; display: block\" />\n </>\n )),\n points,\n best,\n total,\n oomps,\n tree,\n showAchievements: openModal\n };\n});\n\nexport const getInitialLayers = (\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars */\n player: Partial<PlayerData>\n): Array<GenericLayer> => [main, f, c, a];\n\nexport const hasWon = computed(() => {\n return Decimal.gt(main.points.value, 25);\n});\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport function fixOldSave(\n oldVersion: string | undefined,\n player: Partial<PlayerData>\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n): void {}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import Modal from \"components/Modal.vue\";\nimport {\n CoercableComponent,\n OptionsFunc,\n jsx,\n JSXFunction,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { createNanoEvents, Emitter } from \"nanoevents\";\nimport { InjectionKey, Ref, ref, unref } from \"vue\";\nimport { globalBus } from \"./events\";\nimport { Persistent, persistent } from \"./persistence\";\nimport player from \"./player\";\n\nexport interface FeatureNode {\n rect: DOMRect;\n observer: MutationObserver;\n element: HTMLElement;\n}\n\nexport const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =\n Symbol(\"RegisterNode\");\nexport const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =\n Symbol(\"UnregisterNode\");\nexport const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =\n Symbol(\"Nodes\");\n\nexport interface LayerEvents {\n // Generation\n preUpdate: (diff: number) => void;\n // Actions (e.g. automation)\n update: (diff: number) => void;\n // Effects (e.g. milestones)\n postUpdate: (diff: number) => void;\n}\n\nexport const layers: Record<string, Readonly<GenericLayer> | undefined> = {};\nwindow.layers = layers;\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--layer-color\"?: string;\n }\n}\n\nexport interface Position {\n x: number;\n y: number;\n}\n\nexport interface LayerOptions {\n color?: Computable<string>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n name?: Computable<string>;\n minimizable?: Computable<boolean>;\n forceHideGoBack?: Computable<boolean>;\n minWidth?: Computable<number | string>;\n}\n\nexport interface BaseLayer {\n id: string;\n minimized: Persistent<boolean>;\n emitter: Emitter<LayerEvents>;\n on: OmitThisParameter<Emitter<LayerEvents>[\"on\"]>;\n emit: <K extends keyof LayerEvents>(event: K, ...args: Parameters<LayerEvents[K]>) => void;\n nodes: Ref<Record<string, FeatureNode | undefined>>;\n}\n\nexport type Layer<T extends LayerOptions> = Replace<\n T & BaseLayer,\n {\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n name: GetComputableTypeWithDefault<T[\"name\"], string>;\n minWidth: GetComputableTypeWithDefault<T[\"minWidth\"], 600>;\n minimizable: GetComputableTypeWithDefault<T[\"minimizable\"], true>;\n forceHideGoBack: GetComputableType<T[\"forceHideGoBack\"]>;\n }\n>;\n\nexport type GenericLayer = Replace<\n Layer<LayerOptions>,\n {\n name: ProcessedComputable<string>;\n minWidth: ProcessedComputable<number>;\n minimizable: ProcessedComputable<boolean>;\n }\n>;\n\nexport const persistentRefs: Record<string, Set<Persistent>> = {};\nexport const addingLayers: string[] = [];\nexport function createLayer<T extends LayerOptions>(\n id: string,\n optionsFunc: OptionsFunc<T, BaseLayer, BaseLayer>\n): Layer<T> {\n return createLazyProxy(() => {\n const layer = {} as T & Partial<BaseLayer>;\n const emitter = (layer.emitter = createNanoEvents<LayerEvents>());\n layer.on = emitter.on.bind(emitter);\n layer.emit = emitter.emit.bind(emitter);\n layer.nodes = ref({});\n layer.id = id;\n\n addingLayers.push(id);\n persistentRefs[id] = new Set();\n layer.minimized = persistent(false);\n Object.assign(layer, optionsFunc.call(layer));\n if (\n addingLayers[addingLayers.length - 1] == null ||\n addingLayers[addingLayers.length - 1] !== id\n ) {\n throw `Adding layers stack in invalid state. This should not happen\\nStack: ${addingLayers}\\nTrying to pop ${layer.id}`;\n }\n addingLayers.pop();\n\n processComputable(layer as T, \"color\");\n processComputable(layer as T, \"display\");\n processComputable(layer as T, \"name\");\n setDefault(layer, \"name\", layer.id);\n processComputable(layer as T, \"minWidth\");\n setDefault(layer, \"minWidth\", 600);\n processComputable(layer as T, \"minimizable\");\n setDefault(layer, \"minimizable\", true);\n\n return layer as unknown as Layer<T>;\n });\n}\n\nexport function addLayer(\n layer: GenericLayer,\n player: { layers?: Record<string, Record<string, unknown>> }\n): void {\n console.info(\"Adding layer\", layer.id);\n if (layers[layer.id]) {\n console.error(\n \"Attempted to add layer with same ID as existing layer\",\n layer.id,\n layers[layer.id]\n );\n return;\n }\n\n setDefault(player, \"layers\", {});\n if (player.layers[layer.id] == null) {\n player.layers[layer.id] = {};\n }\n layers[layer.id] = layer;\n\n globalBus.emit(\"addLayer\", layer, player.layers[layer.id]);\n}\n\nexport function getLayer<T extends GenericLayer>(layerID: string): T {\n return layers[layerID] as T;\n}\n\nexport function removeLayer(layer: GenericLayer): void {\n console.info(\"Removing layer\", layer.id);\n globalBus.emit(\"removeLayer\", layer);\n\n layers[layer.id] = undefined;\n}\n\nexport function reloadLayer(layer: GenericLayer): void {\n removeLayer(layer);\n\n // Re-create layer\n addLayer(layer, player);\n}\n\nexport function setupLayerModal(layer: GenericLayer): {\n openModal: VoidFunction;\n modal: JSXFunction;\n} {\n const showModal = ref(false);\n return {\n openModal: () => (showModal.value = true),\n modal: jsx(() => (\n <Modal\n modelValue={showModal.value}\n onUpdate:modelValue={value => (showModal.value = value)}\n v-slots={{\n header: () => <h2>{unref(layer.name)}</h2>,\n body: unref(layer.display)\n }}\n />\n ))\n };\n}\n\nglobalBus.on(\"update\", function updateLayers(diff) {\n Object.values(layers).forEach(layer => {\n layer?.emit(\"preUpdate\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"update\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"postUpdate\", diff);\n });\n});\n","import Col from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport {\n CoercableComponent,\n Component as ComponentKey,\n GatherProps,\n GenericComponent,\n JSXFunction,\n Visibility\n} from \"features/feature\";\nimport {\n Component,\n computed,\n ComputedRef,\n DefineComponent,\n defineComponent,\n isRef,\n onUnmounted,\n PropType,\n ref,\n Ref,\n ShallowRef,\n shallowRef,\n unref,\n watchEffect\n} from \"vue\";\nimport { DoNotCache, ProcessedComputable } from \"./computed\";\n\nexport function coerceComponent(\n component: CoercableComponent,\n defaultWrapper = \"span\"\n): DefineComponent {\n if (typeof component === \"function\") {\n return defineComponent({ render: component });\n }\n if (typeof component === \"string\") {\n if (component.length > 0) {\n component = component.trim();\n if (component.charAt(0) !== \"<\") {\n component = `<${defaultWrapper}>${component}</${defaultWrapper}>`;\n }\n\n return defineComponent({ template: component });\n }\n return defineComponent({ render: () => ({}) });\n }\n return component;\n}\n\nexport type VueFeature = {\n [ComponentKey]: GenericComponent;\n [GatherProps]: () => Record<string, unknown>;\n};\n\nexport function render(object: VueFeature | CoercableComponent): JSX.Element | DefineComponent {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n return coerceComponent(object);\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRow(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(render)}</Row>;\n}\n\nexport function renderCol(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(render)}</Col>;\n}\n\nexport function renderJSX(object: VueFeature | CoercableComponent): JSX.Element {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n if (typeof object === \"string\") {\n return <>{object}</>;\n }\n // TODO why is object typed as never?\n const Comp = object as DefineComponent;\n return <Comp />;\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRowJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(renderJSX)}</Row>;\n}\n\nexport function renderColJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(renderJSX)}</Col>;\n}\n\nexport function isCoercableComponent(component: unknown): component is CoercableComponent {\n if (typeof component === \"string\") {\n return true;\n } else if (typeof component === \"object\") {\n if (component == null) {\n return false;\n }\n return \"render\" in component || \"component\" in component;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } else if (typeof component === \"function\" && (component as any)[DoNotCache] === true) {\n return true;\n }\n return false;\n}\n\nexport function setupHoldToClick(\n onClick?: Ref<((e?: MouseEvent | TouchEvent) => void) | undefined>,\n onHold?: Ref<VoidFunction | undefined>\n): {\n start: (e: MouseEvent | TouchEvent) => void;\n stop: VoidFunction;\n handleHolding: VoidFunction;\n} {\n const interval = ref<null | number>(null);\n const event = ref<MouseEvent | TouchEvent | undefined>(undefined);\n\n function start(e: MouseEvent | TouchEvent) {\n if (!interval.value) {\n interval.value = setInterval(handleHolding, 250);\n }\n event.value = e;\n }\n function stop() {\n if (interval.value) {\n clearInterval(interval.value);\n interval.value = null;\n }\n }\n function handleHolding() {\n if (onHold && onHold.value) {\n onHold.value();\n } else if (onClick && onClick.value) {\n onClick.value(event.value);\n }\n }\n\n onUnmounted(stop);\n\n return { start, stop, handleHolding };\n}\n\nexport function getFirstFeature<T extends { visibility: ProcessedComputable<Visibility> }>(\n features: T[],\n filter: (feature: T) => boolean\n): { firstFeature: Ref<T | undefined>; hiddenFeatures: Ref<T[]> } {\n const filteredFeatures = computed(() =>\n features.filter(\n feature => unref(feature.visibility) === Visibility.Visible && filter(feature)\n )\n );\n return {\n firstFeature: computed(() => filteredFeatures.value[0]),\n hiddenFeatures: computed(() => filteredFeatures.value.slice(1))\n };\n}\n\nexport function computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\"> {\n const comp = shallowRef<Component | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\" | null> {\n const comp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(component);\n comp.value = currComponent == null ? null : coerceComponent(currComponent, defaultWrapper);\n });\n return comp;\n}\n\nexport function wrapRef<T>(ref: Ref<ProcessedComputable<T>>): ComputedRef<T> {\n return computed(() => unwrapRef(ref));\n}\n\nexport function unwrapRef<T>(ref: Ref<ProcessedComputable<T>>): T {\n return unref<T>(unref(ref));\n}\n\nexport function setRefValue<T>(ref: Ref<T | Ref<T>>, value: T) {\n if (isRef(ref.value)) {\n ref.value.value = value;\n } else {\n ref.value = value;\n }\n}\n\nexport type PropTypes =\n | typeof Boolean\n | typeof String\n | typeof Number\n | typeof Function\n | typeof Object\n | typeof Array;\n// TODO Unfortunately, the typescript engine gives up on typing completely when you use this method,\n// Even though it has the same typing as when doing it manually\nexport function processedPropType<T>(...types: PropTypes[]): PropType<ProcessedComputable<T>> {\n if (!types.includes(Object)) {\n types.push(Object);\n }\n return types as PropType<ProcessedComputable<T>>;\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot } from \"vue\"\n\nimport {\n RegisterNodeInjectionKey,\n UnregisterNodeInjectionKey,\n NodesInjectionKey,\n FeatureNode\n} from \"game/layers\";\nimport { nextTick, provide, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst nodes = ref<Record<string, FeatureNode | undefined>>({});\n\nexpose({ nodes });\n\nconst observerOptions = {\n attributes: true,\n childList: true,\n subtree: false\n};\n\nprovide(RegisterNodeInjectionKey, (id, element) => {\n const observer = new MutationObserver(() => updateNode(id));\n observer.observe(element, observerOptions);\n nodes.value[id] = { element, observer, rect: element.getBoundingClientRect() };\n nextTick(() => updateNode(id));\n});\nprovide(UnregisterNodeInjectionKey, id => {\n nodes.value[id]?.observer.disconnect();\n nodes.value[id] = undefined;\n});\nprovide(NodesInjectionKey, nodes);\n\nfunction updateNode(id: string) {\n const node = nodes.value[id];\n if (node == null) {\n return;\n }\n node.rect = node.element.getBoundingClientRect();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return _renderSlot(_ctx.$slots, \"default\")\n}\n}\n\n})","import script from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withModifiers as _withModifiers, mergeProps as _mergeProps, withDirectives as _withDirectives, Transition as _Transition, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"onPointerdown\"]\nconst _hoisted_2 = { class: \"modal-wrapper\" }\nconst _hoisted_3 = { class: \"modal-container\" }\nconst _hoisted_4 = { class: \"modal-header\" }\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\" default header \")\nconst _hoisted_6 = { class: \"modal-body\" }\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" default body \")\nconst _hoisted_8 = { class: \"modal-footer\" }\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"modal-default-flex-grow\" }, null, -1)\n\nimport { FeatureNode } from \"game/layers\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Context from \"./Context.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { expose, emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n modelValue: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isOpen = computed(() => props.modelValue || isAnimating.value);\nfunction close() {\n emit(\"update:modelValue\", false);\n}\n\nconst isAnimating = ref(false);\n\nconst contextRef = ref<typeof Context | null>(null);\nconst nodes = computed<Record<string, FeatureNode | undefined> | null>(\n () => contextRef.value?.nodes ?? null\n);\n\nexpose({ isOpen, nodes });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"#modal-root\" }, [\n _createVNode(_Transition, {\n name: \"modal\",\n onBeforeEnter: _cache[0] || (_cache[0] = ($event: any) => (isAnimating.value = true)),\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (isAnimating.value = false))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", _mergeProps({\n class: \"modal-mask\",\n onPointerdown: _withModifiers(close, [\"self\"])\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"header\", { shown: _unref(isOpen) }, () => [\n _hoisted_5\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(Context, {\n ref_key: \"contextRef\",\n ref: contextRef\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"body\", { shown: _unref(isOpen) }, () => [\n _hoisted_7\n ])\n ]),\n _: 3\n }, 512)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _renderSlot(_ctx.$slots, \"footer\", { shown: _unref(isOpen) }, () => [\n _createElementVNode(\"div\", { class: \"modal-default-footer\" }, [\n _hoisted_9,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: close\n }, \" Close \")\n ])\n ])\n ])\n ])\n ])\n ], 16, _hoisted_1), [\n [_vShow, __props.modelValue]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","import script from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=d02c1f40&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\n\nimport \"components/common/fields.css\";\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { ref, toRef, watch } from \"vue\";\nimport VueNextSelect from \"vue-next-select\";\nimport \"vue-next-select/dist/index.css\";\n\nexport type SelectOption = { label: string; value: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n options: null,\n placeholder: null,\n closeOnSelect: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: unknown): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: unknown;\n options: SelectOption[];\n placeholder?: string;\n closeOnSelect?: boolean;\n}\n\n\n\n\nconst titleComponent = computeOptionalComponent(toRef(props, \"title\"), \"span\");\n\nconst value = ref<SelectOption | undefined>(\n props.options.find(option => option.value === props.modelValue)\n);\nwatch(toRef(props, \"modelValue\"), modelValue => {\n if (value.value?.value !== modelValue) {\n value.value = props.options.find(option => option.value === modelValue);\n }\n});\n\nfunction onUpdate(value: SelectOption) {\n emit(\"update:modelValue\", value.value);\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(VueNextSelect), {\n options: __props.options,\n modelValue: value.value,\n \"onUpdate:modelValue\": [\n _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onUpdate\n ],\n min: 1,\n \"label-by\": \"label\",\n placeholder: __props.placeholder,\n \"close-on-select\": __props.closeOnSelect\n }, null, 8, [\"options\", \"modelValue\", \"placeholder\", \"close-on-select\"])\n ]))\n}\n}\n\n})","import script from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=0f1110ed&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, isRef as _isRef, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, createElementVNode as _createElementVNode, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8bda704a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onSubmit\"]\nconst _hoisted_2 = { class: \"field\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_4 = [\"placeholder\"]\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, onMounted, ref, toRefs, unref } from \"vue\";\nimport VueTextareaAutosize from \"vue-textarea-autosize\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n textArea: { type: Boolean },\n placeholder: null,\n maxHeight: null\n },\n emits: [\"update:modelValue\", \"submit\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: string): void;\n (e: \"submit\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: CoercableComponent;\n modelValue?: string;\n textArea?: boolean;\n placeholder?: string;\n maxHeight?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst titleComponent = computed(\n () => props.title?.value && coerceComponent(unref(props.title.value), \"span\")\n);\n\nconst field = ref<HTMLElement | null>(null);\nonMounted(() => {\n field.value?.focus();\n});\n\nconst value = computed({\n get() {\n return unref(props.modelValue) || \"\";\n },\n set(value: string) {\n emit(\"update:modelValue\", value);\n }\n});\n\nfunction submit() {\n emit(\"submit\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"form\", {\n onSubmit: _withModifiers(submit, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n (__props.textArea)\n ? (_openBlock(), _createBlock(_unref(VueTextareaAutosize), {\n key: 1,\n modelValue: _unref(value),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n maxHeight: __props.maxHeight,\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 8, [\"modelValue\", \"placeholder\", \"maxHeight\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"input\", {\n key: 2,\n type: \"text\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n class: _normalizeClass({ fullWidth: !__props.title }),\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 42, _hoisted_4)), [\n [_vModelText, _unref(value)]\n ])\n ])\n ], 40, _hoisted_1))\n}\n}\n\n})","import script from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Text.vue?vue&type=style&index=0&id=8bda704a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8bda704a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, isRef as _isRef, vModelCheckbox as _vModelCheckbox, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43cf95d0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: boolean;\n}\n\n\n\n\nconst component = computed(() => coerceComponent(unref(props.title) || \"<span></span>\", \"span\"));\n\nconst value = computed({\n get() {\n return !!props.modelValue;\n },\n set(value: boolean) {\n emit(\"update:modelValue\", value);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"checkbox\",\n class: \"toggle\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null))\n }, null, 512), [\n [_vModelCheckbox, _unref(value)]\n ]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n ]))\n}\n}\n\n})","import script from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Toggle.vue?vue&type=style&index=0&id=43cf95d0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43cf95d0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"col\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-adb5f26e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"material-icons pinned\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tooltip-container\", { shown: _ctx.isShown }]),\n onMouseenter: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHovered = true)),\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHovered = false)),\n onClickCapture: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.togglePinned && _ctx.togglePinned(...args)))\n }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, true),\n (_ctx.elementComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.elementComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_ctx.isShown)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tooltip\", {\n top: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.UP,\n left: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.LEFT,\n right: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.RIGHT,\n bottom: _ctx.unref(_ctx.direction) === _ctx.TooltipDirection.DOWN,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_ctx.showPin)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"push_pin\"))\n : _createCommentVNode(\"\", true),\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 1 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport themes from \"data/themes\";\nimport { CoercableComponent, jsx, StyleValue } from \"features/feature\";\nimport { Persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport {\n coerceComponent,\n computeOptionalComponent,\n processedPropType,\n render,\n unwrapRef,\n VueFeature\n} from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\nimport { TooltipDirection } from \"./tooltip\";\n\nexport default defineComponent({\n props: {\n element: processedPropType<VueFeature>(Object),\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n direction: processedPropType<TooltipDirection>(Number),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n pinned: Object as PropType<Persistent<boolean>>\n },\n setup(props) {\n const { element, display, pinned } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(pinned) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n const elementComp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(element);\n elementComp.value =\n currComponent == null\n ? null\n : coerceComponent(jsx(() => render(currComponent) as JSX.Element));\n });\n\n function togglePinned(e: MouseEvent) {\n const isPinned = pinned as unknown as Persistent<boolean> | undefined; // Vue typing :/\n if (e.shiftKey && isPinned) {\n isPinned.value = !isPinned.value;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n const showPin = computed(() => unwrapRef(pinned) && themes[settings.theme].showPin);\n\n return {\n TooltipDirection,\n isHovered,\n isShown,\n comp,\n elementComp,\n unref,\n togglePinned,\n showPin\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=adb5f26e&scoped=true&ts=true\"\nimport script from \"./Tooltip.vue?vue&type=script&lang=ts\"\nexport * from \"./Tooltip.vue?vue&type=script&lang=ts\"\n\nimport \"./Tooltip.vue?vue&type=style&index=0&id=adb5f26e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-adb5f26e\"]])\n\nexport default __exports__","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 7634;\nmodule.exports = webpackEmptyContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkprofectus\"] = self[\"webpackChunkprofectus\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(6098); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["defaultTheme","variables","floatingTabs","mergeAdjacent","showPin","Themes","classic","paper","nordic","aqua","Component","Symbol","GatherProps","id","getUniqueID","prefix","Visibility","jsx","func","showIf","condition","otherwise","None","Visible","setDefault","object","key","value","undefined","findFeatures","obj","type","objects","handleObject","Object","keys","forEach","push","isRef","TooltipDirection","addTooltip","element","options","pinnable","console","error","pinned","UP","elementComponent","elementGratherProps","bind","display","classes","style","direction","xoffset","yoffset","this","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","async","startGameLoop","watch","PersistentState","DefaultValue","StackTrace","Deleted","getStackTrace","Error","stack","split","slice","map","line","trim","join","persistent","defaultValue","ref","addingLayers","warn","persistentRefs","add","layer","saveData","features","path","foundPersistent","delete","persistentState","reduce","acc","curr","savedValue","isReactive","includes","foundPersistentInChild","clear","state","reactive","devSpeed","name","tabs","time","autosave","offlineProd","offlineTime","timePlayed","keepGoing","modID","modVersion","layers","stringifySave","player","JSON","stringify","unref","playerHandler","get","target","Proxy","set","property","receiver","isNaN","sign","mag","currentValue","ownKeys","Reflect","has","getOwnPropertyDescriptor","window","active","saves","showTPS","theme","unthrottled","loadSettings","item","localStorage","getItem","settings","parse","decodeURIComponent","escape","atob","assign","setItem","btoa","unescape","encodeURIComponent","deep","hardResetSettings","settingFields","registerSettingField","component","infoComponents","registerInfoComponent","gameComponents","shallowReactive","lastTenTicks","hasNaN","NaNPath","render","_ctx","_cache","$props","$setup","$data","$options","_component_Context","class","color","showGoBack","onClick","args","goBack","minimized","$event","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","width","parseInt","tabValue","flexGrow","flexShrink","flexBasis","margin","__exports__","_withScopeId","n","_hoisted_1","_hoisted_2","open","__props","expose","isOpen","Modal","modelValue","header","body","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","href","_hoisted_13","_hoisted_14","changelog","_props","title","logo","author","discordName","discordLink","versionNumber","versionTitle","infoComponent","openChangelog","src","alt","shown","themes","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","Toggle","enablePausing","disabled","skipConfirm","emits","isConfirming","click","cancel","confirming","$slots","left","activated","activatedTimeout","clearTimeout","setTimeout","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","save","dateFormat","Intl","DateTimeFormat","year","month","day","hour","minute","second","isEditing","newName","isActive","currentTime","changeName","FeedbackButton","DangerButton","onConfirmingChanged","format","Text","onSubmit","modal","importingFailed","saveToImport","playerData","e","bankContext","bank","cachedSaves","getCachedSave","exportSave","saveToExport","el","document","createElement","appendChild","select","setSelectionRange","execCommand","removeChild","duplicateSave","deleteSave","removeItem","openSave","newFromPreset","preset","editSave","currSave","ref_key","list","handle","itemKey","Save","onOpen","onExport","onEditName","onDuplicate","onDelete","footer","placeholder","length","closeOnSelect","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","info","savesManager","useHeader","banner","openDiscord","$attrs","Tooltip","DOWN","RIGHT","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","ref_for","Nav","Layer","$refs","playAgain","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","gameComponent","Game","TPS","GameOverScreen","NaNScreen","log","vue","createApp","App","mount","MAX_SIGNIFICANT_DIGITS","EXP_LIMIT","LAYER_DOWN","log10","FIRST_NEG_LAYER","NUMBER_EXP_MAX","NUMBER_EXP_MIN","MAX_ES_IN_A_ROW","IGNORE_COMMAS","COMMAS_ARE_DECIMAL_POINTS","powerOf10","powersOf10","i","for","indexOf0InPowersOf10","power","critical_headers","E","critical_tetr_values","critical_slog_values","D","Decimal","fromValue_noAlloc","FC","fromComponents","FC_NN","fromComponents_noNormalize","decimalPlaces","places","len","numDigits","ceil","abs","rounded","pow","parseFloat","toFixed","f_maglog10","f_gamma","trunc","NEGATIVE_INFINITY","scal1","l","n2","np","exp","OMEGA","f_lambertw","z","tol","w","wn","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","lt","constructor","fromDecimal","fromNumber","fromString","m","floor","man","residue","fromMantissaExponent","exponent","POSITIVE_INFINITY","s","mantissa","fromMantissaExponent_noNormalize","fromValue","neg","other","recip","reciprocate","cmp","cmpabs","eq","notEquals","lte","gte","minabs","maxabs","clamp","clampMin","clampMax","tolerance","cmp_tolerance","eq_tolerance","neq_tolerance","notEquals_tolerance","lt_tolerance","lte_tolerance","gt_tolerance","gte_tolerance","pLog10","absLog10","base","log2","logarithm","pow10","root","_other","factorial","gamma","lngamma","sqr","sqrt","cube","cbrt","height","payload","tetrate","iteratedexp","times","iteratedlog","layeradd10","layeradd","slog","lambertw","ssqrt","pentate","resourcesAvailable","priceStart","priceRatio","currentOwned","affordGeometricSeries_core","numItems","sumGeometricSeries_core","priceAdd","affordArithmeticSeries_core","sumArithmeticSeries_core","cost","currentRpS","deltaRpS","efficiencyOfPurchase_core","maxLayers","random","randomsign","randomexp","randommag","actualStart","b","b2","plus","normalize","absmag","signmag","replace","pentationparts","heightparts","result","tetrationparts","powparts","toLowerCase","ptparts","parts","ecount","numberAttempt","newparts","charAt","layerstring","chrcode","charCodeAt","substr","me","mantissaWithDecimalPlaces","magnitudeWithDecimalPlaces","repeat","toExponential","toStringWithDecimalPlaces","toPrecision","valueOf","toJSON","negate","negated","sgn","decimal","a","layera","layerb","magdiff","subtract","minus","newmag","multiply","divide","divideBy","dividedBy","dNaN","reciprocal","compare","equals","compare_tolerance","magA","magB","equals_tolerance","pow_base","t","lm","adj","l2","this_num","negln","oldheight","fracheight","old_payload","next_payload","tetrate_critical","fulltimes","fraction","layerloss","dNegOne","copy","slog_critical","critical_section","grid","lower","upper","basefrac","frac","slogthis","slogdest","lnx","sin","cos","tan","asin","acos","atan","sinh","cosh","tanh","asinh","acosh","atanh","ascensionPenalty","ascensions","egg","lessThanOrEqualTo","lessThan","greaterThanOrEqualTo","greaterThan","MAX_VALUE","MIN_VALUE","decimalOne","exponentialFormat","num","precision","eString","defaultDecimalsShown","commaFormat","init","portions","regularFormat","eeee1000","e100000","e1000","e9","e6","e3","nearOne","thousandth","zero","small","defaultShowSmall","invertOOM","val","formatWhole","formatTime","seconds","toPlaces","x","maxAccepted","formatSmall","camelToTitle","camel","toUpperCase","isPlainObject","prototype","call","isFunction","DoNotCache","processComputable","computable","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","baseObject","calculated","calculateObj","setupInitialStore","stringifiedSave","load","loadSave","newSave","playerObj","removeLayer","addLayer","fixOldSave","getInitialLayers","onbeforeunload","hardReset","xmlns","viewBox","d","appear","script","createResource","displayName","resource","trackBest","best","amount","trackTotal","total","prevAmount","tetra8","e100","trackOOMPS","pointGain","oomps","oompsMag","lastPoints","prev","oompsString","displayResource","overrideAmount","_component_Links","nodesComp","leftNodesComp","rightNodesComp","branches","links","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeObserver","ResizeObserver","updateNodes","inject","NodesInjectionKey","resizeListener","onMounted","resListener","observe","isDirty","getBoundingClientRect","values","node","fonts","ready","then","validLinks","filter","Link","leftSideNodes","rightSideNodes","Links","shallowRef","currNodes","row","_component_MarkNode","_component_Node","visibility","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","onHold","MarkNode","Node","isCoercableComponent","TreeNodeType","TreeType","createTreeNode","optionsFunc","TreeNode","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","createResourceTooltip","requiredResource","requirement","req","backgroundImage","earned","image","feature","achievement","locked","bought","getNotifyStyle","strength","transform","borderColor","zIndex","getHighNotifyStyle","use","toast","AchievementType","createAchievement","Achievement","complete","shouldEarn","genericAchievement","onComplete","Display","_component_GridCell","rows","cols","col","gatherCellProps","cells","tile","titleComponent","GridCell","cell","createGridProxy","getGridHandler","getCellHandler","configurable","enumerable","writable","cache","prop","getState","createGrid","Grid","getID","startState","setState","clickable","currDisplay","Title","Description","description","ClickableType","createClickable","Clickable","createResetButton","resetButton","resetDescription","conversion","gainResource","actualGain","minimumGain","buyMax","baseResource","nextAt","currentAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","currentGain","gain","gainModifier","apply","scaling","current","roundUpCost","next","createPolynomialScaling","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","onInit","onContainerResized","onHotReload","app","updateBounds","resizeTo","backgroundAlpha","view","onBeforeUnmount","destroy","resize","ParticlesType","createParticles","particles","Particles","addEmitter","config","genericParticles","Promise","resolve","stage","emittersToAdd","upgradeConfig","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","createAdditiveModifier","addend","enabled","processedAddend","processedDescription","processedEnabled","createMultiplicativeModifier","multiplier","processedMultiplier","createExponentialModifier","processedExponent","createSequentialModifier","modifiers","modifier","reduceRight","createModifierSection","subtitle","unit","fullWidth","top","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","normalizedProgress","progressNumber","Direction","Up","clipPath","Down","Right","Left","Default","BarType","createBar","Bar","BuyableType","createBuyable","buyable","canPurchase","canAfford","genericBuyable","purchaseLimit","maxed","currClasses","purchase","onPurchase","CurrDisplay","EffectDisplay","amountDisplay","notifyStyle","challenge","done","completed","canStart","toggle","buttonText","canComplete","currActive","currCanComplete","Goal","goal","Reward","reward","ChallengeType","createChallenge","completions","Challenge","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","shiftKey","ctrlKey","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","OptionsDisplay","optionsDisplay","MilestoneType","MilestoneDisplay","createMilestone","Milestone","All","Configurable","Incomplete","genericMilestone","msDisplayOptions","option","TabType","createTab","Tab","selectTab","glowColorStyle","floating","_component_TabButton","_component_Sticky","tabClasses","tabStyle","button","onSelectTab","selected","activeTab","gatherButtonProps","Sticky","TabButton","currActiveTab","TabButtonType","TabFamilyType","createTabFamily","tabFamily","TabFamily","parsedTabs","tabButton","processedTabFamily","firstTab","find","upgrade","currCost","UpgradeType","createUpgrade","Upgrade","genericUpgrade","createLayer","points","beep","thingy","otherThingy","spentOnBuyables","waffleBoost","icecreamCap","coolInfo","lollipopMilestone3","lollipopMilestone4","f","boop","lollipopMilestones","funChallenge","funEffect","main","generatorUpgrade","lollipopMultiplierUpgrade","lollipopMultiplierEffect","ret","unlockIlluminatiUpgrade","quasiUpgrade","exhancers","upgrades","thingEffect","stuffEffect","confirmRespec","respecBuyables","sellExhancer","buyablesDisplay","longBoi","tallBoi","textShadow","borderWidth","flatBoi","tooltip","textDecoration","g","h","right","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","confettiParticles","clientX","clientY","playOnceAndDestroy","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","openModal","setupLayerModal","toRaw","showAchievements","oldVersion","emitter","on","Set","pop","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","renderJSX","Comp","setupHoldToClick","interval","event","handleHolding","computeComponent","unwrapRef","computeOptionalComponent","currComponent","wrapRef","processedPropType","types","observerOptions","attributes","childList","subtree","updateNode","provide","MutationObserver","disconnect","isAnimating","close","to","onBeforeEnter","onAfterLeave","onPointerdown","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","isShown","onMouseenter","isHovered","onClickCapture","togglePinned","elementComp","LEFT","bottom","isPinned","stopPropagation","webpackEmptyContext","code","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","definition","o","defineProperty","globalThis","hasOwnProperty","toStringTag","nmd","paths","children","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file