1 line
No EOL
783 KiB
Text
1 line
No EOL
783 KiB
Text
{"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,UAChB,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,wBACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,c,6QCjHlB,MAAMQ,EAAYC,OAAO,aACnBC,EAAcD,OAAO,eAoBlC,IAAIE,EAAK,EAKH,SAAUC,EAAYC,EAAS,YACjC,oBAAOA,GAAP,OAAOA,GAAAA,EAAP,iBAAOA,EAAP,iBAAgBF,KAAT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/E,KAAOivC,EACblqC,EAAMqqC,QAAUF,EAChBL,EAAmB,GAAG9pC,KAIzBimC,EAAoBpyB,EAAEg1B,EAAKoB,EAAc,SAAW7B,EAASA,KAclEnC,EAAoBU,EAAEM,EAAI,SAASmB,GAAW,OAAoC,IAA7ByB,EAAgBzB,IAGrE,IAAIkC,EAAuB,SAASC,EAA4BC,GAC/D,IAKIjE,EAAU6B,EALVxB,EAAW4D,EAAK,GAChBC,EAAcD,EAAK,GACnBE,EAAUF,EAAK,GAGIz4B,EAAI,EAC3B,GAAG60B,EAAS+D,MAAK,SAAS5wC,GAAM,OAA+B,IAAxB8vC,EAAgB9vC,MAAe,CACrE,IAAIwsC,KAAYkE,EACZxE,EAAoBC,EAAEuE,EAAalE,KACrCN,EAAoBxwB,EAAE8wB,GAAYkE,EAAYlE,IAGhD,GAAGmE,EAAS,IAAIrvB,EAASqvB,EAAQzE,GAGlC,IADGsE,GAA4BA,EAA2BC,GACrDz4B,EAAI60B,EAASh5B,OAAQmE,IACzBq2B,EAAUxB,EAAS70B,GAChBk0B,EAAoBC,EAAE2D,EAAiBzB,IAAYyB,EAAgBzB,IACrEyB,EAAgBzB,GAAS,KAE1ByB,EAAgBzB,GAAW,EAE5B,OAAOnC,EAAoBU,EAAEtrB,IAG1BuvB,EAAqBC,KAAK,yBAA2BA,KAAK,0BAA4B,GAC1FD,EAAmBtvC,QAAQgvC,EAAqB1mB,KAAK,KAAM,IAC3DgnB,EAAmBrvC,KAAO+uC,EAAqB1mB,KAAK,KAAMgnB,EAAmBrvC,KAAKqoB,KAAKgnB,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 \"eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDU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JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9\";","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":""} |