From d66a93cf9aafe334b062f8ea1a54b98ae79bb150 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 30 Mar 2022 02:27:43 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20profectu?= =?UTF-8?q?s-engine/TMT-Demo@a0a0a644c32df2e077f47b34a1a3b9e10bf5fec7=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/app.04a5daa4.css | 1 + css/app.c329c4e6.css | 1 - index.html | 2 +- js/app-legacy.8c965777.js | 2 ++ js/app-legacy.8c965777.js.map | 1 + js/app-legacy.f9b9e5f6.js | 2 -- js/app-legacy.f9b9e5f6.js.map | 1 - js/app.55e61c21.js | 2 ++ js/app.55e61c21.js.map | 1 + js/app.a008bbca.js | 2 -- js/app.a008bbca.js.map | 1 - 11 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 css/app.04a5daa4.css delete mode 100644 css/app.c329c4e6.css create mode 100644 js/app-legacy.8c965777.js create mode 100644 js/app-legacy.8c965777.js.map delete mode 100644 js/app-legacy.f9b9e5f6.js delete mode 100644 js/app-legacy.f9b9e5f6.js.map create mode 100644 js/app.55e61c21.js create mode 100644 js/app.55e61c21.js.map delete mode 100644 js/app.a008bbca.js delete mode 100644 js/app.a008bbca.js.map diff --git a/css/app.04a5daa4.css b/css/app.04a5daa4.css new file mode 100644 index 0000000..2b1e828 --- /dev/null +++ b/css/app.04a5daa4.css @@ -0,0 +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-3cbf87a6]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-3cbf87a6]: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-3cbf87a6]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-3cbf87a6]{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-3cbf87a6]{margin:0;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-3cbf87a6]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-3cbf87a6]{padding-bottom:0}.modal-body .layer-tab[data-v-3cbf87a6]:not(.hasSubtabs){padding-top:0}.minimize[data-v-3cbf87a6]{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-3cbf87a6]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-3cbf87a6]{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-3cbf87a6]: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-c8952e00]{position:relative;--xoffset:0px;--yoffset:0px}.tooltip[data-v-c8952e00],.tooltip[data-v-c8952e00]:after{pointer-events:none;position:absolute}.tooltip[data-v-c8952e00]{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}.shown[data-v-c8952e00]{z-index:10}.fade-enter-from[data-v-c8952e00],.fade-leave-to[data-v-c8952e00]{opacity:0}.tooltip[data-v-c8952e00]: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-c8952e00]:not(.right):not(.bottom):not(.top),.tooltip.left[data-v-c8952e00]{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-c8952e00]:not(.right):not(.bottom):not(.top):after,.tooltip.left[data-v-c8952e00]: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-c8952e00]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-c8952e00]: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-c8952e00]{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-c8952e00]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.header[data-v-c40c38d8]{margin-bottom:-10px}[data-v-c40c38d8] .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-51b8996d]{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-51b8996d]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-51b8996d]{height:100%;width:unset}.overlay-nav[data-v-51b8996d]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>[data-v-51b8996d]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-51b8996d]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-51b8996d]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .info[data-v-51b8996d],.nav .saves[data-v-51b8996d]{display:flex}.tooltip-container[data-v-51b8996d]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-51b8996d]{position:relative}.discord img[data-v-51b8996d]{width:100%;height:100%}.discord-links[data-v-51b8996d]{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-51b8996d]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-51b8996d]{left:-10px}.discord-links li[data-v-51b8996d]{margin-bottom:4px}.discord-links li[data-v-51b8996d]:first-child{font-size:1.2em}:not(.overlay-nav) .discord:hover .discord-links[data-v-51b8996d]{right:0}.material-icons[data-v-51b8996d]{font-size:36px}.material-icons[data-v-51b8996d]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-51b8996d]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-51b8996d]{width:unset;height:25px}.version[data-v-51b8996d]{color:var(--points)}.version:hover span[data-v-51b8996d]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-51b8996d],.overlay-nav>div>a[data-v-51b8996d]{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}.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-82704be4]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px 0 10px}.treeNode>[data-v-82704be4]: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}.treeNode.small[data-v-82704be4]{height:60px;width:60px}.treeNode.small>[data-v-82704be4]:first-child{font-size:30px}.ghost[data-v-82704be4]{visibility:hidden;pointer-events:none}.resize-listener[data-v-61b3869c],svg[data-v-61b3869c]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.row[data-v-28bdfe90]{margin:50px auto}.left-side-nodes[data-v-28bdfe90]{position:absolute;left:15px;top:65px}.side-nodes[data-v-28bdfe90]{position:absolute;right:15px;top:65px}.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-2e1ea71d]{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-4bdd63c1],.resize-listener[data-v-4bdd63c1]{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.fullWidth[data-v-8adbf51e]{width:100%}.sticky[data-v-3b196306]{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-3b196306]{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-86da8746]{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-86da8746]:first-child{margin:-4px -11px var(--feature-margin) -11px}.layer-tab>.tab-family-container[data-v-86da8746]:first-child:nth-last-child(3){border-bottom-style:none;border-left-style:none;border-right-style:none;height:calc(100% + 50px)}.tab-family-container[data-v-86da8746]>:nth-child(2){margin-top:20px}.tab-family-container[data-v-f18896fc][data-v-86da8746]>:last-child{margin-bottom:20px}.tab-family-container .sticky[data-v-86da8746]{margin-left:-3px!important;margin-right:-3px!important}.tab-buttons-container[data-v-86da8746]{width:calc(100% - 14px);z-index:4}.tab-buttons-container[data-v-86da8746]:not(.floating){border-top:4px solid;border-bottom:4px solid;border-color:inherit}.tab-buttons-container:not(.floating) .tab-buttons[data-v-86da8746]{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-86da8746]{justify-content:center;margin-top:-25px}.tab-buttons[data-v-86da8746]{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-86da8746]{padding-right:60px}.tab-buttons[data-v-86da8746]:not(.floating){text-align:left;border-bottom:inherit;border-width:4px;box-sizing:border-box;height:50px}.modal-body .tab-buttons[data-v-86da8746]{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-86da8746]{padding-left:70px}:not(.showGoBack)>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-86da8746]{padding-left:2px}.tab-buttons-container[data-v-86da8746]:not(.floating):first-child{border-top:0}.minimizable>.tab-buttons-container[data-v-86da8746]:not(.floating):first-child{padding-right:50px}.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-86da8746]{margin-top:-50px}.tab-buttons-container+[data-v-86da8746]{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/css/app.c329c4e6.css b/css/app.c329c4e6.css deleted file mode 100644 index 62ae278..0000000 --- a/css/app.c329c4e6.css +++ /dev/null @@ -1 +0,0 @@ -.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.row>:not(.feature){margin:0;display:flex}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent>.feature:not(.dontMerge),.row.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin-left:0;margin-right:0;border-radius:0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child,.row.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>.feature:not(.dontMerge):last-child,.row.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child:last-child,.row.mergeAdjacent>.tooltip-container:first-child:last-child>.feature:not(.dontMerge){border-radius:var(--border-radius)}.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-3cbf87a6]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-3cbf87a6]: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-3cbf87a6]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-3cbf87a6]{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-3cbf87a6]{margin:0;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-3cbf87a6]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-3cbf87a6]{padding-bottom:0}.modal-body .layer-tab[data-v-3cbf87a6]:not(.hasSubtabs){padding-top:0}.minimize[data-v-3cbf87a6]{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-3cbf87a6]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-3cbf87a6]{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-3cbf87a6]: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-c8952e00]{position:relative;--xoffset:0px;--yoffset:0px}.tooltip[data-v-c8952e00],.tooltip[data-v-c8952e00]:after{pointer-events:none;position:absolute}.tooltip[data-v-c8952e00]{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}.shown[data-v-c8952e00]{z-index:10}.fade-enter-from[data-v-c8952e00],.fade-leave-to[data-v-c8952e00]{opacity:0}.tooltip[data-v-c8952e00]: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-c8952e00]:not(.right):not(.bottom):not(.top),.tooltip.left[data-v-c8952e00]{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-c8952e00]:not(.right):not(.bottom):not(.top):after,.tooltip.left[data-v-c8952e00]: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-c8952e00]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-c8952e00]: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-c8952e00]{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-c8952e00]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.header[data-v-c40c38d8]{margin-bottom:-10px}[data-v-c40c38d8] .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-1378eac7]{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-1378eac7]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-1378eac7]{height:100%;width:unset}.overlay-nav[data-v-1378eac7]{position:absolute;top:10px;left:10px;display:flex;flex-direction:column;z-index:1}.overlay-nav>[data-v-1378eac7]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-1378eac7]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-1378eac7]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .info[data-v-1378eac7],.nav .saves[data-v-1378eac7]{display:flex}.tooltip-container[data-v-1378eac7]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-1378eac7]{position:relative}.discord img[data-v-1378eac7]{width:100%;height:100%}.discord-links[data-v-1378eac7]{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-1378eac7]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-1378eac7]{left:-10px}.discord-links li[data-v-1378eac7]{margin-bottom:4px}.discord-links li[data-v-1378eac7]:first-child{font-size:1.2em}:not(.overlay-nav) .discord:hover .discord-links[data-v-1378eac7]{right:0}.material-icons[data-v-1378eac7]{font-size:36px}.material-icons[data-v-1378eac7]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-1378eac7]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-1378eac7]{width:unset;height:25px}.version[data-v-1378eac7]{color:var(--points)}.version:hover span[data-v-1378eac7]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-1378eac7],.overlay-nav>div>a[data-v-1378eac7]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-5fcfaa6f]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tab[data-v-5fcfaa6f]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-5fcfaa6f]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.separator[data-v-5fcfaa6f]{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}.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-09bec9fe]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px 0 10px}.treeNode button[data-v-09bec9fe]{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}.treeNode.small[data-v-09bec9fe]{height:60px;width:60px}.treeNode.small button[data-v-09bec9fe]{font-size:30px}.ghost[data-v-09bec9fe]{visibility:hidden;pointer-events:none}.resize-listener[data-v-5837f7bc],svg[data-v-5837f7bc]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.row[data-v-28bdfe90]{margin:50px auto}.left-side-nodes[data-v-28bdfe90]{position:absolute;left:15px;top:65px}.side-nodes[data-v-28bdfe90]{position:absolute;right:15px;top:65px}.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-2e1ea71d]{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-71ba1b93],.resize-listener[data-v-71ba1b93]{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.fullWidth[data-v-8adbf51e]{width:100%}.sticky[data-v-3b196306]{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-3b196306]{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-e0d2a130]{width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;min-height:75px;background-color:var(--locked);border-width:4px;border-radius:5px;color:rgba(0,0,0,.5);margin-top:0;margin-bottom:0}.milestone.done[data-v-e0d2a130]{background-color:var(--bought);cursor:default}.milestone[data-v-e0d2a130] .equal-spaced{display:flex;justify-content:center}.milestone[data-v-e0d2a130] .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-86da8746]{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-86da8746]:first-child{margin:-4px -11px var(--feature-margin) -11px}.layer-tab>.tab-family-container[data-v-86da8746]:first-child:nth-last-child(3){border-bottom-style:none;border-left-style:none;border-right-style:none;height:calc(100% + 50px)}.tab-family-container[data-v-86da8746]>:nth-child(2){margin-top:20px}.tab-family-container[data-v-f18896fc][data-v-86da8746]>:last-child{margin-bottom:20px}.tab-family-container .sticky[data-v-86da8746]{margin-left:-3px!important;margin-right:-3px!important}.tab-buttons-container[data-v-86da8746]{width:calc(100% - 14px);z-index:4}.tab-buttons-container[data-v-86da8746]:not(.floating){border-top:4px solid;border-bottom:4px solid;border-color:inherit}.tab-buttons-container:not(.floating) .tab-buttons[data-v-86da8746]{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-86da8746]{justify-content:center;margin-top:-25px}.tab-buttons[data-v-86da8746]{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-86da8746]{padding-right:60px}.tab-buttons[data-v-86da8746]:not(.floating){text-align:left;border-bottom:inherit;border-width:4px;box-sizing:border-box;height:50px}.modal-body .tab-buttons[data-v-86da8746]{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-86da8746]{padding-left:70px}:not(.showGoBack)>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-86da8746]{padding-left:2px}.tab-buttons-container[data-v-86da8746]:not(.floating):first-child{border-top:0}.minimizable>.tab-buttons-container[data-v-86da8746]:not(.floating):first-child{padding-right:50px}.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-86da8746]{margin-top:-50px}.tab-buttons-container+[data-v-86da8746]{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-fbb1e278]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-fbb1e278]{position:absolute;min-height:100%;height:100%} \ No newline at end of file diff --git a/index.html b/index.html index 35603ad..247bb18 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.8c965777.js b/js/app-legacy.8c965777.js new file mode 100644 index 0000000..90e9257 --- /dev/null +++ b/js/app-legacy.8c965777.js @@ -0,0 +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};(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={}))},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,3814));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 c},nY:function(){return s},ax:function(){return m},Mv:function(){return d}});var r=o(9584),t=o(3336),l=(o(2526),o(1817),o(1539),o(4747),o(7941),o(6699),o(2222),o(7302)),i=o(5613),u=o(3273),a=o(3577),f=o(4865),c=Symbol("PersistentState"),s=Symbol("DefaultValue");function m(e){var n=(0,f.isRef)(e)?e:(0,f.ref)(e);return n[c]=n,n[s]=(0,f.isRef)(e)?e.value:e,n}function d(e,n){var o=e,r=(0,f.ref)(n);o[c]=r,o[s]=(0,f.isRef)(n)?n.value:n}l.globalBus.on("addLayer",(function(e,n){var o=[],l=function e(l){var m=arguments,d=function(){return void 0!==m.length&&null!==m.length&&m.length[Symbol.for(">")]?m.length[Symbol.for(">")](1):m.length>1}()&&function(){return void 0!==m[1]&&null!==m[1]&&m[1][Symbol.for("!==")]?m[1][Symbol.for("!==")](void 0):void 0!==m[1]}()?arguments[1]:[],y=!1;return Object.keys(l).forEach((function(m){var b=l[m];if(b&&"object"===(0,t.Z)(b))if(function(){return void 0!==c&&null!==c&&c[Symbol.for("in")]?c[Symbol.for("in")](b):c in b}()){y=!0;var v=d.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),S=v[m];v[m]=b[c],!function(){return void 0!==S&&null!==S&&S[Symbol.for("!=")]?S[Symbol.for("!=")](null):null!=S}()?v[m].value=b[s]:v[m].value=S}else if(function(){return b instanceof i.ZP!==void 0&&b instanceof i.ZP!==null&&(b instanceof i.ZP)[Symbol.for("!")]?(b instanceof i.ZP)[Symbol.for("!")]():!(b instanceof i.ZP)}()&&function(){return void 0!==(0,f.isRef)(b)&&null!==(0,f.isRef)(b)&&(0,f.isRef)(b)[Symbol.for("!")]?(0,f.isRef)(b)[Symbol.for("!")]():!(0,f.isRef)(b)}()&&function(){return void 0!==o.includes(b)&&null!==o.includes(b)&&o.includes(b)[Symbol.for("!")]?o.includes(b)[Symbol.for("!")]():!o.includes(b)}()){"symbol"===(0,t.Z)(b.type)&&o.push(b);var g=e(b,[].concat((0,r.Z)(d),[m]));g&&((0,a.kJ)(b)&&function(){return void 0!==(0,a.kJ)(l)&&null!==(0,a.kJ)(l)&&(0,a.kJ)(l)[Symbol.for("!")]?(0,a.kJ)(l)[Symbol.for("!")]():!(0,a.kJ)(l)}()?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")](l):u.Le in l}()?l[u.Le]:l,m):y=!0)}})),y};l(e)}))},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:[]})},1001: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(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),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=c.value();(function(){return void 0!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](void 0):void 0!=o})()&&(e?(o.style.flexGrow="0",o.style.flexShrink="0",o.style.width="60px",o.style.minWidth=o.style.flexBasis="",o.style.margin="0"):(o.style.flexGrow="",o.style.flexShrink="",o.style.width="",o.style.minWidth=o.style.flexBasis="".concat(n,"px"),o.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-3cbf87a6"]]);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),Z=o(5613),M=function(e){return(0,t.pushScopeId)("data-v-3eb46986"),e=e(),(0,t.popScopeId)(),e},w={class:"info-modal-header"},C=["src","alt"],B={class:"info-modal-title"},P={key:0},E={key:0},I={key:0},T=M((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}())})),F=M((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),D=M((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),R=["href"],j=M((function(){return(0,t.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),O=M((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}())})),_=M((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=M((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,Z.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",w,[(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,C)):(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",I,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),T,F,(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"},[j,(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)]),O,_,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),W=o(1349),G=o(3525),H=o(9868),Y=o(2794),J=function(e){return(0,t.pushScopeId)("data-v-c40c38d8"),e=e(),(0,t.popScopeId)(),e},K=J((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}())})),X=J((function(){return(0,t.createElementVNode)("hr",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Q=(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,W.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[K]})),body:(0,t.withCtx)((function(){return[(0,t.createVNode)(G.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)(H.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"]),X,(0,t.createVNode)(H.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)(H.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)(H.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)(H.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 $=(0,y.Z)(Q,[["__scopeId","data-v-c40c38d8"]]);var ee=$,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}())})),Ze={key:1,class:"actions"},Me=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"check",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),we=[Me],Ce=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"close",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Be=[Ce],Pe={key:2,class:"details"},Ee={class:"save-version"},Ie=ve((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Te={key:0},Fe={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}())})),je=(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",Ze,[(0,t.createElementVNode)("button",{onClick:y,class:"button"},we),(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),Ie,(0,t.unref)(d)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Te,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",Fe,[(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 Oe=(0,y.Z)(je,[["__scopeId","data-v-6a0cf7ac"]]);var _e=Oe,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"},We={class:"field"},Ge=qe((function(){return(0,t.createElementVNode)("span",{class:"field-title"},"Create Save",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),He={class:"field-buttons"},Ye={class:"footer"},Je=qe((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ke=(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)(_e,{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",We,[Ge,(0,t.createElementVNode)("div",He,[(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)(G.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,[Je,(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 Xe=(0,y.Z)(Ke,[["__scopeId","data-v-7d95f59e"]]);var Qe=Xe,$e=function(e){return(0,t.pushScopeId)("data-v-51b8996d"),e=e(),(0,t.popScopeId)(),e},en=["src","alt"],nn={key:1,class:"title"},on=$e((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),rn={class:"discord"},tn={class:"discord-links"},ln={key:0},un=["href"],an=$e((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}())})),fn=$e((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={href:"https://forums.moddingtree.com/",target:"_blank"},sn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),mn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),dn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),yn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),bn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),vn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Sn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),gn={href:"https://forums.moddingtree.com/",target:"_blank"},pn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),hn={class:"discord"},Nn={class:"discord-links"},kn={key:0},Vn=["href"],xn=$e((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=$e((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}())})),Mn=(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,en)):((0,t.openBlock)(),(0,t.createElementBlock)("div",nn,(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",bottom:"",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})]),on,(0,t.createElementVNode)("div",rn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",tn,[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",ln,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,un)])):(0,t.createCommentVNode)("",!0),an,fn])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",cn,[(0,t.createVNode)(Y.Z,{display:"Forums",bottom:"",yoffset:"5px"},{default:(0,t.withCtx)((function(){return[sn]})),_:1})])]),(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",bottom:"",class:"info"},{default:(0,t.withCtx)((function(){return[mn]})),_:1})]),(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",bottom:"",xoffset:"-20px"},{default:(0,t.withCtx)((function(){return[dn]})),_:1})]),(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",bottom:"",xoffset:"-66px"},{default:(0,t.withCtx)((function(){return[yn]})),_:1})])],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",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})]),(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",right:""},{default:(0,t.withCtx)((function(){return[bn]})),_:1})]),(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",right:""},{default:(0,t.withCtx)((function(){return[vn]})),_:1})]),(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",right:""},{default:(0,t.withCtx)((function(){return[Sn]})),_:1})]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",gn,[(0,t.createVNode)(Y.Z,{display:"Forums",right:"",xoffset:"7px"},{default:(0,t.withCtx)((function(){return[pn]})),_:1})])]),(0,t.createElementVNode)("div",hn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",Nn,[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",kn,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,Vn)])):(0,t.createCommentVNode)("",!0),xn,Zn])])],16)),(0,t.createVNode)(z,{ref_key:"info",ref:n,changelog:l.value},null,8,["changelog"]),(0,t.createVNode)(Qe,{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)(Mn,[["__scopeId","data-v-51b8996d"]]);var Cn=wn,Bn={class:"inner-tab"},Pn={key:1,class:"separator"},En=(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)(Cn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Bn,[(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",Pn)):(0,t.createCommentVNode)("",!0)])})),128))],2)}}});const In=(0,y.Z)(En,[["__scopeId","data-v-4fd7697b"]]);var Tn=In,Fn=o(3814),Dn=function(e){return(0,t.pushScopeId)("data-v-06188cc8"),e=e(),(0,t.popScopeId)(),e},Rn={class:"game-over-modal-header"},jn=["src","alt"],On={class:"game-over-modal-title"},_n=Dn((function(){return(0,t.createElementVNode)("h2",null,"Congratulations!",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),An={key:0},Un=Dn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),qn=Dn((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}())})),zn=Dn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ln=["href"],Wn=Dn((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}())})),Gn=(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,Z.mr)(f.Z.timePlayed)})),s=(0,t.computed)((function(){return Fn.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",Rn,[(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,jn)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",On,[_n,(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",An,[(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),Un,qn,zn,(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:(0,t.unref)(l),class:"game-over-modal-discord-link"},[Wn,(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,Ln)]),(0,t.createVNode)(H.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 Hn=(0,y.Z)(Gn,[["__scopeId","data-v-06188cc8"]]);var Yn=Hn,Jn=(o(9600),o(3032)),Kn=function(e){return(0,t.pushScopeId)("data-v-5935214c"),e=e(),(0,t.popScopeId)(),e},Xn=Kn((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}())})),Qn={key:0},$n=Kn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),eo=["href"],no=Kn((function(){return(0,t.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),oo=Kn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),ro={class:"nan-footer"},to=(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 Z.ZP(0),Jn.Z.hasNaN=!1)}function y(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new Z.ZP(1),Jn.Z.hasNaN=!1)}function b(){Jn.Z.NaNReceiver&&c.value&&(Jn.Z.NaNReceiver[c.value]=new Z.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[Xn]})),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",Qn,function(){return(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(Z.WU)((0,t.unref)(s)))!==void 0&&(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(Z.WU)((0,t.unref)(s)))!==null&&((0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(Z.WU)((0,t.unref)(s))))[Symbol.for("+")]?((0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(Z.WU)((0,t.unref)(s))))[Symbol.for("+")](")"):(0,t.toDisplayString)(" ")+"(previously "+(0,t.toDisplayString)((0,t.unref)(Z.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)]),$n,(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",{href:(0,t.unref)(o),class:"nan-modal-discord-link"},[no,(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,eo)]),oo,(0,t.createVNode)(H.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)(H.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",ro,[(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)(Z.ZP).neq((0,t.unref)(s),0)&&(0,t.unref)(Z.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)(Qe,{ref_key:"savesManager",ref:i},null,512)],64)}}});const lo=(0,y.Z)(to,[["__scopeId","data-v-5935214c"]]);var io=lo,uo=(o(86),{key:0,class:"tpsDisplay"}),ao={key:0,class:"low"},fo=(0,t.defineComponent)({setup:function(e){var n=(0,t.computed)((function(){return Z.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 Z.ZP.max(e,n)}),0)})),l=(0,t.computed)((function(){return Z.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",uo,[(0,t.createTextVNode)(function(){return" TPS: "+(0,t.toDisplayString)((0,t.unref)(Z.Ht)((0,t.unref)(n)))!==void 0&&" TPS: "+(0,t.toDisplayString)((0,t.unref)(Z.Ht)((0,t.unref)(n)))!==null&&(" TPS: "+(0,t.toDisplayString)((0,t.unref)(Z.Ht)((0,t.unref)(n))))[Symbol.for("+")]?(" TPS: "+(0,t.toDisplayString)((0,t.unref)(Z.Ht)((0,t.unref)(n))))[Symbol.for("+")](" "):" TPS: "+(0,t.toDisplayString)((0,t.unref)(Z.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",ao,(0,t.toDisplayString)((0,t.unref)(Z.Ht)((0,t.unref)(r))),1)):(0,t.createCommentVNode)("",!0)]})),_:1})])):(0,t.createCommentVNode)("",!0)}}});const co=(0,y.Z)(fo,[["__scopeId","data-v-c0663118"]]);var so=co,mo=(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)(Cn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Tn),(0,t.unref)((0,t.unref)(r))?((0,t.openBlock)(),(0,t.createBlock)(so,{key:1})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Yn),(0,t.createVNode)(io),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(a))))],6)],64)}}});const yo=(0,y.Z)(mo,[["__scopeId","data-v-f13f28b6"]]);var bo=yo;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)(bo),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,Z=!0,M=!1,w=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}()]}}(),C=[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)},I=function(e,n,o){return A.fromComponents(e,n,o)},T=function(e,n,o){return A.fromComponents_noNormalize(e,n,o)},F=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}()},j=.5671432904097838,O=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 j;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(j);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("/")](w(o)):e.mag/w(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){Z?n=n.replace(",",""):M&&(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 w=e.tetrate(y,b,x);return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}}var C=n.split("e"),B=function(){return void 0!==C.length&&null!==C.length&&C.length[Symbol.for("-")]?C.length[Symbol.for("-")](1):C.length-1}();if(0===B){var P=parseFloat(n);if(isFinite(P))return this.fromNumber(P)}else if(1===B){var T=parseFloat(n);if(isFinite(T)&&function(){return void 0!==T&&null!==T&&T[Symbol.for("!==")]?T[Symbol.for("!==")](0):0!==T}())return this.fromNumber(T)}var F=n.split("e^");if(2===F.length){this.sign=1,function(){return void 0!==F[0].charAt(0)&&null!==F[0].charAt(0)&&F[0].charAt(0)[Symbol.for("==")]?F[0].charAt(0)[Symbol.for("==")]("-"):"-"==F[0].charAt(0)}()&&(this.sign=function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}());for(var R="",j=0;function(){return void 0!==j&&null!==j&&j[Symbol.for("<")]?j[Symbol.for("<")](F[1].length):j=")]?O[Symbol.for(">=")](43):O>=43}()&&function(){return void 0!==O&&null!==O&&O[Symbol.for("<=")]?O[Symbol.for("<=")](57):O<=57}()||101===O))return this.layer=parseFloat(R),this.mag=parseFloat(F[1].substr(function(){return void 0!==j&&null!==j&&j[Symbol.for("+")]?j[Symbol.for("+")](1):j+1}())),this.normalize(),this;R=function(){return void 0!==R&&null!==R&&R[Symbol.for("+")]?R[Symbol.for("+")](F[1].charAt(j)):R+F[1].charAt(j)}()}}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 _=parseFloat(C[0]);if(0===_)return this.sign=0,this.layer=0,this.mag=0,this;var A=parseFloat(C[function(){return void 0!==C.length&&null!==C.length&&C.length[Symbol.for("-")]?C.length[Symbol.for("-")](1):C.length-1}()]);if(function(){return void 0!==B&&null!==B&&B[Symbol.for(">=")]?B[Symbol.for(">=")](2):B>=2}()){var U=parseFloat(C[function(){return void 0!==C.length&&null!==C.length&&C.length[Symbol.for("-")]?C.length[Symbol.for("-")](2):C.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(_)&&null!==isFinite(_)&&isFinite(_)[Symbol.for("!")]?isFinite(_)[Symbol.for("!")]():!isFinite(_)}())this.sign="-"===C[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(_),this.layer=1,this.mag=function(){return void 0!==A&&null!==A&&A[Symbol.for("+")]?A[Symbol.for("+")](Math.log10(Math.abs(_))):A+Math.log10(Math.abs(_))}();else{if(this.sign=Math.sign(_),this.layer=B,2===B){var q=e.mul(I(1,2,A),E(_));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:F(this.m,e)}},{key:"magnitudeWithDecimalPlaces",value:function(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:F(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 F(n.m,e)+"e"!==void 0&&F(n.m,e)+"e"!==null&&(F(n.m,e)+"e")[Symbol.for("+")]?(F(n.m,e)+"e")[Symbol.for("+")](F(n.e,e)):F(n.m,e)+"e"+F(n.e,e)}():1===this.layer?function(){return F(n.m,e)+"e"!==void 0&&F(n.m,e)+"e"!==null&&(F(n.m,e)+"e")[Symbol.for("+")]?(F(n.m,e)+"e")[Symbol.for("+")](F(n.e,e)):F(n.m,e)+"e"+F(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("+")](F(n.mag,e)):(-1===n.sign?"-":"")+"e".repeat(n.layer)+F(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("+")](F(n.mag,e)):(-1===n.sign?"-":"")+"(e^"+n.layer+")"+F(n.mag,e)}()}},{key:"abs",value:function(){return T(0===this.sign?0:1,this.layer,this.mag)}},{key:"neg",value:function(){var e=this;return T(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?I(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?I(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?I(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?I(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 T(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 I(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 I(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 I(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 T(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 T(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 I(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 I(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 I(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=I(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(I(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 I(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=I(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(I(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 I(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?I(this.sign,0,function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](n.mag):1/n.mag}()):I(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}()?I(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)):I(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}()?I(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)):I(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?I(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?I(this.sign,0,Math.log2(this.mag)):1===this.layer?I(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?I(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}()):I(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?I(this.sign,0,Math.log(this.mag)):1===this.layer?I(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?I(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}()):I(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)?T(1,0,1):r;if(1===r.sign&&0===r.layer&&1===r.mag)return r;if(0===t.sign)return T(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 I(1,0,r);if(0===o.sign)return e.dOne;o=T(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}()?I(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}()?I(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(T(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?I(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?I(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)}()):I(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 I(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(T(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),T(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]:T(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 T(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]:T(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(O(this.toNumber()));if(0===this.layer)return E(O(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 _(this);if(2===this.layer)return _(this);if(function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">=")]?e.layer[Symbol.for(">=")](3):e.layer>=3}())return T(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 T(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]:T(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}())):T(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}())):T(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}())):T(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}())):T(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}())):T(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)?T(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]:T(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]:T(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]:T(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 T(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 T(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)),I(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("<")](C.length):l")]?C[l+1][Symbol.for(">")](e):C[l+1]>e}()){var i=function(){return e-C[l]!==void 0&&e-C[l]!==null&&(e-C[l])[Symbol.for("/")]?(e-C[l])[Symbol.for("/")](C[l+1]-C[l]):(e-C[l])/(C[l+1]-C[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",T(0,0,0)),(0,v.Z)(A,"dOne",T(1,0,1)),(0,v.Z)(A,"dNegOne",T(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),0,1)),(0,v.Z)(A,"dTwo",T(1,0,2)),(0,v.Z)(A,"dTen",T(1,0,10)),(0,v.Z)(A,"dNaN",T(Number.NaN,Number.NaN,Number.NaN)),(0,v.Z)(A,"dInf",T(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,v.Z)(A,"dNegInf",T(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,v.Z)(A,"dNumberMax",I(1,0,Number.MAX_VALUE)),(0,v.Z)(A,"dNumberMin",I(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)?W(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 W(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 G(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 H=new A("eeee1000"),Y=new A("e100000"),J=new A("e1000"),K=new A(1e9),X=new A(1e6),Q=new A(1e3),$=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(H)){var t=e.slog();return t.gte(X)?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("+")](W(t.floor(),0)):A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"+W(t.floor(),0)}()}if(e.gte(Y))return L(e,0,!1);if(e.gte(J))return L(e,0);if(e.gte(K))return L(e,n);if(e.gte(Q))return W(e,0);if(e.gte(ee)||function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}())return G(e,n);if(e.eq(ne))return(0).toFixed(n);if(e=ue(e),e.lt(J)){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(K)||e.lte($)&&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=W,ce=G,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={},o=!1;function t(){return function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}()&&(Object.assign(n,e()),o=!0),n}return new Proxy(n,{get:function(e,n){return n===r?t():t()[n]},set:function(){return console.error("Layers and features are shallow readonly"),!1},has:function(e,n){return n===r||Reflect.has(t(),n)},ownKeys:function(){return Reflect.ownKeys(t())},getOwnPropertyDescriptor:function(r,t){return function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}()&&(Object.assign(n,e()),o=!0),Object.getOwnPropertyDescriptor(r,t)}})}},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,3814));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)})))},3814:function(e,n,o){"use strict";o.r(n),o.d(n,{fixOldSave:function(){return dr},getInitialLayers:function(){return sr},hasWon:function(){return mr},main:function(){return cr}});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 Z(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 M=o(9584),w=(o(4553),o(6699),o(2023),o(4747),o(7327),o(1249),o(2222),{key:0,class:"left-side-nodes"}),C={key:1,class:"side-nodes"};function B(e,n,o,t,l,i){var u=(0,r.resolveComponent)("TreeNode"),a=(0,r.resolveComponent)("Links");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.nodes),(function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("span",(0,r.mergeProps)({class:"row",key:o},e.$attrs),[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n,(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherNodeProps(n),{"force-tooltip":n.forceTooltip}),null,16,["force-tooltip"])})),128))],16)})),128)),e.unref(e.leftSideNodes)?((0,r.openBlock)(),(0,r.createElementBlock)("span",w,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.leftSideNodes),(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherNodeProps(n),{"force-tooltip":n.forceTooltip,small:""}),null,16,["force-tooltip"])})),128))])):(0,r.createCommentVNode)("",!0),e.unref(e.rightSideNodes)?((0,r.openBlock)(),(0,r.createElementBlock)("span",C,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.rightSideNodes),(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherNodeProps(n),{"force-tooltip":n.forceTooltip,small:""}),null,16,["force-tooltip"])})),128))])):(0,r.createCommentVNode)("",!0),e.branches?((0,r.openBlock)(),(0,r.createBlock)(a,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,r.createCommentVNode)("",!0)],64)}var P=o(1604),E=o(5082);function I(e,n,o,t,l,i){var u=(0,r.resolveComponent)("MarkNode"),a=(0,r.resolveComponent)("Node"),f=(0,r.resolveComponent)("Tooltip");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.createBlock)(f,(0,r.mergeProps)({key:0},e.tooltipToBind&&e.gatherTooltipProps(e.tooltipToBind),{display:e.tooltipDisplay,force:e.forceTooltip,style:{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},class:(0,E.Z)({treeNode:!0,can:e.unref(e.canClick),small:e.unref(e.small)},e.unref(e.classes))}),{default:(0,r.withCtx)((function(){var o;return[(0,r.createElementVNode)("div",{onClick:n[0]||(n[0]=function(){return e.click&&e.click.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!==(o=e.unref(e.style))&&null!==(o=e.unref(e.style))&&(o=e.unref(e.style))[Symbol.for("!==")]?(o=e.unref(e.style))[Symbol.for("!==")](null):null!==(o=e.unref(e.style))}()&&function(){return void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](void 0):void 0!==o}()?o:[]])},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp))))],36),(0,r.createVNode)(u,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(a,{id:e.id},null,8,["id"])]})),_:1},16,["display","force","style","class"])):(0,r.createCommentVNode)("",!0)}o(9653);var T=o(6084),F=o(9365),D=(0,r.defineComponent)({props:{id:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,r.inject)(F.RegisterNodeInjectionKey),l=(0,r.inject)(F.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,T.Z)(e,2),i=o[0],u=o[1],a=(0,T.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 R=(0,u.Z)(D,[["__scopeId","data-v-63ded336"]]);var j=R,O={key:0},_={key:0,class:"mark star"},A=["src"],U=(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",O,[!0===e.mark?((0,r.openBlock)(),(0,r.createElementBlock)("div",_)):((0,r.openBlock)(),(0,r.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,A))])):(0,r.createCommentVNode)("",!0)}}});const q=(0,u.Z)(U,[["__scopeId","data-v-c476c56a"]]);var z=q,L=o(2794);function W(e){var n=e.display,o=e.top,r=e.left,t=e.right,l=e.bottom,i=e.xoffset,u=e.yoffset,a=e.force;return{display:n,top:o,left:r,right:t,bottom:l,xoffset:i,yoffset:u,force:a}}var G=(0,r.defineComponent)({props:{display:(0,P.P5)(Object,String,Function),visibility:{type:(0,P.P5)(Number),required:!0},style:(0,P.P5)(String,Object,Array),classes:(0,P.P5)(Object),tooltip:(0,P.P5)(Object,String,Function),onClick:Function,onHold:Function,color:(0,P.P5)(String),glowColor:(0,P.P5)(String),forceTooltip:{type:Object,required:!0},canClick:{type:(0,P.P5)(Boolean),required:!0},mark:(0,P.P5)(Boolean,String),id:{type:String,required:!0},small:(0,P.P5)(Boolean)},components:{Tooltip:L.Z,MarkNode:z,Node:j},setup:function(e){var n=(0,r.toRefs)(e),o=n.tooltip,t=n.forceTooltip,l=n.onClick,i=n.onHold,u=n.display;function a(e){var n;e.shiftKey&&o?t.value=function(){return void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value}():null===(n=(0,r.unref)(l))||void 0===n||n()}var f=(0,P.KO)(u),c=(0,r.shallowRef)(void 0);(0,r.watchEffect)((function(){var e=(0,P.Uv)(o);"object"===(0,b.Z)(e)&&function(){return void 0!==(0,P.RU)(e)&&null!==(0,P.RU)(e)&&(0,P.RU)(e)[Symbol.for("!")]?(0,P.RU)(e)[Symbol.for("!")]():!(0,P.RU)(e)}()?c.value=e.display:c.value=e}));var s=(0,r.computed)((function(){var e=(0,P.Uv)(o);return"object"===(0,b.Z)(e)&&function(){return void 0!==(0,P.RU)(e)&&null!==(0,P.RU)(e)&&(0,P.RU)(e)[Symbol.for("!")]?(0,P.RU)(e)[Symbol.for("!")]():!(0,P.RU)(e)}()?e:null})),m=(0,P.ix)(l,i),d=m.start,v=m.stop;return{click:a,start:d,stop:v,comp:f,tooltipDisplay:c,tooltipToBind:s,unref:r.unref,Visibility:y.EE,gatherTooltipProps:W,isCoercableComponent:P.RU}}});const H=(0,u.Z)(G,[["render",I],["__scopeId","data-v-82704be4"]]);var Y=H,J=(o(2479),o(9254),["x1","y1","x2","y2"]),K=(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,J)}}});const X=K;var Q=X,$=(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)(F.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})))}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)(Q,{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 ee=(0,u.Z)($,[["__scopeId","data-v-61b3869c"]]);var ne=ee,oe=(0,r.defineComponent)({props:{nodes:{type:(0,P.P5)(Array),required:!0},leftSideNodes:(0,P.P5)(Array),rightSideNodes:(0,P.P5)(Array),branches:(0,P.P5)(Array)},components:{TreeNode:Y,Links:ne},setup:function(){function e(e){var n=e.display,o=e.visibility,r=e.style,t=e.classes,l=e.tooltip,i=e.onClick,u=e.onHold,a=e.color,f=e.glowColor,c=e.forceTooltip,s=e.canClick,m=e.mark,d=e.id;return{display:n,visibility:o,style:r,classes:t,tooltip:l,onClick:i,onHold:u,color:a,glowColor:f,forceTooltip:c,canClick:s,mark:m,id:d}}return{gatherNodeProps:e,unref:r.unref}}});const re=(0,u.Z)(oe,[["render",B],["__scopeId","data-v-28bdfe90"]]);var te=re,le=o(9583),ie=o(3273),ue=Symbol("TreeNode"),ae=Symbol("Tree");function fe(e){return(0,ie.z2)((function(){var n=e();if(n.id=(0,y.QI)("treeNode-"),n.type=ue,n.tooltip?n.forceTooltip=(0,g.ax)(!1):n.forceTooltip=(0,r.ref)(!1),(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,le.yB)(n,"color"),(0,le.yB)(n,"display"),(0,le.yB)(n,"tooltip"),(0,le.yB)(n,"glowColor"),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),(0,le.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}))}function ce(e){return(0,ie.z2)((function(){var n=e();return n.id=(0,y.QI)("tree-"),n.type=ae,n[y.wA]=te,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,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"nodes"),(0,le.yB)(n,"leftSideNodes"),(0,le.yB)(n,"rightSideNodes"),(0,le.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 se=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,M.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()}()};var me=o(5967),de=o(2482),ye=(o(8862),o(274));function be(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,E.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 ve=(0,r.defineComponent)({props:{visibility:{type:(0,P.P5)(Number),required:!0},display:(0,P.P5)(Object,String,Function),earned:{type:(0,P.P5)(Boolean),required:!0},image:(0,P.P5)(String),style:(0,P.P5)(String,Object,Array),classes:(0,P.P5)(Object),mark:(0,P.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:j,MarkNode:z,Tooltip:L.Z},setup:function(e){var n=(0,r.toRefs)(e),o=n.display;return{component:(0,P.KO)(o),unref:r.unref,Visibility:y.EE}}});const Se=(0,u.Z)(ve,[["render",be],["__scopeId","data-v-2e1ea71d"]]);var ge=Se,pe=o(3002);o(343);function he(){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 Ne(){return he("red","20px")}S.globalBus.on("setupVue",(function(e){return e.use(pe.ZP)}));var ke=(0,pe.pm)(),Ve=Symbol("Achievement");function xe(e){return(0,ie.z2)((function(){var n=e();if((0,g.Mv)(n,!1),n.id=(0,y.QI)("achievement-"),n.type=Ve,n[y.wA]=ge,n.earned=n[g.n9],n.complete=function(){n[g.n9].value=!0},(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"display"),(0,le.yB)(n,"mark"),(0,le.yB)(n,"image"),(0,le.yB)(n,"style"),(0,le.yB)(n,"classes"),n[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}},n.shouldEarn){var o=n;(0,r.watchEffect)((function(){var e,n;if(function(){return void 0!==o.earned.value&&null!==o.earned.value&&o.earned.value[Symbol.for("!")]?o.earned.value[Symbol.for("!")]():!o.earned.value}()&&(0,r.unref)(o.visibility)===y.EE.Visible&&function(){return void 0!==(e=o.shouldEarn)&&null!==(e=o.shouldEarn)&&(e=o.shouldEarn)[Symbol.for("!==")]?(e=o.shouldEarn)[Symbol.for("!==")](null):null!==(e=o.shouldEarn)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.call(o)&&(o.earned.value=!0,null===(n=o.onComplete)||void 0===n||n.call(o),o.display)){var t=(0,P.MM)((0,r.unref)(o.display));ke.info((0,r.createVNode)("div",null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Achievement earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(t,null,null)])]))}}))}return n}))}o(9714),o(7042);function Ze(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 Me=o(1037),we=o(9266),Ce={key:0};function Be(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",Ce,[((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 Pe=(0,r.defineComponent)({props:{visibility:{type:(0,P.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,P.P5)(Object,String,Function),required:!0},title:(0,P.P5)(Object,String,Function),style:(0,P.P5)(String,Object,Array),canClick:{type:(0,P.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:j},setup:function(e){var n=(0,r.toRefs)(e),o=n.onClick,t=n.onHold,l=n.title,i=n.display,u=(0,P.ix)(o,t),a=u.start,f=u.stop,c=(0,P.KO)(l),s=(0,P.vq)(i);return{start:a,stop:f,titleComponent:c,component:s,Visibility:y.EE,unref:r.unref}}});const Ee=(0,u.Z)(Pe,[["render",Be],["__scopeId","data-v-b1182ac6"]]);var Ie=Ee,Te=(0,r.defineComponent)({props:{visibility:{type:(0,P.P5)(Number),required:!0},rows:{type:(0,P.P5)(Number),required:!0},cols:{type:(0,P.P5)(Number),required:!0},cells:{type:(0,P.P5)(Object),required:!0}},components:{GridCell:Ie},setup:function(){var e=(0,r.computed)((function(){return Me.Z[we.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 Fe=(0,u.Z)(Te,[["render",Ze]]);var De=Fe,Re=o(1349);Symbol("Grid");function je(e){return new Proxy({},Oe(e))}function Oe(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,_e(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 _e(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,Re.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,Re.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,Re.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,Re.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 Ae(e){return(0,ie.z2)((function(){var n=e();if((0,g.Mv)(n,{}),n.id=(0,y.QI)("grid-"),n[y.wA]=De,n.getID=function(e){return function(){return n.id+"-"!==void 0&&n.id+"-"!==null&&(n.id+"-")[Symbol.for("+")]?(n.id+"-")[Symbol.for("+")](e):n.id+"-"+e}()},n.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},n.setState=function(e,n){this[g.n9].value[e]=n},n.cells=je(n),(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"rows"),(0,le.yB)(n,"cols"),(0,le.yB)(n,"getVisibility"),(0,y.Rh)(n,"getVisibility",y.EE.Visible),(0,le.yB)(n,"getCanClick"),(0,y.Rh)(n,"getCanClick",!0),(0,le.yB)(n,"getStartState"),(0,le.yB)(n,"getStyle"),(0,le.yB)(n,"getClasses"),(0,le.yB)(n,"getTitle"),(0,le.yB)(n,"getDisplay"),n.onClick){var o=n.onClick.bind(n);n.onClick=function(e,t){(0,r.unref)(n.cells[e].canClick)&&o(e,t)}}if(n.onHold){var t=n.onHold.bind(n);n.onHold=function(e,o){(0,r.unref)(n.cells[e].canClick)&&t(e,o)}}return n[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}},n}))}o(561);function Ue(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,E.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 qe=(0,r.defineComponent)({props:{display:{type:(0,P.P5)(Object,String,Function),required:!0},visibility:{type:(0,P.P5)(Number),required:!0},style:(0,P.P5)(Object,String,Array),classes:(0,P.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,P.P5)(Boolean),required:!0},small:Boolean,mark:(0,P.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:j,MarkNode:z},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,P.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())i.value="";else if((0,P.RU)(e))i.value=(0,P.MM)(e);else{var n=(0,P.MM)(e.title||"","h3"),t=(0,P.MM)(e.description,"div");i.value=(0,P.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,P.ix)(t,l),a=u.start,f=u.stop;return{start:a,stop:f,comp:i,Visibility:y.EE,unref:r.unref}}});const ze=(0,u.Z)(qe,[["render",Ue],["__scopeId","data-v-6b39988a"]]);var Le=ze,We=Symbol("Clickable");function Ge(e){return(0,ie.z2)((function(){var n=e();if(n.id=(0,y.QI)("clickable-"),n.type=We,n[y.wA]=Le,(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),(0,le.yB)(n,"mark"),(0,le.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 He(e){return Ge((function(){var n=e();(0,le.yB)(n,"showNextAt"),(0,y.Rh)(n,"showNextAt",!0),!function(){return void 0!==n.resetDescription&&null!==n.resetDescription&&n.resetDescription[Symbol.for("==")]?n.resetDescription[Symbol.for("==")](null):null==n.resetDescription}()?(0,le.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,[Z(n.conversion.gainResource,(0,r.unref)(n.conversion.currentGain))])," ",n.conversion.gainResource.displayName,(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Next:")," ",Z(n.conversion.baseResource,(0,r.unref)(n.conversion.nextAt))," ",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.gt((0,r.unref)(n.conversion.currentGain),0)})));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 Ye(e){return fe((function(){var n=e();return(0,le.yB)(n,"display"),(0,y.Rh)(n,"display",n.layerID),(0,le.yB)(n,"append"),(0,E.Z)((0,E.Z)({},n),{},{display:n.layerID,onClick:(0,r.unref)(n.append)?function(){if(me.Z.tabs.includes(n.layerID)){var e=me.Z.tabs.lastIndexOf(n.layerID);me.Z.tabs.splice(e,1)}else me.Z.tabs.push(n.layerID)}:function(){me.Z.tabs.splice(1,1,n.layerID)}})}))}function Je(e){return(0,ie.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!==n.buyMax&&null!==n.buyMax&&n.buyMax[Symbol.for("!")]?n.buyMax[Symbol.for("!")]():!n.buyMax}()&&(e=e.min(1)),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,le.yB)(n,"currentGain"),(0,le.yB)(n,"nextAt"),(0,le.yB)(n,"buyMax"),(0,y.Rh)(n,"buyMax",!0),(0,le.yB)(n,"roundUpCost"),(0,y.Rh)(n,"roundUpCost",!0),n}))}function Ke(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},nextAt:function(o){var t=v.ZP.add((0,r.unref)(o.currentGain),1);return o.gainModifier&&(t=o.gainModifier.revert(t)),v.ZP.root(t,(0,r.unref)(n)).times((0,r.unref)(e)).max((0,r.unref)(e))}}}function Xe(e){return Je(e)}function Qe(e){return Je((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(){return v.ZP.sub(n.scaling.currentGain(n),n.gainResource.value).add(1).max(1)}))),(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 $e(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 en(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,E.Z)((0,E.Z)({},e),{},{currentGain:function(o){return $e(e.currentGain(o),(0,r.unref)(n),(0,r.unref)(t))}})}function nn(e){var n=(0,le.UI)(e);return{apply:function(e){return v.ZP.add(e,(0,r.unref)(n))},revert:function(e){return v.ZP.sub(e,(0,r.unref)(n))}}}function on(e){var n=(0,le.UI)(e);return{apply:function(e){return v.ZP.pow(e,(0,r.unref)(n))},revert:function(e){return v.ZP.root(e,(0,r.unref)(n))}}}function rn(){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".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)(V.value)&&null!==(0,v.WU)(V.value)&&(0,v.WU)(V.value)[Symbol.for("+")]?(0,v.WU)(V.value)[Symbol.for("+")]("x"):(0,v.WU)(V.value)+"x"}()}},visibility:function(){return(0,y.Kf)(v.ZP.gt(l.value,0))},goal:20,resource:cr.points,onComplete:function(){console.log("hiii")},onEnter:function(){cr.points.value=0,cr.best.value=cr.points.value,cr.total.value=cr.points.value,console.log("So challenging")},onExit:function(){console.log("Sweet freedom!")},style:{height:"200px"}}})),V=(0,r.computed)((function(){return v.ZP.add(t.value,1).tetrate(.02)})),x=er((function(){return{display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:t}})),M=er((function(){return{display:function(){return{description:"Point generation is faster based on your unspent Lollipops",effectDisplay:"".concat((0,v.WU)(w.value),"x")}},cost:1,resource:t,visibility:function(){return(0,y.Kf)(x.bought.value)}}})),w=(0,r.computed)((function(){var e=v.ZP.add(t.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),C=er((function(){return{visibility:function(){return(0,y.Kf)(M.bought.value)},canAfford:function(){return v.ZP.lt(cr.points.value,7)},onPurchase:function(){cr.points.value=v.ZP.add(cr.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=er((function(){return{resource:p(I.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}})),E=[x,M,C],I=ao((function(){return{resource:t,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){f.value=v.ZP.add(f.value,e)},style:{height:"222px"},purchaseLimit:4}})),T=(0,r.computed)((function(){return v.ZP.gte(I.amount.value,0)?v.ZP.pow(25,v.ZP.pow(I.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(I.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(I.amount.value,0)?v.ZP.pow(25,v.ZP.pow(I.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(I.amount.value,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()).pow(1.1))})),D=(0,g.ax)(!1),R=(0,r.ref)(!1),j=Ge((function(){return{small:!0,display:"Respec Thingies",onClick:function(){D.value&&function(){return void 0!==R.value&&null!==R.value&&R.value[Symbol.for("!")]?R.value[Symbol.for("!")]():!R.value}()?R.value=!0:(t.value=v.ZP.add(t.value,f.value),I.amount.value=0,cr.tree.reset(G))}}})),O=Ge((function(){return{small:!0,display:"Sell One",onClick:function(){v.ZP.lte(I.amount.value,0)||(I.amount.value=v.ZP.sub(I.amount.value,1),t.value=v.ZP.add(t.value,I.cost.value),f.value=v.ZP.sub(f.value,I.cost.value))}}})),_=(0,y.tZ)((function(){return(0,r.createVNode)(Gn.Z,null,{default:function(){return[(0,r.createVNode)(ye.Z,null,{default:function(){return[(0,r.createVNode)(Wn.Z,{title:"Confirm","onUpdate:modelValue":function(e){return D.value=e},modelValue:D.value},null),(0,P._4)(j)]}}),(0,P._4)(I),(0,P._4)(O),(0,r.createVNode)($n.Z,{modelValue:R.value,"onUpdate:modelValue":function(e){return R.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 R.value=!1}},[(0,r.createTextVNode)("Cancel")]),(0,r.createVNode)("button",{class:"button modal-default-button danger",onClick:function(){j.onClick(),R.value=!1}},[(0,r.createTextVNode)("Respec")])])}})]}})})),A=io((function(){return{fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:ro.Right,width:300,height:30,progress:function(){return v.ZP.add(cr.points.value,1).log(10).div(10).toNumber()},display:function(){return function(){return void 0!==(0,v.WU)(cr.points.value)&&null!==(0,v.WU)(cr.points.value)&&(0,v.WU)(cr.points.value)[Symbol.for("+")]?(0,v.WU)(cr.points.value)[Symbol.for("+")](" / 1e10 points"):(0,v.WU)(cr.points.value)+" / 1e10 points"}()}}})),U=io((function(){return{fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:ro.Up,width:50,height:200,progress:function(){return v.ZP.div(cr.points.value,100)},display:function(){return function(){return void 0!==(0,v.Ht)(v.ZP.div(cr.points.value,1).min(100))&&null!==(0,v.Ht)(v.ZP.div(cr.points.value,1).min(100))&&(0,v.Ht)(v.ZP.div(cr.points.value,1).min(100))[Symbol.for("+")]?(0,v.Ht)(v.ZP.div(cr.points.value,1).min(100))[Symbol.for("+")]("%"):(0,v.Ht)(v.ZP.div(cr.points.value,1).min(100))+"%"}()}}})),q=io((function(){return{fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:ro.Up,width:100,height:30,progress:function(){return v.ZP.div(t.value,50)}}})),z=Xe((function(){return{scaling:en(Ke(10,.5),1e100,.5),baseResource:cr.points,gainResource:t,roundUpCost:!0,gainModifier:rn(on(2),nn(1))}})),L=Zn((function(){return{thingsToReset:function(){return[or]}}})),W=[po((function(){return{key:"c",description:"reset for lollipops or whatever",onPress:function(){H.canClick.value&&H.onClick()}}})),po((function(){return{key:"ctrl+c",description:"respec things",onPress:function(){j.onClick()}}}))],G=Ye((function(){return{layerID:e,color:n,reset:L,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip:function(){var e=Z(t);return v.ZP.gt(I.amount.value,0)&&(e=function(){return void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")]("



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



".concat((0,v.Ht)(I.amount.value)," Exhancers
")}()),e},style:{color:"#3325CC",textDecoration:"underline"}}})),H=He((function(){return{conversion:z,tree:cr.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}})),Y=fe((function(){return{display:"TH",color:"#6d3678",canClick:function(){return v.ZP.gte(cr.points.value,10)},tooltip:"Thanos your points",onClick:function(){cr.points.value=v.ZP.div(cr.points.value,2),console.log("Thanos'd")},glowColor:function(){return v.ZP.eq(I.amount.value,1)?"orange":""}}})),J=fe((function(){return{display:"h",color:function(){return Me.Z[we.ZP.theme].variables["--locked"]},tooltip:{display:(0,r.computed)((function(){return"Restore your points to ".concat((0,v.WU)(a.value))})),right:!0},canClick:function(){return v.ZP.lt(cr.points.value,a.value)},onClick:function(){cr.points.value=a.value}}})),K=fe((function(){return{visibility:y.EE.Hidden}})),X=ce((function(){return{nodes:function(){return[[ir.treeNode,G],[Y,K,J]]},branches:function(){return[{startNode:ir.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:Y},{startNode:Y,endNode:J}]}}})),Q=No((function(){return{links:[{startNode:J,endNode:q,"stroke-width":"5px",stroke:"red",offsetEnd:{x:function(){return(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*q.progress.value.toNumber()):100*q.progress.value.toNumber()-50}(),y:0}}]}})),$=Ho((function(){return{tabs:{first:{tab:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[P._4.apply(void 0,E),(0,P._4)(B),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("confirmed")])])})),display:"first"},second:{tab:ir.display,display:"second"}},style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}})),ee=Ho((function(){return{tabs:{mainTab:{tab:Ro((function(){return{display:(0,y.tZ)((function(){var e;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(jn,{resource:t,color:n,effectDisplay:"which are boosting waffles by ".concat((0,v.WU)(c.value)," and increasing the Ice Cream cap by ").concat((0,v.WU)(s.value))},null),(0,r.createVNode)(Jn,null,nr(e=(0,P.sY)(H))?e:{default:function(){return[e]}}),(0,r.createVNode)(Bn,{resource:t,color:n},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)(Ln.Z,{modelValue:u.value,"onUpdate:modelValue":function(e){return u.value=e}},null),(0,r.createVNode)(Jn,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:function(){return[(0,r.createTextVNode)("I have "),Z(cr.points),(0,r.createTextVNode)(" "),u.value,(0,r.createTextVNode)(" points!")]}}),(0,r.createVNode)("hr",null,null),P.Dy.apply(void 0,N),(0,r.createVNode)(d,null,null),P._4.apply(void 0,E),(0,P._4)(B),(0,P._4)(k)])}))}})),display:"main tab",glowColor:function(){return x.canPurchase.value||M.canPurchase.value||C.canPurchase.value||k.canComplete.value?"blue":""},style:{color:"orange"}},thingies:{tab:Ro((function(){return{style:function(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,P.sY)(_),(0,r.createVNode)(d,null,null),(0,r.createVNode)(ye.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:function(){return[(0,r.createVNode)(Wn.Z,{"onUpdate:modelValue":function(e){return i.value=e},modelValue:i.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)(Qn,{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:{tab:Ro((function(){return{display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,P.sY)(m),(0,P.sY)(A),(0,r.createVNode)(d,null,null),(0,r.createVNode)(ye.Z,null,{default:function(){return[(0,r.createVNode)(Gn.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,P.sY)(U)]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)(Gn.Z,null,{default:function(){return[(0,r.createVNode)("div",null,[(0,r.createTextVNode)("idk")]),(0,r.createVNode)(d,{width:"0",height:"50px"},null),(0,P.sY)(q)]}})]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)("div",null,[(0,r.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,P.sY)(X)])}))}})),display:"jail"},illuminati:{tab:Ro((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,P.sY)($),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Adjust how many points H gives you!")]),(0,r.createVNode)(zn,{"onUpdate:modelValue":function(e){return a.value=e},modelValue:a.value,min:1,max:30},null)])})),style:{backgroundColor:"#3325CC"}}})),visibility:function(){return(0,y.Kf)(C.bought.value)},display:"illuminati"}}}}));return{id:e,color:n,name:o,points:t,best:l,beep:i,thingy:u,otherThingy:a,spentOnBuyables:f,waffleBoost:c,icecreamCap:s,coolInfo:m,lollipopMilestones:N,funChallenge:k,funEffect:V,generatorUpgrade:x,lollipopMultiplierUpgrade:M,lollipopMultiplierEffect:w,unlockIlluminatiUpgrade:C,quasiUpgrade:B,exhancers:I,respecBuyables:j,sellExhancer:O,bars:{tallBoi:U,longBoi:A,flatBoi:q},tree:X,g:Y,h:J,spook:K,conversion:z,reset:L,hotkeys:W,treeNode:G,resetButton:H,confirmRespec:D,minWidth:800,tabs:ee,display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,P.sY)(ee),(0,P.sY)(Q)])}))}})),rr=or,tr=JSON.parse('{"number":{"value":0},"color":{"value":["#00FFFC","#FC00FF","#fffc00"]},"shape":{"type":["circle","triangle"],"options":{}},"opacity":{"value":1,"animation":{"enable":true,"minimumValue":0,"speed":2,"startValue":"max","destroy":"min"}},"size":{"value":4,"random":{"enable":true,"minimumValue":2}},"links":{"enable":false},"life":{"duration":{"sync":true,"value":5},"count":1},"move":{"enable":true,"gravity":{"enable":true,"acceleration":10},"speed":{"min":10,"max":20},"decay":0.1,"direction":"none","straight":false,"outModes":{"default":"destroy","top":"none"}},"rotate":{"value":{"min":0,"max":360},"direction":"random","move":true,"animation":{"enable":true,"speed":60}},"tilt":{"direction":"random","enable":true,"move":true,"value":{"min":0,"max":360},"animation":{"enable":true,"speed":60}},"roll":{"darken":{"enable":true,"value":25},"enable":true,"speed":{"min":15,"max":25}},"wobble":{"distance":30,"enable":true,"move":true,"speed":{"min":-15,"max":15}}}'),lr=(0,F.createLayer)((function(){var e="f",n="#FE0102",o="Farms",t=p(0,"farm points"),l=(0,g.ax)(!1),i=dn((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}})),u=(0,g.ax)("Start"),a=Ge((function(){return{display:function(){return{title:"Clicky clicky!",description:function(){return"Current state:
"[Symbol.for("+")]?"Current state:
"[Symbol.for("+")](u.value):"Current state:
"+u.value}()}},initialState:"Start",canClick:function(){return function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!==")]?u.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==u.value}()},onClick:function(e){switch(u.value){case"Start":u.value="A new state!";break;case"A new state!":u.value="Keep going!";break;case"Keep going!":u.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;S.addEmitter({particles:tr,autoPlay:!0,fill:!1,shape:"square",startCount:0,life:{count:1,duration:.1,wait:!1},rate:{delay:0,quantity:100},position:{x:function(){var e,o,r,t,l;return 100*(null!==(e=null===n||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)!==void 0&&100*(null!==(o=null===n||void 0===n?void 0:n.clientX)&&void 0!==o?o:0)!==null&&(100*(null!==(r=null===n||void 0===n?void 0:n.clientX)&&void 0!==r?r:0))[Symbol.for("/")]?(100*(null!==(t=null===n||void 0===n?void 0:n.clientX)&&void 0!==t?t:0))[Symbol.for("/")](window.innerWidth):100*(null!==(l=null===n||void 0===n?void 0:n.clientX)&&void 0!==l?l:0)/window.innerWidth}(),y:function(){var e,o,r,t,l;return 100*(null!==(e=null===n||void 0===n?void 0:n.clientY)&&void 0!==e?e:0)!==void 0&&100*(null!==(o=null===n||void 0===n?void 0:n.clientY)&&void 0!==o?o:0)!==null&&(100*(null!==(r=null===n||void 0===n?void 0:n.clientY)&&void 0!==r?r:0))[Symbol.for("/")]?(100*(null!==(t=null===n||void 0===n?void 0:n.clientY)&&void 0!==t?t:0))[Symbol.for("/")](window.innerHeight):100*(null!==(l=null===n||void 0===n?void 0:n.clientY)&&void 0!==l?l:0)/window.innerHeight}()},size:{width:0,height:0,mode:"precise"}}),u.value="Borkened...";break;default:u.value="Start";break}},onHold:function(){console.log("Clickkkkk...")},style:function(){switch(u.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{}}}}})),f=Ge((function(){return{onClick:function(){(function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("==")]?u.value[Symbol.for("==")]("Borkened..."):"Borkened..."==u.value})()&&(u.value="Start")},display:function(){return function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("==")]?u.value[Symbol.for("==")]("Borkened..."):"Borkened..."==u.value}()?"Fix the clickable!":"Does nothing"},small:!0}})),c=Zn((function(){return{thingsToReset:function(){return[lr]}}})),s=Qe((function(){return{scaling:Ke(10,.5),baseResource:cr.points,gainResource:t,modifyGainAmount:function(e){return v.ZP.times(e,rr.otherThingy.value)}}})),m=Ye((function(){return{layerID:e,color:n,reset:c,tooltip:function(){return m.canClick.value?"".concat(Z(t)," ").concat(t.displayName):"This weird farmer dinosaur will only see you if you have at least 10 points. You only have ".concat(Z(cr.points))},canClick:function(){return v.ZP.gte(cr.points.value,10)}}})),b=He((function(){return{conversion:s,tree:cr.tree,treeNode:m,display:(0,y.tZ)((function(){return b.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)(b.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)(b.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)(b.conversion.nextAt.value),(0,r.createTextVNode)(" points)")])}))}})),S=Vn((function(){return{}})),h=(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,P.sY)(i),(0,r.createVNode)(jn,{resource:t,color:n},null),(0,P.sY)(b),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("You have "),(0,v.Ht)(s.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,P._4)(f),(0,P._4)(a),(0,P.sY)(S)])}));return{id:e,color:n,name:o,points:t,boop:l,coolInfo:i,clickable:a,clickableState:u,reset:c,conversion:s,treeNode:m,resetButton:b,display:h}})),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=(0,F.createLayer)((function(){var e="a",n="yellow",o="Achievements",t=p(0,"achievement power"),l=fe((function(){return{display:"A",color:n,tooltip:{display:"Achievements",right:!0},onClick:function(){cr.showAchievements()}}})),i=xe((function(){return{image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,r.computed)((function(){return i.earned.value?"You did it!":"How did this happen?"})),shouldEarn:function(){return!0}}})),u=xe((function(){return{display:"Impossible!",tooltip:(0,r.computed)((function(){return u.earned.value?"HOW????":"Mwahahaha!"})),style:{color:"#04e050"}}})),a=xe((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!")}}})),f=[i,u,a],c=Ae((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)(L.Z,(0,r.mergeProps)({display:JSON.stringify(n.cells[e].style)},(0,de.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(cr.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}()}}})),s=(0,y.tZ)((function(){var e,n,o;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(ye.Z,null,{default:function(){return[(0,r.createVNode)(L.Z,{display:i.tooltip,bottom:!0},ur(e=(0,P.sY)(i))?e:{default:function(){return[e]}}),(0,r.createVNode)(L.Z,{display:u.tooltip,bottom:!0},ur(n=(0,P.sY)(u))?n:{default:function(){return[n]}}),(0,r.createVNode)(L.Z,{display:a.tooltip,bottom:!0},ur(o=(0,P.sY)(a))?o:{default:function(){return[o]}})]}}),(0,P._4)(c)])}));return{id:e,color:n,name:o,points:t,achievements:f,grid:c,treeNode:l,display:s}})),fr=ar,cr=(0,F.createLayer)((function(){var e=p(10),n=h(e),o=N(e),t=(0,r.computed)((function(){if(function(){return void 0!==rr.generatorUpgrade.bought.value&&null!==rr.generatorUpgrade.bought.value&&rr.generatorUpgrade.bought.value[Symbol.for("!")]?rr.generatorUpgrade.bought.value[Symbol.for("!")]():!rr.generatorUpgrade.bought.value}())return new v.ZP(0);var e=new v.ZP(3.19);return rr.lollipopMultiplierUpgrade.bought.value&&(e=e.times(rr.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,F.setupLayerModal)(fr),u=i.openModal,a=i.modal,f=ce((function(){return{nodes:[[rr.treeNode],[ir.treeNode,rr.spook]],leftSideNodes:[fr.treeNode,rr.h],branches:[{startNode:ir.treeNode,endNode:rr.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset:function(){e.value=(0,r.toRaw)(this.resettingNode.value)===(0,r.toRaw)(rr.treeNode)?0:10,n.value=e.value,o.value=e.value},resetPropagation:se}}));return{id:"main",name:"Tree",display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("Game Paused")]),[[r.vShow,0===me.Z.devSpeed]]),(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("Dev Speed: "),(0,v.WU)(me.Z.devSpeed||0),(0,r.createTextVNode)("x")]),[[r.vShow,me.Z.devSpeed&&function(){return void 0!==me.Z.devSpeed&&null!==me.Z.devSpeed&&me.Z.devSpeed[Symbol.for("!==")]?me.Z.devSpeed[Symbol.for("!==")](1):1!==me.Z.devSpeed}()]]),(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("Offline Time: "),(0,v.mr)(me.Z.offlineTime||0)]),[[r.vShow,function(){return void 0!==me.Z.offlineTime&&null!==me.Z.offlineTime&&me.Z.offlineTime[Symbol.for("!=")]?me.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=me.Z.offlineTime}()]]),(0,r.createVNode)("div",null,[(0,r.withDirectives)((0,r.createVNode)("span",null,[(0,r.createTextVNode)("You have ")]),[[r.vShow,v.ZP.lt(e.value,"1e1000")]]),(0,r.createVNode)("h2",null,[(0,v.WU)(e.value)]),(0,r.withDirectives)((0,r.createVNode)("span",null,[(0,r.createTextVNode)(" points")]),[[r.vShow,v.ZP.lt(e.value,"1e1e6")]])]),(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("("),l.value,(0,r.createTextVNode)(")")]),[[r.vShow,v.ZP.gt(t.value,0)]]),(0,r.createVNode)(d,null,null),(0,r.createVNode)("button",{onClick:u},[(0,r.createTextVNode)("open achievements")]),(0,P.sY)(a),(0,P.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}})),sr=function(e){return[cr,ir,rr,fr]},mr=(0,r.computed)((function(){return v.ZP.gt(cr.points.value,25)}));function dr(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},createLayer:function(){return v},addLayer:function(){return S},getLayer:function(){return g},removeLayer:function(){return p},reloadLayer:function(){return h},setupLayerModal:function(){return N}});var r=o(4865),t=(o(2526),o(1817),o(1539),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={};function v(e){return(0,u.z2)((function(){var n={},o=n.emitter=(0,a.i)();return n.on=o.on.bind(o),n.emit=o.emit.bind(o),n.nodes=(0,r.ref)({}),n.minimized=(0,c.ax)(!1),Object.assign(n,e.call(n)),(0,i.yB)(n,"color"),(0,i.yB)(n,"display"),(0,i.yB)(n,"name"),(0,l.Rh)(n,"name",n.id),(0,i.yB)(n,"minWidth"),(0,l.Rh)(n,"minWidth",600),(0,i.yB)(n,"minimizable"),(0,l.Rh)(n,"minimizable",!0),n}))}function S(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 g(e){return b[e]}function p(e){console.info("Removing layer",e.id),f.globalBus.emit("removeLayer",e),b[e.id]=void 0}function h(e){p(e),S(e,s.Z)}function N(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)})}))}}window.layers=b,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},RU:function(){return y},ix:function(){return b},vq:function(){return v},KO:function(){return S},o9:function(){return g},Uv:function(){return p},P5:function(){return h}});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(y(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(p(e),o)})),r}function S(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=p(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 g(e){return(0,t.computed)((function(){return p(e)}))}function p(e){return(0,t.unref)((0,t.unref)(e))}function h(){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},2736:function(e,n,o){"use strict";o.r(n),n["default"]="eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiw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lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9"},7634:function(e,n,o){var r={"./safff.txt":2736};function t(e){var n=l(e);return o(n)}function l(e){if(!o.o(r,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}t.keys=function(){return Object.keys(r)},t.resolve=l,e.exports=t,t.id=7634},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]={exports:{}};return e[r].call(l.exports,l,l.exports,o),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(){var e,n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};o.t=function(r,t){if(1&t&&(r=this(r)),8&t)return r;if("object"===typeof r&&r){if(4&t&&r.__esModule)return r;if(16&t&&"function"===typeof r.then)return r}var l=Object.create(null);o.r(l);var i={};e=e||[null,n({}),n([]),n(n)];for(var u=2&t&&r;"object"==typeof u&&!~e.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(e){i[e]=function(){return r[e]}}));return i["default"]=function(){return r},o.d(l,i),l}}(),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.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(n,r){return o.f[r](e,n),n}),[]))}}(),function(){o.u=function(e){return"js/"+e+"-legacy.f9b47cea.js"}}(),function(){o.miniCssF=function(e){}}(),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.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){var e={},n="profectus:";o.l=function(r,t,l,i){if(e[r])e[r].push(t);else{var u,a;if(void 0!==l)for(var f=document.getElementsByTagName("script"),c=0;c {}\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};\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\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 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 { isRef, Ref, ref } from \"vue\";\nimport { GenericLayer } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\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 = {\n [PersistentState]: Ref;\n [DefaultValue]: T;\n};\nexport type PersistentRef = Ref & Persistent;\n\nexport function persistent(defaultValue: T | Ref): PersistentRef {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref(defaultValue) as unknown)\n ) as PersistentRef;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n return persistent as PersistentRef;\n}\n\nexport function makePersistent(\n obj: unknown,\n defaultValue: T\n): asserts obj is Persistent {\n const persistent = obj as Partial>;\n const state = ref(defaultValue) as Ref;\n\n persistent[PersistentState] = state;\n persistent[DefaultValue] = isRef(defaultValue) ? (defaultValue.value as T) : defaultValue;\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\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 (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 } 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});\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 { PersistentRef } 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),\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) {\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 = `${minWidth}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=3cbf87a6&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=3cbf87a6&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-3cbf87a6\"]])\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-c40c38d8\"),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 \"./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=c40c38d8&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-c40c38d8\"]])\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-51b8996d\"),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 \"./Tooltip.vue\";\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 bottom: \"\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\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 bottom: \"\",\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n bottom: \"\",\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n bottom: \"\",\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n bottom: \"\",\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n })\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 right: \"\",\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n right: \"\",\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n })\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=51b8996d&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-51b8996d\"]])\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(objectFunc: () => T): T {\n const obj: T | Record = {};\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc());\n calculated = true;\n }\n return obj as 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() {\n console.error(\"Layers and features are shallow readonly\");\n return false;\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());\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as 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","\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 { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-28bdfe90\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"left-side-nodes\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"side-nodes\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TreeNode = _resolveComponent(\"TreeNode\")!\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.nodes), (row, index) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({\n class: \"row\",\n key: index\n }, _ctx.$attrs), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row, (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ], 16))\n }), 128)),\n (_ctx.unref(_ctx.leftSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.leftSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.unref(_ctx.rightSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rightSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\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 { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, mergeProps as _mergeProps, withCtx as _withCtx, 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 const _component_Tooltip = _resolveComponent(\"Tooltip\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createBlock(_component_Tooltip, _mergeProps({ key: 0 }, _ctx.tooltipToBind && _ctx.gatherTooltipProps(_ctx.tooltipToBind), {\n display: _ctx.tooltipDisplay,\n force: _ctx.forceTooltip,\n style: { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n class: {\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n small: _ctx.unref(_ctx.small),\n ..._ctx.unref(_ctx.classes)\n }\n }), {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.click && _ctx.click(...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 ]),\n _: 1\n }, 16, [\"display\", \"force\", \"style\", \"class\"]))\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__","import { CoercableComponent } from \"features/feature\";\nimport { ProcessedComputable } from \"util/computed\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport interface Tooltip {\n display: ProcessedComputable;\n top?: ProcessedComputable;\n left?: ProcessedComputable;\n right?: ProcessedComputable;\n bottom?: ProcessedComputable;\n xoffset?: ProcessedComputable;\n yoffset?: ProcessedComputable;\n force?: ProcessedComputable;\n}\n\nexport function gatherTooltipProps(tooltip: Tooltip) {\n const { display, top, left, right, bottom, xoffset, yoffset, force } = tooltip;\n return { display, top, left, right, bottom, xoffset, yoffset, force };\n}\n","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport TooltipVue from \"components/Tooltip.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { gatherTooltipProps, Tooltip } from \"features/tooltip\";\nimport { ProcessedComputable } from \"util/computed\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\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 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 tooltip: processedPropType(Object, String, Function),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType,\n color: processedPropType(String),\n glowColor: processedPropType(String),\n forceTooltip: {\n type: Object as PropType>,\n required: true\n },\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 small: processedPropType(Boolean)\n },\n components: {\n Tooltip: TooltipVue,\n MarkNode,\n Node\n },\n setup(props) {\n const { tooltip, forceTooltip, onClick, onHold, display } = toRefs(props);\n\n function click(e: MouseEvent) {\n if (e.shiftKey && tooltip) {\n forceTooltip.value = !forceTooltip.value;\n } else {\n unref(onClick)?.();\n }\n }\n\n const comp = computeOptionalComponent(display);\n const tooltipDisplay = shallowRef | undefined>(\n undefined\n );\n watchEffect(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n tooltipDisplay.value = currTooltip.display;\n return;\n }\n tooltipDisplay.value = currTooltip;\n });\n const tooltipToBind = computed(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n return currTooltip;\n }\n return null;\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n click,\n start,\n stop,\n comp,\n tooltipDisplay,\n tooltipToBind,\n unref,\n Visibility,\n gatherTooltipProps,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=82704be4&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=82704be4&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-82704be4\"]])\n\nexport default __exports__","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}\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=61b3869c&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-61b3869c\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { processedPropType } from \"util/vue\";\nimport { defineComponent, unref } from \"vue\";\nimport TreeNode from \"./TreeNode.vue\";\nimport Links from \"features/links/Links.vue\";\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: { TreeNode, Links },\n setup() {\n function gatherNodeProps(node: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n } = node;\n return {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n };\n }\n\n return {\n gatherNodeProps,\n unref\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=28bdfe90&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=ts\"\nexport * from \"./Tree.vue?vue&type=script&lang=ts\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=28bdfe90&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-28bdfe90\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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 { Tooltip } from \"features/tooltip\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport { persistent } from \"game/persistence\";\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 tooltip?: 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 forceTooltip: Ref;\n type: typeof TreeNodeType;\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 tooltip: 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: () => T & ThisType>\n): TreeNode {\n return createLazyProxy(() => {\n const treeNode: T & Partial = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n\n if (treeNode.tooltip) {\n treeNode.forceTooltip = persistent(false);\n } else {\n // If we don't have a tooltip, no point in making this persistent\n treeNode.forceTooltip = ref(false);\n }\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, \"tooltip\");\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 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: () => T & ThisType>\n): Tree {\n return createLazyProxy(() => {\n const tree: T & Partial = 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);\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 Tooltip from \"components/Tooltip.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 Tooltip\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=2e1ea71d&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=2e1ea71d&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-2e1ea71d\"]])\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 GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, makePersistent, PersistentState } 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: () => T & ThisType>\n): Achievement {\n return createLazyProxy(() => {\n const achievement: T & Partial = optionsFunc();\n makePersistent(achievement, false);\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 });\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 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, makePersistent, PersistentState } 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: () => T & ThisType>\n): Grid {\n return createLazyProxy(() => {\n const grid: T & Partial = optionsFunc();\n makePersistent(grid, {});\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 });\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 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: () => T & ThisType<Clickable<T>>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable: T & Partial<BaseClickable> = 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, 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 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}\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 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 }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n 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\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 unref(resetButton.conversion.currentGain)\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n Next:{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n unref(resetButton.conversion.nextAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gt(unref(resetButton.conversion.currentGain), 0)\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: () => 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 Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n convertComputable,\n DoNotCache,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, isRef, Ref, unref } from \"vue\";\nimport { Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: 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?: GainModifier;\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 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 nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport interface GainModifier {\n apply: (gain: DecimalSource) => DecimalSource;\n revert: (gain: DecimalSource) => DecimalSource;\n}\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: () => T & ThisType<Conversion<T>>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion: T = 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 (!conversion.buyMax) {\n gain = gain.min(1);\n }\n return gain;\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, \"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 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 nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\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 nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\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: () => S & ThisType<Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: () => S & ThisType<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 Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n )\n .add(1)\n .max(1)\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\nexport function createAdditiveModifier(addend: Computable<DecimalSource>): GainModifier {\n const processedAddend = convertComputable(addend);\n return {\n apply: gain => Decimal.add(gain, unref(processedAddend)),\n revert: gain => Decimal.sub(gain, unref(processedAddend))\n };\n}\n\nexport function createMultiplicativeModifier(multiplier: Computable<DecimalSource>): GainModifier {\n const processedMultiplier = convertComputable(multiplier);\n return {\n apply: gain => Decimal.times(gain, unref(processedMultiplier)),\n revert: gain => Decimal.div(gain, unref(processedMultiplier))\n };\n}\n\nexport function createExponentialModifier(exponent: Computable<DecimalSource>): GainModifier {\n const processedExponent = convertComputable(exponent);\n return {\n apply: gain => Decimal.pow(gain, unref(processedExponent)),\n revert: gain => Decimal.root(gain, unref(processedExponent))\n };\n}\n\nexport function createSequentialModifier(...modifiers: GainModifier[]): GainModifier {\n return {\n apply: gain => modifiers.reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: gain => modifiers.reduceRight((gain, modifier) => modifier.revert(gain), gain)\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Infobox<T>>\n): Infobox<T> {\n return createLazyProxy(() => {\n const infobox: T & Partial<BaseInfobox> = optionsFunc();\n makePersistent<boolean>(infobox, false);\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 });\n}\n","import { resolveComponent as _resolveComponent, mergeProps as _mergeProps, createVNode as _createVNode, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4bdd63c1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n ref: \"resizeListener\",\n class: \"resize-listener\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Particles = _resolveComponent(\"Particles\", true)!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(_component_Particles, _mergeProps({\n id: _ctx.id,\n class: {\n 'not-fullscreen': !_ctx.fullscreen\n },\n style: {\n zIndex: _ctx.zIndex\n },\n ref: \"particles\",\n particlesInit: _ctx.particlesInit,\n particlesLoaded: _ctx.particlesLoaded,\n options: {\n fpsLimit: 60,\n fullScreen: { enable: _ctx.fullscreen, zIndex: _ctx.zIndex },\n particles: {\n number: {\n value: 0\n }\n },\n emitters: {\n autoPlay: false\n }\n }\n }, _ctx.$attrs), null, 16, [\"id\", \"class\", \"style\", \"particlesInit\", \"particlesLoaded\", \"options\"]),\n _createElementVNode(\"div\", _hoisted_1, null, 512)\n ], 64))\n}","\nimport { loadFull } from \"tsparticles\";\nimport { Engine, Container } from \"tsparticles-engine\";\nimport { Emitters } from \"tsparticles-plugin-emitters/Emitters\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { defineComponent, inject, nextTick, onMounted, PropType, ref } from \"vue\";\nimport { ParticlesComponent } from \"particles.vue3\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n zIndex: {\n type: Number,\n required: true\n },\n fullscreen: {\n type: Boolean,\n required: true\n },\n onInit: {\n type: Function as PropType<(container: EmitterContainer & Container) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>\n },\n components: { Particles: ParticlesComponent },\n setup(props) {\n const particles = ref<null | { particles: { container: Emitters } }>(null);\n\n async function particlesInit(engine: Engine) {\n await loadFull(engine);\n }\n\n function particlesLoaded(container: EmitterContainer & Container) {\n props.onInit(container);\n }\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<Element | 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 }\n updateBounds();\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) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n }\n isDirty = true;\n });\n }\n }\n\n return {\n particles,\n particlesInit,\n particlesLoaded,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=4bdd63c1&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=4bdd63c1&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-4bdd63c1\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Container } from \"tsparticles-engine\";\nimport { IEmitter } from \"tsparticles-plugin-emitters/Options/Interfaces/IEmitter\";\nimport { EmitterInstance } from \"tsparticles-plugin-emitters/EmitterInstance\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { Ref, shallowRef } from \"vue\";\nimport { Component, GatherProps, getUniqueID, Replace, setDefault } from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n fullscreen?: boolean;\n zIndex?: number;\n onContainerResized?: (boundingRect: DOMRect) => void;\n}\n\nexport interface BaseParticles {\n id: string;\n containerRef: Ref<null | (EmitterContainer & Container)>;\n addEmitter: (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ) => Promise<EmitterInstance>;\n removeEmitter: (emitter: EmitterInstance) => void;\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 fullscreen: undefined extends T[\"fullscreen\"] ? true : T[\"fullscreen\"];\n zIndex: undefined extends T[\"zIndex\"] ? 1 : T[\"zIndex\"];\n }\n>;\n\nexport type GenericParticles = Replace<\n Particles<ParticlesOptions>,\n {\n fullscreen: boolean;\n zIndex: number;\n }\n>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: () => T & ThisType<Particles<T>>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles: T & Partial<BaseParticles> = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.containerRef = shallowRef(null);\n particles.addEmitter = (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ): Promise<EmitterInstance> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.containerRef.value) {\n // TODO why does addEmitter require a position parameter\n return Promise.resolve(genericParticles.containerRef.value.addEmitter(options));\n }\n return new Promise<EmitterInstance>(resolve => {\n emittersToAdd.push({ resolve, options });\n });\n };\n particles.removeEmitter = (emitter: EmitterInstance) => {\n // TODO I can't find a proper way to remove an emitter without accessing private functions\n emitter.emitters.removeEmitter(emitter);\n };\n\n let emittersToAdd: {\n resolve: (value: EmitterInstance | PromiseLike<EmitterInstance>) => void;\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] };\n }[] = [];\n\n function onInit(container: EmitterContainer & Container) {\n (particles as GenericParticles).containerRef.value = container;\n emittersToAdd.forEach(({ resolve, options }) => resolve(container.addEmitter(options)));\n emittersToAdd = [];\n }\n\n setDefault(particles, \"fullscreen\", true);\n setDefault(particles, \"zIndex\", 1);\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, fullscreen, zIndex, onContainerResized } = this;\n return {\n id,\n fullscreen,\n zIndex,\n onContainerResized,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n","import { getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport {\n DefaultValue,\n Persistent,\n persistent,\n PersistentRef,\n PersistentState\n} 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: () => T & ThisType<Reset<T>>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset: T & Partial<BaseReset> = 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): PersistentRef<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 { 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-8adbf51e\"),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 \"../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=8adbf51e&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-8adbf51e\"]])\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);\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=3b196306&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-3b196306\"]])\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 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>(optionsFunc: () => T & ThisType<Bar<T>>): Bar<T> {\n return createLazyProxy(() => {\n const bar: T & Partial<BaseBar> = 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, makePersistent, PersistentState } 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 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: () => T & ThisType<Buyable<T>>\n): Buyable<T> {\n return createLazyProxy(() => {\n const buyable: T & Partial<BaseBuyable> = 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 makePersistent<DecimalSource>(buyable, 0);\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 });\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 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, PersistentRef } 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: PersistentRef<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: PersistentRef<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: () => T & ThisType<Challenge<T>>\n): Challenge<T> {\n return createLazyProxy(() => {\n const challenge: T & Partial<BaseChallenge> = 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 = persistent(0);\n challenge.active = persistent(false);\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 { 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: () => T & ThisType<Hotkey<T>>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey: T & Partial<BaseHotkey> = 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, 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: (() => T) & ThisType<Links<T>>\n): Links<T> {\n return createLazyProxy(() => {\n const links: T & Partial<BaseLinks> = 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 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 { makePersistent, 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: () => T & ThisType<Milestone<T>>\n): Milestone<T> {\n return createLazyProxy(() => {\n const milestone: T & Partial<BaseMilestone> = optionsFunc();\n makePersistent<boolean>(milestone, false);\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 });\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 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>(optionsFunc: () => T & ThisType<Tab<T>>): Tab<T> {\n return createLazyProxy(() => {\n const tab: T & Partial<BaseTab> = 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=86da8746&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=86da8746&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-86da8746\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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, makePersistent, PersistentState } 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 tabs: Record<string, TabButtonOptions>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\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 optionsFunc: () => T & ThisType<TabFamily<T>>\n): TabFamily<T> {\n return createLazyProxy(() => {\n const tabFamily: T & Partial<BaseTabFamily> = optionsFunc();\n\n if (Object.keys(tabFamily.tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\", tabFamily);\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n makePersistent<string>(tabFamily, Object.keys(tabFamily.tabs)[0]);\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 for (const tab in tabFamily.tabs) {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabFamily.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 }\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 });\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 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, makePersistent, 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: () => T & ThisType<Upgrade<T>>\n): Upgrade<T> {\n return createLazyProxy(() => {\n const upgrade: T & Partial<BaseUpgrade> = optionsFunc();\n makePersistent<boolean>(upgrade, false);\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 });\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 createAdditiveModifier,\n createCumulativeConversion,\n createExponentialModifier,\n createPolynomialScaling,\n createSequentialModifier\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 { createTree, createTreeNode, GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\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 layer = createLayer(() => {\n const id = \"c\";\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),\n createAdditiveModifier(1)\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\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\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 tabs: {\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 style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n }));\n\n const tabs = createTabFamily(() => ({\n tabs: {\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(\n icecreamCap.value\n )}`}\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\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 { createLayer } from \"game/layers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { IParticlesOptions } from \"tsparticles-engine\";\nimport { render, renderRow } from \"util/vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst layer = createLayer(() => {\n const id = \"f\";\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 particles.addEmitter({\n // TODO this case is annoying but required because move.direction is a string rather than keyof MoveDirection\n particles: confetti as unknown as IParticlesOptions,\n autoPlay: true,\n fill: false,\n shape: \"square\",\n startCount: 0,\n life: {\n count: 1,\n duration: 0.1,\n wait: false\n },\n rate: {\n delay: 0,\n quantity: 100\n },\n position: {\n x: (100 * (pos?.clientX ?? 0)) / window.innerWidth,\n y: (100 * (pos?.clientY ?? 0)) / window.innerHeight\n },\n size: {\n width: 0,\n height: 0,\n mode: \"precise\"\n }\n });\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: gain => Decimal.times(gain, c.otherThingy.value)\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\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\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 \"components/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 layer = createLayer(() => {\n const id = \"a\";\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(() => {\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 id: \"main\",\n name: \"Tree\",\n display: jsx(() => (\n <>\n <div v-show={player.devSpeed === 0}>Game Paused</div>\n <div v-show={player.devSpeed && player.devSpeed !== 1}>\n Dev Speed: {format(player.devSpeed || 0)}x\n </div>\n <div v-show={player.offlineTime != undefined}>\n Offline Time: {formatTime(player.offlineTime || 0)}\n </div>\n <div>\n <span v-show={Decimal.lt(points.value, \"1e1000\")}>You have </span>\n <h2>{format(points.value)}</h2>\n <span v-show={Decimal.lt(points.value, \"1e1e6\")}> points</span>\n </div>\n <div v-show={Decimal.gt(pointGain.value, 0)}>({oomps.value})</div>\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 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, PersistentRef } 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 id: string;\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>;\n}\n\nexport interface BaseLayer {\n minimized: PersistentRef<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\"], T[\"id\"]>;\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 function createLayer<T extends LayerOptions>(\n optionsFunc: (() => T) & ThisType<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\n layer.minimized = persistent(false);\n\n Object.assign(layer, optionsFunc.call(layer));\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 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 | JSXFunction | \"\"> {\n const comp = shallowRef<Component | JSXFunction | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | JSXFunction | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | JSXFunction | \"\" | null> {\n const comp = shallowRef<Component | JSXFunction | \"\" | 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 { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode } from \"vue\"\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 }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, 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.top),\n left: _ctx.unref(_ctx.left),\n right: _ctx.unref(_ctx.right),\n bottom: _ctx.unref(_ctx.bottom)\n }]),\n style: _normalizeStyle({\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n })\n }, [\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, ref, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n top: processedPropType<boolean>(Boolean),\n left: processedPropType<boolean>(Boolean),\n right: processedPropType<boolean>(Boolean),\n bottom: processedPropType<boolean>(Boolean),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n force: processedPropType<boolean>(Boolean)\n },\n setup(props) {\n const { display, force } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(force) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n return {\n isHovered,\n isShown,\n comp,\n unref\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=c8952e00&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=c8952e00&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-c8952e00\"]])\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__","export default \"eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC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lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJoIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9\";","var map = {\n\t\"./safff.txt\": 2736\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7634;","// 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\t// no module.id needed\n\t\t// no module.loaded needed\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// 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};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + chunkId + \"-legacy.\" + \"f9b47cea\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\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); }","var inProgress = {};\nvar dataWebpackPrefix = \"profectus:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// 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__.p = \"\";","// 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__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\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__(1001); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["Themes","defaultTheme","variables","floatingTabs","mergeAdjacent","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","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","startGameLoop","watch","PersistentState","DefaultValue","persistent","defaultValue","ref","makePersistent","state","layer","saveData","features","path","foundPersistent","persistentState","reduce","acc","curr","savedValue","includes","foundPersistentInChild","console","warn","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","error","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","style","color","showGoBack","onClick","goBack","minimized","$event","classes","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","display","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","tabValue","flexGrow","flexShrink","width","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","map","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","options","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","slice","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","element","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","bottom","yoffset","xoffset","right","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","ref_for","Nav","Layer","$refs","playAgain","join","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","Error","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","add","lt","this","fromDecimal","fromNumber","fromString","man","floor","residue","exponent","fromMantissaExponent","POSITIVE_INFINITY","m","other","times","neg","eq","gte","lte","absmag","signmag","normalize","mantissa","replace","pentationparts","split","heightparts","payload","result","pentate","tetrationparts","tetrate","base","height","powparts","trim","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","bind","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","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","overrideAmount","_component_TreeNode","_component_Links","row","node","nodeIndex","gatherNodeProps","forceTooltip","leftSideNodes","rightSideNodes","branches","links","_component_MarkNode","_component_Node","_component_Tooltip","visibility","tooltipToBind","gatherTooltipProps","tooltipDisplay","force","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","inject","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","tooltip","top","onHold","MarkNode","Node","shiftKey","shallowRef","currTooltip","isCoercableComponent","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeObserver","ResizeObserver","updateNodes","NodesInjectionKey","resizeListener","onMounted","resListener","observe","isDirty","getBoundingClientRect","values","validLinks","filter","Link","TreeNode","Links","TreeNodeType","TreeType","createTreeNode","optionsFunc","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","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","currentGain","baseResource","nextAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","gain","gainModifier","apply","scaling","buyMax","next","roundUpCost","createPolynomialScaling","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","createAdditiveModifier","addend","processedAddend","createExponentialModifier","processedExponent","createSequentialModifier","modifiers","modifier","reduceRight","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","_component_Particles","fullscreen","particlesInit","particlesLoaded","fpsLimit","fullScreen","enable","particles","number","emitters","autoPlay","onInit","onContainerResized","Particles","engine","container","updateBounds","ParticlesType","createParticles","containerRef","addEmitter","genericParticles","Promise","resolve","emittersToAdd","removeEmitter","emitter","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","fullWidth","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","direction","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","Challenge","completions","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","ctrlKey","enabled","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","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","processedTabFamily","firstTab","find","tabButton","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","textDecoration","g","h","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","fill","shape","startCount","life","count","duration","wait","rate","delay","quantity","clientX","innerWidth","clientY","innerHeight","size","mode","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","setupLayerModal","openModal","toRaw","showAchievements","oldVersion","on","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","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","isShown","onMouseenter","isHovered","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","webpackContext","req","webpackContextResolve","__webpack_require__","o","code","module","exports","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","__proto__","then","ns","create","def","current","indexOf","getOwnPropertyNames","definition","defineProperty","chunkId","all","promises","u","miniCssF","globalThis","hasOwnProperty","inProgress","dataWebpackPrefix","url","needAttach","scripts","getElementsByTagName","s","getAttribute","charset","timeout","nc","setAttribute","onScriptComplete","onerror","onload","doneFns","head","toStringTag","p","installedChunks","installedChunkData","promise","reject","loadingEnded","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app-legacy.f9b9e5f6.js b/js/app-legacy.f9b9e5f6.js deleted file mode 100644 index b238562..0000000 --- a/js/app-legacy.f9b9e5f6.js +++ /dev/null @@ -1,2 +0,0 @@ -(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};(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={}))},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,7144));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 c},nY:function(){return s},ax:function(){return m},Mv:function(){return d}});var r=o(9584),t=o(3336),l=(o(2526),o(1817),o(1539),o(4747),o(7941),o(6699),o(2222),o(7302)),i=o(5613),u=o(3273),a=o(3577),f=o(4865),c=Symbol("PersistentState"),s=Symbol("DefaultValue");function m(e){var n=(0,f.isRef)(e)?e:(0,f.ref)(e);return n[c]=n,n[s]=(0,f.isRef)(e)?e.value:e,n}function d(e,n){var o=e,r=(0,f.ref)(n);o[c]=r,o[s]=(0,f.isRef)(n)?n.value:n}l.globalBus.on("addLayer",(function(e,n){var o=[],l=function e(l){var m=arguments,d=function(){return void 0!==m.length&&null!==m.length&&m.length[Symbol.for(">")]?m.length[Symbol.for(">")](1):m.length>1}()&&function(){return void 0!==m[1]&&null!==m[1]&&m[1][Symbol.for("!==")]?m[1][Symbol.for("!==")](void 0):void 0!==m[1]}()?arguments[1]:[],y=!1;return Object.keys(l).forEach((function(m){var b=l[m];if(b&&"object"===(0,t.Z)(b))if(function(){return void 0!==c&&null!==c&&c[Symbol.for("in")]?c[Symbol.for("in")](b):c in b}()){y=!0;var v=d.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),S=v[m];v[m]=b[c],!function(){return void 0!==S&&null!==S&&S[Symbol.for("!=")]?S[Symbol.for("!=")](null):null!=S}()?v[m].value=b[s]:v[m].value=S}else if(function(){return b instanceof i.ZP!==void 0&&b instanceof i.ZP!==null&&(b instanceof i.ZP)[Symbol.for("!")]?(b instanceof i.ZP)[Symbol.for("!")]():!(b instanceof i.ZP)}()&&function(){return void 0!==(0,f.isRef)(b)&&null!==(0,f.isRef)(b)&&(0,f.isRef)(b)[Symbol.for("!")]?(0,f.isRef)(b)[Symbol.for("!")]():!(0,f.isRef)(b)}()&&function(){return void 0!==o.includes(b)&&null!==o.includes(b)&&o.includes(b)[Symbol.for("!")]?o.includes(b)[Symbol.for("!")]():!o.includes(b)}()){"symbol"===(0,t.Z)(b.type)&&o.push(b);var g=e(b,[].concat((0,r.Z)(d),[m]));g&&((0,a.kJ)(b)&&function(){return void 0!==(0,a.kJ)(l)&&null!==(0,a.kJ)(l)&&(0,a.kJ)(l)[Symbol.for("!")]?(0,a.kJ)(l)[Symbol.for("!")]():!(0,a.kJ)(l)}()?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")](l):u.Le in l}()?l[u.Le]:l,m):y=!0)}})),y};l(e)}))},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:[]})},2782: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(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),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=c.value();(function(){return void 0!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](void 0):void 0!=o})()&&(e?(o.style.flexGrow="0",o.style.flexShrink="0",o.style.width="60px",o.style.minWidth=o.style.flexBasis="",o.style.margin="0"):(o.style.flexGrow="",o.style.flexShrink="",o.style.width="",o.style.minWidth=o.style.flexBasis="".concat(n,"px"),o.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-3cbf87a6"]]);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},w={class:"info-modal-header"},C=["src","alt"],B={class:"info-modal-title"},E={key:0},P={key:0},I={key:0},T=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}())})),F=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"],j=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}())})),O=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}())})),_=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",w,[(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,C)):(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",E,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",P,[(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)("div",I,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),T,F,(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"},[j,(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)]),O,_,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),W=o(1349),G=o(3525),H=o(9868),Y=o(2794),J=function(e){return(0,t.pushScopeId)("data-v-c40c38d8"),e=e(),(0,t.popScopeId)(),e},K=J((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}())})),X=J((function(){return(0,t.createElementVNode)("hr",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Q=(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,W.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[K]})),body:(0,t.withCtx)((function(){return[(0,t.createVNode)(G.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)(H.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"]),X,(0,t.createVNode)(H.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)(H.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)(H.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)(H.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 $=(0,y.Z)(Q,[["__scopeId","data-v-c40c38d8"]]);var ee=$,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}())})),we=[Ze],Ce=ve((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"close",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Be=[Ce],Ee={key:2,class:"details"},Pe={class:"save-version"},Ie=ve((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Te={key:0},Fe={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}())})),je=(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"},we),(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",Ee,[(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",Pe,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),Ie,(0,t.unref)(d)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Te,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",Fe,[(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 Oe=(0,y.Z)(je,[["__scopeId","data-v-6a0cf7ac"]]);var _e=Oe,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"},We={class:"field"},Ge=qe((function(){return(0,t.createElementVNode)("span",{class:"field-title"},"Create Save",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),He={class:"field-buttons"},Ye={class:"footer"},Je=qe((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Ke=(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)(_e,{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",We,[Ge,(0,t.createElementVNode)("div",He,[(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)(G.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,[Je,(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 Xe=(0,y.Z)(Ke,[["__scopeId","data-v-7d95f59e"]]);var Qe=Xe,$e=function(e){return(0,t.pushScopeId)("data-v-1378eac7"),e=e(),(0,t.popScopeId)(),e},en=["src","alt"],nn={key:1,class:"title"},on=$e((function(){return(0,t.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),rn={class:"discord"},tn={class:"discord-links"},ln={key:0},un=["href"],an=$e((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}())})),fn=$e((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={href:"https://forums.moddingtree.com/",target:"_blank"},sn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),mn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),dn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),yn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),bn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"library_books",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),vn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"settings",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),Sn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"info",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),gn={href:"https://forums.moddingtree.com/",target:"_blank"},pn=$e((function(){return(0,t.createElementVNode)("span",{class:"material-icons"},"forum",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),hn={class:"discord"},Nn={class:"discord-links"},kn={key:0},Vn=["href"],xn=$e((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}())})),Mn=$e((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}())})),Zn=(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,en)):((0,t.openBlock)(),(0,t.createElementBlock)("div",nn,(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",bottom:"",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})]),on,(0,t.createElementVNode)("div",rn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",tn,[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",ln,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,un)])):(0,t.createCommentVNode)("",!0),an,fn])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",cn,[(0,t.createVNode)(Y.Z,{display:"Forums",bottom:"",yoffset:"5px"},{default:(0,t.withCtx)((function(){return[sn]})),_:1})])]),(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",bottom:"",class:"info"},{default:(0,t.withCtx)((function(){return[mn]})),_:1})]),(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",bottom:"",xoffset:"-20px"},{default:(0,t.withCtx)((function(){return[dn]})),_:1})]),(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",bottom:"",xoffset:"-66px"},{default:(0,t.withCtx)((function(){return[yn]})),_:1})])],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",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})]),(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",right:""},{default:(0,t.withCtx)((function(){return[bn]})),_:1})]),(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",right:""},{default:(0,t.withCtx)((function(){return[vn]})),_:1})]),(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",right:""},{default:(0,t.withCtx)((function(){return[Sn]})),_:1})]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("a",gn,[(0,t.createVNode)(Y.Z,{display:"Forums",right:"",xoffset:"7px"},{default:(0,t.withCtx)((function(){return[pn]})),_:1})])]),(0,t.createElementVNode)("div",hn,[(0,t.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,t.createElementVNode)("ul",Nn,[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",kn,[(0,t.createElementVNode)("a",{href:(0,t.unref)(s),target:"_blank"},(0,t.toDisplayString)((0,t.unref)(c)),9,Vn)])):(0,t.createCommentVNode)("",!0),xn,Mn])])],16)),(0,t.createVNode)(z,{ref_key:"info",ref:n,changelog:l.value},null,8,["changelog"]),(0,t.createVNode)(Qe,{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)(Zn,[["__scopeId","data-v-1378eac7"]]);var Cn=wn,Bn={class:"tabs-container"},En={class:"inner-tab"},Pn={key:1,class:"separator"},In=(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.links,f=e.minimizable,c=e.nodes;return{display:n,minimized:o,minWidth:r,name:t,color:l,style:i,classes:u,links:a,minimizable:f,nodes:c}}return function(e,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Bn,[((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)(Cn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",En,[(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",Pn)):(0,t.createCommentVNode)("",!0)])})),128))])}}});const Tn=(0,y.Z)(In,[["__scopeId","data-v-5fcfaa6f"]]);var Fn=Tn,Dn=o(7144),Rn=function(e){return(0,t.pushScopeId)("data-v-06188cc8"),e=e(),(0,t.popScopeId)(),e},jn={class:"game-over-modal-header"},On=["src","alt"],_n={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}())})),Wn=["href"],Gn=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}())})),Hn=(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",jn,[(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,On)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",_n,[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"},[Gn,(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,Wn)]),(0,t.createVNode)(H.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)(Hn,[["__scopeId","data-v-06188cc8"]]);var Jn=Yn,Kn=(o(9600),o(3032)),Xn=function(e){return(0,t.pushScopeId)("data-v-5935214c"),e=e(),(0,t.popScopeId)(),e},Qn=Xn((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}())})),$n={key:0},eo=Xn((function(){return(0,t.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())})),no=["href"],oo=Xn((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=Xn((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)(Kn.Z,"hasNaN"),i=(0,t.ref)(null),a=(0,t.computed)((function(){var e;return null===(e=Kn.Z.NaNPath)||void 0===e?void 0:e.join(".")})),c=(0,t.computed)((function(){var e;return null===(e=Kn.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 Kn.Z.NaNReceiver&&c.value?Kn.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(){Kn.Z.NaNReceiver&&c.value&&(Kn.Z.NaNReceiver[c.value]=new M.ZP(0),Kn.Z.hasNaN=!1)}function y(){Kn.Z.NaNReceiver&&c.value&&(Kn.Z.NaNReceiver[c.value]=new M.ZP(1),Kn.Z.hasNaN=!1)}function b(){Kn.Z.NaNReceiver&&c.value&&(Kn.Z.NaNReceiver[c.value]=new M.ZP(NaN),Kn.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[Qn]})),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",$n,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)(H.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)(H.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)(Qe,{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(Kn.Z.lastTenTicks.length,Kn.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){function n(){}var o=u.useHeader,r=(0,t.computed)((function(){return L.Z[x.ZP.theme].variables})),a=(0,t.toRef)(x.ZP,"showTPS"),f=(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)(r))},null,4),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["app",{useHeader:(0,t.unref)(o)}]),onMousemove:n,style:(0,t.normalizeStyle)((0,t.unref)(r))},[(0,t.unref)(o)?((0,t.openBlock)(),(0,t.createBlock)(Cn,{key:0})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Fn),(0,t.unref)((0,t.unref)(a))?((0,t.openBlock)(),(0,t.createBlock)(mo,{key:1})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Jn),(0,t.createVNode)(uo),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(f))))],38)],64)}}});const bo=(0,y.Z)(yo,[["__scopeId","data-v-fbb1e278"]]);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,w=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}()]}}(),C=[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]],E=[[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]],P=function(e){return A.fromValue_noAlloc(e)},I=function(e,n,o){return A.fromComponents(e,n,o)},T=function(e,n,o){return A.fromComponents_noNormalize(e,n,o)},F=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}()},j=.5671432904097838,O=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 j;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)<t*Math.abs(o)}())return o;n=o}throw Error("Iteration failed to converge: ".concat(e.toString()))};function _(e){var n,o,r,t,l=arguments,i=function(){return void 0!==l.length&&null!==l.length&&l.length[Symbol.for(">")]?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 P(j);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("/")](w(o)):e.mag/w(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}())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=Math.log10(this.mag),this;var n=Math.abs(this.mag),o=Math.sign(this.mag);if(function(){return void 0!==n&&null!==n&&n[Symbol.for(">=")]?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<h}()&&function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">")]?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 w=e.tetrate(y,b,x);return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}}var C=n.split("e"),B=function(){return void 0!==C.length&&null!==C.length&&C.length[Symbol.for("-")]?C.length[Symbol.for("-")](1):C.length-1}();if(0===B){var E=parseFloat(n);if(isFinite(E))return this.fromNumber(E)}else if(1===B){var T=parseFloat(n);if(isFinite(T)&&function(){return void 0!==T&&null!==T&&T[Symbol.for("!==")]?T[Symbol.for("!==")](0):0!==T}())return this.fromNumber(T)}var F=n.split("e^");if(2===F.length){this.sign=1,function(){return void 0!==F[0].charAt(0)&&null!==F[0].charAt(0)&&F[0].charAt(0)[Symbol.for("==")]?F[0].charAt(0)[Symbol.for("==")]("-"):"-"==F[0].charAt(0)}()&&(this.sign=function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}());for(var R="",j=0;function(){return void 0!==j&&null!==j&&j[Symbol.for("<")]?j[Symbol.for("<")](F[1].length):j<F[1].length}();function(){return void 0!==j&&null!==j&&"object"===(0,S.Z)(j)&&j[Symbol.for("prefix-increment")]?j[Symbol.for("prefix-increment")]():++j}()){var O=F[1].charCodeAt(j);if(!(function(){return void 0!==O&&null!==O&&O[Symbol.for(">=")]?O[Symbol.for(">=")](43):O>=43}()&&function(){return void 0!==O&&null!==O&&O[Symbol.for("<=")]?O[Symbol.for("<=")](57):O<=57}()||101===O))return this.layer=parseFloat(R),this.mag=parseFloat(F[1].substr(function(){return void 0!==j&&null!==j&&j[Symbol.for("+")]?j[Symbol.for("+")](1):j+1}())),this.normalize(),this;R=function(){return void 0!==R&&null!==R&&R[Symbol.for("+")]?R[Symbol.for("+")](F[1].charAt(j)):R+F[1].charAt(j)}()}}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 _=parseFloat(C[0]);if(0===_)return this.sign=0,this.layer=0,this.mag=0,this;var A=parseFloat(C[function(){return void 0!==C.length&&null!==C.length&&C.length[Symbol.for("-")]?C.length[Symbol.for("-")](1):C.length-1}()]);if(function(){return void 0!==B&&null!==B&&B[Symbol.for(">=")]?B[Symbol.for(">=")](2):B>=2}()){var U=parseFloat(C[function(){return void 0!==C.length&&null!==C.length&&C.length[Symbol.for("-")]?C.length[Symbol.for("-")](2):C.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(_)&&null!==isFinite(_)&&isFinite(_)[Symbol.for("!")]?isFinite(_)[Symbol.for("!")]():!isFinite(_)}())this.sign="-"===C[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(_),this.layer=1,this.mag=function(){return void 0!==A&&null!==A&&A[Symbol.for("+")]?A[Symbol.for("+")](Math.log10(Math.abs(_))):A+Math.log10(Math.abs(_))}();else{if(this.sign=Math.sign(_),this.layer=B,2===B){var q=e.mul(I(1,2,A),P(_));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:F(this.m,e)}},{key:"magnitudeWithDecimalPlaces",value:function(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:F(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 F(n.m,e)+"e"!==void 0&&F(n.m,e)+"e"!==null&&(F(n.m,e)+"e")[Symbol.for("+")]?(F(n.m,e)+"e")[Symbol.for("+")](F(n.e,e)):F(n.m,e)+"e"+F(n.e,e)}():1===this.layer?function(){return F(n.m,e)+"e"!==void 0&&F(n.m,e)+"e"!==null&&(F(n.m,e)+"e")[Symbol.for("+")]?(F(n.m,e)+"e")[Symbol.for("+")](F(n.e,e)):F(n.m,e)+"e"+F(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("+")](F(n.mag,e)):(-1===n.sign?"-":"")+"e".repeat(n.layer)+F(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("+")](F(n.mag,e)):(-1===n.sign?"-":"")+"(e^"+n.layer+")"+F(n.mag,e)}()}},{key:"abs",value:function(){return T(0===this.sign?0:1,this.layer,this.mag)}},{key:"neg",value:function(){var e=this;return T(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?I(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?I(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?I(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?I(this.sign,0,Math.trunc(this.mag)):this}},{key:"add",value:function(n){var o,r,t=this,l=P(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 T(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 P(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 I(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 I(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 I(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(P(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=P(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 T(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 T(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 P(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 I(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 I(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 I(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=I(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(I(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 I(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=I(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(I(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 I(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=P(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?I(this.sign,0,function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](n.mag):1/n.mag}()):I(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=P(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<o.sign}()?function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}():function(){return void 0!==n.sign&&null!==n.sign&&n.sign[Symbol.for("*")]?n.sign[Symbol.for("*")](n.cmpabs(e)):n.sign*n.cmpabs(e)}()}},{key:"cmpabs",value:function(e){var n=this,o=P(e),r=function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for(">")]?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<t}()?function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}():function(){return void 0!==n.mag&&null!==n.mag&&n.mag[Symbol.for(">")]?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<o.mag}()?function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}():0}},{key:"compare",value:function(e){return this.cmp(e)}},{key:"isNan",value:function(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}},{key:"isFinite",value:function(e){function n(){return e.apply(this,arguments)}return n.toString=function(){return e.toString()},n}((function(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}))},{key:"eq",value:function(e){var n=P(e);return this.sign===n.sign&&this.layer===n.layer&&this.mag===n.mag}},{key:"equals",value:function(e){return this.eq(e)}},{key:"neq",value:function(e){var n=this;return function(){return void 0!==n.eq(e)&&null!==n.eq(e)&&n.eq(e)[Symbol.for("!")]?n.eq(e)[Symbol.for("!")]():!n.eq(e)}()}},{key:"notEquals",value:function(e){return this.neq(e)}},{key:"lt",value:function(e){return this.cmp(e)===function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()}},{key:"lte",value:function(e){var n=this;return function(){return void 0!==n.gt(e)&&null!==n.gt(e)&&n.gt(e)[Symbol.for("!")]?n.gt(e)[Symbol.for("!")]():!n.gt(e)}()}},{key:"gt",value:function(e){return 1===this.cmp(e)}},{key:"gte",value:function(e){var n=this;return function(){return void 0!==n.lt(e)&&null!==n.lt(e)&&n.lt(e)[Symbol.for("!")]?n.lt(e)[Symbol.for("!")]():!n.lt(e)}()}},{key:"max",value:function(e){var n=P(e);return this.lt(n)?n:this}},{key:"min",value:function(e){var n=P(e);return this.gt(n)?n:this}},{key:"maxabs",value:function(e){var n=this,o=P(e);return function(){return void 0!==n.cmpabs(o)&&null!==n.cmpabs(o)&&n.cmpabs(o)[Symbol.for("<")]?n.cmpabs(o)[Symbol.for("<")](0):n.cmpabs(o)<0}()?o:this}},{key:"minabs",value:function(e){var n=this,o=P(e);return function(){return void 0!==n.cmpabs(o)&&null!==n.cmpabs(o)&&n.cmpabs(o)[Symbol.for(">")]?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=P(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=P(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<r.layer}()&&(t=D(t)),function(){return void 0!==Math.abs(t-l)&&null!==Math.abs(t-l)&&Math.abs(t-l)[Symbol.for("<=")]?Math.abs(t-l)[Symbol.for("<=")](n*Math.max(Math.abs(t),Math.abs(l))):Math.abs(t-l)<=n*Math.max(Math.abs(t),Math.abs(l))}()}},{key:"equals_tolerance",value:function(e,n){return this.eq_tolerance(e,n)}},{key:"neq_tolerance",value:function(e,n){var o=this;return function(){return void 0!==o.eq_tolerance(e,n)&&null!==o.eq_tolerance(e,n)&&o.eq_tolerance(e,n)[Symbol.for("!")]?o.eq_tolerance(e,n)[Symbol.for("!")]():!o.eq_tolerance(e,n)}()}},{key:"notEquals_tolerance",value:function(e,n){return this.neq_tolerance(e,n)}},{key:"lt_tolerance",value:function(e,n){var o=this,r=P(e);return function(){return void 0!==o.eq_tolerance(r,n)&&null!==o.eq_tolerance(r,n)&&o.eq_tolerance(r,n)[Symbol.for("!")]?o.eq_tolerance(r,n)[Symbol.for("!")]():!o.eq_tolerance(r,n)}()&&this.lt(r)}},{key:"lte_tolerance",value:function(e,n){var o=P(e);return this.eq_tolerance(o,n)||this.lt(o)}},{key:"gt_tolerance",value:function(e,n){var o=this,r=P(e);return function(){return void 0!==o.eq_tolerance(r,n)&&null!==o.eq_tolerance(r,n)&&o.eq_tolerance(r,n)[Symbol.for("!")]?o.eq_tolerance(r,n)[Symbol.for("!")]():!o.eq_tolerance(r,n)}()&&this.gt(r)}},{key:"gte_tolerance",value:function(e,n){var o=P(e);return this.eq_tolerance(o,n)||this.gt(o)}},{key:"pLog10",value:function(){return this.lt(e.dZero)?e.dZero:this.log10()}},{key:"absLog10",value:function(){var n=this;return 0===this.sign?e.dNaN:function(){return void 0!==n.layer&&null!==n.layer&&n.layer[Symbol.for(">")]?n.layer[Symbol.for(">")](0):n.layer>0}()?I(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)):I(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}()?I(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)):I(this.sign,0,Math.log10(this.mag))}},{key:"log",value:function(n){var o=this;return n=P(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?I(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?I(this.sign,0,Math.log2(this.mag)):1===this.layer?I(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?I(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}()):I(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?I(this.sign,0,Math.log(this.mag)):1===this.layer?I(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?I(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}()):I(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=P(n),r=this,t=o;if(0===r.sign)return t.eq(0)?T(1,0,1):r;if(1===r.sign&&0===r.layer&&1===r.mag)return r;if(0===t.sign)return T(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 I(1,0,r);if(0===o.sign)return e.dOne;o=T(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}()?I(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}()?I(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 P(e).pow(this)}},{key:"root",value:function(e){var n=P(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(T(1,0,24)))return P(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}()?P(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?I(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?I(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)}()):I(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 P(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 I(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(T(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),T(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]:T(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=P(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<r}();function(){return void 0!==c&&null!==c&&"object"===(0,S.Z)(c)&&c[Symbol.for("prefix-increment")]?c[Symbol.for("prefix-increment")]():++c}()){var s=t;if(t=this.pow(t),s.eq(t))return t}if(function(){return void 0!==f&&null!==f&&f[Symbol.for("!=")]?f[Symbol.for("!=")](0):0!=f}()){var m=this.pow(t);return t.mul(function(){return 1[Symbol.for("-")]?1[Symbol.for("-")](f):1-f}()).add(m.mul(f))}return t}(function(){return void 0!==f&&null!==f&&f[Symbol.for("!==")]?f[Symbol.for("!==")](0):0!==f})()&&(t.eq(e.dOne)?this.gt(10)?t=this.pow(f):(t=P(e.tetrate_critical(this.toNumber(),f)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):t=this.eq(10)?t.layeradd10(f):t.layeradd(f,this));for(var d=0;function(){return void 0!==d&&null!==d&&d[Symbol.for("<")]?d[Symbol.for("<")](r):d<r}();function(){return void 0!==d&&null!==d&&"object"===(0,S.Z)(d)&&d[Symbol.for("prefix-increment")]?d[Symbol.for("prefix-increment")]():++d}()){if(t=this.pow(t),function(){return void 0!==isFinite(t.layer)&&null!==isFinite(t.layer)&&isFinite(t.layer)[Symbol.for("!")]?isFinite(t.layer)[Symbol.for("!")]():!isFinite(t.layer)}()||function(){return 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(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}())return T(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]:T(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=P(o);var t=P(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<r}();function(){return void 0!==a&&null!==a&&"object"===(0,S.Z)(a)&&a[Symbol.for("prefix-increment")]?a[Symbol.for("prefix-increment")]():++a}()){if(t=t.log(o),function(){return void 0!==isFinite(t.layer)&&null!==isFinite(t.layer)&&isFinite(t.layer)[Symbol.for("!")]?isFinite(t.layer)[Symbol.for("!")]():!isFinite(t.layer)}()||function(){return 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(function(){return void 0!==a&&null!==a&&a[Symbol.for(">")]?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=P(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=P(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 P(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 P(t)}},{key:"layeradd10",value:function(n){n=e.fromValue_noAlloc(n).toNumber();var o=P(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 P(O(this.toNumber()));if(0===this.layer)return P(O(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 _(this);if(2===this.layer)return _(this);if(function(){return void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for(">=")]?e.layer[Symbol.for(">=")](3):e.layer>=3}())return T(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 T(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]:T(1,0,1);r=P(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<o}();function(){return void 0!==i&&null!==i&&"object"===(0,S.Z)(i)&&i[Symbol.for("prefix-increment")]?i[Symbol.for("prefix-increment")]():++i}()){if(r=this.tetrate(r.toNumber()),function(){return void 0!==isFinite(r.layer)&&null!==isFinite(r.layer)&&isFinite(r.layer)[Symbol.for("!")]?isFinite(r.layer)[Symbol.for("!")]():!isFinite(r.layer)}()||function(){return void 0!==isFinite(r.mag)&&null!==isFinite(r.mag)&&isFinite(r.mag)[Symbol.for("!")]?isFinite(r.mag)[Symbol.for("!")]():!isFinite(r.mag)}())return r.normalize();if(function(){return void 0!==i&&null!==i&&i[Symbol.for(">")]?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?P(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}())):T(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?P(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}())):T(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?P(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}())):T(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?P(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}())):T(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}()?P(Math.acos(this.toNumber())):0===this.layer?P(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}())):T(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?P(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}())):P(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)?T(Number.NaN,Number.NaN,Number.NaN):e.ln(this.add(1).div(P(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 P(e).abs()}},{key:"neg",value:function(e){return P(e).neg()}},{key:"negate",value:function(e){return P(e).neg()}},{key:"negated",value:function(e){return P(e).neg()}},{key:"sign",value:function(e){return P(e).sign}},{key:"sgn",value:function(e){return P(e).sign}},{key:"round",value:function(e){return P(e).round()}},{key:"floor",value:function(e){return P(e).floor()}},{key:"ceil",value:function(e){return P(e).ceil()}},{key:"trunc",value:function(e){return P(e).trunc()}},{key:"add",value:function(e,n){return P(e).add(n)}},{key:"plus",value:function(e,n){return P(e).add(n)}},{key:"sub",value:function(e,n){return P(e).sub(n)}},{key:"subtract",value:function(e,n){return P(e).sub(n)}},{key:"minus",value:function(e,n){return P(e).sub(n)}},{key:"mul",value:function(e,n){return P(e).mul(n)}},{key:"multiply",value:function(e,n){return P(e).mul(n)}},{key:"times",value:function(e,n){return P(e).mul(n)}},{key:"div",value:function(e,n){return P(e).div(n)}},{key:"divide",value:function(e,n){return P(e).div(n)}},{key:"recip",value:function(e){return P(e).recip()}},{key:"reciprocal",value:function(e){return P(e).recip()}},{key:"reciprocate",value:function(e){return P(e).reciprocate()}},{key:"cmp",value:function(e,n){return P(e).cmp(n)}},{key:"cmpabs",value:function(e,n){return P(e).cmpabs(n)}},{key:"compare",value:function(e,n){return P(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=P(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=P(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}))},{key:"eq",value:function(e,n){return P(e).eq(n)}},{key:"equals",value:function(e,n){return P(e).eq(n)}},{key:"neq",value:function(e,n){return P(e).neq(n)}},{key:"notEquals",value:function(e,n){return P(e).notEquals(n)}},{key:"lt",value:function(e,n){return P(e).lt(n)}},{key:"lte",value:function(e,n){return P(e).lte(n)}},{key:"gt",value:function(e,n){return P(e).gt(n)}},{key:"gte",value:function(e,n){return P(e).gte(n)}},{key:"max",value:function(e,n){return P(e).max(n)}},{key:"min",value:function(e,n){return P(e).min(n)}},{key:"minabs",value:function(e,n){return P(e).minabs(n)}},{key:"maxabs",value:function(e,n){return P(e).maxabs(n)}},{key:"clamp",value:function(e,n,o){return P(e).clamp(n,o)}},{key:"clampMin",value:function(e,n){return P(e).clampMin(n)}},{key:"clampMax",value:function(e,n){return P(e).clampMax(n)}},{key:"cmp_tolerance",value:function(e,n,o){return P(e).cmp_tolerance(n,o)}},{key:"compare_tolerance",value:function(e,n,o){return P(e).cmp_tolerance(n,o)}},{key:"eq_tolerance",value:function(e,n,o){return P(e).eq_tolerance(n,o)}},{key:"equals_tolerance",value:function(e,n,o){return P(e).eq_tolerance(n,o)}},{key:"neq_tolerance",value:function(e,n,o){return P(e).neq_tolerance(n,o)}},{key:"notEquals_tolerance",value:function(e,n,o){return P(e).notEquals_tolerance(n,o)}},{key:"lt_tolerance",value:function(e,n,o){return P(e).lt_tolerance(n,o)}},{key:"lte_tolerance",value:function(e,n,o){return P(e).lte_tolerance(n,o)}},{key:"gt_tolerance",value:function(e,n,o){return P(e).gt_tolerance(n,o)}},{key:"gte_tolerance",value:function(e,n,o){return P(e).gte_tolerance(n,o)}},{key:"pLog10",value:function(e){return P(e).pLog10()}},{key:"absLog10",value:function(e){return P(e).absLog10()}},{key:"log10",value:function(e){return P(e).log10()}},{key:"log",value:function(e,n){return P(e).log(n)}},{key:"log2",value:function(e){return P(e).log2()}},{key:"ln",value:function(e){return P(e).ln()}},{key:"logarithm",value:function(e,n){return P(e).logarithm(n)}},{key:"pow",value:function(e,n){return P(e).pow(n)}},{key:"pow10",value:function(e){return P(e).pow10()}},{key:"root",value:function(e,n){return P(e).root(n)}},{key:"factorial",value:function(e,n){return P(e).factorial()}},{key:"gamma",value:function(e,n){return P(e).gamma()}},{key:"lngamma",value:function(e,n){return P(e).lngamma()}},{key:"exp",value:function(e){return P(e).exp()}},{key:"sqr",value:function(e){return P(e).sqr()}},{key:"sqrt",value:function(e){return P(e).sqrt()}},{key:"cube",value:function(e){return P(e).cube()}},{key:"cbrt",value:function(e){return P(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]:T(1,0,1);return P(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]:T(1,0,1);return P(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 P(e).iteratedlog(o,r)}},{key:"layeradd10",value:function(e,n){return P(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 P(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 P(e).slog(o)}},{key:"lambertw",value:function(e){return P(e).lambertw()}},{key:"ssqrt",value:function(e){return P(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]:T(1,0,1);return P(e).pentate(o,r)}},{key:"affordGeometricSeries",value:function(e,n,o,r){return this.affordGeometricSeries_core(P(e),P(n),P(o),r)}},{key:"sumGeometricSeries",value:function(e,n,o,r){return this.sumGeometricSeries_core(e,P(n),P(o),r)}},{key:"affordArithmeticSeries",value:function(e,n,o,r){return this.affordArithmeticSeries_core(P(e),P(n),P(o),P(r))}},{key:"sumArithmeticSeries",value:function(e,n,o,r){return this.sumArithmeticSeries_core(P(e),P(n),P(o),P(r))}},{key:"efficiencyOfPurchase",value:function(e,n,o){return this.efficiencyOfPurchase_core(P(e),P(n),P(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 T(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 T(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)),I(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,E)}},{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("<")](C.length):l<C.length}();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(){return void 0!==C[l]&&null!==C[l]&&C[l][Symbol.for("==")]?C[l][Symbol.for("==")](e):C[l]==e}()){r=o[l][Math.floor(n)],t=o[l][Math.ceil(n)];break}if(function(){return void 0!==C[l]&&null!==C[l]&&C[l][Symbol.for("<")]?C[l][Symbol.for("<")](e):C[l]<e}()&&function(){return void 0!==C[l+1]&&null!==C[l+1]&&C[l+1][Symbol.for(">")]?C[l+1][Symbol.for(">")](e):C[l+1]>e}()){var i=function(){return e-C[l]!==void 0&&e-C[l]!==null&&(e-C[l])[Symbol.for("/")]?(e-C[l])[Symbol.for("/")](C[l+1]-C[l]):(e-C[l])/(C[l+1]-C[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",T(0,0,0)),(0,v.Z)(A,"dOne",T(1,0,1)),(0,v.Z)(A,"dNegOne",T(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),0,1)),(0,v.Z)(A,"dTwo",T(1,0,2)),(0,v.Z)(A,"dTen",T(1,0,10)),(0,v.Z)(A,"dNaN",T(Number.NaN,Number.NaN,Number.NaN)),(0,v.Z)(A,"dInf",T(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,v.Z)(A,"dNegInf",T(function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,v.Z)(A,"dNumberMax",I(1,0,Number.MAX_VALUE)),(0,v.Z)(A,"dNumberMin",I(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)?W(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 W(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 G(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 H=new A("eeee1000"),Y=new A("e100000"),J=new A("e1000"),K=new A(1e9),X=new A(1e6),Q=new A(1e3),$=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(H)){var t=e.slog();return t.gte(X)?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("+")](W(t.floor(),0)):A.pow(10,t.sub(t.floor())).toStringWithDecimalPlaces(3)+"F"+W(t.floor(),0)}()}if(e.gte(Y))return L(e,0,!1);if(e.gte(J))return L(e,0);if(e.gte(K))return L(e,n);if(e.gte(Q))return W(e,0);if(e.gte(ee)||function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}())return G(e,n);if(e.eq(ne))return(0).toFixed(n);if(e=ue(e),e.lt(J)){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(K)||e.lte($)&&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=W,ce=G,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}});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)))}},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={},o=!1;function t(){return function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}()&&(Object.assign(n,e()),o=!0),n}return new Proxy(n,{get:function(e,n){return n===r?t():t()[n]},set:function(){return console.error("Layers and features are shallow readonly"),!1},has:function(e,n){return n===r||Reflect.has(t(),n)},ownKeys:function(){return Reflect.ownKeys(t())},getOwnPropertyDescriptor:function(r,t){return function(){return void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o}()&&(Object.assign(n,e()),o=!0),Object.getOwnPropertyDescriptor(r,t)}})}},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,7144));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)})))},7144:function(e,n,o){"use strict";o.r(n),o.d(n,{fixOldSave:function(){return cr},getInitialLayers:function(){return ar},hasWon:function(){return fr},main:function(){return ur}});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),w=(o(4553),o(6699),o(2023),o(4747),o(7327),o(1249),o(2222),{key:0,class:"left-side-nodes"}),C={key:1,class:"side-nodes"};function B(e,n,o,t,l,i){var u=(0,r.resolveComponent)("TreeNode"),a=(0,r.resolveComponent)("Links");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.nodes),(function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("span",(0,r.mergeProps)({class:"row",key:o},e.$attrs),[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n,(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherNodeProps(n),{"force-tooltip":n.forceTooltip}),null,16,["force-tooltip"])})),128))],16)})),128)),e.unref(e.leftSideNodes)?((0,r.openBlock)(),(0,r.createElementBlock)("span",w,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.leftSideNodes),(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherNodeProps(n),{"force-tooltip":n.forceTooltip,small:""}),null,16,["force-tooltip"])})),128))])):(0,r.createCommentVNode)("",!0),e.unref(e.rightSideNodes)?((0,r.openBlock)(),(0,r.createElementBlock)("span",C,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.unref(e.rightSideNodes),(function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(u,(0,r.mergeProps)({key:o},e.gatherNodeProps(n),{"force-tooltip":n.forceTooltip,small:""}),null,16,["force-tooltip"])})),128))])):(0,r.createCommentVNode)("",!0),e.branches?((0,r.openBlock)(),(0,r.createBlock)(a,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,r.createCommentVNode)("",!0)],64)}var E=o(1604),P=o(5082);function I(e,n,o,t,l,i){var u=(0,r.resolveComponent)("MarkNode"),a=(0,r.resolveComponent)("Node"),f=(0,r.resolveComponent)("Tooltip");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.createBlock)(f,(0,r.mergeProps)({key:0},e.tooltipToBind&&e.gatherTooltipProps(e.tooltipToBind),{display:e.tooltipDisplay,force:e.forceTooltip,style:{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},class:(0,P.Z)({treeNode:!0,can:e.unref(e.canClick),small:e.unref(e.small)},e.unref(e.classes))}),{default:(0,r.withCtx)((function(){var o;return[(0,r.createElementVNode)("button",{onClick:n[0]||(n[0]=function(){return e.click&&e.click.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!==(o=e.unref(e.style))&&null!==(o=e.unref(e.style))&&(o=e.unref(e.style))[Symbol.for("!==")]?(o=e.unref(e.style))[Symbol.for("!==")](null):null!==(o=e.unref(e.style))}()&&function(){return void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](void 0):void 0!==o}()?o:[]])},[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.unref(e.comp))))],36),(0,r.createVNode)(u,{mark:e.unref(e.mark)},null,8,["mark"]),(0,r.createVNode)(a,{id:e.id},null,8,["id"])]})),_:1},16,["display","force","style","class"])):(0,r.createCommentVNode)("",!0)}o(9653);var T=o(6084),F=o(9365),D=(0,r.defineComponent)({props:{id:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=(0,r.inject)(F.RegisterNodeInjectionKey),l=(0,r.inject)(F.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,T.Z)(e,2),i=o[0],u=o[1],a=(0,T.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 R=(0,u.Z)(D,[["__scopeId","data-v-63ded336"]]);var j=R,O={key:0},_={key:0,class:"mark star"},A=["src"],U=(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",O,[!0===e.mark?((0,r.openBlock)(),(0,r.createElementBlock)("div",_)):((0,r.openBlock)(),(0,r.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,A))])):(0,r.createCommentVNode)("",!0)}}});const q=(0,u.Z)(U,[["__scopeId","data-v-c476c56a"]]);var z=q,L=o(2794);function W(e){var n=e.display,o=e.top,r=e.left,t=e.right,l=e.bottom,i=e.xoffset,u=e.yoffset,a=e.force;return{display:n,top:o,left:r,right:t,bottom:l,xoffset:i,yoffset:u,force:a}}var G=(0,r.defineComponent)({props:{display:(0,E.P5)(Object,String,Function),visibility:{type:(0,E.P5)(Number),required:!0},style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object),tooltip:(0,E.P5)(Object,String,Function),onClick:Function,onHold:Function,color:(0,E.P5)(String),glowColor:(0,E.P5)(String),forceTooltip:{type:Object,required:!0},canClick:{type:(0,E.P5)(Boolean),required:!0},mark:(0,E.P5)(Boolean,String),id:{type:String,required:!0},small:(0,E.P5)(Boolean)},components:{Tooltip:L.Z,MarkNode:z,Node:j},setup:function(e){var n=(0,r.toRefs)(e),o=n.tooltip,t=n.forceTooltip,l=n.onClick,i=n.onHold,u=n.display;function a(e){var n;e.shiftKey&&o?t.value=function(){return void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value}():null===(n=(0,r.unref)(l))||void 0===n||n()}var f=(0,E.KO)(u),c=(0,r.shallowRef)(void 0);(0,r.watchEffect)((function(){var e=(0,E.Uv)(o);"object"===(0,b.Z)(e)&&function(){return void 0!==(0,E.RU)(e)&&null!==(0,E.RU)(e)&&(0,E.RU)(e)[Symbol.for("!")]?(0,E.RU)(e)[Symbol.for("!")]():!(0,E.RU)(e)}()?c.value=e.display:c.value=e}));var s=(0,r.computed)((function(){var e=(0,E.Uv)(o);return"object"===(0,b.Z)(e)&&function(){return void 0!==(0,E.RU)(e)&&null!==(0,E.RU)(e)&&(0,E.RU)(e)[Symbol.for("!")]?(0,E.RU)(e)[Symbol.for("!")]():!(0,E.RU)(e)}()?e:null})),m=(0,E.ix)(l,i),d=m.start,v=m.stop;return{click:a,start:d,stop:v,comp:f,tooltipDisplay:c,tooltipToBind:s,unref:r.unref,Visibility:y.EE,gatherTooltipProps:W,isCoercableComponent:E.RU}}});const H=(0,u.Z)(G,[["render",I],["__scopeId","data-v-09bec9fe"]]);var Y=H,J=(o(2479),o(9254),["x1","y1","x2","y2"]),K=(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=e&&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=e&&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,J)}}});const X=K;var Q=X,$=(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)(F.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=null===e||void 0===e?void 0:e.element.getBoundingClientRect()})),a=!0})))}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)(Q,{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 ee=(0,u.Z)($,[["__scopeId","data-v-5837f7bc"]]);var ne=ee,oe=(0,r.defineComponent)({props:{nodes:{type:(0,E.P5)(Array),required:!0},leftSideNodes:(0,E.P5)(Array),rightSideNodes:(0,E.P5)(Array),branches:(0,E.P5)(Array)},components:{TreeNode:Y,Links:ne},setup:function(){function e(e){var n=e.display,o=e.visibility,r=e.style,t=e.classes,l=e.tooltip,i=e.onClick,u=e.onHold,a=e.color,f=e.glowColor,c=e.forceTooltip,s=e.canClick,m=e.mark,d=e.id;return{display:n,visibility:o,style:r,classes:t,tooltip:l,onClick:i,onHold:u,color:a,glowColor:f,forceTooltip:c,canClick:s,mark:m,id:d}}return{gatherNodeProps:e,unref:r.unref}}});const re=(0,u.Z)(oe,[["render",B],["__scopeId","data-v-28bdfe90"]]);var te=re,le=o(9583),ie=o(3273),ue=Symbol("TreeNode"),ae=Symbol("Tree");function fe(e){return(0,ie.z2)((function(){var n=e();if(n.id=(0,y.QI)("treeNode-"),n.type=ue,n.tooltip?n.forceTooltip=(0,g.ax)(!1):n.forceTooltip=(0,r.ref)(!1),(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,le.yB)(n,"color"),(0,le.yB)(n,"display"),(0,le.yB)(n,"tooltip"),(0,le.yB)(n,"glowColor"),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),(0,le.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}))}function ce(e){return(0,ie.z2)((function(){var n=e();return n.id=(0,y.QI)("tree-"),n.type=ae,n[y.wA]=te,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,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"nodes"),(0,le.yB)(n,"leftSideNodes"),(0,le.yB)(n,"rightSideNodes"),(0,le.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 se=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()}()};var me=o(5967),de=o(2482),ye=(o(8862),o(274));function be(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,P.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 ve=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},display:(0,E.P5)(Object,String,Function),earned:{type:(0,E.P5)(Boolean),required:!0},image:(0,E.P5)(String),style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object),mark:(0,E.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:j,MarkNode:z,Tooltip:L.Z},setup:function(e){var n=(0,r.toRefs)(e),o=n.display;return{component:(0,E.KO)(o),unref:r.unref,Visibility:y.EE}}});const Se=(0,u.Z)(ve,[["render",be],["__scopeId","data-v-2e1ea71d"]]);var ge=Se,pe=o(3002);o(343);function he(){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 Ne(){return he("red","20px")}S.globalBus.on("setupVue",(function(e){return e.use(pe.ZP)}));var ke=(0,pe.pm)(),Ve=Symbol("Achievement");function xe(e){return(0,ie.z2)((function(){var n=e();if((0,g.Mv)(n,!1),n.id=(0,y.QI)("achievement-"),n.type=Ve,n[y.wA]=ge,n.earned=n[g.n9],n.complete=function(){n[g.n9].value=!0},(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"display"),(0,le.yB)(n,"mark"),(0,le.yB)(n,"image"),(0,le.yB)(n,"style"),(0,le.yB)(n,"classes"),n[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}},n.shouldEarn){var o=n;(0,r.watchEffect)((function(){var e,n;if(function(){return void 0!==o.earned.value&&null!==o.earned.value&&o.earned.value[Symbol.for("!")]?o.earned.value[Symbol.for("!")]():!o.earned.value}()&&(0,r.unref)(o.visibility)===y.EE.Visible&&function(){return void 0!==(e=o.shouldEarn)&&null!==(e=o.shouldEarn)&&(e=o.shouldEarn)[Symbol.for("!==")]?(e=o.shouldEarn)[Symbol.for("!==")](null):null!==(e=o.shouldEarn)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()&&e.call(o)&&(o.earned.value=!0,null===(n=o.onComplete)||void 0===n||n.call(o),o.display)){var t=(0,E.MM)((0,r.unref)(o.display));ke.info((0,r.createVNode)("div",null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Achievement earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(t,null,null)])]))}}))}return n}))}o(9714),o(7042);function Me(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 Ze=o(1037),we=o(9266),Ce={key:0};function Be(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",Ce,[((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 Ee=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,E.P5)(Object,String,Function),required:!0},title:(0,E.P5)(Object,String,Function),style:(0,E.P5)(String,Object,Array),canClick:{type:(0,E.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:j},setup:function(e){var n=(0,r.toRefs)(e),o=n.onClick,t=n.onHold,l=n.title,i=n.display,u=(0,E.ix)(o,t),a=u.start,f=u.stop,c=(0,E.KO)(l),s=(0,E.vq)(i);return{start:a,stop:f,titleComponent:c,component:s,Visibility:y.EE,unref:r.unref}}});const Pe=(0,u.Z)(Ee,[["render",Be],["__scopeId","data-v-b1182ac6"]]);var Ie=Pe,Te=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},rows:{type:(0,E.P5)(Number),required:!0},cols:{type:(0,E.P5)(Number),required:!0},cells:{type:(0,E.P5)(Object),required:!0}},components:{GridCell:Ie},setup:function(){var e=(0,r.computed)((function(){return Ze.Z[we.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 Fe=(0,u.Z)(Te,[["render",Me]]);var De=Fe,Re=o(1349);Symbol("Grid");function je(e){return new Proxy({},Oe(e))}function Oe(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,_e(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 _e(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,Re.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,Re.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,Re.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,Re.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 Ae(e){return(0,ie.z2)((function(){var n=e();if((0,g.Mv)(n,{}),n.id=(0,y.QI)("grid-"),n[y.wA]=De,n.getID=function(e){return function(){return n.id+"-"!==void 0&&n.id+"-"!==null&&(n.id+"-")[Symbol.for("+")]?(n.id+"-")[Symbol.for("+")](e):n.id+"-"+e}()},n.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},n.setState=function(e,n){this[g.n9].value[e]=n},n.cells=je(n),(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"rows"),(0,le.yB)(n,"cols"),(0,le.yB)(n,"getVisibility"),(0,y.Rh)(n,"getVisibility",y.EE.Visible),(0,le.yB)(n,"getCanClick"),(0,y.Rh)(n,"getCanClick",!0),(0,le.yB)(n,"getStartState"),(0,le.yB)(n,"getStyle"),(0,le.yB)(n,"getClasses"),(0,le.yB)(n,"getTitle"),(0,le.yB)(n,"getDisplay"),n.onClick){var o=n.onClick.bind(n);n.onClick=function(e,t){(0,r.unref)(n.cells[e].canClick)&&o(e,t)}}if(n.onHold){var t=n.onHold.bind(n);n.onHold=function(e,o){(0,r.unref)(n.cells[e].canClick)&&t(e,o)}}return n[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}},n}))}o(561);function Ue(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,P.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 qe=(0,r.defineComponent)({props:{display:{type:(0,E.P5)(Object,String,Function),required:!0},visibility:{type:(0,E.P5)(Number),required:!0},style:(0,E.P5)(Object,String,Array),classes:(0,E.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,E.P5)(Boolean),required:!0},small:Boolean,mark:(0,E.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:j,MarkNode:z},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,E.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())i.value="";else if((0,E.RU)(e))i.value=(0,E.MM)(e);else{var n=(0,E.MM)(e.title||"","h3"),t=(0,E.MM)(e.description,"div");i.value=(0,E.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,E.ix)(t,l),a=u.start,f=u.stop;return{start:a,stop:f,comp:i,Visibility:y.EE,unref:r.unref}}});const ze=(0,u.Z)(qe,[["render",Ue],["__scopeId","data-v-6b39988a"]]);var Le=ze,We=Symbol("Clickable");function Ge(e){return(0,ie.z2)((function(){var n=e();if(n.id=(0,y.QI)("clickable-"),n.type=We,n[y.wA]=Le,(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"canClick"),(0,y.Rh)(n,"canClick",!0),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),(0,le.yB)(n,"mark"),(0,le.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 He(e){return Ge((function(){var n=e();(0,le.yB)(n,"showNextAt"),(0,y.Rh)(n,"showNextAt",!0),!function(){return void 0!==n.resetDescription&&null!==n.resetDescription&&n.resetDescription[Symbol.for("==")]?n.resetDescription[Symbol.for("==")](null):null==n.resetDescription}()?(0,le.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,(0,r.unref)(n.conversion.currentGain))])," ",n.conversion.gainResource.displayName,(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Next:")," ",M(n.conversion.baseResource,(0,r.unref)(n.conversion.nextAt))," ",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.gt((0,r.unref)(n.conversion.currentGain),0)})));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 Ye(e){return fe((function(){var n=e();return(0,le.yB)(n,"display"),(0,y.Rh)(n,"display",n.layerID),(0,le.yB)(n,"append"),(0,P.Z)((0,P.Z)({},n),{},{display:n.layerID,onClick:(0,r.unref)(n.append)?function(){if(me.Z.tabs.includes(n.layerID)){var e=me.Z.tabs.lastIndexOf(n.layerID);me.Z.tabs.splice(e,1)}else me.Z.tabs.push(n.layerID)}:function(){me.Z.tabs.splice(1,1,n.layerID)}})}))}function Je(e){return(0,ie.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(){return n.scaling.currentGain(n)}))),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(){return n.scaling.nextAt(n)}))),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,n.modifyGainAmount?n.modifyGainAmount((0,r.unref)(n.currentGain)):(0,r.unref)(n.currentGain)),n.baseResource.value=0}),(0,le.yB)(n,"currentGain"),(0,le.yB)(n,"nextAt"),(0,le.yB)(n,"buyMax"),(0,y.Rh)(n,"buyMax",!0),(0,le.yB)(n,"roundUpCost"),(0,y.Rh)(n,"roundUpCost",!0),n}))}function Ke(e,n){return{currentGain:function(o){var t=v.ZP.div(o.baseResource.value,(0,r.unref)(e)).pow((0,r.unref)(n)).floor().max(0);return t.isNan()?new v.ZP(0):(function(){return void 0!==o.buyMax&&null!==o.buyMax&&o.buyMax[Symbol.for("!")]?o.buyMax[Symbol.for("!")]():!o.buyMax}()&&(t=t.min(1)),t)},nextAt:function(o){var t=v.ZP.add((0,r.unref)(o.currentGain),1).root((0,r.unref)(n)).times((0,r.unref)(e)).max((0,r.unref)(e));return o.roundUpCost&&(t=t.ceil()),t}}}function Xe(e){return Je(e)}function Qe(e){return Je((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(){return v.ZP.sub(n.scaling.currentGain(n),n.gainResource.value).add(1).max(1)}))),(0,y.Rh)(n,"convert",(function(){n.gainResource.value=n.modifyGainAmount?n.modifyGainAmount((0,r.unref)(n.currentGain)):(0,r.unref)(n.currentGain),n.baseResource.value=0})),n}))}function $e(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 en(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,P.Z)((0,P.Z)({},e),{},{currentGain:function(o){return $e(e.currentGain(o),(0,r.unref)(n),(0,r.unref)(t))}})}var nn=function(e){return(0,r.pushScopeId)("data-v-6447a93e"),e=e(),(0,r.popScopeId)(),e},on=nn((function(){return(0,r.createElementVNode)("span",{class:"toggle"},"▼",function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}())}));function rn(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,P.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)}()})},[on,((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 tn=o(423),ln=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},display:{type:(0,E.P5)(Object,String,Function),required:!0},title:{type:(0,E.P5)(Object,String,Function),required:!0},color:(0,E.P5)(String),collapsed:{type:Object,required:!0},style:(0,E.P5)(Object,String,Array),titleStyle:(0,E.P5)(Object,String,Array),bodyStyle:(0,E.P5)(Object,String,Array),classes:(0,E.P5)(Object),id:{type:String,required:!0}},components:{Node:j,CollapseTransition:tn.Z},setup:function(e){var n=(0,r.toRefs)(e),o=n.title,t=n.display,l=(0,E.vq)(o),i=(0,E.vq)(t),u=(0,r.computed)((function(){return Ze.Z[we.ZP.theme].mergeAdjacent}));return{titleComponent:l,bodyComponent:i,stacked:u,unref:r.unref,Visibility:y.EE}}});const un=(0,u.Z)(ln,[["render",rn],["__scopeId","data-v-6447a93e"]]);var an=un,fn=Symbol("Infobox");function cn(e){return(0,ie.z2)((function(){var n=e();return(0,g.Mv)(n,!1),n.id=(0,y.QI)("infobox-"),n.type=fn,n[y.wA]=an,n.collapsed=n[g.n9],(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"color"),(0,le.yB)(n,"style"),(0,le.yB)(n,"titleStyle"),(0,le.yB)(n,"bodyStyle"),(0,le.yB)(n,"classes"),(0,le.yB)(n,"title"),(0,le.yB)(n,"display"),n[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}},n}))}var sn={ref:"resizeListener",class:"resize-listener"};function mn(e,n,o,t,l,i){var u=(0,r.resolveComponent)("Particles",!0);return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)(u,(0,r.mergeProps)({id:e.id,class:{"not-fullscreen":function(){return void 0!==e.fullscreen&&null!==e.fullscreen&&e.fullscreen[Symbol.for("!")]?e.fullscreen[Symbol.for("!")]():!e.fullscreen}()},style:{zIndex:e.zIndex},ref:"particles",particlesInit:e.particlesInit,particlesLoaded:e.particlesLoaded,options:{fpsLimit:60,fullScreen:{enable:e.fullscreen,zIndex:e.zIndex},particles:{number:{value:0}},emitters:{autoPlay:!1}}},e.$attrs),null,16,["id","class","style","particlesInit","particlesLoaded","options"]),(0,r.createElementVNode)("div",sn,null,512)],64)}var dn=o(8534),yn=(o(5666),o(666)),bn=o(7822),vn=(0,r.defineComponent)({props:{zIndex:{type:Number,required:!0},fullscreen:{type:Boolean,required:!0},onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function},components:{Particles:bn.z},setup:function(e){var n=(0,r.ref)(null);function o(e){return t.apply(this,arguments)}function t(){return t=(0,dn.Z)(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,yn.R)(n);case 2:case"end":return e.stop()}}),e)}))),t.apply(this,arguments)}function l(n){e.onInit(n)}var i=new ResizeObserver(c),u=(0,r.inject)(F.NodesInjectionKey),a=(0,r.ref)(null);(0,r.onMounted)((function(){var e=a.value;(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e})()&&i.observe(e),c()}));var f=!0;function c(){f&&(f=!1,(0,r.nextTick)((function(){(function(){return void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!=")]?a.value[Symbol.for("!=")](null):null!=a.value})()&&e.onContainerResized&&(Object.values(u.value).forEach((function(e){return e.rect=null===e||void 0===e?void 0:e.element.getBoundingClientRect()})),e.onContainerResized(a.value.getBoundingClientRect())),f=!0})))}return{particles:n,particlesInit:o,particlesLoaded:l,resizeListener:a}}});const Sn=(0,u.Z)(vn,[["render",mn],["__scopeId","data-v-71ba1b93"]]);var gn=Sn,pn=Symbol("Particles");function hn(e){return(0,ie.z2)((function(){var n,o=e();o.id=(0,y.QI)("particles-"),o.type=pn,o[y.wA]=gn,o.containerRef=(0,r.shallowRef)(null),o.addEmitter=function(e){var n=o;return n.containerRef.value?Promise.resolve(n.containerRef.value.addEmitter(e)):new Promise((function(n){t.push({resolve:n,options:e})}))},o.removeEmitter=function(e){e.emitters.removeEmitter(e)};var t=[];function l(e){o.containerRef.value=e,t.forEach((function(n){var o=n.resolve,r=n.options;return o(e.addEmitter(r))})),t=[]}return(0,y.Rh)(o,"fullscreen",!0),(0,y.Rh)(o,"zIndex",1),o.onContainerResized=null===(n=o.onContainerResized)||void 0===n?void 0:n.bind(o),o[y.tj]=function(){var e=this.id,n=this.fullscreen,o=this.zIndex,r=this.onContainerResized;return{id:e,fullscreen:n,zIndex:o,onContainerResized:r,onInit:l}},o}))}var Nn=Symbol("Reset");function kn(e){return(0,ie.z2)((function(){var n=e();return n.id=(0,y.QI)("reset-"),n.type=Nn,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,le.yB)(n,"thingsToReset"),n}))}var Vn={};S.globalBus.on("removeLayer",(function(e){var n;null===(n=Vn[e.id])||void 0===n||n.call(Vn),Vn[e.id]=void 0}));var xn=(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 Mn=xn;var Zn=Mn,wn={key:0},Cn={key:1},Bn=(0,r.createTextVNode)(", "),En=(0,r.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),Pn=(0,r.createElementVNode)("br",null,null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),In=(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,E.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",wn,"You have ")):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(Zn,{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",Cn,[Bn,((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(t))))])):(0,r.createCommentVNode)("",!0),En,Pn])}}});const Tn=In;var Fn=Tn,Dn={class:"field"},Rn={key:0,class:"field-title"},jn=["min","max"],On=(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",Dn,[e.title?((0,r.openBlock)(),(0,r.createElementBlock)("span",Rn,(0,r.toDisplayString)(e.title),1)):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(L.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,jn),[[r.vModelText,(0,r.unref)(i)]])]})),_:1},8,["display","class"])])}}});const _n=(0,u.Z)(On,[["__scopeId","data-v-8adbf51e"]]);var An=_n,Un=o(4520),qn=o(9868),zn=o(9905),Ln=(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),(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 Wn=(0,u.Z)(Ln,[["__scopeId","data-v-3b196306"]]);var Gn=Wn,Hn=(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 Yn=(0,u.Z)(Hn,[["__scopeId","data-v-15f6e746"]]);var Jn=Yn,Kn=o(6948);function Xn(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,P.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 Qn=(0,r.defineComponent)({props:{progress:{type:(0,E.P5)(String,Object,Number),required:!0},width:{type:(0,E.P5)(Number),required:!0},height:{type:(0,E.P5)(Number),required:!0},direction:{type:(0,E.P5)(String),required:!0},display:(0,E.P5)(Object,String,Function),visibility:{type:(0,E.P5)(Number),required:!0},style:(0,E.P5)(Object,String,Array),classes:(0,E.P5)(Object),borderStyle:(0,E.P5)(Object,String,Array),textStyle:(0,E.P5)(Object,String,Array),baseStyle:(0,E.P5)(Object,String,Array),fillStyle:(0,E.P5)(Object,String,Array),mark:(0,E.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:z,Node:j},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,E.Uv)(t)+.5!==void 0&&(0,E.Uv)(t)+.5!==null&&((0,E.Uv)(t)+.5)[Symbol.for("+")]?((0,E.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,E.Uv)(t)+.5+"px"}(),height:function(){return(0,E.Uv)(l)+.5!==void 0&&(0,E.Uv)(l)+.5!==null&&((0,E.Uv)(l)+.5)[Symbol.for("+")]?((0,E.Uv)(l)+.5)[Symbol.for("+")]("px"):(0,E.Uv)(l)+.5+"px"}()};switch((0,r.unref)(i)){case eo.Up:e.clipPath="inset(".concat(a.value,"% 0% 0% 0%)"),e.width=function(){return(0,E.Uv)(t)+1!==void 0&&(0,E.Uv)(t)+1!==null&&((0,E.Uv)(t)+1)[Symbol.for("+")]?((0,E.Uv)(t)+1)[Symbol.for("+")]("px"):(0,E.Uv)(t)+1+"px"}();break;case eo.Down:e.clipPath="inset(0% 0% ".concat(a.value,"% 0%)"),e.width=function(){return(0,E.Uv)(t)+1!==void 0&&(0,E.Uv)(t)+1!==null&&((0,E.Uv)(t)+1)[Symbol.for("+")]?((0,E.Uv)(t)+1)[Symbol.for("+")]("px"):(0,E.Uv)(t)+1+"px"}();break;case eo.Right:e.clipPath="inset(0% ".concat(a.value,"% 0% 0%)");break;case eo.Left:e.clipPath="inset(0% 0% 0% ".concat(a.value," + '%)");break;case eo.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),c=(0,E.KO)(u);return{normalizedProgress:a,barStyle:f,component:c,unref:r.unref,Visibility:y.EE}}});const $n=(0,u.Z)(Qn,[["render",Xn],["__scopeId","data-v-e6e3c366"]]);var eo,no=$n,oo=Symbol("Bar");function ro(e){return(0,ie.z2)((function(){var n=e();return n.id=(0,y.QI)("bar-"),n.type=oo,n[y.wA]=no,(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"width"),(0,le.yB)(n,"height"),(0,le.yB)(n,"direction"),(0,le.yB)(n,"style"),(0,le.yB)(n,"classes"),(0,le.yB)(n,"borderStyle"),(0,le.yB)(n,"baseStyle"),(0,le.yB)(n,"textStyle"),(0,le.yB)(n,"fillStyle"),(0,le.yB)(n,"progress"),(0,le.yB)(n,"display"),(0,le.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"})(eo||(eo={}));var to=Symbol("Buyable");function lo(e){return(0,ie.z2)((function(){var n=e();if(function(){return void 0!==n.canPurchase&&null!==n.canPurchase&&n.canPurchase[Symbol.for("==")]?n.canPurchase[Symbol.for("==")](null):null==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}()))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";(0,g.Mv)(n,0),n.id=(0,y.QI)("buyable-"),n.type=to,n[y.wA]=Le,n.amount=n[g.n9],n.canAfford=(0,r.computed)((function(){var e=n,o=(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!==o&&null!==o&&o[Symbol.for("!=")]?o[Symbol.for("!=")](null):null!=o}()&&v.ZP.gte(e.resource.value,o)})),function(){return void 0!==n.canPurchase&&null!==n.canPurchase&&n.canPurchase[Symbol.for("==")]?n.canPurchase[Symbol.for("==")](null):null==n.canPurchase}()&&(n.canPurchase=(0,r.computed)((function(){return(0,r.unref)(n.visibility)===y.EE.Visible&&(0,r.unref)(n.canAfford)&&v.ZP.lt(n.amount.value,(0,r.unref)(n.purchaseLimit))}))),n.maxed=(0,r.computed)((function(){return v.ZP.gte(n.amount.value,(0,r.unref)(n.purchaseLimit))})),(0,le.yB)(n,"classes");var o=n.classes;n.classes=(0,r.computed)((function(){var e=(0,r.unref)(o)||{};return n.maxed.value&&(e.bought=!0),e})),(0,le.yB)(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=function(){var e,o=n;if(!(function(){return void 0!==(0,r.unref)(o.canPurchase)&&null!==(0,r.unref)(o.canPurchase)&&(0,r.unref)(o.canPurchase)[Symbol.for("!")]?(0,r.unref)(o.canPurchase)[Symbol.for("!")]():!(0,r.unref)(o.canPurchase)}()||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=(0,r.unref)(o.cost);o.resource.value=v.ZP.sub(o.resource.value,t),o.amount.value=v.ZP.add(o.amount.value,1),null===(e=this.onPurchase)||void 0===e||e.call(this,t)}},(0,le.yB)(n,"display");var t=n.display;return n.display=(0,y.tZ)((function(){var e=(0,r.unref)(t);if((0,E.RU)(e)){var o=(0,E.MM)(e);return(0,r.createVNode)(o,null,null)}if(function(){return void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e}()&&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 l=n,i=(0,E.MM)(e.title||"","h3"),u=(0,E.MM)(e.description),a=(0,E.MM)(e.effectDisplay||""),f=(0,r.unref)(l.purchaseLimit)===v.ZP.dInf?(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Amount: "),(0,v.Ht)(l.amount.value)]):(0,r.createVNode)(r.Fragment,null,[(0,r.createTextVNode)("Amount: "),(0,v.Ht)(l.amount.value),(0,r.createTextVNode)(" /")," ",(0,v.Ht)((0,r.unref)(l.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,l.cost&&function(){return void 0!==l.maxed.value&&null!==l.maxed.value&&l.maxed.value[Symbol.for("!")]?l.maxed.value[Symbol.for("!")]():!l.maxed.value}()?(0,r.createVNode)("div",null,[(0,r.createVNode)("br",null,null),(0,r.createTextVNode)("Cost: "),(0,v.WU)((0,r.unref)(l.cost)||0)," ",n.resource.displayName]):null])}return""})),(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"cost"),(0,le.yB)(n,"resource"),(0,le.yB)(n,"purchaseLimit"),(0,y.Rh)(n,"purchaseLimit",v.ZP.dInf),(0,le.yB)(n,"style"),(0,le.yB)(n,"mark"),(0,le.yB)(n,"small"),n[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}},n}))}o(9826),o(3577);var io=["disabled"];function uo(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,P.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,io),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 ao=(0,r.defineComponent)({props:{active:{type:(0,E.P5)(Boolean),required:!0},maxed:{type:(0,E.P5)(Boolean),required:!0},canComplete:{type:(0,E.P5)(Boolean),required:!0},display:(0,E.P5)(String,Object,Function),visibility:{type:(0,E.P5)(Number),required:!0},style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object),completed:{type:(0,E.P5)(Boolean),required:!0},canStart:{type:(0,E.P5)(Boolean),required:!0},mark:(0,E.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:z,Node:j},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,E.Uv)(o),n=(0,E.Uv)(l);return e?n?Ne():he():{}}));return(0,r.watchEffect)((function(){var e=(0,E.Uv)(i);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())a.value="";else if((0,E.RU)(e))a.value=(0,E.MM)(e);else{var n=(0,E.MM)(e.title||"","h3"),o=(0,E.MM)(e.description,"div"),t=(0,E.MM)(e.goal||""),l=(0,E.MM)(e.reward||""),u=(0,E.MM)(e.effectDisplay||"");a.value=(0,E.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 fo=(0,u.Z)(ao,[["render",uo],["__scopeId","data-v-5e580749"]]);var co=fo,so=Symbol("ChallengeType");function mo(e){return(0,ie.z2)((function(){var n=e();if(function(){return void 0!==n.canComplete&&null!==n.canComplete&&n.canComplete[Symbol.for("==")]?n.canComplete[Symbol.for("==")](null):null==n.canComplete}()&&(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.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=so,n[y.wA]=co,n.completions=(0,g.ax)(0),n.active=(0,g.ax)(!1),n.completed=(0,r.computed)((function(){return v.ZP.gt(n.completions.value,0)})),n.maxed=(0,r.computed)((function(){return v.ZP.gte(n.completions.value,(0,r.unref)(n.completionLimit))})),n.toggle=function(){var e=n;if(e.active.value){var o,t;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===(o=e.onExit)||void 0===o||o.call(e),null===(t=e.reset)||void 0===t||t.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)}},n.complete=function(e){var o,t,l,i=n,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===(o=i.onComplete)||void 0===o||o.call(i),function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e}()&&(i.active.value=!1,null===(t=i.onExit)||void 0===t||t.call(i),null===(l=i.reset)||void 0===l||l.reset()))},(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible);var o=n.visibility;return n.visibility=(0,r.computed)((function(){return!0===we.ZP.hideChallenges&&(0,r.unref)(n.maxed)?y.EE.None:(0,r.unref)(o)})),function(){return void 0!==n.canComplete&&null!==n.canComplete&&n.canComplete[Symbol.for("==")]?n.canComplete[Symbol.for("==")](null):null==n.canComplete}()&&(n.canComplete=(0,r.computed)((function(){var e=n;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!==n.mark&&null!==n.mark&&n.mark[Symbol.for("==")]?n.mark[Symbol.for("==")](null):null==n.mark}()&&(n.mark=(0,r.computed)((function(){return v.ZP.gt((0,r.unref)(n.completionLimit),1)&&function(){return void 0!==!(0,r.unref)(n.maxed)&&null!==!(0,r.unref)(n.maxed)&&(!(0,r.unref)(n.maxed))[Symbol.for("!")]?(!(0,r.unref)(n.maxed))[Symbol.for("!")]():!!(0,r.unref)(n.maxed)}()}))),(0,le.yB)(n,"canStart"),(0,y.Rh)(n,"canStart",!0),(0,le.yB)(n,"canComplete"),(0,le.yB)(n,"completionLimit"),(0,y.Rh)(n,"completionLimit",1),(0,le.yB)(n,"mark"),(0,le.yB)(n,"goal"),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),(0,le.yB)(n,"display"),function(){return void 0!==n.reset&&null!==n.reset&&n.reset[Symbol.for("!=")]?n.reset[Symbol.for("!=")](null):null!=n.reset}()&&S.globalBus.on("reset",(function(e){e===n.reset&&n.active.value&&n.toggle()})),n[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}},n}))}S.globalBus.on("loadSettings",(function(e){(0,y.Rh)(e,"hideChallenges",!1)})),(0,we.QV)((0,y.tZ)((function(){return(0,r.createVNode)(qn.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":function(e){return we.ZP.hideChallenges=e},modelValue:we.ZP.hideChallenges},null)})));var yo=(0,r.shallowReactive)({}),bo=Symbol("Hotkey");function vo(e){return(0,ie.z2)((function(){var n=e();return n.type=bo,(0,le.yB)(n,"enabled"),(0,y.Rh)(n,"enabled",!0),(0,le.yB)(n,"description"),n}))}S.globalBus.on("addLayer",(function(e){(0,y.bD)(e,bo).forEach((function(e){yo[e.key]=e}))})),S.globalBus.on("removeLayer",(function(e){(0,y.bD)(e,bo).forEach((function(e){yo[e.key]=void 0}))})),document.onkeydown=function(e){var n;if("INPUT"!==(null===(n=e.target)||void 0===n?void 0:n.tagName)&&(!fr.value||!function(){return void 0!==me.Z.keepGoing&&null!==me.Z.keepGoing&&me.Z.keepGoing[Symbol.for("!")]?me.Z.keepGoing[Symbol.for("!")]():!me.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=yo[o];t&&(0,r.unref)(t.enabled)&&(e.preventDefault(),t.onPress())}},(0,we.fw)((0,y.tZ)((function(){var e=Object.values(yo).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 So=Symbol("Links");function go(e){return(0,ie.z2)((function(){var n=e();return n.type=So,n[y.wA]=ne,(0,le.yB)(n,"links"),n[y.tj]=function(){var e=this.links;return{links:e}},n}))}var po=o(3525);function ho(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,P.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 No=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},display:{type:(0,E.P5)(String,Object,Function),required:!0},style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object),earned:{type:(0,E.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:j},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=(0,r.shallowRef)("");return(0,r.watchEffect)((function(){var e=(0,E.Uv)(o);if(function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}())t.value="";else if((0,E.RU)(e))t.value=(0,E.MM)(e);else{var n=(0,E.MM)(e.requirement,"h3"),l=(0,E.MM)(e.effectDisplay||"","b"),i=(0,E.MM)(e.optionsDisplay||"","span");t.value=(0,E.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 ko=(0,u.Z)(No,[["render",ho],["__scopeId","data-v-e0d2a130"]]);var Vo,xo=ko,Mo=(0,pe.pm)(),Zo=Symbol("Milestone");function wo(e){return(0,ie.z2)((function(){var n=e();(0,g.Mv)(n,!1),n.id=(0,y.QI)("milestone-"),n.type=Zo,n[y.wA]=xo,n.earned=n[g.n9],n.complete=function(){n[g.n9].value=!0},(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible);var o=n.visibility;if(n.visibility=(0,r.computed)((function(){var e=(0,r.unref)(n.display);switch(we.ZP.msDisplay){default:case Vo.All:return(0,r.unref)(o);case Vo.Configurable:return(0,r.unref)(n.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)(o);case Vo.Incomplete:return(0,r.unref)(n.earned)?y.EE.None:(0,r.unref)(o);case Vo.None:return y.EE.None}})),(0,le.yB)(n,"style"),(0,le.yB)(n,"classes"),(0,le.yB)(n,"display"),n[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}},n.shouldEarn){var t=n;(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,r.unref)(t.display),l=(0,E.MM)((0,E.RU)(o)?o:o.requirement);Mo((0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("h3",null,[(0,r.createTextVNode)("Milestone earned!")]),(0,r.createVNode)("div",null,[(0,r.createVNode)(l,null,null)])]))}}))}return n}))}(function(e){e["All"]="all",e["Configurable"]="configurable",e["Incomplete"]="incomplete",e["None"]="none"})(Vo||(Vo={})),S.globalBus.on("loadSettings",(function(e){(0,y.Rh)(e,"msDisplay",Vo.All)}));var Co=Object.values(Vo).map((function(e){return{label:(0,Re.IJ)(e),value:e}}));(0,we.QV)((0,y.tZ)((function(){return(0,r.createVNode)(po.Z,{title:"Show Milestones",options:Co,"onUpdate:modelValue":function(e){return we.ZP.msDisplay=e},modelValue:we.ZP.msDisplay},null)})));var Bo=(0,r.defineComponent)({props:{display:null},setup:function(e){var n=e,o=(0,r.toRefs)(n),t=o.display,l=(0,E.vq)(t);return function(e,n){return(0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(l)))}}});const Eo=Bo;var Po=Eo,Io=Symbol("Tab");function To(e){return(0,ie.z2)((function(){var n=e();return n.id=(0,y.QI)("tab-"),n.type=Io,n[y.wA]=Po,n[y.tj]=function(){var e=this.display;return{display:e}},n}))}o(7941);function Fo(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,P.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 Do=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},display:{type:(0,E.P5)(Object,String,Function),required:!0},style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object),glowColor:(0,E.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,E.vq)(l),f=(0,r.computed)((function(){var e=(0,E.Uv)(i);return function(){return void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e}()?{}:(0,r.unref)(u)?he(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 Ro=(0,u.Z)(Do,[["render",Fo],["__scopeId","data-v-361380c0"]]);var jo=Ro;function Oo(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,P.Z)((0,P.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 _o=(0,r.defineComponent)({props:{visibility:{type:(0,E.P5)(Number),required:!0},activeTab:{type:(0,E.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,E.P5)(Object),required:!0},style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object)},components:{Sticky:Gn,TabButton:jo},setup:function(e){var n=(0,r.toRefs)(e),o=n.activeTab,t=(0,r.computed)((function(){return Ze.Z[we.ZP.theme].floatingTabs})),l=(0,r.shallowRef)("");(0,r.watchEffect)((function(){var e=(0,E.Uv)(o);!function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}()?(0,E.RU)(e)?l.value=(0,E.MM)(e):l.value=(0,E.MM)((0,r.unref)(e.display)):l.value=""}));var i=(0,r.computed)((function(){var e=(0,E.Uv)(o),n=(0,E.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,E.Uv)(o);return(0,E.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 Ao=(0,u.Z)(_o,[["render",Oo],["__scopeId","data-v-86da8746"]]);var Uo=Ao,qo=Symbol("TabButton"),zo=Symbol("TabFamily");function Lo(e){return(0,ie.z2)((function(){var n=e();if(0===Object.keys(n.tabs).length)throw console.warn("Cannot create tab family with 0 tabs",n),"Cannot create tab family with 0 tabs";for(var o in n.id=(0,y.QI)("tabFamily-"),n.type=zo,n[y.wA]=Uo,(0,g.Mv)(n,Object.keys(n.tabs)[0]),n.selected=n[g.n9],n.activeTab=(0,r.computed)((function(){var e=(0,r.unref)(l.tabs);if(function(){return void 0!==n[g.n9].value&&null!==n[g.n9].value&&n[g.n9].value[Symbol.for("in")]?n[g.n9].value[Symbol.for("in")](e):n[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 o=Object.values(e).find((function(e){return(0,r.unref)(e.visibility)===y.EE.Visible}));return o?(0,r.unref)(o.tab):null})),(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),n.tabs){var t=n.tabs[o];t.type=qo,t[y.wA]=jo,(0,le.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,le.yB)(t,"tab"),(0,le.yB)(t,"display"),(0,le.yB)(t,"classes"),(0,le.yB)(t,"style"),(0,le.yB)(t,"glowColor")}n[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=n;return l}))}var Wo=["disabled"];function Go(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,P.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,Wo)):(0,r.createCommentVNode)("",!0)}var Ho=(0,r.defineComponent)({props:{display:{type:(0,E.P5)(String,Object,Function),required:!0},visibility:{type:(0,E.P5)(Number),required:!0},style:(0,E.P5)(String,Object,Array),classes:(0,E.P5)(Object),resource:Object,cost:(0,E.P5)(String,Object,Number),canPurchase:{type:(0,E.P5)(Boolean),required:!0},bought:{type:(0,E.P5)(Boolean),required:!0},mark:(0,E.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:j,MarkNode:z},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,E.Uv)(o);if(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n}())l.value="";else if((0,E.RU)(n))l.value=(0,E.MM)(n);else{var i=(0,E.Uv)(t),u=(0,E.MM)(n.title||"","h3"),a=(0,E.MM)(n.description,"div"),f=(0,E.MM)(n.effectDisplay||"");l.value=(0,E.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 Yo=(0,u.Z)(Ho,[["render",Go],["__scopeId","data-v-264c96b4"]]);var Jo=Yo,Ko=Symbol("Upgrade");function Xo(e){return(0,ie.z2)((function(){var n=e();return(0,g.Mv)(n,!1),n.id=(0,y.QI)("upgrade-"),n.type=Ko,n[y.wA]=Jo,function(){return void 0!==n.canAfford&&null!==n.canAfford&&n.canAfford[Symbol.for("==")]?n.canAfford[Symbol.for("==")](null):null==n.canAfford}()&&(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}())&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=n[g.n9],!function(){return void 0!==n.canAfford&&null!==n.canAfford&&n.canAfford[Symbol.for("==")]?n.canAfford[Symbol.for("==")](null):null==n.canAfford}()?(0,le.yB)(n,"canAfford"):n.canAfford=(0,r.computed)((function(){var e=n;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))})),n.canPurchase=(0,r.computed)((function(){return(0,r.unref)(n.visibility)===y.EE.Visible&&(0,r.unref)(n.canAfford)&&function(){return void 0!==(0,r.unref)(n.bought)&&null!==(0,r.unref)(n.bought)&&(0,r.unref)(n.bought)[Symbol.for("!")]?(0,r.unref)(n.bought)[Symbol.for("!")]():!(0,r.unref)(n.bought)}()})),n.purchase=function(){var e,o=n;(function(){return void 0!==(0,r.unref)(o.canPurchase)&&null!==(0,r.unref)(o.canPurchase)&&(0,r.unref)(o.canPurchase)[Symbol.for("!")]?(0,r.unref)(o.canPurchase)[Symbol.for("!")]():!(0,r.unref)(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}()&&(o.resource.value=v.ZP.sub(o.resource.value,(0,r.unref)(o.cost))),o[g.n9].value=!0,null===(e=o.onPurchase)||void 0===e||e.call(o))},(0,le.yB)(n,"visibility"),(0,y.Rh)(n,"visibility",y.EE.Visible),(0,le.yB)(n,"classes"),(0,le.yB)(n,"style"),(0,le.yB)(n,"display"),(0,le.yB)(n,"mark"),(0,le.yB)(n,"cost"),(0,le.yB)(n,"resource"),n[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}},n}))}function Qo(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 $o=(0,F.createLayer)((function(){var e="c",n="#4BDC13",o="Candies",t=p(0,"lollipops"),l=h(t),i=(0,g.ax)(!1),u=(0,g.ax)("pointy"),a=(0,g.ax)(10),f=(0,g.ax)(new v.ZP(10)),c=(0,r.computed)((function(){return v.ZP.pow(t.value,.2)})),s=(0,r.computed)((function(){return v.ZP.times(t.value,10)})),m=cn((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}})),b=wo((function(){return{shouldEarn:function(){return v.ZP.gte(l.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}})),S=wo((function(){return{visibility:function(){return(0,y.Kf)(b.earned.value)},shouldEarn:function(){return v.ZP.gte(l.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)(qn.Z,{title:"beep","onUpdate:modelValue":function(e){return i.value=e},modelValue:i.value},null),(0,r.createVNode)(qn.Z,{title:"boop","onUpdate:modelValue":function(e){return rr.boop.value=e},modelValue:rr.boop.value},null)])}))},style:function(){return this.earned?{backgroundColor:"#1111DD"}:{}}}})),N=[b,S],k=mo((function(){return{title:"Fun",completionLimit:3,display:function(){return{description:"Makes the game 0% harder<br>".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)(V.value)&&null!==(0,v.WU)(V.value)&&(0,v.WU)(V.value)[Symbol.for("+")]?(0,v.WU)(V.value)[Symbol.for("+")]("x"):(0,v.WU)(V.value)+"x"}()}},visibility:function(){return(0,y.Kf)(v.ZP.gt(l.value,0))},goal:20,resource:ur.points,onComplete:function(){console.log("hiii")},onEnter:function(){ur.points.value=0,ur.best.value=ur.points.value,ur.total.value=ur.points.value,console.log("So challenging")},onExit:function(){console.log("Sweet freedom!")},style:{height:"200px"}}})),V=(0,r.computed)((function(){return v.ZP.add(t.value,1).tetrate(.02)})),x=Xo((function(){return{display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:t}})),Z=Xo((function(){return{display:function(){return{description:"Point generation is faster based on your unspent Lollipops",effectDisplay:"".concat((0,v.WU)(w.value),"x")}},cost:1,resource:t,visibility:function(){return(0,y.Kf)(x.bought.value)}}})),w=(0,r.computed)((function(){var e=v.ZP.add(t.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),C=Xo((function(){return{visibility:function(){return(0,y.Kf)(Z.bought.value)},canAfford:function(){return v.ZP.lt(ur.points.value,7)},onPurchase:function(){ur.points.value=v.ZP.add(ur.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=Xo((function(){return{resource:p(I.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}})),P=[x,Z,C],I=lo((function(){return{resource:t,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){f.value=v.ZP.add(f.value,e)},style:{height:"222px"},purchaseLimit:4}})),T=(0,r.computed)((function(){return v.ZP.gte(I.amount.value,0)?v.ZP.pow(25,v.ZP.pow(I.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(I.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(I.amount.value,0)?v.ZP.pow(25,v.ZP.pow(I.amount.value,1.1)):v.ZP.pow(function(){return 1[Symbol.for("/")]?1[Symbol.for("/")](25):.04}(),v.ZP.times(I.amount.value,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()).pow(1.1))})),D=(0,g.ax)(!1),R=(0,r.ref)(!1),j=Ge((function(){return{small:!0,display:"Respec Thingies",onClick:function(){D.value&&function(){return void 0!==R.value&&null!==R.value&&R.value[Symbol.for("!")]?R.value[Symbol.for("!")]():!R.value}()?R.value=!0:(t.value=v.ZP.add(t.value,f.value),I.amount.value=0,ur.tree.reset(G))}}})),O=Ge((function(){return{small:!0,display:"Sell One",onClick:function(){v.ZP.lte(I.amount.value,0)||(I.amount.value=v.ZP.sub(I.amount.value,1),t.value=v.ZP.add(t.value,I.cost.value),f.value=v.ZP.sub(f.value,I.cost.value))}}})),_=(0,y.tZ)((function(){return(0,r.createVNode)(zn.Z,null,{default:function(){return[(0,r.createVNode)(ye.Z,null,{default:function(){return[(0,r.createVNode)(qn.Z,{title:"Confirm","onUpdate:modelValue":function(e){return D.value=e},modelValue:D.value},null),(0,E._4)(j)]}}),(0,E._4)(I),(0,E._4)(O),(0,r.createVNode)(Kn.Z,{modelValue:R.value,"onUpdate:modelValue":function(e){return R.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 R.value=!1}},[(0,r.createTextVNode)("Cancel")]),(0,r.createVNode)("button",{class:"button modal-default-button danger",onClick:function(){j.onClick(),R.value=!1}},[(0,r.createTextVNode)("Respec")])])}})]}})})),A=ro((function(){return{fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:eo.Right,width:300,height:30,progress:function(){return v.ZP.add(ur.points.value,1).log(10).div(10).toNumber()},display:function(){return function(){return void 0!==(0,v.WU)(ur.points.value)&&null!==(0,v.WU)(ur.points.value)&&(0,v.WU)(ur.points.value)[Symbol.for("+")]?(0,v.WU)(ur.points.value)[Symbol.for("+")](" / 1e10 points"):(0,v.WU)(ur.points.value)+" / 1e10 points"}()}}})),U=ro((function(){return{fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:eo.Up,width:50,height:200,progress:function(){return v.ZP.div(ur.points.value,100)},display:function(){return function(){return void 0!==(0,v.Ht)(v.ZP.div(ur.points.value,1).min(100))&&null!==(0,v.Ht)(v.ZP.div(ur.points.value,1).min(100))&&(0,v.Ht)(v.ZP.div(ur.points.value,1).min(100))[Symbol.for("+")]?(0,v.Ht)(v.ZP.div(ur.points.value,1).min(100))[Symbol.for("+")]("%"):(0,v.Ht)(v.ZP.div(ur.points.value,1).min(100))+"%"}()}}})),q=ro((function(){return{fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:eo.Up,width:100,height:30,progress:function(){return v.ZP.div(t.value,50)}}})),z=Xe((function(){return{scaling:en(Ke(10,.5),1e100,.5),baseResource:ur.points,gainResource:t,roundUpCost:!0}})),L=kn((function(){return{thingsToReset:function(){return[$o]}}})),W=[vo((function(){return{key:"c",description:"reset for lollipops or whatever",onPress:function(){H.canClick.value&&H.onClick()}}})),vo((function(){return{key:"ctrl+c",description:"respec things",onPress:function(){j.onClick()}}}))],G=Ye((function(){return{layerID:e,color:n,reset:L,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip:function(){var e=M(t);return v.ZP.gt(I.amount.value,0)&&(e=function(){return void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")]("<br><i><br><br><br>".concat((0,v.Ht)(I.amount.value)," Exhancers</i>")):e+"<br><i><br><br><br>".concat((0,v.Ht)(I.amount.value)," Exhancers</i>")}()),e},style:{color:"#3325CC",textDecoration:"underline"}}})),H=He((function(){return{conversion:z,tree:ur.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}})),Y=fe((function(){return{display:"TH",color:"#6d3678",canClick:function(){return v.ZP.gte(ur.points.value,10)},tooltip:"Thanos your points",onClick:function(){ur.points.value=v.ZP.div(ur.points.value,2),console.log("Thanos'd")},glowColor:function(){return v.ZP.eq(I.amount.value,1)?"orange":""}}})),J=fe((function(){return{display:"h",color:function(){return Ze.Z[we.ZP.theme].variables["--locked"]},tooltip:{display:(0,r.computed)((function(){return"Restore your points to ".concat((0,v.WU)(a.value))})),right:!0},canClick:function(){return v.ZP.lt(ur.points.value,a.value)},onClick:function(){ur.points.value=a.value}}})),K=fe((function(){return{visibility:y.EE.Hidden}})),X=ce((function(){return{nodes:function(){return[[rr.treeNode,G],[Y,K,J]]},branches:function(){return[{startNode:rr.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:Y},{startNode:Y,endNode:J}]}}})),Q=go((function(){return{links:[{startNode:J,endNode:q,"stroke-width":"5px",stroke:"red",offsetEnd:{x:function(){return(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*q.progress.value.toNumber()):100*q.progress.value.toNumber()-50}(),y:0}}]}})),$=Lo((function(){return{tabs:{first:{tab:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[E._4.apply(void 0,P),(0,E._4)(B),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("confirmed")])])})),display:"first"},second:{tab:rr.display,display:"second"}},style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}})),ee=Lo((function(){return{tabs:{mainTab:{tab:To((function(){return{display:(0,y.tZ)((function(){var e;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(Fn,{resource:t,color:n,effectDisplay:"which are boosting waffles by ".concat((0,v.WU)(c.value)," and increasing the Ice Cream cap by ").concat((0,v.WU)(s.value))},null),(0,r.createVNode)(Gn,null,Qo(e=(0,E.sY)(H))?e:{default:function(){return[e]}}),(0,r.createVNode)(Zn,{resource:t,color:n},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)(Un.Z,{modelValue:u.value,"onUpdate:modelValue":function(e){return u.value=e}},null),(0,r.createVNode)(Gn,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:function(){return[(0,r.createTextVNode)("I have "),M(ur.points),(0,r.createTextVNode)(" "),u.value,(0,r.createTextVNode)(" points!")]}}),(0,r.createVNode)("hr",null,null),E.Dy.apply(void 0,N),(0,r.createVNode)(d,null,null),E._4.apply(void 0,P),(0,E._4)(B),(0,E._4)(k)])}))}})),display:"main tab",glowColor:function(){return x.canPurchase.value||Z.canPurchase.value||C.canPurchase.value||k.canComplete.value?"blue":""},style:{color:"orange"}},thingies:{tab:To((function(){return{style:function(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,E.sY)(_),(0,r.createVNode)(d,null,null),(0,r.createVNode)(ye.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:function(){return[(0,r.createVNode)(qn.Z,{"onUpdate:modelValue":function(e){return i.value=e},modelValue:i.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:{tab:To((function(){return{display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,E.sY)(m),(0,E.sY)(A),(0,r.createVNode)(d,null,null),(0,r.createVNode)(ye.Z,null,{default:function(){return[(0,r.createVNode)(zn.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,E.sY)(U)]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)(zn.Z,null,{default:function(){return[(0,r.createVNode)("div",null,[(0,r.createTextVNode)("idk")]),(0,r.createVNode)(d,{width:"0",height:"50px"},null),(0,E.sY)(q)]}})]}}),(0,r.createVNode)(d,null,null),(0,r.createVNode)("div",null,[(0,r.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,E.sY)(X)])}))}})),display:"jail"},illuminati:{tab:To((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,E.sY)($),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("Adjust how many points H gives you!")]),(0,r.createVNode)(An,{"onUpdate:modelValue":function(e){return a.value=e},modelValue:a.value,min:1,max:30},null)])})),style:{backgroundColor:"#3325CC"}}})),visibility:function(){return(0,y.Kf)(C.bought.value)},display:"illuminati"}}}}));return{id:e,color:n,name:o,points:t,best:l,beep:i,thingy:u,otherThingy:a,spentOnBuyables:f,waffleBoost:c,icecreamCap:s,coolInfo:m,lollipopMilestones:N,funChallenge:k,funEffect:V,generatorUpgrade:x,lollipopMultiplierUpgrade:Z,lollipopMultiplierEffect:w,unlockIlluminatiUpgrade:C,quasiUpgrade:B,exhancers:I,respecBuyables:j,sellExhancer:O,bars:{tallBoi:U,longBoi:A,flatBoi:q},tree:X,g:Y,h:J,spook:K,conversion:z,reset:L,hotkeys:W,treeNode:G,resetButton:H,confirmRespec:D,minWidth:800,tabs:ee,display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,E.sY)(ee),(0,E.sY)(Q)])}))}})),er=$o,nr=JSON.parse('{"number":{"value":0},"color":{"value":["#00FFFC","#FC00FF","#fffc00"]},"shape":{"type":["circle","triangle"],"options":{}},"opacity":{"value":1,"animation":{"enable":true,"minimumValue":0,"speed":2,"startValue":"max","destroy":"min"}},"size":{"value":4,"random":{"enable":true,"minimumValue":2}},"links":{"enable":false},"life":{"duration":{"sync":true,"value":5},"count":1},"move":{"enable":true,"gravity":{"enable":true,"acceleration":10},"speed":{"min":10,"max":20},"decay":0.1,"direction":"none","straight":false,"outModes":{"default":"destroy","top":"none"}},"rotate":{"value":{"min":0,"max":360},"direction":"random","move":true,"animation":{"enable":true,"speed":60}},"tilt":{"direction":"random","enable":true,"move":true,"value":{"min":0,"max":360},"animation":{"enable":true,"speed":60}},"roll":{"darken":{"enable":true,"value":25},"enable":true,"speed":{"min":15,"max":25}},"wobble":{"distance":30,"enable":true,"move":true,"speed":{"min":-15,"max":15}}}'),or=(0,F.createLayer)((function(){var e="f",n="#FE0102",o="Farms",t=p(0,"farm points"),l=(0,g.ax)(!1),i=cn((function(){return{title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}})),u=(0,g.ax)("Start"),a=Ge((function(){return{display:function(){return{title:"Clicky clicky!",description:function(){return"Current state:<br>"[Symbol.for("+")]?"Current state:<br>"[Symbol.for("+")](u.value):"Current state:<br>"+u.value}()}},initialState:"Start",canClick:function(){return function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!==")]?u.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==u.value}()},onClick:function(e){switch(u.value){case"Start":u.value="A new state!";break;case"A new state!":u.value="Keep going!";break;case"Keep going!":u.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;S.addEmitter({particles:nr,autoPlay:!0,fill:!1,shape:"square",startCount:0,life:{count:1,duration:.1,wait:!1},rate:{delay:0,quantity:100},position:{x:function(){var e,o,r,t,l;return 100*(null!==(e=null===n||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)!==void 0&&100*(null!==(o=null===n||void 0===n?void 0:n.clientX)&&void 0!==o?o:0)!==null&&(100*(null!==(r=null===n||void 0===n?void 0:n.clientX)&&void 0!==r?r:0))[Symbol.for("/")]?(100*(null!==(t=null===n||void 0===n?void 0:n.clientX)&&void 0!==t?t:0))[Symbol.for("/")](window.innerWidth):100*(null!==(l=null===n||void 0===n?void 0:n.clientX)&&void 0!==l?l:0)/window.innerWidth}(),y:function(){var e,o,r,t,l;return 100*(null!==(e=null===n||void 0===n?void 0:n.clientY)&&void 0!==e?e:0)!==void 0&&100*(null!==(o=null===n||void 0===n?void 0:n.clientY)&&void 0!==o?o:0)!==null&&(100*(null!==(r=null===n||void 0===n?void 0:n.clientY)&&void 0!==r?r:0))[Symbol.for("/")]?(100*(null!==(t=null===n||void 0===n?void 0:n.clientY)&&void 0!==t?t:0))[Symbol.for("/")](window.innerHeight):100*(null!==(l=null===n||void 0===n?void 0:n.clientY)&&void 0!==l?l:0)/window.innerHeight}()},size:{width:0,height:0,mode:"precise"}}),u.value="Borkened...";break;default:u.value="Start";break}},onHold:function(){console.log("Clickkkkk...")},style:function(){switch(u.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{}}}}})),f=Ge((function(){return{onClick:function(){(function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("==")]?u.value[Symbol.for("==")]("Borkened..."):"Borkened..."==u.value})()&&(u.value="Start")},display:function(){return function(){return void 0!==u.value&&null!==u.value&&u.value[Symbol.for("==")]?u.value[Symbol.for("==")]("Borkened..."):"Borkened..."==u.value}()?"Fix the clickable!":"Does nothing"},small:!0}})),c=kn((function(){return{thingsToReset:function(){return[or]}}})),s=Qe((function(){return{scaling:Ke(10,.5),baseResource:ur.points,gainResource:t,modifyGainAmount:function(e){return v.ZP.times(e,er.otherThingy.value)}}})),m=Ye((function(){return{layerID:e,color:n,reset:c,tooltip:function(){return m.canClick.value?"".concat(M(t)," ").concat(t.displayName):"This weird farmer dinosaur will only see you if you have at least 10 points. You only have ".concat(M(ur.points))},canClick:function(){return v.ZP.gte(ur.points.value,10)}}})),b=He((function(){return{conversion:s,tree:ur.tree,treeNode:m,display:(0,y.tZ)((function(){return b.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)(b.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)(b.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)(b.conversion.nextAt.value),(0,r.createTextVNode)(" points)")])}))}})),S=hn((function(){return{}})),h=(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,E.sY)(i),(0,r.createVNode)(Fn,{resource:t,color:n},null),(0,E.sY)(b),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("You have "),(0,v.Ht)(s.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,E._4)(f),(0,E._4)(a),(0,E.sY)(S)])}));return{id:e,color:n,name:o,points:t,boop:l,coolInfo:i,clickable:a,clickableState:u,reset:c,conversion:s,treeNode:m,resetButton:b,display:h}})),rr=or;function tr(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 lr=(0,F.createLayer)((function(){var e="a",n="yellow",o="Achievements",t=p(0,"achievement power"),l=fe((function(){return{display:"A",color:n,tooltip:{display:"Achievements",right:!0},onClick:function(){ur.showAchievements()}}})),i=xe((function(){return{image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,r.computed)((function(){return i.earned.value?"You did it!":"How did this happen?"})),shouldEarn:function(){return!0}}})),u=xe((function(){return{display:"Impossible!",tooltip:(0,r.computed)((function(){return u.earned.value?"HOW????":"Mwahahaha!"})),style:{color:"#04e050"}}})),a=xe((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(rr.points.value,1)},onComplete:function(){console.log("Bork bork bork!")}}})),f=[i,u,a],c=Ae((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)(L.Z,(0,r.mergeProps)({display:JSON.stringify(n.cells[e].style)},(0,de.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(ur.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}()}}})),s=(0,y.tZ)((function(){var e,n,o;return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(ye.Z,null,{default:function(){return[(0,r.createVNode)(L.Z,{display:i.tooltip,bottom:!0},tr(e=(0,E.sY)(i))?e:{default:function(){return[e]}}),(0,r.createVNode)(L.Z,{display:u.tooltip,bottom:!0},tr(n=(0,E.sY)(u))?n:{default:function(){return[n]}}),(0,r.createVNode)(L.Z,{display:a.tooltip,bottom:!0},tr(o=(0,E.sY)(a))?o:{default:function(){return[o]}})]}}),(0,E._4)(c)])}));return{id:e,color:n,name:o,points:t,achievements:f,grid:c,treeNode:l,display:s}})),ir=lr,ur=(0,F.createLayer)((function(){var e=p(10),n=h(e),o=N(e),t=(0,r.computed)((function(){if(function(){return void 0!==er.generatorUpgrade.bought.value&&null!==er.generatorUpgrade.bought.value&&er.generatorUpgrade.bought.value[Symbol.for("!")]?er.generatorUpgrade.bought.value[Symbol.for("!")]():!er.generatorUpgrade.bought.value}())return new v.ZP(0);var e=new v.ZP(3.19);return er.lollipopMultiplierUpgrade.bought.value&&(e=e.times(er.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,F.setupLayerModal)(ir),u=i.openModal,a=i.modal,f=ce((function(){return{nodes:[[er.treeNode],[rr.treeNode,er.spook]],leftSideNodes:[ir.treeNode,er.h],branches:[{startNode:rr.treeNode,endNode:er.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset:function(){e.value=(0,r.toRaw)(this.resettingNode.value)===(0,r.toRaw)(er.treeNode)?0:10,n.value=e.value,o.value=e.value},resetPropagation:se}}));return{id:"main",name:"Tree",display:(0,y.tZ)((function(){return(0,r.createVNode)(r.Fragment,null,[(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("Game Paused")]),[[r.vShow,0===me.Z.devSpeed]]),(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("Dev Speed: "),(0,v.WU)(me.Z.devSpeed||0),(0,r.createTextVNode)("x")]),[[r.vShow,me.Z.devSpeed&&function(){return void 0!==me.Z.devSpeed&&null!==me.Z.devSpeed&&me.Z.devSpeed[Symbol.for("!==")]?me.Z.devSpeed[Symbol.for("!==")](1):1!==me.Z.devSpeed}()]]),(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("Offline Time: "),(0,v.mr)(me.Z.offlineTime||0)]),[[r.vShow,function(){return void 0!==me.Z.offlineTime&&null!==me.Z.offlineTime&&me.Z.offlineTime[Symbol.for("!=")]?me.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=me.Z.offlineTime}()]]),(0,r.createVNode)("div",null,[(0,r.withDirectives)((0,r.createVNode)("span",null,[(0,r.createTextVNode)("You have ")]),[[r.vShow,v.ZP.lt(e.value,"1e1000")]]),(0,r.createVNode)("h2",null,[(0,v.WU)(e.value)]),(0,r.withDirectives)((0,r.createVNode)("span",null,[(0,r.createTextVNode)(" points")]),[[r.vShow,v.ZP.lt(e.value,"1e1e6")]])]),(0,r.withDirectives)((0,r.createVNode)("div",null,[(0,r.createTextVNode)("("),l.value,(0,r.createTextVNode)(")")]),[[r.vShow,v.ZP.gt(t.value,0)]]),(0,r.createVNode)(d,null,null),(0,r.createVNode)("button",{onClick:u},[(0,r.createTextVNode)("open achievements")]),(0,E.sY)(a),(0,E.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}})),ar=function(e){return[ur,rr,er,ir]},fr=(0,r.computed)((function(){return v.ZP.gt(ur.points.value,25)}));function cr(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},createLayer:function(){return v},addLayer:function(){return S},getLayer:function(){return g},removeLayer:function(){return p},reloadLayer:function(){return h},setupLayerModal:function(){return N}});var r=o(4865),t=(o(2526),o(1817),o(1539),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={};function v(e){return(0,u.z2)((function(){var n={},o=n.emitter=(0,a.i)();return n.on=o.on.bind(o),n.emit=o.emit.bind(o),n.nodes=(0,r.ref)({}),n.minimized=(0,c.ax)(!1),Object.assign(n,e.call(n)),(0,i.yB)(n,"color"),(0,i.yB)(n,"display"),(0,i.yB)(n,"name"),(0,l.Rh)(n,"name",n.id),(0,i.yB)(n,"minWidth"),(0,l.Rh)(n,"minWidth",600),(0,i.yB)(n,"minimizable"),(0,l.Rh)(n,"minimizable",!0),n}))}function S(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 g(e){return b[e]}function p(e){console.info("Removing layer",e.id),f.globalBus.emit("removeLayer",e),b[e.id]=void 0}function h(e){p(e),S(e,s.Z)}function N(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)})}))}}window.layers=b,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},RU:function(){return y},ix:function(){return b},vq:function(){return v},KO:function(){return S},o9:function(){return g},Uv:function(){return p},P5:function(){return h}});var r=o(3336),t=o(4865),l=(o(2526),o(1817),o(1539),o(3210),o(2222),o(1249),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,"</").concat(o,">")),(0,t.defineComponent)({template:e})):(0,t.defineComponent)({render:function(){return{}}}):e}function s(e){if(y(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}();function(){return void 0!==l&&null!==l&&"object"===(0,r.Z)(l)&&l[Symbol.for("postfix-increment")]?l[Symbol.for("postfix-increment")]():l++}())o[l]=arguments[l];return(0,t.createVNode)(i.Z,null,f(e=o.map(s))?e:{default:function(){return[e]}})}function d(){for(var e,n=arguments.length,o=new Array(n),i=0;function(){return void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](n):i<n}();function(){return void 0!==i&&null!==i&&"object"===(0,r.Z)(i)&&i[Symbol.for("postfix-increment")]?i[Symbol.for("postfix-increment")]():i++}())o[i]=arguments[i];return(0,t.createVNode)(l.Z,null,f(e=o.map(s))?e:{default:function(){return[e]}})}function y(e){return"string"===typeof e||("object"===(0,r.Z)(e)?!function(){return void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e}()&&(function(){return"render"[Symbol.for("in")]?"render"[Symbol.for("in")](e):"render"in e}()||function(){return"component"[Symbol.for("in")]?"component"[Symbol.for("in")](e):"component"in e}()):"function"===typeof e&&!0===e[a.mM])}function b(e,n){var o=(0,t.ref)(null),r=(0,t.ref)(void 0);function l(e){(function(){return void 0!==o.value&&null!==o.value&&o.value[Symbol.for("!")]?o.value[Symbol.for("!")]():!o.value})()&&(o.value=setInterval(u,250)),r.value=e}function i(){o.value&&(clearInterval(o.value),o.value=null)}function u(){n&&n.value?n.value():e&&e.value&&e.value(r.value)}return(0,t.onUnmounted)(i),{start:l,stop:i,handleHolding:u}}function v(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)();return(0,t.watchEffect)((function(){r.value=c(p(e),o)})),r}function S(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=p(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 g(e){return(0,t.computed)((function(){return p(e)}))}function p(e){return(0,t.unref)((0,t.unref)(e))}function h(){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<e}();function(){return void 0!==o&&null!==o&&"object"===(0,r.Z)(o)&&o[Symbol.for("postfix-increment")]?o[Symbol.for("postfix-increment")]():o++}())n[o]=arguments[o];return function(){return void 0!==n.includes(Object)&&null!==n.includes(Object)&&n.includes(Object)[Symbol.for("!")]?n.includes(Object)[Symbol.for("!")]():!n.includes(Object)}()&&n.push(Object),n}},5053:function(e,n,o){"use strict";o.d(n,{Z:function(){return u}});o(2526),o(1817),o(1539);var r=o(4865),t=o(9365),l=(0,r.defineComponent)({setup:function(e,n){var o=n.expose,l=(0,r.ref)({});o({nodes:l});var i={attributes:!0,childList:!0,subtree:!1};function u(e){var n=l.value[e];(function(){return void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n})()||(n.rect=n.element.getBoundingClientRect())}return(0,r.provide)(t.RegisterNodeInjectionKey,(function(e,n){var o=new MutationObserver((function(){return u(e)}));o.observe(n,i),l.value[e]={element:n,observer:o},(0,r.nextTick)((function(){return u(e)}))})),(0,r.provide)(t.UnregisterNodeInjectionKey,(function(e){var n,o;null===(n=l.value[e])||void 0===n||null===(o=n.observer)||void 0===o||o.disconnect(),l.value[e]=void 0})),(0,r.provide)(t.NodesInjectionKey,l),function(e,n){return(0,r.renderSlot)(e.$slots,"default")}}});const i=l;var u=i},6948:function(e,n,o){"use strict";o.d(n,{Z:function(){return v}});o(2526),o(1817),o(1539);var r=o(4865),t=o(5053),l=["onPointerdown"],i={class:"modal-wrapper"},u={class:"modal-container"},a={class:"modal-header"},f=(0,r.createTextVNode)(" default header "),c={class:"modal-body"},s=(0,r.createTextVNode)(" default body "),m={class:"modal-footer"},d=(0,r.createElementVNode)("div",{class:"modal-default-flex-grow"},null,function(){return 1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1}()),y=(0,r.defineComponent)({props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup:function(e,n){var o=n.expose,y=n.emit,b=e,v=(0,r.toRefs)(b),S=(0,r.computed)((function(){return v.modelValue||p.value}));function g(){y("update:modelValue",!1)}var p=(0,r.ref)(!1),h=(0,r.ref)(null),N=(0,r.computed)((function(){var e;return function(){var n,o,r,t,l;return void 0!==(e=null===(n=h.value)||void 0===n?void 0:n.nodes)&&null!==(e=null===(o=h.value)||void 0===o?void 0:o.nodes)&&(e=null===(r=h.value)||void 0===r?void 0:r.nodes)[Symbol.for("!==")]?(e=null===(t=h.value)||void 0===t?void 0:t.nodes)[Symbol.for("!==")](null):null!==(e=null===(l=h.value)||void 0===l?void 0:l.nodes)}()&&function(){return void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](void 0):void 0!==e}()?e:null}));return o({isOpen:S,nodes:N}),function(n,o){return(0,r.openBlock)(),(0,r.createBlock)(r.Teleport,{to:"#modal-root"},[(0,r.createVNode)(r.Transition,{name:"modal",onBeforeEnter:o[0]||(o[0]=function(e){return p.value=!0}),onAfterLeave:o[1]||(o[1]=function(e){return p.value=!1})},{default:(0,r.withCtx)((function(){return[(0,r.withDirectives)((0,r.createElementVNode)("div",(0,r.mergeProps)({class:"modal-mask",onPointerdown:(0,r.withModifiers)(g,["self"])},n.$attrs),[(0,r.createElementVNode)("div",i,[(0,r.createElementVNode)("div",u,[(0,r.createElementVNode)("div",a,[(0,r.renderSlot)(n.$slots,"header",{shown:(0,r.unref)(S)},(function(){return[f]}))]),(0,r.createElementVNode)("div",c,[(0,r.createVNode)(t.Z,{ref_key:"contextRef",ref:h},{default:(0,r.withCtx)((function(){return[(0,r.renderSlot)(n.$slots,"body",{shown:(0,r.unref)(S)},(function(){return[s]}))]})),_:3},512)]),(0,r.createElementVNode)("div",m,[(0,r.renderSlot)(n.$slots,"footer",{shown:(0,r.unref)(S)},(function(){return[(0,r.createElementVNode)("div",{class:"modal-default-footer"},[d,(0,r.createElementVNode)("button",{class:"button modal-default-button",onClick:g}," Close ")])]}))])])])],16,l),[[r.vShow,e.modelValue]])]})),_:3})])}}});const b=y;var v=b},2794:function(e,n,o){"use strict";o.d(n,{Z:function(){return f}});var r=o(4865);function t(e,n,o,t,l,i){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.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})},[(0,r.renderSlot)(e.$slots,"default",{},void 0,!0),(0,r.createVNode)(r.Transition,{name:"fade"},{default:(0,r.withCtx)((function(){return[e.isShown?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["tooltip",{top:e.unref(e.top),left:e.unref(e.left),right:e.unref(e.right),bottom:e.unref(e.bottom)}]),style:(0,r.normalizeStyle)({"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"})},[e.comp?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.comp),{key:0})):(0,r.createCommentVNode)("",!0)],6)):(0,r.createCommentVNode)("",!0)]})),_:1})],34)}var l=o(1604),i=(0,r.defineComponent)({props:{display:(0,l.P5)(Object,String,Function),top:(0,l.P5)(Boolean),left:(0,l.P5)(Boolean),right:(0,l.P5)(Boolean),bottom:(0,l.P5)(Boolean),xoffset:(0,l.P5)(String),yoffset:(0,l.P5)(String),force:(0,l.P5)(Boolean)},setup:function(e){var n=(0,r.toRefs)(e),o=n.display,t=n.force,i=(0,r.ref)(!1),u=(0,r.computed)((function(){return((0,l.Uv)(t)||i.value)&&a.value})),a=(0,l.KO)(o);return{isHovered:i,isShown:u,comp:a,unref:r.unref}}}),u=o(3744);const a=(0,u.Z)(i,[["render",t],["__scopeId","data-v-c8952e00"]]);var f=a},3525:function(e,n,o){"use strict";o.d(n,{Z:function(){return c}});o(9826),o(1539),o(2526),o(1817);var r=o(4865),t=o(1604),l=o(9179),i={class:"field"},u={key:0,class:"field-title"},a=(0,r.defineComponent)({props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup:function(e,n){var o=n.emit,a=e,f=(0,t.KO)((0,r.toRef)(a,"title"),"span"),c=(0,r.ref)(a.options.find((function(e){return e.value===a.modelValue})));function s(e){o("update:modelValue",e.value)}return(0,r.watch)((0,r.toRef)(a,"modelValue"),(function(e){(function(){var n,o,r,t,l;return void 0!==(null===(n=c.value)||void 0===n?void 0:n.value)&&null!==(null===(o=c.value)||void 0===o?void 0:o.value)&&(null===(r=c.value)||void 0===r?void 0:r.value)[Symbol.for("!==")]?(null===(t=c.value)||void 0===t?void 0:t.value)[Symbol.for("!==")](e):(null===(l=c.value)||void 0===l?void 0:l.value)!==e})()&&(c.value=a.options.find((function(n){return n.value===e})))})),function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("div",i,[(0,r.unref)(f)?((0,r.openBlock)(),(0,r.createElementBlock)("span",u,[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(f))))])):(0,r.createCommentVNode)("",!0),(0,r.createVNode)((0,r.unref)(l.Z),{options:e.options,modelValue:c.value,"onUpdate:modelValue":[o[0]||(o[0]=function(e){return c.value=e}),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])])}}});const f=a;var c=f},4520:function(e,n,o){"use strict";o.d(n,{Z:function(){return d}});o(2526),o(1817),o(1539);var r=o(4865),t=o(1604),l=o(7197),i=["onSubmit"],u={class:"field"},a={key:0,class:"field-title"},f=["placeholder"],c=(0,r.defineComponent)({props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup:function(e,n){var o=n.emit,c=e,s=(0,r.toRefs)(c),m=(0,r.computed)((function(){var e;return(null===(e=s.title)||void 0===e?void 0:e.value)&&(0,t.MM)((0,r.unref)(s.title.value),"span")})),d=(0,r.ref)(null);(0,r.onMounted)((function(){var e;null===(e=d.value)||void 0===e||e.focus()}));var y=(0,r.computed)({get:function(){return(0,r.unref)(s.modelValue)||""},set:function(e){o("update:modelValue",e)}});function b(){o("submit")}return function(n,o){return(0,r.openBlock)(),(0,r.createElementBlock)("form",{onSubmit:(0,r.withModifiers)(b,["prevent"])},[(0,r.createElementVNode)("div",u,[(0,r.unref)(m)?((0,r.openBlock)(),(0,r.createElementBlock)("span",a,[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(m))))])):(0,r.createCommentVNode)("",!0),e.textArea?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(l.Z),{key:1,modelValue:(0,r.unref)(y),"onUpdate:modelValue":o[0]||(o[0]=function(e){return(0,r.isRef)(y)?y.value=e:null}),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:b,ref_key:"field",ref:d},null,8,["modelValue","placeholder","maxHeight"])):(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)("input",{key:2,type:"text","onUpdate:modelValue":o[1]||(o[1]=function(e){return(0,r.isRef)(y)?y.value=e:null}),placeholder:e.placeholder,class:(0,r.normalizeClass)({fullWidth:function(){return void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title}()}),onBlur:b,ref_key:"field",ref:d},null,42,f)),[[r.vModelText,(0,r.unref)(y)]])])],40,i)}}}),s=o(3744);const m=(0,s.Z)(c,[["__scopeId","data-v-8bda704a"]]);var d=m},9868:function(e,n,o){"use strict";o.d(n,{Z:function(){return f}});o(2526),o(1817),o(1539);var r=o(4865),t=o(1604),l={class:"field"},i=(0,r.defineComponent)({props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup:function(e,n){var o=n.emit,i=e,u=(0,r.computed)((function(){return(0,t.MM)((0,r.unref)(i.title)||"<span></span>","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},2736:function(e,n,o){"use strict";o.r(n),n["default"]="eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiwiaGlkZUNoYWxsZW5nZXMiOmZhbHNlLCJ0aGVtZSI6InBhcGVyIiwic3VidGFicyI6e30sIm1pbmltaXplZCI6e30sIm1vZElEIjoidG10LXgiLCJtb2RWZXJzaW9uIjoiMC4wIiwicG9pbnRzIjoiMzMwMC4zNzc3NzM4NTkwNTUiLCJtYWluIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJmIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImNsaWNrYWJsZXMiOnsiMTEiOiJTdGFydCJ9LCJ1bmxvY2tlZCI6ZmFsc2UsInBvaW50cyI6IjAiLCJib29wIjpmYWxzZX0sImMiOnsidXBncmFkZXMiOlsiMTEiXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImJ1eWFibGVzIjp7IjExIjoiMCJ9LCJjaGFsbGVuZ2VzIjp7IjExIjoiMCJ9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCIsImJlc3QiOiIxIiwidG90YWwiOiIwIiwiYmVlcCI6ZmFsc2UsInRoaW5neSI6InBvaW50eSIsIm90aGVyVGhpbmd5IjoxMCwic3BlbnRPbkJ1eWFibGVzIjoiMCJ9LCJhIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbIjExIl0sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCJ9LCJnIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJoIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9"},7634:function(e,n,o){var r={"./safff.txt":2736};function t(e){var n=l(e);return o(n)}function l(e){if(!o.o(r,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}t.keys=function(){return Object.keys(r)},t.resolve=l,e.exports=t,t.id=7634},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]={exports:{}};return e[r].call(l.exports,l,l.exports,o),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<e.length;c++){r=e[c][0],t=e[c][1],l=e[c][2];for(var u=!0,a=0;a<r.length;a++)(!1&l||i>=l)&&Object.keys(o.O).every((function(e){return o.O[e](r[a])}))?r.splice(a--,1):(u=!1,l<i&&(i=l));if(u){e.splice(c--,1);var f=t();void 0!==f&&(n=f)}}return n}l=l||0;for(var c=e.length;c>0&&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(){var e,n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};o.t=function(r,t){if(1&t&&(r=this(r)),8&t)return r;if("object"===typeof r&&r){if(4&t&&r.__esModule)return r;if(16&t&&"function"===typeof r.then)return r}var l=Object.create(null);o.r(l);var i={};e=e||[null,n({}),n([]),n(n)];for(var u=2&t&&r;"object"==typeof u&&!~e.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(e){i[e]=function(){return r[e]}}));return i["default"]=function(){return r},o.d(l,i),l}}(),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.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(n,r){return o.f[r](e,n),n}),[]))}}(),function(){o.u=function(e){return"js/"+e+"-legacy.f9b47cea.js"}}(),function(){o.miniCssF=function(e){}}(),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.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){var e={},n="profectus:";o.l=function(r,t,l,i){if(e[r])e[r].push(t);else{var u,a;if(void 0!==l)for(var f=document.getElementsByTagName("script"),c=0;c<f.length;c++){var s=f[c];if(s.getAttribute("src")==r||s.getAttribute("data-webpack")==n+l){u=s;break}}u||(a=!0,u=document.createElement("script"),u.charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",n+l),u.src=r),e[r]=[t];var m=function(n,o){u.onerror=u.onload=null,clearTimeout(d);var t=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),t&&t.forEach((function(e){return e(o)})),n)return n(o)},d=setTimeout(m.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=m.bind(null,u.onerror),u.onload=m.bind(null,u.onload),a&&document.head.appendChild(u)}}}(),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.p=""}(),function(){var e={143:0};o.f.j=function(n,r){var t=o.o(e,n)?e[n]:void 0;if(0!==t)if(t)r.push(t[2]);else{var l=new Promise((function(o,r){t=e[n]=[o,r]}));r.push(t[2]=l);var i=o.p+o.u(n),u=new Error,a=function(r){if(o.o(e,n)&&(t=e[n],0!==t&&(e[n]=void 0),t)){var l=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+n+" failed.\n("+l+": "+i+")",u.name="ChunkLoadError",u.type=l,u.request=i,t[1](u)}};o.l(i,a,"chunk-"+n,n)}},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<i.length;f++)l=i[f],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(c)},r=self["webpackChunkprofectus"]=self["webpackChunkprofectus"]||[];r.forEach(n.bind(null,0)),r.push=n.bind(null,r.push.bind(r))}();var r=o.O(void 0,[998],(function(){return o(2782)}));r=o.O(r)})(); -//# sourceMappingURL=app-legacy.f9b9e5f6.js.map \ No newline at end of file diff --git a/js/app-legacy.f9b9e5f6.js.map b/js/app-legacy.f9b9e5f6.js.map deleted file mode 100644 index 228500c..0000000 --- a/js/app-legacy.f9b9e5f6.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/app-legacy.f9b9e5f6.js","mappings":"yFA0DYA,E,UA1BNC,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,IAGnB,SAAYJ,GACR,uBACA,mBACA,qBACA,kBAJJ,CAAYA,IAAAA,EAAM,KAOlB,QACIK,QAASJ,EACTK,OAAO,kBACAL,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,IAGlBI,QAAQ,kBACDN,GADD,IAEFC,WAAW,kBACJD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gBptC,MAAe,CACrE,IAAI6pC,KAAYmE,EACZzE,EAAoBC,EAAEwE,EAAanE,KACrCN,EAAoBvtB,EAAE6tB,GAAYmE,EAAYnE,IAGhD,GAAGoE,EAAS,IAAIjxB,EAASixB,EAAQ1E,GAGlC,IADGuE,GAA4BA,EAA2BC,GACrD91B,EAAIiyB,EAASx2B,OAAQuE,IACzByzB,EAAUxB,EAASjyB,GAChBsxB,EAAoBC,EAAE4D,EAAiB1B,IAAY0B,EAAgB1B,IACrE0B,EAAgB1B,GAAS,KAE1B0B,EAAgB1B,GAAW,EAE5B,OAAOnC,EAAoBU,EAAEjtB,IAG1BmxB,EAAqBC,KAAK,yBAA2BA,KAAK,0BAA4B,GAC1FD,EAAmB7sC,QAAQusC,EAAqB7lB,KAAK,KAAM,IAC3DmmB,EAAmB5sC,KAAOssC,EAAqB7lB,KAAK,KAAMmmB,EAAmB5sC,KAAKymB,KAAKmmB,I,GCpFvF,IAAIE,EAAsB9E,EAAoBU,OAAEnpC,EAAW,CAAC,MAAM,WAAa,OAAOyoC,EAAoB,SAC1G8E,EAAsB9E,EAAoBU,EAAEoE,I","sources":["webpack://profectus/./src/data/themes.ts","webpack://profectus/./src/features/feature.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?8e83","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?b115","webpack://profectus/./src/features/trees/TreeNode.vue?11fe","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/tooltip.ts","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","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?e251","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?11d4","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?75bb","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/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?c3f3","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?941d","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/Tooltip.vue?e91b","webpack://profectus/./src/components/Tooltip.vue?b26d","webpack://profectus/./src/components/Tooltip.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/./saves/safff.txt","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/create fake namespace object","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/ensure chunk","webpack://profectus/webpack/runtime/get javascript chunk filename","webpack://profectus/webpack/runtime/get mini-css chunk filename","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/load script","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/publicPath","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}\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};\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\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 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 { isRef, Ref, ref } from \"vue\";\nimport { GenericLayer } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\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> = {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n};\nexport type PersistentRef<T extends State = State> = Ref<T> & Persistent<T>;\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): PersistentRef<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as PersistentRef<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n return persistent as PersistentRef<T>;\n}\n\nexport function makePersistent<T extends State>(\n obj: unknown,\n defaultValue: T\n): asserts obj is Persistent<T> {\n const persistent = obj as Partial<Persistent<T>>;\n const state = ref(defaultValue) as Ref<T>;\n\n persistent[PersistentState] = state;\n persistent[DefaultValue] = isRef(defaultValue) ? (defaultValue.value as T) : defaultValue;\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\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 (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 } 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});\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 { PersistentRef } 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<PersistentRef<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number>(Number),\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) {\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 = `${minWidth}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=3cbf87a6&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=3cbf87a6&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-3cbf87a6\"]])\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-c40c38d8\"),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 \"./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=c40c38d8&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-c40c38d8\"]])\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-1378eac7\"),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 \"./Tooltip.vue\";\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 bottom: \"\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\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 bottom: \"\",\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n bottom: \"\",\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n bottom: \"\",\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n bottom: \"\",\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n })\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 right: \"\",\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n right: \"\",\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n })\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=1378eac7&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-1378eac7\"]])\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, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5fcfaa6f\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"tabs-container\" }\nconst _hoisted_2 = { class: \"inner-tab\" }\nconst _hoisted_3 = {\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, links, minimizable, nodes } =\n layer;\n return { display, minimized, minWidth, name, color, style, classes, links, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\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_2, [\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_3))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]))\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=5fcfaa6f&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=5fcfaa6f&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-5fcfaa6f\"]])\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\nfunction updateMouse(/* event */) {\n // TODO use event to update mouse position for particles\n}\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 onMousemove: updateMouse,\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 ], 38)\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=fbb1e278&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-fbb1e278\"]])\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>(objectFunc: () => T): T {\n const obj: T | Record<string, never> = {};\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc());\n calculated = true;\n }\n return obj as 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() {\n console.error(\"Layers and features are shallow readonly\");\n return false;\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());\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as 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 { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-28bdfe90\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"left-side-nodes\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"side-nodes\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TreeNode = _resolveComponent(\"TreeNode\")!\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.nodes), (row, index) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({\n class: \"row\",\n key: index\n }, _ctx.$attrs), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row, (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ], 16))\n }), 128)),\n (_ctx.unref(_ctx.leftSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.leftSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.unref(_ctx.rightSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rightSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\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 { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, mergeProps as _mergeProps, withCtx as _withCtx, 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 const _component_Tooltip = _resolveComponent(\"Tooltip\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createBlock(_component_Tooltip, _mergeProps({ key: 0 }, _ctx.tooltipToBind && _ctx.gatherTooltipProps(_ctx.tooltipToBind), {\n display: _ctx.tooltipDisplay,\n force: _ctx.forceTooltip,\n style: { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n class: {\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n small: _ctx.unref(_ctx.small),\n ..._ctx.unref(_ctx.classes)\n }\n }), {\n default: _withCtx(() => [\n _createElementVNode(\"button\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.click && _ctx.click(...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 ]),\n _: 1\n }, 16, [\"display\", \"force\", \"style\", \"class\"]))\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__","import { CoercableComponent } from \"features/feature\";\nimport { ProcessedComputable } from \"util/computed\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport interface Tooltip {\n display: ProcessedComputable<CoercableComponent>;\n top?: ProcessedComputable<boolean>;\n left?: ProcessedComputable<boolean>;\n right?: ProcessedComputable<boolean>;\n bottom?: ProcessedComputable<boolean>;\n xoffset?: ProcessedComputable<string>;\n yoffset?: ProcessedComputable<string>;\n force?: ProcessedComputable<boolean>;\n}\n\nexport function gatherTooltipProps(tooltip: Tooltip) {\n const { display, top, left, right, bottom, xoffset, yoffset, force } = tooltip;\n return { display, top, left, right, bottom, xoffset, yoffset, force };\n}\n","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport TooltipVue from \"components/Tooltip.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { gatherTooltipProps, Tooltip } from \"features/tooltip\";\nimport { ProcessedComputable } from \"util/computed\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\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 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 tooltip: processedPropType<CoercableComponent | Tooltip>(Object, String, Function),\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 forceTooltip: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\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 small: processedPropType<boolean>(Boolean)\n },\n components: {\n Tooltip: TooltipVue,\n MarkNode,\n Node\n },\n setup(props) {\n const { tooltip, forceTooltip, onClick, onHold, display } = toRefs(props);\n\n function click(e: MouseEvent) {\n if (e.shiftKey && tooltip) {\n forceTooltip.value = !forceTooltip.value;\n } else {\n unref(onClick)?.();\n }\n }\n\n const comp = computeOptionalComponent(display);\n const tooltipDisplay = shallowRef<ProcessedComputable<CoercableComponent> | undefined>(\n undefined\n );\n watchEffect(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n tooltipDisplay.value = currTooltip.display;\n return;\n }\n tooltipDisplay.value = currTooltip;\n });\n const tooltipToBind = computed(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n return currTooltip;\n }\n return null;\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n click,\n start,\n stop,\n comp,\n tooltipDisplay,\n tooltipToBind,\n unref,\n Visibility,\n gatherTooltipProps,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=09bec9fe&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=09bec9fe&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-09bec9fe\"]])\n\nexport default __exports__","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 =\n rect && 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 =\n rect && 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 { 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).forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n node => (node!.rect = node?.element.getBoundingClientRect())\n );\n isDirty = true;\n });\n }\n}\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=5837f7bc&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-5837f7bc\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { processedPropType } from \"util/vue\";\nimport { defineComponent, unref } from \"vue\";\nimport TreeNode from \"./TreeNode.vue\";\nimport Links from \"features/links/Links.vue\";\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: { TreeNode, Links },\n setup() {\n function gatherNodeProps(node: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n } = node;\n return {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n };\n }\n\n return {\n gatherNodeProps,\n unref\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=28bdfe90&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=ts\"\nexport * from \"./Tree.vue?vue&type=script&lang=ts\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=28bdfe90&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-28bdfe90\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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 { Tooltip } from \"features/tooltip\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport { persistent } from \"game/persistence\";\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 tooltip?: Computable<string | Tooltip>;\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 forceTooltip: Ref<boolean>;\n type: typeof TreeNodeType;\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 tooltip: GetComputableType<T[\"tooltip\"]>;\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: () => T & ThisType<TreeNode<T>>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode: T & Partial<BaseTreeNode> = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n\n if (treeNode.tooltip) {\n treeNode.forceTooltip = persistent(false);\n } else {\n // If we don't have a tooltip, no point in making this persistent\n treeNode.forceTooltip = ref(false);\n }\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, \"tooltip\");\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 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: () => T & ThisType<Tree<T>>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree: T & Partial<BaseTree> = 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);\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 Tooltip from \"components/Tooltip.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 Tooltip\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=2e1ea71d&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=2e1ea71d&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-2e1ea71d\"]])\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 GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, makePersistent, PersistentState } 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: () => T & ThisType<Achievement<T>>\n): Achievement<T> {\n return createLazyProxy(() => {\n const achievement: T & Partial<BaseAchievement> = optionsFunc();\n makePersistent<boolean>(achievement, false);\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 });\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Grid<T>>\n): Grid<T> {\n return createLazyProxy(() => {\n const grid: T & Partial<BaseGrid> = optionsFunc();\n makePersistent(grid, {});\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 });\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 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: () => T & ThisType<Clickable<T>>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable: T & Partial<BaseClickable> = 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, 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 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}\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 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 }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n 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\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 unref(resetButton.conversion.currentGain)\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n Next:{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n unref(resetButton.conversion.nextAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gt(unref(resetButton.conversion.currentGain), 0)\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: () => 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 Decimal, { DecimalSource } from \"util/bignum\";\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 { Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: Computable<DecimalSource>;\n nextAt?: Computable<DecimalSource>;\n baseResource: Resource;\n gainResource: Resource;\n buyMax?: Computable<boolean>;\n roundUpCost?: Computable<boolean>;\n convert?: VoidFunction;\n modifyGainAmount?: (gain: DecimalSource) => DecimalSource;\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 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 nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: () => T & ThisType<Conversion<T>>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion: T = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() =>\n conversion.scaling.currentGain(conversion as GenericConversion)\n );\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() =>\n conversion.scaling.nextAt(conversion as GenericConversion)\n );\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n conversion.modifyGainAmount\n ? conversion.modifyGainAmount(\n unref((conversion as GenericConversion).currentGain)\n )\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, \"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 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 let gain = Decimal.sub(conversion.baseResource.value, unref(base))\n .sub(1)\n .times(unref(coefficient))\n .add(1)\n .floor()\n .max(0);\n\n if (!conversion.buyMax) {\n gain = gain.min(1);\n }\n return gain;\n },\n nextAt(conversion) {\n let next = Decimal.add(unref(conversion.currentGain), 1)\n .times(unref(coefficient))\n .add(unref(base))\n .max(unref(base));\n if (conversion.roundUpCost) next = next.ceil();\n return next;\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 let gain = Decimal.div(conversion.baseResource.value, unref(base))\n .pow(unref(exponent))\n .floor()\n .max(0);\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n\n if (!conversion.buyMax) {\n gain = gain.min(1);\n }\n return gain;\n },\n nextAt(conversion) {\n let next = Decimal.add(unref(conversion.currentGain), 1)\n .root(unref(exponent))\n .times(unref(base))\n .max(unref(base));\n if (conversion.roundUpCost) next = next.ceil();\n return next;\n }\n };\n}\n\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: () => S & ThisType<Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: () => S & ThisType<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 Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n )\n .add(1)\n .max(1)\n );\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.modifyGainAmount\n ? conversion.modifyGainAmount(unref((conversion as GenericConversion).currentGain))\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Infobox<T>>\n): Infobox<T> {\n return createLazyProxy(() => {\n const infobox: T & Partial<BaseInfobox> = optionsFunc();\n makePersistent<boolean>(infobox, false);\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 });\n}\n","import { resolveComponent as _resolveComponent, mergeProps as _mergeProps, createVNode as _createVNode, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71ba1b93\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n ref: \"resizeListener\",\n class: \"resize-listener\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Particles = _resolveComponent(\"Particles\", true)!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(_component_Particles, _mergeProps({\n id: _ctx.id,\n class: {\n 'not-fullscreen': !_ctx.fullscreen\n },\n style: {\n zIndex: _ctx.zIndex\n },\n ref: \"particles\",\n particlesInit: _ctx.particlesInit,\n particlesLoaded: _ctx.particlesLoaded,\n options: {\n fpsLimit: 60,\n fullScreen: { enable: _ctx.fullscreen, zIndex: _ctx.zIndex },\n particles: {\n number: {\n value: 0\n }\n },\n emitters: {\n autoPlay: false\n }\n }\n }, _ctx.$attrs), null, 16, [\"id\", \"class\", \"style\", \"particlesInit\", \"particlesLoaded\", \"options\"]),\n _createElementVNode(\"div\", _hoisted_1, null, 512)\n ], 64))\n}","\nimport { loadFull } from \"tsparticles\";\nimport { Engine, Container } from \"tsparticles-engine\";\nimport { Emitters } from \"tsparticles-plugin-emitters/Emitters\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { defineComponent, inject, nextTick, onMounted, PropType, ref } from \"vue\";\nimport { ParticlesComponent } from \"particles.vue3\";\nimport { NodesInjectionKey } from \"game/layers\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n zIndex: {\n type: Number,\n required: true\n },\n fullscreen: {\n type: Boolean,\n required: true\n },\n onInit: {\n type: Function as PropType<(container: EmitterContainer & Container) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>\n },\n components: { Particles: ParticlesComponent },\n setup(props) {\n const particles = ref<null | { particles: { container: Emitters } }>(null);\n\n async function particlesInit(engine: Engine) {\n await loadFull(engine);\n }\n\n function particlesLoaded(container: EmitterContainer & Container) {\n props.onInit(container);\n }\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<Element | 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 }\n updateBounds();\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).forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n node => (node!.rect = node?.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n }\n isDirty = true;\n });\n }\n }\n\n return {\n particles,\n particlesInit,\n particlesLoaded,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=71ba1b93&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=71ba1b93&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-71ba1b93\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Container } from \"tsparticles-engine\";\nimport { IEmitter } from \"tsparticles-plugin-emitters/Options/Interfaces/IEmitter\";\nimport { EmitterInstance } from \"tsparticles-plugin-emitters/EmitterInstance\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { Ref, shallowRef } from \"vue\";\nimport { Component, GatherProps, getUniqueID, Replace, setDefault } from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n fullscreen?: boolean;\n zIndex?: number;\n onContainerResized?: (boundingRect: DOMRect) => void;\n}\n\nexport interface BaseParticles {\n id: string;\n containerRef: Ref<null | (EmitterContainer & Container)>;\n addEmitter: (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ) => Promise<EmitterInstance>;\n removeEmitter: (emitter: EmitterInstance) => void;\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 fullscreen: undefined extends T[\"fullscreen\"] ? true : T[\"fullscreen\"];\n zIndex: undefined extends T[\"zIndex\"] ? 1 : T[\"zIndex\"];\n }\n>;\n\nexport type GenericParticles = Replace<\n Particles<ParticlesOptions>,\n {\n fullscreen: boolean;\n zIndex: number;\n }\n>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: () => T & ThisType<Particles<T>>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles: T & Partial<BaseParticles> = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.containerRef = shallowRef(null);\n particles.addEmitter = (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ): Promise<EmitterInstance> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.containerRef.value) {\n // TODO why does addEmitter require a position parameter\n return Promise.resolve(genericParticles.containerRef.value.addEmitter(options));\n }\n return new Promise<EmitterInstance>(resolve => {\n emittersToAdd.push({ resolve, options });\n });\n };\n particles.removeEmitter = (emitter: EmitterInstance) => {\n // TODO I can't find a proper way to remove an emitter without accessing private functions\n emitter.emitters.removeEmitter(emitter);\n };\n\n let emittersToAdd: {\n resolve: (value: EmitterInstance | PromiseLike<EmitterInstance>) => void;\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] };\n }[] = [];\n\n function onInit(container: EmitterContainer & Container) {\n (particles as GenericParticles).containerRef.value = container;\n emittersToAdd.forEach(({ resolve, options }) => resolve(container.addEmitter(options)));\n emittersToAdd = [];\n }\n\n setDefault(particles, \"fullscreen\", true);\n setDefault(particles, \"zIndex\", 1);\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, fullscreen, zIndex, onContainerResized } = this;\n return {\n id,\n fullscreen,\n zIndex,\n onContainerResized,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n","import { getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport {\n DefaultValue,\n Persistent,\n persistent,\n PersistentRef,\n PersistentState\n} 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: () => T & ThisType<Reset<T>>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset: T & Partial<BaseReset> = 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): PersistentRef<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 { 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-8adbf51e\"),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 \"../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=8adbf51e&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-8adbf51e\"]])\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);\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=3b196306&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-3b196306\"]])\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 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>(optionsFunc: () => T & ThisType<Bar<T>>): Bar<T> {\n return createLazyProxy(() => {\n const bar: T & Partial<BaseBar> = 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, makePersistent, PersistentState } 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 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: () => T & ThisType<Buyable<T>>\n): Buyable<T> {\n return createLazyProxy(() => {\n const buyable: T & Partial<BaseBuyable> = 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 makePersistent<DecimalSource>(buyable, 0);\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 });\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 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, PersistentRef } 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: PersistentRef<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: PersistentRef<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: () => T & ThisType<Challenge<T>>\n): Challenge<T> {\n return createLazyProxy(() => {\n const challenge: T & Partial<BaseChallenge> = 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 = persistent(0);\n challenge.active = persistent(false);\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 { 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: () => T & ThisType<Hotkey<T>>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey: T & Partial<BaseHotkey> = 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, 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: (() => T) & ThisType<Links<T>>\n): Links<T> {\n return createLazyProxy(() => {\n const links: T & Partial<BaseLinks> = 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=e0d2a130&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=e0d2a130&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-e0d2a130\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\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 { makePersistent, 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: () => T & ThisType<Milestone<T>>\n): Milestone<T> {\n return createLazyProxy(() => {\n const milestone: T & Partial<BaseMilestone> = optionsFunc();\n makePersistent<boolean>(milestone, false);\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 });\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 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>(optionsFunc: () => T & ThisType<Tab<T>>): Tab<T> {\n return createLazyProxy(() => {\n const tab: T & Partial<BaseTab> = 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=86da8746&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=86da8746&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-86da8746\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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, makePersistent, PersistentState } 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 tabs: Record<string, TabButtonOptions>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\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 optionsFunc: () => T & ThisType<TabFamily<T>>\n): TabFamily<T> {\n return createLazyProxy(() => {\n const tabFamily: T & Partial<BaseTabFamily> = optionsFunc();\n\n if (Object.keys(tabFamily.tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\", tabFamily);\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n makePersistent<string>(tabFamily, Object.keys(tabFamily.tabs)[0]);\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 for (const tab in tabFamily.tabs) {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabFamily.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 }\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 });\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 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, makePersistent, 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: () => T & ThisType<Upgrade<T>>\n): Upgrade<T> {\n return createLazyProxy(() => {\n const upgrade: T & Partial<BaseUpgrade> = optionsFunc();\n makePersistent<boolean>(upgrade, false);\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 });\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 { createTree, createTreeNode, GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\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 layer = createLayer(() => {\n const id = \"c\";\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 }));\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\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\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 tabs: {\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 style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n }));\n\n const tabs = createTabFamily(() => ({\n tabs: {\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(\n icecreamCap.value\n )}`}\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\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 { createLayer } from \"game/layers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { IParticlesOptions } from \"tsparticles-engine\";\nimport { render, renderRow } from \"util/vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst layer = createLayer(() => {\n const id = \"f\";\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 particles.addEmitter({\n // TODO this case is annoying but required because move.direction is a string rather than keyof MoveDirection\n particles: confetti as unknown as IParticlesOptions,\n autoPlay: true,\n fill: false,\n shape: \"square\",\n startCount: 0,\n life: {\n count: 1,\n duration: 0.1,\n wait: false\n },\n rate: {\n delay: 0,\n quantity: 100\n },\n position: {\n x: (100 * (pos?.clientX ?? 0)) / window.innerWidth,\n y: (100 * (pos?.clientY ?? 0)) / window.innerHeight\n },\n size: {\n width: 0,\n height: 0,\n mode: \"precise\"\n }\n });\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: gain => Decimal.times(gain, c.otherThingy.value)\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\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\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 \"components/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 layer = createLayer(() => {\n const id = \"a\";\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(() => {\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 id: \"main\",\n name: \"Tree\",\n display: jsx(() => (\n <>\n <div v-show={player.devSpeed === 0}>Game Paused</div>\n <div v-show={player.devSpeed && player.devSpeed !== 1}>\n Dev Speed: {format(player.devSpeed || 0)}x\n </div>\n <div v-show={player.offlineTime != undefined}>\n Offline Time: {formatTime(player.offlineTime || 0)}\n </div>\n <div>\n <span v-show={Decimal.lt(points.value, \"1e1000\")}>You have </span>\n <h2>{format(points.value)}</h2>\n <span v-show={Decimal.lt(points.value, \"1e1e6\")}> points</span>\n </div>\n <div v-show={Decimal.gt(pointGain.value, 0)}>({oomps.value})</div>\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 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, PersistentRef } 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 id: string;\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>;\n}\n\nexport interface BaseLayer {\n minimized: PersistentRef<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\"], T[\"id\"]>;\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 function createLayer<T extends LayerOptions>(\n optionsFunc: (() => T) & ThisType<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\n layer.minimized = persistent(false);\n\n Object.assign(layer, optionsFunc.call(layer));\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} 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 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 computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | JSXFunction | \"\"> {\n const comp = shallowRef<Component | JSXFunction | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | JSXFunction | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | JSXFunction | \"\" | null> {\n const comp = shallowRef<Component | JSXFunction | \"\" | 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 };\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 { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode } from \"vue\"\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 }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, 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.top),\n left: _ctx.unref(_ctx.left),\n right: _ctx.unref(_ctx.right),\n bottom: _ctx.unref(_ctx.bottom)\n }]),\n style: _normalizeStyle({\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n })\n }, [\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, ref, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n top: processedPropType<boolean>(Boolean),\n left: processedPropType<boolean>(Boolean),\n right: processedPropType<boolean>(Boolean),\n bottom: processedPropType<boolean>(Boolean),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n force: processedPropType<boolean>(Boolean)\n },\n setup(props) {\n const { display, force } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(force) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n return {\n isHovered,\n isShown,\n comp,\n unref\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=c8952e00&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=c8952e00&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-c8952e00\"]])\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__","export default \"eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiwiaGlkZUNoYWxsZW5nZXMiOmZhbHNlLCJ0aGVtZSI6InBhcGVyIiwic3VidGFicyI6e30sIm1pbmltaXplZCI6e30sIm1vZElEIjoidG10LXgiLCJtb2RWZXJzaW9uIjoiMC4wIiwicG9pbnRzIj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RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9\";","var map = {\n\t\"./safff.txt\": 2736\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7634;","// 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\t// no module.id needed\n\t\t// no module.loaded needed\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// 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};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + chunkId + \"-legacy.\" + \"f9b47cea\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\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); }","var inProgress = {};\nvar dataWebpackPrefix = \"profectus:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// 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__.p = \"\";","// 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__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\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__(2782); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["Themes","defaultTheme","variables","floatingTabs","mergeAdjacent","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","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","startGameLoop","watch","PersistentState","DefaultValue","persistent","defaultValue","ref","makePersistent","state","layer","saveData","features","path","foundPersistent","persistentState","reduce","acc","curr","savedValue","includes","foundPersistentInChild","console","warn","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","error","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","style","color","showGoBack","onClick","goBack","minimized","$event","classes","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","display","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","tabValue","flexGrow","flexShrink","width","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","map","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","options","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","slice","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","element","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","bottom","yoffset","xoffset","right","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","links","ref_for","Nav","Layer","$refs","playAgain","join","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","updateMouse","gameComponent","onMousemove","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","Error","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","add","lt","this","fromDecimal","fromNumber","fromString","man","floor","residue","exponent","fromMantissaExponent","POSITIVE_INFINITY","m","other","times","neg","eq","gte","lte","absmag","signmag","normalize","mantissa","replace","pentationparts","split","heightparts","payload","result","pentate","tetrationparts","tetrate","base","height","powparts","trim","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","bind","ProxyState","ProxyPath","createLazyProxy","objectFunc","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","overrideAmount","_component_TreeNode","_component_Links","row","node","nodeIndex","gatherNodeProps","forceTooltip","leftSideNodes","rightSideNodes","branches","_component_MarkNode","_component_Node","_component_Tooltip","visibility","tooltipToBind","gatherTooltipProps","tooltipDisplay","force","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","inject","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","tooltip","top","onHold","MarkNode","Node","shiftKey","shallowRef","currTooltip","isCoercableComponent","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeObserver","ResizeObserver","updateNodes","NodesInjectionKey","resizeListener","onMounted","resListener","observe","isDirty","getBoundingClientRect","values","validLinks","filter","Link","TreeNode","Links","TreeNodeType","TreeType","createTreeNode","optionsFunc","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","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","currentGain","baseResource","nextAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","scaling","modifyGainAmount","createPolynomialScaling","gain","buyMax","next","roundUpCost","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","_component_Particles","fullscreen","particlesInit","particlesLoaded","fpsLimit","fullScreen","enable","particles","number","emitters","autoPlay","onInit","onContainerResized","Particles","engine","container","updateBounds","ParticlesType","createParticles","containerRef","addEmitter","genericParticles","Promise","resolve","emittersToAdd","removeEmitter","emitter","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","fullWidth","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","direction","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","Challenge","completions","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","ctrlKey","enabled","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","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","processedTabFamily","firstTab","find","tabButton","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","textDecoration","g","h","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","fill","shape","startCount","life","count","duration","wait","rate","delay","quantity","clientX","innerWidth","clientY","innerHeight","size","mode","resetClickable","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","setupLayerModal","openModal","toRaw","showAchievements","oldVersion","on","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","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","isShown","onMouseenter","isHovered","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","webpackContext","req","webpackContextResolve","__webpack_require__","o","code","module","exports","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","__proto__","then","ns","create","def","current","indexOf","getOwnPropertyNames","definition","defineProperty","chunkId","all","promises","u","miniCssF","globalThis","hasOwnProperty","inProgress","dataWebpackPrefix","url","needAttach","scripts","getElementsByTagName","s","getAttribute","charset","timeout","nc","setAttribute","onScriptComplete","onerror","onload","doneFns","head","toStringTag","p","installedChunks","installedChunkData","promise","reject","loadingEnded","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.55e61c21.js b/js/app.55e61c21.js new file mode 100644 index 0000000..31e9f74 --- /dev/null +++ b/js/app.55e61c21.js @@ -0,0 +1,2 @@ +(function(){var e={1037:function(e,o,t){"use strict";t.d(o,{b:function(){return r}});const l={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#eee","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0};var r;(function(e){e["Classic"]="classic",e["Paper"]="paper",e["Nordic"]="nordic",e["Aqua"]="aqua"})(r||(r={})),o["Z"]={classic:l,paper:{...l,variables:{...l.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},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),r=t(9583),n=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[r.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=[],r=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,n.isRef)(a)&&null!==(0,n.isRef)(a)&&(0,n.isRef)(a)[Symbol.for("!")]?(0,n.isRef)(a)[Symbol.for("!")]():!(0,n.isRef)(a))()&&r(a))}))};return r(e),t}(function(e){e[e["Visible"]=0]="Visible",e[e["Hidden"]=1]="Hidden",e[e["None"]=2]="None"})(m||(m={}))},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),r=t(5613),n=t(8111),i=t(4865),a=t(5967),s=t(9266),u=t(3032);const m=(0,n.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(r.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)()),r.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)()||r.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),r.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,3814))).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 s},nY:function(){return u},ax:function(){return m},Mv:function(){return c}});var l=t(7302),r=t(5613),n=t(3273),i=t(3577),a=t(4865);const s=Symbol("PersistentState"),u=Symbol("DefaultValue");function m(e){const o=(0,a.isRef)(e)?e:(0,a.ref)(e);return o[s]=o,o[u]=(0,a.isRef)(e)?e.value:e,o}function c(e,o){const t=e,l=(0,a.ref)(o);t[s]=l,t[u]=(0,a.isRef)(o)?o.value:o}l.globalBus.on("addLayer",((e,o)=>{const t=[],l=(e,m=[])=>{let c=!1;return Object.keys(e).forEach((f=>{const d=e[f];if(d&&"object"===typeof d)if((()=>void 0!==s&&null!==s&&s[Symbol.for("in")]?s[Symbol.for("in")](d):s in d)()){c=!0;const e=m.reduce(((e,o)=>((()=>o in e!==void 0&&o in e!==null&&(o in e)[Symbol.for("!")]?(o in e)[Symbol.for("!")]():!(o in e))()&&(e[o]={}),e[o])),o),t=e[f];e[f]=d[s],(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](null):null!=t)()?e[f].value=t:e[f].value=d[u]}else if((()=>d instanceof r.ZP!==void 0&&d instanceof r.ZP!==null&&(d instanceof r.ZP)[Symbol.for("!")]?(d instanceof r.ZP)[Symbol.for("!")]():!(d instanceof r.ZP))()&&(()=>void 0!==(0,a.isRef)(d)&&null!==(0,a.isRef)(d)&&(0,a.isRef)(d)[Symbol.for("!")]?(0,a.isRef)(d)[Symbol.for("!")]():!(0,a.isRef)(d))()&&(()=>void 0!==t.includes(d)&&null!==t.includes(d)&&t.includes(d)[Symbol.for("!")]?t.includes(d)[Symbol.for("!")]():!t.includes(d))()){"symbol"===typeof d.type&&t.push(d);const o=l(d,[...m,f]);o&&((0,i.kJ)(d)&&(()=>void 0!==(0,i.kJ)(e)&&null!==(0,i.kJ)(e)&&(0,i.kJ)(e)[Symbol.for("!")]?(0,i.kJ)(e)[Symbol.for("!")]():!(0,i.kJ)(e))()?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",(()=>void 0!==n.Le&&null!==n.Le&&n.Le[Symbol.for("in")]?n.Le[Symbol.for("in")](e):n.Le in e)()?e[n.Le]:e,f):c=!0)}})),c};l(e)}))},5967:function(e,o,t){"use strict";t.d(o,{U:function(){return u}});var l=t(5613),r=t(1349),n=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===n.Le||o===n.c4)return e[o];const t=e[n.Le][o];if((()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")]("value"):"value"!==o)()&&(0,r.PO)(t)&&(()=>t instanceof l.ZP!==void 0&&t instanceof l.ZP!==null&&(t instanceof l.ZP)[Symbol.for("!")]?(t instanceof l.ZP)[Symbol.for("!")]():!(t instanceof l.ZP))()){if((()=>void 0!==t&&null!==t&&t[Symbol.for("!==")]?t[Symbol.for("!==")](e[o]?.[n.Le]):t!==e[o]?.[n.Le])()){const l=[...e[n.c4],o];e[o]=new Proxy({[n.Le]:t,[n.c4]:l},m)}return e[o]}return t},set(e,o,t,r){if((()=>void 0!==a.Z.hasNaN&&null!==a.Z.hasNaN&&a.Z.hasNaN[Symbol.for("!")]?a.Z.hasNaN[Symbol.for("!")]():!a.Z.hasNaN)()&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))){const t=e[n.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[n.c4],o],a.Z.NaNReceiver=r,console.error("Attempted to set NaN value",[...e[n.c4],o],e[n.Le]),"Attempted to set NaN value. See above for details"}return e[n.Le][o]=t,!0},ownKeys(e){return Reflect.ownKeys(e[n.Le])},has(e,o){return Reflect.has(e[n.Le],o)},getOwnPropertyDescriptor(e,o){return Object.getOwnPropertyDescriptor(e[n.Le],o)}};o["Z"]=window.player=new Proxy({[n.Le]:s,[n.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),r=t(1037),n=t(7302),i=t(463),a=t(4865);const s=(0,a.reactive)({active:"",saves:[],showTPS:!0,theme:r.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)}n.globalBus.emit("loadSettings",s)}catch{}}(0,a.watch)(s,(e=>localStorage.setItem(l.id,btoa(unescape(encodeURIComponent(JSON.stringify(e)))))),{deep:!0}),o["ZP"]=window.settings=s;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:r.b.Nordic};n.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:[]})},1001:function(e,o,t){"use strict";var l=t(4865),r=t(6113),n=t(1604),i=t(6453),a=t(9365),s=t(5967);function u(e,o,t,r,n,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,n.P5)(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:(0,n.P5)(Number),required:!0},name:{type:(0,n.P5)(String),required:!0},color:(0,n.P5)(String),style:(0,n.P5)(String,Object,Array),classes:(0,n.P5)(Object),minimizable:(0,n.P5)(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:o,index:t,minimized:r,minWidth:a,tab:u}=(0,l.toRefs)(e),m=(0,n.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!==r.value&&null!==r.value&&r.value[Symbol.for("!")]?r.value[Symbol.for("!")]():!r.value)()));function f(){s.Z.tabs.splice((0,l.unref)(e.index),1/0)}(0,l.nextTick)((()=>y(r.value,(0,l.unref)(a.value)))),(0,l.watch)([r,(0,n.o9)(a)],(([e,o])=>y(e,o)));const d=(0,l.ref)(null);function y(e,o){const t=u.value();(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](void 0):void 0!=t)()&&(e?(t.style.flexGrow="0",t.style.flexShrink="0",t.style.width="60px",t.style.minWidth=t.style.flexBasis="",t.style.margin="0"):(t.style.flexGrow="",t.style.flexShrink="",t.style.width="",t.style.minWidth=t.style.flexBasis=`${o}px`,t.style.margin=""))}return(0,l.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-3cbf87a6"]]);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)()))),v=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 g=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);return o({open(){t.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[p])),body:(0,l.withCtx)((()=>[v])),_:1},8,["modelValue"]))}});const S=(0,f.Z)(g,[["__scopeId","data-v-5f8298e6"]]);var N=S,k=t(9266),V=t(5613);const M=e=>((0,l.pushScopeId)("data-v-3eb46986"),e=e(),(0,l.popScopeId)(),e),x={class:"info-modal-header"},w=["src","alt"],C={class:"info-modal-title"},Z={key:0},B={key:0},P={key:0},E=M((()=>(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)()))),I=M((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),T=M((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),F=["href"],R=M((()=>(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),j=M((()=>(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)()))),D=M((()=>(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)()))),O=M((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var _=(0,l.defineComponent)({props:{changelog:null},setup(e,{expose:o}){const t=e,{title:a,logo:u,author:m,discordName:c,discordLink:f,versionNumber:d,versionTitle:y}=i,h=(0,l.toRefs)(t),p=(0,l.ref)(!1),v=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),g=(0,l.computed)((()=>(0,n.MM)((0,r.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.II.map(n.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",x,[(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,w)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",C,[(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,I,(0,l.createElementVNode)("div",{class:"link",onClick:S},"Changelog"),T,(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"},[R,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(c))):" "+(0,l.toDisplayString)((0,l.unref)(c)))(),1)],8,F)):(0,l.createCommentVNode)("",!0)]),j,D,O,(0,l.createElementVNode)("div",null,(()=>"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(v))):"Time Played: "+(0,l.toDisplayString)((0,l.unref)(v)))(),1),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(g))))])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const U=(0,f.Z)(_,[["__scopeId","data-v-3eb46986"]]);var A=U,q=t(1037),z=t(1349),L=t(3525),W=t(9868),G=t(2794);const H=e=>((0,l.pushScopeId)("data-v-c40c38d8"),e=e(),(0,l.popScopeId)(),e),Y=H((()=>(0,l.createElementVNode)("div",{class:"header"},[(0,l.createElementVNode)("h2",null,"Options")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),J=H((()=>(0,l.createElementVNode)("hr",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var $=(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,n.MM)((0,r.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.V$.map(n.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,r.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Offline Production"),(0,l.createVNode)(G.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),v=(0,r.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Autosave"),(0,l.createVNode)(G.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),g=(0,r.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Pause game"),(0,l.createVNode)(G.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)((()=>[Y])),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)(W.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"]),J,(0,l.createVNode)(W.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)(W.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)(W.Z,{title:(0,l.unref)(v),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)(W.Z,{key:0,title:(0,l.unref)(g),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 K=(0,f.Z)($,[["__scopeId","data-v-c40c38d8"]]);var X=K,Q=(t(2801),t(463)),ee=t(4520);const oe={key:0},te=["onClick","disabled"],le={key:0},re=["onClick"];var ne=(0,l.defineComponent)({props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:o}){const t=e,r=(0,l.toRefs)(t),n=(0,l.ref)(!1);function i(){(0,l.unref)(r.skipConfirm)?o("click"):(n.value&&o("click"),n.value=(()=>void 0!==n.value&&null!==n.value&&n.value[Symbol.for("!")]?n.value[Symbol.for("!")]():!n.value)())}function a(){n.value=!1}return(0,l.watch)(n,(e=>{o("confirmingChanged",e)})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:(0,l.normalizeClass)(["container",{confirming:n.value}])},[n.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},[n.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",le,"Yes")):(0,l.renderSlot)(o.$slots,"default",{key:1})],8,te),n.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"button",onClick:(0,l.withModifiers)(a,["stop"])},"No",8,re)):(0,l.createCommentVNode)("",!0)],2))}});const ie=(0,f.Z)(ne,[["__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),r=(0,l.ref)(null);function n(){o("click"),r.value&&clearTimeout(r.value),t.value=!1,(0,l.nextTick)((()=>{t.value=!0,r.value=setTimeout((()=>t.value=!1),500)}))}return(o,r)=>((0,l.openBlock)(),(0,l.createElementBlock)("button",{onClick:(0,l.withModifiers)(n,["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],ve=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"edit",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ge=[ve],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],Me=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"close",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),xe=[Me],we={key:2,class:"details"},Ce={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"},Ie=fe((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Te=(0,l.defineComponent)({props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:o}){const t=e,{save:r}=(0,l.toRefs)(t),n=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=r.value.name||""));const m=(0,l.computed)((()=>r.value&&r.value.id===s.Z.id)),c=(0,l.computed)((()=>m.value?s.Z.time:r.value&&r.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)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.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)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,onClick:t[1]||(t[1]=e=>o("duplicate")),class:"button"},pe)):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==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"},ge)):(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"},xe)])),(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",we,[(0,l.createElementVNode)("button",{class:"button open",onClick:t[6]||(t[6]=e=>o("open"))},[(0,l.createElementVNode)("h3",null,(0,l.toDisplayString)((0,l.unref)(r).name),1)]),(0,l.createElementVNode)("span",Ce,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(r).modVersion)):"v"+(0,l.toDisplayString)((0,l.unref)(r).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)(n).format((0,l.unref)(c)))):"Last played "+(0,l.toDisplayString)((0,l.unref)(n).format((0,l.unref)(c))))(),1)):(0,l.createCommentVNode)("",!0)])):(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&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)(r).id)):" Error: Failed to load save with id "+(0,l.toDisplayString)((0,l.unref)(r).id))(),1),Ie,(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(r).error),1)]))],2))}});const Fe=(0,f.Z)(Te,[["__scopeId","data-v-6a0cf7ac"]]);var Re=Fe,je=t(9980),De=t.n(je);const Oe=e=>((0,l.pushScopeId)("data-v-7d95f59e"),e=e(),(0,l.popScopeId)(),e),_e=Oe((()=>(0,l.createElementVNode)("h2",null,"Saves Manager",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ue={class:"modal-footer"},Ae={class:"field"},qe=Oe((()=>(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"},We=Oe((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Ge=(0,l.defineComponent)({setup(e,{expose:o}){const r=(0,l.ref)(!1),n=(0,l.ref)(null);o({open(){r.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,Q.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)(r,(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,Q.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,Q.a1)();const o={...d.value[e],id:(0,Q.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 v(e){d.value[s.Z.id].time=s.Z.time,(0,Q.a1)(),(0,Q.uW)(d.value[e]),c[e]=void 0}function g(e){const o=JSON.parse(decodeURIComponent(escape(atob(e))));o.id=(0,Q.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,Q.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:r.value,"onUpdate:modelValue":o[4]||(o[4]=e=>r.value=e),ref_key:"modal",ref:n},{header:(0,l.withCtx)((()=>[_e])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(De()),{key:0,list:(0,l.unref)(k.ZP).saves,handle:".handle",itemKey:e=>e},{item:(0,l.withCtx)((({element:e})=>[(0,l.createVNode)(Re,{save:(0,l.unref)(d)[e],onOpen:o=>v(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",Ue,[(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",Ae,[qe,(0,l.createElementVNode)("div",ze,[(0,l.createElementVNode)("button",{class:"button",onClick:o[1]||(o[1]=(...e)=>(0,l.unref)(Q.xM)&&(0,l.unref)(Q.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=>g(e)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,l.createCommentVNode)("",!0)])]),(0,l.createElementVNode)("div",Le,[We,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:o[3]||(o[3]=e=>r.value=!1)}," Close ")])])])),_:1},8,["modelValue"]))}});const He=(0,f.Z)(Ge,[["__scopeId","data-v-7d95f59e"]]);var Ye=He;const Je=e=>((0,l.pushScopeId)("data-v-51b8996d"),e=e(),(0,l.popScopeId)(),e),$e=["src","alt"],Ke={key:1,class:"title"},Xe=Je((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Qe={class:"discord"},eo={class:"discord-links"},oo={key:0},to=["href"],lo=Je((()=>(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=Je((()=>(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)()))),no={href:"https://forums.moddingtree.com/",target:"_blank"},io=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ao=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),so=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),uo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),mo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),co=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),fo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),yo={href:"https://forums.moddingtree.com/",target:"_blank"},bo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ho={class:"discord"},po={class:"discord-links"},vo={key:0},go=["href"],So=Je((()=>(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)()))),No=Je((()=>(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 ko=(0,l.defineComponent)({setup(e){const o=(0,l.ref)(null),t=(0,l.ref)(null),r=(0,l.ref)(null),n=(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,$e)):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ke,(0,l.toDisplayString)((0,l.unref)(u)),1)),(0,l.createElementVNode)("div",{onClick:i[0]||(i[0]=e=>n.value?.open()),class:"version-container"},[(0,l.createVNode)(G.Z,{display:"Changelog",bottom:"",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1})]),Xe,(0,l.createElementVNode)("div",Qe,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",eo,[(()=>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",oo,[(0,l.createElementVNode)("a",{href:(0,l.unref)(c),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(m)),9,to)])):(0,l.createCommentVNode)("",!0),lo,ro])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",no,[(0,l.createVNode)(G.Z,{display:"Forums",bottom:"",yoffset:"5px"},{default:(0,l.withCtx)((()=>[io])),_:1})])]),(0,l.createElementVNode)("div",{onClick:i[1]||(i[1]=e=>o.value?.open())},[(0,l.createVNode)(G.Z,{display:"Info",bottom:"",class:"info"},{default:(0,l.withCtx)((()=>[ao])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[2]||(i[2]=e=>t.value?.open())},[(0,l.createVNode)(G.Z,{display:"Saves",bottom:"",xoffset:"-20px"},{default:(0,l.withCtx)((()=>[so])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[3]||(i[3]=e=>r.value?.open())},[(0,l.createVNode)(G.Z,{display:"Options",bottom:"",xoffset:"-66px"},{default:(0,l.withCtx)((()=>[uo])),_:1})])],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=>n.value?.open()),class:"version-container"},[(0,l.createVNode)(G.Z,{display:"Changelog",right:"",xoffset:"25%",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[5]||(i[5]=e=>t.value?.open())},[(0,l.createVNode)(G.Z,{display:"Saves",right:""},{default:(0,l.withCtx)((()=>[mo])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[6]||(i[6]=e=>r.value?.open())},[(0,l.createVNode)(G.Z,{display:"Options",right:""},{default:(0,l.withCtx)((()=>[co])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[7]||(i[7]=e=>o.value?.open())},[(0,l.createVNode)(G.Z,{display:"Info",right:""},{default:(0,l.withCtx)((()=>[fo])),_:1})]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",yo,[(0,l.createVNode)(G.Z,{display:"Forums",right:"",xoffset:"7px"},{default:(0,l.withCtx)((()=>[bo])),_:1})])]),(0,l.createElementVNode)("div",ho,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",po,[(()=>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,go)])):(0,l.createCommentVNode)("",!0),So,No])])],16)),(0,l.createVNode)(A,{ref_key:"info",ref:o,changelog:n.value},null,8,["changelog"]),(0,l.createVNode)(Ye,{ref_key:"savesManager",ref:t},null,512),(0,l.createVNode)(X,{ref_key:"options",ref:r},null,512),(0,l.createVNode)(N,{ref_key:"changelog",ref:n},null,512)],64))}});const Vo=(0,f.Z)(ko,[["__scopeId","data-v-51b8996d"]]);var Mo=Vo;const xo={class:"inner-tab"},wo={key:1,class:"separator"};var Co=(0,l.defineComponent)({setup(e){const o=(0,l.toRef)(s.Z,"tabs"),t=(0,l.computed)((()=>Object.keys(a.layers))),r=i.useHeader;function n(e){const{display:o,minimized:t,minWidth:l,name:r,color:n,style:i,classes:a,minimizable:s,nodes:u}=e;return{display:o,minimized:t,minWidth:l,name:r,color:n,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)(r)}])},[((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)(r)&&null!==(0,l.unref)(r)&&(0,l.unref)(r)[Symbol.for("!")]?(0,l.unref)(r)[Symbol.for("!")]():!(0,l.unref)(r))()?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",xo,[(0,l.unref)(t).includes(i)?((0,l.openBlock)(),(0,l.createBlock)(y,(0,l.mergeProps)({key:0},n((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 Zo=(0,f.Z)(Co,[["__scopeId","data-v-4fd7697b"]]);var Bo=Zo,Po=t(3814);const Eo=e=>((0,l.pushScopeId)("data-v-06188cc8"),e=e(),(0,l.popScopeId)(),e),Io={class:"game-over-modal-header"},To=["src","alt"],Fo={class:"game-over-modal-title"},Ro=Eo((()=>(0,l.createElementVNode)("h2",null,"Congratulations!",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),jo={key:0},Do=Eo((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Oo=Eo((()=>(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)()))),_o=Eo((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Uo=["href"],Ao=Eo((()=>(0,l.createElementVNode)("span",{class:"material-icons game-over-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var qo=(0,l.defineComponent)({setup(e){const{title:o,logo:t,discordName:r,discordLink:n,versionNumber:a,versionTitle:u}=i,m=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),c=(0,l.computed)((()=>Po.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,Q.uW)((0,Q.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",Io,[(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,To)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Fo,[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",jo,[(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),Do,Oo,_o,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(n),class:"game-over-modal-discord-link"},[Ao,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(r))):" "+(0,l.toDisplayString)((0,l.unref)(r)))(),1)],8,Uo)]),(0,l.createVNode)(W.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 zo=(0,f.Z)(qo,[["__scopeId","data-v-06188cc8"]]);var Lo=zo,Wo=t(3032);const Go=e=>((0,l.pushScopeId)("data-v-5935214c"),e=e(),(0,l.popScopeId)(),e),Ho=Go((()=>(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},Jo=Go((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),$o=["href"],Ko=Go((()=>(0,l.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Xo=Go((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Qo={class:"nan-footer"};var et=(0,l.defineComponent)({setup(e){const{discordName:o,discordLink:t}=i,r=(0,l.toRef)(s.Z,"autosave"),n=(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)(n),"onUpdate:modelValue":s[4]||(s[4]=e=>(0,l.isRef)(n)?n.value=e:null)},e.$attrs),{header:(0,l.withCtx)((()=>[Ho])),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)(r)?"enabled":"disabled")!==void 0&&". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(r)?"enabled":"disabled")!==null&&(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(r)?"enabled":"disabled"))[Symbol.for("+")]?(". Auto-saving has been "+(0,l.toDisplayString)((0,l.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,l.toDisplayString)((0,l.unref)(r)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ")(),1)]),Jo,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(t),class:"nan-modal-discord-link"},[Ko,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(o))):" "+(0,l.toDisplayString)((0,l.unref)(o)))(),1)],8,$o)]),Xo,(0,l.createVNode)(W.Z,{title:"Autosave",modelValue:(0,l.unref)(r),"onUpdate:modelValue":s[0]||(s[0]=e=>(0,l.isRef)(r)?r.value=e:null)},null,8,["modelValue"]),(0,l.unref)(i).enablePausing?((0,l.openBlock)(),(0,l.createBlock)(W.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",Qo,[(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=>n.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)(Ye,{ref_key:"savesManager",ref:a},null,512)],64))}});const ot=(0,f.Z)(et,[["__scopeId","data-v-5935214c"]]);var tt=ot;const lt={key:0,class:"tpsDisplay"},rt={key:0,class:"low"};var nt=(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 r=(0,l.computed)((()=>t.value.reduce(((e,o)=>V.ZP.max(e,o)),0))),n=(0,l.computed)((()=>V.ZP.sub(o.value,r.value).gt(1)));return(e,t)=>(()=>void 0!==(0,l.unref)(o).isNan()&&null!==(0,l.unref)(o).isNan()&&(0,l.unref)(o).isNan()[Symbol.for("!")]?(0,l.unref)(o).isNan()[Symbol.for("!")]():!(0,l.unref)(o).isNan())()?((0,l.openBlock)(),(0,l.createElementBlock)("div",lt,[(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)(n)?((0,l.openBlock)(),(0,l.createElementBlock)("span",rt,(0,l.toDisplayString)((0,l.unref)(V.Ht)((0,l.unref)(r))),1)):(0,l.createCommentVNode)("",!0)])),_:1})])):(0,l.createCommentVNode)("",!0)}});const it=(0,f.Z)(nt,[["__scopeId","data-v-c0663118"]]);var at=it,st=(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,n.MM)((0,r.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[k.t.map(n.sY)]))))));return(e,r)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createElementVNode)("div",{id:"modal-root",style:(0,l.normalizeStyle)((0,l.unref)(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)(Bo),(0,l.unref)((0,l.unref)(a))?((0,l.openBlock)(),(0,l.createBlock)(at,{key:1})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Lo),(0,l.createVNode)(tt),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(s))))],6)],64))}});const ut=(0,f.Z)(st,[["__scopeId","data-v-f13f28b6"]]);var mt=ut;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,Q.zD)();const{globalBus:e,startGameLoop:o}=await t(7302),r=window.vue=(0,l.createApp)(mt);e.emit("setupVue",r),r.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 U},exponentialFormat:function(){return q},format:function(){return ee},formatSmall:function(){return re},formatTime:function(){return te},formatWhole:function(){return oe},invertOOM:function(){return ne},regularFormat:function(){return L},toPlaces:function(){return le}});var r=t(2482);t(1703);let n,i,a,s,u,m,c,f,d,y,b;const h=17,p=9e15,v=Math.log10(9e15),g=(()=>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,M=!1,x=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)()]}}(),w=[2,Math.E,3,4,5,6,7,8,9,10],C=[[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 O.fromValue_noAlloc(e)},P=function(e,o,t){return O.fromComponents(e,o,t)},E=function(e,o,t){return O.fromComponents_noNormalize(e,o,t)},I=function(e,o){const t=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),l=Math.ceil(Math.log10(Math.abs(e))),r=(()=>void 0!==Math.round(e*Math.pow(10,t-l))&&null!==Math.round(e*Math.pow(10,t-l))&&Math.round(e*Math.pow(10,t-l))[Symbol.for("*")]?Math.round(e*Math.pow(10,t-l))[Symbol.for("*")](Math.pow(10,l-t)):Math.round(e*Math.pow(10,t-l))*Math.pow(10,l-t))();return parseFloat(r.toFixed(Math.max((()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](l):t-l)(),0)))},T=function(e){return(()=>void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e)))()},F=function(e){if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))())return e;if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50)())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let o=1;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)())o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](e):o*e)(),(()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})();e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)();let t=.9189385332046727;t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]((e+.5)*Math.log(e)):t+(e+.5)*Math.log(e))(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();const l=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let r=e;return t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(12*r)):t+1/(12*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(360*r)):t+1/(360*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1260*r)):t+1/(1260*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1680*r)):t+1/(1680*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1188*r)):t+1/(1188*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](691/(360360*r)):t+691/(360360*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](7/(1092*r)):t+7/(1092*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](3617/(122400*r)):t+3617/(122400*r))(),(()=>void 0!==Math.exp(t)&&null!==Math.exp(t)&&Math.exp(t)[Symbol.for("/")]?Math.exp(t)[Symbol.for("/")](o):Math.exp(t)/o)()},R=.5671432904097838,j=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 R;t=(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)()?0:(()=>void 0!==Math.log(e)&&null!==Math.log(e)&&Math.log(e)[Symbol.for("-")]?Math.log(e)[Symbol.for("-")](Math.log(Math.log(e))):Math.log(e)-Math.log(Math.log(e)))();for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](100):r<100)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(l=(()=>e*Math.exp(-t)+t*t!==void 0&&e*Math.exp(-t)+t*t!==null&&(e*Math.exp(-t)+t*t)[Symbol.for("/")]?(e*Math.exp(-t)+t*t)[Symbol.for("/")](t+1):(e*Math.exp(-t)+t*t)/(t+1))(),(()=>void 0!==Math.abs(l-t)&&null!==Math.abs(l-t)&&Math.abs(l-t)[Symbol.for("<")]?Math.abs(l-t)[Symbol.for("<")](o*Math.abs(l)):Math.abs(l-t)<o*Math.abs(l))())return l;t=l}throw Error(`Iteration failed to converge: ${e.toString()}`)};function D(e,o=1e-10){let t,l,r,n;if((()=>void 0!==Number.isFinite(e.mag)&&null!==Number.isFinite(e.mag)&&Number.isFinite(e.mag)[Symbol.for("!")]?Number.isFinite(e.mag)[Symbol.for("!")]():!Number.isFinite(e.mag))())return e;if(e===O.dZero)return e;if(e===O.dOne)return B(R);O.abs(e);t=O.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=O.exp((()=>void 0!==t&&null!==t&&t[Symbol.for("minus")]?t[Symbol.for("minus")]():-t)()),r=t.sub(e.mul(l)),n=t.sub(r.div(t.add(1).sub(t.add(2).mul(r).div(O.mul(2,t).add(2))))),O.abs(n.sub(t)).lt(O.abs(n).mul(o)))return n;t=n}throw Error(`Iteration failed to converge: ${e.toString()}`)}n=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 O{constructor(e){(0,r.Z)(this,"sign",Number.NaN),(0,r.Z)(this,"mag",Number.NaN),(0,r.Z)(this,"layer",Number.NaN),e instanceof O||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(0===this.sign)return 0;if(0===this.layer){const e=Math.floor(Math.log10(this.mag));let o;return o=5e-324===this.mag?5:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("/")]?this.mag[Symbol.for("/")](x(e)):this.mag/x(e))(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o):this.sign*o)()}if(1===this.layer){const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](Math.floor(this.mag)):this.mag-Math.floor(this.mag))();return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,e)):this.sign*Math.pow(10,e))()}return this.sign}set m(e){(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](2):this.layer<=2)()?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent))}get e(){return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor((()=>void 0!==Math.sign(this.mag)&&null!==Math.sign(this.mag)&&Math.sign(this.mag)[Symbol.for("*")]?Math.sign(this.mag)[Symbol.for("*")](Math.pow(10,Math.abs(this.mag))):Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag)))()):(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("*")]?this.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):this.mag*Number.POSITIVE_INFINITY)()}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,o,t){return(new O).fromComponents(e,o,t)}static fromComponents_noNormalize(e,o,t){return(new O).fromComponents_noNormalize(e,o,t)}static fromMantissaExponent(e,o){return(new O).fromMantissaExponent(e,o)}static fromMantissaExponent_noNormalize(e,o){return(new O).fromMantissaExponent_noNormalize(e,o)}static fromDecimal(e){return(new O).fromDecimal(e)}static fromNumber(e){return(new O).fromNumber(e)}static fromString(e){return(new O).fromString(e)}static fromValue(e){return(new O).fromValue(e)}static fromValue_noAlloc(e){return e instanceof O?e:new O(e)}static abs(e){return 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 r=Math.pow(10,l);return(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(r=Math.trunc(r)),P(o,t,r)}static affordGeometricSeries_core(e,o,t,l){const r=o.mul(t.pow(l));return O.floor(e.div(r).mul(t.sub(1)).add(1).log10().div(t.log10()))}static sumGeometricSeries_core(e,o,t,l){return o.mul(t.pow(l)).mul(O.sub(1,t.pow(e))).div(O.sub(1,t))}static affordArithmeticSeries_core(e,o,t,l){const r=o.add(l.mul(t)),n=r.sub(t.div(2)),i=n.pow(2);return n.neg().add(i.add(t.mul(e).mul(2)).sqrt()).div(t).floor()}static sumArithmeticSeries_core(e,o,t,l){const r=o.add(l.mul(t));return e.div(2).mul(r.mul(2).plus(e.sub(1).mul(t)))}static efficiencyOfPurchase_core(e,o,t){return e.div(o).add(e.div(t))}[n](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("<")](g):this.mag<g)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),o=Math.sign(this.mag);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](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("<")](v):e<v)()&&(()=>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(",",""):M&&(e=e.replace(",","."));const o=e.split("^^^");if(2===o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";");let r=1;if(2===l.length&&(r=parseFloat(l[1]),(()=>void 0!==isFinite(r)&&null!==isFinite(r)&&isFinite(r)[Symbol.for("!")]?isFinite(r)[Symbol.for("!")]():!isFinite(r))()&&(r=1)),isFinite(e)&&isFinite(t)){const o=O.pentate(e,t,r);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const t=e.split("^^");if(2===t.length){const e=parseFloat(t[0]),o=parseFloat(t[1]),l=t[1].split(";");let r=1;if(2===l.length&&(r=parseFloat(l[1]),(()=>void 0!==isFinite(r)&&null!==isFinite(r)&&isFinite(r)[Symbol.for("!")]?isFinite(r)[Symbol.for("!")]():!isFinite(r))()&&(r=1)),isFinite(e)&&isFinite(o)){const t=O.tetrate(e,o,r);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}const l=e.split("^");if(2===l.length){const e=parseFloat(l[0]),o=parseFloat(l[1]);if(isFinite(e)&&isFinite(o)){const t=O.pow(e,o);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}let r,n;e=e.trim().toLowerCase();let i=e.split("pt");if(2===i.length){r=10,n=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(r)&&isFinite(n)){const o=O.tetrate(r,n,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}if(i=e.split("p"),2===i.length){r=10,n=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(r)&&isFinite(n)){const o=O.tetrate(r,n,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("+")](T(e)):c+T(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=O.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 O||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return(()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()?Number.NaN:0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)():1===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,this.mag)):this.sign*Math.pow(10,this.mag))():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](0):this.sign>0)()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:0===this.m?0:I(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:I(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?1===this.sign?"Infinity":"-Infinity":0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toString():(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():1===this.layer?(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](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):(()=>I(this.m,e)+"e"!==void 0&&I(this.m,e)+"e"!==null&&(I(this.m,e)+"e")[Symbol.for("+")]?(I(this.m,e)+"e")[Symbol.for("+")](I(this.e,e)):I(this.m,e)+"e"+I(this.e,e))():1===this.layer?(()=>I(this.m,e)+"e"!==void 0&&I(this.m,e)+"e"!==null&&(I(this.m,e)+"e")[Symbol.for("+")]?(I(this.m,e)+"e")[Symbol.for("+")](I(this.e,e)):I(this.m,e)+"e"+I(this.e,e))():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](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("+")](I(this.mag,e)):(-1===this.sign?"-":"")+"e".repeat(this.layer)+I(this.mag,e))():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](I(this.mag,e)):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+I(this.mag,e))()}abs(){return 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)()?O.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)()?O.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)()?O.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)()?O.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!==O.cmpabs(this,o)&&null!==O.cmpabs(this,o)&&O.cmpabs(this,o)[Symbol.for(">")]?O.cmpabs(this,o)[Symbol.for(">")](0):O.cmpabs(this,o)>0)()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return 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 r=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("*")]?t.layer[Symbol.for("*")](Math.sign(t.mag)):t.layer*Math.sign(t.mag))(),n=(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("*")]?l.layer[Symbol.for("*")](Math.sign(l.mag)):l.layer*Math.sign(l.mag))();if((()=>r-n!==void 0&&r-n!==null&&(r-n)[Symbol.for(">=")]?(r-n)[Symbol.for(">=")](2):r-n>=2)())return t;if(0===r&&n===(()=>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===r&&0===n){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?O.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,r=t.mag;return(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](t.layer):this.layer>t.layer)()&&(r=T(r)),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<")]?this.layer[Symbol.for("<")](t.layer):this.layer<t.layer)()&&(l=T(l)),(()=>void 0!==Math.abs(l-r)&&null!==Math.abs(l-r)&&Math.abs(l-r)[Symbol.for("<=")]?Math.abs(l-r)[Symbol.for("<=")](o*Math.max(Math.abs(l),Math.abs(r))):Math.abs(l-r)<=o*Math.max(Math.abs(l),Math.abs(r)))()}equals_tolerance(e,o){return this.eq_tolerance(e,o)}neq_tolerance(e,o){return(()=>void 0!==this.eq_tolerance(e,o)&&null!==this.eq_tolerance(e,o)&&this.eq_tolerance(e,o)[Symbol.for("!")]?this.eq_tolerance(e,o)[Symbol.for("!")]():!this.eq_tolerance(e,o))()}notEquals_tolerance(e,o){return this.neq_tolerance(e,o)}lt_tolerance(e,o){const t=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(O.dZero)?O.dZero:this.log10()}absLog10(){return 0===this.sign?O.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?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)()?O.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?O.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))()):O.div(this.log10(),e.log10())}log2(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?O.dNaN:0===this.layer?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)()?O.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 r=t.absLog10().mul(l).pow10();return this.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()?1===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?r.neg():0===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?r:O.dNaN:r}pow10(){if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()||(()=>void 0!==Number.isFinite(this.mag)&&null!==Number.isFinite(this.mag)&&Number.isFinite(this.mag)[Symbol.for("!")]?Number.isFinite(this.mag)[Symbol.for("!")]():!Number.isFinite(this.mag))())return O.dNaN;let e=this;if(0===e.layer){const o=Math.pow(10,(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)());if(Number.isFinite(o)&&(()=>void 0!==Math.abs(o)&&null!==Math.abs(o)&&Math.abs(o)[Symbol.for(">=")]?Math.abs(o)[Symbol.for(">=")](.1):Math.abs(o)>=.1)())return P(1,0,o);if(0===e.sign)return O.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)()):O.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?O.exp(O.mul(this,O.ln(this).sub(1))):O.exp(this)}gamma(){if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return this.recip();if(0===this.layer){if(this.lt(E(1,0,24)))return B(F((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](1):this.mag-1)();let o=.9189385332046727;o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e))(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e)();const t=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let l=e,r=(()=>12[Symbol.for("*")]?12[Symbol.for("*")](l):12*l)(),n=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)(),i=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](n):o+n)();if(i===o)return O.exp(o);if(o=i,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),r=(()=>360[Symbol.for("*")]?360[Symbol.for("*")](l):360*l)(),n=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)(),i=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](n):o-n)(),i===o)return O.exp(o);o=i,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),r=(()=>1260[Symbol.for("*")]?1260[Symbol.for("*")](l):1260*l)();let a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)();return o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](a):o+a)(),l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),r=(()=>1680[Symbol.for("*")]?1680[Symbol.for("*")](l):1680*l)(),a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](a):o-a)(),O.exp(o)}return 1===this.layer?O.exp(O.mul(this,O.ln(this).sub(1))):O.exp(this)}lngamma(){return this.gamma().ln()}exp(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dOne:0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<=")]?this.mag[Symbol.for("<=")](709.7):this.mag<=709.7)()?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=O.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 O.pow(this,o);if(0===e)return new O(o);if(this.eq(O.dOne))return O.dOne;if(this.eq((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))return O.pow(this,o);if(e===Number.POSITIVE_INFINITY){const e=this.toNumber();if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](1.444667861009766):e<=1.444667861009766)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](.06598803584531254):e>=.06598803584531254)()){if((()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009099):e>1.444667861009099)())return new O(Math.E);const o=O.ln(this).neg();return o.lambertw().div(o)}return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009766):e>1.444667861009766)()?new O(Number.POSITIVE_INFINITY):O.dNaN}if(this.eq(O.dZero)){let o=Math.abs((()=>e+1!==void 0&&e+1!==null&&(e+1)[Symbol.for("%")]?(e+1)[Symbol.for("%")](2):(e+1)%2)());return(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](1):o>1)()&&(o=(()=>2[Symbol.for("-")]?2[Symbol.for("-")](o):2-o)()),new O(o)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](0):e<0)())return O.iteratedlog(o,this,(()=>void 0!==e&&null!==e&&e[Symbol.for("minus")]?e[Symbol.for("minus")]():-e)());o=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(O.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let t=0;(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](e):t<e)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("prefix-increment")]?t[Symbol.for("prefix-increment")]():++t)()){const e=o;if(o=this.pow(o),e.eq(o))return o}if((()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](0):0!=l)()){const e=this.pow(o);return o.mul((()=>1[Symbol.for("-")]?1[Symbol.for("-")](l):1-l)()).add(e.mul(l))}return o}(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(O.dOne)?this.gt(10)?o=this.pow(l):(o=B(O.tetrate_critical(this.toNumber(),l)),this.lt(2)&&(o=o.sub(1).mul(this.minus(1)).plus(1))):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](e):r<e)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(o=this.pow(o),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>o.layer-this.layer!==void 0&&o.layer-this.layer!==null&&(o.layer-this.layer)[Symbol.for(">")]?(o.layer-this.layer)[Symbol.for(">")](3):o.layer-this.layer>3)())return E(o.sign,(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](e-r-1):o.layer+(e-r-1))(),o.mag);if((()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](1e4):r>1e4)())return o}return o}iteratedexp(e=2,o=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 O.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 r=(()=>void 0!==l&&null!==l&&l[Symbol.for("-")]?l[Symbol.for("-")](o):l-o)();if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=Math.min(o,(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](l):o-l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](o):n<o)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){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!==n&&null!==n&&n[Symbol.for(">")]?n[Symbol.for(">")](1e4):n>1e4)())return t}return(()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](0):r>0)()&&(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](1):r<1)()&&(t=e.eq(10)?t.layeradd10((()=>void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r)()):t.layeradd((()=>void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r)(),e)),t}slog(e=10){if(e=B(e),e.lte(O.dZero))return O.dNaN;if(e.eq(O.dOne))return O.dNaN;if(e.lt(O.dOne))return this.eq(O.dOne)?O.dZero:this.eq(O.dZero)?O.dNegOne:O.dNaN;if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||this.eq(O.dZero))return O.dNegOne;let o=0,t=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(O.dZero))t=O.pow(e,t),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)();else{if(t.lte(O.dOne))return B((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](O.slog_critical(e.toNumber(),t.toNumber())):o+O.slog_critical(e.toNumber(),t.toNumber()))());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),t=O.log(t,e)}return 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)():O.critical_section(e,o,Z)}static tetrate_critical(e,o){return O.critical_section(e,o,C)}static critical_section(e,o,t){o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](10):10*o)(),(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)()&&(o=0),(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](10):o>10)()&&(o=10),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](2):e<2)()&&(e=2),(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()&&(e=10);let l=0,r=0;for(let a=0;(()=>void 0!==a&&null!==a&&a[Symbol.for("<")]?a[Symbol.for("<")](w.length):a<w.length)();(()=>void 0!==a&&null!==a&&"object"===typeof a&&a[Symbol.for("prefix-increment")]?a[Symbol.for("prefix-increment")]():++a)()){if((()=>void 0!==w[a]&&null!==w[a]&&w[a][Symbol.for("==")]?w[a][Symbol.for("==")](e):w[a]==e)()){l=t[a][Math.floor(o)],r=t[a][Math.ceil(o)];break}if((()=>void 0!==w[a]&&null!==w[a]&&w[a][Symbol.for("<")]?w[a][Symbol.for("<")](e):w[a]<e)()&&(()=>void 0!==w[a+1]&&null!==w[a+1]&&w[a+1][Symbol.for(">")]?w[a+1][Symbol.for(">")](e):w[a+1]>e)()){const n=(()=>e-w[a]!==void 0&&e-w[a]!==null&&(e-w[a])[Symbol.for("/")]?(e-w[a])[Symbol.for("/")](w[a+1]-w[a]):(e-w[a])/(w[a+1]-w[a]))();l=(()=>t[a][Math.floor(o)]*(1-n)!==void 0&&t[a][Math.floor(o)]*(1-n)!==null&&(t[a][Math.floor(o)]*(1-n))[Symbol.for("+")]?(t[a][Math.floor(o)]*(1-n))[Symbol.for("+")](t[a+1][Math.floor(o)]*n):t[a][Math.floor(o)]*(1-n)+t[a+1][Math.floor(o)]*n)(),r=(()=>t[a][Math.ceil(o)]*(1-n)!==void 0&&t[a][Math.ceil(o)]*(1-n)!==null&&(t[a][Math.ceil(o)]*(1-n))[Symbol.for("+")]?(t[a][Math.ceil(o)]*(1-n))[Symbol.for("+")](t[a+1][Math.ceil(o)]*n):t[a][Math.ceil(o)]*(1-n)+t[a+1][Math.ceil(o)]*n)();break}}const n=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](Math.floor(o)):o-Math.floor(o))(),i=(()=>l*(1-n)!==void 0&&l*(1-n)!==null&&(l*(1-n))[Symbol.for("+")]?(l*(1-n))[Symbol.for("+")](r*n):l*(1-n)+r*n)();return i}layeradd10(e){e=O.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)()?O.tetrate(o,l):(()=>void 0!==Number.isFinite(l)&&null!==Number.isFinite(l)&&Number.isFinite(l)[Symbol.for("!")]?Number.isFinite(l)[Symbol.for("!")]():!Number.isFinite(l))()?O.dNaN:(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](-1):l>=-1)()?O.log(O.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](1):l+1)()),o):O.log(O.log(O.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](2):l+2)()),o),o)}lambertw(){if(this.lt((()=>.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499)()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return B(j(this.toNumber()));if(0===this.layer)return B(j((()=>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 D(this);if(2===this.layer)return D(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(O.dOne)?((()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})(),o=new O(l)):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](e):r<e)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(o=this.tetrate(o.toNumber()),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](10):r>10)())return o}return o}sin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?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)()?O.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 O.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return O.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?E(Number.NaN,Number.NaN,Number.NaN):O.ln(this.add(1).div(B(1).sub(this))).div(2)}ascensionPenalty(e){return 0===e?this:this.root(O.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](1):this.cmp(e)<1)()}lessThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](0):this.cmp(e)<0)()}greaterThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](-1):this.cmp(e)>-1)()}greaterThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](0):this.cmp(e)>0)()}}(0,r.Z)(O,"dZero",E(0,0,0)),(0,r.Z)(O,"dOne",E(1,0,1)),(0,r.Z)(O,"dNegOne",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),0,1)),(0,r.Z)(O,"dTwo",E(1,0,2)),(0,r.Z)(O,"dTen",E(1,0,10)),(0,r.Z)(O,"dNaN",E(Number.NaN,Number.NaN,Number.NaN)),(0,r.Z)(O,"dInf",E(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,r.Z)(O,"dNegInf",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,r.Z)(O,"dNumberMax",P(1,0,Number.MAX_VALUE)),(0,r.Z)(O,"dNumberMin",P(1,0,Number.MIN_VALUE));var _=t(6453),U=O;const A=new O(1);function q(e,o,t=!0){let l=O.log10(e).floor(),r=O.div(e,O.pow(10,l));"10"===r.toStringWithDecimalPlaces(o)&&(r=A,l=l.add(1));const n=l.gte(1e9)?ee(l,Math.max(Math.max(o,3),_.defaultDecimalsShown)):l.gte(1e4)?z(l,0):l.toStringWithDecimalPlaces(0);return t?(()=>r.toStringWithDecimalPlaces(o)+"e"!==void 0&&r.toStringWithDecimalPlaces(o)+"e"!==null&&(r.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")]?(r.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")](n):r.toStringWithDecimalPlaces(o)+"e"+n)():(()=>"e"[Symbol.for("+")]?"e"[Symbol.for("+")](n):"e"+n)()}function z(e,o){if(null===e||void 0===e)return"NaN";if(e=new O(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 O(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),_.defaultDecimalsShown)),e.toStringWithDecimalPlaces(o)))}const W=new O("eeee1000"),G=new O("e100000"),H=new O("e1000"),Y=new O(1e9),J=new O(1e6),$=new O(1e3),K=new O(.98),X=new O(.001),Q=new O(0);function ee(e,o,t){if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=_.defaultDecimalsShown),t=t??_.defaultShowSmall,e=new O(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(W)){const o=e.slog();return o.gte(J)?(()=>"F"[Symbol.for("+")]?"F"[Symbol.for("+")](ee(o.floor())):"F"+ee(o.floor()))():(()=>O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](z(o.floor(),0)):O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"+z(o.floor(),0))()}if(e.gte(G))return q(e,0,!1);if(e.gte(H))return q(e,0);if(e.gte(Y))return q(e,o);if(e.gte($))return z(e,0);if(e.gte(X)||(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)())return L(e,o);if(e.eq(Q))return(0).toFixed(o);if(e=ne(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 O(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(Y)||e.lte(K)&&(()=>void 0!==e.eq(Q)&&null!==e.eq(Q)&&e.eq(Q)[Symbol.for("!")]?e.eq(Q)[Symbol.for("!")]():!e.eq(Q))()?ee(e):ee(e,0)}function te(e){return O.lt(e,0)?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](te(O.neg(e))):"-"+te(O.neg(e)))():O.gt(e,(()=>2[Symbol.for("**")]?2[Symbol.for("**")](51):2**51)())?(()=>void 0!==ee(O.div(e,31536e3))&&null!==ee(O.div(e,31536e3))&&ee(O.div(e,31536e3))[Symbol.for("+")]?ee(O.div(e,31536e3))[Symbol.for("+")]("y"):ee(O.div(e,31536e3))+"y")():(e=new O(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 O(e);let l=e.toStringWithDecimalPlaces(o);return new O(l).gte(t)&&(l=O.sub(t,Math.pow(.1,o)).toStringWithDecimalPlaces(o)),l}function re(e,o){return ee(e,o,!0)}function ne(e){let o=O.log10(e).ceil();const t=O.div(e,O.pow(10,o));return o=o.neg(),e=new O(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=U,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=U},1349:function(e,o,t){"use strict";function l(e){let o=e.replace(/([A-Z])/g," $1");return o=(()=>void 0!==o.charAt(0).toUpperCase()&&null!==o.charAt(0).toUpperCase()&&o.charAt(0).toUpperCase()[Symbol.for("+")]?o.charAt(0).toUpperCase()[Symbol.for("+")](o.slice(1)):o.charAt(0).toUpperCase()+o.slice(1))(),o}function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function n(e){return"function"===typeof e}t.d(o,{IJ:function(){return l},PO:function(){return r},mf:function(){return n}})},9583:function(e,o,t){"use strict";t.d(o,{mM:function(){return n},yB:function(){return i},UI:function(){return a}});var l=t(4865),r=t(1349);const n=Symbol("DoNotCache");function i(e,o){const t=e[o];(0,r.mf)(t)&&0===t.length&&(()=>void 0!==t[n]&&null!==t[n]&&t[n][Symbol.for("!")]?t[n][Symbol.for("!")]():!t[n])()&&(e[o]=(0,l.computed)(t.bind(e)))}function a(e){return(0,r.mf)(e)&&(()=>void 0!==e[n]&&null!==e[n]&&e[n][Symbol.for("!")]?e[n][Symbol.for("!")]():!e[n])()&&(e=(0,l.computed)(e)),e}},3273:function(e,o,t){"use strict";t.d(o,{Le:function(){return l},c4:function(){return r},z2:function(){return n}});const l=Symbol("ProxyState"),r=Symbol("ProxyPath");function n(e){const o={};let t=!1;function r(){return(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)()&&(Object.assign(o,e()),t=!0),o}return new Proxy(o,{get(e,o){return o===l?r():r()[o]},set(){return console.error("Layers and features are shallow readonly"),!1},has(e,o){return o===l||Reflect.has(r(),o)},ownKeys(){return Reflect.ownKeys(r())},getOwnPropertyDescriptor(l,r){return(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)()&&(Object.assign(o,e()),t=!0),Object.getOwnPropertyDescriptor(l,r)}})}},463:function(e,o,t){"use strict";t.d(o,{a1:function(){return 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),r=t(5967),n=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,r.U)(r.Z[i.Le]))));return localStorage.setItem(r.Z.id,e),e}async function u(){(0,n.ri)();try{const e=localStorage.getItem(n.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=n.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,r.U)(o))))),n.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,3814));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(r.Z,e),n.ZP.active=r.Z.id}setInterval((()=>{r.Z.autosave&&s()}),1e3),window.onbeforeunload=()=>{r.Z.autosave&&s()},window.save=s;const d=window.hardReset=async()=>{await f(m())}},3814:function(e,o,t){"use strict";t.r(o),t.d(o,{fixOldSave:function(){return il},getInitialLayers:function(){return rl},hasWon:function(){return nl},main:function(){return ll}});var l=t(4865);const r=e=>((0,l.pushScopeId)("data-v-07150322"),e=e(),(0,l.popScopeId)(),e),n=r((()=>(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)((()=>[n])),_: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 v(e,o="points",t=0,r){const n=(0,l.isRef)(e)?e:(0,p.ax)(e);return n.displayName=o,n.precision=t,n.small=r,n}function g(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),r=(0,l.ref)(0),n=(0,l.ref)(0);h.globalBus.on("update",(o=>{if(r.value=0,b.ZP.lte(e.value,k))return void(n.value=e.value);let l=e.value,i=n.value;if(n.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),r.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!==r.value&&null!==r.value&&r.value[Symbol.for("<=")]?r.value[Symbol.for("<=")](5):r.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!==r.value&&null!==r.value&&"object"===typeof r.value&&r.value[Symbol.for("postfix-increment")]?r.value[Symbol.for("postfix-increment")]():r.value++})()}));const i=(0,l.computed)((()=>0===r.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"+(r.value<0?"^OOM":"^"+r.value)!==void 0&&(0,b.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)!==null&&((0,b.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value))[Symbol.for("+")]?((0,b.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value))[Symbol.for("+")]("s/sec"):(0,b.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")()));return i}function M(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)}const x={key:0,class:"left-side-nodes"},w={key:1,class:"side-nodes"};function C(e,o,t,r,n,i){const a=(0,l.resolveComponent)("TreeNode"),s=(0,l.resolveComponent)("Links");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.nodes),((o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",(0,l.mergeProps)({class:"row",key:t},e.$attrs),[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(o,((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip}),null,16,["force-tooltip"])))),128))],16)))),128)),e.unref(e.leftSideNodes)?((0,l.openBlock)(),(0,l.createElementBlock)("span",x,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.leftSideNodes),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip,small:""}),null,16,["force-tooltip"])))),128))])):(0,l.createCommentVNode)("",!0),e.unref(e.rightSideNodes)?((0,l.openBlock)(),(0,l.createElementBlock)("span",w,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.rightSideNodes),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip,small:""}),null,16,["force-tooltip"])))),128))])):(0,l.createCommentVNode)("",!0),e.branches?((0,l.openBlock)(),(0,l.createBlock)(s,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,l.createCommentVNode)("",!0)],64)}var Z=t(1604);function B(e,o,t,r,n,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node"),u=(0,l.resolveComponent)("Tooltip");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createBlock)(u,(0,l.mergeProps)({key:0},e.tooltipToBind&&e.gatherTooltipProps(e.tooltipToBind),{display:e.tooltipDisplay,force:e.forceTooltip,style:{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},class:{treeNode:!0,can:e.unref(e.canClick),small:e.unref(e.small),...e.unref(e.classes)}}),{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",{onClick:o[0]||(o[0]=(...o)=>e.click&&e.click(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},e.unref(e.style)??[]])},[((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"])])),_:1},16,["display","force","style","class"])):(0,l.createCommentVNode)("",!0)}var P=t(9365),E=(0,l.defineComponent)({props:{id:null},setup(e){const o=e,t=(0,l.toRefs)(o),r=(0,l.inject)(P.RegisterNodeInjectionKey),n=(0,l.inject)(P.UnregisterNodeInjectionKey),i=(0,l.ref)(null),a=(0,l.computed)((()=>i.value&&i.value.parentElement));return r&&n&&((0,l.watch)([a,t.id],(([e,o],[t,i])=>{t&&n((0,l.unref)(i)),e&&r(o,e)})),(0,l.onUnmounted)((()=>n((0,l.unref)(t.id))))),(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"node",ref_key:"node",ref:i},null,512))}});const I=(0,a.Z)(E,[["__scopeId","data-v-63ded336"]]);var T=I;const F={key:0},R={key:0,class:"mark star"},j=["src"];var D=(0,l.defineComponent)({props:{mark:{type:[Boolean,String]}},setup(e){return(o,t)=>e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",F,[!0===e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",R)):((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,j))])):(0,l.createCommentVNode)("",!0)}});const O=(0,a.Z)(D,[["__scopeId","data-v-c476c56a"]]);var _=O,U=t(2794);function A(e){const{display:o,top:t,left:l,right:r,bottom:n,xoffset:i,yoffset:a,force:s}=e;return{display:o,top:t,left:l,right:r,bottom:n,xoffset:i,yoffset:a,force:s}}var q=(0,l.defineComponent)({props:{display:(0,Z.P5)(Object,String,Function),visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),tooltip:(0,Z.P5)(Object,String,Function),onClick:Function,onHold:Function,color:(0,Z.P5)(String),glowColor:(0,Z.P5)(String),forceTooltip:{type:Object,required:!0},canClick:{type:(0,Z.P5)(Boolean),required:!0},mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0},small:(0,Z.P5)(Boolean)},components:{Tooltip:U.Z,MarkNode:_,Node:T},setup(e){const{tooltip:o,forceTooltip:t,onClick:r,onHold:n,display:i}=(0,l.toRefs)(e);function a(e){e.shiftKey&&o?t.value=(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)():(0,l.unref)(r)?.()}const s=(0,Z.KO)(i),u=(0,l.shallowRef)(void 0);(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);"object"===typeof e&&(()=>void 0!==(0,Z.RU)(e)&&null!==(0,Z.RU)(e)&&(0,Z.RU)(e)[Symbol.for("!")]?(0,Z.RU)(e)[Symbol.for("!")]():!(0,Z.RU)(e))()?u.value=e.display:u.value=e}));const m=(0,l.computed)((()=>{const e=(0,Z.Uv)(o);return"object"===typeof e&&(()=>void 0!==(0,Z.RU)(e)&&null!==(0,Z.RU)(e)&&(0,Z.RU)(e)[Symbol.for("!")]?(0,Z.RU)(e)[Symbol.for("!")]():!(0,Z.RU)(e))()?e:null})),{start:c,stop:f}=(0,Z.ix)(r,n);return{click:a,start:c,stop:f,comp:s,tooltipDisplay:u,tooltipToBind:m,unref:l.unref,Visibility:y.EE,gatherTooltipProps:A,isCoercableComponent:Z.RU}}});const z=(0,a.Z)(q,[["render",B],["__scopeId","data-v-82704be4"]]);var L=z;const W=["x1","y1","x2","y2"];var G=(0,l.defineComponent)({props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const o=e,t=(0,l.toRefs)(o),r=(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})),n=(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)(r).x,y1:(0,l.unref)(r).y,x2:(0,l.unref)(n).x,y2:(0,l.unref)(n).y}),null,16,W))}});const H=G;var Y=H,J=(0,l.defineComponent)({props:{links:null},setup(e){const o=e,t=(0,l.toRef)(o,"links"),r=new ResizeObserver(u),n=(0,l.inject)(P.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)()&&r.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(n.value).forEach((e=>e.rect=e.element.getBoundingClientRect())),a=!0})))}const m=(0,l.computed)((()=>{const e=n.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)(Y,{key:o,link:e,boundingRect:(0,l.unref)(s),startNode:(0,l.unref)(n)[e.startNode.id],endNode:(0,l.unref)(n)[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 $=(0,a.Z)(J,[["__scopeId","data-v-61b3869c"]]);var K=$,X=(0,l.defineComponent)({props:{nodes:{type:(0,Z.P5)(Array),required:!0},leftSideNodes:(0,Z.P5)(Array),rightSideNodes:(0,Z.P5)(Array),branches:(0,Z.P5)(Array)},components:{TreeNode:L,Links:K},setup(){function e(e){const{display:o,visibility:t,style:l,classes:r,tooltip:n,onClick:i,onHold:a,color:s,glowColor:u,forceTooltip:m,canClick:c,mark:f,id:d}=e;return{display:o,visibility:t,style:l,classes:r,tooltip:n,onClick:i,onHold:a,color:s,glowColor:u,forceTooltip:m,canClick:c,mark:f,id:d}}return{gatherNodeProps:e,unref:l.unref}}});const Q=(0,a.Z)(X,[["render",C],["__scopeId","data-v-28bdfe90"]]);var ee=Q,oe=t(9583),te=t(3273);const le=Symbol("TreeNode"),re=Symbol("Tree");function ne(e){return(0,te.z2)((()=>{const o=e();if(o.id=(0,y.QI)("treeNode-"),o.type=le,o.tooltip?o.forceTooltip=(0,p.ax)(!1):o.forceTooltip=(0,l.ref)(!1),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,oe.yB)(o,"color"),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"tooltip"),(0,oe.yB)(o,"glowColor"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.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}))}function ie(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("tree-"),o.type=re,o[y.wA]=ee,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,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"nodes"),(0,oe.yB)(o,"leftSideNodes"),(0,oe.yB)(o,"rightSideNodes"),(0,oe.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 ae=function(e,o){const t=[o];let r=[o];if((()=>void 0!==e.branches&&null!==e.branches&&e.branches[Symbol.for("!=")]?e.branches[Symbol.for("!=")](null):null!=e.branches)()){const o=(0,l.unref)(e.branches);while((()=>void 0!==r.length&&null!==r.length&&r.length[Symbol.for(">")]?r.length[Symbol.for(">")](0):r.length>0)()){const e=[];r.forEach((l=>{o.filter((e=>e.startNode===l||e.endNode===l)).map((e=>e.startNode===l?e.endNode:e.startNode)).filter((e=>(()=>void 0!==t.includes(e)&&null!==t.includes(e)&&t.includes(e)[Symbol.for("!")]?t.includes(e)[Symbol.for("!")]():!t.includes(e))())).forEach((o=>{(()=>void 0!==e.includes(o)&&null!==e.includes(o)&&e.includes(o)[Symbol.for("!")]?e.includes(o)[Symbol.for("!")]():!e.includes(o))()&&(e.push(o),o.reset?.reset())}))})),r=e,t.push(...r)}}};var se=t(5967),ue=t(274);function me(e,o,t,r,n,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 ce=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},display:(0,Z.P5)(Object,String,Function),earned:{type:(0,Z.P5)(Boolean),required:!0},image:(0,Z.P5)(String),style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:T,MarkNode:_,Tooltip:U.Z},setup(e){const{display:o}=(0,l.toRefs)(e);return{component:(0,Z.KO)(o),unref:l.unref,Visibility:y.EE}}});const fe=(0,a.Z)(ce,[["render",me],["__scopeId","data-v-2e1ea71d"]]);var de=fe,ye=t(3002);t(343);function be(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 he(){return be("red","20px")}h.globalBus.on("setupVue",(e=>e.use(ye.ZP)));const pe=(0,ye.pm)(),ve=Symbol("Achievement");function ge(e){return(0,te.z2)((()=>{const o=e();if((0,p.Mv)(o,!1),o.id=(0,y.QI)("achievement-"),o.type=ve,o[y.wA]=de,o.earned=o[p.n9],o.complete=function(){o[p.n9].value=!0},(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"image"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"classes"),o[y.tj]=function(){const{visibility:e,display:o,earned:t,image:r,style:n,classes:i,mark:a,id:s}=this;return{visibility:e,display:o,earned:t,image:r,style:(0,l.unref)(n),classes:i,mark:a,id:s}},o.shouldEarn){const e=o;(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,Z.MM)((0,l.unref)(e.display));pe.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 o}))}function Se(e,o,t,r,n,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 Ne=t(1037),ke=t(9266);const Ve={key:0};function Me(e,o,t,r,n,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",Ve,[((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 xe=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,Z.P5)(Object,String,Function),required:!0},title:(0,Z.P5)(Object,String,Function),style:(0,Z.P5)(String,Object,Array),canClick:{type:(0,Z.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:T},setup(e){const{onClick:o,onHold:t,title:r,display:n}=(0,l.toRefs)(e),{start:i,stop:a}=(0,Z.ix)(o,t),s=(0,Z.KO)(r),u=(0,Z.vq)(n);return{start:i,stop:a,titleComponent:s,component:u,Visibility:y.EE,unref:l.unref}}});const we=(0,a.Z)(xe,[["render",Me],["__scopeId","data-v-b1182ac6"]]);var Ce=we,Ze=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},rows:{type:(0,Z.P5)(Number),required:!0},cols:{type:(0,Z.P5)(Number),required:!0},cells:{type:(0,Z.P5)(Object),required:!0}},components:{GridCell:Ce},setup(){const e=(0,l.computed)((()=>Ne.Z[ke.ZP.theme].mergeAdjacent));function o(e){const{visibility:o,onClick:t,onHold:l,display:r,title:n,style:i,canClick:a,id:s}=e;return{visibility:o,onClick:t,onHold:l,display:r,title:n,style:i,canClick:a,id:s}}return{unref:l.unref,gatherCellProps:o,Visibility:y.EE,mergeAdjacent:e}}});const Be=(0,a.Z)(Ze,[["render",Se]]);var Pe=Be,Ee=t(1349);Symbol("Grid");function Ie(e){return new Proxy({},Te(e))}function Te(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 r=1;(()=>void 0!==r&&null!==r&&r[Symbol.for("<=")]?r[Symbol.for("<=")]((0,l.unref)(e.cols)):r<=(0,l.unref)(e.cols))();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("postfix-increment")]?r[Symbol.for("postfix-increment")]():r++)())o.push((()=>100*t!==void 0&&100*t!==null&&(100*t)[Symbol.for("+")]?(100*t)[Symbol.for("+")](r):100*t+r)().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,Fe(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 Fe(e){const o=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],t={};return{get(o,r,n){if("isProxy"===r)return!0;let i=o[r];return(0,Ee.mf)(i)?()=>i.call(n,e,o.getState(e)):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()||"symbol"===typeof r?i:(r=(()=>void 0!==r.slice(0,1).toUpperCase()&&null!==r.slice(0,1).toUpperCase()&&r.slice(0,1).toUpperCase()[Symbol.for("+")]?r.slice(0,1).toUpperCase()[Symbol.for("+")](r.slice(1)):r.slice(0,1).toUpperCase()+r.slice(1))(),"startState"===r?i.call(n,e):(i=o[`get${r}`],(0,Ee.mf)(i)?((()=>r in t!==void 0&&r in t!==null&&(r in t)[Symbol.for("!")]?(r in t)[Symbol.for("!")]():!(r in t))()&&(t[r]=(0,l.computed)((()=>i.call(n,e,o.getState(e))))),t[r].value):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()?(0,l.unref)(i):(i=o[`on${r}`],(0,Ee.mf)(i)?()=>i.call(n,e,o.getState(e)):(()=>void 0!==i&&null!==i&&i[Symbol.for("!=")]?i[Symbol.for("!=")](void 0):void 0!=i)()?i:o[r])))},set(o,t,l,r){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,Ee.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(r,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 Re(e){return(0,te.z2)((()=>{const o=e();if((0,p.Mv)(o,{}),o.id=(0,y.QI)("grid-"),o[y.wA]=Pe,o.getID=function(e){return(()=>o.id+"-"!==void 0&&o.id+"-"!==null&&(o.id+"-")[Symbol.for("+")]?(o.id+"-")[Symbol.for("+")](e):o.id+"-"+e)()},o.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},o.setState=function(e,o){this[p.n9].value[e]=o},o.cells=Ie(o),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"rows"),(0,oe.yB)(o,"cols"),(0,oe.yB)(o,"getVisibility"),(0,y.Rh)(o,"getVisibility",y.EE.Visible),(0,oe.yB)(o,"getCanClick"),(0,y.Rh)(o,"getCanClick",!0),(0,oe.yB)(o,"getStartState"),(0,oe.yB)(o,"getStyle"),(0,oe.yB)(o,"getClasses"),(0,oe.yB)(o,"getTitle"),(0,oe.yB)(o,"getDisplay"),o.onClick){const e=o.onClick.bind(o);o.onClick=function(t,r){(0,l.unref)(o.cells[t].canClick)&&e(t,r)}}if(o.onHold){const e=o.onHold.bind(o);o.onHold=function(t,r){(0,l.unref)(o.cells[t].canClick)&&e(t,r)}}return o[y.tj]=function(){const{visibility:e,rows:o,cols:t,cells:l,id:r}=this;return{visibility:e,rows:o,cols:t,cells:l,id:r}},o}))}function je(e,o,t,r,n,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,Z.P5)(Object,String,Function),required:!0},visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(Object,String,Array),classes:(0,Z.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,Z.P5)(Boolean),required:!0},small:Boolean,mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:T,MarkNode:_},setup(e){const{display:o,onClick:t,onHold:r}=(0,l.toRefs)(e),n=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(n.value="");if((0,Z.RU)(e))return void(n.value=(0,Z.MM)(e));const t=(0,Z.MM)(e.title||"","h3"),r=(0,Z.MM)(e.description,"div");n.value=(0,Z.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)(r,null,null)]))))}));const{start:i,stop:a}=(0,Z.ix)(t,r);return{start:i,stop:a,comp:n,Visibility:y.EE,unref:l.unref}}});const Oe=(0,a.Z)(De,[["render",je],["__scopeId","data-v-6b39988a"]]);var _e=Oe;const Ue=Symbol("Clickable");function Ae(e){return(0,te.z2)((()=>{const o=e();if(o.id=(0,y.QI)("clickable-"),o.type=Ue,o[y.wA]=_e,(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"mark"),(0,oe.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:r,onClick:n,onHold:i,canClick:a,small:s,mark:u,id:m}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:r,onClick:n,onHold:i,canClick:a,small:s,mark:u,id:m}},o}))}function qe(e){return Ae((()=>{const o=e();(0,oe.yB)(o,"showNextAt"),(0,y.Rh)(o,"showNextAt",!0),(()=>void 0!==o.resetDescription&&null!==o.resetDescription&&o.resetDescription[Symbol.for("==")]?o.resetDescription[Symbol.for("==")](null):null==o.resetDescription)()?o.resetDescription=(0,l.computed)((()=>b.ZP.lt(o.conversion.gainResource.value,1e3)?"Reset for ":"")):(0,oe.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,[M(o.conversion.gainResource,(0,l.unref)(o.conversion.currentGain))])," ",o.conversion.gainResource.displayName,(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Next:")," ",M(o.conversion.baseResource,(0,l.unref)(o.conversion.nextAt))," ",o.conversion.baseResource.displayName]),[[l.vShow,(0,l.unref)(o.showNextAt)]])])))),(()=>void 0!==o.canClick&&null!==o.canClick&&o.canClick[Symbol.for("==")]?o.canClick[Symbol.for("==")](null):null==o.canClick)()&&(o.canClick=(0,l.computed)((()=>b.ZP.gt((0,l.unref)(o.conversion.currentGain),0))));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 ze(e){return ne((()=>{const o=e();return(0,oe.yB)(o,"display"),(0,y.Rh)(o,"display",o.layerID),(0,oe.yB)(o,"append"),{...o,display:o.layerID,onClick:(0,l.unref)(o.append)?function(){if(se.Z.tabs.includes(o.layerID)){const e=se.Z.tabs.lastIndexOf(o.layerID);se.Z.tabs.splice(e,1)}else se.Z.tabs.push(o.layerID)}:function(){se.Z.tabs.splice(1,1,o.layerID)}}}))}function Le(e){return(0,te.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!==o.buyMax&&null!==o.buyMax&&o.buyMax[Symbol.for("!")]?o.buyMax[Symbol.for("!")]():!o.buyMax)()&&(e=e.min(1)),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,oe.yB)(o,"currentGain"),(0,oe.yB)(o,"nextAt"),(0,oe.yB)(o,"buyMax"),(0,y.Rh)(o,"buyMax",!0),(0,oe.yB)(o,"roundUpCost"),(0,y.Rh)(o,"roundUpCost",!0),o}))}function We(e,o){return{currentGain(t){const r=b.ZP.div(t.baseResource.value,(0,l.unref)(e)).pow((0,l.unref)(o));return r.isNan()?new b.ZP(0):r},nextAt(t){let r=b.ZP.add((0,l.unref)(t.currentGain),1);return t.gainModifier&&(r=t.gainModifier.revert(r)),b.ZP.root(r,(0,l.unref)(o)).times((0,l.unref)(e)).max((0,l.unref)(e))}}}function Ge(e){return Le(e)}function He(e){return Le((()=>{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)((()=>b.ZP.sub(o.scaling.currentGain(o),o.gainResource.value).add(1).max(1)))),(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 Ye(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 Je(e,o,t=.5){return{...e,currentGain:r=>Ye(e.currentGain(r),(0,l.unref)(o),(0,l.unref)(t))}}function $e(e){const o=(0,oe.UI)(e);return{apply:e=>b.ZP.add(e,(0,l.unref)(o)),revert:e=>b.ZP.sub(e,(0,l.unref)(o))}}function Ke(e){const o=(0,oe.UI)(e);return{apply:e=>b.ZP.pow(e,(0,l.unref)(o)),revert:e=>b.ZP.root(e,(0,l.unref)(o))}}function Xe(...e){return{apply:o=>e.reduce(((e,o)=>o.apply(e)),o),revert:o=>e.reduceRight(((e,o)=>o.revert(e)),o)}}const Qe=e=>((0,l.pushScopeId)("data-v-6447a93e"),e=e(),(0,l.popScopeId)(),e),eo=Qe((()=>(0,l.createElementVNode)("span",{class:"toggle"},"▼",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));function oo(e,o,t,r,n,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))())},[eo,((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 to=t(423),lo=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},display:{type:(0,Z.P5)(Object,String,Function),required:!0},title:{type:(0,Z.P5)(Object,String,Function),required:!0},color:(0,Z.P5)(String),collapsed:{type:Object,required:!0},style:(0,Z.P5)(Object,String,Array),titleStyle:(0,Z.P5)(Object,String,Array),bodyStyle:(0,Z.P5)(Object,String,Array),classes:(0,Z.P5)(Object),id:{type:String,required:!0}},components:{Node:T,CollapseTransition:to.Z},setup(e){const{title:o,display:t}=(0,l.toRefs)(e),r=(0,Z.vq)(o),n=(0,Z.vq)(t),i=(0,l.computed)((()=>Ne.Z[ke.ZP.theme].mergeAdjacent));return{titleComponent:r,bodyComponent:n,stacked:i,unref:l.unref,Visibility:y.EE}}});const ro=(0,a.Z)(lo,[["render",oo],["__scopeId","data-v-6447a93e"]]);var no=ro;const io=Symbol("Infobox");function ao(e){return(0,te.z2)((()=>{const o=e();return(0,p.Mv)(o,!1),o.id=(0,y.QI)("infobox-"),o.type=io,o[y.wA]=no,o.collapsed=o[p.n9],(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"color"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"titleStyle"),(0,oe.yB)(o,"bodyStyle"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"title"),(0,oe.yB)(o,"display"),o[y.tj]=function(){const{visibility:e,display:o,title:t,color:r,collapsed:n,style:i,titleStyle:a,bodyStyle:s,classes:u,id:m}=this;return{visibility:e,display:o,title:t,color:r,collapsed:n,style:(0,l.unref)(i),titleStyle:a,bodyStyle:s,classes:u,id:m}},o}))}const so={ref:"resizeListener",class:"resize-listener"};function uo(e,o,t,r,n,i){const a=(0,l.resolveComponent)("Particles",!0);return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(a,(0,l.mergeProps)({id:e.id,class:{"not-fullscreen":(()=>void 0!==e.fullscreen&&null!==e.fullscreen&&e.fullscreen[Symbol.for("!")]?e.fullscreen[Symbol.for("!")]():!e.fullscreen)()},style:{zIndex:e.zIndex},ref:"particles",particlesInit:e.particlesInit,particlesLoaded:e.particlesLoaded,options:{fpsLimit:60,fullScreen:{enable:e.fullscreen,zIndex:e.zIndex},particles:{number:{value:0}},emitters:{autoPlay:!1}}},e.$attrs),null,16,["id","class","style","particlesInit","particlesLoaded","options"]),(0,l.createElementVNode)("div",so,null,512)],64)}var mo=t(666),co=t(8375),fo=(0,l.defineComponent)({props:{zIndex:{type:Number,required:!0},fullscreen:{type:Boolean,required:!0},onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function},components:{Particles:co.z},setup(e){const o=(0,l.ref)(null);async function t(e){await(0,mo.R)(e)}function r(o){e.onInit(o)}const n=new ResizeObserver(u),i=(0,l.inject)(P.NodesInjectionKey),a=(0,l.ref)(null);(0,l.onMounted)((()=>{const e=a.value;(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&n.observe(e),u()}));let s=!0;function u(){s&&(s=!1,(0,l.nextTick)((()=>{(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!=")]?a.value[Symbol.for("!=")](null):null!=a.value)()&&e.onContainerResized&&(Object.values(i.value).forEach((e=>e.rect=e.element.getBoundingClientRect())),e.onContainerResized(a.value.getBoundingClientRect())),s=!0})))}return{particles:o,particlesInit:t,particlesLoaded:r,resizeListener:a}}});const yo=(0,a.Z)(fo,[["render",uo],["__scopeId","data-v-4bdd63c1"]]);var bo=yo;const ho=Symbol("Particles");function po(e){return(0,te.z2)((()=>{const o=e();o.id=(0,y.QI)("particles-"),o.type=ho,o[y.wA]=bo,o.containerRef=(0,l.shallowRef)(null),o.addEmitter=e=>{const l=o;return l.containerRef.value?Promise.resolve(l.containerRef.value.addEmitter(e)):new Promise((o=>{t.push({resolve:o,options:e})}))},o.removeEmitter=e=>{e.emitters.removeEmitter(e)};let t=[];function r(e){o.containerRef.value=e,t.forEach((({resolve:o,options:t})=>o(e.addEmitter(t)))),t=[]}return(0,y.Rh)(o,"fullscreen",!0),(0,y.Rh)(o,"zIndex",1),o.onContainerResized=o.onContainerResized?.bind(o),o[y.tj]=function(){const{id:e,fullscreen:o,zIndex:t,onContainerResized:l}=this;return{id:e,fullscreen:o,zIndex:t,onContainerResized:l,onInit:r}},o}))}const vo=Symbol("Reset");function go(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("reset-"),o.type=vo,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,oe.yB)(o,"thingsToReset"),o}))}const So={};h.globalBus.on("removeLayer",(e=>{So[e.id]?.(),So[e.id]=void 0}));var No=(0,l.defineComponent)({props:{resource:null,color:null},setup(e){const o=e,t=(0,l.computed)((()=>M(o.resource)));return(o,r)=>((0,l.openBlock)(),(0,l.createElementBlock)("h2",{style:(0,l.normalizeStyle)({color:e.color,"text-shadow":(()=>"0px 0px 10px "[Symbol.for("+")]?"0px 0px 10px "[Symbol.for("+")](e.color):"0px 0px 10px "+e.color)()})},(0,l.toDisplayString)((0,l.unref)(t)),5))}});const ko=No;var Vo=ko;const Mo={key:0},xo={key:1},wo=(0,l.createTextVNode)(", "),Co=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()),Zo=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var Bo=(0,l.defineComponent)({props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const o=e,t=(0,l.toRefs)(o),r=(0,Z.KO)(t.effectDisplay),n=(0,l.computed)((()=>b.ZP.lt(t.resource.value,"1e1000")));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",null,[(0,l.unref)(n)?((0,l.openBlock)(),(0,l.createElementBlock)("span",Mo,"You have ")):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Vo,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)(e.resource.displayName)):" "+(0,l.toDisplayString)(e.resource.displayName))(),1),(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",xo,[wo,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(r))))])):(0,l.createCommentVNode)("",!0),Co,Zo]))}});const Po=Bo;var Eo=Po;const Io={class:"field"},To={key:0,class:"field-title"},Fo=["min","max"];var Ro=(0,l.defineComponent)({props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,r=(0,l.toRefs)(t),n=(0,l.computed)({get(){return String((0,l.unref)(r.modelValue)||0)},set(e){o("update:modelValue",Number(e))}});return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",Io,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)("span",To,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(U.Z,{display:`${(0,l.unref)(n)}`,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)(n)?n.value=e:null),min:e.min,max:e.max},null,8,Fo),[[l.vModelText,(0,l.unref)(n)]])])),_:1},8,["display","class"])]))}});const jo=(0,a.Z)(Ro,[["__scopeId","data-v-8adbf51e"]]);var Do=jo,Oo=t(4520),_o=t(9868),Uo=t(9905),Ao=(0,l.defineComponent)({setup(e){const o=(0,l.ref)("0"),t=new ResizeObserver(n),r=(0,l.ref)(null);function n(){let e=r.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)(n),(0,l.onMounted)((()=>{const e=r.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:r,"data-v-sticky":""},[(0,l.renderSlot)(e.$slots,"default")],4))}});const qo=(0,a.Z)(Ao,[["__scopeId","data-v-3b196306"]]);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 Wo=(0,a.Z)(Lo,[["__scopeId","data-v-15f6e746"]]);var Go=Wo,Ho=t(6948);function Yo(e,o,t,r,n,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 Jo=(0,l.defineComponent)({props:{progress:{type:(0,Z.P5)(String,Object,Number),required:!0},width:{type:(0,Z.P5)(Number),required:!0},height:{type:(0,Z.P5)(Number),required:!0},direction:{type:(0,Z.P5)(String),required:!0},display:(0,Z.P5)(Object,String,Function),visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(Object,String,Array),classes:(0,Z.P5)(Object),borderStyle:(0,Z.P5)(Object,String,Array),textStyle:(0,Z.P5)(Object,String,Array),baseStyle:(0,Z.P5)(Object,String,Array),fillStyle:(0,Z.P5)(Object,String,Array),mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:_,Node:T},setup(e){const{progress:o,width:t,height:r,direction:n,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,Z.Uv)(t)+.5!==void 0&&(0,Z.Uv)(t)+.5!==null&&((0,Z.Uv)(t)+.5)[Symbol.for("+")]?((0,Z.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,Z.Uv)(t)+.5+"px")(),height:(()=>(0,Z.Uv)(r)+.5!==void 0&&(0,Z.Uv)(r)+.5!==null&&((0,Z.Uv)(r)+.5)[Symbol.for("+")]?((0,Z.Uv)(r)+.5)[Symbol.for("+")]("px"):(0,Z.Uv)(r)+.5+"px")()};switch((0,l.unref)(n)){case Qo.Up:e.clipPath=`inset(${a.value}% 0% 0% 0%)`,e.width=(()=>(0,Z.Uv)(t)+1!==void 0&&(0,Z.Uv)(t)+1!==null&&((0,Z.Uv)(t)+1)[Symbol.for("+")]?((0,Z.Uv)(t)+1)[Symbol.for("+")]("px"):(0,Z.Uv)(t)+1+"px")();break;case Qo.Down:e.clipPath=`inset(0% 0% ${a.value}% 0%)`,e.width=(()=>(0,Z.Uv)(t)+1!==void 0&&(0,Z.Uv)(t)+1!==null&&((0,Z.Uv)(t)+1)[Symbol.for("+")]?((0,Z.Uv)(t)+1)[Symbol.for("+")]("px"):(0,Z.Uv)(t)+1+"px")();break;case Qo.Right:e.clipPath=`inset(0% ${a.value}% 0% 0%)`;break;case Qo.Left:e.clipPath=`inset(0% 0% 0% ${a.value} + '%)`;break;case Qo.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),u=(0,Z.KO)(i);return{normalizedProgress:a,barStyle:s,component:u,unref:l.unref,Visibility:y.EE}}});const $o=(0,a.Z)(Jo,[["render",Yo],["__scopeId","data-v-e6e3c366"]]);var Ko=$o;const Xo=Symbol("Bar");var Qo;function et(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("bar-"),o.type=Xo,o[y.wA]=Ko,(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"width"),(0,oe.yB)(o,"height"),(0,oe.yB)(o,"direction"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"borderStyle"),(0,oe.yB)(o,"baseStyle"),(0,oe.yB)(o,"textStyle"),(0,oe.yB)(o,"fillStyle"),(0,oe.yB)(o,"progress"),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"mark"),o[y.tj]=function(){const{progress:e,width:o,height:t,direction:r,display:n,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:r,display:n,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"})(Qo||(Qo={}));const ot=Symbol("Buyable");function tt(e){return(0,te.z2)((()=>{const o=e();if((()=>void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase)()&&((()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource)()||(()=>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";(0,p.Mv)(o,0),o.id=(0,y.QI)("buyable-"),o.type=ot,o[y.wA]=_e,o.amount=o[p.n9],o.canAfford=(0,l.computed)((()=>{const e=o,t=(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!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](null):null!=t)()&&b.ZP.gte(e.resource.value,t)})),(()=>void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase)()&&(o.canPurchase=(0,l.computed)((()=>(0,l.unref)(o.visibility)===y.EE.Visible&&(0,l.unref)(o.canAfford)&&b.ZP.lt(o.amount.value,(0,l.unref)(o.purchaseLimit))))),o.maxed=(0,l.computed)((()=>b.ZP.gte(o.amount.value,(0,l.unref)(o.purchaseLimit)))),(0,oe.yB)(o,"classes");const t=o.classes;o.classes=(0,l.computed)((()=>{const e=(0,l.unref)(t)||{};return o.maxed.value&&(e.bought=!0),e})),(0,oe.yB)(o,"canPurchase"),o.canClick=o.canPurchase,o.onClick=o.purchase=function(){const e=o;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 t=(0,l.unref)(e.cost);e.resource.value=b.ZP.sub(e.resource.value,t),e.amount.value=b.ZP.add(e.amount.value,1),this.onPurchase?.(t)},(0,oe.yB)(o,"display");const r=o.display;return o.display=(0,y.tZ)((()=>{const e=(0,l.unref)(r);if((0,Z.RU)(e)){const o=(0,Z.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!==o.cost&&null!==o.cost&&o.cost[Symbol.for("!=")]?o.cost[Symbol.for("!=")](null):null!=o.cost)()&&(()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("!=")]?o.resource[Symbol.for("!=")](null):null!=o.resource)()){const t=o,r=(0,Z.MM)(e.title||"","h3"),n=(0,Z.MM)(e.description),i=(0,Z.MM)(e.effectDisplay||""),a=(0,l.unref)(t.purchaseLimit)===b.ZP.dInf?(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(t.amount.value)]):(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(t.amount.value),(0,l.createTextVNode)(" /")," ",(0,b.Ht)((0,l.unref)(t.purchaseLimit))]);return(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(r,null,null)]):null,(0,l.createVNode)(n,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,t.cost&&(()=>void 0!==t.maxed.value&&null!==t.maxed.value&&t.maxed.value[Symbol.for("!")]?t.maxed.value[Symbol.for("!")]():!t.maxed.value)()?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Cost: "),(0,b.WU)((0,l.unref)(t.cost)||0)," ",o.resource.displayName]):null])}return""})),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"cost"),(0,oe.yB)(o,"resource"),(0,oe.yB)(o,"purchaseLimit"),(0,y.Rh)(o,"purchaseLimit",b.ZP.dInf),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"small"),o[y.tj]=function(){const{display:e,visibility:o,style:t,classes:r,onClick:n,canClick:i,small:a,mark:s,id:u}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:r,onClick:n,canClick:i,small:a,mark:s,id:u}},o}))}t(3577);const lt=["disabled"];function rt(e,o,t,r,n,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 nt=(0,l.defineComponent)({props:{active:{type:(0,Z.P5)(Boolean),required:!0},maxed:{type:(0,Z.P5)(Boolean),required:!0},canComplete:{type:(0,Z.P5)(Boolean),required:!0},display:(0,Z.P5)(String,Object,Function),visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),completed:{type:(0,Z.P5)(Boolean),required:!0},canStart:{type:(0,Z.P5)(Boolean),required:!0},mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:_,Node:T},setup(e){const{active:o,maxed:t,canComplete:r,display:n}=(0,l.toRefs)(e),i=(0,l.computed)((()=>o.value?r.value?"Finish":"Exit Early":t.value?"Completed":"Start")),a=(0,l.shallowRef)(""),s=(0,l.computed)((()=>{const e=(0,Z.Uv)(o),t=(0,Z.Uv)(r);return e?t?he():be():{}}));return(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(n);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(a.value="");if((0,Z.RU)(e))return void(a.value=(0,Z.MM)(e));const o=(0,Z.MM)(e.title||"","h3"),t=(0,Z.MM)(e.description,"div"),r=(0,Z.MM)(e.goal||""),i=(0,Z.MM)(e.reward||""),s=(0,Z.MM)(e.effectDisplay||"");a.value=(0,Z.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)(r,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)(nt,[["render",rt],["__scopeId","data-v-5e580749"]]);var at=it;const st=Symbol("ChallengeType");function ut(e){return(0,te.z2)((()=>{const o=e();if((()=>void 0!==o.canComplete&&null!==o.canComplete&&o.canComplete[Symbol.for("==")]?o.canComplete[Symbol.for("==")](null):null==o.canComplete)()&&((()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource)()||(()=>void 0!==o.goal&&null!==o.goal&&o.goal[Symbol.for("==")]?o.goal[Symbol.for("==")](null):null==o.goal)()))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",o),"Cannot create challenge without a canComplete property or a resource and goal property";o.id=(0,y.QI)("challenge-"),o.type=st,o[y.wA]=at,o.completions=(0,p.ax)(0),o.active=(0,p.ax)(!1),o.completed=(0,l.computed)((()=>b.ZP.gt(o.completions.value,0))),o.maxed=(0,l.computed)((()=>b.ZP.gte(o.completions.value,(0,l.unref)(o.completionLimit)))),o.toggle=function(){const e=o;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?.())},o.complete=function(e){const t=o;let r=(0,l.unref)(t.canComplete);t.active.value&&(()=>void 0!==r&&null!==r&&r[Symbol.for("!==")]?r[Symbol.for("!==")](!1):!1!==r)()&&(!0===r||b.ZP.neq(0,r))&&(()=>void 0!==t.maxed.value&&null!==t.maxed.value&&t.maxed.value[Symbol.for("!")]?t.maxed.value[Symbol.for("!")]():!t.maxed.value)()&&("boolean"===typeof r&&(r=1),t.completions.value=b.ZP.min(b.ZP.add(t.completions.value,r),(0,l.unref)(t.completionLimit)),t.onComplete?.(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e)()&&(t.active.value=!1,t.onExit?.(),t.reset?.reset()))},(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible);const t=o.visibility;return o.visibility=(0,l.computed)((()=>!0===ke.ZP.hideChallenges&&(0,l.unref)(o.maxed)?y.EE.None:(0,l.unref)(t))),(()=>void 0!==o.canComplete&&null!==o.canComplete&&o.canComplete[Symbol.for("==")]?o.canComplete[Symbol.for("==")](null):null==o.canComplete)()&&(o.canComplete=(0,l.computed)((()=>{const e=o;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!==o.mark&&null!==o.mark&&o.mark[Symbol.for("==")]?o.mark[Symbol.for("==")](null):null==o.mark)()&&(o.mark=(0,l.computed)((()=>b.ZP.gt((0,l.unref)(o.completionLimit),1)&&(()=>void 0!==!(0,l.unref)(o.maxed)&&null!==!(0,l.unref)(o.maxed)&&(!(0,l.unref)(o.maxed))[Symbol.for("!")]?(!(0,l.unref)(o.maxed))[Symbol.for("!")]():!!(0,l.unref)(o.maxed))()))),(0,oe.yB)(o,"canStart"),(0,y.Rh)(o,"canStart",!0),(0,oe.yB)(o,"canComplete"),(0,oe.yB)(o,"completionLimit"),(0,y.Rh)(o,"completionLimit",1),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"goal"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"display"),(()=>void 0!==o.reset&&null!==o.reset&&o.reset[Symbol.for("!=")]?o.reset[Symbol.for("!=")](null):null!=o.reset)()&&h.globalBus.on("reset",(e=>{e===o.reset&&o.active.value&&o.toggle()})),o[y.tj]=function(){const{active:e,maxed:o,canComplete:t,display:r,visibility:n,style:i,classes:a,completed:s,canStart:u,mark:m,id:c,toggle:f}=this;return{active:e,maxed:o,canComplete:t,display:r,visibility:n,style:(0,l.unref)(i),classes:a,completed:s,canStart:u,mark:m,id:c,toggle:f}},o}))}h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"hideChallenges",!1)})),(0,ke.QV)((0,y.tZ)((()=>(0,l.createVNode)(_o.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>ke.ZP.hideChallenges=e,modelValue:ke.ZP.hideChallenges},null))));const mt=(0,l.shallowReactive)({}),ct=Symbol("Hotkey");function ft(e){return(0,te.z2)((()=>{const o=e();return o.type=ct,(0,oe.yB)(o,"enabled"),(0,y.Rh)(o,"enabled",!0),(0,oe.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(nl.value&&(()=>void 0!==se.Z.keepGoing&&null!==se.Z.keepGoing&&se.Z.keepGoing[Symbol.for("!")]?se.Z.keepGoing[Symbol.for("!")]():!se.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,ke.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,te.z2)((()=>{const o=e();return o.type=dt,o[y.wA]=K,(0,oe.yB)(o,"links"),o[y.tj]=function(){const{links:e}=this;return{links:e}},o}))}var bt=t(3525);function ht(e,o,t,r,n,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,Z.P5)(Number),required:!0},display:{type:(0,Z.P5)(String,Object,Function),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),earned:{type:(0,Z.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:T},setup(e){const{display:o}=(0,l.toRefs)(e),t=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(t.value="");if((0,Z.RU)(e))return void(t.value=(0,Z.MM)(e));const r=(0,Z.MM)(e.requirement,"h3"),n=(0,Z.MM)(e.effectDisplay||"","b"),i=(0,Z.MM)(e.optionsDisplay||"","span");t.value=(0,Z.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createVNode)(r,null,null),e.effectDisplay?(0,l.createVNode)("div",null,[(0,l.createVNode)(n,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 vt=(0,a.Z)(pt,[["render",ht],["__scopeId","data-v-0b660ac3"]]);var gt=vt;const St=(0,ye.pm)(),Nt=Symbol("Milestone");var kt;function Vt(e){return(0,te.z2)((()=>{const o=e();(0,p.Mv)(o,!1),o.id=(0,y.QI)("milestone-"),o.type=Nt,o[y.wA]=gt,o.earned=o[p.n9],o.complete=function(){o[p.n9].value=!0},(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible);const t=o.visibility;if(o.visibility=(0,l.computed)((()=>{const e=(0,l.unref)(o.display);switch(ke.ZP.msDisplay){default:case kt.All:return(0,l.unref)(t);case kt.Configurable:return(0,l.unref)(o.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)(t);case kt.Incomplete:return(0,l.unref)(o.earned)?y.EE.None:(0,l.unref)(t);case kt.None:return y.EE.None}})),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"display"),o[y.tj]=function(){const{visibility:e,display:o,style:t,classes:r,earned:n,id:i}=this;return{visibility:e,display:o,style:(0,l.unref)(t),classes:r,earned:n,id:i}},o.shouldEarn){const e=o;(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,Z.MM)((0,Z.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 o}))}(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 Mt=Object.values(kt).map((e=>({label:(0,Ee.IJ)(e),value:e})));(0,ke.QV)((0,y.tZ)((()=>(0,l.createVNode)(bt.Z,{title:"Show Milestones",options:Mt,"onUpdate:modelValue":e=>ke.ZP.msDisplay=e,modelValue:ke.ZP.msDisplay},null))));var xt=(0,l.defineComponent)({props:{display:null},setup(e){const o=e,{display:t}=(0,l.toRefs)(o),r=(0,Z.vq)(t);return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(r))))}});const wt=xt;var Ct=wt;const Zt=Symbol("Tab");function Bt(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("tab-"),o.type=Zt,o[y.wA]=Ct,o[y.tj]=function(){const{display:e}=this;return{display:e}},o}))}function Pt(e,o,t,r,n,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,Z.P5)(Number),required:!0},display:{type:(0,Z.P5)(Object,String,Function),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),glowColor:(0,Z.P5)(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:o}){const{display:t,glowColor:r,floating:n}=(0,l.toRefs)(e),i=(0,Z.vq)(t),a=(0,l.computed)((()=>{const e=(0,Z.Uv)(r);return(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?{}:(0,l.unref)(n)?be(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 It=(0,a.Z)(Et,[["render",Pt],["__scopeId","data-v-361380c0"]]);var Tt=It;function Ft(e,o,t,r,n,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 Rt=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},activeTab:{type:(0,Z.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,Z.P5)(Object),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object)},components:{Sticky:zo,TabButton:Tt},setup(e){const{activeTab:o}=(0,l.toRefs)(e),t=(0,l.computed)((()=>Ne.Z[ke.ZP.theme].floatingTabs)),r=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()?r.value="":(0,Z.RU)(e)?r.value=(0,Z.MM)(e):r.value=(0,Z.MM)((0,l.unref)(e.display))}));const n=(0,l.computed)((()=>{const e=(0,Z.Uv)(o),t=(0,Z.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,Z.Uv)(o);return(0,Z.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:r,visibility:n}=e;return{display:o,style:t,classes:l,glowColor:r,visibility:n}}return{floating:t,tabClasses:n,tabStyle:i,Visibility:y.EE,component:r,gatherButtonProps:a,unref:l.unref}}});const jt=(0,a.Z)(Rt,[["render",Ft],["__scopeId","data-v-86da8746"]]);var Dt=jt;const Ot=Symbol("TabButton"),_t=Symbol("TabFamily");function Ut(e){return(0,te.z2)((()=>{const o=e();if(0===Object.keys(o.tabs).length)throw console.warn("Cannot create tab family with 0 tabs",o),"Cannot create tab family with 0 tabs";o.id=(0,y.QI)("tabFamily-"),o.type=_t,o[y.wA]=Dt,(0,p.Mv)(o,Object.keys(o.tabs)[0]),o.selected=o[p.n9],o.activeTab=(0,l.computed)((()=>{const e=(0,l.unref)(t.tabs);if((()=>void 0!==o[p.n9].value&&null!==o[p.n9].value&&o[p.n9].value[Symbol.for("in")]?o[p.n9].value[Symbol.for("in")](e):o[p.n9].value in e)()&&(0,l.unref)(e[t[p.n9].value].visibility)===y.EE.Visible)return(0,l.unref)(e[t[p.n9].value].tab);const r=Object.values(e).find((e=>(0,l.unref)(e.visibility)===y.EE.Visible));return r?(0,l.unref)(r.tab):null})),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style");for(const e in o.tabs){const t=o.tabs[e];t.type=Ot,t[y.wA]=Tt,(0,oe.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,oe.yB)(t,"tab"),(0,oe.yB)(t,"display"),(0,oe.yB)(t,"classes"),(0,oe.yB)(t,"style"),(0,oe.yB)(t,"glowColor")}o[y.tj]=function(){const{visibility:e,activeTab:o,selected:t,tabs:r,style:n,classes:i}=this;return{visibility:e,activeTab:o,selected:t,tabs:r,style:(0,l.unref)(n),classes:i}};const t=o;return t}))}const At=["disabled"];function qt(e,o,t,r,n,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,At)):(0,l.createCommentVNode)("",!0)}var zt=(0,l.defineComponent)({props:{display:{type:(0,Z.P5)(String,Object,Function),required:!0},visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),resource:Object,cost:(0,Z.P5)(String,Object,Number),canPurchase:{type:(0,Z.P5)(Boolean),required:!0},bought:{type:(0,Z.P5)(Boolean),required:!0},mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:T,MarkNode:_},setup(e){const{display:o,cost:t}=(0,l.toRefs)(e),r=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const n=(0,Z.Uv)(o);if((()=>void 0!==n&&null!==n&&n[Symbol.for("==")]?n[Symbol.for("==")](null):null==n)())return void(r.value="");if((0,Z.RU)(n))return void(r.value=(0,Z.MM)(n));const i=(0,Z.Uv)(t),a=(0,Z.MM)(n.title||"","h3"),s=(0,Z.MM)(n.description,"div"),u=(0,Z.MM)(n.effectDisplay||"");r.value=(0,Z.MM)((0,y.tZ)((()=>(0,l.createVNode)("span",null,[n.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(a,null,null)]):null,(0,l.createVNode)(s,null,null),n.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&&M(e.resource,i)," ",e.resource?.displayName]):null]))))})),{component:r,unref:l.unref,Visibility:y.EE}}});const Lt=(0,a.Z)(zt,[["render",qt],["__scopeId","data-v-264c96b4"]]);var Wt=Lt;const Gt=Symbol("Upgrade");function Ht(e){return(0,te.z2)((()=>{const o=e();return(0,p.Mv)(o,!1),o.id=(0,y.QI)("upgrade-"),o.type=Gt,o[y.wA]=Wt,(()=>void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford)()&&((()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource)()||(()=>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[p.n9],(()=>void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford)()?o.canAfford=(0,l.computed)((()=>{const e=o;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,oe.yB)(o,"canAfford"),o.canPurchase=(0,l.computed)((()=>(0,l.unref)(o.visibility)===y.EE.Visible&&(0,l.unref)(o.canAfford)&&(()=>void 0!==(0,l.unref)(o.bought)&&null!==(0,l.unref)(o.bought)&&(0,l.unref)(o.bought)[Symbol.for("!")]?(0,l.unref)(o.bought)[Symbol.for("!")]():!(0,l.unref)(o.bought))())),o.purchase=function(){const e=o;(()=>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,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"cost"),(0,oe.yB)(o,"resource"),o[y.tj]=function(){const{display:e,visibility:o,style:t,classes:r,resource:n,cost:i,canPurchase:a,bought:s,mark:u,id:m,purchase:c}=this;return{display:e,visibility:o,style:(0,l.unref)(t),classes:r,resource:n,cost:i,canPurchase:a,bought:s,mark:u,id:m,purchase:c}},o}))}function Yt(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 Jt=(0,P.createLayer)((()=>{const e="c",o="#4BDC13",t="Candies",r=v(0,"lollipops"),n=g(r),i=(0,p.ax)(!1),a=(0,p.ax)("pointy"),s=(0,p.ax)(10),u=(0,p.ax)(new b.ZP(10)),m=(0,l.computed)((()=>b.ZP.pow(r.value,.2))),c=(0,l.computed)((()=>b.ZP.times(r.value,10))),f=ao((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}))),h=Vt((()=>({shouldEarn(){return b.ZP.gte(n.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}))),S=Vt((()=>({visibility(){return(0,y.Kf)(h.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)(_o.Z,{title:"beep","onUpdate:modelValue":e=>i.value=e,modelValue:i.value},null),(0,l.createVNode)(_o.Z,{title:"boop","onUpdate:modelValue":e=>Qt.boop.value=e,modelValue:Qt.boop.value},null)])))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}}))),N=[h,S],k=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)(V.value)&&null!==(0,b.WU)(V.value)&&(0,b.WU)(V.value)[Symbol.for("+")]?(0,b.WU)(V.value)[Symbol.for("+")]("x"):(0,b.WU)(V.value)+"x")()}},visibility(){return(0,y.Kf)(b.ZP.gt(n.value,0))},goal:20,resource:ll.points,onComplete(){console.log("hiii")},onEnter(){ll.points.value=0,ll.best.value=ll.points.value,ll.total.value=ll.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}}))),V=(0,l.computed)((()=>b.ZP.add(r.value,1).tetrate(.02))),x=Ht((()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:r}))),w=Ht((()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${(0,b.WU)(C.value)}x`}),cost:1,resource:r,visibility:()=>(0,y.Kf)(x.bought.value)}))),C=(0,l.computed)((()=>{let e=b.ZP.add(r.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),B=Ht((()=>({visibility(){return(0,y.Kf)(w.bought.value)},canAfford(){return b.ZP.lt(ll.points.value,7)},onPurchase(){ll.points.value=b.ZP.add(ll.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"}:{}}}))),P=Ht((()=>({resource:v(I.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}))),E=[x,w,B],I=tt((()=>({resource:r,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){u.value=b.ZP.add(u.value,e)},style:{height:"222px"},purchaseLimit:4}))),T=(0,l.computed)((()=>b.ZP.gte(I.amount.value,0)?b.ZP.pow(25,b.ZP.pow(I.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(I.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),F=(0,l.computed)((()=>b.ZP.gte(I.amount.value,0)?b.ZP.pow(25,b.ZP.pow(I.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(I.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),R=(0,p.ax)(!1),j=(0,l.ref)(!1),D=Ae((()=>({small:!0,display:"Respec Thingies",onClick(){R.value&&(()=>void 0!==j.value&&null!==j.value&&j.value[Symbol.for("!")]?j.value[Symbol.for("!")]():!j.value)()?j.value=!0:(r.value=b.ZP.add(r.value,u.value),I.amount.value=0,ll.tree.reset(G))}}))),O=Ae((()=>({small:!0,display:"Sell One",onClick(){b.ZP.lte(I.amount.value,0)||(I.amount.value=b.ZP.sub(I.amount.value,1),r.value=b.ZP.add(r.value,I.cost.value),u.value=b.ZP.sub(u.value,I.cost.value))}}))),_=(0,y.tZ)((()=>(0,l.createVNode)(Uo.Z,null,{default:()=>[(0,l.createVNode)(ue.Z,null,{default:()=>[(0,l.createVNode)(_o.Z,{title:"Confirm","onUpdate:modelValue":e=>R.value=e,modelValue:R.value},null),(0,Z._4)(D)]}),(0,Z._4)(I),(0,Z._4)(O),(0,l.createVNode)(Ho.Z,{modelValue:j.value,"onUpdate:modelValue":e=>j.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:()=>j.value=!1},[(0,l.createTextVNode)("Cancel")]),(0,l.createVNode)("button",{class:"button modal-default-button danger",onClick:()=>{D.onClick(),j.value=!1}},[(0,l.createTextVNode)("Respec")])])})]}))),U=et((()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:Qo.Right,width:300,height:30,progress(){return b.ZP.add(ll.points.value,1).log(10).div(10).toNumber()},display(){return(()=>void 0!==(0,b.WU)(ll.points.value)&&null!==(0,b.WU)(ll.points.value)&&(0,b.WU)(ll.points.value)[Symbol.for("+")]?(0,b.WU)(ll.points.value)[Symbol.for("+")](" / 1e10 points"):(0,b.WU)(ll.points.value)+" / 1e10 points")()}}))),A=et((()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:Qo.Up,width:50,height:200,progress(){return b.ZP.div(ll.points.value,100)},display(){return(()=>void 0!==(0,b.Ht)(b.ZP.div(ll.points.value,1).min(100))&&null!==(0,b.Ht)(b.ZP.div(ll.points.value,1).min(100))&&(0,b.Ht)(b.ZP.div(ll.points.value,1).min(100))[Symbol.for("+")]?(0,b.Ht)(b.ZP.div(ll.points.value,1).min(100))[Symbol.for("+")]("%"):(0,b.Ht)(b.ZP.div(ll.points.value,1).min(100))+"%")()}}))),q=et((()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:Qo.Up,width:100,height:30,progress(){return b.ZP.div(r.value,50)}}))),z=Ge((()=>({scaling:Je(We(10,.5),1e100,.5),baseResource:ll.points,gainResource:r,roundUpCost:!0,gainModifier:Xe(Ke(2),$e(1))}))),L=go((()=>({thingsToReset:()=>[Jt]}))),W=[ft((()=>({key:"c",description:"reset for lollipops or whatever",onPress(){H.canClick.value&&H.onClick()}}))),ft((()=>({key:"ctrl+c",description:"respec things",onPress(){D.onClick()}})))],G=ze((()=>({layerID:e,color:o,reset:L,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let e=M(r);return b.ZP.gt(I.amount.value,0)&&(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](`<br><i><br><br><br>${(0,b.Ht)(I.amount.value)} Exhancers</i>`):e+`<br><i><br><br><br>${(0,b.Ht)(I.amount.value)} Exhancers</i>`)()),e},style:{color:"#3325CC",textDecoration:"underline"}}))),H=qe((()=>({conversion:z,tree:ll.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}))),Y=ne((()=>({display:"TH",color:"#6d3678",canClick(){return b.ZP.gte(ll.points.value,10)},tooltip:"Thanos your points",onClick(){ll.points.value=b.ZP.div(ll.points.value,2),console.log("Thanos'd")},glowColor(){return b.ZP.eq(I.amount.value,1)?"orange":""}}))),J=ne((()=>({display:"h",color(){return Ne.Z[ke.ZP.theme].variables["--locked"]},tooltip:{display:(0,l.computed)((()=>`Restore your points to ${(0,b.WU)(s.value)}`)),right:!0},canClick(){return b.ZP.lt(ll.points.value,s.value)},onClick(){ll.points.value=s.value}}))),$=ne((()=>({visibility:y.EE.Hidden}))),K=ie((()=>({nodes(){return[[Qt.treeNode,G],[Y,$,J]]},branches(){return[{startNode:Qt.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:Y},{startNode:Y,endNode:J}]}}))),X=yt((()=>({links:[{startNode:J,endNode:q,"stroke-width":"5px",stroke:"red",offsetEnd:{x:(()=>(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*q.progress.value.toNumber()):100*q.progress.value.toNumber()-50)(),y:0}}]}))),Q=Ut((()=>({tabs:{first:{tab:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z._4)(...E),(0,Z._4)(P),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("confirmed")])]))),display:"first"},second:{tab:Qt.display,display:"second"}},style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}))),ee=Ut((()=>({tabs:{mainTab:{tab:Bt((()=>({display:(0,y.tZ)((()=>{let e;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(Eo,{resource:r,color:o,effectDisplay:`which are boosting waffles by ${(0,b.WU)(m.value)} and increasing the Ice Cream cap by ${(0,b.WU)(c.value)}`},null),(0,l.createVNode)(zo,null,Yt(e=(0,Z.sY)(H))?e:{default:()=>[e]}),(0,l.createVNode)(Vo,{resource:r,color:o},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)(Oo.Z,{modelValue:a.value,"onUpdate:modelValue":e=>a.value=e},null),(0,l.createVNode)(zo,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[(0,l.createTextVNode)("I have "),M(ll.points),(0,l.createTextVNode)(" "),a.value,(0,l.createTextVNode)(" points!")]}),(0,l.createVNode)("hr",null,null),(0,Z.Dy)(...N),(0,l.createVNode)(d,null,null),(0,Z._4)(...E),(0,Z._4)(P),(0,Z._4)(k)])}))}))),display:"main tab",glowColor(){return x.canPurchase.value||w.canPurchase.value||B.canPurchase.value||k.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,Z.sY)(_),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ue.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[(0,l.createVNode)(_o.Z,{"onUpdate:modelValue":e=>i.value=e,modelValue:i.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)(Go,{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,Z.sY)(f),(0,Z.sY)(U),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ue.Z,null,{default:()=>[(0,l.createVNode)(Uo.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,Z.sY)(A)]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)(Uo.Z,null,{default:()=>[(0,l.createVNode)("div",null,[(0,l.createTextVNode)("idk")]),(0,l.createVNode)(d,{width:"0",height:"50px"},null),(0,Z.sY)(q)]})]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)("div",null,[(0,l.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,Z.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,Z.sY)(Q),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Adjust how many points H gives you!")]),(0,l.createVNode)(Do,{"onUpdate:modelValue":e=>s.value=e,modelValue:s.value,min:1,max:30},null)]))),style:{backgroundColor:"#3325CC"}}))),visibility(){return(0,y.Kf)(B.bought.value)},display:"illuminati"}}})));return{id:e,color:o,name:t,points:r,best:n,beep:i,thingy:a,otherThingy:s,spentOnBuyables:u,waffleBoost:m,icecreamCap:c,coolInfo:f,lollipopMilestones:N,funChallenge:k,funEffect:V,generatorUpgrade:x,lollipopMultiplierUpgrade:w,lollipopMultiplierEffect:C,unlockIlluminatiUpgrade:B,quasiUpgrade:P,exhancers:I,respecBuyables:D,sellExhancer:O,bars:{tallBoi:A,longBoi:U,flatBoi:q},tree:K,g:Y,h:J,spook:$,conversion:z,reset:L,hotkeys:W,treeNode:G,resetButton:H,confirmRespec:R,minWidth:800,tabs:ee,display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z.sY)(ee),(0,Z.sY)(X)])))}}));var $t=Jt,Kt=JSON.parse('{"number":{"value":0},"color":{"value":["#00FFFC","#FC00FF","#fffc00"]},"shape":{"type":["circle","triangle"],"options":{}},"opacity":{"value":1,"animation":{"enable":true,"minimumValue":0,"speed":2,"startValue":"max","destroy":"min"}},"size":{"value":4,"random":{"enable":true,"minimumValue":2}},"links":{"enable":false},"life":{"duration":{"sync":true,"value":5},"count":1},"move":{"enable":true,"gravity":{"enable":true,"acceleration":10},"speed":{"min":10,"max":20},"decay":0.1,"direction":"none","straight":false,"outModes":{"default":"destroy","top":"none"}},"rotate":{"value":{"min":0,"max":360},"direction":"random","move":true,"animation":{"enable":true,"speed":60}},"tilt":{"direction":"random","enable":true,"move":true,"value":{"min":0,"max":360},"animation":{"enable":true,"speed":60}},"roll":{"darken":{"enable":true,"value":25},"enable":true,"speed":{"min":15,"max":25}},"wobble":{"distance":30,"enable":true,"move":true,"speed":{"min":-15,"max":15}}}');const Xt=(0,P.createLayer)((()=>{const e="f",o="#FE0102",t="Farms",r=v(0,"farm points"),n=(0,p.ax)(!1),i=ao((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}))),a=(0,p.ax)("Start"),s=Ae((()=>({display(){return{title:"Clicky clicky!",description:(()=>"Current state:<br>"[Symbol.for("+")]?"Current state:<br>"[Symbol.for("+")](a.value):"Current state:<br>"+a.value)()}},initialState:"Start",canClick(){return(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!==")]?a.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==a.value)()},onClick(e){switch(a.value){case"Start":a.value="A new state!";break;case"A new state!":a.value="Keep going!";break;case"Keep going!":a.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const 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;g.addEmitter({particles:Kt,autoPlay:!0,fill:!1,shape:"square",startCount:0,life:{count:1,duration:.1,wait:!1},rate:{delay:0,quantity:100},position:{x:(()=>100*(o?.clientX??0)!==void 0&&100*(o?.clientX??0)!==null&&(100*(o?.clientX??0))[Symbol.for("/")]?(100*(o?.clientX??0))[Symbol.for("/")](window.innerWidth):100*(o?.clientX??0)/window.innerWidth)(),y:(()=>100*(o?.clientY??0)!==void 0&&100*(o?.clientY??0)!==null&&(100*(o?.clientY??0))[Symbol.for("/")]?(100*(o?.clientY??0))[Symbol.for("/")](window.innerHeight):100*(o?.clientY??0)/window.innerHeight)()},size:{width:0,height:0,mode:"precise"}}),a.value="Borkened...";break;default:a.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(a.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}}))),u=Ae((()=>({onClick(){(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("==")]?a.value[Symbol.for("==")]("Borkened..."):"Borkened..."==a.value)()&&(a.value="Start")},display(){return(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("==")]?a.value[Symbol.for("==")]("Borkened..."):"Borkened..."==a.value)()?"Fix the clickable!":"Does nothing"},small:!0}))),m=go((()=>({thingsToReset:()=>[Xt]}))),c=He((()=>({scaling:We(10,.5),baseResource:ll.points,gainResource:r,modifyGainAmount:e=>b.ZP.times(e,$t.otherThingy.value)}))),f=ze((()=>({layerID:e,color:o,reset:m,tooltip(){return f.canClick.value?`${M(r)} ${r.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${M(ll.points)}`},canClick(){return b.ZP.gte(ll.points.value,10)}}))),h=qe((()=>({conversion:c,tree:ll.tree,treeNode:f,display:(0,y.tZ)((()=>h.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)(h.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)(h.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)(h.conversion.nextAt.value),(0,l.createTextVNode)(" points)")])))}))),g=po((()=>({}))),S=(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z.sY)(i),(0,l.createVNode)(Eo,{resource:r,color:o},null),(0,Z.sY)(h),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("You have "),(0,b.Ht)(c.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,Z._4)(u),(0,Z._4)(s),(0,Z.sY)(g)])));return{id:e,color:o,name:t,points:r,boop:n,coolInfo:i,clickable:s,clickableState:a,reset:m,conversion:c,treeNode:f,resetButton:h,display:S}}));var Qt=Xt;function el(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 ol=(0,P.createLayer)((()=>{const e="a",o="yellow",t="Achievements",r=v(0,"achievement power"),n=ne((()=>({display:"A",color:o,tooltip:{display:"Achievements",right:!0},onClick(){ll.showAchievements()}}))),i=ge((()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,l.computed)((()=>i.earned.value?"You did it!":"How did this happen?")),shouldEarn:()=>!0}))),a=ge((()=>({display:"Impossible!",tooltip:(0,l.computed)((()=>a.earned.value?"HOW????":"Mwahahaha!")),style:{color:"#04e050"}}))),s=ge((()=>({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(Qt.points.value,1)},onComplete(){console.log("Bork bork bork!")}}))),u=[i,a,s],m=Re((()=>({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)(U.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(ll.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)()}}))),c=(0,y.tZ)((()=>{let e,o,t;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(ue.Z,null,{default:()=>[(0,l.createVNode)(U.Z,{display:i.tooltip,bottom:!0},el(e=(0,Z.sY)(i))?e:{default:()=>[e]}),(0,l.createVNode)(U.Z,{display:a.tooltip,bottom:!0},el(o=(0,Z.sY)(a))?o:{default:()=>[o]}),(0,l.createVNode)(U.Z,{display:s.tooltip,bottom:!0},el(t=(0,Z.sY)(s))?t:{default:()=>[t]})]}),(0,Z._4)(m)])}));return{id:e,color:o,name:t,points:r,achievements:u,grid:m,treeNode:n,display:c}}));var tl=ol;const ll=(0,P.createLayer)((()=>{const e=v(10),o=g(e),t=S(e),r=(0,l.computed)((()=>{if((()=>void 0!==$t.generatorUpgrade.bought.value&&null!==$t.generatorUpgrade.bought.value&&$t.generatorUpgrade.bought.value[Symbol.for("!")]?$t.generatorUpgrade.bought.value[Symbol.for("!")]():!$t.generatorUpgrade.bought.value)())return new b.ZP(0);let e=new b.ZP(3.19);return $t.lollipopMultiplierUpgrade.bought.value&&(e=e.times($t.lollipopMultiplierEffect.value)),e}));h.globalBus.on("update",(o=>{e.value=b.ZP.add(e.value,b.ZP.times(r.value,o))}));const n=V(e,r),{openModal:i,modal:a}=(0,P.setupLayerModal)(tl),s=ie((()=>({nodes:[[$t.treeNode],[Qt.treeNode,$t.spook]],leftSideNodes:[tl.treeNode,$t.h],branches:[{startNode:Qt.treeNode,endNode:$t.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=(0,l.toRaw)(this.resettingNode.value)===(0,l.toRaw)($t.treeNode)?0:10,o.value=e.value,t.value=e.value},resetPropagation:ae})));return{id:"main",name:"Tree",display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Game Paused")]),[[l.vShow,0===se.Z.devSpeed]]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Dev Speed: "),(0,b.WU)(se.Z.devSpeed||0),(0,l.createTextVNode)("x")]),[[l.vShow,se.Z.devSpeed&&(()=>void 0!==se.Z.devSpeed&&null!==se.Z.devSpeed&&se.Z.devSpeed[Symbol.for("!==")]?se.Z.devSpeed[Symbol.for("!==")](1):1!==se.Z.devSpeed)()]]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Offline Time: "),(0,b.mr)(se.Z.offlineTime||0)]),[[l.vShow,(()=>void 0!==se.Z.offlineTime&&null!==se.Z.offlineTime&&se.Z.offlineTime[Symbol.for("!=")]?se.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=se.Z.offlineTime)()]]),(0,l.createVNode)("div",null,[(0,l.withDirectives)((0,l.createVNode)("span",null,[(0,l.createTextVNode)("You have ")]),[[l.vShow,b.ZP.lt(e.value,"1e1000")]]),(0,l.createVNode)("h2",null,[(0,b.WU)(e.value)]),(0,l.withDirectives)((0,l.createVNode)("span",null,[(0,l.createTextVNode)(" points")]),[[l.vShow,b.ZP.lt(e.value,"1e1e6")]])]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("("),n.value,(0,l.createTextVNode)(")")]),[[l.vShow,b.ZP.gt(r.value,0)]]),(0,l.createVNode)(d,null,null),(0,l.createVNode)("button",{onClick:i},[(0,l.createTextVNode)("open achievements")]),(0,Z.sY)(a),(0,Z.sY)(s),(0,l.createVNode)(m,{height:"200px",style:"margin: 10px auto; display: block"},null)]))),points:e,best:o,total:t,oomps:n,tree:s,showAchievements:i}})),rl=e=>[ll,Qt,$t,tl],nl=(0,l.computed)((()=>b.ZP.gt(ll.points.value,25)));function il(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},createLayer:function(){return h},addLayer:function(){return p},getLayer:function(){return v},removeLayer:function(){return g},reloadLayer:function(){return S},setupLayerModal:function(){return N}});var l=t(4865),r=t(6948),n=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={};function h(e){return(0,a.z2)((()=>{const o={},t=o.emitter=(0,s.i)();return o.on=t.on.bind(t),o.emit=t.emit.bind(t),o.nodes=(0,l.ref)({}),o.minimized=(0,m.ax)(!1),Object.assign(o,e.call(o)),(0,i.yB)(o,"color"),(0,i.yB)(o,"display"),(0,i.yB)(o,"name"),(0,n.Rh)(o,"name",o.id),(0,i.yB)(o,"minWidth"),(0,n.Rh)(o,"minWidth",600),(0,i.yB)(o,"minimizable"),(0,n.Rh)(o,"minimizable",!0),o}))}function p(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,n.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 v(e){return b[e]}function g(e){console.info("Removing layer",e.id),u.globalBus.emit("removeLayer",e),b[e.id]=void 0}function S(e){g(e),p(e,c.Z)}function N(e){const o=(0,l.ref)(!1);return{openModal:()=>o.value=!0,modal:(0,n.tZ)((()=>(0,l.createVNode)(r.Z,{modelValue:o.value,"onUpdate:modelValue":e=>o.value=e},{header:()=>(0,l.createVNode)("h2",null,[(0,l.unref)(e.name)]),body:(0,l.unref)(e.display)})))}}window.layers=b,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},RU:function(){return d},ix:function(){return y},vq:function(){return b},KO:function(){return h},o9:function(){return p},Uv:function(){return v},P5:function(){return g}});var l=t(4865),r=t(9905),n=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(d(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)(n.Z,null,s(o=e.map(m))?o:{default:()=>[o]})}function f(...e){let o;return(0,l.createVNode)(r.Z,null,s(o=e.map(m))?o:{default:()=>[o]})}function d(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 y(e,o){const t=(0,l.ref)(null),r=(0,l.ref)(void 0);function n(e){(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)()&&(t.value=setInterval(a,250)),r.value=e}function i(){t.value&&(clearInterval(t.value),t.value=null)}function a(){o&&o.value?o.value():e&&e.value&&e.value(r.value)}return(0,l.onUnmounted)(i),{start:n,stop:i,handleHolding:a}}function b(e,o="div"){const t=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{t.value=u(v(e),o)})),t}function h(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 p(e){return(0,l.computed)((()=>v(e)))}function v(e){return(0,l.unref)((0,l.unref)(e))}function g(...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),r=t(9365),n=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)({});o({nodes:t});const n={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)(r.RegisterNodeInjectionKey,((e,o)=>{const r=new MutationObserver((()=>i(e)));r.observe(o,n),t.value[e]={element:o,observer:r,rect:o.getBoundingClientRect()},(0,l.nextTick)((()=>i(e)))})),(0,l.provide)(r.UnregisterNodeInjectionKey,(e=>{t.value[e]?.observer.disconnect(),t.value[e]=void 0})),(0,l.provide)(r.NodesInjectionKey,t),(e,o)=>(0,l.renderSlot)(e.$slots,"default")}});const i=n;var a=i},6948:function(e,o,t){"use strict";t.d(o,{Z:function(){return h}});var l=t(4865),r=t(5053);const n=["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||v.value));function p(){t("update:modelValue",!1)}const v=(0,l.ref)(!1),g=(0,l.ref)(null),S=(0,l.computed)((()=>g.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=>v.value=!0),onAfterLeave:t[1]||(t[1]=e=>v.value=!1)},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",(0,l.mergeProps)({class:"modal-mask",onPointerdown:(0,l.withModifiers)(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)(r.Z,{ref_key:"contextRef",ref:g},{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,n),[[l.vShow,e.modelValue]])])),_:3})]))}});const b=y;var h=b},2794:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865);function r(e,o,t,r,n,i){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:o[0]||(o[0]=o=>e.isHovered=!0),onMouseleave:o[1]||(o[1]=o=>e.isHovered=!1)},[(0,l.renderSlot)(e.$slots,"default",{},void 0,!0),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[e.isShown?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tooltip",{top:e.unref(e.top),left:e.unref(e.left),right:e.unref(e.right),bottom:e.unref(e.bottom)}]),style:(0,l.normalizeStyle)({"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"})},[e.comp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.comp),{key:0})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)])),_:1})],34)}var n=t(1604),i=(0,l.defineComponent)({props:{display:(0,n.P5)(Object,String,Function),top:(0,n.P5)(Boolean),left:(0,n.P5)(Boolean),right:(0,n.P5)(Boolean),bottom:(0,n.P5)(Boolean),xoffset:(0,n.P5)(String),yoffset:(0,n.P5)(String),force:(0,n.P5)(Boolean)},setup(e){const{display:o,force:t}=(0,l.toRefs)(e),r=(0,l.ref)(!1),i=(0,l.computed)((()=>((0,n.Uv)(t)||r.value)&&a.value)),a=(0,n.KO)(o);return{isHovered:r,isShown:i,comp:a,unref:l.unref}}}),a=t(3744);const s=(0,a.Z)(i,[["render",r],["__scopeId","data-v-c8952e00"]]);var u=s},3525:function(e,o,t){"use strict";t.d(o,{Z:function(){return m}});var l=t(4865),r=t(1604),n=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,r.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)(n.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),r=t(1604),n=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,r.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)(n.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),r=t(1604);const n={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,r.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",n,[(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),r=t(1037),n=t(9266);const i={class:"table"};var a=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>r.Z[n.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),r=t(1037),n=t(9266);const i={class:"table"};var a=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>r.Z[n.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},2736:function(e,o,t){"use strict";t.r(o),o["default"]="eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiwiaGlkZUNoYWxsZW5nZXMiOmZhbHNlLCJ0aGVtZSI6InBhcGVyIiwic3VidGFicyI6e30sIm1pbmltaXplZCI6e30sIm1vZElEIjoidG10LXgiLCJtb2RWZXJzaW9uIjoiMC4wIiwicG9pbnRzIjoiMzMwMC4zNzc3NzM4NTkwNTUiLCJtYWluIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJmIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImNsaWNrYWJsZXMiOnsiMTEiOiJTdGFydCJ9LCJ1bmxvY2tlZCI6ZmFsc2UsInBvaW50cyI6IjAiLCJib29wIjpmYWxzZX0sImMiOnsidXBncmFkZXMiOlsiMTEiXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImJ1eWFibGVzIjp7IjExIjoiMCJ9LCJjaGFsbGVuZ2VzIjp7IjExIjoiMCJ9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCIsImJlc3QiOiIxIiwidG90YWwiOiIwIiwiYmVlcCI6ZmFsc2UsInRoaW5neSI6InBvaW50eSIsIm90aGVyVGhpbmd5IjoxMCwic3BlbnRPbkJ1eWFibGVzIjoiMCJ9LCJhIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbIjExIl0sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCJ9LCJnIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJoIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9"},7634:function(e,o,t){var l={"./safff.txt":2736};function r(e){var o=n(e);return t(o)}function n(e){if(!t.o(l,e)){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}return l[e]}r.keys=function(){return Object.keys(l)},r.resolve=n,e.exports=r,r.id=7634},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 r=o[l];if(void 0!==r)return r.exports;var n=o[l]={exports:{}};return e[l].call(n.exports,n,n.exports,t),n.exports}t.m=e,function(){var e=[];t.O=function(o,l,r,n){if(!l){var i=1/0;for(m=0;m<e.length;m++){l=e[m][0],r=e[m][1],n=e[m][2];for(var a=!0,s=0;s<l.length;s++)(!1&n||i>=n)&&Object.keys(t.O).every((function(e){return t.O[e](l[s])}))?l.splice(s--,1):(a=!1,n<i&&(i=n));if(a){e.splice(m--,1);var u=r();void 0!==u&&(o=u)}}return o}n=n||0;for(var m=e.length;m>0&&e[m-1][2]>n;m--)e[m]=e[m-1];e[m]=[l,r,n]}}(),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(){var e,o=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};t.t=function(l,r){if(1&r&&(l=this(l)),8&r)return l;if("object"===typeof l&&l){if(4&r&&l.__esModule)return l;if(16&r&&"function"===typeof l.then)return l}var n=Object.create(null);t.r(n);var i={};e=e||[null,o({}),o([]),o(o)];for(var a=2&r&&l;"object"==typeof a&&!~e.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((function(e){i[e]=function(){return l[e]}}));return i["default"]=function(){return l},t.d(n,i),n}}(),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.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(o,l){return t.f[l](e,o),o}),[]))}}(),function(){t.u=function(e){return"js/"+e+".f9b47cea.js"}}(),function(){t.miniCssF=function(e){}}(),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(){var e={},o="profectus:";t.l=function(l,r,n,i){if(e[l])e[l].push(r);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),m=0;m<u.length;m++){var c=u[m];if(c.getAttribute("src")==l||c.getAttribute("data-webpack")==o+n){a=c;break}}a||(s=!0,a=document.createElement("script"),a.charset="utf-8",a.timeout=120,t.nc&&a.setAttribute("nonce",t.nc),a.setAttribute("data-webpack",o+n),a.src=l),e[l]=[r];var f=function(o,t){a.onerror=a.onload=null,clearTimeout(d);var r=e[l];if(delete e[l],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((function(e){return e(t)})),o)return o(t)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),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.p=""}(),function(){var e={143:0};t.f.j=function(o,l){var r=t.o(e,o)?e[o]:void 0;if(0!==r)if(r)l.push(r[2]);else{var n=new Promise((function(t,l){r=e[o]=[t,l]}));l.push(r[2]=n);var i=t.p+t.u(o),a=new Error,s=function(l){if(t.o(e,o)&&(r=e[o],0!==r&&(e[o]=void 0),r)){var n=l&&("load"===l.type?"missing":l.type),i=l&&l.target&&l.target.src;a.message="Loading chunk "+o+" failed.\n("+n+": "+i+")",a.name="ChunkLoadError",a.type=n,a.request=i,r[1](a)}};t.l(i,s,"chunk-"+o,o)}},t.O.j=function(o){return 0===e[o]};var o=function(o,l){var r,n,i=l[0],a=l[1],s=l[2],u=0;if(i.some((function(o){return 0!==e[o]}))){for(r in a)t.o(a,r)&&(t.m[r]=a[r]);if(s)var m=s(t)}for(o&&o(l);u<i.length;u++)n=i[u],t.o(e,n)&&e[n]&&e[n][0](),e[n]=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(1001)}));l=t.O(l)})(); +//# sourceMappingURL=app.55e61c21.js.map \ No newline at end of file diff --git a/js/app.55e61c21.js.map b/js/app.55e61c21.js.map new file mode 100644 index 0000000..21ff750 --- /dev/null +++ b/js/app.55e61c21.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js/app.55e61c21.js","mappings":"qFAgCA,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,GAGnB,IAAYC,GAAZ,SAAYA,GACR,uBACA,mBACA,qBACA,kBAJJ,CAAYA,IAAAA,EAAM,KAOlB,QACIC,QAASL,EACTM,MAAO,IACAN,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,UACb,kBAAmB,MACnB,iBAAkB,GAClB,mBAAoB,OAExBC,cAAc,GAGlBK,OAAQ,IACDP,EACHC,UAAW,IACJD,EAAaC,UAChB,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,OAExBC,cAAc,GAElBM,KAAM,IACCR,EACHC,UAAW,IACJD,EAAaC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AAKgnB,I,GCpFvF,IAAIE,EAAsB7E,EAAoBU,OAAE7rC,EAAW,CAAC,MAAM,WAAa,OAAOmrC,EAAoB,SAC1G6E,EAAsB7E,EAAoBU,EAAEmE,I","sources":["webpack://profectus/./src/data/themes.ts","webpack://profectus/./src/features/feature.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?8e83","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?b115","webpack://profectus/./src/features/trees/TreeNode.vue?649b","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/tooltip.ts","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","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?e251","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?11d4","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?6350","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/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?941d","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/Tooltip.vue?e91b","webpack://profectus/./src/components/Tooltip.vue?b26d","webpack://profectus/./src/components/Tooltip.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/./saves/safff.txt","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/create fake namespace object","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/ensure chunk","webpack://profectus/webpack/runtime/get javascript chunk filename","webpack://profectus/webpack/runtime/get mini-css chunk filename","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/load script","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/publicPath","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}\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};\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\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 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 { isRef, Ref, ref } from \"vue\";\nimport { GenericLayer } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\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> = {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n};\nexport type PersistentRef<T extends State = State> = Ref<T> & Persistent<T>;\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): PersistentRef<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as PersistentRef<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n return persistent as PersistentRef<T>;\n}\n\nexport function makePersistent<T extends State>(\n obj: unknown,\n defaultValue: T\n): asserts obj is Persistent<T> {\n const persistent = obj as Partial<Persistent<T>>;\n const state = ref(defaultValue) as Ref<T>;\n\n persistent[PersistentState] = state;\n persistent[DefaultValue] = isRef(defaultValue) ? (defaultValue.value as T) : defaultValue;\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\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 (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 } 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});\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 { PersistentRef } 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<PersistentRef<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number>(Number),\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) {\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 = `${minWidth}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=3cbf87a6&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=3cbf87a6&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-3cbf87a6\"]])\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-c40c38d8\"),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 \"./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=c40c38d8&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-c40c38d8\"]])\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-51b8996d\"),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 \"./Tooltip.vue\";\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 bottom: \"\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\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 bottom: \"\",\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n bottom: \"\",\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n bottom: \"\",\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n bottom: \"\",\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n })\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 right: \"\",\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n right: \"\",\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n })\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=51b8996d&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-51b8996d\"]])\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>(objectFunc: () => T): T {\n const obj: T | Record<string, never> = {};\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc());\n calculated = true;\n }\n return obj as 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() {\n console.error(\"Layers and features are shallow readonly\");\n return false;\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());\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as 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 { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-28bdfe90\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"left-side-nodes\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"side-nodes\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TreeNode = _resolveComponent(\"TreeNode\")!\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.nodes), (row, index) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({\n class: \"row\",\n key: index\n }, _ctx.$attrs), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row, (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ], 16))\n }), 128)),\n (_ctx.unref(_ctx.leftSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.leftSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.unref(_ctx.rightSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rightSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\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 { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, mergeProps as _mergeProps, withCtx as _withCtx, 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 const _component_Tooltip = _resolveComponent(\"Tooltip\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createBlock(_component_Tooltip, _mergeProps({ key: 0 }, _ctx.tooltipToBind && _ctx.gatherTooltipProps(_ctx.tooltipToBind), {\n display: _ctx.tooltipDisplay,\n force: _ctx.forceTooltip,\n style: { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n class: {\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n small: _ctx.unref(_ctx.small),\n ..._ctx.unref(_ctx.classes)\n }\n }), {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.click && _ctx.click(...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 ]),\n _: 1\n }, 16, [\"display\", \"force\", \"style\", \"class\"]))\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__","import { CoercableComponent } from \"features/feature\";\nimport { ProcessedComputable } from \"util/computed\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport interface Tooltip {\n display: ProcessedComputable<CoercableComponent>;\n top?: ProcessedComputable<boolean>;\n left?: ProcessedComputable<boolean>;\n right?: ProcessedComputable<boolean>;\n bottom?: ProcessedComputable<boolean>;\n xoffset?: ProcessedComputable<string>;\n yoffset?: ProcessedComputable<string>;\n force?: ProcessedComputable<boolean>;\n}\n\nexport function gatherTooltipProps(tooltip: Tooltip) {\n const { display, top, left, right, bottom, xoffset, yoffset, force } = tooltip;\n return { display, top, left, right, bottom, xoffset, yoffset, force };\n}\n","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport TooltipVue from \"components/Tooltip.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { gatherTooltipProps, Tooltip } from \"features/tooltip\";\nimport { ProcessedComputable } from \"util/computed\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\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 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 tooltip: processedPropType<CoercableComponent | Tooltip>(Object, String, Function),\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 forceTooltip: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\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 small: processedPropType<boolean>(Boolean)\n },\n components: {\n Tooltip: TooltipVue,\n MarkNode,\n Node\n },\n setup(props) {\n const { tooltip, forceTooltip, onClick, onHold, display } = toRefs(props);\n\n function click(e: MouseEvent) {\n if (e.shiftKey && tooltip) {\n forceTooltip.value = !forceTooltip.value;\n } else {\n unref(onClick)?.();\n }\n }\n\n const comp = computeOptionalComponent(display);\n const tooltipDisplay = shallowRef<ProcessedComputable<CoercableComponent> | undefined>(\n undefined\n );\n watchEffect(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n tooltipDisplay.value = currTooltip.display;\n return;\n }\n tooltipDisplay.value = currTooltip;\n });\n const tooltipToBind = computed(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n return currTooltip;\n }\n return null;\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n click,\n start,\n stop,\n comp,\n tooltipDisplay,\n tooltipToBind,\n unref,\n Visibility,\n gatherTooltipProps,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=82704be4&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=82704be4&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-82704be4\"]])\n\nexport default __exports__","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}\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=61b3869c&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-61b3869c\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { processedPropType } from \"util/vue\";\nimport { defineComponent, unref } from \"vue\";\nimport TreeNode from \"./TreeNode.vue\";\nimport Links from \"features/links/Links.vue\";\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: { TreeNode, Links },\n setup() {\n function gatherNodeProps(node: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n } = node;\n return {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n };\n }\n\n return {\n gatherNodeProps,\n unref\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=28bdfe90&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=ts\"\nexport * from \"./Tree.vue?vue&type=script&lang=ts\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=28bdfe90&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-28bdfe90\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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 { Tooltip } from \"features/tooltip\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport { persistent } from \"game/persistence\";\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 tooltip?: Computable<string | Tooltip>;\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 forceTooltip: Ref<boolean>;\n type: typeof TreeNodeType;\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 tooltip: GetComputableType<T[\"tooltip\"]>;\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: () => T & ThisType<TreeNode<T>>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode: T & Partial<BaseTreeNode> = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n\n if (treeNode.tooltip) {\n treeNode.forceTooltip = persistent(false);\n } else {\n // If we don't have a tooltip, no point in making this persistent\n treeNode.forceTooltip = ref(false);\n }\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, \"tooltip\");\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 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: () => T & ThisType<Tree<T>>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree: T & Partial<BaseTree> = 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);\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 Tooltip from \"components/Tooltip.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 Tooltip\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=2e1ea71d&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=2e1ea71d&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-2e1ea71d\"]])\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 GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, makePersistent, PersistentState } 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: () => T & ThisType<Achievement<T>>\n): Achievement<T> {\n return createLazyProxy(() => {\n const achievement: T & Partial<BaseAchievement> = optionsFunc();\n makePersistent<boolean>(achievement, false);\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 });\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Grid<T>>\n): Grid<T> {\n return createLazyProxy(() => {\n const grid: T & Partial<BaseGrid> = optionsFunc();\n makePersistent(grid, {});\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 });\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 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: () => T & ThisType<Clickable<T>>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable: T & Partial<BaseClickable> = 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, 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 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}\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 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 }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n 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\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 unref(resetButton.conversion.currentGain)\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n Next:{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n unref(resetButton.conversion.nextAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gt(unref(resetButton.conversion.currentGain), 0)\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: () => 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 Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n convertComputable,\n DoNotCache,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, isRef, Ref, unref } from \"vue\";\nimport { Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: 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?: GainModifier;\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 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 nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport interface GainModifier {\n apply: (gain: DecimalSource) => DecimalSource;\n revert: (gain: DecimalSource) => DecimalSource;\n}\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: () => T & ThisType<Conversion<T>>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion: T = 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 (!conversion.buyMax) {\n gain = gain.min(1);\n }\n return gain;\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, \"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 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 nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\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 nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\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: () => S & ThisType<Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: () => S & ThisType<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 Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n )\n .add(1)\n .max(1)\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\nexport function createAdditiveModifier(addend: Computable<DecimalSource>): GainModifier {\n const processedAddend = convertComputable(addend);\n return {\n apply: gain => Decimal.add(gain, unref(processedAddend)),\n revert: gain => Decimal.sub(gain, unref(processedAddend))\n };\n}\n\nexport function createMultiplicativeModifier(multiplier: Computable<DecimalSource>): GainModifier {\n const processedMultiplier = convertComputable(multiplier);\n return {\n apply: gain => Decimal.times(gain, unref(processedMultiplier)),\n revert: gain => Decimal.div(gain, unref(processedMultiplier))\n };\n}\n\nexport function createExponentialModifier(exponent: Computable<DecimalSource>): GainModifier {\n const processedExponent = convertComputable(exponent);\n return {\n apply: gain => Decimal.pow(gain, unref(processedExponent)),\n revert: gain => Decimal.root(gain, unref(processedExponent))\n };\n}\n\nexport function createSequentialModifier(...modifiers: GainModifier[]): GainModifier {\n return {\n apply: gain => modifiers.reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: gain => modifiers.reduceRight((gain, modifier) => modifier.revert(gain), gain)\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Infobox<T>>\n): Infobox<T> {\n return createLazyProxy(() => {\n const infobox: T & Partial<BaseInfobox> = optionsFunc();\n makePersistent<boolean>(infobox, false);\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 });\n}\n","import { resolveComponent as _resolveComponent, mergeProps as _mergeProps, createVNode as _createVNode, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4bdd63c1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n ref: \"resizeListener\",\n class: \"resize-listener\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Particles = _resolveComponent(\"Particles\", true)!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(_component_Particles, _mergeProps({\n id: _ctx.id,\n class: {\n 'not-fullscreen': !_ctx.fullscreen\n },\n style: {\n zIndex: _ctx.zIndex\n },\n ref: \"particles\",\n particlesInit: _ctx.particlesInit,\n particlesLoaded: _ctx.particlesLoaded,\n options: {\n fpsLimit: 60,\n fullScreen: { enable: _ctx.fullscreen, zIndex: _ctx.zIndex },\n particles: {\n number: {\n value: 0\n }\n },\n emitters: {\n autoPlay: false\n }\n }\n }, _ctx.$attrs), null, 16, [\"id\", \"class\", \"style\", \"particlesInit\", \"particlesLoaded\", \"options\"]),\n _createElementVNode(\"div\", _hoisted_1, null, 512)\n ], 64))\n}","\nimport { loadFull } from \"tsparticles\";\nimport { Engine, Container } from \"tsparticles-engine\";\nimport { Emitters } from \"tsparticles-plugin-emitters/Emitters\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { defineComponent, inject, nextTick, onMounted, PropType, ref } from \"vue\";\nimport { ParticlesComponent } from \"particles.vue3\";\nimport { FeatureNode, NodesInjectionKey } from \"game/layers\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n zIndex: {\n type: Number,\n required: true\n },\n fullscreen: {\n type: Boolean,\n required: true\n },\n onInit: {\n type: Function as PropType<(container: EmitterContainer & Container) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>\n },\n components: { Particles: ParticlesComponent },\n setup(props) {\n const particles = ref<null | { particles: { container: Emitters } }>(null);\n\n async function particlesInit(engine: Engine) {\n await loadFull(engine);\n }\n\n function particlesLoaded(container: EmitterContainer & Container) {\n props.onInit(container);\n }\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<Element | 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 }\n updateBounds();\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) as FeatureNode[]).forEach(\n node => (node.rect = node.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n }\n isDirty = true;\n });\n }\n }\n\n return {\n particles,\n particlesInit,\n particlesLoaded,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=4bdd63c1&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=4bdd63c1&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-4bdd63c1\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Container } from \"tsparticles-engine\";\nimport { IEmitter } from \"tsparticles-plugin-emitters/Options/Interfaces/IEmitter\";\nimport { EmitterInstance } from \"tsparticles-plugin-emitters/EmitterInstance\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { Ref, shallowRef } from \"vue\";\nimport { Component, GatherProps, getUniqueID, Replace, setDefault } from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n fullscreen?: boolean;\n zIndex?: number;\n onContainerResized?: (boundingRect: DOMRect) => void;\n}\n\nexport interface BaseParticles {\n id: string;\n containerRef: Ref<null | (EmitterContainer & Container)>;\n addEmitter: (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ) => Promise<EmitterInstance>;\n removeEmitter: (emitter: EmitterInstance) => void;\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 fullscreen: undefined extends T[\"fullscreen\"] ? true : T[\"fullscreen\"];\n zIndex: undefined extends T[\"zIndex\"] ? 1 : T[\"zIndex\"];\n }\n>;\n\nexport type GenericParticles = Replace<\n Particles<ParticlesOptions>,\n {\n fullscreen: boolean;\n zIndex: number;\n }\n>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: () => T & ThisType<Particles<T>>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles: T & Partial<BaseParticles> = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.containerRef = shallowRef(null);\n particles.addEmitter = (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ): Promise<EmitterInstance> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.containerRef.value) {\n // TODO why does addEmitter require a position parameter\n return Promise.resolve(genericParticles.containerRef.value.addEmitter(options));\n }\n return new Promise<EmitterInstance>(resolve => {\n emittersToAdd.push({ resolve, options });\n });\n };\n particles.removeEmitter = (emitter: EmitterInstance) => {\n // TODO I can't find a proper way to remove an emitter without accessing private functions\n emitter.emitters.removeEmitter(emitter);\n };\n\n let emittersToAdd: {\n resolve: (value: EmitterInstance | PromiseLike<EmitterInstance>) => void;\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] };\n }[] = [];\n\n function onInit(container: EmitterContainer & Container) {\n (particles as GenericParticles).containerRef.value = container;\n emittersToAdd.forEach(({ resolve, options }) => resolve(container.addEmitter(options)));\n emittersToAdd = [];\n }\n\n setDefault(particles, \"fullscreen\", true);\n setDefault(particles, \"zIndex\", 1);\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, fullscreen, zIndex, onContainerResized } = this;\n return {\n id,\n fullscreen,\n zIndex,\n onContainerResized,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n","import { getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport {\n DefaultValue,\n Persistent,\n persistent,\n PersistentRef,\n PersistentState\n} 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: () => T & ThisType<Reset<T>>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset: T & Partial<BaseReset> = 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): PersistentRef<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 { 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-8adbf51e\"),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 \"../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=8adbf51e&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-8adbf51e\"]])\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);\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=3b196306&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-3b196306\"]])\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 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>(optionsFunc: () => T & ThisType<Bar<T>>): Bar<T> {\n return createLazyProxy(() => {\n const bar: T & Partial<BaseBar> = 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, makePersistent, PersistentState } 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 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: () => T & ThisType<Buyable<T>>\n): Buyable<T> {\n return createLazyProxy(() => {\n const buyable: T & Partial<BaseBuyable> = 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 makePersistent<DecimalSource>(buyable, 0);\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 });\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 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, PersistentRef } 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: PersistentRef<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: PersistentRef<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: () => T & ThisType<Challenge<T>>\n): Challenge<T> {\n return createLazyProxy(() => {\n const challenge: T & Partial<BaseChallenge> = 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 = persistent(0);\n challenge.active = persistent(false);\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 { 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: () => T & ThisType<Hotkey<T>>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey: T & Partial<BaseHotkey> = 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, 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: (() => T) & ThisType<Links<T>>\n): Links<T> {\n return createLazyProxy(() => {\n const links: T & Partial<BaseLinks> = 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 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 { makePersistent, 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: () => T & ThisType<Milestone<T>>\n): Milestone<T> {\n return createLazyProxy(() => {\n const milestone: T & Partial<BaseMilestone> = optionsFunc();\n makePersistent<boolean>(milestone, false);\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 });\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 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>(optionsFunc: () => T & ThisType<Tab<T>>): Tab<T> {\n return createLazyProxy(() => {\n const tab: T & Partial<BaseTab> = 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=86da8746&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=86da8746&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-86da8746\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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, makePersistent, PersistentState } 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 tabs: Record<string, TabButtonOptions>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\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 optionsFunc: () => T & ThisType<TabFamily<T>>\n): TabFamily<T> {\n return createLazyProxy(() => {\n const tabFamily: T & Partial<BaseTabFamily> = optionsFunc();\n\n if (Object.keys(tabFamily.tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\", tabFamily);\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n makePersistent<string>(tabFamily, Object.keys(tabFamily.tabs)[0]);\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 for (const tab in tabFamily.tabs) {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabFamily.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 }\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 });\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 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, makePersistent, 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: () => T & ThisType<Upgrade<T>>\n): Upgrade<T> {\n return createLazyProxy(() => {\n const upgrade: T & Partial<BaseUpgrade> = optionsFunc();\n makePersistent<boolean>(upgrade, false);\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 });\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 createAdditiveModifier,\n createCumulativeConversion,\n createExponentialModifier,\n createPolynomialScaling,\n createSequentialModifier\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 { createTree, createTreeNode, GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\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 layer = createLayer(() => {\n const id = \"c\";\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),\n createAdditiveModifier(1)\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\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\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 tabs: {\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 style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n }));\n\n const tabs = createTabFamily(() => ({\n tabs: {\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(\n icecreamCap.value\n )}`}\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\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 { createLayer } from \"game/layers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { IParticlesOptions } from \"tsparticles-engine\";\nimport { render, renderRow } from \"util/vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst layer = createLayer(() => {\n const id = \"f\";\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 particles.addEmitter({\n // TODO this case is annoying but required because move.direction is a string rather than keyof MoveDirection\n particles: confetti as unknown as IParticlesOptions,\n autoPlay: true,\n fill: false,\n shape: \"square\",\n startCount: 0,\n life: {\n count: 1,\n duration: 0.1,\n wait: false\n },\n rate: {\n delay: 0,\n quantity: 100\n },\n position: {\n x: (100 * (pos?.clientX ?? 0)) / window.innerWidth,\n y: (100 * (pos?.clientY ?? 0)) / window.innerHeight\n },\n size: {\n width: 0,\n height: 0,\n mode: \"precise\"\n }\n });\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: gain => Decimal.times(gain, c.otherThingy.value)\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\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\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 \"components/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 layer = createLayer(() => {\n const id = \"a\";\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(() => {\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 id: \"main\",\n name: \"Tree\",\n display: jsx(() => (\n <>\n <div v-show={player.devSpeed === 0}>Game Paused</div>\n <div v-show={player.devSpeed && player.devSpeed !== 1}>\n Dev Speed: {format(player.devSpeed || 0)}x\n </div>\n <div v-show={player.offlineTime != undefined}>\n Offline Time: {formatTime(player.offlineTime || 0)}\n </div>\n <div>\n <span v-show={Decimal.lt(points.value, \"1e1000\")}>You have </span>\n <h2>{format(points.value)}</h2>\n <span v-show={Decimal.lt(points.value, \"1e1e6\")}> points</span>\n </div>\n <div v-show={Decimal.gt(pointGain.value, 0)}>({oomps.value})</div>\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 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, PersistentRef } 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 id: string;\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>;\n}\n\nexport interface BaseLayer {\n minimized: PersistentRef<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\"], T[\"id\"]>;\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 function createLayer<T extends LayerOptions>(\n optionsFunc: (() => T) & ThisType<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\n layer.minimized = persistent(false);\n\n Object.assign(layer, optionsFunc.call(layer));\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 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 | JSXFunction | \"\"> {\n const comp = shallowRef<Component | JSXFunction | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | JSXFunction | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | JSXFunction | \"\" | null> {\n const comp = shallowRef<Component | JSXFunction | \"\" | 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 { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode } from \"vue\"\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 }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, 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.top),\n left: _ctx.unref(_ctx.left),\n right: _ctx.unref(_ctx.right),\n bottom: _ctx.unref(_ctx.bottom)\n }]),\n style: _normalizeStyle({\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n })\n }, [\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, ref, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n top: processedPropType<boolean>(Boolean),\n left: processedPropType<boolean>(Boolean),\n right: processedPropType<boolean>(Boolean),\n bottom: processedPropType<boolean>(Boolean),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n force: processedPropType<boolean>(Boolean)\n },\n setup(props) {\n const { display, force } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(force) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n return {\n isHovered,\n isShown,\n comp,\n unref\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=c8952e00&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=c8952e00&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-c8952e00\"]])\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__","export default \"eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxN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VzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbIjExIl0sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCJ9LCJnIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJoIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9\";","var map = {\n\t\"./safff.txt\": 2736\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7634;","// 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\t// no module.id needed\n\t\t// no module.loaded needed\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// 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};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + chunkId + \".\" + \"f9b47cea\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\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); }","var inProgress = {};\nvar dataWebpackPrefix = \"profectus:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// 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__.p = \"\";","// 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__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\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__(1001); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["defaultTheme","variables","floatingTabs","mergeAdjacent","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","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","async","startGameLoop","watch","PersistentState","DefaultValue","persistent","defaultValue","ref","makePersistent","state","layer","saveData","features","path","foundPersistent","persistentState","reduce","acc","curr","savedValue","includes","foundPersistentInChild","console","warn","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","error","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","style","color","showGoBack","onClick","args","goBack","minimized","$event","classes","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","display","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","tabValue","flexGrow","flexShrink","width","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","map","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","options","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","slice","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","element","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","bottom","yoffset","xoffset","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","Error","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","add","lt","constructor","this","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","split","heightparts","result","tetrationparts","powparts","trim","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","bind","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","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","overrideAmount","_component_TreeNode","_component_Links","row","node","nodeIndex","gatherNodeProps","forceTooltip","leftSideNodes","rightSideNodes","branches","links","_component_MarkNode","_component_Node","_component_Tooltip","visibility","tooltipToBind","gatherTooltipProps","tooltipDisplay","force","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","inject","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","tooltip","top","onHold","MarkNode","Node","shiftKey","shallowRef","currTooltip","isCoercableComponent","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeObserver","ResizeObserver","updateNodes","NodesInjectionKey","resizeListener","onMounted","resListener","observe","isDirty","getBoundingClientRect","values","validLinks","filter","Link","TreeNode","Links","TreeNodeType","TreeType","createTreeNode","optionsFunc","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","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","currentGain","baseResource","nextAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","gain","gainModifier","apply","scaling","buyMax","next","roundUpCost","createPolynomialScaling","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","createAdditiveModifier","addend","processedAddend","createExponentialModifier","processedExponent","createSequentialModifier","modifiers","modifier","reduceRight","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","_component_Particles","fullscreen","particlesInit","particlesLoaded","fpsLimit","fullScreen","enable","particles","number","emitters","autoPlay","onInit","onContainerResized","Particles","engine","container","updateBounds","ParticlesType","createParticles","containerRef","addEmitter","genericParticles","Promise","resolve","emittersToAdd","removeEmitter","emitter","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","fullWidth","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","direction","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","Challenge","completions","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","ctrlKey","enabled","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","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","processedTabFamily","firstTab","find","tabButton","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","textDecoration","g","h","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","fill","shape","startCount","life","count","duration","wait","rate","delay","quantity","clientX","innerWidth","clientY","innerHeight","size","mode","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","openModal","setupLayerModal","toRaw","showAchievements","oldVersion","on","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","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","isShown","onMouseenter","isHovered","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","webpackContext","req","webpackContextResolve","__webpack_require__","o","code","module","exports","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","__proto__","then","ns","create","def","current","indexOf","getOwnPropertyNames","definition","defineProperty","chunkId","all","promises","u","miniCssF","globalThis","hasOwnProperty","inProgress","dataWebpackPrefix","url","needAttach","scripts","getElementsByTagName","getAttribute","charset","timeout","nc","setAttribute","onScriptComplete","onerror","onload","doneFns","head","toStringTag","p","installedChunks","installedChunkData","promise","reject","loadingEnded","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.a008bbca.js b/js/app.a008bbca.js deleted file mode 100644 index 489c4d5..0000000 --- a/js/app.a008bbca.js +++ /dev/null @@ -1,2 +0,0 @@ -(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};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={}))},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,7144))).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 s},nY:function(){return u},ax:function(){return m},Mv:function(){return c}});var l=t(7302),n=t(5613),r=t(3273),i=t(3577),a=t(4865);const s=Symbol("PersistentState"),u=Symbol("DefaultValue");function m(e){const o=(0,a.isRef)(e)?e:(0,a.ref)(e);return o[s]=o,o[u]=(0,a.isRef)(e)?e.value:e,o}function c(e,o){const t=e,l=(0,a.ref)(o);t[s]=l,t[u]=(0,a.isRef)(o)?o.value:o}l.globalBus.on("addLayer",((e,o)=>{const t=[],l=(e,m=[])=>{let c=!1;return Object.keys(e).forEach((f=>{const d=e[f];if(d&&"object"===typeof d)if((()=>void 0!==s&&null!==s&&s[Symbol.for("in")]?s[Symbol.for("in")](d):s in d)()){c=!0;const e=m.reduce(((e,o)=>((()=>o in e!==void 0&&o in e!==null&&(o in e)[Symbol.for("!")]?(o in e)[Symbol.for("!")]():!(o in e))()&&(e[o]={}),e[o])),o),t=e[f];e[f]=d[s],(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](null):null!=t)()?e[f].value=t:e[f].value=d[u]}else if((()=>d instanceof n.ZP!==void 0&&d instanceof n.ZP!==null&&(d instanceof n.ZP)[Symbol.for("!")]?(d instanceof n.ZP)[Symbol.for("!")]():!(d instanceof n.ZP))()&&(()=>void 0!==(0,a.isRef)(d)&&null!==(0,a.isRef)(d)&&(0,a.isRef)(d)[Symbol.for("!")]?(0,a.isRef)(d)[Symbol.for("!")]():!(0,a.isRef)(d))()&&(()=>void 0!==t.includes(d)&&null!==t.includes(d)&&t.includes(d)[Symbol.for("!")]?t.includes(d)[Symbol.for("!")]():!t.includes(d))()){"symbol"===typeof d.type&&t.push(d);const o=l(d,[...m,f]);o&&((0,i.kJ)(d)&&(()=>void 0!==(0,i.kJ)(e)&&null!==(0,i.kJ)(e)&&(0,i.kJ)(e)[Symbol.for("!")]?(0,i.kJ)(e)[Symbol.for("!")]():!(0,i.kJ)(e))()?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",(()=>void 0!==r.Le&&null!==r.Le&&r.Le[Symbol.for("in")]?r.Le[Symbol.for("in")](e):r.Le in e)()?e[r.Le]:e,f):c=!0)}})),c};l(e)}))},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:[]})},2782: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),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=u.value();(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](void 0):void 0!=t)()&&(e?(t.style.flexGrow="0",t.style.flexShrink="0",t.style.width="60px",t.style.minWidth=t.style.flexBasis="",t.style.margin="0"):(t.style.flexGrow="",t.style.flexShrink="",t.style.width="",t.style.minWidth=t.style.flexBasis=`${o}px`,t.style.margin=""))}return(0,l.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-3cbf87a6"]]);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)()))),v=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 g=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);return o({open(){t.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(b.Z,{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[p])),body:(0,l.withCtx)((()=>[v])),_:1},8,["modelValue"]))}});const S=(0,f.Z)(g,[["__scopeId","data-v-5f8298e6"]]);var N=S,k=t(9266),V=t(5613);const M=e=>((0,l.pushScopeId)("data-v-3eb46986"),e=e(),(0,l.popScopeId)(),e),x={class:"info-modal-header"},w=["src","alt"],C={class:"info-modal-title"},Z={key:0},B={key:0},P={key:0},E=M((()=>(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)()))),I=M((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),T=M((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),F=["href"],R=M((()=>(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),j=M((()=>(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)()))),D=M((()=>(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)()))),O=M((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var _=(0,l.defineComponent)({props:{changelog:null},setup(e,{expose:o}){const t=e,{title:a,logo:u,author:m,discordName:c,discordLink:f,versionNumber:d,versionTitle:y}=i,h=(0,l.toRefs)(t),p=(0,l.ref)(!1),v=(0,l.computed)((()=>(0,V.mr)(s.Z.timePlayed))),g=(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",x,[(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,w)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",C,[(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,I,(0,l.createElementVNode)("div",{class:"link",onClick:S},"Changelog"),T,(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"},[R,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(c))):" "+(0,l.toDisplayString)((0,l.unref)(c)))(),1)],8,F)):(0,l.createCommentVNode)("",!0)]),j,D,O,(0,l.createElementVNode)("div",null,(()=>"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(v))):"Time Played: "+(0,l.toDisplayString)((0,l.unref)(v)))(),1),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(g))))])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const A=(0,f.Z)(_,[["__scopeId","data-v-3eb46986"]]);var U=A,q=t(1037),z=t(1349),L=t(3525),W=t(9868),G=t(2794);const H=e=>((0,l.pushScopeId)("data-v-c40c38d8"),e=e(),(0,l.popScopeId)(),e),Y=H((()=>(0,l.createElementVNode)("div",{class:"header"},[(0,l.createElementVNode)("h2",null,"Options")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),J=H((()=>(0,l.createElementVNode)("hr",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var $=(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)(G.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),v=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Autosave"),(0,l.createVNode)(G.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),g=(0,n.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Pause game"),(0,l.createVNode)(G.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)((()=>[Y])),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)(W.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"]),J,(0,l.createVNode)(W.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)(W.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)(W.Z,{title:(0,l.unref)(v),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)(W.Z,{key:0,title:(0,l.unref)(g),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 K=(0,f.Z)($,[["__scopeId","data-v-c40c38d8"]]);var X=K,Q=(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],ve=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"edit",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ge=[ve],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],Me=fe((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"close",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),xe=[Me],we={key:2,class:"details"},Ce={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"},Ie=fe((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Te=(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"},ge)):(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"},xe)])),(()=>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",we,[(0,l.createElementVNode)("button",{class:"button open",onClick:t[6]||(t[6]=e=>o("open"))},[(0,l.createElementVNode)("h3",null,(0,l.toDisplayString)((0,l.unref)(n).name),1)]),(0,l.createElementVNode)("span",Ce,(()=>"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),Ie,(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(n).error),1)]))],2))}});const Fe=(0,f.Z)(Te,[["__scopeId","data-v-6a0cf7ac"]]);var Re=Fe,je=t(9980),De=t.n(je);const Oe=e=>((0,l.pushScopeId)("data-v-7d95f59e"),e=e(),(0,l.popScopeId)(),e),_e=Oe((()=>(0,l.createElementVNode)("h2",null,"Saves Manager",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ae={class:"modal-footer"},Ue={class:"field"},qe=Oe((()=>(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"},We=Oe((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Ge=(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,Q.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,Q.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,Q.a1)();const o={...d.value[e],id:(0,Q.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 v(e){d.value[s.Z.id].time=s.Z.time,(0,Q.a1)(),(0,Q.uW)(d.value[e]),c[e]=void 0}function g(e){const o=JSON.parse(decodeURIComponent(escape(atob(e))));o.id=(0,Q.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,Q.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)((()=>[_e])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(De()),{key:0,list:(0,l.unref)(k.ZP).saves,handle:".handle",itemKey:e=>e},{item:(0,l.withCtx)((({element:e})=>[(0,l.createVNode)(Re,{save:(0,l.unref)(d)[e],onOpen:o=>v(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)(Q.xM)&&(0,l.unref)(Q.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=>g(e)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,l.createCommentVNode)("",!0)])]),(0,l.createElementVNode)("div",Le,[We,(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)(Ge,[["__scopeId","data-v-7d95f59e"]]);var Ye=He;const Je=e=>((0,l.pushScopeId)("data-v-1378eac7"),e=e(),(0,l.popScopeId)(),e),$e=["src","alt"],Ke={key:1,class:"title"},Xe=Je((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Qe={class:"discord"},eo={class:"discord-links"},oo={key:0},to=["href"],lo=Je((()=>(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)()))),no=Je((()=>(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)()))),ro={href:"https://forums.moddingtree.com/",target:"_blank"},io=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ao=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),so=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),uo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),mo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),co=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),fo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),yo={href:"https://forums.moddingtree.com/",target:"_blank"},bo=Je((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ho={class:"discord"},po={class:"discord-links"},vo={key:0},go=["href"],So=Je((()=>(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)()))),No=Je((()=>(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 ko=(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,$e)):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ke,(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)(G.Z,{display:"Changelog",bottom:"",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1})]),Xe,(0,l.createElementVNode)("div",Qe,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",eo,[(()=>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",oo,[(0,l.createElementVNode)("a",{href:(0,l.unref)(c),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(m)),9,to)])):(0,l.createCommentVNode)("",!0),lo,no])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",ro,[(0,l.createVNode)(G.Z,{display:"Forums",bottom:"",yoffset:"5px"},{default:(0,l.withCtx)((()=>[io])),_:1})])]),(0,l.createElementVNode)("div",{onClick:i[1]||(i[1]=e=>o.value?.open())},[(0,l.createVNode)(G.Z,{display:"Info",bottom:"",class:"info"},{default:(0,l.withCtx)((()=>[ao])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[2]||(i[2]=e=>t.value?.open())},[(0,l.createVNode)(G.Z,{display:"Saves",bottom:"",xoffset:"-20px"},{default:(0,l.withCtx)((()=>[so])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[3]||(i[3]=e=>n.value?.open())},[(0,l.createVNode)(G.Z,{display:"Options",bottom:"",xoffset:"-66px"},{default:(0,l.withCtx)((()=>[uo])),_:1})])],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)(G.Z,{display:"Changelog",right:"",xoffset:"25%",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(f))):"v"+(0,l.toDisplayString)((0,l.unref)(f)))(),1)])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[5]||(i[5]=e=>t.value?.open())},[(0,l.createVNode)(G.Z,{display:"Saves",right:""},{default:(0,l.withCtx)((()=>[mo])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[6]||(i[6]=e=>n.value?.open())},[(0,l.createVNode)(G.Z,{display:"Options",right:""},{default:(0,l.withCtx)((()=>[co])),_:1})]),(0,l.createElementVNode)("div",{onClick:i[7]||(i[7]=e=>o.value?.open())},[(0,l.createVNode)(G.Z,{display:"Info",right:""},{default:(0,l.withCtx)((()=>[fo])),_:1})]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",yo,[(0,l.createVNode)(G.Z,{display:"Forums",right:"",xoffset:"7px"},{default:(0,l.withCtx)((()=>[bo])),_:1})])]),(0,l.createElementVNode)("div",ho,[(0,l.createElementVNode)("span",{onClick:d,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",po,[(()=>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,go)])):(0,l.createCommentVNode)("",!0),So,No])])],16)),(0,l.createVNode)(U,{ref_key:"info",ref:o,changelog:r.value},null,8,["changelog"]),(0,l.createVNode)(Ye,{ref_key:"savesManager",ref:t},null,512),(0,l.createVNode)(X,{ref_key:"options",ref:n},null,512),(0,l.createVNode)(N,{ref_key:"changelog",ref:r},null,512)],64))}});const Vo=(0,f.Z)(ko,[["__scopeId","data-v-1378eac7"]]);var Mo=Vo;const xo={class:"tabs-container"},wo={class:"inner-tab"},Co={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,links:s,minimizable:u,nodes:m}=e;return{display:o,minimized:t,minWidth:l,name:n,color:r,style:i,classes:a,links:s,minimizable:u,nodes:m}}return(e,i)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",xo,[((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",wo,[(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",Co)):(0,l.createCommentVNode)("",!0)])))),128))]))}});const Bo=(0,f.Z)(Zo,[["__scopeId","data-v-5fcfaa6f"]]);var Po=Bo,Eo=t(7144);const Io=e=>((0,l.pushScopeId)("data-v-06188cc8"),e=e(),(0,l.popScopeId)(),e),To={class:"game-over-modal-header"},Fo=["src","alt"],Ro={class:"game-over-modal-title"},jo=Io((()=>(0,l.createElementVNode)("h2",null,"Congratulations!",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Do={key:0},Oo=Io((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),_o=Io((()=>(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=Io((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Uo=["href"],qo=Io((()=>(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,Q.uW)((0,Q.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",To,[(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,Fo)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Ro,[jo,(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",Do,[(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),Oo,_o,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)(W.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 Wo=Lo,Go=t(3032);const Ho=e=>((0,l.pushScopeId)("data-v-5935214c"),e=e(),(0,l.popScopeId)(),e),Yo=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)()))),Jo={key:0},$o=Ho((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ko=["href"],Xo=Ho((()=>(0,l.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Qo=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)(Go.Z,"hasNaN"),a=(0,l.ref)(null),u=(0,l.computed)((()=>Go.Z.NaNPath.join("."))),m=(0,l.computed)((()=>Go.Z.NaNPath.slice((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())[0])),c=(0,l.computed)((()=>Go.Z.NaNReceiver&&m.value?Go.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(){Go.Z.NaNReceiver&&m.value&&(Go.Z.NaNReceiver[m.value]=new V.ZP(0),Go.Z.hasNaN=!1)}function y(){Go.Z.NaNReceiver&&m.value&&(Go.Z.NaNReceiver[m.value]=new V.ZP(1),Go.Z.hasNaN=!1)}function h(){Go.Z.NaNReceiver&&m.value&&(Go.Z.NaNReceiver[m.value]=new V.ZP(NaN),Go.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)((()=>[Yo])),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",Jo,(()=>(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)]),$o,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(t),class:"nan-modal-discord-link"},[Xo,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(o))):" "+(0,l.toDisplayString)((0,l.unref)(o)))(),1)],8,Ko)]),Qo,(0,l.createVNode)(W.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)(W.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)(Ye,{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(Go.Z.lastTenTicks.length,Go.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){function o(){}const t=i.useHeader,a=(0,l.computed)((()=>q.Z[k.ZP.theme].variables)),s=(0,l.toRef)(k.ZP,"showTPS"),u=(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)(a))},null,4),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["app",{useHeader:(0,l.unref)(t)}]),onMousemove:o,style:(0,l.normalizeStyle)((0,l.unref)(a))},[(0,l.unref)(t)?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Po),(0,l.unref)((0,l.unref)(s))?((0,l.openBlock)(),(0,l.createBlock)(st,{key:1})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Wo),(0,l.createVNode)(lt),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(u))))],38)],64))}});const mt=(0,f.Z)(ut,[["__scopeId","data-v-fbb1e278"]]);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,Q.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,v=Math.log10(9e15),g=(()=>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,M=!1,x=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)()]}}(),w=[2,Math.E,3,4,5,6,7,8,9,10],C=[[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 O.fromValue_noAlloc(e)},P=function(e,o,t){return O.fromComponents(e,o,t)},E=function(e,o,t){return O.fromComponents_noNormalize(e,o,t)},I=function(e,o){const t=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),l=Math.ceil(Math.log10(Math.abs(e))),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)))},T=function(e){return(()=>void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e)))()},F=function(e){if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))())return e;if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50)())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let o=1;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)())o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](e):o*e)(),(()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})();e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)();let t=.9189385332046727;t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]((e+.5)*Math.log(e)):t+(e+.5)*Math.log(e))(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();const l=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let 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)()},R=.5671432904097838,j=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 R;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 D(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===O.dZero)return e;if(e===O.dOne)return B(R);O.abs(e);t=O.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=O.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(O.mul(2,t).add(2))))),O.abs(r.sub(t)).lt(O.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 O{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 O||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(0===this.sign)return 0;if(0===this.layer){const e=Math.floor(Math.log10(this.mag));let o;return o=5e-324===this.mag?5:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("/")]?this.mag[Symbol.for("/")](x(e)):this.mag/x(e))(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o):this.sign*o)()}if(1===this.layer){const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](Math.floor(this.mag)):this.mag-Math.floor(this.mag))();return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,e)):this.sign*Math.pow(10,e))()}return this.sign}set m(e){(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](2):this.layer<=2)()?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent))}get e(){return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor((()=>void 0!==Math.sign(this.mag)&&null!==Math.sign(this.mag)&&Math.sign(this.mag)[Symbol.for("*")]?Math.sign(this.mag)[Symbol.for("*")](Math.pow(10,Math.abs(this.mag))):Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag)))()):(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("*")]?this.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):this.mag*Number.POSITIVE_INFINITY)()}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,o,t){return(new O).fromComponents(e,o,t)}static fromComponents_noNormalize(e,o,t){return(new O).fromComponents_noNormalize(e,o,t)}static fromMantissaExponent(e,o){return(new O).fromMantissaExponent(e,o)}static fromMantissaExponent_noNormalize(e,o){return(new O).fromMantissaExponent_noNormalize(e,o)}static fromDecimal(e){return(new O).fromDecimal(e)}static fromNumber(e){return(new O).fromNumber(e)}static fromString(e){return(new O).fromString(e)}static fromValue(e){return(new O).fromValue(e)}static fromValue_noAlloc(e){return e instanceof O?e:new O(e)}static abs(e){return 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 O.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(O.sub(1,t.pow(e))).div(O.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("<")](g):this.mag<g)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),o=Math.sign(this.mag);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](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("<")](v):e<v)()&&(()=>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(",",""):M&&(e=e.replace(",","."));const o=e.split("^^^");if(2===o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";");let 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=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=O.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=O.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=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=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("+")](T(e)):c+T(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=O.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 O||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return(()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()?Number.NaN:0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)():1===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,this.mag)):this.sign*Math.pow(10,this.mag))():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](0):this.sign>0)()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:0===this.m?0:I(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:I(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?1===this.sign?"Infinity":"-Infinity":0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toString():(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():1===this.layer?(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](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):(()=>I(this.m,e)+"e"!==void 0&&I(this.m,e)+"e"!==null&&(I(this.m,e)+"e")[Symbol.for("+")]?(I(this.m,e)+"e")[Symbol.for("+")](I(this.e,e)):I(this.m,e)+"e"+I(this.e,e))():1===this.layer?(()=>I(this.m,e)+"e"!==void 0&&I(this.m,e)+"e"!==null&&(I(this.m,e)+"e")[Symbol.for("+")]?(I(this.m,e)+"e")[Symbol.for("+")](I(this.e,e)):I(this.m,e)+"e"+I(this.e,e))():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](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("+")](I(this.mag,e)):(-1===this.sign?"-":"")+"e".repeat(this.layer)+I(this.mag,e))():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](I(this.mag,e)):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+I(this.mag,e))()}abs(){return 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)()?O.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)()?O.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)()?O.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)()?O.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!==O.cmpabs(this,o)&&null!==O.cmpabs(this,o)&&O.cmpabs(this,o)[Symbol.for(">")]?O.cmpabs(this,o)[Symbol.for(">")](0):O.cmpabs(this,o)>0)()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return 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?O.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=T(n)),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<")]?this.layer[Symbol.for("<")](t.layer):this.layer<t.layer)()&&(l=T(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(O.dZero)?O.dZero:this.log10()}absLog10(){return 0===this.sign?O.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?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)()?O.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?O.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))()):O.div(this.log10(),e.log10())}log2(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?O.dNaN:0===this.layer?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)()?O.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:O.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 O.dNaN;let e=this;if(0===e.layer){const o=Math.pow(10,(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)());if(Number.isFinite(o)&&(()=>void 0!==Math.abs(o)&&null!==Math.abs(o)&&Math.abs(o)[Symbol.for(">=")]?Math.abs(o)[Symbol.for(">=")](.1):Math.abs(o)>=.1)())return P(1,0,o);if(0===e.sign)return O.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)()):O.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?O.exp(O.mul(this,O.ln(this).sub(1))):O.exp(this)}gamma(){if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return this.recip();if(0===this.layer){if(this.lt(E(1,0,24)))return B(F((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](1):this.mag-1)();let o=.9189385332046727;o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e))(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e)();const t=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let l=e,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 O.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 O.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)(),O.exp(o)}return 1===this.layer?O.exp(O.mul(this,O.ln(this).sub(1))):O.exp(this)}lngamma(){return this.gamma().ln()}exp(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dOne:0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<=")]?this.mag[Symbol.for("<=")](709.7):this.mag<=709.7)()?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=O.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 O.pow(this,o);if(0===e)return new O(o);if(this.eq(O.dOne))return O.dOne;if(this.eq((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))return O.pow(this,o);if(e===Number.POSITIVE_INFINITY){const e=this.toNumber();if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](1.444667861009766):e<=1.444667861009766)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](.06598803584531254):e>=.06598803584531254)()){if((()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009099):e>1.444667861009099)())return new O(Math.E);const o=O.ln(this).neg();return o.lambertw().div(o)}return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009766):e>1.444667861009766)()?new O(Number.POSITIVE_INFINITY):O.dNaN}if(this.eq(O.dZero)){let o=Math.abs((()=>e+1!==void 0&&e+1!==null&&(e+1)[Symbol.for("%")]?(e+1)[Symbol.for("%")](2):(e+1)%2)());return(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](1):o>1)()&&(o=(()=>2[Symbol.for("-")]?2[Symbol.for("-")](o):2-o)()),new O(o)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](0):e<0)())return O.iteratedlog(o,this,(()=>void 0!==e&&null!==e&&e[Symbol.for("minus")]?e[Symbol.for("minus")]():-e)());o=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(O.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let t=0;(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](e):t<e)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("prefix-increment")]?t[Symbol.for("prefix-increment")]():++t)()){const e=o;if(o=this.pow(o),e.eq(o))return o}if((()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](0):0!=l)()){const e=this.pow(o);return o.mul((()=>1[Symbol.for("-")]?1[Symbol.for("-")](l):1-l)()).add(e.mul(l))}return o}(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(O.dOne)?this.gt(10)?o=this.pow(l):(o=B(O.tetrate_critical(this.toNumber(),l)),this.lt(2)&&(o=o.sub(1).mul(this.minus(1)).plus(1))):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let 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 O.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(O.dZero))return O.dNaN;if(e.eq(O.dOne))return O.dNaN;if(e.lt(O.dOne))return this.eq(O.dOne)?O.dZero:this.eq(O.dZero)?O.dNegOne:O.dNaN;if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||this.eq(O.dZero))return O.dNegOne;let o=0,t=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(O.dZero))t=O.pow(e,t),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)();else{if(t.lte(O.dOne))return B((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](O.slog_critical(e.toNumber(),t.toNumber())):o+O.slog_critical(e.toNumber(),t.toNumber()))());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),t=O.log(t,e)}return 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)():O.critical_section(e,o,Z)}static tetrate_critical(e,o){return O.critical_section(e,o,C)}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("<")](w.length):a<w.length)();(()=>void 0!==a&&null!==a&&"object"===typeof a&&a[Symbol.for("prefix-increment")]?a[Symbol.for("prefix-increment")]():++a)()){if((()=>void 0!==w[a]&&null!==w[a]&&w[a][Symbol.for("==")]?w[a][Symbol.for("==")](e):w[a]==e)()){l=t[a][Math.floor(o)],n=t[a][Math.ceil(o)];break}if((()=>void 0!==w[a]&&null!==w[a]&&w[a][Symbol.for("<")]?w[a][Symbol.for("<")](e):w[a]<e)()&&(()=>void 0!==w[a+1]&&null!==w[a+1]&&w[a+1][Symbol.for(">")]?w[a+1][Symbol.for(">")](e):w[a+1]>e)()){const r=(()=>e-w[a]!==void 0&&e-w[a]!==null&&(e-w[a])[Symbol.for("/")]?(e-w[a])[Symbol.for("/")](w[a+1]-w[a]):(e-w[a])/(w[a+1]-w[a]))();l=(()=>t[a][Math.floor(o)]*(1-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=O.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)()?O.tetrate(o,l):(()=>void 0!==Number.isFinite(l)&&null!==Number.isFinite(l)&&Number.isFinite(l)[Symbol.for("!")]?Number.isFinite(l)[Symbol.for("!")]():!Number.isFinite(l))()?O.dNaN:(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](-1):l>=-1)()?O.log(O.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](1):l+1)()),o):O.log(O.log(O.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](2):l+2)()),o),o)}lambertw(){if(this.lt((()=>.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499)()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return B(j(this.toNumber()));if(0===this.layer)return B(j((()=>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 D(this);if(2===this.layer)return D(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(O.dOne)?((()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})(),o=new O(l)):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let 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)()?O.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 O.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return O.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?E(Number.NaN,Number.NaN,Number.NaN):O.ln(this.add(1).div(B(1).sub(this))).div(2)}ascensionPenalty(e){return 0===e?this:this.root(O.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](1):this.cmp(e)<1)()}lessThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](0):this.cmp(e)<0)()}greaterThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](-1):this.cmp(e)>-1)()}greaterThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](0):this.cmp(e)>0)()}}(0,n.Z)(O,"dZero",E(0,0,0)),(0,n.Z)(O,"dOne",E(1,0,1)),(0,n.Z)(O,"dNegOne",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),0,1)),(0,n.Z)(O,"dTwo",E(1,0,2)),(0,n.Z)(O,"dTen",E(1,0,10)),(0,n.Z)(O,"dNaN",E(Number.NaN,Number.NaN,Number.NaN)),(0,n.Z)(O,"dInf",E(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,n.Z)(O,"dNegInf",E((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,n.Z)(O,"dNumberMax",P(1,0,Number.MAX_VALUE)),(0,n.Z)(O,"dNumberMin",P(1,0,Number.MIN_VALUE));var _=t(6453),A=O;const U=new O(1);function q(e,o,t=!0){let l=O.log10(e).floor(),n=O.div(e,O.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),_.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 O(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 O(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),_.defaultDecimalsShown)),e.toStringWithDecimalPlaces(o)))}const W=new O("eeee1000"),G=new O("e100000"),H=new O("e1000"),Y=new O(1e9),J=new O(1e6),$=new O(1e3),K=new O(.98),X=new O(.001),Q=new O(0);function ee(e,o,t){if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=_.defaultDecimalsShown),t=t??_.defaultShowSmall,e=new O(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(W)){const o=e.slog();return o.gte(J)?(()=>"F"[Symbol.for("+")]?"F"[Symbol.for("+")](ee(o.floor())):"F"+ee(o.floor()))():(()=>O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](z(o.floor(),0)):O.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"+z(o.floor(),0))()}if(e.gte(G))return q(e,0,!1);if(e.gte(H))return q(e,0);if(e.gte(Y))return q(e,o);if(e.gte($))return z(e,0);if(e.gte(X)||(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)())return L(e,o);if(e.eq(Q))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 O(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(Y)||e.lte(K)&&(()=>void 0!==e.eq(Q)&&null!==e.eq(Q)&&e.eq(Q)[Symbol.for("!")]?e.eq(Q)[Symbol.for("!")]():!e.eq(Q))()?ee(e):ee(e,0)}function te(e){return O.lt(e,0)?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](te(O.neg(e))):"-"+te(O.neg(e)))():O.gt(e,(()=>2[Symbol.for("**")]?2[Symbol.for("**")](51):2**51)())?(()=>void 0!==ee(O.div(e,31536e3))&&null!==ee(O.div(e,31536e3))&&ee(O.div(e,31536e3))[Symbol.for("+")]?ee(O.div(e,31536e3))[Symbol.for("+")]("y"):ee(O.div(e,31536e3))+"y")():(e=new O(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 O(e);let l=e.toStringWithDecimalPlaces(o);return new O(l).gte(t)&&(l=O.sub(t,Math.pow(.1,o)).toStringWithDecimalPlaces(o)),l}function ne(e,o){return ee(e,o,!0)}function re(e){let o=O.log10(e).ceil();const t=O.div(e,O.pow(10,o));return o=o.neg(),e=new O(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}});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)))}},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){const o={};let t=!1;function n(){return(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)()&&(Object.assign(o,e()),t=!0),o}return new Proxy(o,{get(e,o){return o===l?n():n()[o]},set(){return console.error("Layers and features are shallow readonly"),!1},has(e,o){return o===l||Reflect.has(n(),o)},ownKeys(){return Reflect.ownKeys(n())},getOwnPropertyDescriptor(l,n){return(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)()&&(Object.assign(o,e()),t=!0),Object.getOwnPropertyDescriptor(l,n)}})}},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,7144));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())}},7144:function(e,o,t){"use strict";t.r(o),t.d(o,{fixOldSave:function(){return ll},getInitialLayers:function(){return ol},hasWon:function(){return tl},main:function(){return el}});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 v(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 g(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 M(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)}const x={key:0,class:"left-side-nodes"},w={key:1,class:"side-nodes"};function C(e,o,t,n,r,i){const a=(0,l.resolveComponent)("TreeNode"),s=(0,l.resolveComponent)("Links");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.nodes),((o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",(0,l.mergeProps)({class:"row",key:t},e.$attrs),[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(o,((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip}),null,16,["force-tooltip"])))),128))],16)))),128)),e.unref(e.leftSideNodes)?((0,l.openBlock)(),(0,l.createElementBlock)("span",x,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.leftSideNodes),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip,small:""}),null,16,["force-tooltip"])))),128))])):(0,l.createCommentVNode)("",!0),e.unref(e.rightSideNodes)?((0,l.openBlock)(),(0,l.createElementBlock)("span",w,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.rightSideNodes),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip,small:""}),null,16,["force-tooltip"])))),128))])):(0,l.createCommentVNode)("",!0),e.branches?((0,l.openBlock)(),(0,l.createBlock)(s,{key:2,links:e.unref(e.branches)},null,8,["links"])):(0,l.createCommentVNode)("",!0)],64)}var Z=t(1604);function B(e,o,t,n,r,i){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("Node"),u=(0,l.resolveComponent)("Tooltip");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createBlock)(u,(0,l.mergeProps)({key:0},e.tooltipToBind&&e.gatherTooltipProps(e.tooltipToBind),{display:e.tooltipDisplay,force:e.forceTooltip,style:{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},class:{treeNode:!0,can:e.unref(e.canClick),small:e.unref(e.small),...e.unref(e.classes)}}),{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("button",{onClick:o[0]||(o[0]=(...o)=>e.click&&e.click(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},e.unref(e.style)??[]])},[((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"])])),_:1},16,["display","force","style","class"])):(0,l.createCommentVNode)("",!0)}var P=t(9365),E=(0,l.defineComponent)({props:{id:null},setup(e){const o=e,t=(0,l.toRefs)(o),n=(0,l.inject)(P.RegisterNodeInjectionKey),r=(0,l.inject)(P.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 I=(0,a.Z)(E,[["__scopeId","data-v-63ded336"]]);var T=I;const F={key:0},R={key:0,class:"mark star"},j=["src"];var D=(0,l.defineComponent)({props:{mark:{type:[Boolean,String]}},setup(e){return(o,t)=>e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",F,[!0===e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",R)):((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,j))])):(0,l.createCommentVNode)("",!0)}});const O=(0,a.Z)(D,[["__scopeId","data-v-c476c56a"]]);var _=O,A=t(2794);function U(e){const{display:o,top:t,left:l,right:n,bottom:r,xoffset:i,yoffset:a,force:s}=e;return{display:o,top:t,left:l,right:n,bottom:r,xoffset:i,yoffset:a,force:s}}var q=(0,l.defineComponent)({props:{display:(0,Z.P5)(Object,String,Function),visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),tooltip:(0,Z.P5)(Object,String,Function),onClick:Function,onHold:Function,color:(0,Z.P5)(String),glowColor:(0,Z.P5)(String),forceTooltip:{type:Object,required:!0},canClick:{type:(0,Z.P5)(Boolean),required:!0},mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0},small:(0,Z.P5)(Boolean)},components:{Tooltip:A.Z,MarkNode:_,Node:T},setup(e){const{tooltip:o,forceTooltip:t,onClick:n,onHold:r,display:i}=(0,l.toRefs)(e);function a(e){e.shiftKey&&o?t.value=(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)():(0,l.unref)(n)?.()}const s=(0,Z.KO)(i),u=(0,l.shallowRef)(void 0);(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);"object"===typeof e&&(()=>void 0!==(0,Z.RU)(e)&&null!==(0,Z.RU)(e)&&(0,Z.RU)(e)[Symbol.for("!")]?(0,Z.RU)(e)[Symbol.for("!")]():!(0,Z.RU)(e))()?u.value=e.display:u.value=e}));const m=(0,l.computed)((()=>{const e=(0,Z.Uv)(o);return"object"===typeof e&&(()=>void 0!==(0,Z.RU)(e)&&null!==(0,Z.RU)(e)&&(0,Z.RU)(e)[Symbol.for("!")]?(0,Z.RU)(e)[Symbol.for("!")]():!(0,Z.RU)(e))()?e:null})),{start:c,stop:f}=(0,Z.ix)(n,r);return{click:a,start:c,stop:f,comp:s,tooltipDisplay:u,tooltipToBind:m,unref:l.unref,Visibility:y.EE,gatherTooltipProps:U,isCoercableComponent:Z.RU}}});const z=(0,a.Z)(q,[["render",B],["__scopeId","data-v-09bec9fe"]]);var L=z;const W=["x1","y1","x2","y2"];var G=(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=e&&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=e&&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,W))}});const H=G;var Y=H,J=(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)(P.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})))}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)(Y,{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 $=(0,a.Z)(J,[["__scopeId","data-v-5837f7bc"]]);var K=$,X=(0,l.defineComponent)({props:{nodes:{type:(0,Z.P5)(Array),required:!0},leftSideNodes:(0,Z.P5)(Array),rightSideNodes:(0,Z.P5)(Array),branches:(0,Z.P5)(Array)},components:{TreeNode:L,Links:K},setup(){function e(e){const{display:o,visibility:t,style:l,classes:n,tooltip:r,onClick:i,onHold:a,color:s,glowColor:u,forceTooltip:m,canClick:c,mark:f,id:d}=e;return{display:o,visibility:t,style:l,classes:n,tooltip:r,onClick:i,onHold:a,color:s,glowColor:u,forceTooltip:m,canClick:c,mark:f,id:d}}return{gatherNodeProps:e,unref:l.unref}}});const Q=(0,a.Z)(X,[["render",C],["__scopeId","data-v-28bdfe90"]]);var ee=Q,oe=t(9583),te=t(3273);const le=Symbol("TreeNode"),ne=Symbol("Tree");function re(e){return(0,te.z2)((()=>{const o=e();if(o.id=(0,y.QI)("treeNode-"),o.type=le,o.tooltip?o.forceTooltip=(0,p.ax)(!1):o.forceTooltip=(0,l.ref)(!1),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,oe.yB)(o,"color"),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"tooltip"),(0,oe.yB)(o,"glowColor"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.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}))}function ie(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("tree-"),o.type=ne,o[y.wA]=ee,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,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"nodes"),(0,oe.yB)(o,"leftSideNodes"),(0,oe.yB)(o,"rightSideNodes"),(0,oe.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 ae=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)}}};var se=t(5967),ue=t(274);function me(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 ce=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},display:(0,Z.P5)(Object,String,Function),earned:{type:(0,Z.P5)(Boolean),required:!0},image:(0,Z.P5)(String),style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:T,MarkNode:_,Tooltip:A.Z},setup(e){const{display:o}=(0,l.toRefs)(e);return{component:(0,Z.KO)(o),unref:l.unref,Visibility:y.EE}}});const fe=(0,a.Z)(ce,[["render",me],["__scopeId","data-v-2e1ea71d"]]);var de=fe,ye=t(3002);t(343);function be(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 he(){return be("red","20px")}h.globalBus.on("setupVue",(e=>e.use(ye.ZP)));const pe=(0,ye.pm)(),ve=Symbol("Achievement");function ge(e){return(0,te.z2)((()=>{const o=e();if((0,p.Mv)(o,!1),o.id=(0,y.QI)("achievement-"),o.type=ve,o[y.wA]=de,o.earned=o[p.n9],o.complete=function(){o[p.n9].value=!0},(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"image"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"classes"),o[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}},o.shouldEarn){const e=o;(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,Z.MM)((0,l.unref)(e.display));pe.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 o}))}function Se(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 Ne=t(1037),ke=t(9266);const Ve={key:0};function Me(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",Ve,[((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 xe=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},onClick:Function,onHold:Function,display:{type:(0,Z.P5)(Object,String,Function),required:!0},title:(0,Z.P5)(Object,String,Function),style:(0,Z.P5)(String,Object,Array),canClick:{type:(0,Z.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:T},setup(e){const{onClick:o,onHold:t,title:n,display:r}=(0,l.toRefs)(e),{start:i,stop:a}=(0,Z.ix)(o,t),s=(0,Z.KO)(n),u=(0,Z.vq)(r);return{start:i,stop:a,titleComponent:s,component:u,Visibility:y.EE,unref:l.unref}}});const we=(0,a.Z)(xe,[["render",Me],["__scopeId","data-v-b1182ac6"]]);var Ce=we,Ze=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},rows:{type:(0,Z.P5)(Number),required:!0},cols:{type:(0,Z.P5)(Number),required:!0},cells:{type:(0,Z.P5)(Object),required:!0}},components:{GridCell:Ce},setup(){const e=(0,l.computed)((()=>Ne.Z[ke.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 Be=(0,a.Z)(Ze,[["render",Se]]);var Pe=Be,Ee=t(1349);Symbol("Grid");function Ie(e){return new Proxy({},Te(e))}function Te(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,Fe(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 Fe(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,Ee.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,Ee.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,Ee.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,Ee.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 Re(e){return(0,te.z2)((()=>{const o=e();if((0,p.Mv)(o,{}),o.id=(0,y.QI)("grid-"),o[y.wA]=Pe,o.getID=function(e){return(()=>o.id+"-"!==void 0&&o.id+"-"!==null&&(o.id+"-")[Symbol.for("+")]?(o.id+"-")[Symbol.for("+")](e):o.id+"-"+e)()},o.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},o.setState=function(e,o){this[p.n9].value[e]=o},o.cells=Ie(o),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"rows"),(0,oe.yB)(o,"cols"),(0,oe.yB)(o,"getVisibility"),(0,y.Rh)(o,"getVisibility",y.EE.Visible),(0,oe.yB)(o,"getCanClick"),(0,y.Rh)(o,"getCanClick",!0),(0,oe.yB)(o,"getStartState"),(0,oe.yB)(o,"getStyle"),(0,oe.yB)(o,"getClasses"),(0,oe.yB)(o,"getTitle"),(0,oe.yB)(o,"getDisplay"),o.onClick){const e=o.onClick.bind(o);o.onClick=function(t,n){(0,l.unref)(o.cells[t].canClick)&&e(t,n)}}if(o.onHold){const e=o.onHold.bind(o);o.onHold=function(t,n){(0,l.unref)(o.cells[t].canClick)&&e(t,n)}}return o[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}},o}))}function je(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,Z.P5)(Object,String,Function),required:!0},visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(Object,String,Array),classes:(0,Z.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,Z.P5)(Boolean),required:!0},small:Boolean,mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0}},components:{Node:T,MarkNode:_},setup(e){const{display:o,onClick:t,onHold:n}=(0,l.toRefs)(e),r=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(r.value="");if((0,Z.RU)(e))return void(r.value=(0,Z.MM)(e));const t=(0,Z.MM)(e.title||"","h3"),n=(0,Z.MM)(e.description,"div");r.value=(0,Z.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,Z.ix)(t,n);return{start:i,stop:a,comp:r,Visibility:y.EE,unref:l.unref}}});const Oe=(0,a.Z)(De,[["render",je],["__scopeId","data-v-6b39988a"]]);var _e=Oe;const Ae=Symbol("Clickable");function Ue(e){return(0,te.z2)((()=>{const o=e();if(o.id=(0,y.QI)("clickable-"),o.type=Ae,o[y.wA]=_e,(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"canClick"),(0,y.Rh)(o,"canClick",!0),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"mark"),(0,oe.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 qe(e){return Ue((()=>{const o=e();(0,oe.yB)(o,"showNextAt"),(0,y.Rh)(o,"showNextAt",!0),(()=>void 0!==o.resetDescription&&null!==o.resetDescription&&o.resetDescription[Symbol.for("==")]?o.resetDescription[Symbol.for("==")](null):null==o.resetDescription)()?o.resetDescription=(0,l.computed)((()=>b.ZP.lt(o.conversion.gainResource.value,1e3)?"Reset for ":"")):(0,oe.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,[M(o.conversion.gainResource,(0,l.unref)(o.conversion.currentGain))])," ",o.conversion.gainResource.displayName,(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Next:")," ",M(o.conversion.baseResource,(0,l.unref)(o.conversion.nextAt))," ",o.conversion.baseResource.displayName]),[[l.vShow,(0,l.unref)(o.showNextAt)]])])))),(()=>void 0!==o.canClick&&null!==o.canClick&&o.canClick[Symbol.for("==")]?o.canClick[Symbol.for("==")](null):null==o.canClick)()&&(o.canClick=(0,l.computed)((()=>b.ZP.gt((0,l.unref)(o.conversion.currentGain),0))));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 ze(e){return re((()=>{const o=e();return(0,oe.yB)(o,"display"),(0,y.Rh)(o,"display",o.layerID),(0,oe.yB)(o,"append"),{...o,display:o.layerID,onClick:(0,l.unref)(o.append)?function(){if(se.Z.tabs.includes(o.layerID)){const e=se.Z.tabs.lastIndexOf(o.layerID);se.Z.tabs.splice(e,1)}else se.Z.tabs.push(o.layerID)}:function(){se.Z.tabs.splice(1,1,o.layerID)}}}))}function Le(e){return(0,te.z2)((()=>{const o=e();return(()=>void 0!==o.currentGain&&null!==o.currentGain&&o.currentGain[Symbol.for("==")]?o.currentGain[Symbol.for("==")](null):null==o.currentGain)()&&(o.currentGain=(0,l.computed)((()=>o.scaling.currentGain(o)))),(()=>void 0!==o.nextAt&&null!==o.nextAt&&o.nextAt[Symbol.for("==")]?o.nextAt[Symbol.for("==")](null):null==o.nextAt)()&&(o.nextAt=(0,l.computed)((()=>o.scaling.nextAt(o)))),(()=>void 0!==o.convert&&null!==o.convert&&o.convert[Symbol.for("==")]?o.convert[Symbol.for("==")](null):null==o.convert)()&&(o.convert=function(){o.gainResource.value=b.ZP.add(o.gainResource.value,o.modifyGainAmount?o.modifyGainAmount((0,l.unref)(o.currentGain)):(0,l.unref)(o.currentGain)),o.baseResource.value=0}),(0,oe.yB)(o,"currentGain"),(0,oe.yB)(o,"nextAt"),(0,oe.yB)(o,"buyMax"),(0,y.Rh)(o,"buyMax",!0),(0,oe.yB)(o,"roundUpCost"),(0,y.Rh)(o,"roundUpCost",!0),o}))}function We(e,o){return{currentGain(t){let n=b.ZP.div(t.baseResource.value,(0,l.unref)(e)).pow((0,l.unref)(o)).floor().max(0);return n.isNan()?new b.ZP(0):((()=>void 0!==t.buyMax&&null!==t.buyMax&&t.buyMax[Symbol.for("!")]?t.buyMax[Symbol.for("!")]():!t.buyMax)()&&(n=n.min(1)),n)},nextAt(t){let n=b.ZP.add((0,l.unref)(t.currentGain),1).root((0,l.unref)(o)).times((0,l.unref)(e)).max((0,l.unref)(e));return t.roundUpCost&&(n=n.ceil()),n}}}function Ge(e){return Le(e)}function He(e){return Le((()=>{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)((()=>b.ZP.sub(o.scaling.currentGain(o),o.gainResource.value).add(1).max(1)))),(0,y.Rh)(o,"convert",(function(){o.gainResource.value=o.modifyGainAmount?o.modifyGainAmount((0,l.unref)(o.currentGain)):(0,l.unref)(o.currentGain),o.baseResource.value=0})),o}))}function Ye(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 Je(e,o,t=.5){return{...e,currentGain:n=>Ye(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),Ke=$e((()=>(0,l.createElementVNode)("span",{class:"toggle"},"▼",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));function Xe(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))())},[Ke,((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 Qe=t(423),eo=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},display:{type:(0,Z.P5)(Object,String,Function),required:!0},title:{type:(0,Z.P5)(Object,String,Function),required:!0},color:(0,Z.P5)(String),collapsed:{type:Object,required:!0},style:(0,Z.P5)(Object,String,Array),titleStyle:(0,Z.P5)(Object,String,Array),bodyStyle:(0,Z.P5)(Object,String,Array),classes:(0,Z.P5)(Object),id:{type:String,required:!0}},components:{Node:T,CollapseTransition:Qe.Z},setup(e){const{title:o,display:t}=(0,l.toRefs)(e),n=(0,Z.vq)(o),r=(0,Z.vq)(t),i=(0,l.computed)((()=>Ne.Z[ke.ZP.theme].mergeAdjacent));return{titleComponent:n,bodyComponent:r,stacked:i,unref:l.unref,Visibility:y.EE}}});const oo=(0,a.Z)(eo,[["render",Xe],["__scopeId","data-v-6447a93e"]]);var to=oo;const lo=Symbol("Infobox");function no(e){return(0,te.z2)((()=>{const o=e();return(0,p.Mv)(o,!1),o.id=(0,y.QI)("infobox-"),o.type=lo,o[y.wA]=to,o.collapsed=o[p.n9],(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"color"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"titleStyle"),(0,oe.yB)(o,"bodyStyle"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"title"),(0,oe.yB)(o,"display"),o[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}},o}))}const ro={ref:"resizeListener",class:"resize-listener"};function io(e,o,t,n,r,i){const a=(0,l.resolveComponent)("Particles",!0);return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(a,(0,l.mergeProps)({id:e.id,class:{"not-fullscreen":(()=>void 0!==e.fullscreen&&null!==e.fullscreen&&e.fullscreen[Symbol.for("!")]?e.fullscreen[Symbol.for("!")]():!e.fullscreen)()},style:{zIndex:e.zIndex},ref:"particles",particlesInit:e.particlesInit,particlesLoaded:e.particlesLoaded,options:{fpsLimit:60,fullScreen:{enable:e.fullscreen,zIndex:e.zIndex},particles:{number:{value:0}},emitters:{autoPlay:!1}}},e.$attrs),null,16,["id","class","style","particlesInit","particlesLoaded","options"]),(0,l.createElementVNode)("div",ro,null,512)],64)}var ao=t(666),so=t(8375),uo=(0,l.defineComponent)({props:{zIndex:{type:Number,required:!0},fullscreen:{type:Boolean,required:!0},onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function},components:{Particles:so.z},setup(e){const o=(0,l.ref)(null);async function t(e){await(0,ao.R)(e)}function n(o){e.onInit(o)}const r=new ResizeObserver(u),i=(0,l.inject)(P.NodesInjectionKey),a=(0,l.ref)(null);(0,l.onMounted)((()=>{const e=a.value;(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&r.observe(e),u()}));let s=!0;function u(){s&&(s=!1,(0,l.nextTick)((()=>{(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!=")]?a.value[Symbol.for("!=")](null):null!=a.value)()&&e.onContainerResized&&(Object.values(i.value).forEach((e=>e.rect=e?.element.getBoundingClientRect())),e.onContainerResized(a.value.getBoundingClientRect())),s=!0})))}return{particles:o,particlesInit:t,particlesLoaded:n,resizeListener:a}}});const mo=(0,a.Z)(uo,[["render",io],["__scopeId","data-v-71ba1b93"]]);var co=mo;const fo=Symbol("Particles");function yo(e){return(0,te.z2)((()=>{const o=e();o.id=(0,y.QI)("particles-"),o.type=fo,o[y.wA]=co,o.containerRef=(0,l.shallowRef)(null),o.addEmitter=e=>{const l=o;return l.containerRef.value?Promise.resolve(l.containerRef.value.addEmitter(e)):new Promise((o=>{t.push({resolve:o,options:e})}))},o.removeEmitter=e=>{e.emitters.removeEmitter(e)};let t=[];function n(e){o.containerRef.value=e,t.forEach((({resolve:o,options:t})=>o(e.addEmitter(t)))),t=[]}return(0,y.Rh)(o,"fullscreen",!0),(0,y.Rh)(o,"zIndex",1),o.onContainerResized=o.onContainerResized?.bind(o),o[y.tj]=function(){const{id:e,fullscreen:o,zIndex:t,onContainerResized:l}=this;return{id:e,fullscreen:o,zIndex:t,onContainerResized:l,onInit:n}},o}))}const bo=Symbol("Reset");function ho(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("reset-"),o.type=bo,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,oe.yB)(o,"thingsToReset"),o}))}const po={};h.globalBus.on("removeLayer",(e=>{po[e.id]?.(),po[e.id]=void 0}));var vo=(0,l.defineComponent)({props:{resource:null,color:null},setup(e){const o=e,t=(0,l.computed)((()=>M(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 go=vo;var So=go;const No={key:0},ko={key:1},Vo=(0,l.createTextVNode)(", "),Mo=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()),xo=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var wo=(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,Z.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",No,"You have ")):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(So,{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",ko,[Vo,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(n))))])):(0,l.createCommentVNode)("",!0),Mo,xo]))}});const Co=wo;var Zo=Co;const Bo={class:"field"},Po={key:0,class:"field-title"},Eo=["min","max"];var Io=(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",Bo,[e.title?((0,l.openBlock)(),(0,l.createElementBlock)("span",Po,(0,l.toDisplayString)(e.title),1)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(A.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,Eo),[[l.vModelText,(0,l.unref)(r)]])])),_:1},8,["display","class"])]))}});const To=(0,a.Z)(Io,[["__scopeId","data-v-8adbf51e"]]);var Fo=To,Ro=t(4520),jo=t(9868),Do=t(9905),Oo=(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),(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 _o=(0,a.Z)(Oo,[["__scopeId","data-v-3b196306"]]);var Ao=_o,Uo=(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 qo=(0,a.Z)(Uo,[["__scopeId","data-v-15f6e746"]]);var zo=qo,Lo=t(6948);function Wo(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 Go=(0,l.defineComponent)({props:{progress:{type:(0,Z.P5)(String,Object,Number),required:!0},width:{type:(0,Z.P5)(Number),required:!0},height:{type:(0,Z.P5)(Number),required:!0},direction:{type:(0,Z.P5)(String),required:!0},display:(0,Z.P5)(Object,String,Function),visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(Object,String,Array),classes:(0,Z.P5)(Object),borderStyle:(0,Z.P5)(Object,String,Array),textStyle:(0,Z.P5)(Object,String,Array),baseStyle:(0,Z.P5)(Object,String,Array),fillStyle:(0,Z.P5)(Object,String,Array),mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:_,Node:T},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,Z.Uv)(t)+.5!==void 0&&(0,Z.Uv)(t)+.5!==null&&((0,Z.Uv)(t)+.5)[Symbol.for("+")]?((0,Z.Uv)(t)+.5)[Symbol.for("+")]("px"):(0,Z.Uv)(t)+.5+"px")(),height:(()=>(0,Z.Uv)(n)+.5!==void 0&&(0,Z.Uv)(n)+.5!==null&&((0,Z.Uv)(n)+.5)[Symbol.for("+")]?((0,Z.Uv)(n)+.5)[Symbol.for("+")]("px"):(0,Z.Uv)(n)+.5+"px")()};switch((0,l.unref)(r)){case $o.Up:e.clipPath=`inset(${a.value}% 0% 0% 0%)`,e.width=(()=>(0,Z.Uv)(t)+1!==void 0&&(0,Z.Uv)(t)+1!==null&&((0,Z.Uv)(t)+1)[Symbol.for("+")]?((0,Z.Uv)(t)+1)[Symbol.for("+")]("px"):(0,Z.Uv)(t)+1+"px")();break;case $o.Down:e.clipPath=`inset(0% 0% ${a.value}% 0%)`,e.width=(()=>(0,Z.Uv)(t)+1!==void 0&&(0,Z.Uv)(t)+1!==null&&((0,Z.Uv)(t)+1)[Symbol.for("+")]?((0,Z.Uv)(t)+1)[Symbol.for("+")]("px"):(0,Z.Uv)(t)+1+"px")();break;case $o.Right:e.clipPath=`inset(0% ${a.value}% 0% 0%)`;break;case $o.Left:e.clipPath=`inset(0% 0% 0% ${a.value} + '%)`;break;case $o.Default:e.clipPath="inset(0% 50% 0% 0%)";break}return e})),u=(0,Z.KO)(i);return{normalizedProgress:a,barStyle:s,component:u,unref:l.unref,Visibility:y.EE}}});const Ho=(0,a.Z)(Go,[["render",Wo],["__scopeId","data-v-e6e3c366"]]);var Yo=Ho;const Jo=Symbol("Bar");var $o;function Ko(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("bar-"),o.type=Jo,o[y.wA]=Yo,(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"width"),(0,oe.yB)(o,"height"),(0,oe.yB)(o,"direction"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"borderStyle"),(0,oe.yB)(o,"baseStyle"),(0,oe.yB)(o,"textStyle"),(0,oe.yB)(o,"fillStyle"),(0,oe.yB)(o,"progress"),(0,oe.yB)(o,"display"),(0,oe.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"})($o||($o={}));const Xo=Symbol("Buyable");function Qo(e){return(0,te.z2)((()=>{const o=e();if((()=>void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase)()&&((()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource)()||(()=>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";(0,p.Mv)(o,0),o.id=(0,y.QI)("buyable-"),o.type=Xo,o[y.wA]=_e,o.amount=o[p.n9],o.canAfford=(0,l.computed)((()=>{const e=o,t=(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!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](null):null!=t)()&&b.ZP.gte(e.resource.value,t)})),(()=>void 0!==o.canPurchase&&null!==o.canPurchase&&o.canPurchase[Symbol.for("==")]?o.canPurchase[Symbol.for("==")](null):null==o.canPurchase)()&&(o.canPurchase=(0,l.computed)((()=>(0,l.unref)(o.visibility)===y.EE.Visible&&(0,l.unref)(o.canAfford)&&b.ZP.lt(o.amount.value,(0,l.unref)(o.purchaseLimit))))),o.maxed=(0,l.computed)((()=>b.ZP.gte(o.amount.value,(0,l.unref)(o.purchaseLimit)))),(0,oe.yB)(o,"classes");const t=o.classes;o.classes=(0,l.computed)((()=>{const e=(0,l.unref)(t)||{};return o.maxed.value&&(e.bought=!0),e})),(0,oe.yB)(o,"canPurchase"),o.canClick=o.canPurchase,o.onClick=o.purchase=function(){const e=o;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 t=(0,l.unref)(e.cost);e.resource.value=b.ZP.sub(e.resource.value,t),e.amount.value=b.ZP.add(e.amount.value,1),this.onPurchase?.(t)},(0,oe.yB)(o,"display");const n=o.display;return o.display=(0,y.tZ)((()=>{const e=(0,l.unref)(n);if((0,Z.RU)(e)){const o=(0,Z.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!==o.cost&&null!==o.cost&&o.cost[Symbol.for("!=")]?o.cost[Symbol.for("!=")](null):null!=o.cost)()&&(()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("!=")]?o.resource[Symbol.for("!=")](null):null!=o.resource)()){const t=o,n=(0,Z.MM)(e.title||"","h3"),r=(0,Z.MM)(e.description),i=(0,Z.MM)(e.effectDisplay||""),a=(0,l.unref)(t.purchaseLimit)===b.ZP.dInf?(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(t.amount.value)]):(0,l.createVNode)(l.Fragment,null,[(0,l.createTextVNode)("Amount: "),(0,b.Ht)(t.amount.value),(0,l.createTextVNode)(" /")," ",(0,b.Ht)((0,l.unref)(t.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,t.cost&&(()=>void 0!==t.maxed.value&&null!==t.maxed.value&&t.maxed.value[Symbol.for("!")]?t.maxed.value[Symbol.for("!")]():!t.maxed.value)()?(0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Cost: "),(0,b.WU)((0,l.unref)(t.cost)||0)," ",o.resource.displayName]):null])}return""})),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"cost"),(0,oe.yB)(o,"resource"),(0,oe.yB)(o,"purchaseLimit"),(0,y.Rh)(o,"purchaseLimit",b.ZP.dInf),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"small"),o[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}},o}))}t(3577);const et=["disabled"];function ot(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,et),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 tt=(0,l.defineComponent)({props:{active:{type:(0,Z.P5)(Boolean),required:!0},maxed:{type:(0,Z.P5)(Boolean),required:!0},canComplete:{type:(0,Z.P5)(Boolean),required:!0},display:(0,Z.P5)(String,Object,Function),visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),completed:{type:(0,Z.P5)(Boolean),required:!0},canStart:{type:(0,Z.P5)(Boolean),required:!0},mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:_,Node:T},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,Z.Uv)(o),t=(0,Z.Uv)(n);return e?t?he():be():{}}));return(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(r);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(a.value="");if((0,Z.RU)(e))return void(a.value=(0,Z.MM)(e));const o=(0,Z.MM)(e.title||"","h3"),t=(0,Z.MM)(e.description,"div"),n=(0,Z.MM)(e.goal||""),i=(0,Z.MM)(e.reward||""),s=(0,Z.MM)(e.effectDisplay||"");a.value=(0,Z.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 lt=(0,a.Z)(tt,[["render",ot],["__scopeId","data-v-5e580749"]]);var nt=lt;const rt=Symbol("ChallengeType");function it(e){return(0,te.z2)((()=>{const o=e();if((()=>void 0!==o.canComplete&&null!==o.canComplete&&o.canComplete[Symbol.for("==")]?o.canComplete[Symbol.for("==")](null):null==o.canComplete)()&&((()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource)()||(()=>void 0!==o.goal&&null!==o.goal&&o.goal[Symbol.for("==")]?o.goal[Symbol.for("==")](null):null==o.goal)()))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",o),"Cannot create challenge without a canComplete property or a resource and goal property";o.id=(0,y.QI)("challenge-"),o.type=rt,o[y.wA]=nt,o.completions=(0,p.ax)(0),o.active=(0,p.ax)(!1),o.completed=(0,l.computed)((()=>b.ZP.gt(o.completions.value,0))),o.maxed=(0,l.computed)((()=>b.ZP.gte(o.completions.value,(0,l.unref)(o.completionLimit)))),o.toggle=function(){const e=o;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?.())},o.complete=function(e){const t=o;let n=(0,l.unref)(t.canComplete);t.active.value&&(()=>void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")](!1):!1!==n)()&&(!0===n||b.ZP.neq(0,n))&&(()=>void 0!==t.maxed.value&&null!==t.maxed.value&&t.maxed.value[Symbol.for("!")]?t.maxed.value[Symbol.for("!")]():!t.maxed.value)()&&("boolean"===typeof n&&(n=1),t.completions.value=b.ZP.min(b.ZP.add(t.completions.value,n),(0,l.unref)(t.completionLimit)),t.onComplete?.(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](!0):!0!==e)()&&(t.active.value=!1,t.onExit?.(),t.reset?.reset()))},(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible);const t=o.visibility;return o.visibility=(0,l.computed)((()=>!0===ke.ZP.hideChallenges&&(0,l.unref)(o.maxed)?y.EE.None:(0,l.unref)(t))),(()=>void 0!==o.canComplete&&null!==o.canComplete&&o.canComplete[Symbol.for("==")]?o.canComplete[Symbol.for("==")](null):null==o.canComplete)()&&(o.canComplete=(0,l.computed)((()=>{const e=o;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!==o.mark&&null!==o.mark&&o.mark[Symbol.for("==")]?o.mark[Symbol.for("==")](null):null==o.mark)()&&(o.mark=(0,l.computed)((()=>b.ZP.gt((0,l.unref)(o.completionLimit),1)&&(()=>void 0!==!(0,l.unref)(o.maxed)&&null!==!(0,l.unref)(o.maxed)&&(!(0,l.unref)(o.maxed))[Symbol.for("!")]?(!(0,l.unref)(o.maxed))[Symbol.for("!")]():!!(0,l.unref)(o.maxed))()))),(0,oe.yB)(o,"canStart"),(0,y.Rh)(o,"canStart",!0),(0,oe.yB)(o,"canComplete"),(0,oe.yB)(o,"completionLimit"),(0,y.Rh)(o,"completionLimit",1),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"goal"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"display"),(()=>void 0!==o.reset&&null!==o.reset&&o.reset[Symbol.for("!=")]?o.reset[Symbol.for("!=")](null):null!=o.reset)()&&h.globalBus.on("reset",(e=>{e===o.reset&&o.active.value&&o.toggle()})),o[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}},o}))}h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"hideChallenges",!1)})),(0,ke.QV)((0,y.tZ)((()=>(0,l.createVNode)(jo.Z,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>ke.ZP.hideChallenges=e,modelValue:ke.ZP.hideChallenges},null))));const at=(0,l.shallowReactive)({}),st=Symbol("Hotkey");function ut(e){return(0,te.z2)((()=>{const o=e();return o.type=st,(0,oe.yB)(o,"enabled"),(0,y.Rh)(o,"enabled",!0),(0,oe.yB)(o,"description"),o}))}h.globalBus.on("addLayer",(e=>{(0,y.bD)(e,st).forEach((e=>{at[e.key]=e}))})),h.globalBus.on("removeLayer",(e=>{(0,y.bD)(e,st).forEach((e=>{at[e.key]=void 0}))})),document.onkeydown=function(e){if("INPUT"===e.target?.tagName)return;if(tl.value&&(()=>void 0!==se.Z.keepGoing&&null!==se.Z.keepGoing&&se.Z.keepGoing[Symbol.for("!")]?se.Z.keepGoing[Symbol.for("!")]():!se.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=at[o];t&&(0,l.unref)(t.enabled)&&(e.preventDefault(),t.onPress())},(0,ke.fw)((0,y.tZ)((()=>{const e=Object.values(at).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 mt=Symbol("Links");function ct(e){return(0,te.z2)((()=>{const o=e();return o.type=mt,o[y.wA]=K,(0,oe.yB)(o,"links"),o[y.tj]=function(){const{links:e}=this;return{links:e}},o}))}var ft=t(3525);function dt(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 yt=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},display:{type:(0,Z.P5)(String,Object,Function),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),earned:{type:(0,Z.P5)(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:T},setup(e){const{display:o}=(0,l.toRefs)(e),t=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(t.value="");if((0,Z.RU)(e))return void(t.value=(0,Z.MM)(e));const n=(0,Z.MM)(e.requirement,"h3"),r=(0,Z.MM)(e.effectDisplay||"","b"),i=(0,Z.MM)(e.optionsDisplay||"","span");t.value=(0,Z.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 bt=(0,a.Z)(yt,[["render",dt],["__scopeId","data-v-e0d2a130"]]);var ht=bt;const pt=(0,ye.pm)(),vt=Symbol("Milestone");var gt;function St(e){return(0,te.z2)((()=>{const o=e();(0,p.Mv)(o,!1),o.id=(0,y.QI)("milestone-"),o.type=vt,o[y.wA]=ht,o.earned=o[p.n9],o.complete=function(){o[p.n9].value=!0},(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible);const t=o.visibility;if(o.visibility=(0,l.computed)((()=>{const e=(0,l.unref)(o.display);switch(ke.ZP.msDisplay){default:case gt.All:return(0,l.unref)(t);case gt.Configurable:return(0,l.unref)(o.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)(t);case gt.Incomplete:return(0,l.unref)(o.earned)?y.EE.None:(0,l.unref)(t);case gt.None:return y.EE.None}})),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"display"),o[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}},o.shouldEarn){const e=o;(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,Z.MM)((0,Z.RU)(o)?o:o.requirement);pt((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 o}))}(function(e){e["All"]="all",e["Configurable"]="configurable",e["Incomplete"]="incomplete",e["None"]="none"})(gt||(gt={})),h.globalBus.on("loadSettings",(e=>{(0,y.Rh)(e,"msDisplay",gt.All)}));const Nt=Object.values(gt).map((e=>({label:(0,Ee.IJ)(e),value:e})));(0,ke.QV)((0,y.tZ)((()=>(0,l.createVNode)(ft.Z,{title:"Show Milestones",options:Nt,"onUpdate:modelValue":e=>ke.ZP.msDisplay=e,modelValue:ke.ZP.msDisplay},null))));var kt=(0,l.defineComponent)({props:{display:null},setup(e){const o=e,{display:t}=(0,l.toRefs)(o),n=(0,Z.vq)(t);return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(n))))}});const Vt=kt;var Mt=Vt;const xt=Symbol("Tab");function wt(e){return(0,te.z2)((()=>{const o=e();return o.id=(0,y.QI)("tab-"),o.type=xt,o[y.wA]=Mt,o[y.tj]=function(){const{display:e}=this;return{display:e}},o}))}function Ct(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 Zt=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},display:{type:(0,Z.P5)(Object,String,Function),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),glowColor:(0,Z.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,Z.vq)(t),a=(0,l.computed)((()=>{const e=(0,Z.Uv)(n);return(()=>void 0!==e&&null!==e&&e[Symbol.for("!")]?e[Symbol.for("!")]():!e)()?{}:(0,l.unref)(r)?be(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 Bt=(0,a.Z)(Zt,[["render",Ct],["__scopeId","data-v-361380c0"]]);var Pt=Bt;function Et(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 It=(0,l.defineComponent)({props:{visibility:{type:(0,Z.P5)(Number),required:!0},activeTab:{type:(0,Z.P5)(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:(0,Z.P5)(Object),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object)},components:{Sticky:Ao,TabButton:Pt},setup(e){const{activeTab:o}=(0,l.toRefs)(e),t=(0,l.computed)((()=>Ne.Z[ke.ZP.theme].floatingTabs)),n=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,Z.Uv)(o);(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()?n.value="":(0,Z.RU)(e)?n.value=(0,Z.MM)(e):n.value=(0,Z.MM)((0,l.unref)(e.display))}));const r=(0,l.computed)((()=>{const e=(0,Z.Uv)(o),t=(0,Z.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,Z.Uv)(o);return(0,Z.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 Tt=(0,a.Z)(It,[["render",Et],["__scopeId","data-v-86da8746"]]);var Ft=Tt;const Rt=Symbol("TabButton"),jt=Symbol("TabFamily");function Dt(e){return(0,te.z2)((()=>{const o=e();if(0===Object.keys(o.tabs).length)throw console.warn("Cannot create tab family with 0 tabs",o),"Cannot create tab family with 0 tabs";o.id=(0,y.QI)("tabFamily-"),o.type=jt,o[y.wA]=Ft,(0,p.Mv)(o,Object.keys(o.tabs)[0]),o.selected=o[p.n9],o.activeTab=(0,l.computed)((()=>{const e=(0,l.unref)(t.tabs);if((()=>void 0!==o[p.n9].value&&null!==o[p.n9].value&&o[p.n9].value[Symbol.for("in")]?o[p.n9].value[Symbol.for("in")](e):o[p.n9].value in e)()&&(0,l.unref)(e[t[p.n9].value].visibility)===y.EE.Visible)return(0,l.unref)(e[t[p.n9].value].tab);const n=Object.values(e).find((e=>(0,l.unref)(e.visibility)===y.EE.Visible));return n?(0,l.unref)(n.tab):null})),(0,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style");for(const e in o.tabs){const t=o.tabs[e];t.type=Rt,t[y.wA]=Pt,(0,oe.yB)(t,"visibility"),(0,y.Rh)(t,"visibility",y.EE.Visible),(0,oe.yB)(t,"tab"),(0,oe.yB)(t,"display"),(0,oe.yB)(t,"classes"),(0,oe.yB)(t,"style"),(0,oe.yB)(t,"glowColor")}o[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 t=o;return t}))}const Ot=["disabled"];function _t(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,Ot)):(0,l.createCommentVNode)("",!0)}var At=(0,l.defineComponent)({props:{display:{type:(0,Z.P5)(String,Object,Function),required:!0},visibility:{type:(0,Z.P5)(Number),required:!0},style:(0,Z.P5)(String,Object,Array),classes:(0,Z.P5)(Object),resource:Object,cost:(0,Z.P5)(String,Object,Number),canPurchase:{type:(0,Z.P5)(Boolean),required:!0},bought:{type:(0,Z.P5)(Boolean),required:!0},mark:(0,Z.P5)(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:T,MarkNode:_},setup(e){const{display:o,cost:t}=(0,l.toRefs)(e),n=(0,l.shallowRef)("");return(0,l.watchEffect)((()=>{const r=(0,Z.Uv)(o);if((()=>void 0!==r&&null!==r&&r[Symbol.for("==")]?r[Symbol.for("==")](null):null==r)())return void(n.value="");if((0,Z.RU)(r))return void(n.value=(0,Z.MM)(r));const i=(0,Z.Uv)(t),a=(0,Z.MM)(r.title||"","h3"),s=(0,Z.MM)(r.description,"div"),u=(0,Z.MM)(r.effectDisplay||"");n.value=(0,Z.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&&M(e.resource,i)," ",e.resource?.displayName]):null]))))})),{component:n,unref:l.unref,Visibility:y.EE}}});const Ut=(0,a.Z)(At,[["render",_t],["__scopeId","data-v-264c96b4"]]);var qt=Ut;const zt=Symbol("Upgrade");function Lt(e){return(0,te.z2)((()=>{const o=e();return(0,p.Mv)(o,!1),o.id=(0,y.QI)("upgrade-"),o.type=zt,o[y.wA]=qt,(()=>void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford)()&&((()=>void 0!==o.resource&&null!==o.resource&&o.resource[Symbol.for("==")]?o.resource[Symbol.for("==")](null):null==o.resource)()||(()=>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[p.n9],(()=>void 0!==o.canAfford&&null!==o.canAfford&&o.canAfford[Symbol.for("==")]?o.canAfford[Symbol.for("==")](null):null==o.canAfford)()?o.canAfford=(0,l.computed)((()=>{const e=o;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,oe.yB)(o,"canAfford"),o.canPurchase=(0,l.computed)((()=>(0,l.unref)(o.visibility)===y.EE.Visible&&(0,l.unref)(o.canAfford)&&(()=>void 0!==(0,l.unref)(o.bought)&&null!==(0,l.unref)(o.bought)&&(0,l.unref)(o.bought)[Symbol.for("!")]?(0,l.unref)(o.bought)[Symbol.for("!")]():!(0,l.unref)(o.bought))())),o.purchase=function(){const e=o;(()=>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,oe.yB)(o,"visibility"),(0,y.Rh)(o,"visibility",y.EE.Visible),(0,oe.yB)(o,"classes"),(0,oe.yB)(o,"style"),(0,oe.yB)(o,"display"),(0,oe.yB)(o,"mark"),(0,oe.yB)(o,"cost"),(0,oe.yB)(o,"resource"),o[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}},o}))}function Wt(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 Gt=(0,P.createLayer)((()=>{const e="c",o="#4BDC13",t="Candies",n=v(0,"lollipops"),r=g(n),i=(0,p.ax)(!1),a=(0,p.ax)("pointy"),s=(0,p.ax)(10),u=(0,p.ax)(new b.ZP(10)),m=(0,l.computed)((()=>b.ZP.pow(n.value,.2))),c=(0,l.computed)((()=>b.ZP.times(n.value,10))),f=no((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"}))),h=St((()=>({shouldEarn(){return b.ZP.gte(r.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}}))),S=St((()=>({visibility(){return(0,y.Kf)(h.earned.value)},shouldEarn(){return b.ZP.gte(r.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=>i.value=e,modelValue:i.value},null),(0,l.createVNode)(jo.Z,{title:"boop","onUpdate:modelValue":e=>$t.boop.value=e,modelValue:$t.boop.value},null)])))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}}))),N=[h,S],k=it((()=>({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)(V.value)&&null!==(0,b.WU)(V.value)&&(0,b.WU)(V.value)[Symbol.for("+")]?(0,b.WU)(V.value)[Symbol.for("+")]("x"):(0,b.WU)(V.value)+"x")()}},visibility(){return(0,y.Kf)(b.ZP.gt(r.value,0))},goal:20,resource:el.points,onComplete(){console.log("hiii")},onEnter(){el.points.value=0,el.best.value=el.points.value,el.total.value=el.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}}))),V=(0,l.computed)((()=>b.ZP.add(n.value,1).tetrate(.02))),x=Lt((()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:n}))),w=Lt((()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${(0,b.WU)(C.value)}x`}),cost:1,resource:n,visibility:()=>(0,y.Kf)(x.bought.value)}))),C=(0,l.computed)((()=>{let e=b.ZP.add(n.value,1).pow(.5);return e.gte("1e20000000")&&(e=e.sqrt().times("1e10000000")),e})),B=Lt((()=>({visibility(){return(0,y.Kf)(w.bought.value)},canAfford(){return b.ZP.lt(el.points.value,7)},onPurchase(){el.points.value=b.ZP.add(el.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"}:{}}}))),P=Lt((()=>({resource:v(I.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}}))),E=[x,w,B],I=Qo((()=>({resource:n,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){u.value=b.ZP.add(u.value,e)},style:{height:"222px"},purchaseLimit:4}))),T=(0,l.computed)((()=>b.ZP.gte(I.amount.value,0)?b.ZP.pow(25,b.ZP.pow(I.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(I.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),F=(0,l.computed)((()=>b.ZP.gte(I.amount.value,0)?b.ZP.pow(25,b.ZP.pow(I.amount.value,1.1)):b.ZP.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](25):.04)(),b.ZP.times(I.amount.value,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()).pow(1.1)))),R=(0,p.ax)(!1),j=(0,l.ref)(!1),D=Ue((()=>({small:!0,display:"Respec Thingies",onClick(){R.value&&(()=>void 0!==j.value&&null!==j.value&&j.value[Symbol.for("!")]?j.value[Symbol.for("!")]():!j.value)()?j.value=!0:(n.value=b.ZP.add(n.value,u.value),I.amount.value=0,el.tree.reset(G))}}))),O=Ue((()=>({small:!0,display:"Sell One",onClick(){b.ZP.lte(I.amount.value,0)||(I.amount.value=b.ZP.sub(I.amount.value,1),n.value=b.ZP.add(n.value,I.cost.value),u.value=b.ZP.sub(u.value,I.cost.value))}}))),_=(0,y.tZ)((()=>(0,l.createVNode)(Do.Z,null,{default:()=>[(0,l.createVNode)(ue.Z,null,{default:()=>[(0,l.createVNode)(jo.Z,{title:"Confirm","onUpdate:modelValue":e=>R.value=e,modelValue:R.value},null),(0,Z._4)(D)]}),(0,Z._4)(I),(0,Z._4)(O),(0,l.createVNode)(Lo.Z,{modelValue:j.value,"onUpdate:modelValue":e=>j.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:()=>j.value=!1},[(0,l.createTextVNode)("Cancel")]),(0,l.createVNode)("button",{class:"button modal-default-button danger",onClick:()=>{D.onClick(),j.value=!1}},[(0,l.createTextVNode)("Respec")])])})]}))),A=Ko((()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:$o.Right,width:300,height:30,progress(){return b.ZP.add(el.points.value,1).log(10).div(10).toNumber()},display(){return(()=>void 0!==(0,b.WU)(el.points.value)&&null!==(0,b.WU)(el.points.value)&&(0,b.WU)(el.points.value)[Symbol.for("+")]?(0,b.WU)(el.points.value)[Symbol.for("+")](" / 1e10 points"):(0,b.WU)(el.points.value)+" / 1e10 points")()}}))),U=Ko((()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:$o.Up,width:50,height:200,progress(){return b.ZP.div(el.points.value,100)},display(){return(()=>void 0!==(0,b.Ht)(b.ZP.div(el.points.value,1).min(100))&&null!==(0,b.Ht)(b.ZP.div(el.points.value,1).min(100))&&(0,b.Ht)(b.ZP.div(el.points.value,1).min(100))[Symbol.for("+")]?(0,b.Ht)(b.ZP.div(el.points.value,1).min(100))[Symbol.for("+")]("%"):(0,b.Ht)(b.ZP.div(el.points.value,1).min(100))+"%")()}}))),q=Ko((()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:$o.Up,width:100,height:30,progress(){return b.ZP.div(n.value,50)}}))),z=Ge((()=>({scaling:Je(We(10,.5),1e100,.5),baseResource:el.points,gainResource:n,roundUpCost:!0}))),L=ho((()=>({thingsToReset:()=>[Gt]}))),W=[ut((()=>({key:"c",description:"reset for lollipops or whatever",onPress(){H.canClick.value&&H.onClick()}}))),ut((()=>({key:"ctrl+c",description:"respec things",onPress(){D.onClick()}})))],G=ze((()=>({layerID:e,color:o,reset:L,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let e=M(n);return b.ZP.gt(I.amount.value,0)&&(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](`<br><i><br><br><br>${(0,b.Ht)(I.amount.value)} Exhancers</i>`):e+`<br><i><br><br><br>${(0,b.Ht)(I.amount.value)} Exhancers</i>`)()),e},style:{color:"#3325CC",textDecoration:"underline"}}))),H=qe((()=>({conversion:z,tree:el.tree,treeNode:G,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}))),Y=re((()=>({display:"TH",color:"#6d3678",canClick(){return b.ZP.gte(el.points.value,10)},tooltip:"Thanos your points",onClick(){el.points.value=b.ZP.div(el.points.value,2),console.log("Thanos'd")},glowColor(){return b.ZP.eq(I.amount.value,1)?"orange":""}}))),J=re((()=>({display:"h",color(){return Ne.Z[ke.ZP.theme].variables["--locked"]},tooltip:{display:(0,l.computed)((()=>`Restore your points to ${(0,b.WU)(s.value)}`)),right:!0},canClick(){return b.ZP.lt(el.points.value,s.value)},onClick(){el.points.value=s.value}}))),$=re((()=>({visibility:y.EE.Hidden}))),K=ie((()=>({nodes(){return[[$t.treeNode,G],[Y,$,J]]},branches(){return[{startNode:$t.treeNode,endNode:G,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:G,endNode:Y},{startNode:Y,endNode:J}]}}))),X=ct((()=>({links:[{startNode:J,endNode:q,"stroke-width":"5px",stroke:"red",offsetEnd:{x:(()=>(-50)[Symbol.for("+")]?(-50)[Symbol.for("+")](100*q.progress.value.toNumber()):100*q.progress.value.toNumber()-50)(),y:0}}]}))),Q=Dt((()=>({tabs:{first:{tab:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z._4)(...E),(0,Z._4)(P),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("confirmed")])]))),display:"first"},second:{tab:$t.display,display:"second"}},style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}}))),ee=Dt((()=>({tabs:{mainTab:{tab:wt((()=>({display:(0,y.tZ)((()=>{let e;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(Zo,{resource:n,color:o,effectDisplay:`which are boosting waffles by ${(0,b.WU)(m.value)} and increasing the Ice Cream cap by ${(0,b.WU)(c.value)}`},null),(0,l.createVNode)(Ao,null,Wt(e=(0,Z.sY)(H))?e:{default:()=>[e]}),(0,l.createVNode)(So,{resource:n,color:o},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)(Ro.Z,{modelValue:a.value,"onUpdate:modelValue":e=>a.value=e},null),(0,l.createVNode)(Ao,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[(0,l.createTextVNode)("I have "),M(el.points),(0,l.createTextVNode)(" "),a.value,(0,l.createTextVNode)(" points!")]}),(0,l.createVNode)("hr",null,null),(0,Z.Dy)(...N),(0,l.createVNode)(d,null,null),(0,Z._4)(...E),(0,Z._4)(P),(0,Z._4)(k)])}))}))),display:"main tab",glowColor(){return x.canPurchase.value||w.canPurchase.value||B.canPurchase.value||k.canComplete.value?"blue":""},style:{color:"orange"}},thingies:{tab:wt((()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z.sY)(_),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ue.Z,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[(0,l.createVNode)(jo.Z,{"onUpdate:modelValue":e=>i.value=e,modelValue:i.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)(zo,{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:wt((()=>({display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z.sY)(f),(0,Z.sY)(A),(0,l.createVNode)(d,null,null),(0,l.createVNode)(ue.Z,null,{default:()=>[(0,l.createVNode)(Do.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,Z.sY)(U)]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)(Do.Z,null,{default:()=>[(0,l.createVNode)("div",null,[(0,l.createTextVNode)("idk")]),(0,l.createVNode)(d,{width:"0",height:"50px"},null),(0,Z.sY)(q)]})]}),(0,l.createVNode)(d,null,null),(0,l.createVNode)("div",null,[(0,l.createTextVNode)('It\'s jail because "bars"! So funny! Ha ha!')]),(0,Z.sY)(K)])))}))),display:"jail"},illuminati:{tab:wt((()=>({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,Z.sY)(Q),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("Adjust how many points H gives you!")]),(0,l.createVNode)(Fo,{"onUpdate:modelValue":e=>s.value=e,modelValue:s.value,min:1,max:30},null)]))),style:{backgroundColor:"#3325CC"}}))),visibility(){return(0,y.Kf)(B.bought.value)},display:"illuminati"}}})));return{id:e,color:o,name:t,points:n,best:r,beep:i,thingy:a,otherThingy:s,spentOnBuyables:u,waffleBoost:m,icecreamCap:c,coolInfo:f,lollipopMilestones:N,funChallenge:k,funEffect:V,generatorUpgrade:x,lollipopMultiplierUpgrade:w,lollipopMultiplierEffect:C,unlockIlluminatiUpgrade:B,quasiUpgrade:P,exhancers:I,respecBuyables:D,sellExhancer:O,bars:{tallBoi:U,longBoi:A,flatBoi:q},tree:K,g:Y,h:J,spook:$,conversion:z,reset:L,hotkeys:W,treeNode:G,resetButton:H,confirmRespec:R,minWidth:800,tabs:ee,display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z.sY)(ee),(0,Z.sY)(X)])))}}));var Ht=Gt,Yt=JSON.parse('{"number":{"value":0},"color":{"value":["#00FFFC","#FC00FF","#fffc00"]},"shape":{"type":["circle","triangle"],"options":{}},"opacity":{"value":1,"animation":{"enable":true,"minimumValue":0,"speed":2,"startValue":"max","destroy":"min"}},"size":{"value":4,"random":{"enable":true,"minimumValue":2}},"links":{"enable":false},"life":{"duration":{"sync":true,"value":5},"count":1},"move":{"enable":true,"gravity":{"enable":true,"acceleration":10},"speed":{"min":10,"max":20},"decay":0.1,"direction":"none","straight":false,"outModes":{"default":"destroy","top":"none"}},"rotate":{"value":{"min":0,"max":360},"direction":"random","move":true,"animation":{"enable":true,"speed":60}},"tilt":{"direction":"random","enable":true,"move":true,"value":{"min":0,"max":360},"animation":{"enable":true,"speed":60}},"roll":{"darken":{"enable":true,"value":25},"enable":true,"speed":{"min":15,"max":25}},"wobble":{"distance":30,"enable":true,"move":true,"speed":{"min":-15,"max":15}}}');const Jt=(0,P.createLayer)((()=>{const e="f",o="#FE0102",t="Farms",n=v(0,"farm points"),r=(0,p.ax)(!1),i=no((()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}}))),a=(0,p.ax)("Start"),s=Ue((()=>({display(){return{title:"Clicky clicky!",description:(()=>"Current state:<br>"[Symbol.for("+")]?"Current state:<br>"[Symbol.for("+")](a.value):"Current state:<br>"+a.value)()}},initialState:"Start",canClick(){return(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!==")]?a.value[Symbol.for("!==")]("Borkened..."):"Borkened..."!==a.value)()},onClick(e){switch(a.value){case"Start":a.value="A new state!";break;case"A new state!":a.value="Keep going!";break;case"Keep going!":a.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const 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;g.addEmitter({particles:Yt,autoPlay:!0,fill:!1,shape:"square",startCount:0,life:{count:1,duration:.1,wait:!1},rate:{delay:0,quantity:100},position:{x:(()=>100*(o?.clientX??0)!==void 0&&100*(o?.clientX??0)!==null&&(100*(o?.clientX??0))[Symbol.for("/")]?(100*(o?.clientX??0))[Symbol.for("/")](window.innerWidth):100*(o?.clientX??0)/window.innerWidth)(),y:(()=>100*(o?.clientY??0)!==void 0&&100*(o?.clientY??0)!==null&&(100*(o?.clientY??0))[Symbol.for("/")]?(100*(o?.clientY??0))[Symbol.for("/")](window.innerHeight):100*(o?.clientY??0)/window.innerHeight)()},size:{width:0,height:0,mode:"precise"}}),a.value="Borkened...";break;default:a.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(a.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}}))),u=Ue((()=>({onClick(){(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("==")]?a.value[Symbol.for("==")]("Borkened..."):"Borkened..."==a.value)()&&(a.value="Start")},display(){return(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("==")]?a.value[Symbol.for("==")]("Borkened..."):"Borkened..."==a.value)()?"Fix the clickable!":"Does nothing"},small:!0}))),m=ho((()=>({thingsToReset:()=>[Jt]}))),c=He((()=>({scaling:We(10,.5),baseResource:el.points,gainResource:n,modifyGainAmount:e=>b.ZP.times(e,Ht.otherThingy.value)}))),f=ze((()=>({layerID:e,color:o,reset:m,tooltip(){return f.canClick.value?`${M(n)} ${n.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${M(el.points)}`},canClick(){return b.ZP.gte(el.points.value,10)}}))),h=qe((()=>({conversion:c,tree:el.tree,treeNode:f,display:(0,y.tZ)((()=>h.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)(h.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)(h.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)(h.conversion.nextAt.value),(0,l.createTextVNode)(" points)")])))}))),g=yo((()=>({}))),S=(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,Z.sY)(i),(0,l.createVNode)(Zo,{resource:n,color:o},null),(0,Z.sY)(h),(0,l.createVNode)("div",null,[(0,l.createTextVNode)("You have "),(0,b.Ht)(c.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,Z._4)(u),(0,Z._4)(s),(0,Z.sY)(g)])));return{id:e,color:o,name:t,points:n,boop:r,coolInfo:i,clickable:s,clickableState:a,reset:m,conversion:c,treeNode:f,resetButton:h,display:S}}));var $t=Jt;function Kt(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 Xt=(0,P.createLayer)((()=>{const e="a",o="yellow",t="Achievements",n=v(0,"achievement power"),r=re((()=>({display:"A",color:o,tooltip:{display:"Achievements",right:!0},onClick(){el.showAchievements()}}))),i=ge((()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:(0,l.computed)((()=>i.earned.value?"You did it!":"How did this happen?")),shouldEarn:()=>!0}))),a=ge((()=>({display:"Impossible!",tooltip:(0,l.computed)((()=>a.earned.value?"HOW????":"Mwahahaha!")),style:{color:"#04e050"}}))),s=ge((()=>({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($t.points.value,1)},onComplete(){console.log("Bork bork bork!")}}))),u=[i,a,s],m=Re((()=>({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)(A.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(el.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)()}}))),c=(0,y.tZ)((()=>{let e,o,t;return(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(ue.Z,null,{default:()=>[(0,l.createVNode)(A.Z,{display:i.tooltip,bottom:!0},Kt(e=(0,Z.sY)(i))?e:{default:()=>[e]}),(0,l.createVNode)(A.Z,{display:a.tooltip,bottom:!0},Kt(o=(0,Z.sY)(a))?o:{default:()=>[o]}),(0,l.createVNode)(A.Z,{display:s.tooltip,bottom:!0},Kt(t=(0,Z.sY)(s))?t:{default:()=>[t]})]}),(0,Z._4)(m)])}));return{id:e,color:o,name:t,points:n,achievements:u,grid:m,treeNode:r,display:c}}));var Qt=Xt;const el=(0,P.createLayer)((()=>{const e=v(10),o=g(e),t=S(e),n=(0,l.computed)((()=>{if((()=>void 0!==Ht.generatorUpgrade.bought.value&&null!==Ht.generatorUpgrade.bought.value&&Ht.generatorUpgrade.bought.value[Symbol.for("!")]?Ht.generatorUpgrade.bought.value[Symbol.for("!")]():!Ht.generatorUpgrade.bought.value)())return new b.ZP(0);let e=new b.ZP(3.19);return Ht.lollipopMultiplierUpgrade.bought.value&&(e=e.times(Ht.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,P.setupLayerModal)(Qt),s=ie((()=>({nodes:[[Ht.treeNode],[$t.treeNode,Ht.spook]],leftSideNodes:[Qt.treeNode,Ht.h],branches:[{startNode:$t.treeNode,endNode:Ht.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=(0,l.toRaw)(this.resettingNode.value)===(0,l.toRaw)(Ht.treeNode)?0:10,o.value=e.value,t.value=e.value},resetPropagation:ae})));return{id:"main",name:"Tree",display:(0,y.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Game Paused")]),[[l.vShow,0===se.Z.devSpeed]]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Dev Speed: "),(0,b.WU)(se.Z.devSpeed||0),(0,l.createTextVNode)("x")]),[[l.vShow,se.Z.devSpeed&&(()=>void 0!==se.Z.devSpeed&&null!==se.Z.devSpeed&&se.Z.devSpeed[Symbol.for("!==")]?se.Z.devSpeed[Symbol.for("!==")](1):1!==se.Z.devSpeed)()]]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Offline Time: "),(0,b.mr)(se.Z.offlineTime||0)]),[[l.vShow,(()=>void 0!==se.Z.offlineTime&&null!==se.Z.offlineTime&&se.Z.offlineTime[Symbol.for("!=")]?se.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=se.Z.offlineTime)()]]),(0,l.createVNode)("div",null,[(0,l.withDirectives)((0,l.createVNode)("span",null,[(0,l.createTextVNode)("You have ")]),[[l.vShow,b.ZP.lt(e.value,"1e1000")]]),(0,l.createVNode)("h2",null,[(0,b.WU)(e.value)]),(0,l.withDirectives)((0,l.createVNode)("span",null,[(0,l.createTextVNode)(" points")]),[[l.vShow,b.ZP.lt(e.value,"1e1e6")]])]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("("),r.value,(0,l.createTextVNode)(")")]),[[l.vShow,b.ZP.gt(n.value,0)]]),(0,l.createVNode)(d,null,null),(0,l.createVNode)("button",{onClick:i},[(0,l.createTextVNode)("open achievements")]),(0,Z.sY)(a),(0,Z.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}})),ol=e=>[el,$t,Ht,Qt],tl=(0,l.computed)((()=>b.ZP.gt(el.points.value,25)));function ll(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},createLayer:function(){return h},addLayer:function(){return p},getLayer:function(){return v},removeLayer:function(){return g},reloadLayer:function(){return S},setupLayerModal:function(){return N}});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={};function h(e){return(0,a.z2)((()=>{const o={},t=o.emitter=(0,s.i)();return o.on=t.on.bind(t),o.emit=t.emit.bind(t),o.nodes=(0,l.ref)({}),o.minimized=(0,m.ax)(!1),Object.assign(o,e.call(o)),(0,i.yB)(o,"color"),(0,i.yB)(o,"display"),(0,i.yB)(o,"name"),(0,r.Rh)(o,"name",o.id),(0,i.yB)(o,"minWidth"),(0,r.Rh)(o,"minWidth",600),(0,i.yB)(o,"minimizable"),(0,r.Rh)(o,"minimizable",!0),o}))}function p(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 v(e){return b[e]}function g(e){console.info("Removing layer",e.id),u.globalBus.emit("removeLayer",e),b[e.id]=void 0}function S(e){g(e),p(e,c.Z)}function N(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)})))}}window.layers=b,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},RU:function(){return d},ix:function(){return y},vq:function(){return b},KO:function(){return h},o9:function(){return p},Uv:function(){return v},P5:function(){return g}});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(d(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){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 y(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 b(e,o="div"){const t=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{t.value=u(v(e),o)})),t}function h(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 p(e){return(0,l.computed)((()=>v(e)))}function v(e){return(0,l.unref)((0,l.unref)(e))}function g(...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},(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||v.value));function p(){t("update:modelValue",!1)}const v=(0,l.ref)(!1),g=(0,l.ref)(null),S=(0,l.computed)((()=>g.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=>v.value=!0),onAfterLeave:t[1]||(t[1]=e=>v.value=!1)},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",(0,l.mergeProps)({class:"modal-mask",onPointerdown:(0,l.withModifiers)(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:g},{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},2794:function(e,o,t){"use strict";t.d(o,{Z:function(){return u}});var l=t(4865);function n(e,o,t,n,r,i){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:o[0]||(o[0]=o=>e.isHovered=!0),onMouseleave:o[1]||(o[1]=o=>e.isHovered=!1)},[(0,l.renderSlot)(e.$slots,"default",{},void 0,!0),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[e.isShown?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tooltip",{top:e.unref(e.top),left:e.unref(e.left),right:e.unref(e.right),bottom:e.unref(e.bottom)}]),style:(0,l.normalizeStyle)({"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"})},[e.comp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.comp),{key:0})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)])),_:1})],34)}var r=t(1604),i=(0,l.defineComponent)({props:{display:(0,r.P5)(Object,String,Function),top:(0,r.P5)(Boolean),left:(0,r.P5)(Boolean),right:(0,r.P5)(Boolean),bottom:(0,r.P5)(Boolean),xoffset:(0,r.P5)(String),yoffset:(0,r.P5)(String),force:(0,r.P5)(Boolean)},setup(e){const{display:o,force:t}=(0,l.toRefs)(e),n=(0,l.ref)(!1),i=(0,l.computed)((()=>((0,r.Uv)(t)||n.value)&&a.value)),a=(0,r.KO)(o);return{isHovered:n,isShown:i,comp:a,unref:l.unref}}}),a=t(3744);const s=(0,a.Z)(i,[["render",n],["__scopeId","data-v-c8952e00"]]);var u=s},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},2736:function(e,o,t){"use strict";t.r(o),o["default"]="eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiwiaGlkZUNoYWxsZW5nZXMiOmZhbHNlLCJ0aGVtZSI6InBhcGVyIiwic3VidGFicyI6e30sIm1pbmltaXplZCI6e30sIm1vZElEIjoidG10LXgiLCJtb2RWZXJzaW9uIjoiMC4wIiwicG9pbnRzIjoiMzMwMC4zNzc3NzM4NTkwNTUiLCJtYWluIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJmIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImNsaWNrYWJsZXMiOnsiMTEiOiJTdGFydCJ9LCJ1bmxvY2tlZCI6ZmFsc2UsInBvaW50cyI6IjAiLCJib29wIjpmYWxzZX0sImMiOnsidXBncmFkZXMiOlsiMTEiXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImJ1eWFibGVzIjp7IjExIjoiMCJ9LCJjaGFsbGVuZ2VzIjp7IjExIjoiMCJ9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCIsImJlc3QiOiIxIiwidG90YWwiOiIwIiwiYmVlcCI6ZmFsc2UsInRoaW5neSI6InBvaW50eSIsIm90aGVyVGhpbmd5IjoxMCwic3BlbnRPbkJ1eWFibGVzIjoiMCJ9LCJhIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbIjExIl0sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCJ9LCJnIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJoIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9"},7634:function(e,o,t){var l={"./safff.txt":2736};function n(e){var o=r(e);return t(o)}function r(e){if(!t.o(l,e)){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}return l[e]}n.keys=function(){return Object.keys(l)},n.resolve=r,e.exports=n,n.id=7634},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]={exports:{}};return e[l].call(r.exports,r,r.exports,t),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(){var e,o=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};t.t=function(l,n){if(1&n&&(l=this(l)),8&n)return l;if("object"===typeof l&&l){if(4&n&&l.__esModule)return l;if(16&n&&"function"===typeof l.then)return l}var r=Object.create(null);t.r(r);var i={};e=e||[null,o({}),o([]),o(o)];for(var a=2&n&&l;"object"==typeof a&&!~e.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((function(e){i[e]=function(){return l[e]}}));return i["default"]=function(){return l},t.d(r,i),r}}(),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.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(o,l){return t.f[l](e,o),o}),[]))}}(),function(){t.u=function(e){return"js/"+e+".f9b47cea.js"}}(),function(){t.miniCssF=function(e){}}(),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(){var e={},o="profectus:";t.l=function(l,n,r,i){if(e[l])e[l].push(n);else{var a,s;if(void 0!==r)for(var u=document.getElementsByTagName("script"),m=0;m<u.length;m++){var c=u[m];if(c.getAttribute("src")==l||c.getAttribute("data-webpack")==o+r){a=c;break}}a||(s=!0,a=document.createElement("script"),a.charset="utf-8",a.timeout=120,t.nc&&a.setAttribute("nonce",t.nc),a.setAttribute("data-webpack",o+r),a.src=l),e[l]=[n];var f=function(o,t){a.onerror=a.onload=null,clearTimeout(d);var n=e[l];if(delete e[l],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((function(e){return e(t)})),o)return o(t)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),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.p=""}(),function(){var e={143:0};t.f.j=function(o,l){var n=t.o(e,o)?e[o]:void 0;if(0!==n)if(n)l.push(n[2]);else{var r=new Promise((function(t,l){n=e[o]=[t,l]}));l.push(n[2]=r);var i=t.p+t.u(o),a=new Error,s=function(l){if(t.o(e,o)&&(n=e[o],0!==n&&(e[o]=void 0),n)){var r=l&&("load"===l.type?"missing":l.type),i=l&&l.target&&l.target.src;a.message="Loading chunk "+o+" failed.\n("+r+": "+i+")",a.name="ChunkLoadError",a.type=r,a.request=i,n[1](a)}};t.l(i,s,"chunk-"+o,o)}},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(2782)}));l=t.O(l)})(); -//# sourceMappingURL=app.a008bbca.js.map \ No newline at end of file diff --git a/js/app.a008bbca.js.map b/js/app.a008bbca.js.map deleted file mode 100644 index c58248c..0000000 --- a/js/app.a008bbca.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/app.a008bbca.js","mappings":"qFAgCA,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,GAGnB,IAAYC,GAAZ,SAAYA,GACR,uBACA,mBACA,qBACA,kBAJJ,CAAYA,IAAAA,EAAM,KAOlB,QACIC,QAASL,EACTM,MAAO,IACAN,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,UACb,kBAAmB,MACnB,iBAAkB,GAClB,mBAAoB,OAExBC,cAAc,GAGlBK,OAAQ,IACDP,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ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+zB,EAAS+D,MAAK,SAASjwC,GAAM,OAA+B,IAAxBmvC,EAAgBnvC,MAAe,CACrE,IAAI6rC,KAAYkE,EACZxE,EAAoBC,EAAEuE,EAAalE,KACrCN,EAAoB1vB,EAAEgwB,GAAYkE,EAAYlE,IAGhD,GAAGmE,EAAS,IAAIvuB,EAASuuB,EAAQzE,GAGlC,IADGsE,GAA4BA,EAA2BC,GACrD33B,EAAI+zB,EAASr4B,OAAQsE,IACzBu1B,EAAUxB,EAAS/zB,GAChBozB,EAAoBC,EAAE2D,EAAiBzB,IAAYyB,EAAgBzB,IACrEyB,EAAgBzB,GAAS,KAE1ByB,EAAgBzB,GAAW,EAE5B,OAAOnC,EAAoBU,EAAExqB,IAG1ByuB,EAAqBC,KAAK,yBAA2BA,KAAK,0BAA4B,GAC1FD,EAAmB3uC,QAAQquC,EAAqB5lB,KAAK,KAAM,IAC3DkmB,EAAmB1uC,KAAOouC,EAAqB5lB,KAAK,KAAMkmB,EAAmB1uC,KAAKwoB,KAAKkmB,I,GCpFvF,IAAIE,EAAsB7E,EAAoBU,OAAElrC,EAAW,CAAC,MAAM,WAAa,OAAOwqC,EAAoB,SAC1G6E,EAAsB7E,EAAoBU,EAAEmE,I","sources":["webpack://profectus/./src/data/themes.ts","webpack://profectus/./src/features/feature.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?8e83","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?b115","webpack://profectus/./src/features/trees/TreeNode.vue?11fe","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/tooltip.ts","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","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?e251","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?11d4","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?75bb","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/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?c3f3","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?941d","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/Tooltip.vue?e91b","webpack://profectus/./src/components/Tooltip.vue?b26d","webpack://profectus/./src/components/Tooltip.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/./saves/safff.txt","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/create fake namespace object","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/ensure chunk","webpack://profectus/webpack/runtime/get javascript chunk filename","webpack://profectus/webpack/runtime/get mini-css chunk filename","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/load script","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/publicPath","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}\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};\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\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 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 { isRef, Ref, ref } from \"vue\";\nimport { GenericLayer } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\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> = {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n};\nexport type PersistentRef<T extends State = State> = Ref<T> & Persistent<T>;\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): PersistentRef<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as PersistentRef<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n return persistent as PersistentRef<T>;\n}\n\nexport function makePersistent<T extends State>(\n obj: unknown,\n defaultValue: T\n): asserts obj is Persistent<T> {\n const persistent = obj as Partial<Persistent<T>>;\n const state = ref(defaultValue) as Ref<T>;\n\n persistent[PersistentState] = state;\n persistent[DefaultValue] = isRef(defaultValue) ? (defaultValue.value as T) : defaultValue;\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\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 (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 } 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});\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 { PersistentRef } 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<PersistentRef<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number>(Number),\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) {\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 = `${minWidth}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=3cbf87a6&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=3cbf87a6&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-3cbf87a6\"]])\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-c40c38d8\"),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 \"./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=c40c38d8&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-c40c38d8\"]])\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-1378eac7\"),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 \"./Tooltip.vue\";\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 bottom: \"\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\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 bottom: \"\",\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n bottom: \"\",\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n bottom: \"\",\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n bottom: \"\",\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n })\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 right: \"\",\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n right: \"\"\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n right: \"\",\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n })\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=1378eac7&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-1378eac7\"]])\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, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5fcfaa6f\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"tabs-container\" }\nconst _hoisted_2 = { class: \"inner-tab\" }\nconst _hoisted_3 = {\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, links, minimizable, nodes } =\n layer;\n return { display, minimized, minWidth, name, color, style, classes, links, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\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_2, [\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_3))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]))\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=5fcfaa6f&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=5fcfaa6f&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-5fcfaa6f\"]])\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\nfunction updateMouse(/* event */) {\n // TODO use event to update mouse position for particles\n}\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 onMousemove: updateMouse,\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 ], 38)\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=fbb1e278&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-fbb1e278\"]])\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>(objectFunc: () => T): T {\n const obj: T | Record<string, never> = {};\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc());\n calculated = true;\n }\n return obj as 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() {\n console.error(\"Layers and features are shallow readonly\");\n return false;\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());\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as 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 { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-28bdfe90\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"left-side-nodes\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"side-nodes\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TreeNode = _resolveComponent(\"TreeNode\")!\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.nodes), (row, index) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({\n class: \"row\",\n key: index\n }, _ctx.$attrs), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row, (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ], 16))\n }), 128)),\n (_ctx.unref(_ctx.leftSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.leftSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.unref(_ctx.rightSideNodes))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rightSideNodes), (node, nodeIndex) => {\n return (_openBlock(), _createBlock(_component_TreeNode, _mergeProps({ key: nodeIndex }, _ctx.gatherNodeProps(node), {\n \"force-tooltip\": node.forceTooltip,\n small: \"\"\n }), null, 16, [\"force-tooltip\"]))\n }), 128))\n ]))\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 { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, mergeProps as _mergeProps, withCtx as _withCtx, 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 const _component_Tooltip = _resolveComponent(\"Tooltip\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createBlock(_component_Tooltip, _mergeProps({ key: 0 }, _ctx.tooltipToBind && _ctx.gatherTooltipProps(_ctx.tooltipToBind), {\n display: _ctx.tooltipDisplay,\n force: _ctx.forceTooltip,\n style: { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n class: {\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n small: _ctx.unref(_ctx.small),\n ..._ctx.unref(_ctx.classes)\n }\n }), {\n default: _withCtx(() => [\n _createElementVNode(\"button\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.click && _ctx.click(...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 ]),\n _: 1\n }, 16, [\"display\", \"force\", \"style\", \"class\"]))\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__","import { CoercableComponent } from \"features/feature\";\nimport { ProcessedComputable } from \"util/computed\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport interface Tooltip {\n display: ProcessedComputable<CoercableComponent>;\n top?: ProcessedComputable<boolean>;\n left?: ProcessedComputable<boolean>;\n right?: ProcessedComputable<boolean>;\n bottom?: ProcessedComputable<boolean>;\n xoffset?: ProcessedComputable<string>;\n yoffset?: ProcessedComputable<string>;\n force?: ProcessedComputable<boolean>;\n}\n\nexport function gatherTooltipProps(tooltip: Tooltip) {\n const { display, top, left, right, bottom, xoffset, yoffset, force } = tooltip;\n return { display, top, left, right, bottom, xoffset, yoffset, force };\n}\n","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport TooltipVue from \"components/Tooltip.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { gatherTooltipProps, Tooltip } from \"features/tooltip\";\nimport { ProcessedComputable } from \"util/computed\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\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 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 tooltip: processedPropType<CoercableComponent | Tooltip>(Object, String, Function),\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 forceTooltip: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\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 small: processedPropType<boolean>(Boolean)\n },\n components: {\n Tooltip: TooltipVue,\n MarkNode,\n Node\n },\n setup(props) {\n const { tooltip, forceTooltip, onClick, onHold, display } = toRefs(props);\n\n function click(e: MouseEvent) {\n if (e.shiftKey && tooltip) {\n forceTooltip.value = !forceTooltip.value;\n } else {\n unref(onClick)?.();\n }\n }\n\n const comp = computeOptionalComponent(display);\n const tooltipDisplay = shallowRef<ProcessedComputable<CoercableComponent> | undefined>(\n undefined\n );\n watchEffect(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n tooltipDisplay.value = currTooltip.display;\n return;\n }\n tooltipDisplay.value = currTooltip;\n });\n const tooltipToBind = computed(() => {\n const currTooltip = unwrapRef(tooltip);\n\n if (typeof currTooltip === \"object\" && !isCoercableComponent(currTooltip)) {\n return currTooltip;\n }\n return null;\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n click,\n start,\n stop,\n comp,\n tooltipDisplay,\n tooltipToBind,\n unref,\n Visibility,\n gatherTooltipProps,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=09bec9fe&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=09bec9fe&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-09bec9fe\"]])\n\nexport default __exports__","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 =\n rect && 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 =\n rect && 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 { 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).forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n node => (node!.rect = node?.element.getBoundingClientRect())\n );\n isDirty = true;\n });\n }\n}\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=5837f7bc&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-5837f7bc\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { processedPropType } from \"util/vue\";\nimport { defineComponent, unref } from \"vue\";\nimport TreeNode from \"./TreeNode.vue\";\nimport Links from \"features/links/Links.vue\";\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: { TreeNode, Links },\n setup() {\n function gatherNodeProps(node: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n } = node;\n return {\n display,\n visibility,\n style,\n classes,\n tooltip,\n onClick,\n onHold,\n color,\n glowColor,\n forceTooltip,\n canClick,\n mark,\n id\n };\n }\n\n return {\n gatherNodeProps,\n unref\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=28bdfe90&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=ts\"\nexport * from \"./Tree.vue?vue&type=script&lang=ts\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=28bdfe90&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-28bdfe90\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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 { Tooltip } from \"features/tooltip\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport { persistent } from \"game/persistence\";\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 tooltip?: Computable<string | Tooltip>;\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 forceTooltip: Ref<boolean>;\n type: typeof TreeNodeType;\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 tooltip: GetComputableType<T[\"tooltip\"]>;\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: () => T & ThisType<TreeNode<T>>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode: T & Partial<BaseTreeNode> = optionsFunc();\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n\n if (treeNode.tooltip) {\n treeNode.forceTooltip = persistent(false);\n } else {\n // If we don't have a tooltip, no point in making this persistent\n treeNode.forceTooltip = ref(false);\n }\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, \"tooltip\");\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 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: () => T & ThisType<Tree<T>>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree: T & Partial<BaseTree> = 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);\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 Tooltip from \"components/Tooltip.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 Tooltip\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=2e1ea71d&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=2e1ea71d&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-2e1ea71d\"]])\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 GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, makePersistent, PersistentState } 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: () => T & ThisType<Achievement<T>>\n): Achievement<T> {\n return createLazyProxy(() => {\n const achievement: T & Partial<BaseAchievement> = optionsFunc();\n makePersistent<boolean>(achievement, false);\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 });\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Grid<T>>\n): Grid<T> {\n return createLazyProxy(() => {\n const grid: T & Partial<BaseGrid> = optionsFunc();\n makePersistent(grid, {});\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 });\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 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: () => T & ThisType<Clickable<T>>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable: T & Partial<BaseClickable> = 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, 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 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}\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 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 }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n 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\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 unref(resetButton.conversion.currentGain)\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n Next:{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n unref(resetButton.conversion.nextAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gt(unref(resetButton.conversion.currentGain), 0)\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: () => 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 Decimal, { DecimalSource } from \"util/bignum\";\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 { Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\nexport interface ConversionOptions {\n scaling: ScalingFunction;\n currentGain?: Computable<DecimalSource>;\n nextAt?: Computable<DecimalSource>;\n baseResource: Resource;\n gainResource: Resource;\n buyMax?: Computable<boolean>;\n roundUpCost?: Computable<boolean>;\n convert?: VoidFunction;\n modifyGainAmount?: (gain: DecimalSource) => DecimalSource;\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 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 nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: () => T & ThisType<Conversion<T>>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion: T = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() =>\n conversion.scaling.currentGain(conversion as GenericConversion)\n );\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() =>\n conversion.scaling.nextAt(conversion as GenericConversion)\n );\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n conversion.modifyGainAmount\n ? conversion.modifyGainAmount(\n unref((conversion as GenericConversion).currentGain)\n )\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, \"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 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 let gain = Decimal.sub(conversion.baseResource.value, unref(base))\n .sub(1)\n .times(unref(coefficient))\n .add(1)\n .floor()\n .max(0);\n\n if (!conversion.buyMax) {\n gain = gain.min(1);\n }\n return gain;\n },\n nextAt(conversion) {\n let next = Decimal.add(unref(conversion.currentGain), 1)\n .times(unref(coefficient))\n .add(unref(base))\n .max(unref(base));\n if (conversion.roundUpCost) next = next.ceil();\n return next;\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 let gain = Decimal.div(conversion.baseResource.value, unref(base))\n .pow(unref(exponent))\n .floor()\n .max(0);\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n\n if (!conversion.buyMax) {\n gain = gain.min(1);\n }\n return gain;\n },\n nextAt(conversion) {\n let next = Decimal.add(unref(conversion.currentGain), 1)\n .root(unref(exponent))\n .times(unref(base))\n .max(unref(base));\n if (conversion.roundUpCost) next = next.ceil();\n return next;\n }\n };\n}\n\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: () => S & ThisType<Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: () => S & ThisType<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 Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n )\n .add(1)\n .max(1)\n );\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.modifyGainAmount\n ? conversion.modifyGainAmount(unref((conversion as GenericConversion).currentGain))\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 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, makePersistent, PersistentState } 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: () => T & ThisType<Infobox<T>>\n): Infobox<T> {\n return createLazyProxy(() => {\n const infobox: T & Partial<BaseInfobox> = optionsFunc();\n makePersistent<boolean>(infobox, false);\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 });\n}\n","import { resolveComponent as _resolveComponent, mergeProps as _mergeProps, createVNode as _createVNode, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71ba1b93\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n ref: \"resizeListener\",\n class: \"resize-listener\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Particles = _resolveComponent(\"Particles\", true)!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(_component_Particles, _mergeProps({\n id: _ctx.id,\n class: {\n 'not-fullscreen': !_ctx.fullscreen\n },\n style: {\n zIndex: _ctx.zIndex\n },\n ref: \"particles\",\n particlesInit: _ctx.particlesInit,\n particlesLoaded: _ctx.particlesLoaded,\n options: {\n fpsLimit: 60,\n fullScreen: { enable: _ctx.fullscreen, zIndex: _ctx.zIndex },\n particles: {\n number: {\n value: 0\n }\n },\n emitters: {\n autoPlay: false\n }\n }\n }, _ctx.$attrs), null, 16, [\"id\", \"class\", \"style\", \"particlesInit\", \"particlesLoaded\", \"options\"]),\n _createElementVNode(\"div\", _hoisted_1, null, 512)\n ], 64))\n}","\nimport { loadFull } from \"tsparticles\";\nimport { Engine, Container } from \"tsparticles-engine\";\nimport { Emitters } from \"tsparticles-plugin-emitters/Emitters\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { defineComponent, inject, nextTick, onMounted, PropType, ref } from \"vue\";\nimport { ParticlesComponent } from \"particles.vue3\";\nimport { NodesInjectionKey } from \"game/layers\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n zIndex: {\n type: Number,\n required: true\n },\n fullscreen: {\n type: Boolean,\n required: true\n },\n onInit: {\n type: Function as PropType<(container: EmitterContainer & Container) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>\n },\n components: { Particles: ParticlesComponent },\n setup(props) {\n const particles = ref<null | { particles: { container: Emitters } }>(null);\n\n async function particlesInit(engine: Engine) {\n await loadFull(engine);\n }\n\n function particlesLoaded(container: EmitterContainer & Container) {\n props.onInit(container);\n }\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<Element | 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 }\n updateBounds();\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).forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n node => (node!.rect = node?.element.getBoundingClientRect())\n );\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n }\n isDirty = true;\n });\n }\n }\n\n return {\n particles,\n particlesInit,\n particlesLoaded,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=71ba1b93&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=71ba1b93&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-71ba1b93\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Container } from \"tsparticles-engine\";\nimport { IEmitter } from \"tsparticles-plugin-emitters/Options/Interfaces/IEmitter\";\nimport { EmitterInstance } from \"tsparticles-plugin-emitters/EmitterInstance\";\nimport { EmitterContainer } from \"tsparticles-plugin-emitters/EmitterContainer\";\nimport { Ref, shallowRef } from \"vue\";\nimport { Component, GatherProps, getUniqueID, Replace, setDefault } from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n fullscreen?: boolean;\n zIndex?: number;\n onContainerResized?: (boundingRect: DOMRect) => void;\n}\n\nexport interface BaseParticles {\n id: string;\n containerRef: Ref<null | (EmitterContainer & Container)>;\n addEmitter: (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ) => Promise<EmitterInstance>;\n removeEmitter: (emitter: EmitterInstance) => void;\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 fullscreen: undefined extends T[\"fullscreen\"] ? true : T[\"fullscreen\"];\n zIndex: undefined extends T[\"zIndex\"] ? 1 : T[\"zIndex\"];\n }\n>;\n\nexport type GenericParticles = Replace<\n Particles<ParticlesOptions>,\n {\n fullscreen: boolean;\n zIndex: number;\n }\n>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc: () => T & ThisType<Particles<T>>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles: T & Partial<BaseParticles> = optionsFunc();\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.containerRef = shallowRef(null);\n particles.addEmitter = (\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] }\n ): Promise<EmitterInstance> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.containerRef.value) {\n // TODO why does addEmitter require a position parameter\n return Promise.resolve(genericParticles.containerRef.value.addEmitter(options));\n }\n return new Promise<EmitterInstance>(resolve => {\n emittersToAdd.push({ resolve, options });\n });\n };\n particles.removeEmitter = (emitter: EmitterInstance) => {\n // TODO I can't find a proper way to remove an emitter without accessing private functions\n emitter.emitters.removeEmitter(emitter);\n };\n\n let emittersToAdd: {\n resolve: (value: EmitterInstance | PromiseLike<EmitterInstance>) => void;\n options: IEmitter & { particles: Required<IEmitter>[\"particles\"] };\n }[] = [];\n\n function onInit(container: EmitterContainer & Container) {\n (particles as GenericParticles).containerRef.value = container;\n emittersToAdd.forEach(({ resolve, options }) => resolve(container.addEmitter(options)));\n emittersToAdd = [];\n }\n\n setDefault(particles, \"fullscreen\", true);\n setDefault(particles, \"zIndex\", 1);\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, fullscreen, zIndex, onContainerResized } = this;\n return {\n id,\n fullscreen,\n zIndex,\n onContainerResized,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n","import { getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport {\n DefaultValue,\n Persistent,\n persistent,\n PersistentRef,\n PersistentState\n} 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: () => T & ThisType<Reset<T>>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset: T & Partial<BaseReset> = 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): PersistentRef<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 { 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-8adbf51e\"),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 \"../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=8adbf51e&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-8adbf51e\"]])\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);\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=3b196306&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-3b196306\"]])\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 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>(optionsFunc: () => T & ThisType<Bar<T>>): Bar<T> {\n return createLazyProxy(() => {\n const bar: T & Partial<BaseBar> = 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, makePersistent, PersistentState } 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 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: () => T & ThisType<Buyable<T>>\n): Buyable<T> {\n return createLazyProxy(() => {\n const buyable: T & Partial<BaseBuyable> = 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 makePersistent<DecimalSource>(buyable, 0);\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 });\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 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, PersistentRef } 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: PersistentRef<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: PersistentRef<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: () => T & ThisType<Challenge<T>>\n): Challenge<T> {\n return createLazyProxy(() => {\n const challenge: T & Partial<BaseChallenge> = 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 = persistent(0);\n challenge.active = persistent(false);\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 { 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: () => T & ThisType<Hotkey<T>>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey: T & Partial<BaseHotkey> = 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, 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: (() => T) & ThisType<Links<T>>\n): Links<T> {\n return createLazyProxy(() => {\n const links: T & Partial<BaseLinks> = 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=e0d2a130&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=e0d2a130&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-e0d2a130\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\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 { makePersistent, 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: () => T & ThisType<Milestone<T>>\n): Milestone<T> {\n return createLazyProxy(() => {\n const milestone: T & Partial<BaseMilestone> = optionsFunc();\n makePersistent<boolean>(milestone, false);\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 });\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 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>(optionsFunc: () => T & ThisType<Tab<T>>): Tab<T> {\n return createLazyProxy(() => {\n const tab: T & Partial<BaseTab> = 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=86da8746&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=86da8746&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-86da8746\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\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, makePersistent, PersistentState } 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 tabs: Record<string, TabButtonOptions>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily extends Persistent<string> {\n id: string;\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 optionsFunc: () => T & ThisType<TabFamily<T>>\n): TabFamily<T> {\n return createLazyProxy(() => {\n const tabFamily: T & Partial<BaseTabFamily> = optionsFunc();\n\n if (Object.keys(tabFamily.tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\", tabFamily);\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n makePersistent<string>(tabFamily, Object.keys(tabFamily.tabs)[0]);\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 for (const tab in tabFamily.tabs) {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabFamily.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 }\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 });\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 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, makePersistent, 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: () => T & ThisType<Upgrade<T>>\n): Upgrade<T> {\n return createLazyProxy(() => {\n const upgrade: T & Partial<BaseUpgrade> = optionsFunc();\n makePersistent<boolean>(upgrade, false);\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 });\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 { createTree, createTreeNode, GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\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 layer = createLayer(() => {\n const id = \"c\";\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 }));\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\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\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 tabs: {\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 style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n }));\n\n const tabs = createTabFamily(() => ({\n tabs: {\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(\n icecreamCap.value\n )}`}\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\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 { createLayer } from \"game/layers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { IParticlesOptions } from \"tsparticles-engine\";\nimport { render, renderRow } from \"util/vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst layer = createLayer(() => {\n const id = \"f\";\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 particles.addEmitter({\n // TODO this case is annoying but required because move.direction is a string rather than keyof MoveDirection\n particles: confetti as unknown as IParticlesOptions,\n autoPlay: true,\n fill: false,\n shape: \"square\",\n startCount: 0,\n life: {\n count: 1,\n duration: 0.1,\n wait: false\n },\n rate: {\n delay: 0,\n quantity: 100\n },\n position: {\n x: (100 * (pos?.clientX ?? 0)) / window.innerWidth,\n y: (100 * (pos?.clientY ?? 0)) / window.innerHeight\n },\n size: {\n width: 0,\n height: 0,\n mode: \"precise\"\n }\n });\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: gain => Decimal.times(gain, c.otherThingy.value)\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\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\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 \"components/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 layer = createLayer(() => {\n const id = \"a\";\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(() => {\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 id: \"main\",\n name: \"Tree\",\n display: jsx(() => (\n <>\n <div v-show={player.devSpeed === 0}>Game Paused</div>\n <div v-show={player.devSpeed && player.devSpeed !== 1}>\n Dev Speed: {format(player.devSpeed || 0)}x\n </div>\n <div v-show={player.offlineTime != undefined}>\n Offline Time: {formatTime(player.offlineTime || 0)}\n </div>\n <div>\n <span v-show={Decimal.lt(points.value, \"1e1000\")}>You have </span>\n <h2>{format(points.value)}</h2>\n <span v-show={Decimal.lt(points.value, \"1e1e6\")}> points</span>\n </div>\n <div v-show={Decimal.gt(pointGain.value, 0)}>({oomps.value})</div>\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 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, PersistentRef } 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 id: string;\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>;\n}\n\nexport interface BaseLayer {\n minimized: PersistentRef<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\"], T[\"id\"]>;\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 function createLayer<T extends LayerOptions>(\n optionsFunc: (() => T) & ThisType<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\n layer.minimized = persistent(false);\n\n Object.assign(layer, optionsFunc.call(layer));\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} 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 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 computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | JSXFunction | \"\"> {\n const comp = shallowRef<Component | JSXFunction | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | JSXFunction | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | JSXFunction | \"\" | null> {\n const comp = shallowRef<Component | JSXFunction | \"\" | 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 };\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 { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode } from \"vue\"\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 }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, 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.top),\n left: _ctx.unref(_ctx.left),\n right: _ctx.unref(_ctx.right),\n bottom: _ctx.unref(_ctx.bottom)\n }]),\n style: _normalizeStyle({\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n })\n }, [\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, ref, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n top: processedPropType<boolean>(Boolean),\n left: processedPropType<boolean>(Boolean),\n right: processedPropType<boolean>(Boolean),\n bottom: processedPropType<boolean>(Boolean),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n force: processedPropType<boolean>(Boolean)\n },\n setup(props) {\n const { display, force } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(force) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n return {\n isHovered,\n isShown,\n comp,\n unref\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=c8952e00&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=c8952e00&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-c8952e00\"]])\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__","export default \"eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiwiaGlkZUNoYWxsZW5nZXMiOmZhbHNlLCJ0aGVtZSI6InBhcGVyIiwic3VidGFicyI6e30sIm1pbmltaXplZCI6e30sIm1vZElE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MiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9\";","var map = {\n\t\"./safff.txt\": 2736\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7634;","// 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\t// no module.id needed\n\t\t// no module.loaded needed\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// 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};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + chunkId + \".\" + \"f9b47cea\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\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); }","var inProgress = {};\nvar dataWebpackPrefix = \"profectus:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// 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__.p = \"\";","// 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__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\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__(2782); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["defaultTheme","variables","floatingTabs","mergeAdjacent","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","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","async","startGameLoop","watch","PersistentState","DefaultValue","persistent","defaultValue","ref","makePersistent","state","layer","saveData","features","path","foundPersistent","persistentState","reduce","acc","curr","savedValue","includes","foundPersistentInChild","console","warn","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","error","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","style","color","showGoBack","onClick","args","goBack","minimized","$event","classes","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","display","String","minWidth","Array","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","nextTick","updateTab","contextRef","tabValue","flexGrow","flexShrink","width","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","map","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","options","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","slice","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","element","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","bottom","yoffset","xoffset","right","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","links","ref_for","Nav","Layer","$refs","playAgain","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","updateMouse","gameComponent","onMousemove","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","Error","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","add","lt","constructor","this","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","split","heightparts","result","tetrationparts","powparts","trim","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","bind","ProxyState","ProxyPath","createLazyProxy","objectFunc","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","overrideAmount","_component_TreeNode","_component_Links","row","node","nodeIndex","gatherNodeProps","forceTooltip","leftSideNodes","rightSideNodes","branches","_component_MarkNode","_component_Node","_component_Tooltip","visibility","tooltipToBind","gatherTooltipProps","tooltipDisplay","force","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstart","onTouchend","onTouchcancel","backgroundColor","boxShadow","glowColor","comp","mark","register","inject","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","tooltip","top","onHold","MarkNode","Node","shiftKey","shallowRef","currTooltip","isCoercableComponent","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeObserver","ResizeObserver","updateNodes","NodesInjectionKey","resizeListener","onMounted","resListener","observe","isDirty","getBoundingClientRect","values","validLinks","filter","Link","TreeNode","Links","TreeNodeType","TreeType","createTreeNode","optionsFunc","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","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","currentGain","baseResource","nextAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","scaling","modifyGainAmount","createPolynomialScaling","gain","buyMax","next","roundUpCost","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","_component_Particles","fullscreen","particlesInit","particlesLoaded","fpsLimit","fullScreen","enable","particles","number","emitters","autoPlay","onInit","onContainerResized","Particles","engine","container","updateBounds","ParticlesType","createParticles","containerRef","addEmitter","genericParticles","Promise","resolve","emittersToAdd","removeEmitter","emitter","ResetType","createReset","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","fullWidth","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","direction","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","Challenge","completions","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","ctrlKey","enabled","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","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","processedTabFamily","firstTab","find","tabButton","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","textDecoration","g","h","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","fill","shape","startCount","life","count","duration","wait","rate","delay","quantity","clientX","innerWidth","clientY","innerHeight","size","mode","resetClickable","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","openModal","setupLayerModal","toRaw","showAchievements","oldVersion","on","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","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","isShown","onMouseenter","isHovered","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","webpackContext","req","webpackContextResolve","__webpack_require__","o","code","module","exports","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","every","splice","r","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","__proto__","then","ns","create","def","current","indexOf","getOwnPropertyNames","definition","defineProperty","chunkId","all","promises","u","miniCssF","globalThis","hasOwnProperty","inProgress","dataWebpackPrefix","url","needAttach","scripts","getElementsByTagName","getAttribute","charset","timeout","nc","setAttribute","onScriptComplete","onerror","onload","doneFns","head","toStringTag","p","installedChunks","installedChunkData","promise","reject","loadingEnded","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file