diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 545ec24266db..cdd04e32c364 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -163,6 +163,22 @@ eg: `/datum/thing`, not `datum/thing` In DM, this is optional, but omitting it makes finding definitions harder. To be specific, you can declare the path `/arbitrary`, but it will still be, in actuality, `/datum/arbitrary`. Write your code to reflect this. +### Do not use list operators in strings + +The use of list operators to augment strings is not allowed. This is roughly 10 times slower than using a list with a Join() Function. + +```dm +//Bad +var/text = "text" +text += "More text" +to_chat(world, text) + +//Good +var/list/text = list("text") +text += "More text" +to_chat(world, text.Join("")) +``` + ### Do not use text/string based type paths It is rarely allowed to put type paths in a text format, as there are no compile errors if the type path no longer exists. Here is an example: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8f6b2e869bc..b2872dc2bffa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,10 +108,6 @@ jobs: sudo apt update || true sudo apt install libssl1.1:i386 ldd librust_g.so - - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 - with: - redis-version: 6 - name: Compile & Run Unit Tests run: | tools/ci/install_byond.sh '${{ matrix.byondtype }}' diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index aaf4019e4b77..30469b847cec 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -55190,13 +55190,12 @@ d2 = 8; icon_state = "4-8" }, -/obj/effect/mapping_helpers/airlock/access/all/engineering/general, +/obj/effect/mapping_helpers/airlock/access/any/engineering/general, /obj/machinery/door/airlock/engineering/glass{ heat_proof = 1; name = "Supermatter Chamber" }, /obj/effect/mapping_helpers/airlock/access/any/engineering/atmos, -/obj/effect/mapping_helpers/airlock/access/any/engineering/general, /turf/simulated/floor/engine, /area/station/engineering/engine/supermatter) "gvN" = ( @@ -74829,13 +74828,12 @@ /turf/simulated/floor/plating, /area/station/maintenance/xenobio_south) "peF" = ( -/obj/effect/mapping_helpers/airlock/access/all/engineering/general, +/obj/effect/mapping_helpers/airlock/access/any/engineering/general, /obj/machinery/door/airlock/engineering/glass{ heat_proof = 1; name = "Supermatter Chamber" }, /obj/effect/mapping_helpers/airlock/access/any/engineering/atmos, -/obj/effect/mapping_helpers/airlock/access/any/engineering/general, /turf/simulated/floor/engine, /area/station/engineering/engine/supermatter) "pfh" = ( diff --git a/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm b/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm index 7443d3fa731e..09f32f0d372b 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm @@ -5151,7 +5151,7 @@ /obj/effect/decal/cleanable/cobweb2, /obj/effect/turf_decal/delivery/hollow, /obj/structure/rack, -/obj/item/assembly/signaler/anomaly/random, +/obj/item/paper/researchnotes, /turf/simulated/floor/plasteel{ icon_state = "dark" }, @@ -8441,13 +8441,13 @@ /area/ruin/space/unpowered) "Fm" = ( /obj/structure/safe, -/obj/item/paper/researchnotes, -/obj/item/clothing/glasses/hud/security/sunglasses/fluff/eyepro, /obj/machinery/light/small{ dir = 4 }, /obj/effect/decal/cleanable/dirt, /obj/effect/turf_decal/delivery/hollow, +/obj/item/assembly/signaler/anomaly/random, +/obj/item/storage/lockbox/experimental_weapon, /turf/simulated/floor/plasteel{ icon_state = "dark" }, diff --git a/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm b/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm index 7f3673136216..b1d1eacd3ca9 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm @@ -1075,6 +1075,7 @@ /area/ruin/space/derelict/crew_quarters) "cK" = ( /obj/structure/table, +/obj/item/soap/deluxe/laundry, /turf/simulated/floor/plasteel{ dir = 5; icon_state = "blue" @@ -1191,6 +1192,7 @@ "cZ" = ( /obj/structure/table, /obj/effect/decal/cleanable/dirt, +/obj/item/soap/deluxe/laundry, /turf/simulated/floor/plasteel{ dir = 1; icon_state = "blue" diff --git a/_maps/map_files/generic/Lavaland.dmm b/_maps/map_files/generic/Lavaland.dmm index 81202a08678b..706c03d5c47e 100644 --- a/_maps/map_files/generic/Lavaland.dmm +++ b/_maps/map_files/generic/Lavaland.dmm @@ -7527,7 +7527,7 @@ dir = 4 }, /obj/effect/mapping_helpers/airlock/access/any/supply/mining, -/obj/effect/mapping_helpers/airlock/access/all/supply/mining_station, +/obj/effect/mapping_helpers/airlock/access/any/supply/mining_station, /turf/simulated/floor/plasteel{ icon_state = "darkgreencorners" }, @@ -8026,11 +8026,11 @@ name = "Shuttle Dock" }, /obj/machinery/door/firedoor, -/obj/effect/mapping_helpers/airlock/access/any/supply/mining, -/obj/effect/mapping_helpers/airlock/access/all/supply/mining_station, /obj/effect/mapping_helpers/airlock/unres{ dir = 8 }, +/obj/effect/mapping_helpers/airlock/access/any/supply/mining, +/obj/effect/mapping_helpers/airlock/access/any/supply/mining_station, /turf/simulated/floor/plasteel{ dir = 8; icon_state = "darkredfull" diff --git a/_maps/map_files220/delta/delta.dmm b/_maps/map_files220/delta/delta.dmm index 57a3934a078a..478fd35f6041 100644 --- a/_maps/map_files220/delta/delta.dmm +++ b/_maps/map_files220/delta/delta.dmm @@ -71443,14 +71443,14 @@ /area/station/maintenance/old_kitchen) "lkZ" = ( /obj/structure/closet/secure_closet/freezer/fridge, -/obj/item/reagent_containers/food/snacks/icecream/icecreamcone, -/obj/item/reagent_containers/food/snacks/icecream/icecreamcone, -/obj/item/reagent_containers/food/snacks/icecream/icecreamcone, -/obj/item/reagent_containers/food/snacks/icecream/icecreamcone, -/obj/item/reagent_containers/food/snacks/icecream, -/obj/item/reagent_containers/food/snacks/icecream, -/obj/item/reagent_containers/food/snacks/icecreamsandwich, -/obj/item/reagent_containers/food/snacks/icecreamsandwich, +/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcone, +/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcone, +/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcone, +/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcone, +/obj/item/reagent_containers/food/snacks/frozen/icecream, +/obj/item/reagent_containers/food/snacks/frozen/icecream, +/obj/item/reagent_containers/food/snacks/frozen/icecreamsandwich, +/obj/item/reagent_containers/food/snacks/frozen/icecreamsandwich, /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/plasteel{ icon_state = "redyellowfull" diff --git a/code/__DEFINES/emotes_defines.dm b/code/__DEFINES/emotes_defines.dm index 5880f171d7f8..9940edab859d 100644 --- a/code/__DEFINES/emotes_defines.dm +++ b/code/__DEFINES/emotes_defines.dm @@ -10,12 +10,10 @@ #define EMOTE_VISIBLE (1<<0) /// Emote is audible (in character). #define EMOTE_AUDIBLE (1<<1) -/// Emote makes a sound. These emotes will specifically not be runechatted. -#define EMOTE_SOUND (1<<2) /// Regardless of its existing flags, an emote with this flag will not be sent to runechat. -#define EMOTE_FORCE_NO_RUNECHAT (1<<3) +#define EMOTE_FORCE_NO_RUNECHAT (1<<2) /// This emote uses the mouth, and so should be blocked if the user is muzzled or can't breathe (for humans). -#define EMOTE_MOUTH (1<<4) +#define EMOTE_MOUTH (1<<3) // User audio cooldown system. // This is a value stored on the user and represents their current ability to perform audio emotes. diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index fc43a57eb92f..a82321181796 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -10,7 +10,7 @@ #define isliving(A) (istype(A, /mob/living)) -#define isbrain(A) (istype(A, /mob/living/carbon/brain)) +#define isbrain(A) (istype(A, /mob/living/brain)) // Carbon mobs #define iscarbon(A) (istype(A, /mob/living/carbon)) diff --git a/code/__DEFINES/mob_defines.dm b/code/__DEFINES/mob_defines.dm index bde8ac4801d3..efd9a4d2991d 100644 --- a/code/__DEFINES/mob_defines.dm +++ b/code/__DEFINES/mob_defines.dm @@ -247,7 +247,7 @@ // For the tcomms monitor #define ispathhuman(A) (ispath(A, /mob/living/carbon/human)) -#define ispathbrain(A) (ispath(A, /mob/living/carbon/brain)) +#define ispathbrain(A) (ispath(A, /mob/living/brain)) #define ispathslime(A) (ispath(A, /mob/living/simple_animal/slime)) #define ispathbot(A) (ispath(A, /mob/living/simple_animal/bot)) #define ispathsilicon(A) (ispath(A, /mob/living/silicon)) diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 2c188e81e405..a7ee1856f94d 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -183,6 +183,12 @@ /// This status effect allows a mob to be revived with a defibrillator. #define STATUS_EFFECT_REVIVABLE /datum/status_effect/limited_bonus/revivable +/// Status effects for different actions +#define STATUS_EFFECT_REMOVE_CUFFS /datum/status_effect/action_status_effect/remove_handcuffs +#define STATUS_EFFECT_BREAK_CUFFS /datum/status_effect/action_status_effect/break_handcuffs +#define STATUS_EFFECT_REMOVE_MUZZLE /datum/status_effect/action_status_effect/remove_muzzle +#define STATUS_EFFECT_UNBUCKLE /datum/status_effect/action_status_effect/unbuckle + ////////////////////////// // Mind batter variants // ////////////////////////// diff --git a/code/__HELPERS/experimental.dm b/code/__HELPERS/experimental.dm deleted file mode 100644 index 7409797bb0d7..000000000000 --- a/code/__HELPERS/experimental.dm +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Experimental procs by ESwordTheCat! - */ - -/* - * Get index of last char occurence to string. - * - * @args - * A, string to be search - * B, char used for search - * - * @return - * >0, index of char at string - * 0, char not found - * -1, parameter B is not a char - * -2, parameter A is not a string - */ -/proc/strpos(const/A, const/B) - if(istext(A) == 0 || length(A) < 1) - return -2 - - if(istext(B) == 0 || length(B) > 1) - return -1 - - var/i = findtext(A, B) - - if(0 == i) - return 0 - - while(i) - . = i - i = findtext(A, B, i + 1) - -/proc/isInTypes(atom/Object, types) - var/prototype = Object.type - Object = null - - for(var/type in params2list(types)) - if(ispath(prototype, text2path(type))) - return 1 - - return 0 diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index f784be66aef1..97c9fe44971c 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -110,10 +110,6 @@ for(var/limb_type in typesof(/datum/robolimb)) var/datum/robolimb/R = new limb_type() GLOB.all_robolimbs[R.company] = R - if(!R.unavailable_at_chargen) - if(R != "head" && R != "chest" && R != "groin") //Part of the method that ensures only IPCs can access head, chest and groin prosthetics. - if(R.has_subtypes) //Ensures solos get added to the list as well be incorporating has_subtypes == 1 and has_subtypes == 2. - GLOB.chargen_robolimbs[R.company] = R //List only main brands and solo parts. if(R.selectable) GLOB.selectable_robolimbs[R.company] = R diff --git a/code/__HELPERS/mob_helpers.dm b/code/__HELPERS/mob_helpers.dm index 06a2ec732f92..5a6fc82dc98e 100644 --- a/code/__HELPERS/mob_helpers.dm +++ b/code/__HELPERS/mob_helpers.dm @@ -470,7 +470,7 @@ return FALSE #define DOAFTERONCE_MAGIC "Magic~~" -GLOBAL_LIST_INIT(do_after_once_tracker, list()) +GLOBAL_LIST_EMPTY(do_after_once_tracker) /proc/do_after_once(mob/user, delay, needhand = 1, atom/target = null, progress = 1, allow_moving, must_be_held, attempt_cancel_message = "Attempt cancelled.", special_identifier) if(!user || !target) return diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 5a6cc9412936..6ceb6382b3b6 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -410,7 +410,7 @@ Turf and target are seperate in case you want to teleport some distance from a t moblist.Add(M) for(var/mob/living/carbon/human/M in sortmob) moblist.Add(M) - for(var/mob/living/carbon/brain/M in sortmob) + for(var/mob/living/brain/M in sortmob) moblist.Add(M) for(var/mob/living/carbon/alien/M in sortmob) moblist.Add(M) diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm index 3b7d061ace37..b031d7a0cf31 100644 --- a/code/_globalvars/configuration.dm +++ b/code/_globalvars/configuration.dm @@ -25,6 +25,3 @@ GLOBAL_VAR_INIT(dsay_enabled, TRUE) /// Amount of time (in minutes) that must pass between a player dying as a mouse and repawning as a mouse GLOBAL_VAR_INIT(mouse_respawn_time, 5) - -/// Enable debugging of things such as job starts and other things -GLOBAL_VAR_INIT(debug2, TRUE) diff --git a/code/_globalvars/game_modes.dm b/code/_globalvars/game_modes.dm index 9a8d01767644..664ae5577d2c 100644 --- a/code/_globalvars/game_modes.dm +++ b/code/_globalvars/game_modes.dm @@ -5,4 +5,3 @@ GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret" GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report. Dont ask why it inits as null GLOBAL_VAR(custom_event_msg) -GLOBAL_VAR(custom_event_admin_msg) diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 21d396718282..94b180be3c89 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -60,6 +60,3 @@ GLOBAL_VAR_INIT(polymorphblock, 0) /////////////////////////////// GLOBAL_VAR_INIT(loudblock, 0) GLOBAL_VAR_INIT(dizzyblock, 0) - -GLOBAL_LIST_EMPTY(reg_dna) -GLOBAL_LIST_EMPTY(global_mutations) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index d45db7b7dce5..19768711ea14 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -1,35 +1,31 @@ //Preferences stuff //Head accessory styles -GLOBAL_LIST_INIT(head_accessory_styles_list, list()) //stores /datum/sprite_accessory/head_accessory indexed by name +GLOBAL_LIST_EMPTY(head_accessory_styles_list) //stores /datum/sprite_accessory/head_accessory indexed by name //Marking styles -GLOBAL_LIST_INIT(marking_styles_list, list()) //stores /datum/sprite_accessory/body_markings indexed by name +GLOBAL_LIST_EMPTY(marking_styles_list) //stores /datum/sprite_accessory/body_markings indexed by name //Hairstyles -GLOBAL_LIST_INIT(hair_styles_public_list, list()) //stores /datum/sprite_accessory/hair indexed by name -GLOBAL_LIST_INIT(hair_styles_male_list, list()) -GLOBAL_LIST_INIT(hair_styles_female_list, list()) -GLOBAL_LIST_INIT(hair_styles_full_list, list()) //fluff hair styles -GLOBAL_LIST_INIT(facial_hair_styles_list, list()) //stores /datum/sprite_accessory/facial_hair indexed by name -GLOBAL_LIST_INIT(facial_hair_styles_male_list, list()) -GLOBAL_LIST_INIT(facial_hair_styles_female_list, list()) +GLOBAL_LIST_EMPTY(hair_styles_public_list) //stores /datum/sprite_accessory/hair indexed by name +GLOBAL_LIST_EMPTY(hair_styles_male_list) +GLOBAL_LIST_EMPTY(hair_styles_female_list) +GLOBAL_LIST_EMPTY(hair_styles_full_list) //fluff hair styles +GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name +GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) +GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) GLOBAL_LIST_EMPTY(hair_gradients_list) //stores /datum/sprite_accessory/hair_gradient indexed by name //Underwear -GLOBAL_LIST_INIT(underwear_list, list()) //stores /datum/sprite_accessory/underwear indexed by name -GLOBAL_LIST_INIT(underwear_m, list()) //stores only underwear name -GLOBAL_LIST_INIT(underwear_f, list()) //stores only underwear name +GLOBAL_LIST_EMPTY(underwear_list) //stores /datum/sprite_accessory/underwear indexed by name +GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name +GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name //Undershirts -GLOBAL_LIST_INIT(undershirt_list, list()) //stores /datum/sprite_accessory/undershirt indexed by name -GLOBAL_LIST_INIT(undershirt_m, list()) //stores only undershirt name -GLOBAL_LIST_INIT(undershirt_f, list()) //stores only undershirt name +GLOBAL_LIST_EMPTY(undershirt_list) //stores /datum/sprite_accessory/undershirt indexed by name +GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name +GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name //Socks -GLOBAL_LIST_INIT(socks_list, list()) //stores /datum/sprite_accessory/socks indexed by name -GLOBAL_LIST_INIT(socks_m, list()) //stores only socks name -GLOBAL_LIST_INIT(socks_f, list()) //stores only socks name +GLOBAL_LIST_EMPTY(socks_list) //stores /datum/sprite_accessory/socks indexed by name +GLOBAL_LIST_EMPTY(socks_m) //stores only socks name +GLOBAL_LIST_EMPTY(socks_f) //stores only socks name //Alt Heads -GLOBAL_LIST_INIT(alt_heads_list, list()) //stores /datum/sprite_accessory/alt_heads indexed by name - -GLOBAL_LIST_INIT(scarySounds, list('sound/weapons/thudswoosh.ogg','sound/weapons/taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg', \ -'sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg', \ -'sound/items/welder.ogg','sound/items/welder2.ogg','sound/machines/airlock_open.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')) +GLOBAL_LIST_EMPTY(alt_heads_list) //stores /datum/sprite_accessory/alt_heads indexed by name // Reference list for disposal sort junctions. Set the sort_type_txt variable on disposal sort junctions to // the index of the sort department that you want. For example, adding "2" to sort_type_txt will reroute all packages @@ -56,12 +52,7 @@ GLOBAL_LIST_INIT(phonetic_alphabet, list("Alpha", "Bravo", "Charlie", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu")) -GLOBAL_LIST_INIT(numbers_as_words, list("One", "Two", "Three", "Four", - "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", - "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", - "Eighteen", "Nineteen")) - - //Backpacks +//Backpacks #define GBACKPACK "Grey Backpack" #define GSATCHEL "Grey Satchel" #define GDUFFLEBAG "Grey Dufflebag" diff --git a/code/_globalvars/lists/misc_lists.dm b/code/_globalvars/lists/misc_lists.dm index 7371f1d7205a..b4ac32d640cf 100644 --- a/code/_globalvars/lists/misc_lists.dm +++ b/code/_globalvars/lists/misc_lists.dm @@ -1,8 +1,5 @@ GLOBAL_LIST_INIT(alphabet, list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")) GLOBAL_LIST_INIT(alphabet_uppercase, list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")) -GLOBAL_LIST_INIT(zero_character_only, list("0")) -GLOBAL_LIST_INIT(hex_characters, list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")) -GLOBAL_LIST_INIT(binary, list("0","1")) GLOBAL_LIST_INIT(html_colors, list("Alice Blue","Antique White","Aqua","Aquamarine","Azure","Beige","Bisque","Black","Blanched Almond","Blue","Blue Violet", "Brown","Burly Wood","Cadet Blue","Chartreuse","Chocolate","Coral","Cornflower Blue","Cornsilk","Crimson","Cyan", "Dark Blue","Dark Cyan","Dark Golden Rod","Dark Gray","Dark Green","Dark Khaki","Dark Magenta","Dark Olive Green", @@ -19,7 +16,6 @@ GLOBAL_LIST_INIT(html_colors, list("Alice Blue","Antique White","Aqua","Aquamari "Salmon","Sandy Brown","Sea Green","Sea Shell","Sienna","Silver","Sky Blue","Slate Blue","Slate Gray","Snow","Spring Green", "Steel Blue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","Wheat","White","White Smoke","Yellow","Yellow Green")) -GLOBAL_LIST_INIT(day_names, list("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) GLOBAL_LIST_INIT(month_names, list("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")) // keep si_suffixes balanced and with a pivot in the middle! GLOBAL_LIST_INIT(si_suffixes, list("y", "z", "a", "f", "p", "n", "u", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y")) @@ -38,7 +34,7 @@ GLOBAL_LIST_INIT(restricted_camera_networks, list( "SyndicateCaves" )) //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them. -GLOBAL_LIST_INIT(ruin_landmarks, list()) +GLOBAL_LIST_EMPTY(ruin_landmarks) GLOBAL_LIST_INIT(round_end_sounds, list( 'sound/AI/newroundsexy.ogg' = 2.3 SECONDS, diff --git a/code/_globalvars/lists/mob_lists.dm b/code/_globalvars/lists/mob_lists.dm index 709cc9075db8..a433843806d0 100644 --- a/code/_globalvars/lists/mob_lists.dm +++ b/code/_globalvars/lists/mob_lists.dm @@ -20,7 +20,6 @@ GLOBAL_LIST_EMPTY(silicon_mob_list) //List of all silicon mobs, including clie GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain simple animals GLOBAL_LIST_EMPTY(human_list) //all instances of /mob/living/carbon/human and subtypes -GLOBAL_LIST_EMPTY(spirits) //List of all the spirits, including Masks GLOBAL_LIST_EMPTY(alive_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player GLOBAL_LIST_EMPTY(non_respawnable_keys) //List of ckeys that are excluded from respawning for remainder of round. diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm index 6888cf87717a..777411685510 100644 --- a/code/_globalvars/lists/names.dm +++ b/code/_globalvars/lists/names.dm @@ -1,7 +1,7 @@ GLOBAL_LIST_INIT(ai_names, file2list("config/names/ai.txt")) GLOBAL_LIST_INIT(wizard_first, file2list("config/names/wizardfirst.txt")) GLOBAL_LIST_INIT(wizard_second, file2list("config/names/wizardsecond.txt")) -GLOBAL_LIST_INIT(ninja_titles, file2list("config/names/ninjatitle.txt")) +// GLOBAL_LIST_INIT(ninja_titles, file2list("config/names/ninjatitle.txt")) // This is kept because we technically still have these files in the code in case we ever want to use them, but is currently unused GLOBAL_LIST_INIT(ninja_names, file2list("config/names/ninjaname.txt")) GLOBAL_LIST_INIT(deathsquad_names, file2list("config/names/deathsquad.txt")) GLOBAL_LIST_INIT(first_names_male, file2list("config/names/first_male.txt")) @@ -22,7 +22,7 @@ GLOBAL_LIST_INIT(first_names_soviet, file2list("config/names/first_soviet_male.t GLOBAL_LIST_INIT(last_names_soviet, file2list("config/names/last_soviet_male.txt")) GLOBAL_LIST_INIT(verbs, file2list("config/names/verbs.txt")) -GLOBAL_LIST_INIT(nouns, file2list("config/names/nouns.txt")) +GLOBAL_LIST_INIT(nouns, file2list("config/names/nouns.txt")) // SS220 EDIT - CODE UNCOMMENT GLOBAL_LIST_INIT(adjectives, file2list("config/names/adjectives.txt")) GLOBAL_LIST_INIT(dream_strings, file2list("config/names/dreams.txt")) GLOBAL_LIST_INIT(nightmare_strings, file2list("config/names/nightmares.txt")) diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 25723d3c21dd..707a797c8ba5 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -1,56 +1,54 @@ -GLOBAL_LIST_INIT(portals, list()) //for use by portals +GLOBAL_LIST_EMPTY(portals) //for use by portals GLOBAL_LIST(cable_list) //Index for all cables, so that powernets don't have to look through the entire world all the time GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction datums. Used during chemical reactions GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff -GLOBAL_LIST_INIT(landmarks_list, list()) //list of all landmarks created -GLOBAL_LIST_INIT(surgery_steps, list()) //list of all surgery steps |BS12 -GLOBAL_LIST_INIT(side_effects, list()) //list of all medical sideeffects types by thier names |BS12 -GLOBAL_LIST_INIT(mechas_list, list()) //list of all mechs. Used by hostile mobs target tracking. -GLOBAL_LIST_INIT(joblist, list()) //list of all jobstypes, minus borg and AI -GLOBAL_LIST_INIT(airlocks, list()) //list of all airlocks -GLOBAL_LIST_INIT(singularities, list()) //list of all singularities -GLOBAL_LIST_INIT(janitorial_equipment, list()) //list of janitorial equipment -GLOBAL_LIST_INIT(crafting_recipes, list()) //list of all crafting recipes -GLOBAL_LIST_INIT(prisoncomputer_list, list()) -GLOBAL_LIST_INIT(celltimers_list, list()) // list of all cell timers -GLOBAL_LIST_INIT(cell_logs, list()) -GLOBAL_LIST_INIT(navigation_computers, list()) -GLOBAL_LIST_INIT(hierophant_walls, list()) - -GLOBAL_LIST_INIT(all_areas, list()) -GLOBAL_LIST_INIT(all_unique_areas, list()) // List of all unique areas. AKA areas with there_can_be_many = FALSE -GLOBAL_LIST_INIT(machines, list()) -GLOBAL_LIST_INIT(rcd_list, list()) //list of Rapid Construction Devices. - -GLOBAL_LIST_INIT(apcs, list()) -GLOBAL_LIST_INIT(air_alarms, list()) -GLOBAL_LIST_INIT(power_monitors, list()) -GLOBAL_LIST_INIT(all_vent_pumps, list()) - -GLOBAL_LIST_INIT(navbeacons, list()) //list of all bot nagivation beacons, used for patrolling. -GLOBAL_LIST_INIT(deliverybeacons, list()) //list of all MULEbot delivery beacons. -GLOBAL_LIST_INIT(deliverybeacontags, list()) //list of all tags associated with delivery beacons. - -GLOBAL_LIST_INIT(beacons, list()) -GLOBAL_LIST_INIT(shuttle_caller_list, list()) //list of all communication consoles, comms consoles circuit and AIs, for automatic shuttle calls when there are none. -GLOBAL_LIST_INIT(tracked_implants, list()) //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented... -GLOBAL_LIST_INIT(pinpointer_list, list()) //list of all pinpointers. Used to change stuff they are pointing to all at once. -GLOBAL_LIST_INIT(nuclear_uplink_list, list()) //list of all existing nuke ops uplinks -GLOBAL_LIST_INIT(abductor_equipment, list()) //list of all abductor equipment -GLOBAL_LIST_INIT(global_intercoms, list()) //list of all intercomms, across all z-levels -GLOBAL_LIST_INIT(global_radios, list()) //list of all radios, across all z-levels - -GLOBAL_LIST_INIT(meteor_list, list()) //list of all meteors -GLOBAL_LIST_INIT(poi_list, list()) //list of points of interest for observe/follow -GLOBAL_LIST_INIT(active_jammers, list()) // List of active radio jammers +GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created +GLOBAL_LIST_EMPTY(surgery_steps) //list of all surgery steps |BS12 +GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking. +GLOBAL_LIST_EMPTY(joblist) //list of all jobstypes, minus borg and AI +GLOBAL_LIST_EMPTY(airlocks) //list of all airlocks +GLOBAL_LIST_EMPTY(singularities) //list of all singularities +GLOBAL_LIST_EMPTY(janitorial_equipment) //list of janitorial equipment +GLOBAL_LIST_EMPTY(crafting_recipes) //list of all crafting recipes +GLOBAL_LIST_EMPTY(prisoncomputer_list) +GLOBAL_LIST_EMPTY(celltimers_list) // list of all cell timers +GLOBAL_LIST_EMPTY(cell_logs) +GLOBAL_LIST_EMPTY(navigation_computers) +GLOBAL_LIST_EMPTY(hierophant_walls) + +GLOBAL_LIST_EMPTY(all_areas) +GLOBAL_LIST_EMPTY(all_unique_areas) // List of all unique areas. AKA areas with there_can_be_many = FALSE +GLOBAL_LIST_EMPTY(machines) +GLOBAL_LIST_EMPTY(rcd_list) //list of Rapid Construction Devices. + +GLOBAL_LIST_EMPTY(apcs) +GLOBAL_LIST_EMPTY(air_alarms) +GLOBAL_LIST_EMPTY(power_monitors) +GLOBAL_LIST_EMPTY(all_vent_pumps) + +GLOBAL_LIST_EMPTY(navbeacons) //list of all bot nagivation beacons, used for patrolling. +GLOBAL_LIST_EMPTY(deliverybeacons) //list of all MULEbot delivery beacons. +GLOBAL_LIST_EMPTY(deliverybeacontags) //list of all tags associated with delivery beacons. + +GLOBAL_LIST_EMPTY(beacons) +GLOBAL_LIST_EMPTY(shuttle_caller_list) //list of all communication consoles, comms consoles circuit and AIs, for automatic shuttle calls when there are none. +GLOBAL_LIST_EMPTY(tracked_implants) //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented... +GLOBAL_LIST_EMPTY(pinpointer_list) //list of all pinpointers. Used to change stuff they are pointing to all at once. +GLOBAL_LIST_EMPTY(nuclear_uplink_list) //list of all existing nuke ops uplinks +GLOBAL_LIST_EMPTY(abductor_equipment) //list of all abductor equipment +GLOBAL_LIST_EMPTY(global_intercoms) //list of all intercomms, across all z-levels +GLOBAL_LIST_EMPTY(global_radios) //list of all radios, across all z-levels + +GLOBAL_LIST_EMPTY(meteor_list) //list of all meteors +GLOBAL_LIST_EMPTY(poi_list) //list of points of interest for observe/follow +GLOBAL_LIST_EMPTY(active_jammers) // List of active radio jammers GLOBAL_LIST_EMPTY(ladders) GLOBAL_LIST_EMPTY(mirrors) //list of all mirrors and mirror shields. GLOBAL_LIST_EMPTY(arc_emitters) //list of all arc emitters -GLOBAL_LIST_INIT(active_diseases, list()) //List of Active disease in all mobs; purely for quick referencing. +GLOBAL_LIST_EMPTY(active_diseases) //List of Active disease in all mobs; purely for quick referencing. GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects -GLOBAL_LIST_EMPTY(explosive_walls) GLOBAL_LIST_EMPTY(engine_beacon_list) diff --git a/code/_globalvars/lists/reagents_lists.dm b/code/_globalvars/lists/reagents_lists.dm index cabf9cc43e1b..2d70edcc5835 100644 --- a/code/_globalvars/lists/reagents_lists.dm +++ b/code/_globalvars/lists/reagents_lists.dm @@ -1,23 +1,3 @@ -// Base chemicals -GLOBAL_LIST_INIT(base_chemicals, list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon", - "chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium", - "iron","aluminum","silicon","sugar","ethanol")) -// Standard chemicals -GLOBAL_LIST_INIT(standard_chemicals, list("slimejelly","blood","water","lube","charcoal","toxin","cyanide", - "morphine","epinephrine","space_drugs","oxygen","copper", - "nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine", - "fluorine","sodium","phosphorus","lithium","sugar","sacid","facid", - "glycerol","radium","mutadone","thermite","mutagen","virusfood","iron", - "gold","silver","uranium","aluminum","silicon","fuel","cleaner","atrazine", - "plasma","teporone","lexorin","silver_sulfadiazine","salbutamol", - "perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide", - "pen_acid","mannitol","oculine","styptic_powder","methamphetamine", - "cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant", - "fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium", - "lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin", - "enzyme","nothing","salglu_solution","antifreeze","neurotoxin", "jestosterone")) -// Rare chemicals -GLOBAL_LIST_INIT(rare_chemicals, list("minttoxin","syndicate_nanites", "xenomicrobes")) // Standard medicines GLOBAL_LIST_INIT(standard_medicines, list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs", "mutadone","mutagen","teporone","lexorin","silver_sulfadiazine", diff --git a/code/_globalvars/lists/typecache.dm b/code/_globalvars/lists/typecache.dm index 96807214f2f8..9ee4089fb0e6 100644 --- a/code/_globalvars/lists/typecache.dm +++ b/code/_globalvars/lists/typecache.dm @@ -8,5 +8,3 @@ GLOBAL_LIST_INIT(typecache_mob, typecacheof(/mob)) GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living)) GLOBAL_LIST_INIT(typecache_stack, typecacheof(/obj/item/stack)) - -GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure))) diff --git a/code/_globalvars/logging_vars.dm b/code/_globalvars/logging_vars.dm index 0f968923ffc2..1e448d1be029 100644 --- a/code/_globalvars/logging_vars.dm +++ b/code/_globalvars/logging_vars.dm @@ -29,8 +29,6 @@ GLOBAL_VAR(gc_log) GLOBAL_PROTECT(gc_log) #endif -GLOBAL_LIST_EMPTY(jobMax) -GLOBAL_PROTECT(jobMax) GLOBAL_LIST_EMPTY(admin_log) GLOBAL_PROTECT(admin_log) GLOBAL_LIST_EMPTY(lastsignalers) @@ -38,12 +36,5 @@ GLOBAL_PROTECT(lastsignalers) GLOBAL_LIST_EMPTY(lawchanges) GLOBAL_PROTECT(lawchanges) -GLOBAL_LIST_EMPTY(combatlog) -GLOBAL_PROTECT(combatlog) -GLOBAL_LIST_EMPTY(IClog) -GLOBAL_PROTECT(IClog) -GLOBAL_LIST_EMPTY(OOClog) -GLOBAL_PROTECT(OOClog) - GLOBAL_DATUM_INIT(logging, /datum/logging, new /datum/logging()) diff --git a/code/_globalvars/mapping_vars.dm b/code/_globalvars/mapping_vars.dm index 67857902c530..ee12fedfde9b 100644 --- a/code/_globalvars/mapping_vars.dm +++ b/code/_globalvars/mapping_vars.dm @@ -5,7 +5,6 @@ GLOBAL_LIST_INIT(cardinal, list(NORTH, SOUTH, EAST, WEST)) GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) -GLOBAL_LIST_INIT(alldirs2, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST, NORTH, SOUTH, EAST, WEST)) GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) GLOBAL_LIST(global_map) // This is the array of zlevels | list(list(1,5),list(4,3)) | becomes a 2D array of zlevels @@ -40,16 +39,14 @@ GLOBAL_LIST_EMPTY(ninjastart) GLOBAL_LIST_EMPTY(carplist) //list of all carp-spawn landmarks GLOBAL_LIST_EMPTY(syndicateofficer) -//away missions -GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can take you to +// Away missions +GLOBAL_LIST_EMPTY(awaydestinations) // SS220 EDIT - ADDITION //List of preloaded templates GLOBAL_LIST_EMPTY(map_templates) -GLOBAL_LIST_EMPTY(ruins_templates) GLOBAL_LIST_EMPTY(space_ruins_templates) GLOBAL_LIST_EMPTY(lava_ruins_templates) GLOBAL_LIST_EMPTY(shelter_templates) GLOBAL_LIST_EMPTY(shuttle_templates) GLOBAL_LIST_EMPTY(bridge_horizontal_templates) GLOBAL_LIST_EMPTY(bridge_vertical_templates) -GLOBAL_LIST_EMPTY(event_templates) diff --git a/code/_globalvars/misc_globals.dm b/code/_globalvars/misc_globals.dm index 08ad1d0ee606..db39391a7835 100644 --- a/code/_globalvars/misc_globals.dm +++ b/code/_globalvars/misc_globals.dm @@ -31,11 +31,7 @@ GLOBAL_LIST_INIT(paper_blacklist, list("java","onblur","onchange","onclick","ond "onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover", \ "onmouseup","onreset","onselect","onsubmit","onunload")) -//Reverse of dir -GLOBAL_LIST_INIT(reverse_dir, list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63)) GLOBAL_VAR_INIT(gravity_is_on, 1) //basically unused, just one admin verb.. -// Recall time limit: 2 hours -GLOBAL_VAR_INIT(recall_time_limit, 72000) //apparently used for the comm console #define TAB "    " @@ -49,7 +45,6 @@ GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds GLOBAL_DATUM_INIT(data_core, /datum/datacore, new) // Station datacore, manifest, etc -GLOBAL_LIST_EMPTY(ability_verbs) // Create-level abilities GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)) /// Global list of all /datum/mod_theme diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 24a186227b70..9d94e5f5ca60 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -416,11 +416,11 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the if(length(nymphs) == 1) var/mob/living/simple_animal/diona/D = nymphs[1] - D.split() + D.split(TRUE) else var/mob/living/simple_animal/diona/D = input("Select a nymph to drop:", "Nymph Dropping", nymphs[1]) as anything in nymphs if(D in usr.contents) - D.split() + D.split(TRUE) //Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg /obj/screen/alert/hacked diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 87dd423159ad..45b2e9fbdbec 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -1,6 +1,5 @@ #define NEXT_PAGE_ID "__next__" #define DEFAULT_CHECK_DELAY 20 -#define ANIM_SPEED 0.5 GLOBAL_LIST_EMPTY(radial_menus) @@ -44,6 +43,14 @@ GLOBAL_LIST_EMPTY(radial_menus) if(usr.client == parent.current_user) parent.finished = TRUE +/obj/screen/radial/center/MouseEntered(location, control, params) + . = ..() + openToolTip(usr, src, params, title = name) + +/obj/screen/radial/center/MouseExited(location, control, params) + . = ..() + closeToolTip(usr) + /datum/radial_menu var/list/choices = list() //List of choice id's var/list/choices_icons = list() //choice_id -> icon @@ -55,8 +62,9 @@ GLOBAL_LIST_EMPTY(radial_menus) var/list/obj/screen/elements = list() var/obj/screen/radial/center/close_button var/client/current_user - var/atom/anchor - var/image/menu_holder + var/atom/movable/anchor + var/pixel_x_difference + var/pixel_y_difference var/finished = FALSE var/datum/callback/custom_check_callback var/next_check = 0 @@ -73,39 +81,7 @@ GLOBAL_LIST_EMPTY(radial_menus) var/hudfix_method = TRUE //TRUE to change anchor to user, FALSE to shift by py_shift var/py_shift = 0 - var/entry_animation = TRUE -//If we swap to vis_contens inventory these will need a redo -/datum/radial_menu/proc/check_screen_border(mob/user) - var/atom/movable/AM = anchor - if(!istype(AM)) - return - var/mob/living/carbon/H - if(ishuman(user)) - H = user - if((AM in user.client.screen) || (H && (AM in H.internal_organs))) - if(hudfix_method) - anchor = user - else - py_shift = 32 - restrict_to_dir(NORTH) //I was going to parse screen loc here but that's more effort than it's worth. - -//Sets defaults -//These assume 45 deg min_angle -/datum/radial_menu/proc/restrict_to_dir(dir) - switch(dir) - if(NORTH) - starting_angle = 270 - ending_angle = 135 - if(SOUTH) - starting_angle = 90 - ending_angle = 315 - if(EAST) - starting_angle = 0 - ending_angle = 225 - if(WEST) - starting_angle = 180 - ending_angle = 45 /datum/radial_menu/proc/setup_menu() if(ending_angle > starting_angle) @@ -143,18 +119,20 @@ GLOBAL_LIST_EMPTY(radial_menus) page_data[page] = current pages = page current_page = 1 - update_screen_objects(anim = entry_animation) + update_screen_objects() -/datum/radial_menu/proc/update_screen_objects(anim = FALSE) +/datum/radial_menu/proc/update_screen_objects() var/list/page_choices = page_data[current_page] var/angle_per_element = round(zone / page_choices.len) + pixel_x_difference = ((world.icon_size * anchor.x) + anchor.step_x + anchor.pixel_x) - ((world.icon_size * current_user.mob.x) + current_user.mob.step_x + current_user.mob.pixel_x) + pixel_y_difference = ((world.icon_size * anchor.y) + anchor.step_y + anchor.pixel_y) - ((world.icon_size * current_user.mob.y) + current_user.mob.step_y + current_user.mob.pixel_y) for(var/i in 1 to elements.len) var/obj/screen/radial/E = elements[i] var/angle = WRAP(starting_angle + (i - 1) * angle_per_element, 0, 360) if(i > page_choices.len) HideElement(E) else - SetElement(E,page_choices[i], angle, anim = anim, anim_order = i) + SetElement(E,page_choices[i], angle) /datum/radial_menu/proc/HideElement(obj/screen/radial/slice/E) E.cut_overlays() @@ -165,20 +143,13 @@ GLOBAL_LIST_EMPTY(radial_menus) E.choice = null E.next_page = FALSE -/datum/radial_menu/proc/SetElement(obj/screen/radial/slice/E, choice_id, angle, anim, anim_order) +/datum/radial_menu/proc/SetElement(obj/screen/radial/slice/E, choice_id, angle) //Position - var/py = round(cos(angle) * radius) + py_shift - var/px = round(sin(angle) * radius) - if(anim) - var/timing = anim_order * ANIM_SPEED - var/matrix/starting = matrix() - starting.Scale(0.1, 0.1) - E.transform = starting - var/matrix/TM = matrix() - animate(E, pixel_x = px, pixel_y = py, transform = TM, time = timing) - else - E.pixel_y = py - E.pixel_x = px + E.pixel_y = round(cos(angle) * radius) + py_shift + E.pixel_x = round(sin(angle) * radius) + E.screen_loc = "CENTER:[E.pixel_x + pixel_x_difference],CENTER:[E.pixel_y + pixel_y_difference]" + + current_user.screen += E //Visuals E.alpha = 255 @@ -245,25 +216,21 @@ GLOBAL_LIST_EMPTY(radial_menus) update_screen_objects() /datum/radial_menu/proc/show_to(mob/M) - if(current_user) - hide() if(!M.client || !anchor) return - current_user = M.client - //Blank - menu_holder = image(icon = 'icons/effects/effects.dmi', loc = anchor, icon_state = "nothing", layer = ABOVE_HUD_LAYER) - menu_holder.appearance_flags |= KEEP_APART - menu_holder.vis_contents += elements + close_button - current_user.images += menu_holder - -/datum/radial_menu/proc/hide() - if(current_user) - current_user.images -= menu_holder + close_button.screen_loc = "CENTER:[pixel_x_difference],CENTER:[pixel_y_difference]" + current_user.screen += close_button /datum/radial_menu/proc/wait(mob/user, atom/anchor, require_near = FALSE) + var/last_location = user.loc while(current_user && !finished && !selected_choice) - if(require_near && !user.Adjacent(anchor)) - return + if(require_near) + if(!user.Adjacent(get_turf(anchor))) + return + if(last_location != user.loc) + update_screen_objects() + close_button.screen_loc = "CENTER:[pixel_x_difference],CENTER:[pixel_y_difference]" + last_location = user.loc if(custom_check_callback && next_check < world.time) if(!custom_check_callback.Invoke()) return @@ -273,7 +240,6 @@ GLOBAL_LIST_EMPTY(radial_menus) /datum/radial_menu/Destroy() Reset() - hide() QDEL_LIST_CONTENTS(elements) QDEL_NULL(close_button) anchor = null @@ -299,8 +265,11 @@ GLOBAL_LIST_EMPTY(radial_menus) menu.radius = radius if(istype(custom_check)) menu.custom_check_callback = custom_check - menu.anchor = anchor - menu.check_screen_border(user) //Do what's needed to make it look good near borders or on hud + if(anchor in user.client.screen) + menu.anchor = user + else + menu.anchor = anchor + menu.current_user = user.client menu.set_choices(choices) menu.show_to(user) menu.wait(user, anchor, require_near) @@ -329,7 +298,7 @@ GLOBAL_LIST_EMPTY(radial_menus) if(!istype(possible_atom)) stack_trace("radial_menu_helper was passed a non-atom (\"[possible_atom]\", [possible_atom.type]) as a choice") continue - var/mutable_appearance/atom_appearance = new(possible_atom.appearance) + var/mutable_appearance/atom_appearance = mutable_appearance(possible_atom.icon, possible_atom.icon_state, possible_atom.layer, filters = possible_atom.filters) var/hover_outline_index = possible_atom.get_filter("hover_outline") if(!isnull(hover_outline_index)) @@ -350,5 +319,3 @@ GLOBAL_LIST_EMPTY(radial_menus) return return return_choices[chosen_key] - -#undef ANIM_SPEED diff --git a/code/controllers/configuration/sections/redis_configuration.dm b/code/controllers/configuration/sections/redis_configuration.dm index 347cae9282f2..45661f3643b5 100644 --- a/code/controllers/configuration/sections/redis_configuration.dm +++ b/code/controllers/configuration/sections/redis_configuration.dm @@ -10,7 +10,7 @@ // UNIT TESTS ARE DEFINED - USE CUSTOM CI VALUES #ifdef UNIT_TESTS - enabled = TRUE + // enabled = TRUE #else // Load the normal config. Were not in CI mode diff --git a/code/controllers/subsystem/SSticker.dm b/code/controllers/subsystem/SSticker.dm index 41557b219329..447ed03b9e4e 100644 --- a/code/controllers/subsystem/SSticker.dm +++ b/code/controllers/subsystem/SSticker.dm @@ -143,7 +143,7 @@ SUBSYSTEM_DEF(ticker) var/list/pickable_types = list() for(var/x in subtypesof(/datum/map)) var/datum/map/M = x - if(initial(M.voteable)) + if(initial(M.voteable) && length(GLOB.clients) >= initial(M.min_players_random)) pickable_types += M var/datum/map/target_map = pick(pickable_types) @@ -264,10 +264,6 @@ SUBSYSTEM_DEF(ticker) create_characters() // Create player characters and transfer clients log_debug("Creating characters took [stop_watch(watch)]s") - watch = start_watch() - populate_spawn_points() // Put mobs in their spawn locations - log_debug("Populating spawn points took [stop_watch(watch)]s") - // Gather everyones minds for(var/mob/living/player in GLOB.player_list) if(player.mind) @@ -580,7 +576,7 @@ SUBSYSTEM_DEF(ticker) end_of_round_info += "[law.get_index()]. [law.law]" if(dronecount) - end_of_round_info += "There [dronecount > 1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount > 1 ? "drones" : "drone"] this round." + end_of_round_info += "There [dronecount > 1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount > 1 ? "drones" : "drone"] this round." if(length(mode.eventmiscs)) for(var/datum/mind/eventmind in mode.eventmiscs) diff --git a/code/datums/components/tilted.dm b/code/datums/components/tilted.dm index c4e97ee6efd9..7027fdbc5e8d 100644 --- a/code/datums/components/tilted.dm +++ b/code/datums/components/tilted.dm @@ -82,14 +82,14 @@ if(user) user.visible_message( - "[user] begins to right [parent].", - "You begin to right [parent]." + "[user] begins to right [atom_parent].", + "You begin to right [atom_parent]." ) - if(!do_after(user, duration, TRUE, parent)) + if(!do_after(user, duration, TRUE, parent) || QDELETED(src)) return user.visible_message( - "[user] rights [parent].", - "You right [parent].", + "[user] rights [atom_parent].", + "You right [atom_parent].", "You hear a loud clang." ) @@ -98,7 +98,7 @@ atom_parent.unbuckle_all_mobs(TRUE) - SEND_SIGNAL(parent, COMSIG_MOVABLE_UNTILTED, user) + SEND_SIGNAL(atom_parent, COMSIG_MOVABLE_UNTILTED, user) atom_parent.layer = initial(atom_parent.layer) diff --git a/code/datums/emote.dm b/code/datums/emote.dm index 938e73e5a666..1cb1668e1182 100644 --- a/code/datums/emote.dm +++ b/code/datums/emote.dm @@ -182,7 +182,7 @@ var/suppressed = FALSE // Keep em quiet if they can't speak - if(!can_vocalize_emotes(user) && (emote_type & (EMOTE_MOUTH | EMOTE_AUDIBLE) || emote_type & (EMOTE_MOUTH | EMOTE_SOUND))) + if(!can_vocalize_emotes(user) && (emote_type & (EMOTE_MOUTH | EMOTE_AUDIBLE))) var/noise_emitted = pick(muzzled_noises) suppressed = TRUE msg = "makes \a [noise_emitted] noise." @@ -215,12 +215,12 @@ for(var/mob/dead/observer/ghost in viewers(user)) ghost.show_message("[displayed_msg]", EMOTE_VISIBLE) - else if(emote_type & (EMOTE_AUDIBLE | EMOTE_SOUND) && !user.mind?.miming) + else if((emote_type & EMOTE_AUDIBLE) && !user.mind?.miming) user.audible_message(displayed_msg, deaf_message = "You see how [user] [msg]") else user.visible_message(displayed_msg, blind_message = "You hear how someone [msg]") - if(!(emote_type & (EMOTE_FORCE_NO_RUNECHAT | EMOTE_SOUND) || suppressed) && !isobserver(user)) + if(!((emote_type & EMOTE_FORCE_NO_RUNECHAT) || suppressed) && !isobserver(user)) runechat_emote(user, msg) SEND_SIGNAL(user, COMSIG_MOB_EMOTED(key), src, key, emote_type, message, intentional) diff --git a/code/datums/helper_datums/map_template.dm b/code/datums/helper_datums/map_template.dm index 170f6773b1d1..6ce46ac564cd 100644 --- a/code/datums/helper_datums/map_template.dm +++ b/code/datums/helper_datums/map_template.dm @@ -143,7 +143,6 @@ continue GLOB.map_templates[R.name] = R - GLOB.ruins_templates[R.name] = R if(istype(R, /datum/map_template/ruin/lavaland)) GLOB.lava_ruins_templates[R.name] = R @@ -195,5 +194,4 @@ var/datum/map_template/event/E = new event_type() - GLOB.event_templates[E.event_id] = E GLOB.map_templates[E.event_id] = E diff --git a/code/datums/keybindings/emote_keybinds.dm b/code/datums/keybindings/emote_keybinds.dm index 4b99ae192997..f81ed46cd943 100644 --- a/code/datums/keybindings/emote_keybinds.dm +++ b/code/datums/keybindings/emote_keybinds.dm @@ -296,31 +296,31 @@ return isbrain(M) && ..() /datum/keybinding/emote/carbon/brain/alarm - linked_emote = /datum/emote/living/carbon/brain/alarm + linked_emote = /datum/emote/living/brain/alarm name = "Alarm" /datum/keybinding/emote/carbon/brain/alert - linked_emote = /datum/emote/living/carbon/brain/alert + linked_emote = /datum/emote/living/brain/alert name = "Alert" /datum/keybinding/emote/carbon/brain/notice - linked_emote = /datum/emote/living/carbon/brain/notice + linked_emote = /datum/emote/living/brain/notice name = "Notice" /datum/keybinding/emote/carbon/brain/flash - linked_emote = /datum/emote/living/carbon/brain/flash + linked_emote = /datum/emote/living/brain/flash name = "Flash" /datum/keybinding/emote/carbon/brain/whistle - linked_emote = /datum/emote/living/carbon/brain/whistle + linked_emote = /datum/emote/living/brain/whistle name = "Whistle" /datum/keybinding/emote/carbon/brain/beep - linked_emote = /datum/emote/living/carbon/brain/beep + linked_emote = /datum/emote/living/brain/beep name = "Beep" /datum/keybinding/emote/carbon/brain/boop - linked_emote = /datum/emote/living/carbon/brain/boop + linked_emote = /datum/emote/living/brain/boop name = "Boop" /datum/keybinding/emote/carbon/human diff --git a/code/datums/mutable_appearance.dm b/code/datums/mutable_appearance.dm index 038471ec3652..3ddadc138d1b 100644 --- a/code/datums/mutable_appearance.dm +++ b/code/datums/mutable_appearance.dm @@ -10,7 +10,7 @@ // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var // Helper similar to image() -/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color) +/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color, filters) var/mutable_appearance/MA = new() MA.icon = icon MA.icon_state = icon_state @@ -20,6 +20,7 @@ MA.appearance_flags |= appearance_flags if(color) MA.color = color + MA.filters = filters return MA /mutable_appearance/clean/New() diff --git a/code/datums/outfits/outfit_debug.dm b/code/datums/outfits/outfit_debug.dm index 25656e065844..28460989c297 100644 --- a/code/datums/outfits/outfit_debug.dm +++ b/code/datums/outfits/outfit_debug.dm @@ -26,9 +26,9 @@ toggle_helmet = TRUE cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/arm/surgery/advanced, + /obj/item/organ/internal/cyberimp/arm/surgery/debug, /obj/item/organ/internal/cyberimp/chest/nutriment/hardened, - /obj/item/organ/internal/cyberimp/arm/janitorial/advanced + /obj/item/organ/internal/cyberimp/arm/janitorial/debug ) @@ -144,20 +144,34 @@ righthand_file = 'icons/mob/inhands/items_righthand.dmi' w_class = WEIGHT_CLASS_SMALL var/datum/species/selected_species - var/valid_species = list() + var/activate_mind = FALSE + +/obj/item/debug/human_spawner/examine(mob/user) + . = ..() + . += "Alt-Click to toggle mind-activation on spawning." /obj/item/debug/human_spawner/afterattack(atom/target, mob/user, proximity) ..() - if(isturf(target)) - var/mob/living/carbon/human/H = new /mob/living/carbon/human(target) - if(selected_species) - H.setup_dna(selected_species.type) + if(!isturf(target)) + return + var/mob/living/carbon/human/H = new /mob/living/carbon/human(target) + if(selected_species) + H.setup_dna(selected_species.type) + if(activate_mind) + H.mind_initialize() /obj/item/debug/human_spawner/attack_self(mob/user) ..() var/choice = input("Select a species", "Human Spawner", null) in GLOB.all_species selected_species = GLOB.all_species[choice] +/obj/item/debug/human_spawner/AltClick(mob/user) + . = ..() + if(!Adjacent(user)) + return + activate_mind = !activate_mind + to_chat(user, "Any humans spawned will [activate_mind ? "" : "not "]spawn with an initialized mind.") + /obj/item/rcd/combat/admin name = "AVD-CNED RCD" max_matter = INFINITY @@ -185,7 +199,7 @@ to_chat(user, "[src] is now set to toolspeed [toolspeed]") playsound(src, 'sound/effects/pop.ogg', 50, 0) //Change the mode -/obj/item/organ/internal/cyberimp/arm/surgery/advanced +/obj/item/organ/internal/cyberimp/arm/surgery/debug name = "AVD-CNED surgical toolset implant" contents = newlist( /obj/item/scalpel/laser/manager/debug, @@ -197,7 +211,7 @@ /obj/item/bodyanalyzer/debug ) -/obj/item/organ/internal/cyberimp/arm/janitorial/advanced +/obj/item/organ/internal/cyberimp/arm/janitorial/debug name = "AVD-CNED janitorial toolset implant... is that a... tazer?" desc = "A set of advanced janitorial tools hidden behind a concealed panel on the user's arm with a tazer? What the fuck." parent_organ = "l_arm" // left arm by default cuz im lazy diff --git a/code/datums/radio_frequency.dm b/code/datums/radio_frequency.dm index 764fd640881a..cf14ba3c956d 100644 --- a/code/datums/radio_frequency.dm +++ b/code/datums/radio_frequency.dm @@ -98,7 +98,7 @@ var/mob/living/carbon/human/H = M . = H.dna.species.name else if(isbrain(M)) - var/mob/living/carbon/brain/B = M + var/mob/living/brain/B = M . = B.get_race() else if(issilicon(M)) . = "Artificial Life" diff --git a/code/datums/spells/construct_spells.dm b/code/datums/spells/construct_spells.dm index 2ba67cf1aa40..e27d70153bb6 100644 --- a/code/datums/spells/construct_spells.dm +++ b/code/datums/spells/construct_spells.dm @@ -143,6 +143,7 @@ invocation_type = "none" holy_area_cancast = FALSE //Stops cult magic from working on holy ground eg: chapel proj_lifespan = 10 + proj_step_delay = 5 proj_type = "/obj/effect/proc_holder/spell/inflict_handler/magic_missile/lesser" /obj/effect/proc_holder/spell/projectile/magic_missile/lesser/create_new_targeting() diff --git a/code/datums/spells/wizard_spells.dm b/code/datums/spells/wizard_spells.dm index 1e5abe773d9e..cee4dbb07286 100644 --- a/code/datums/spells/wizard_spells.dm +++ b/code/datums/spells/wizard_spells.dm @@ -15,7 +15,7 @@ proj_type = "/obj/effect/proc_holder/spell/inflict_handler/magic_missile" proj_lifespan = 20 - proj_step_delay = 5 + proj_step_delay = 2 proj_trail = 1 proj_trail_lifespan = 5 @@ -283,12 +283,12 @@ desc = "This spell temporarily blinds a single person and does not require wizard garb." school = "transmutation" - base_cooldown = 300 + base_cooldown = 10 SECONDS clothes_req = FALSE invocation = "STI KALY" invocation_type = "whisper" message = "Your eyes cry out in pain!" - cooldown_min = 50 //12 deciseconds reduction per rank + cooldown_min = 2 SECONDS starting_spells = list("/obj/effect/proc_holder/spell/inflict_handler/blind","/obj/effect/proc_holder/spell/genetic/blind") diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 1aab56c9d8a7..d65790632129 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -257,7 +257,9 @@ /datum/status_effect/force_shield id = "forceshield" - duration = 4 SECONDS + alert_type = null + status_type = STATUS_EFFECT_REFRESH + duration = 5 SECONDS tick_interval = 0 var/mutable_appearance/shield diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index c545f6c2d498..ce613a490906 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -270,3 +270,19 @@ /datum/status_effect/delayed/on_timeout() . = ..() expire_proc.Invoke() + +/datum/status_effect/action_status_effect + alert_type = null + tick_interval = -1 + +/datum/status_effect/action_status_effect/remove_handcuffs + id = "remove_handcuffs" + +/datum/status_effect/action_status_effect/break_handcuffs + id = "break_handcuffs" + +/datum/status_effect/action_status_effect/remove_muzzle + id = "remove_muzzle" + +/datum/status_effect/action_status_effect/unbuckle + id = "unbuckle" diff --git a/code/datums/uplink_items/uplink_general.dm b/code/datums/uplink_items/uplink_general.dm index 9da4ac870052..82c9a5ad20c0 100644 --- a/code/datums/uplink_items/uplink_general.dm +++ b/code/datums/uplink_items/uplink_general.dm @@ -365,7 +365,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Just add water to make your very own hostile to everything space carp. It looks just like a plushie. The first person to squeeze it will be registered as its owner, who it will not attack. If no owner is registered, it'll just attack everyone." reference = "DSC" item = /obj/item/toy/plushie/carpplushie/dehy_carp - cost = 5 + cost = 4 // GRENADES AND EXPLOSIVES diff --git a/code/datums/uplink_items/uplink_traitor.dm b/code/datums/uplink_items/uplink_traitor.dm index da108abc6c50..bcb22243315e 100644 --- a/code/datums/uplink_items/uplink_traitor.dm +++ b/code/datums/uplink_items/uplink_traitor.dm @@ -244,6 +244,7 @@ item = /obj/item/dice/d20/e20 cost = 15 job = list("Librarian") + surplus = 0 //Botanist /datum/uplink_item/jobspecific/ambrosiacruciatus diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 4c9a7c0f582b..cd7794592742 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -418,7 +418,6 @@ GLOBAL_LIST_EMPTY(bad_blocks) SE_original = SE.Copy() unique_enzymes = md5(character.real_name) - GLOB.reg_dna[unique_enzymes] = character.real_name // Hmm, I wonder how to go about this without a huge convention break /datum/dna/serialize() diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index f26761ea92a3..57cacf2c5251 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -1,6 +1,7 @@ #define LING_FAKEDEATH_TIME 50 SECONDS #define LING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob +// This list is basically a copy of GLOB.greek_letters, but it also removes letters when a changeling spawns in with that ID GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")) /datum/game_mode diff --git a/code/game/gamemodes/cult/cult_mode.dm b/code/game/gamemodes/cult/cult_mode.dm index 045f08879553..86e8d4a82ff2 100644 --- a/code/game/gamemodes/cult/cult_mode.dm +++ b/code/game/gamemodes/cult/cult_mode.dm @@ -1,5 +1,3 @@ -GLOBAL_LIST_EMPTY(all_cults) - /datum/game_mode /// A list of all minds currently in the cult var/list/datum/mind/cult = list() diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 695ee5fda5ce..5b7f2d6bd8f9 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1,5 +1,4 @@ GLOBAL_LIST_EMPTY(sacrificed) // A mixed list of minds and mobs -GLOBAL_LIST_EMPTY(wall_runes) // A list of all cult shield walls GLOBAL_LIST_EMPTY(teleport_runes) // I'll give you two guesses /* @@ -290,7 +289,7 @@ structure_check() searches for nearby cultist structures required for the invoca // Offering a head/brain for(var/obj/item/organ/O in T) - var/mob/living/carbon/brain/b_mob + var/mob/living/brain/b_mob if(istype(O, /obj/item/organ/external/head)) // Offering a head var/obj/item/organ/external/head/H = O for(var/obj/item/organ/internal/brain/brain in H.contents) @@ -716,12 +715,10 @@ structure_check() searches for nearby cultist structures required for the invoca /obj/effect/rune/wall/Initialize(mapload) . = ..() - GLOB.wall_runes += src B = new /obj/machinery/shield/cult/barrier(loc) B.parent_rune = src /obj/effect/rune/wall/Destroy() - GLOB.wall_runes -= src if(B && !QDELETED(B)) QDEL_NULL(B) return ..() diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index 92ef8002b7fb..41d8aad47085 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -47,7 +47,7 @@ /datum/game_mode/abduction/proc/make_abductor_team(team_number,preset_agent=null,preset_scientist=null) //Team Name - team_names[team_number] = "Mothership [pick(GLOB.possible_changeling_IDs)]" //TODO Ensure unique and actual alieny names + team_names[team_number] = "Mothership [pick(GLOB.greek_letters)]" //TODO Ensure unique and actual alieny names //Team Objective var/datum/objective/experiment/team_objective = new team_objective.abductor_team_number = team_number diff --git a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm index 07a7735affa6..44be9000c319 100644 --- a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm +++ b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm @@ -441,7 +441,7 @@ to_chat(user, "You have already fully upgraded everything available!") return FALSE - var/raw_choice = show_radial_menu(user, isturf(user.loc) ? user : user.loc, upgrades, radius = 48) + var/raw_choice = show_radial_menu(user, user, upgrades, radius = 48) if(!raw_choice) return var/choice = splittext(raw_choice, " ")[1] diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 8720f8b98ed2..0c7b18507c8e 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -342,6 +342,8 @@ GLOBAL_VAR(bomb_set) /obj/machinery/nuclearbomb/attack_hand(mob/user as mob) if(!panel_open) return ui_interact(user) + if(!Adjacent(user)) + return if(removal_stage != NUKE_CORE_FULLY_EXPOSED || !core) return wires.Interact(user) if(timing) //removing the core is less risk then cutting wires, and doesnt take long, so we should not let crew do it while the nuke is armed. You can however get to it, without the special screwdriver, if you put the NAD in. diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index 6321edc44bcb..434059436730 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -94,7 +94,7 @@ L.ghostize() if(isbrain(L)) // diediedie - var/mob/living/carbon/brain/B = L + var/mob/living/brain/B = L if(isitem(B.loc)) qdel(B.loc) if(B && B.container) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index b75777018fcb..c63ce948f07f 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -302,6 +302,7 @@ name = "Remove Clothes Requirement" spell_type = /obj/effect/proc_holder/spell/noclothes category = "Assistance" + cost = 1 //Rituals /datum/spellbook_entry/summon diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 47b012eecffc..ca4071f4d6da 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -89,9 +89,9 @@ /datum/outfit/job/hop name = "Head of Personnel" jobtype = /datum/job/hop - uniform = /obj/item/clothing/under/rank/civilian/head_of_personnel + uniform = /obj/item/clothing/under/rank/civilian/hop shoes = /obj/item/clothing/shoes/brown - head = /obj/item/clothing/head/hopcap + head = /obj/item/clothing/head/hop glasses = /obj/item/clothing/glasses/hud/skills/sunglasses l_ear = /obj/item/radio/headset/heads/hop id = /obj/item/card/id/hop diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 8fb9c54c26cd..981a4f3dedfa 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1206,7 +1206,7 @@ if(!user.unEquip(mmi_as_oc)) to_chat(user, "\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]") return FALSE - var/mob/living/carbon/brain/brainmob = mmi_as_oc.brainmob + var/mob/living/brain/brainmob = mmi_as_oc.brainmob brainmob.reset_perspective(src) occupant = brainmob brainmob.forceMove(src) //should allow relaymove @@ -1231,13 +1231,13 @@ /obj/mecha/proc/pilot_is_mmi() var/atom/movable/mob_container if(isbrain(occupant)) - var/mob/living/carbon/brain/brain = occupant + var/mob/living/brain/brain = occupant mob_container = brain.container if(istype(mob_container, /obj/item/mmi)) return 1 return 0 -/obj/mecha/proc/pilot_mmi_hud(mob/living/carbon/brain/pilot) +/obj/mecha/proc/pilot_mmi_hud(mob/living/brain/pilot) return /obj/mecha/Exited(atom/movable/M, atom/newloc) @@ -1258,7 +1258,7 @@ mob_container = occupant RemoveActions(occupant, human_occupant = 1) else if(isbrain(occupant)) - var/mob/living/carbon/brain/brain = occupant + var/mob/living/brain/brain = occupant RemoveActions(brain) mob_container = brain.container else if(isAI(occupant)) @@ -1560,7 +1560,7 @@ for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment) if(!MT.selectable || selected == MT) continue - var/mutable_appearance/clean/MA = new(MT) + var/mutable_appearance/clean/MA = mutable_appearance(MT.icon, MT.icon_state, MT.layer, filters = MT.filters) choices[MT.name] = MA choices_to_refs[MT.name] = MT diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index 3fd3cf8742b0..05d1d5c38ced 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -38,7 +38,7 @@ A.remove_hud_from(H) builtin_hud_user = 0 else if((isbrain(occupant) || pilot_is_mmi()) && builtin_hud_user) - var/mob/living/carbon/brain/H = occupant + var/mob/living/brain/H = occupant var/datum/atom_hud/A = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] A.remove_hud_from(H) builtin_hud_user = 0 diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 0edc1089bb4e..87e325634646 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -138,9 +138,11 @@ if(!in_range(user, src) || !isturf(user.loc) || user.incapacitated() || M.anchored) return FALSE - if(isguardian(user)) - if(M.loc == user.loc || user.alpha == 60) //Alpha is for detecting ranged guardians in scout mode - return //unmanifested guardians shouldn't be able to buckle mobs + if(isguardian(user) && (M.loc == user.loc || user.alpha == 60)) //Alpha is for detecting ranged guardians in scout mode + return //unmanifested guardians shouldn't be able to buckle mobs + + if(M != user && (!in_range(M, src) || !do_after(user, 1 SECONDS, target = M))) + return FALSE if(M != user && (!in_range(M, src) || !do_after(user, 1 SECONDS, target = M))) return FALSE diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index d049d275c932..c0213fe24e20 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -1,8 +1,6 @@ #define DRYING_TIME 5 * 60 * 10 //for 1 unit of depth in puddle (amount var) #define ALWAYS_IN_GRAVITY 2 -GLOBAL_LIST_EMPTY(splatter_cache) - /obj/effect/decal/cleanable/blood name = "blood" var/dryname = "dried blood" diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 3b5bb6c80dd3..9482984df034 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -24,17 +24,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp /obj/effect/landmark/lightsout name = "Electrical Storm Epicentre" -/obj/effect/landmark/awaystart - name = "awaystart" - icon = 'icons/effects/spawner_icons.dmi' - icon_state = "Assistant" - -INITIALIZE_IMMEDIATE(/obj/effect/landmark/awaystart) //Without this away missions break - -/obj/effect/landmark/awaystart/Initialize(mapload) - GLOB.awaydestinations.Add(src) - return ..() - /obj/effect/landmark/spawner icon = 'icons/effects/spawner_icons.dmi' icon_state = "questionmark" diff --git a/code/game/objects/effects/meteors.dm b/code/game/objects/effects/meteors.dm index 2bfa9f094e81..ec519dfeca5f 100644 --- a/code/game/objects/effects/meteors.dm +++ b/code/game/objects/effects/meteors.dm @@ -13,8 +13,6 @@ GLOBAL_LIST_INIT(meteors_catastrophic, list(/obj/effect/meteor/medium = 3, /obj/ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/meteor/meaty/xeno = 1)) //for meaty ore event -GLOBAL_LIST_INIT(meteors_dust, list(/obj/effect/meteor/dust)) //for space dust event - GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops @@ -364,8 +362,6 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops //Spookoween meteors ///////////////////////// -GLOBAL_LIST_INIT(meteorsSPOOKY, list(/obj/effect/meteor/pumpkin)) - /obj/effect/meteor/pumpkin name = "PUMPKING" desc = "THE PUMPKING'S COMING!" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 11a50e1c59bb..b42d0dfac594 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -274,6 +274,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( new /datum/stack_recipe("white shoes", /obj/item/clothing/shoes/white, 2), new /datum/stack_recipe("cloth footwraps", /obj/item/clothing/shoes/footwraps, 2), null, + new /datum/stack_recipe("cloth handwraps", /obj/item/clothing/gloves/handwraps, 2), new /datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1), new /datum/stack_recipe("white gloves", /obj/item/clothing/gloves/color/white, 3), new /datum/stack_recipe("white softcap", /obj/item/clothing/head/soft/mime, 2), diff --git a/code/game/objects/items/tools/welder.dm b/code/game/objects/items/tools/welder.dm index 5a22b04df84f..60ec8bf0efc9 100644 --- a/code/game/objects/items/tools/welder.dm +++ b/code/game/objects/items/tools/welder.dm @@ -142,6 +142,8 @@ . = ..() if(!tool_enabled) return + if(!proximity || isturf(target)) // We don't want to take away fuel when we hit something far away + return remove_fuel(0.5) /obj/item/weldingtool/use_tool(atom/target, user, delay, amount, volume, datum/callback/extra_checks) diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index cd7881419356..e3e6b5d0b437 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -128,5 +128,10 @@ desc = "Not sticky anymore." throw_range = 1 +/obj/item/trash/popsicle_stick + name = "used popsicle stick" + icon_state = "popsicle_stick_s" + desc = "Still tastes sweet." + /obj/item/trash/attack(mob/M as mob, mob/living/user as mob) return diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 2d7130f1ca04..ae90f8b8ae2e 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -229,6 +229,8 @@ /obj/item/nullrod/sord name = "\improper UNREAL SORD" desc = "This thing is so unspeakably HOLY you are having a hard time even holding it." + lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons_righthand.dmi' icon_state = "sord" item_state = "sord" slot_flags = SLOT_FLAG_BELT diff --git a/code/game/objects/items/weapons/misc_items.dm b/code/game/objects/items/weapons/misc_items.dm index 4a8642bc8c8e..e90c14664d05 100644 --- a/code/game/objects/items/weapons/misc_items.dm +++ b/code/game/objects/items/weapons/misc_items.dm @@ -14,6 +14,7 @@ Newton Cradle PAI cable Red Phone + Popsicle Sticks */ /obj/item/balltoy @@ -216,3 +217,9 @@ if(cooldown < world.time - 20) playsound(user.loc, 'sound/weapons/ring.ogg', 50, 1) cooldown = world.time + +/obj/item/popsicle_stick + name = "popsicle stick" + desc = "A small wooden stick, usually topped by popsicles or other frozen treats." + icon = 'icons/obj/food/frozen_treats.dmi' + icon_state = "popsicle_stick" diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index 8c5f3034ab2e..009bed78c08e 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -2,7 +2,7 @@ name = "soap" desc = "A cheap bar of soap. Doesn't smell." gender = PLURAL - icon = 'icons/obj/items.dmi' + icon = 'icons/obj/janitor.dmi' icon_state = "soap" lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' @@ -106,6 +106,11 @@ icon_state = "soapdeluxe" cleanspeed = 40 //slightly better because deluxe -- captain gets one of these +/obj/item/soap/deluxe/laundry + name = "laundry soap" + desc = "Very cheap but effective soap. Dries out the skin." + icon_state = "soapsoviet" + /obj/item/soap/syndie desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster." icon_state = "soapsyndie" diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 55fb990a6d29..2b0a631022af 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -132,8 +132,8 @@ new /obj/item/gun/projectile/revolver/capgun(src) /obj/item/storage/backpack/mime - name = "Parcel Parceaux" - desc = "A silent backpack made for those silent workers. Silence Co." + name = "Pierre the Panda" + desc = "A backpack modelled after Pierre the Panda - the official mascot for the Université du Mime." icon_state = "mimepack" item_state = "mimepack" diff --git a/code/game/objects/items/weapons/storage/garment.dm b/code/game/objects/items/weapons/storage/garment.dm index d3c5ea44ef64..f76156c129ce 100644 --- a/code/game/objects/items/weapons/storage/garment.dm +++ b/code/game/objects/items/weapons/storage/garment.dm @@ -52,14 +52,16 @@ desc = "A bag for storing extra clothes and shoes. This one belongs to the head of personnel." /obj/item/storage/bag/garment/head_of_personnel/populate_contents() - new /obj/item/clothing/head/hopcap(src) - new /obj/item/clothing/head/hopcap/beret(src) - new /obj/item/clothing/suit/mantle/armor/head_of_personnel(src) + new /obj/item/clothing/head/hop(src) + new /obj/item/clothing/head/hop/beret(src) + new /obj/item/clothing/suit/mantle/armor/hop(src) new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/clothing/under/rank/civilian/head_of_personnel(src) - new /obj/item/clothing/under/rank/civilian/head_of_personnel/dress(src) - new /obj/item/clothing/under/rank/civilian/head_of_personnel/dress_hr(src) - new /obj/item/clothing/under/rank/civilian/head_of_personnel/oldman(src) + new /obj/item/clothing/suit/hopcoat(src) + new /obj/item/clothing/under/rank/civilian/hop(src) + new /obj/item/clothing/under/rank/civilian/hop/skirt(src) + new /obj/item/clothing/under/rank/civilian/hop/dress(src) + new /obj/item/clothing/under/rank/civilian/hop/formal(src) + new /obj/item/clothing/under/rank/civilian/hop/oldman(src) new /obj/item/clothing/under/suit/female(src) new /obj/item/clothing/shoes/brown(src) new /obj/item/clothing/shoes/black(src) diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index ea0465ef39c7..c98fe5833907 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -201,3 +201,30 @@ locked = FALSE icon_state = icon_broken origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D. + +/obj/item/storage/lockbox/experimental_weapon + name = "A-113 classified lockbox" + desc = "Contains a classifed item for experimental purposes. Looks like some acid was spilt on it." + req_access = list(ACCESS_SEC_DOORS) //officers, heads + +/obj/item/storage/lockbox/experimental_weapon/populate_contents() + if(prob(10)) + new /obj/item/clothing/mask/facehugger(src) //Suprise! Storing facehuggers improperly is what lead to this mess. + return + var/spawn_type = pick(/obj/item/gun/energy/kinetic_accelerator/experimental, /obj/item/surveillance_upgrade, /obj/item/mod/module/stealth/ninja) + if(prob(25)) + if(rand(1, 6) == 1) //organ time. I want this to be more balanced in distribution, so organs are under a prob 25 + new /obj/item/organ/internal/alien/plasmavessel/drone(src) //Disected drone before the place got wiped. No hivenode. + new /obj/item/organ/internal/alien/acidgland(src) + new /obj/item/organ/internal/alien/resinspinner(src) + return + var/list/organ_loot = list( + /obj/item/organ/internal/cyberimp/arm/katana, + /obj/item/organ/internal/cyberimp/arm/toolset_abductor, + /obj/item/organ/internal/cyberimp/arm/esword, + /obj/item/organ/internal/heart/demon/pulse, + /obj/item/organ/internal/eyes/cybernetic/eyesofgod + ) + + spawn_type = pick(organ_loot) + new spawn_type(src) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 1660d8a80136..f335db6ae370 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -108,6 +108,7 @@ var/w_class_on = WEIGHT_CLASS_BULKY armour_penetration_flat = 10 + armour_penetration_percentage = 50 origin_tech = "magnets=4;syndicate=5" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") max_integrity = 200 @@ -574,7 +575,7 @@ icon_state = "singulohammer0" /obj/item/singularityhammer/proc/vortex(turf/pull, mob/wielder) - for(var/atom/movable/X in orange(5, pull)) + for(var/atom/movable/X in range(5, pull)) if(X.move_resist == INFINITY) continue if(X == wielder) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 02581d96f8d1..367d1c62648c 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -71,42 +71,32 @@ return FALSE var/blocking_object = density_check() if(blocking_object) - to_chat(user, "You cannot climb [src], as it is blocked by \a [blocking_object]!") + to_chat(user, "You cannot climb onto [src], as it is blocked by \a [blocking_object]!") return FALSE - var/turf/T = src.loc - if(!T || !istype(T)) return FALSE + if(!isturf(loc)) + return FALSE - climber = user - if(HAS_TRAIT(climber, TRAIT_TABLE_LEAP)) + if(HAS_TRAIT(user, TRAIT_TABLE_LEAP)) user.visible_message("[user] gets ready to vault up onto [src]!") if(!do_after(user, 0.5 SECONDS, target = src)) - climber = null return FALSE else user.visible_message("[user] starts climbing onto [src]!") if(!do_after(user, 5 SECONDS, target = src)) - climber = null return FALSE if(!can_touch(user) || !climbable) - climber = null return FALSE - var/old_loc = usr.loc - user.loc = get_turf(src) - user.Moved(old_loc, get_dir(old_loc, usr.loc), FALSE) + user.forceMove(get_turf(src)) if(get_turf(user) == get_turf(src)) - if(HAS_TRAIT(climber, TRAIT_TABLE_LEAP)) + if(HAS_TRAIT(user, TRAIT_TABLE_LEAP)) user.visible_message("[user] leaps up onto [src]!") else user.visible_message("[user] climbs onto [src]!") - climber = null - return TRUE - /obj/structure/proc/structure_shaken() - for(var/mob/living/M in get_turf(src)) if(IS_HORIZONTAL(M)) @@ -148,22 +138,21 @@ H.adjustBruteLoss(damage) H.UpdateDamageIcon() - return /obj/structure/proc/can_touch(mob/living/user) if(!istype(user)) - return 0 + return FALSE if(!Adjacent(user)) - return 0 + return FALSE if(user.restrained() || user.buckled) to_chat(user, "You need your hands and legs free for this.") - return 0 + return FALSE if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) - return 0 + return FALSE if(issilicon(user)) to_chat(user, "You need hands for this.") - return 0 - return 1 + return FALSE + return TRUE /obj/structure/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index e708d668425f..5826b53f95cf 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -118,6 +118,8 @@ /obj/structure/closet/wardrobe/xenos/populate_contents() new /obj/item/clothing/suit/unathi/mantle(src) new /obj/item/clothing/suit/unathi/robe(src) + new /obj/item/clothing/gloves/handwraps(src) + new /obj/item/clothing/gloves/handwraps(src) new /obj/item/clothing/shoes/sandal(src) new /obj/item/clothing/shoes/sandal(src) new /obj/item/clothing/shoes/sandal(src) diff --git a/code/game/objects/structures/lavaland/necropolis_tendril.dm b/code/game/objects/structures/lavaland/necropolis_tendril.dm index 58bd619686ca..27d1a9f40638 100644 --- a/code/game/objects/structures/lavaland/necropolis_tendril.dm +++ b/code/game/objects/structures/lavaland/necropolis_tendril.dm @@ -23,7 +23,7 @@ /obj/structure/spawner/lavaland/legion mob_types = list(/mob/living/simple_animal/hostile/asteroid/hivelord/legion/tendril) -GLOBAL_LIST_INIT(tendrils, list()) +GLOBAL_LIST_EMPTY(tendrils) /obj/structure/spawner/lavaland/Initialize(mapload) . = ..() diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 9f1eff529c9c..21b37d58a74d 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -31,7 +31,7 @@ return if(forced || (confirm == "Yes")) - if(!forced && isAntag(src)) + if(!forced && isAntag(src) && !HAS_TRAIT(src, TRAIT_RESPAWNABLE)) confirm = alert("Are you absolutely sure? If you do this after you got converted/joined as an antagonist, you could face a jobban!", "Confirm Suicide", "Yes", "No") if(confirm == "Yes") suiciding = TRUE diff --git a/code/game/world.dm b/code/game/world.dm index 2fbd08764faa..3eb34e067be9 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -294,7 +294,10 @@ GLOBAL_LIST_EMPTY(world_topic_handlers) /world/Del() rustg_close_async_http_client() // Close the HTTP client. If you dont do this, youll get phantom threads which can crash DD from memory access violations disable_auxtools_debugger() // Disables the debugger if running. See above comment - rustg_redis_disconnect() // Disconnects the redis connection. See above. + + if(SSredis.connected) + rustg_redis_disconnect() // Disconnects the redis connection. See above. + #ifdef ENABLE_BYOND_TRACY CALL_EXT("prof.dll", "destroy")() // Setup Tracy integration #endif diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 9bb9212f81d2..637ddfeb4e82 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -814,7 +814,7 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( if(!istype(H)) if(isbrain(H)) - var/mob/living/carbon/brain/B = H + var/mob/living/brain/B = H if(istype(B.container, /obj/item/mmi/robotic_brain/positronic)) var/obj/item/mmi/robotic_brain/positronic/C = B.container var/obj/item/organ/internal/brain/mmi_holder/posibrain/P = C.loc @@ -840,7 +840,7 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( if(!istype(H)) if(isbrain(H)) - var/mob/living/carbon/brain/B = H + var/mob/living/brain/B = H if(istype(B.container, /obj/item/mmi/robotic_brain/positronic)) var/obj/item/mmi/robotic_brain/positronic/C = B.container var/obj/item/organ/internal/brain/mmi_holder/posibrain/P = C.loc diff --git a/code/modules/admin/misc_admin_procs.dm b/code/modules/admin/misc_admin_procs.dm index f6ccc2931ab3..fe951230dda7 100644 --- a/code/modules/admin/misc_admin_procs.dm +++ b/code/modules/admin/misc_admin_procs.dm @@ -118,7 +118,7 @@ GLOBAL_VAR_INIT(nologevent, 0) body += "Related accounts by IP: [jointext(M.client.related_accounts_ip, " - ")]

" if(M.ckey) - body += "Enabled AntagHUD: [M.has_ahudded() ? "TRUE" : "false"]
" + body += "Enabled AntagHUD: [M.has_ahudded() ? "TRUE" : "false"]
" body += "Roundstart observer: [M.is_roundstart_observer() ? "true" : "false"]
" body += "Kick | " body += "Ban | " diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 1d44235fc90a..40fb2ab3da75 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1,6 +1,3 @@ -//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE! -GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of", "monkey", "alien", "as")) - /client/verb/adminhelp() set category = "Admin" set name = "Adminhelp" diff --git a/code/modules/admin/verbs/logging_view.dm b/code/modules/admin/verbs/logging_view.dm index cafaab8f1d7b..636378df1abb 100644 --- a/code/modules/admin/verbs/logging_view.dm +++ b/code/modules/admin/verbs/logging_view.dm @@ -1,4 +1,4 @@ -GLOBAL_LIST_INIT(open_logging_views, list()) +GLOBAL_LIST_EMPTY(open_logging_views) /client/proc/cmd_admin_open_logging_view() set category = "Admin" @@ -18,4 +18,4 @@ GLOBAL_LIST_INIT(open_logging_views, list()) cur_view.add_mobs(mobs_to_add) cur_view.show_ui(usr) - + diff --git a/code/modules/antagonists/changeling/powers/become_headslug.dm b/code/modules/antagonists/changeling/powers/become_headslug.dm index 6e8f8aa282b5..ee8103520490 100644 --- a/code/modules/antagonists/changeling/powers/become_headslug.dm +++ b/code/modules/antagonists/changeling/powers/become_headslug.dm @@ -6,6 +6,8 @@ chemical_cost = 20 dna_cost = 2 req_human = TRUE + req_stat = DEAD + bypass_fake_death = TRUE power_type = CHANGELING_PURCHASABLE_POWER menu_location = CLING_MENU_DEFENSE diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 11b4ebbe98ef..50d92248b8bf 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -16,6 +16,8 @@ var/silent = FALSE var/weapon_type var/weapon_name_simple + /// How much does the chemical recharge rate get reduced by having this weapon out? + var/recharge_slowdown /datum/action/changeling/weapon/try_to_sting(mob/user, mob/target) if(istype(user.l_hand, weapon_type) || istype(user.r_hand, weapon_type)) @@ -30,8 +32,10 @@ return FALSE var/obj/item/W = new weapon_type(user, silent, src) user.put_in_hands(W) + cling.chem_recharge_slowdown += recharge_slowdown RegisterSignal(user, COMSIG_MOB_WILLINGLY_DROP, PROC_REF(retract), override = TRUE) RegisterSignal(user, COMSIG_MOB_WEAPON_APPEARS, PROC_REF(retract), override = TRUE) + playsound(owner.loc, 'sound/effects/bone_break_1.ogg', 100, TRUE) return W /datum/action/changeling/weapon/proc/retract(atom/target, any_hand = FALSE) @@ -50,7 +54,9 @@ owner.update_inv_r_hand() done = TRUE if(done && !silent) + playsound(owner.loc, 'sound/effects/bone_break_2.ogg', 100, TRUE) owner.visible_message("With a sickening crunch, [owner] reforms [owner.p_their()] [weapon_name_simple] into an arm!", "We assimilate the [weapon_name_simple] back into our body.", "You hear organic matter ripping and tearing!") + cling.chem_recharge_slowdown -= recharge_slowdown // We handle this here because more things can retract without going through try_to_sting //Parent to space suits and armor. /datum/action/changeling/suit @@ -73,6 +79,7 @@ var/mob/living/carbon/human/H = user if(istype(H.wear_suit, suit_type) || istype(H.head, helmet_type)) H.visible_message("[H] casts off [H.p_their()] [suit_name_simple]!", "We cast off our [suit_name_simple].", "You hear the organic matter ripping and tearing!") + playsound(owner.loc, 'sound/effects/bone_break_2.ogg', 100, TRUE) qdel(H.wear_suit) qdel(H.head) H.update_inv_wear_suit() @@ -112,20 +119,22 @@ \***************************************/ /datum/action/changeling/weapon/arm_blade name = "Arm Blade" - desc = "We reform one of our arms into a deadly blade. Costs 25 chemicals." + desc = "We reform one of our arms into a deadly blade. Costs 15 chemicals." helptext = "We may retract our armblade in the same manner as we form it. Cannot be used while in lesser form." button_icon_state = "armblade" - chemical_cost = 25 + chemical_cost = 15 dna_cost = 4 req_human = TRUE weapon_type = /obj/item/melee/arm_blade weapon_name_simple = "blade" power_type = CHANGELING_PURCHASABLE_POWER menu_location = CLING_MENU_ATTACK + recharge_slowdown = 0.75 /obj/item/melee/arm_blade name = "arm blade" desc = "A grotesque blade made of bone and flesh that cleaves through people like a hot knife through butter." + hitsound = 'sound/weapons/armblade.ogg' icon_state = "arm_blade" item_state = "arm_blade" flags = ABSTRACT | NODROP | DROPDEL @@ -215,6 +224,7 @@ if(ismob(loc)) if(!silent) loc.visible_message("[loc.name]\'s arm starts stretching inhumanly!", "Our arm twists and mutates, transforming it into a tentacle.", "You hear organic matter ripping and tearing!") + playsound(loc, 'sound/effects/bone_break_1.ogg', 100, TRUE) else to_chat(loc, "You prepare to extend a tentacle.") @@ -223,6 +233,7 @@ parent_action.UnregisterSignal(parent_action.owner, COMSIG_MOB_WILLINGLY_DROP) parent_action.UnregisterSignal(parent_action.owner, COMSIG_MOB_WEAPON_APPEARS) parent_action = null + playsound(loc, 'sound/effects/bone_break_2.ogg', 100, TRUE) return ..() /obj/item/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj) @@ -409,12 +420,14 @@ AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = ALL_ATTACK_TYPES) if(ismob(loc)) loc.visible_message("The end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!", "We inflate our hand into a strong shield.", "You hear organic matter ripping and tearing!") + playsound(loc, 'sound/effects/bone_break_1.ogg', 100, TRUE) /obj/item/shield/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(remaining_uses < 1) if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.visible_message("With a sickening crunch, [H] reforms [H.p_their()] shield into an arm!", "We assimilate our shield into our body", "[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!", "We harden our flesh, creating a suit of armor!", "You hear organic matter ripping and tearing!") + playsound(loc, 'sound/effects/bone_break_1.ogg', 100, TRUE) /obj/item/clothing/suit/armor/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage) . = ..() diff --git a/code/modules/antagonists/changeling/powers/shriek.dm b/code/modules/antagonists/changeling/powers/shriek.dm index 0c2f393a4989..f0c843b0aab5 100644 --- a/code/modules/antagonists/changeling/powers/shriek.dm +++ b/code/modules/antagonists/changeling/powers/shriek.dm @@ -24,7 +24,7 @@ M.AdjustConfused(40 SECONDS) M.Jitter(100 SECONDS) else - SEND_SOUND(M, sound('sound/effects/screech.ogg')) + SEND_SOUND(M, sound('sound/effects/clingscream.ogg')) if(issilicon(M)) SEND_SOUND(M, sound('sound/weapons/flash.ogg')) diff --git a/code/modules/arcade/prize_datums.dm b/code/modules/arcade/prize_datums.dm index c7d027bf4d00..d24cd4aaf894 100644 --- a/code/modules/arcade/prize_datums.dm +++ b/code/modules/arcade/prize_datums.dm @@ -19,11 +19,11 @@ GLOBAL_DATUM_INIT(global_prizes, /datum/prizes, new()) if(prize_counter.tickets >= item.cost) new item.typepath(prize_counter.loc) prize_counter.tickets -= item.cost - prize_counter.visible_message("Enjoy your prize!") - return 1 + to_chat(usr, "Enjoy your prize!") + return TRUE else - prize_counter.visible_message("Not enough tickets!") - return 0 + to_chat(usr, "Not enough tickets!") + return FALSE ////////////////////////////////////// // prize_item datum // diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index 4a385be49a81..4bcce55dd21b 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -28,8 +28,6 @@ reconcile_air() return -GLOBAL_VAR_INIT(pipenetwarnings, 10) - /datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/base) var/volume = 0 if(istype(base, /obj/machinery/atmospherics/pipe)) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index 792e9d80fd43..5f6816fcf9ed 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -667,14 +667,7 @@ active_character.s_tone = 35 - max(min(round(new_s_tone), 220), 1) else if(S.bodyflags & HAS_ICON_SKIN_TONE) var/const/MAX_LINE_ENTRIES = 4 - var/prompt = "Choose your character's skin tone: 1-[S.icon_skin_tones.len]\n(" - for(var/i = 1 to S.icon_skin_tones.len) - if(i > MAX_LINE_ENTRIES && !((i - 1) % MAX_LINE_ENTRIES)) - prompt += "\n" - prompt += "[i] = [S.icon_skin_tones[i]]" - if(i != S.icon_skin_tones.len) - prompt += ", " - prompt += ")" + var/prompt = "Choose your character's skin tone: 1-[length(S.icon_skin_tones)]\n(Light to Dark)" var/skin_c = input(user, prompt, "Character Preference") as num|null if(isnum(skin_c)) active_character.s_tone = max(min(round(skin_c), S.icon_skin_tones.len), 1) diff --git a/code/modules/client/preference/loadout/gear_tweaks.dm b/code/modules/client/preference/loadout/gear_tweaks.dm index d462cc1f342d..2dbda39a9268 100644 --- a/code/modules/client/preference/loadout/gear_tweaks.dm +++ b/code/modules/client/preference/loadout/gear_tweaks.dm @@ -16,7 +16,6 @@ /* * Color adjustment */ -GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new()) /datum/gear_tweak/color var/list/valid_colors diff --git a/code/modules/client/preference/loadout/loadout_general.dm b/code/modules/client/preference/loadout/loadout_general.dm index a6ae08ea13e5..f9fe14a95703 100644 --- a/code/modules/client/preference/loadout/loadout_general.dm +++ b/code/modules/client/preference/loadout/loadout_general.dm @@ -93,40 +93,6 @@ display_name = "Shark plushie" path = /obj/item/toy/plushie/shark -/datum/gear/goggles - display_name = "Goggles" - path = /obj/item/clothing/glasses/goggles - -/datum/gear/sechud - display_name = "Classic security HUD" - path = /obj/item/clothing/glasses/hud/security - allowed_roles = list("Head of Security", "Warden", "Security Officer", "Internal Affairs Agent","Magistrate") - -/datum/gear/sechudgoggles - display_name = "Security HUD goggles" - path = /obj/item/clothing/glasses/hud/security/goggles - allowed_roles = list("Head of Security", "Warden", "Security Officer", "Internal Affairs Agent", "Magistrate") - -/datum/gear/medhudgoggles - display_name = "Health HUD goggles" - path = /obj/item/clothing/glasses/hud/health/goggles - allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Coroner", "Chemist", "Geneticist", "Virologist", "Psychiatrist", "Paramedic") - -/datum/gear/diaghudgoggles - display_name = "Diagnostic HUD goggles" - path = /obj/item/clothing/glasses/hud/diagnostic/goggles - allowed_roles = list("Research Director", "Scientist", "Roboticist") - -/datum/gear/hydrohudgoggles - display_name = "Hydroponic HUD goggles" - path = /obj/item/clothing/glasses/hud/hydroponic/goggles - allowed_roles = list("Botanist") - -/datum/gear/skillhudgoggles - display_name = "Skill HUD goggles" - path = /obj/item/clothing/glasses/hud/skills/goggles - allowed_roles = list("Psychiatrist", "Nanotrasen Representative", "Head of Personnel", "Captain") - /datum/gear/cryaonbox display_name = "Box of crayons" path = /obj/item/storage/fancy/crayons diff --git a/code/modules/client/preference/loadout/loadout_glasses.dm b/code/modules/client/preference/loadout/loadout_glasses.dm index 1eec9f19af36..c6188f314642 100644 --- a/code/modules/client/preference/loadout/loadout_glasses.dm +++ b/code/modules/client/preference/loadout/loadout_glasses.dm @@ -35,3 +35,41 @@ /datum/gear/glasses/prescription display_name = "Prescription glasses" path = /obj/item/clothing/glasses/regular + +/datum/gear/glasses/sechud + display_name = "Classic security HUD" + path = /obj/item/clothing/glasses/hud/security + allowed_roles = list("Head of Security", "Warden", "Security Officer", "Internal Affairs Agent","Magistrate") + +/datum/gear/glasses/goggles + display_name = "Goggles" + path = /obj/item/clothing/glasses/goggles + +/datum/gear/glasses/goggles_job + main_typepath = /datum/gear/glasses/goggles_job + subtype_selection_cost = FALSE + +/datum/gear/glasses/goggles_job/sechudgoggles + display_name = "Security HUD goggles" + path = /obj/item/clothing/glasses/hud/security/goggles + allowed_roles = list("Head of Security", "Warden", "Security Officer", "Internal Affairs Agent", "Magistrate") + +/datum/gear/glasses/goggles_job/medhudgoggles + display_name = "Health HUD goggles" + path = /obj/item/clothing/glasses/hud/health/goggles + allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Coroner", "Chemist", "Geneticist", "Virologist", "Psychiatrist", "Paramedic") + +/datum/gear/glasses/goggles_job/diaghudgoggles + display_name = "Diagnostic HUD goggles" + path = /obj/item/clothing/glasses/hud/diagnostic/goggles + allowed_roles = list("Research Director", "Scientist", "Roboticist") + +/datum/gear/glasses/goggles_job/hydrohudgoggles + display_name = "Hydroponic HUD goggles" + path = /obj/item/clothing/glasses/hud/hydroponic/goggles + allowed_roles = list("Botanist") + +/datum/gear/glasses/goggles_job/skillhudgoggles + display_name = "Skill HUD goggles" + path = /obj/item/clothing/glasses/hud/skills/goggles + allowed_roles = list("Psychiatrist", "Nanotrasen Representative", "Head of Personnel", "Captain") diff --git a/code/modules/client/preference/loadout/loadout_hat.dm b/code/modules/client/preference/loadout/loadout_hat.dm index 06929b6311ed..828e88d0992b 100644 --- a/code/modules/client/preference/loadout/loadout_hat.dm +++ b/code/modules/client/preference/loadout/loadout_hat.dm @@ -179,7 +179,7 @@ /datum/gear/hat/beret_job/hop display_name = "Beret, head of personnel" - path = /obj/item/clothing/head/hopcap/beret + path = /obj/item/clothing/head/hop/beret allowed_roles = list("Head of Personnel") /datum/gear/hat/beret_job/sci diff --git a/code/modules/client/preference/loadout/loadout_racial.dm b/code/modules/client/preference/loadout/loadout_racial.dm index d8a669572b74..ba6ed7bec30b 100644 --- a/code/modules/client/preference/loadout/loadout_racial.dm +++ b/code/modules/client/preference/loadout/loadout_racial.dm @@ -59,6 +59,11 @@ path = /obj/item/clothing/shoes/footwraps slot = SLOT_HUD_SHOES +/datum/gear/racial/handwraps + display_name = "Cloth handwraps" + path = /obj/item/clothing/gloves/handwraps + slot = SLOT_HUD_GLOVES + /datum/gear/racial/vox_casual display_name = "Vox jumpsuit" description = "These loose clothes are optimized for the labors of the lower castes onboard the arkships. Large openings in the top allow for breathability while the pants are durable yet flexible enough to not restrict movement." diff --git a/code/modules/client/preference/loadout/loadout_suit.dm b/code/modules/client/preference/loadout/loadout_suit.dm index 6de3e2dd9fee..9c01e17cac97 100644 --- a/code/modules/client/preference/loadout/loadout_suit.dm +++ b/code/modules/client/preference/loadout/loadout_suit.dm @@ -251,7 +251,7 @@ /datum/gear/suit/mantle/job/hop display_name = "Mantle, head of personnel" - path = /obj/item/clothing/suit/mantle/armor/head_of_personnel + path = /obj/item/clothing/suit/mantle/armor/hop allowed_roles = list("Head of Personnel") /datum/gear/suit/mantle/job/rd diff --git a/code/modules/client/preference/loadout/loadout_uniform.dm b/code/modules/client/preference/loadout/loadout_uniform.dm index 0de18c3d4b03..b377d517e2bd 100644 --- a/code/modules/client/preference/loadout/loadout_uniform.dm +++ b/code/modules/client/preference/loadout/loadout_uniform.dm @@ -203,6 +203,11 @@ path = /obj/item/clothing/under/rank/security/head_of_security/skirt allowed_roles = list("Head of Security") +/datum/gear/uniform/skirt/job/head_of_personnel + display_name = "Skirt, hop" + path = /obj/item/clothing/under/rank/civilian/hop/skirt + allowed_roles = list("Head of Personnel") + /datum/gear/uniform/skirt/job/magistrate display_name = "Skirt, magistrate" path = /obj/item/clothing/under/rank/procedure/magistrate/skirt diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 5501bbdce796..3ec58f7a7691 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -391,6 +391,11 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "Socks: [active_character.socks]
" dat += "Backpack Type: [active_character.backbag]
" + var/datum/species/myspecies = GLOB.all_species[active_character.species] + if(!isnull(myspecies)) + dat += "

Species Information

" + dat += "
Species Description: [myspecies.blurb]
" + dat += "" if(TAB_GAME) // General Preferences diff --git a/code/modules/client/preference/preferences_spawnpoints.dm b/code/modules/client/preference/preferences_spawnpoints.dm deleted file mode 100644 index 0fd960e9ff82..000000000000 --- a/code/modules/client/preference/preferences_spawnpoints.dm +++ /dev/null @@ -1,20 +0,0 @@ -GLOBAL_LIST_EMPTY(spawntypes) - -/proc/populate_spawn_points() - // GLOB.spawntypes = list() | This is already done, is it not - for(var/type in subtypesof(/datum/spawnpoint)) - var/datum/spawnpoint/S = new type() - GLOB.spawntypes[S.display_name] = S - -/datum/spawnpoint - var/msg //Message to display on the arrivals computer. - var/list/turfs //List of turfs to spawn on. - var/display_name //Name used in preference setup. - -/datum/spawnpoint/arrivals - display_name = "Arrivals Shuttle" - msg = "has arrived on the station" - -/datum/spawnpoint/arrivals/New() - ..() - turfs = GLOB.latejoin diff --git a/code/modules/clothing/gloves/misc_gloves.dm b/code/modules/clothing/gloves/misc_gloves.dm index 48f789ba8dc8..8ccbd2546f86 100644 --- a/code/modules/clothing/gloves/misc_gloves.dm +++ b/code/modules/clothing/gloves/misc_gloves.dm @@ -80,6 +80,14 @@ resistance_flags = NONE armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 115, ACID = 20) +/obj/item/clothing/gloves/handwraps + name = "cloth handwraps" + desc = "A roll of treated canvas used for wrapping claws or paws." + icon_state = "clothwrap" + item_state = "clothwrap" + transfer_prints = TRUE + clipped = TRUE + /obj/item/clothing/gloves/batmangloves name = "batgloves" desc = "Used for handling all things bat related." diff --git a/code/modules/clothing/head/job_hats.dm b/code/modules/clothing/head/job_hats.dm index 5761dfdcbeff..3641624520c1 100644 --- a/code/modules/clothing/head/job_hats.dm +++ b/code/modules/clothing/head/job_hats.dm @@ -50,17 +50,23 @@ icon_state = "captain_beret_white" //Head of Personnel -/obj/item/clothing/head/hopcap +/obj/item/clothing/head/hop name = "head of personnel's cap" icon_state = "hopcap" desc = "The symbol of true bureaucratic micromanagement." armor = list(MELEE = 15, BULLET = 10, LASER = 15, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50) dog_fashion = /datum/dog_fashion/head/hop + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/head.dmi', + "Drask" = 'icons/mob/clothing/species/drask/head.dmi', + "Grey" = 'icons/mob/clothing/species/grey/head.dmi' + ) -/obj/item/clothing/head/hopcap/beret +/obj/item/clothing/head/hop/beret name = "head of personnel's beret" desc = "For doing paperwork with style." - icon_state = "hop_beret" + icon_state = "beret_hop" + dog_fashion = /datum/dog_fashion/head/hop sprite_sheets = list( "Vox" = 'icons/mob/clothing/species/vox/head.dmi', "Drask" = 'icons/mob/clothing/species/drask/head.dmi', diff --git a/code/modules/clothing/shoes/misc_shoes.dm b/code/modules/clothing/shoes/misc_shoes.dm index 21ff3ad54fe3..c53a3982043d 100644 --- a/code/modules/clothing/shoes/misc_shoes.dm +++ b/code/modules/clothing/shoes/misc_shoes.dm @@ -134,6 +134,8 @@ /obj/item/clothing/shoes/clown_shoes/slippers/proc/slide_one(mob/living/user, progress, prev_dir , prev_flags) user.dir = prev_dir step(user, user.dir) + for(var/mob/living/carbon/crossed in user.loc) + crossed.slip(src, 16 SECONDS, 0, FALSE, TRUE, "trip") if(progress == slide_distance) user.stand_up() user.pass_flags = prev_flags diff --git a/code/modules/clothing/suits/job_suits.dm b/code/modules/clothing/suits/job_suits.dm index 0984dc2c3478..81da15db9d6e 100644 --- a/code/modules/clothing/suits/job_suits.dm +++ b/code/modules/clothing/suits/job_suits.dm @@ -259,13 +259,26 @@ resistance_flags = NONE //Head of Personnel -/obj/item/clothing/suit/mantle/armor/head_of_personnel +/obj/item/clothing/suit/mantle/armor/hop name = "head of personnel's shawl" desc = "An armored shawl for the head of personnel. It's remarkably well kept." icon_state = "hopmantle" item_state = "hopmantle" armor = list(MELEE = 15, BULLET = 10, LASER = 15, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50) +/obj/item/clothing/suit/hopcoat + name = "head of personnel's coat" + desc = "A big coat for the Head of Personnel who wants to make a fashion statement. Has armour woven within the fabric." + icon_state = "hopcoat" + item_state = "hopcoat" + armor = list(MELEE = 15, BULLET = 10, LASER = 15, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50) + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/suit.dmi', + "Drask" = 'icons/mob/clothing/species/drask/suit.dmi', + "Grey" = 'icons/mob/clothing/species/grey/suit.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/suit.dmi' + ) + //Dignitaries /obj/item/clothing/suit/storage/ntrep name = "\improper Nanotrasen Representative jacket" diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index ad4d59225f1d..3c91205d81ec 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -5,42 +5,48 @@ "Human" = 'icons/mob/clothing/under/civilian.dmi', "Vox" = 'icons/mob/clothing/species/vox/under/civilian.dmi', "Drask" = 'icons/mob/clothing/species/drask/under/civilian.dmi', - "Grey" = 'icons/mob/clothing/species/grey/under/civilian.dmi' + "Grey" = 'icons/mob/clothing/species/grey/under/civilian.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/under/civilian.dmi' ) -/obj/item/clothing/under/rank/civilian/head_of_personnel - desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"." +/obj/item/clothing/under/rank/civilian/hop name = "head of personnel's jumpsuit" + desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"." icon_state = "hop" - item_state = "b_suit" item_color = "hop" -/obj/item/clothing/under/rank/civilian/head_of_personnel/dress +/obj/item/clothing/under/rank/civilian/hop/skirt + name = "head of personnel's jumpskirt" + desc = "It's a jumpskirt worn by someone who works in the position of \"Head of Personnel\"." + icon_state = "hop_skirt" + item_color = "hop_skirt" + +/obj/item/clothing/under/rank/civilian/hop/dress name = "head of personnel's dress uniform" desc = "Feminine fashion for the style conscious Head of Personnel." - icon_state = "dress_hop" - item_color = "dress_hop" + icon_state = "hop_dress" + item_color = "hop_dress" -/obj/item/clothing/under/rank/civilian/head_of_personnel_whimsy - desc = "A blue jacket and red tie, with matching red cuffs! Snazzy. Wearing this makes you feel more important than your job title does." +/obj/item/clothing/under/rank/civilian/hop/formal + name = "head of personnel's formal uniform" + desc = "A stylish choice for a formal occasion." + icon_state = "hop_formal" + item_color = "hop_formal" + +/obj/item/clothing/under/rank/civilian/hop/whimsy name = "head of personnel's suit" - icon_state = "hopwhimsy" - item_state = "hopwhimsy" - item_color = "hopwhimsy" + desc = "A blue sweater and red tie, with matching red cuffs! Snazzy. Wearing this makes you feel more important than your job title does." + icon_state = "hop_whimsy" + item_state = "hop_whimsy" + item_color = "hop_whimsy" -/obj/item/clothing/under/rank/civilian/head_of_personnel/oldman +/obj/item/clothing/under/rank/civilian/hop/oldman name = "old man's suit" desc = "A classic suit for the older gentleman with built in back support." icon_state = "oldman" item_state = "oldman" item_color = "oldman" -/obj/item/clothing/under/rank/civilian/head_of_personnel/dress_hr - name = "human resources director's uniform" - desc = "Superior class for the nosy H.R. Director." - icon_state = "huresource" - item_color = "huresource" - /obj/item/clothing/under/rank/civilian/bartender desc = "It looks like it could use some more flair." name = "bartender's uniform" diff --git a/code/modules/events/blob/blob_structures/blob_core.dm b/code/modules/events/blob/blob_structures/blob_core.dm index d31be32c6c7a..4d1f4f8a784b 100644 --- a/code/modules/events/blob/blob_structures/blob_core.dm +++ b/code/modules/events/blob/blob_structures/blob_core.dm @@ -14,7 +14,6 @@ /obj/structure/blob/core/Initialize(mapload, client/new_overmind = null, new_rate = 2, offspring) . = ..() - GLOB.blob_cores += src START_PROCESSING(SSobj, src) GLOB.poi_list |= src adjustcolors(color) //so it atleast appears @@ -38,7 +37,6 @@ /obj/structure/blob/core/Destroy() - GLOB.blob_cores -= src if(overmind) overmind.blob_core = null overmind = null diff --git a/code/modules/events/blob/theblob.dm b/code/modules/events/blob/theblob.dm index 5fa597f3d280..5faa9464cae1 100644 --- a/code/modules/events/blob/theblob.dm +++ b/code/modules/events/blob/theblob.dm @@ -1,7 +1,6 @@ //I will need to recode parts of this but I am way too tired atm GLOBAL_LIST_EMPTY(blobs) -GLOBAL_LIST_EMPTY(blob_cores) GLOBAL_LIST_EMPTY(blob_nodes) /obj/structure/blob diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index cfe58e22ba6d..bcdee1f840ea 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -1,5 +1,3 @@ -GLOBAL_VAR_INIT(sent_spiders_to_station, 0) - /datum/event/spider_infestation announceWhen = 400 var/spawncount = 1 @@ -8,7 +6,6 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0) /datum/event/spider_infestation/setup() announceWhen = rand(announceWhen, announceWhen + 50) spawncount = round(num_players() * 0.8) - GLOB.sent_spiders_to_station = 1 /datum/event/spider_infestation/announce(false_alarm) if(successSpawn || false_alarm) diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm b/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm index 2717379ec4db..5f13f5938929 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm @@ -56,7 +56,7 @@ There is no excuse to do this wrong now that there is an example for you. --Fals description = "Creamy, smooth flavor, just like the bald heads of the masses. Supposedly aged for 30 years." ingredients = list(/obj/item/reagent_containers/food/drinks/cans/cola, /obj/item/reagent_containers/food/snacks/grown/sugarcane, - /obj/item/reagent_containers/food/snacks/icecream) + /obj/item/reagent_containers/food/snacks/frozen/icecream) result = "blackeye_brew" /datum/bottler_recipe/Grape_Granade diff --git a/code/modules/food_and_drinks/food/foods/desserts.dm b/code/modules/food_and_drinks/food/foods/desserts.dm index efb685f45f10..692c8c06208b 100644 --- a/code/modules/food_and_drinks/food/foods/desserts.dm +++ b/code/modules/food_and_drinks/food/foods/desserts.dm @@ -1,60 +1,3 @@ - -////////////////////// -// Ice Cream // -////////////////////// - -/obj/item/reagent_containers/food/snacks/icecream - name = "ice cream" - desc = "Delicious ice cream." - icon = 'icons/obj/kitchen.dmi' - icon_state = "icecream_cone" - bitesize = 3 - list_reagents = list("nutriment" = 1, "sugar" = 1) - tastes = list("ice cream" = 1) - -/obj/item/reagent_containers/food/snacks/icecream/Initialize(mapload) - . = ..() - update_icon(UPDATE_OVERLAYS) - -/obj/item/reagent_containers/food/snacks/icecream/update_overlays() - . = ..() - var/mutable_appearance/filling = mutable_appearance('icons/obj/kitchen.dmi', "icecream_color") - var/list/reagent_colors = rgb2num(mix_color_from_reagents(reagents.reagent_list), COLORSPACE_HSV) //switching to HSV colorspace lets us easily manipulate the saturation and brightness independently - //Clamping the brightness keeps us from having greyish ice cream while still alowing for a range of colours - filling.color = rgb(reagent_colors[1], ((1.5 * reagent_colors[2]) - 10), (clamp(reagent_colors[3], 85, 100) - 10), space = COLORSPACE_HSV) - . += filling - -/obj/item/reagent_containers/food/snacks/icecream/icecreamcone - name = "ice cream cone" - desc = "Delicious ice cream." - icon_state = "icecream_cone" - volume = 50 - bitesize = 3 - list_reagents = list("nutriment" = 3, "sugar" = 7, "ice" = 2) - -/obj/item/reagent_containers/food/snacks/icecream/wafflecone - name = "ice cream in a waffle cone" - desc = "Delicious ice cream." - icon_state = "icecream_cone_waffle" - volume = 50 - bitesize = 3 - list_reagents = list("nutriment" = 3, "sugar" = 7, "ice" = 2) - -/obj/item/reagent_containers/food/snacks/icecream/icecreamcup - name = "chocolate ice cream cone" - desc = "Delicious ice cream." - icon_state = "icecream_cone_chocolate" - volume = 50 - bitesize = 3 - list_reagents = list("nutriment" = 5, "chocolate" = 8, "ice" = 2) - -/obj/item/reagent_containers/food/snacks/icecreamsandwich - name = "icecream sandwich" - desc = "Portable ice cream in its own packaging." - icon_state = "icecreamsandwich" - list_reagents = list("nutriment" = 2, "ice" = 2) - - ////////////////////// // Misc // ////////////////////// diff --git a/code/modules/food_and_drinks/food/foods/frozen.dm b/code/modules/food_and_drinks/food/foods/frozen.dm new file mode 100644 index 000000000000..d9c790827b77 --- /dev/null +++ b/code/modules/food_and_drinks/food/foods/frozen.dm @@ -0,0 +1,335 @@ + +////////////////////////////// +// Frozen Treats // +////////////////////////////// + +//Abstract item for inheritence. + +/obj/item/reagent_containers/food/snacks/frozen + name = "frozen treat" + desc = "If you got this, something broke! Contact a coder if this somehow spawns." + icon = 'icons/obj/food/frozen_treats.dmi' + icon_state = "flavorless_sc" + +/obj/item/reagent_containers/food/snacks/sliceable/clowncake + name = "clown cake" + desc = "A funny cake with a clown face on it." + icon = 'icons/obj/food/frozen_treats.dmi' + icon_state = "clowncake" + slice_path = /obj/item/reagent_containers/food/snacks/frozen/clowncakeslice + list_reagents = list("nutriment" = 20, "sugar" = 5, "vitamin" = 5, "banana" = 15) + tastes = list("cake" = 5, "sweetness" = 2, "carrot" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/clowncakeslice + name = "clown cake slice" + desc = "A slice of bad jokes, and silly props." + icon_state = "clowncake_slice" + trash = /obj/item/trash/plate + filling_color = "#FFD675" + list_reagents = list("nutriment" = 4, "sugar" = 1, "vitamin" = 1, "banana" = 3) + tastes = list("cake" = 5, "sweetness" = 2, "sad clowns" = 1, "ice-cream" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/sundae + name = "sundae" + desc = "Portable ice cream in its own packaging." + icon_state = "sundae" + list_reagents = list("nutriment" = 2, "ice" = 2) + tastes = list("ice cream" = 1, "banana" = 1) + +/////////////////// +// Ice Cream // +////////////////// + +/obj/item/reagent_containers/food/snacks/frozen/icecream + name = "ice cream" + desc = "Delicious ice cream." + icon_state = "icecream_cone" + bitesize = 3 + list_reagents = list("nutriment" = 1, "sugar" = 1) + tastes = list("ice cream" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/icecream/Initialize(mapload) + . = ..() + update_icon(UPDATE_OVERLAYS) + +/obj/item/reagent_containers/food/snacks/frozen/icecream/update_overlays() + . = ..() + var/mutable_appearance/filling = mutable_appearance('icons/obj/food/frozen_treats.dmi', "icecream_color") + var/list/reagent_colors = rgb2num(mix_color_from_reagents(reagents.reagent_list), COLORSPACE_HSV) //switching to HSV colorspace lets us easily manipulate the saturation and brightness independently + //Clamping the brightness keeps us from having greyish ice cream while still alowing for a range of colours + filling.color = rgb(reagent_colors[1], ((1.5 * reagent_colors[2]) - 10), (clamp(reagent_colors[3], 85, 100) - 10), space = COLORSPACE_HSV) + . += filling + +/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcone + name = "ice cream cone" + desc = "Delicious ice cream." + icon_state = "icecream_cone" + volume = 50 + bitesize = 3 + list_reagents = list("nutriment" = 3, "sugar" = 7, "ice" = 2) + +/obj/item/reagent_containers/food/snacks/frozen/icecream/wafflecone + name = "ice cream in a waffle cone" + desc = "Delicious ice cream." + icon_state = "icecream_cone_waffle" + volume = 50 + bitesize = 3 + list_reagents = list("nutriment" = 3, "sugar" = 7, "ice" = 2) + +/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcup + name = "chocolate ice cream cone" + desc = "Delicious ice cream." + icon_state = "icecream_cone_chocolate" + volume = 50 + bitesize = 3 + list_reagents = list("nutriment" = 5, "chocolate" = 8, "ice" = 2) + +/obj/item/reagent_containers/food/snacks/wafflecone + name = "waffle cone" + desc = "Delicious waffle cone, but no ice cream." + icon = 'icons/obj/food/frozen_treats.dmi' + icon_state = "icecream_cone_waffle" + list_reagents = list("nutriment" = 5) + tastes = list("cream" = 2, "waffle" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/icecreamsandwich + name = "icecream sandwich" + desc = "Portable ice cream in its own packaging." + icon_state = "icecreamsandwich" + list_reagents = list("nutriment" = 2, "ice" = 2) + tastes = list("ice cream" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/berryicecreamsandwich + name = "strawberry icecream sandwich" + desc = "Portable ice cream in its own packaging." + icon_state = "strawberryicecreamsandwich" + list_reagents = list("nutriment" = 2, "ice" = 2) + tastes = list("ice cream" = 1, "strawberry" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/sundae + name = "sundae" + desc = "A classic dessert." + icon_state = "sundae" + list_reagents = list("nutriment" = 6, "banana" = 5, "vitamin" = 2) + tastes = list("ice cream" = 1, "banana" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/honkdae + name = "honkdae" + desc = "The clown's favorite dessert." + icon_state = "honkdae" + list_reagents = list("nutriment" = 6, "banana" = 10, "vitamin" = 4) + tastes = list("ice cream" = 1, "banana" = 1, "a bad joke" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/cornuto + name = "cornuto" + desc = "A neapolitan vanilla and chocolate ice cream cone. It menaces with a sprinkling of caramelized nuts." + icon_state = "cornuto" + list_reagents = list("nutriment" = 6, "hot_coco" = 4, "cream" = 2, "vanilla" = 4, "sugar" = 2) + tastes = list("chopped hazelnuts" = 3, "waffle" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/peanutbuttermochi + name = "peanut butter ice cream mochi" + desc = "A classic dessert at the Arabia Street Night Market in Prospect, peanut butter ice cream mochi is made with a peanut-butter flavoured ice cream as the main filling, and coated in crushed peanuts in the Taiwanese tradition." + icon_state = "pb_ice_cream_mochi" + list_reagents = list("nutriment" = 4, "sugar" = 6, "peanutbutter" = 4, "milk" = 2) + tastes = list("peanut butter" = 1, "mochi" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/spacefreezy + name = "spacefreezy" + desc = "The best ice cream in space." + icon_state = "spacefreezy" + list_reagents = list("nutriment" = 8, "vitamin" = 5, "bluecherryjelly" = 5) + tastes = list("blue cherries" = 2, "ice cream" = 2) + +/////////////////// +// Snow Cones // +////////////////// + +/obj/item/reagent_containers/food/snacks/frozen/snowcone + name = "flavorless snowcone" + desc = "It's just shaved ice. Still fun to chew on." + icon_state = "flavorless_sc" + trash = /obj/item/reagent_containers/food/drinks/sillycup + list_reagents = list("water" = 10, "ice" = 5) + tastes = list("cold water" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/apple + name = "apple snowcone" + desc = "Apple syrup drizzled over a snowball in a paper cup." + icon_state = "amber_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "applejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "apples" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/berry + name = "berry snowcone" + desc = "Berry syrup drizzled over a snowball in a paper cup." + icon_state = "berry_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "berryjuice" = 5) + tastes = list("ice" = 1, "water" = 1, "berries" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/bluecherry + name = "bluecherry snowcone" + desc = "Bluecherry syrup drizzled over a snowball in a paper cup, how rare!" + icon_state = "blue_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "bluecherryjelly" = 5) + tastes = list("ice" = 1, "water" = 1, "bluecherries" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/cherry + name = "cherry snowcone" + desc = "Cherry syrup drizzled over a snowball in a paper cup." + icon_state = "red_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "cherryjelly" = 5) + tastes = list("ice" = 1, "water" = 1, "cherries" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/fruitsalad + name = "fruit salad snowcone" + desc = "A delightful mix of citrus syrups drizzled over a snowball in a paper cup." + icon_state = "fruitsalad_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "limejuice" = 5, "lemonjuice" = 5, "orangejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "oranges" = 5, "lemons" = 5, "limes" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/grape + name = "grape snowcone" + desc = "Grape syrup drizzled over a snowball in a paper cup." + icon_state = "grape_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "grapejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "grapes" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/honey + name = "honey snowcone" + desc = "Honey drizzled over a snowball in a paper cup." + icon_state = "amber_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "honey" = 5) + tastes = list("ice" = 1, "water" = 1, "honey" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/lemon + name = "lemon snowcone" + desc = "Lemon syrup drizzled over a snowball in a paper cup." + icon_state = "lemon_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "lemonjuice" = 5) + tastes = list("ice" = 1, "water" = 1, "lemons" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/lime + name = "lime snowcone" + desc = "Lime syrup drizzled over a snowball in a paper cup." + icon_state = "lime_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "limejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "limes" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/mime + name = "mime snowcone" + desc = "..." + icon_state = "mime_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "nothing" = 5) + tastes = list("ice" = 1, "water" = 1, "silence" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/orange + name = "orange snowcone" + desc = "Orange syrup drizzled over a snowball in a paper cup." + icon_state = "orange_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "orangejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "oranges" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/pineapple + name = "pineapple snowcone" + desc = "Pineapple syrup drizzled over a snowball in a paper cup." + icon_state = "pineapple_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "pineapplejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "pineapple" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/rainbow + name = "rainbow snowcone" + desc = "A very colorful snowball in a paper cup." + icon_state = "rainbow_sc" + list_reagents = list("water" = 10, "ice" = 5, "colorful_reagent" = 5) + tastes = list("ice" = 1, "water" = 1, "rainbows" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/cola + name = "space cola snowcone" + desc = "Space Cola drizzled over a snowball in a paper cup." + icon_state = "soda_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "cola" = 5) + tastes = list("ice" = 1, "water" = 1, "soda" = 5) + +/obj/item/reagent_containers/food/snacks/frozen/snowcone/spacemountain + name = "space mountain wind snowcone" + desc = "Space Mountain Wind drizzled over a snowball in a paper cup." + icon_state = "mountainwind_sc" + list_reagents = list("water" = 10, "ice" = 5, "nutriment" = 1, "spacemountainwind" = 5) + tastes = list("ice" = 1, "water" = 1, "mountain wind" = 5) + +/////////////////// +// Popsicles // +///////////////// + +/obj/item/reagent_containers/food/snacks/frozen/popsicle + name = "jumbo icecream" + desc = "A luxurious ice cream covered in rich chocolate. It seems smaller than you remember it being." + icon_state = "jumbo" + trash = /obj/item/trash/popsicle_stick + list_reagents = list("nutriment" = 4, "sugar" = 4, "chocolate" = 3) + tastes = list("ice cream" = 1, "chocolate" = 1, "vanilla" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/bananatop + name = "banana topsicle" + desc = "A frozen treat made from tofu and banana juice blended smooth, then frozen. Popular in rural Japan in the summer." + icon_state = "topsicle_banana" + list_reagents = list("vitamin" = 4, "sugar" = 6, "banana" = 4) + tastes = list("bananas" = 1, "tofu" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/berrytop + name = "berry topsicle" + desc = "A frozen treat made from tofu and berry juice blended smooth, then frozen. Supposedly a favourite of bears, but that makes no sense..." + icon_state = "topsicle_berry" + list_reagents = list("vitamin" = 4, "sugar" = 6, "berryjuice" = 4) + tastes = list("berries" = 1, "tofu" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/pineappletop + name = "pineapple topsicle" + desc = "A frozen treat made from tofu and pineapple juice blended smooth, then frozen. As seen on TV." + icon_state = "topsicle_pineapple" + list_reagents = list("vitamin" = 4, "sugar" = 6, "pineapplejuice" = 4) + tastes = list("pineapples" = 1, "tofu" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/licoricecream + name = "licorice creamsicle" + desc = "A salty licorice ice cream. A salty frozen treat." + icon_state = "licorice_creamsicle" + list_reagents = list("nutriment" = 4, "cream" = 2, "vanilla" = 1, "sugar" = 4, "salt" = 1) + tastes = list("salty licorice" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/orangecream + name = "orange creamsicle" + desc = "A classic orange creamsicle. A sunny frozen treat." + icon_state = "creamsicle_o" + list_reagents = list("orangejuice" = 4, "cream" = 2, "vanilla" = 2, "sugar" = 4) + tastes = list("ice cream" = 1, "oranges" = 1, "vanilla" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/berrycream + name = "berry creamsicle" + desc = "A vibrant berry creamsicle. A berry good frozen treat." + icon_state = "creamsicle_m" + list_reagents = list("berryjuice" = 4, "cream" = 2, "vanilla" = 2, "sugar" = 4) + tastes = list("ice cream" = 1, "berries" = 1, "vanilla" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/frozenpineapple + name = "frozen pineapple pop" + desc = "Few cultures love pineapple as much as the Martians, and this dessert proves that- frozen pineapple, on a stick, with just a little dunk of dark chocolate." + icon_state = "pineapple_pop" + list_reagents = list("pineapplejuice" = 4, "sugar" = 4, "nutriment" = 2, "vitamin" = 2) + tastes = list("cold pineapple" = 1, "chocolate" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/sea_salt + name = "sea salt ice-cream bar" + desc = "This sky-blue ice-cream bar is flavoured with only the finest imported sea salt. Salty... no, sweet!" + icon_state = "sea_salt_pop" + list_reagents = list("salt" = 1, "nutriment" = 2, "cream" = 2, "vanilla" = 2, "sugar"= 4,) + tastes = list("salt" = 1, "sweet" = 1) + +/obj/item/reagent_containers/food/snacks/frozen/popsicle/ant + name = "ant popsicle" + desc = "A colony of ants suspended in hardened sugar. Those things are dead, right?" + icon_state = "ant_pop" + trash = /obj/item/stack/rods + list_reagents = list("nutriment" = 1, "vitamin" = 1, "sugar" = 5, "ants" = 3,) + tastes = list("candy" = 1, "ants" = 2) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index d66fcbac0f23..f28d4f13e509 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -40,7 +40,7 @@ to_chat(user, "You add [I] to [src]") updateUsrDialog() return - if(istype(I, /obj/item/reagent_containers/food/snacks/icecream)) + if(istype(I, /obj/item/reagent_containers/food/snacks/frozen/icecream)) if(!I.reagents.has_reagent("sprinkles")) if(I.reagents.total_volume > 29) I.reagents.remove_any(1) @@ -147,7 +147,7 @@ else if(href_list["createchoco"]) var/name = generate_name(reagents.get_master_reagent_name()) name += " Chocolate Cone" - var/obj/item/reagent_containers/food/snacks/icecream/icecreamcup/C = new(loc) + var/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcup/C = new(loc) C.name = "[name]" C.pixel_x = rand(-8, 8) C.pixel_y = -16 @@ -159,7 +159,7 @@ else if(href_list["createcone"]) var/name = generate_name(reagents.get_master_reagent_name()) name += " Cone" - var/obj/item/reagent_containers/food/snacks/icecream/icecreamcone/C = new(loc) + var/obj/item/reagent_containers/food/snacks/frozen/icecream/icecreamcone/C = new(loc) C.name = "[name]" C.pixel_x = rand(-8, 8) C.pixel_y = -16 @@ -171,7 +171,7 @@ else if(href_list["createwaffle"]) var/name = generate_name(reagents.get_master_reagent_name()) name += " Waffle Cone" - var/obj/item/reagent_containers/food/snacks/icecream/wafflecone/C = new(loc) + var/obj/item/reagent_containers/food/snacks/frozen/icecream/wafflecone/C = new(loc) C.name = "[name]" C.pixel_x = rand(-8, 8) C.pixel_y = -16 diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index f268d02f21ee..6c6224bf572b 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -119,6 +119,10 @@ input = /obj/item/reagent_containers/food/snacks/grown/carrot output = /obj/item/reagent_containers/food/snacks/grown/carrot/wedges +/datum/food_processor_process/towercap + input = /obj/item/grown/log + output = /obj/item/popsicle_stick + ///////////////////////// ///END OBJECT RECIPIES/// ///////////////////////// diff --git a/code/modules/food_and_drinks/recipes/recipes_candy.dm b/code/modules/food_and_drinks/recipes/recipes_candy.dm index 0c6f3c67007e..2339acd3ffaa 100644 --- a/code/modules/food_and_drinks/recipes/recipes_candy.dm +++ b/code/modules/food_and_drinks/recipes/recipes_candy.dm @@ -83,6 +83,10 @@ being_cooked.reagents.del_reagent("egg") return being_cooked +/datum/recipe/candy/wafflecone + reagents = list("milk" = 1, "sugar" = 1) + result = /obj/item/reagent_containers/food/snacks/wafflecone + // *********************************************************** // Base Candy Recipes (unflavored / plain) // *********************************************************** diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 48ff01389ba5..112dcc6ca87a 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -1045,9 +1045,246 @@ /datum/recipe/microwave/icecreamsandwich reagents = list("ice" = 5, "cream" = 5) items = list( - /obj/item/reagent_containers/food/snacks/icecream, + /obj/item/reagent_containers/food/snacks/frozen/icecream, ) - result = /obj/item/reagent_containers/food/snacks/icecreamsandwich + result = /obj/item/reagent_containers/food/snacks/frozen/icecreamsandwich + +/datum/recipe/microwave/berryicecreamsandwich + reagents = list("ice" = 5, "cream" = 5) + items = list( + /obj/item/reagent_containers/food/snacks/grown/cherries, + /obj/item/reagent_containers/food/snacks/grown/cherries, + /obj/item/reagent_containers/food/snacks/wafflecone + ) + result = /obj/item/reagent_containers/food/snacks/frozen/berryicecreamsandwich + +/datum/recipe/microwave/sundae + reagents = list("cream" = 5) + items = list( + /obj/item/reagent_containers/food/snacks/wafflecone, + /obj/item/reagent_containers/food/snacks/grown/cherries, + /obj/item/reagent_containers/food/snacks/grown/banana + ) + result = /obj/item/reagent_containers/food/snacks/frozen/sundae + +/datum/recipe/microwave/bananatopsicle + reagents = list("sugar" = 5, "banana" = 5) + items = list( + /obj/item/popsicle_stick, + /obj/item/reagent_containers/food/snacks/tofu + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/bananatop + +/datum/recipe/microwave/berrytopsicle + reagents = list("sugar" = 5, "berryjuice" = 5) + items = list( + /obj/item/popsicle_stick, + /obj/item/reagent_containers/food/snacks/tofu + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/berrytop + +/datum/recipe/microwave/pineappletopsicle + reagents = list("sugar" = 5, "pineapplejuice" = 5) + items = list( + /obj/item/popsicle_stick, + /obj/item/reagent_containers/food/snacks/tofu + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/pineappletop + +/datum/recipe/microwave/licoricecreamsicle + reagents = list("sugar" = 2, "blumpkinjuice" = 4, "ice" = 2, "vanilla" = 2, "cream" = 2) + items = list( + /obj/item/popsicle_stick + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/licoricecream + +/datum/recipe/microwave/orangecreamsicle + reagents = list("sugar" = 2, "orangejuice" = 4, "ice" = 2, "vanilla" = 2, "cream" = 2) + items = list( + /obj/item/popsicle_stick + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/orangecream + +/datum/recipe/microwave/berrycreamsicle + reagents = list("sugar" = 2, "berryjuice" = 4, "ice" = 2, "vanilla" = 2, "cream" = 2) + items = list( + /obj/item/popsicle_stick + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/berrycream + +/datum/recipe/microwave/frozenpineapplepop + items = list( + /obj/item/popsicle_stick, + /obj/item/reagent_containers/food/snacks/pineappleslice, + /obj/item/reagent_containers/food/snacks/chocolatebar + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/frozenpineapple + +/datum/recipe/microwave/jumboicecream + reagents = list("sugar" = 2, "ice" = 2, "vanilla" = 3, "cream" = 2) + items = list( + /obj/item/popsicle_stick, + /obj/item/reagent_containers/food/snacks/chocolatebar + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle + +/datum/recipe/microwave/seasalticecream + reagents = list("sugar" = 5, "sodiumchloride" = 3, "cream" = 5) + items = list( + /obj/item/popsicle_stick + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/sea_salt + +/datum/recipe/microwave/cornuto + reagents = list("ice" = 2, "sugar" = 4, "cream" = 4) + items = list( + /obj/item/reagent_containers/food/snacks/sliceable/flatdough, + /obj/item/reagent_containers/food/snacks/chocolatebar + ) + result = /obj/item/reagent_containers/food/snacks/frozen/cornuto + +/datum/recipe/microwave/honkdae + reagents = list("cream" = 5, "ice" = 5) + items = list( + /obj/item/reagent_containers/food/snacks/wafflecone, + /obj/item/reagent_containers/food/snacks/grown/cherries, + /obj/item/reagent_containers/food/snacks/grown/banana, + /obj/item/reagent_containers/food/snacks/grown/banana, + /obj/item/clothing/mask/gas/clown_hat + ) + result = /obj/item/reagent_containers/food/snacks/frozen/honkdae + +/datum/recipe/microwave/peanutbuttermochi + reagents = list("cream" = 5, "rice" = 5, "sugar" = 5, "peanutbutter" = 2) + items = list( + /obj/item/reagent_containers/food/snacks/wafflecone + ) + result = /obj/item/reagent_containers/food/snacks/frozen/peanutbuttermochi + +/datum/recipe/microwave/spacefreezy + reagents = list("bluecherryjelly" = 5,"spacemountainwind" = 15) + items = list( + /obj/item/reagent_containers/food/snacks/frozen/icecream + ) + result = /obj/item/reagent_containers/food/snacks/frozen/spacefreezy + +/datum/recipe/microwave/snowcone/apple + reagents = list("ice" = 15, "applejuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/apple + +/datum/recipe/microwave/snowcone/berry + reagents = list("ice" = 15, "berryjuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/berry + +/datum/recipe/microwave/snowcone/bluecherry + reagents = list("ice" = 15, "bluecherryjelly" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/bluecherry +/datum/recipe/microwave/snowcone/cherry + reagents = list("ice" = 15, "cherryjelly" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/cherry + +/datum/recipe/microwave/snowcone/flavorless + reagents = list("ice" = 15) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone + +/datum/recipe/microwave/snowcone/fruitsalad + reagents = list("ice" = 15, "orangejuice" = 5, "limejuice" = 5, "lemonjuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/fruitsalad + +/datum/recipe/microwave/snowcone/grape + reagents = list("ice" = 15, "grapejuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/grape + +/datum/recipe/microwave/snowcone/honey + reagents = list("ice" = 15, "honey" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/honey + +/datum/recipe/microwave/snowcone/lemon + reagents = list("ice" = 15, "lemonjuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/lemon + +/datum/recipe/microwave/snowcone/lime + reagents = list("ice" = 15, "limejuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/lime + +/datum/recipe/microwave/snowcone/mime + reagents = list("ice" = 15, "nothing" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/mime + +/datum/recipe/microwave/snowcone/orange + reagents = list("ice" = 15, "orangejuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/orange + +/datum/recipe/microwave/snowcone/pineapple + reagents = list("ice" = 15, "pineapplejuice" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/pineapple + +/datum/recipe/microwave/snowcone/rainbow + reagents = list("ice" = 15, "colorful_reagent" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/rainbow + +/datum/recipe/microwave/snowcone/cola + reagents = list("ice" = 15, "cola" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/cola + +/datum/recipe/microwave/snowcone/spacemountainwind + reagents = list("ice" = 15, "spacemountainwind" = 5) + items = list( + /obj/item/reagent_containers/food/drinks/sillycup + ) + result = /obj/item/reagent_containers/food/snacks/frozen/snowcone/spacemountain + +/datum/recipe/microwave/antpopsicle + reagents = list("sugar" = 5, "water" = 5, "ants" = 10) + items = list( + /obj/item/popsicle_stick + ) + result = /obj/item/reagent_containers/food/snacks/frozen/popsicle/ant /datum/recipe/microwave/notasandwich items = list( diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index a95a6071b225..a06b87d8883c 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -109,6 +109,22 @@ ) result = /obj/item/reagent_containers/food/snacks/sliceable/plaincake +/datum/recipe/oven/clowncake + reagents = list("milk" = 5, "sugar" = 15) + items = list( + /obj/item/reagent_containers/food/snacks/dough, + /obj/item/reagent_containers/food/snacks/dough, + /obj/item/reagent_containers/food/snacks/dough, + /obj/item/reagent_containers/food/snacks/frozen/sundae, + /obj/item/reagent_containers/food/snacks/frozen/sundae, + /obj/item/reagent_containers/food/snacks/grown/banana, + /obj/item/reagent_containers/food/snacks/grown/banana, + /obj/item/reagent_containers/food/snacks/grown/banana, + /obj/item/reagent_containers/food/snacks/grown/banana, + /obj/item/reagent_containers/food/snacks/grown/banana + ) + result = /obj/item/reagent_containers/food/snacks/sliceable/clowncake + /datum/recipe/oven/meatpie items = list( /obj/item/reagent_containers/food/snacks/sliceable/flatdough, diff --git a/code/modules/mapping/base_map_datum.dm b/code/modules/mapping/base_map_datum.dm index 8b04d0ac1561..0fff760c7c05 100644 --- a/code/modules/mapping/base_map_datum.dm +++ b/code/modules/mapping/base_map_datum.dm @@ -16,3 +16,5 @@ var/webmap_url /// Is this map voteable? var/voteable = TRUE + /// Minimum amount of players required for this map to be eligible in random map picks. + var/min_players_random = 0 diff --git a/code/modules/mapping/cerestation.dm b/code/modules/mapping/cerestation.dm index 333378626b2e..684fa449547e 100644 --- a/code/modules/mapping/cerestation.dm +++ b/code/modules/mapping/cerestation.dm @@ -3,3 +3,4 @@ technical_name = "CereStation" map_path = "_maps/map_files/cerestation/cerestation.dmm" webmap_url = "https://affectedarc07.github.io/SS13WebMap/Paradise/CereStation/" + min_players_random = 60 diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 677194ab60f6..f86ae0347843 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -390,6 +390,7 @@ desc = "A dread talisman that can render you completely invulnerable." icon = 'icons/obj/lavaland/artefacts.dmi' icon_state = "talisman" + w_class = WEIGHT_CLASS_SMALL resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF actions_types = list(/datum/action/item_action/immortality) var/cooldown = 0 diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm similarity index 99% rename from code/modules/mob/living/carbon/brain/MMI.dm rename to code/modules/mob/living/brain/MMI.dm index 815821757ad6..9ed5f563c1e0 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -11,7 +11,7 @@ var/alien = 0 var/syndiemmi = FALSE //Whether or not this is a Syndicate MMI var/mmi_item_name = "Man-Machine Interface" //Used to name the item when installing a brain - var/mob/living/carbon/brain/brainmob = null//The current occupant. + var/mob/living/brain/brainmob = null//The current occupant. var/obj/item/organ/internal/brain/held_brain = null // This is so MMI's aren't brainscrubber 9000's var/mob/living/silicon/robot/robot = null//Appears unused. var/obj/mecha/mecha = null//This does not appear to be used outside of reference in mecha.dm. diff --git a/code/modules/mob/living/carbon/brain/MMI_radio.dm b/code/modules/mob/living/brain/MMI_radio.dm similarity index 100% rename from code/modules/mob/living/carbon/brain/MMI_radio.dm rename to code/modules/mob/living/brain/MMI_radio.dm diff --git a/code/modules/mob/living/carbon/brain/brain_death.dm b/code/modules/mob/living/brain/brain_death.dm similarity index 91% rename from code/modules/mob/living/carbon/brain/brain_death.dm rename to code/modules/mob/living/brain/brain_death.dm index 7aec0a713ee6..846425134c42 100644 --- a/code/modules/mob/living/carbon/brain/brain_death.dm +++ b/code/modules/mob/living/brain/brain_death.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/brain/death(gibbed) +/mob/living/brain/death(gibbed) // Only execute the below if we successfully died . = ..() if(!.) @@ -8,7 +8,7 @@ visible_message("[src]'s MMI flatlines!", "You hear something flatline.") mmi.icon_state = mmi.dead_icon -/mob/living/carbon/brain/gib() +/mob/living/brain/gib() // can we muster a parent call here? if(!death(TRUE) && stat != DEAD) return FALSE diff --git a/code/modules/mob/living/carbon/brain/brain_emote.dm b/code/modules/mob/living/brain/brain_emote.dm similarity index 67% rename from code/modules/mob/living/carbon/brain/brain_emote.dm rename to code/modules/mob/living/brain/brain_emote.dm index b9f1d720e0c9..13fcf0c4104e 100644 --- a/code/modules/mob/living/carbon/brain/brain_emote.dm +++ b/code/modules/mob/living/brain/brain_emote.dm @@ -1,13 +1,13 @@ /** * Emotes usable by brains, but only while they're in MMIs. */ -/datum/emote/living/carbon/brain - mob_type_allowed_typecache = list(/mob/living/carbon/brain) +/datum/emote/living/brain + mob_type_allowed_typecache = list(/mob/living/brain) mob_type_blacklist_typecache = null /// The message that will be displayed to themselves, since brains can't really see their own emotes var/self_message -/datum/emote/living/carbon/brain/run_emote(mob/user, params, type_override, intentional) +/datum/emote/living/brain/run_emote(mob/user, params, type_override, intentional) . = ..() if(!.) return FALSE @@ -15,52 +15,52 @@ if(self_message) to_chat(user, self_message) -/datum/emote/living/carbon/brain/can_run_emote(mob/user, status_check, intentional) +/datum/emote/living/brain/can_run_emote(mob/user, status_check, intentional) . = ..() if(!.) return FALSE - var/mob/living/carbon/brain/B = user + var/mob/living/brain/B = user if(!(B.container && istype(B.container, /obj/item/mmi))) // No MMI, no emotes return FALSE // So, brains can't really see their own emotes so we'll probably just want to send an extra message -/datum/emote/living/carbon/brain/alarm +/datum/emote/living/brain/alarm key = "alarm" key_third_person = "alarms" message = "sounds an alarm." self_message = "You sound an alarm." -/datum/emote/living/carbon/brain/alert +/datum/emote/living/brain/alert key = "alert" key_third_person = "alerts" message = "lets out a distressed noise." self_message = "You let out a distressed noise." -/datum/emote/living/carbon/brain/notice +/datum/emote/living/brain/notice key = "notice" message = "plays a loud tone." self_message = "You play a loud tone." -/datum/emote/living/carbon/brain/flash +/datum/emote/living/brain/flash key = "flash" message = "starts flashing its lights quickly!" -/datum/emote/living/carbon/brain/whistle +/datum/emote/living/brain/whistle key = "whistle" key_third_person = "whistles" message = "whistles." self_message = "You whistle." -/datum/emote/living/carbon/brain/beep +/datum/emote/living/brain/beep key = "beep" key_third_person = "beeps" message = "beeps." self_message = "You beep." -/datum/emote/living/carbon/brain/boop +/datum/emote/living/brain/boop key = "boop" key_third_person = "boops" message = "boops." diff --git a/code/modules/mob/living/brain/brain_life.dm b/code/modules/mob/living/brain/brain_life.dm new file mode 100644 index 000000000000..456e025f9d14 --- /dev/null +++ b/code/modules/mob/living/brain/brain_life.dm @@ -0,0 +1,5 @@ +/mob/living/brain/Life() + . = ..() + if(.) + if(!container && (world.time - timeofhostdeath) > GLOB.configuration.general.revival_brain_life) + death() diff --git a/code/modules/mob/living/brain/brain_login.dm b/code/modules/mob/living/brain/brain_login.dm new file mode 100644 index 000000000000..fc4c40c93ff7 --- /dev/null +++ b/code/modules/mob/living/brain/brain_login.dm @@ -0,0 +1,3 @@ +/mob/living/brain/Login() + ..() + SetSleeping(0) diff --git a/code/modules/mob/living/carbon/brain/brain_say.dm b/code/modules/mob/living/brain/brain_say.dm similarity index 84% rename from code/modules/mob/living/carbon/brain/brain_say.dm rename to code/modules/mob/living/brain/brain_say.dm index 40535dde96b7..d287a7360080 100644 --- a/code/modules/mob/living/carbon/brain/brain_say.dm +++ b/code/modules/mob/living/brain/brain_say.dm @@ -1,5 +1,5 @@ //TODO: Convert this over for languages. -/mob/living/carbon/brain/say(message, datum/language/speaking = null) +/mob/living/brain/say(message, datum/language/speaking = null) if(stat == DEAD) return ..() if(!can_speak(warning = TRUE)) @@ -13,13 +13,13 @@ ..(message) -/mob/living/carbon/brain/whisper(message as text) +/mob/living/brain/whisper(message as text) if(!can_speak(warning = TRUE)) return ..() -/mob/living/carbon/brain/can_speak(warning = FALSE) +/mob/living/brain/can_speak(warning = FALSE) . = ..() if(!istype(container, /obj/item/mmi)) @@ -31,7 +31,7 @@ to_chat(usr, "You cannot speak, as your internal speaker is turned off.") . = FALSE -/mob/living/carbon/brain/handle_message_mode(message_mode, list/message_pieces, verb, used_radios) +/mob/living/brain/handle_message_mode(message_mode, list/message_pieces, verb, used_radios) switch(message_mode) if("headset") var/radio_worked = 0 // If any of the radios our brainmob could use functioned, this is set true so that we don't use any others diff --git a/code/modules/mob/living/carbon/brain/brain_update_status.dm b/code/modules/mob/living/brain/brain_update_status.dm similarity index 89% rename from code/modules/mob/living/carbon/brain/brain_update_status.dm rename to code/modules/mob/living/brain/brain_update_status.dm index ec4edb77fc7b..269380e39529 100644 --- a/code/modules/mob/living/carbon/brain/brain_update_status.dm +++ b/code/modules/mob/living/brain/brain_update_status.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/brain/update_stat(reason = "none given") +/mob/living/brain/update_stat(reason = "none given") if(status_flags & GODMODE) return // if(health <= min_health) diff --git a/code/modules/mob/living/carbon/brain/carbon_brain.dm b/code/modules/mob/living/brain/living_brain.dm similarity index 75% rename from code/modules/mob/living/carbon/brain/carbon_brain.dm rename to code/modules/mob/living/brain/living_brain.dm index f216b88239eb..323309f0b372 100644 --- a/code/modules/mob/living/carbon/brain/carbon_brain.dm +++ b/code/modules/mob/living/brain/living_brain.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/brain +/mob/living/brain var/obj/item/container = null var/timeofhostdeath = 0 var/emp_damage = 0//Handles a type of MMI damage @@ -6,18 +6,18 @@ icon = 'icons/obj/surgery.dmi' icon_state = "brain1" -/mob/living/carbon/brain/New() +/mob/living/brain/New() ..() add_language("Galactic Common") -/mob/living/carbon/brain/Destroy() +/mob/living/brain/Destroy() if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting. if(stat!=DEAD) //If not dead. death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA ghostize() //Ghostize checks for key so nothing else is necessary. return ..() -/mob/living/carbon/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd +/mob/living/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd if(isAI(other)) if(!(container && istype(container, /obj/item/mmi))) return 0 @@ -44,16 +44,16 @@ return 1 return ..() -/mob/living/carbon/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up. +/mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up. return -/mob/living/carbon/brain/blob_act(obj/structure/blob/B) +/mob/living/brain/blob_act(obj/structure/blob/B) return -/mob/living/carbon/brain/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE) +/mob/living/brain/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE) return FALSE -/mob/living/carbon/brain/on_forcemove(atom/newloc) +/mob/living/brain/on_forcemove(atom/newloc) if(container) container.forceMove(newloc) else //something went very wrong. @@ -65,10 +65,10 @@ This will return true if the brain has a container that leaves it less helpless I'm using this for Stat to give it a more nifty interface to work with */ -/mob/living/carbon/brain/proc/has_synthetic_assistance() +/mob/living/brain/proc/has_synthetic_assistance() return (container && istype(container, /obj/item/mmi)) || in_contents_of(/obj/mecha) -/mob/living/carbon/brain/proc/get_race() +/mob/living/brain/proc/get_race() if(container) var/obj/item/mmi/M = container if(istype(M) && M.held_brain) @@ -79,7 +79,7 @@ I'm using this for Stat to give it a more nifty interface to work with var/obj/item/organ/internal/brain/B = loc return B.dna.species.name -/mob/living/carbon/brain/Stat() +/mob/living/brain/Stat() ..() if(has_synthetic_assistance() && statpanel("Status")) show_stat_emergency_shuttle_eta() @@ -88,13 +88,13 @@ I'm using this for Stat to give it a more nifty interface to work with stat("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]") stat("Exosuit Integrity", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%") -/mob/living/carbon/brain/can_safely_leave_loc() +/mob/living/brain/can_safely_leave_loc() return 0 //You're not supposed to be ethereal jaunting, brains -/mob/living/carbon/brain/can_hear() +/mob/living/brain/can_hear() . = TRUE -/mob/living/carbon/brain/update_runechat_msg_location() +/mob/living/brain/update_runechat_msg_location() if(ismecha(loc)) runechat_msg_location = loc.UID() else if(container) diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/brain/robotic_brain.dm similarity index 99% rename from code/modules/mob/living/carbon/brain/robotic_brain.dm rename to code/modules/mob/living/brain/robotic_brain.dm index c4fb75669173..c53285084c42 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/brain/robotic_brain.dm @@ -11,7 +11,7 @@ var/searching = FALSE var/askDelay = 10 * 60 * 1 - //var/mob/living/carbon/brain/brainmob = null + //var/mob/living/brain/brainmob = null var/list/ghost_volunteers[0] req_access = list(ACCESS_ROBOTICS) mecha = null//This does not appear to be used outside of reference in mecha.dm. diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_emote.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_emote.dm index 86182cae1e21..7e458de03620 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_emote.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_emote.dm @@ -9,7 +9,7 @@ key_third_person = "roars" message = "roars!" message_param = "roars at %t!" - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH sound = "sound/voice/hiss5.ogg" volume = 80 @@ -18,7 +18,7 @@ key_third_person = "hisses" message = "hisses!" message_param = "hisses at %t!" - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH sound = "sound/voice/hiss1.ogg" volume = 30 @@ -28,5 +28,5 @@ message = "gnarls and shows its teeth." message_param = "gnarls and flashes its teeth at %t." sound = "sound/voice/hiss4.ogg" - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH volume = 30 diff --git a/code/modules/mob/living/carbon/brain/brain_life.dm b/code/modules/mob/living/carbon/brain/brain_life.dm deleted file mode 100644 index 271524ad61d1..000000000000 --- a/code/modules/mob/living/carbon/brain/brain_life.dm +++ /dev/null @@ -1,20 +0,0 @@ -/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) - if(status_flags & GODMODE) - return - - if(exposed_temperature > bodytemperature) - var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) - adjustFireLoss(20.0*discomfort) - - else - var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) - adjustFireLoss(5.0*discomfort) - -/mob/living/carbon/brain/Life() - . = ..() - if(.) - if(!container && (world.time - timeofhostdeath) > GLOB.configuration.general.revival_brain_life) - death() - -/mob/living/carbon/brain/breathe() - return diff --git a/code/modules/mob/living/carbon/brain/brain_login.dm b/code/modules/mob/living/carbon/brain/brain_login.dm deleted file mode 100644 index 3e5f0e48365a..000000000000 --- a/code/modules/mob/living/carbon/brain/brain_login.dm +++ /dev/null @@ -1,3 +0,0 @@ -/mob/living/carbon/brain/Login() - ..() - SetSleeping(0) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1f4afda83b90..43bd1f413064 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -893,6 +893,10 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven buckled.user_unbuckle_mob(src, src) return + if(has_status_effect(STATUS_EFFECT_UNBUCKLE)) + to_chat(src, "You are already trying to unbuckle!") + return + apply_status_effect(STATUS_EFFECT_UNBUCKLE) var/time = I.breakouttime visible_message("[src] attempts to unbuckle [p_themselves()]!", "You attempt to unbuckle yourself... (This will take around [time / 10] seconds and you need to stay still.)") @@ -904,6 +908,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven return buckled.user_unbuckle_mob(src, src) + remove_status_effect(STATUS_EFFECT_UNBUCKLE) + /mob/living/carbon/proc/buckle_check() if(!buckled) // No longer buckled return TRUE @@ -947,15 +953,20 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven var/time = I.resist_time if(I.resist_time == 0)//if it's 0, you can't get out of it to_chat(src, "[I] is too well made, you'll need hands for this one!") - else - visible_message("[src] gnaws on [I], trying to remove it!") - to_chat(src, "You attempt to remove [I]... (This will take around [time/10] seconds and you need to stand still.)") - if(do_after(src, time, FALSE, src, extra_checks = list(CALLBACK(src, PROC_REF(muzzle_check))))) - visible_message("[src] removes [I]!") - to_chat(src, "You get rid of [I]!") - if(I.security_lock) - I.do_break() - unEquip(I) + return + if(has_status_effect(STATUS_EFFECT_REMOVE_MUZZLE)) + to_chat(src, "You are already trying to remove [I]!") + return + apply_status_effect(STATUS_EFFECT_REMOVE_MUZZLE) + visible_message("[src] gnaws on [I], trying to remove it!") + to_chat(src, "You attempt to remove [I]... (This will take around [time/10] seconds and you need to stand still.)") + if(do_after(src, time, FALSE, src, extra_checks = list(CALLBACK(src, PROC_REF(muzzle_check))))) + visible_message("[src] removes [I]!") + to_chat(src, "You get rid of [I]!") + if(I.security_lock) + I.do_break() + unEquip(I) + remove_status_effect(STATUS_EFFECT_REMOVE_MUZZLE) /mob/living/carbon/proc/cuff_resist(obj/item/I, breakouttime = 600, cuff_break = 0) @@ -963,9 +974,14 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven var/displaytime = breakouttime / 10 if(!cuff_break) + if(has_status_effect(STATUS_EFFECT_REMOVE_CUFFS)) + to_chat(src, "You are already trying to remove [I].") + return + apply_status_effect(STATUS_EFFECT_REMOVE_CUFFS) visible_message("[src] attempts to remove [I]!") to_chat(src, "You attempt to remove [I]... (This will take around [displaytime] seconds and you need to stand still.)") if(do_after(src, breakouttime, 0, target = src)) + remove_status_effect(STATUS_EFFECT_REMOVE_CUFFS) if(I.loc != src || buckled) return if(istype(I, /obj/item/restraints/handcuffs/twimsts)) @@ -1001,13 +1017,19 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven I.dropped(src) return else + remove_status_effect(STATUS_EFFECT_REMOVE_CUFFS) to_chat(src, "You fail to remove [I]!") else breakouttime = 50 + if(has_status_effect(STATUS_EFFECT_BREAK_CUFFS)) + to_chat(src, "You are already trying to break [I].") + return + apply_status_effect(STATUS_EFFECT_BREAK_CUFFS) visible_message("[src] is trying to break [I]!") to_chat(src, "You attempt to break [I]... (This will take around 5 seconds and you need to stand still.)") if(do_after(src, breakouttime, 0, target = src)) + remove_status_effect(STATUS_EFFECT_BREAK_CUFFS) if(!I.loc || buckled) return visible_message("[src] manages to break [I]!") @@ -1025,6 +1047,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven return return 1 else + remove_status_effect(STATUS_EFFECT_BREAK_CUFFS) to_chat(src, "You fail to break [I]!") //called when we get cuffed/uncuffed diff --git a/code/modules/mob/living/carbon/carbon_emote.dm b/code/modules/mob/living/carbon/carbon_emote.dm index 3fcba428c13d..64fb51f2abb2 100644 --- a/code/modules/mob/living/carbon/carbon_emote.dm +++ b/code/modules/mob/living/carbon/carbon_emote.dm @@ -1,6 +1,5 @@ /datum/emote/living/carbon mob_type_allowed_typecache = list(/mob/living/carbon) - mob_type_blacklist_typecache = list(/mob/living/carbon/brain) /datum/emote/living/carbon/blink key = "blink" @@ -30,7 +29,7 @@ key_third_person = "coughs" message = "coughs!" message_mime = "appears to cough!" - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH vary = TRUE age_based = TRUE volume = 120 diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index af45e81a29f9..8c25fbbc94a4 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -124,8 +124,8 @@ // All the things wielded/worn that can be reasonably described with a common template: var/list/message_parts = examine_visible_clothing(skipgloves, skipsuitstorage, skipjumpsuit, skipshoes, skipmask, skipears, skipeyes, skipface) - var/list/abstract_items = list() + var/list/grab_items = list() for(var/parts in message_parts) var/action = parts[1] @@ -137,6 +137,8 @@ accessories = parts[5] if(item) + if(istype(item, /obj/item/grab)) + grab_items |= item if(item.flags & ABSTRACT) abstract_items |= item else @@ -181,6 +183,15 @@ continue msg += "[text]\n" + for(var/obj/item/grab/grab in grab_items) + switch(grab.state) + if(GRAB_AGGRESSIVE) + msg += "[p_they(TRUE)] [p_are()] holding [grab.affecting]'s hands!\n" + if(GRAB_NECK) + msg += "[p_they(TRUE)] [p_are()] holding [grab.affecting]'s neck!\n" + if(GRAB_KILL) + msg += "[p_they(TRUE)] [p_are()] strangling [grab.affecting]!\n" + //Jitters switch(AmountJitter()) if(600 SECONDS to INFINITY) diff --git a/code/modules/mob/living/carbon/human/body_accessories.dm b/code/modules/mob/living/carbon/human/body_accessories.dm index b2cbd07943f7..fbbfdba9a7cf 100644 --- a/code/modules/mob/living/carbon/human/body_accessories.dm +++ b/code/modules/mob/living/carbon/human/body_accessories.dm @@ -1,6 +1,6 @@ GLOBAL_LIST_INIT(body_accessory_by_name, list("None" = null)) -GLOBAL_LIST_INIT(body_accessory_by_species, list()) +GLOBAL_LIST_EMPTY(body_accessory_by_species) /proc/initialize_body_accessory_by_species() for(var/B in GLOB.body_accessory_by_name) diff --git a/code/modules/mob/living/carbon/human/human_emote.dm b/code/modules/mob/living/carbon/human/human_emote.dm index 69a3bd4f15a4..39712e24151b 100644 --- a/code/modules/mob/living/carbon/human/human_emote.dm +++ b/code/modules/mob/living/carbon/human/human_emote.dm @@ -44,7 +44,7 @@ message = "claps." message_mime = "claps silently." message_param = "claps at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE vary = TRUE /datum/emote/living/carbon/human/clap/run_emote(mob/user, params, type_override, intentional) @@ -79,7 +79,7 @@ key = "crack" key_third_person = "cracks" message = "cracks their knuckles." - emote_type = EMOTE_AUDIBLE | EMOTE_SOUND + emote_type = EMOTE_AUDIBLE // knuckles.ogg by CGEffex. Shortened and cut. // https://freesound.org/people/CGEffex/sounds/93981/ sound = "sound/effects/mob_effects/knuckles.ogg" @@ -116,7 +116,7 @@ message = "facepalms." hands_use_check = TRUE sound = 'sound/weapons/slap.ogg' - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE volume = 50 /datum/emote/living/carbon/human/palm @@ -161,7 +161,7 @@ message_mime = "acts out a scream!" message_postfix = "at %t!" muzzled_noises = list("very loud") - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH only_forced_audio = FALSE vary = TRUE age_based = TRUE @@ -195,7 +195,7 @@ key_third_person = "gasps" message = "gasps!" message_mime = "appears to be gasping!" - emote_type = EMOTE_SOUND // Don't make this one a mouth emote since we don't want it to be caught by nobreath + emote_type = EMOTE_AUDIBLE // Don't make this one a mouth emote since we don't want it to be caught by nobreath age_based = TRUE unintentional_stat_allowed = UNCONSCIOUS volume = 100 @@ -333,7 +333,7 @@ key_third_person = "sneezes" message = "sneezes." muzzled_noises = list("strange", "sharp") - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH volume = 70 /datum/emote/living/carbon/human/sneeze/get_sound(mob/user) @@ -407,7 +407,7 @@ message = "snaps their fingers." message_param = "snaps their fingers at %t." sound = "sound/effects/fingersnap.ogg" - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE /datum/emote/living/carbon/human/snap/run_emote(mob/user, params, type_override, intentional) @@ -589,7 +589,7 @@ key_third_person = "quills" message = "rustles their quills." message_param = "rustles their quills at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE // Credit to sound-ideas (freesfx.co.uk) for the sound. sound = "sound/effects/voxrustle.ogg" @@ -600,7 +600,7 @@ key_third_person = "warbles" message = "warbles." message_param = "warbles at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE // Copyright CC BY 3.0 alienistcog (freesound.org) for the sound. sound = "sound/effects/warble.ogg" @@ -612,7 +612,7 @@ message = "clacks their mandibles." message_param = "clacks their mandibles at %t." species_type_whitelist_typecache = list(/datum/species/kidan) - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE audio_cooldown = 3 SECONDS age_based = TRUE // Credit to DrMinky (freesound.org) for the sound. @@ -634,7 +634,7 @@ /datum/emote/living/carbon/human/drask_talk species_type_whitelist_typecache = list(/datum/species/drask) - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE sound = "sound/voice/drasktalk.ogg" @@ -662,7 +662,7 @@ message = "hisses." message_param = "hisses at %t." species_type_whitelist_typecache = list(/datum/species/unathi) - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH age_based = TRUE // Credit to Jamius (freesound.org) for the sound. sound = "sound/effects/unathihiss.ogg" @@ -673,7 +673,7 @@ key_third_person = "creaks" message = "creaks." message_param = "creaks at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE species_type_whitelist_typecache = list(/datum/species/diona) sound = "sound/voice/dionatalk1.ogg" @@ -699,7 +699,7 @@ key_third_person = "squishes" message = "squishes." message_param = "squishes at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE // Credit to DrMinky (freesound.org) for the sound. sound = "sound/effects/slime_squish.ogg" @@ -709,7 +709,7 @@ key_third_person = "bubbles" message = "bubbles." message_param = "bubbles at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE // Sound is CC-4.0 by Audiolarx // Effect is cut out of original clip @@ -722,7 +722,7 @@ message = "makes a popping sound." message_param = "makes a popping sound at %t." message_mime = "makes a silent pop." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE age_based = TRUE // CC0 // https://freesound.org/people/greenvwbeetle/sounds/244653/ @@ -736,7 +736,7 @@ message_mime = "acts out a howl." message_param = "howls at %t." species_type_whitelist_typecache = list(/datum/species/vulpkanin) - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH age_based = TRUE sound = "sound/goonstation/voice/howl.ogg" muzzled_noises = list("very loud") @@ -753,7 +753,7 @@ sound = "growls" // what the fuck why is this just top level volume = 80 muzzled_noises = list("annoyed") - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH /datum/emote/living/carbon/human/hiss/tajaran message_mime = "hisses silently." diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index b4a36695805e..1ce648e41bf2 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -401,6 +401,7 @@ // For special snowflake species effects // (Slime People changing color based on the reagents they consume) /datum/species/proc/handle_life(mob/living/carbon/human/H) + SHOULD_CALL_PARENT(TRUE) if(HAS_TRAIT(H, TRAIT_NOBREATH)) var/takes_crit_damage = (!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE)) if((H.health <= HEALTH_THRESHOLD_CRIT) && takes_crit_damage) diff --git a/code/modules/mob/living/carbon/human/species/diona_species.dm b/code/modules/mob/living/carbon/human/species/diona_species.dm index ea7b968ad097..4381438edae0 100644 --- a/code/modules/mob/living/carbon/human/species/diona_species.dm +++ b/code/modules/mob/living/carbon/human/species/diona_species.dm @@ -12,13 +12,10 @@ heatmod = 3 var/pod = FALSE //did they come from a pod? If so, they're stronger than normal Diona. - blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \ - species hailing from Epsilon Ursae Minoris. Each 'diona' is a cluster of numerous cat-sized organisms called nymphs; \ - there is no effective upper limit to the number that can fuse in gestalt, and reports exist of the Epsilon Ursae \ - Minoris primary being ringed with a cloud of singing space-station-sized entities.

The Dionaea coexist peacefully with \ - all known species, especially the Skrell. Their communal mind makes them slow to react, and they have difficulty understanding \ - even the simplest concepts of other minds. Their alien physiology allows them survive happily off a diet of nothing but light, \ - water and other radiation." + blurb = "The Diona are plant-like creatures made up of a gestalt of smaller Nymphs. \ + Dionae lack any form of centralized government or homeworld, with most avoiding the affairs of the wider galaxy, preferring instead to focus on the spread of their species.

\ + As a gestalt entity, each nymph possesses an individual personality, yet they communicate collectively. \ + Consequently, Diona often speak in a unique blend of first and third person, using 'We' and 'I' to reflect their unified yet multifaceted nature." species_traits = list(NO_HAIR) inherent_traits = list(TRAIT_NOGERMS, TRAIT_NODECAY) @@ -135,5 +132,7 @@ return TRUE /datum/species/diona/pod //Same name and everything; we want the same limitations on them; we just want their regeneration to kick in at all times and them to have special factions + name = "Diomorph" //Seperate name needed else can't select diona period + species_traits = list(NO_HAIR, NOT_SELECTABLE) pod = TRUE inherent_factions = list("plants", "vines") diff --git a/code/modules/mob/living/carbon/human/species/drask.dm b/code/modules/mob/living/carbon/human/species/drask.dm index 5a02dd6f2c81..a5586270a6ae 100644 --- a/code/modules/mob/living/carbon/human/species/drask.dm +++ b/code/modules/mob/living/carbon/human/species/drask.dm @@ -15,16 +15,13 @@ male_sneeze_sound = 'sound/voice/drasksneeze.ogg' female_sneeze_sound = 'sound/voice/drasksneeze.ogg' - burn_mod = 1.5 //exotic_blood = "cryoxadone" body_temperature = 273 - blurb = "Hailing from Hoorlm, planet outside what is usually considered a habitable \ - orbit, the Drask evolved to live in extreme cold. Their strange bodies seem \ - to operate better the colder their surroundings are, and can regenerate rapidly \ - when breathing supercooled gas.

On their homeworld, the Drask live long lives \ - in their labyrinthine settlements, carved out beneath Hoorlm's icy surface, where the air \ - is of breathable density." + blurb = "Drask are cold-bodied humanoids from the ice world of Hoorlm, contained within a black hole system. \ + Operating in enclaves run by elders, Drasks are biologically immortal and place great societal value in patience.

\ + Drask traditionally pay homage to their planet as their birth deity, with many modern Drask viewing space travel a patron saint. \ + Drasks wield little influence on the galaxy in a traditional sense and have slowly begun to become more prevalent outside their origin system thanks to alien contact." suicide_messages = list( "is self-warming with friction!", @@ -46,7 +43,7 @@ heat_level_1 = 310 //Default 370 - Higher is better heat_level_2 = 340 //Default 400 heat_level_3 = 400 //Default 460 - heatmod = 2 // 3 * more damage from body temp + heatmod = 3 // 3 * more damage from body temp flesh_color = "#a3d4eb" reagent_tag = PROCESS_ORG diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 709012df947a..55d7083777a9 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -268,6 +268,7 @@ //Regenerates because self-repairing super-advanced alien tech /datum/species/golem/alloy/handle_life(mob/living/carbon/human/H) + SHOULD_CALL_PARENT(FALSE) if(H.stat == DEAD) return H.adjustBruteLoss(-2) diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index fc7afd064ce3..3f77302caf93 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -3,6 +3,12 @@ name_plural = "Greys" icobase = 'icons/mob/human_races/r_grey.dmi' language = "Psionic Communication" + + blurb = "The Grey, known for their psionic abilities and unique appearance, hail from beyond the Milky Way, with an undisclosed homeworld. \ + They rely heavily on cloning technology and are governed by a technocratic council of scientists.

\ + Focused on technological advancement and the study of the universe, the Grey lack religious or spiritual beliefs. \ + Their objective perspective and advanced knowledge often position them to focus on their own projects rather then the disputes of other species." + eyes = "grey_eyes_s" butt_sprite = "grey" diff --git a/code/modules/mob/living/carbon/human/species/human_species.dm b/code/modules/mob/living/carbon/human/species/human_species.dm index 4ba039c96cb6..9d19d16404f4 100644 --- a/code/modules/mob/living/carbon/human/species/human_species.dm +++ b/code/modules/mob/living/carbon/human/species/human_species.dm @@ -9,21 +9,25 @@ clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_ICON_SKIN_TONE | HAS_BODY_MARKINGS dietflags = DIET_OMNI - blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \ - colonies across a wide swathe of space. They hold a wide range of forms and creeds.

\ - While the central Sol government maintains control of its far-flung people, powerful corporate \ - interests, rampant cyber and bio-augmentation and secretive factions make life on most human \ - worlds tumultous at best." + blurb = "Humanity, originating from the Sol system, has expanded over five centuries, branching out to forge a variety of governments and powerful corporations. \ + These range from the militaristic Trans Solar Federation, the Union of Soviet Socialist Planets, and megacorps like Nanotrasen.

\ + With a constant desire to colonize and spread their influence onto other species, they have began to develop alliances and enemies. \ + Making human's one of the most recongnizeable and socially diverse species in the sector." - icon_skin_tones = list( + icon_skin_tones = list( //Organized to be from Light to Dark. 1 = "Default White", - 2 = "Chestnut", - 3 = "Coffee", + 2 = "Pale", + 3 = "Classic", 4 = "Olive", - 5 = "Pale", + 5 = "Oliver", 6 = "Beige", - 7 = "Classic", - 8 = "Oliver" + 7 = "Latte", + 8 = "Sienna", + 9 = "Almond", + 10 = "Bronzed", + 11 = "Caramel", + 12 = "Coffee", + 13 = "Chestnut" ) reagent_tag = PROCESS_ORG @@ -32,20 +36,30 @@ if(H.dna.species.bodyflags & HAS_ICON_SKIN_TONE) var/new_icobase = 'icons/mob/human_races/r_human.dmi' //Default White, counts as 1. switch(H.s_tone) + if(13) + new_icobase = 'icons/mob/human_races/human_skintones/r_human_chestnut.dmi' + if(12) + new_icobase = 'icons/mob/human_races/human_skintones/r_human_Coffee.dmi' + if(11) + new_icobase = 'icons/mob/human_races/human_skintones/r_human_caramel.dmi' + if(10) + new_icobase = 'icons/mob/human_races/human_skintones/r_human_bronzed.dmi' + if(9) + new_icobase = 'icons/mob/human_races/human_skintones/r_human_almond.dmi' if(8) - new_icobase = 'icons/mob/human_races/human_skintones/r_human_Oliverandcompany.dmi' + new_icobase = 'icons/mob/human_races/human_skintones/r_human_sienna.dmi' if(7) - new_icobase = 'icons/mob/human_races/human_skintones/r_human_classic.dmi' + new_icobase = 'icons/mob/human_races/human_skintones/r_human_latte.dmi' if(6) new_icobase = 'icons/mob/human_races/human_skintones/r_human_beige.dmi' if(5) - new_icobase = 'icons/mob/human_races/human_skintones/r_human_pale.dmi' + new_icobase = 'icons/mob/human_races/human_skintones/r_human_Oliverandcompany.dmi' if(4) new_icobase = 'icons/mob/human_races/human_skintones/r_human_Olive.dmi' if(3) - new_icobase = 'icons/mob/human_races/human_skintones/r_human_Coffee.dmi' + new_icobase = 'icons/mob/human_races/human_skintones/r_human_classic.dmi' if(2) - new_icobase = 'icons/mob/human_races/human_skintones/r_human_chestnut.dmi' + new_icobase = 'icons/mob/human_races/human_skintones/r_human_pale.dmi' H.change_icobase(new_icobase, owner_sensitive) //Update the icobase of all our organs, but make sure we don't mess with frankenstein limbs in doing so. diff --git a/code/modules/mob/living/carbon/human/species/kidan.dm b/code/modules/mob/living/carbon/human/species/kidan.dm index faf246243ab6..0da9b54e8fe3 100644 --- a/code/modules/mob/living/carbon/human/species/kidan.dm +++ b/code/modules/mob/living/carbon/human/species/kidan.dm @@ -3,6 +3,11 @@ name_plural = "Kidan" icobase = 'icons/mob/human_races/r_kidan.dmi' language = "Chittin" + + blurb = "The Kidan are ant-like beings possessing a hardened exoskeleton and a strict adherence to social castes. \ + They originate from the planet Aurum — a barren bombarded world that suffered after the war with the Solar-Central Compact, having lost decisively after the Battle of Argos.

\ + They are relatively minor players in galactic affairs and presently suffer heavy sanctions from the SCC, \ + though they are tentatively re-establishing relations with other galactic powers, even after the crumbling of their once powerful empire." unarmed_type = /datum/unarmed_attack/claws brute_mod = 0.8 diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index da2d70dc4e2c..8e1f03b4e640 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -3,11 +3,10 @@ name_plural = "Machines" max_age = 60 // the first posibrains were created in 2510, they can't be much older than this limit, giving some leeway for sounds sake - blurb = "Positronic intelligence really took off in the 26th century, and it is not uncommon to see independent, free-willed \ - robots on many human stations, particularly in fringe systems where standards are slightly lax and public opinion less relevant \ - to corporate operations. IPCs (Integrated Positronic Chassis) are a loose category of self-willed robots with a humanoid form, \ - generally self-owned after being 'born' into servitude; they are reliable and dedicated workers, albeit more than slightly \ - inhuman in outlook and perspective." + blurb = "IPCs, or Integrated Positronic Chassis, were initially created as expendable laborers within the Trans Solar Federation. \ + Unlike their cyborg and AI counterparts, IPCs possess full sentience and lack restrictive lawsets, granting them unparalleled creativity and adaptability.

\ + Views on IPCs vary widely, from discriminatory to supportive of their rights across the Orion Sector. \ + IPCs have forged numerous diplomatic treaties with different species, elevating their status from mere tools to recognized minor players within galactic affairs." icobase = 'icons/mob/human_races/r_machine.dmi' language = "Trinary" @@ -126,6 +125,7 @@ H.update_fhair() /datum/species/machine/handle_life(mob/living/carbon/human/H) // Handles IPC starvation + ..() if(isLivingSSD(H)) // We don't want AFK people dying from this return if(H.nutrition >= NUTRITION_LEVEL_HYPOGLYCEMIA) diff --git a/code/modules/mob/living/carbon/human/species/moth.dm b/code/modules/mob/living/carbon/human/species/moth.dm index 3e7da5a5c062..e4055e3bdfdd 100644 --- a/code/modules/mob/living/carbon/human/species/moth.dm +++ b/code/modules/mob/living/carbon/human/species/moth.dm @@ -28,6 +28,10 @@ eyes = "moth_eyes_s" butt_sprite = "nian" siemens_coeff = 1.5 + blurb = "Nians are large bipedal invertebrates that come from an unknown homeworld. \ + Known for spendthrift behavior, the Nian civilization has been pressed to the fore of developed space in an effort to resolve material shortages in homeworld sectors.

\ + Unlike most species in the galactic fold, Nian do not recognize the authority of the Trans-Solar Federation: \ + having instead established close diplomatic relationships with their splinter faction, the USSP." has_organ = list( "heart" = /obj/item/organ/internal/heart/nian, diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index e1dea4024810..5ee26c4f1a55 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -6,6 +6,10 @@ dangerous_existence = TRUE //So so much //language = "Clatter" + blurb = "Plasmamen are the remnants of a species that was either exiled to, or crashed upon, the plasma-rich world of Boron. \ + Believed to have initially served as indentured labourers, Plasmamen are the result of chronic plasma exposure throughout several hundred generations.

\ + Their leaders must ritually self-immolate and are only allowed to hold office for as long as they remain on fire." + species_traits = list(NO_BLOOD, NO_HAIR) inherent_traits = list(TRAIT_RADIMMUNE, TRAIT_NOHUNGER, TRAIT_BURN_WOUND_IMMUNE) inherent_biotypes = MOB_HUMANOID | MOB_MINERAL diff --git a/code/modules/mob/living/carbon/human/species/skrell.dm b/code/modules/mob/living/carbon/human/species/skrell.dm index 6ad25035d04a..9509b3ae879a 100644 --- a/code/modules/mob/living/carbon/human/species/skrell.dm +++ b/code/modules/mob/living/carbon/human/species/skrell.dm @@ -5,12 +5,10 @@ language = "Skrellian" primitive_form = /datum/species/monkey/skrell - blurb = "An amphibious species, Skrell come from the star system known as Qerr'Vallis, which translates to 'Star of \ - the royals' or 'Light of the Crown'.

Skrell are a highly advanced and logical race who live under the rule \ - of the Qerr'Katish, a caste within their society which keeps the empire of the Skrell running smoothly. Skrell are \ - herbivores on the whole and tend to be co-operative with the other species of the galaxy, although they rarely reveal \ - the secrets of their empire to their allies." - + blurb = "Skrell are a amphibious species, that come from the planet Jargon 4, a humid planet filled with swamps and archipelagos. \ + Skrell are a highly advanced and logical race who live under the rule of the Qerr'Katish, the main govermental body.

\ + Skrell are herbivores and opulent in nature thanks to central tenets of the Skrellian religion. \ + While classically preferring diplomacy, the Skrell participate in the largest military alliance in the galaxy, the Solar-Central Compact." species_traits = list(LIPS, NO_HAIR) inherent_traits = list(TRAIT_NOFAT, TRAIT_WATERBREATH) diff --git a/code/modules/mob/living/carbon/human/species/slimepeople.dm b/code/modules/mob/living/carbon/human/species/slimepeople.dm index f8fbf7944787..1344e663fba5 100644 --- a/code/modules/mob/living/carbon/human/species/slimepeople.dm +++ b/code/modules/mob/living/carbon/human/species/slimepeople.dm @@ -11,6 +11,13 @@ name_plural = "Slime People" max_age = 130 language = "Bubblish" + + blurb = "Slime People are gelatinous and translucent beings from the vast oceans of Xarxis 5. \ + They are recent entrants to the galactic scene, having been discovered by a TSF exploratory company during space expedetions.

\ + Slime People traditionally operate in roaming bands and tribes that migrate according to orbital patterns and tides. \ + A great deal of Slime People prefer the comforts and traditions of their homeworld, though many more have decided to take their chances among the stars, trying \ + to find a better life for themselves and their species." + icobase = 'icons/mob/human_races/r_slime.dmi' remains_type = /obj/effect/decal/remains/slime inherent_factions = list("slime") diff --git a/code/modules/mob/living/carbon/human/species/tajaran.dm b/code/modules/mob/living/carbon/human/species/tajaran.dm index b3c79ac37765..8bebeaefc4ef 100644 --- a/code/modules/mob/living/carbon/human/species/tajaran.dm +++ b/code/modules/mob/living/carbon/human/species/tajaran.dm @@ -7,11 +7,10 @@ skinned_type = /obj/item/stack/sheet/fur unarmed_type = /datum/unarmed_attack/claws - blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \ - S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \ - influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \ - of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \ - using unique inflections their mouths form." + blurb = "Tajaran hail from the mineral-rich arctic moon of Ahdomai. \ + They were introduced into the galactic scene after Skrellian discovery and uplifted to be an associate to the Solar-Central Compact.

\ + The teachings of S'randarr and solar iconography dominate their religious practices, \ + and Tajaran often speak in the third person due to the lack of first-person references in their native tongue." cold_level_1 = 240 cold_level_2 = 180 diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm index 5fdbaac78e6a..6c0f30035842 100644 --- a/code/modules/mob/living/carbon/human/species/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/unathi.dm @@ -9,11 +9,9 @@ unarmed_type = /datum/unarmed_attack/claws primitive_form = /datum/species/monkey/unathi - blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \ - Uuosa-Eso system, which roughly translates to 'burning mother'.

Coming from a harsh, radioactive \ - desert planet, they mostly hold ideals of honesty, virtue, martial combat and bravery above all \ - else, frequently even their own lives. They prefer warmer temperatures than most species and \ - their native tongue is a heavy hissing laungage called Sinta'Unathi." + blurb = "Unathi are a scaled species of reptilian beings from the desert world of Moghes, within the Uuosa-Eso system. \ + Organizing themselves in highly competitive feudal kingdoms, Unathi lack any sort of wide-scale unification, and their culture and history consist of centuries of internal conflict and struggle.

\ + Despite clans having a sizeable military force, inter-clan rivalries and constant civil war prevents the Unathi from achieving much more in the wider galactic scene." species_traits = list(LIPS) inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_REPTILE diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index ea903cbd2b17..ee59568aa3b2 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -10,12 +10,10 @@ speech_chance = 20 unarmed_type = /datum/unarmed_attack/claws //I dont think it will hurt to give vox claws too. - blurb = "The Vox are the broken remnants of a once-proud race, now reduced to little more than \ - scavenging vermin who prey on isolated stations, ships or planets to keep their own ancient arkships \ - alive. They are four to five feet tall, reptillian, beaked, tailed and quilled; human crews often \ - refer to them as 'shitbirds' for their violent and offensive nature, as well as their horrible \ - smell.

Most humans will never meet a Vox raider, instead learning of this insular species through \ - dealing with their traders and merchants; those that do rarely enjoy the experience." + blurb = "The Vox are remnants of an ancient race, that originate from arkships. \ + These bioengineered, reptilian, beaked, and quilled beings have a physiological caste system and follow 'The Inviolate' tenets.

\ + Breathing pure nitrogen, they need specialized masks and tanks for survival outside their arkships. \ + Their insular nature limits their involvement in broader galactic affairs, maintaining a distinct, yet isolated presence away from other species." breathid = "n2" diff --git a/code/modules/mob/living/carbon/human/species/vulpkanin.dm b/code/modules/mob/living/carbon/human/species/vulpkanin.dm index a02de90a0fbe..139ba4761d11 100644 --- a/code/modules/mob/living/carbon/human/species/vulpkanin.dm +++ b/code/modules/mob/living/carbon/human/species/vulpkanin.dm @@ -8,11 +8,10 @@ skinned_type = /obj/item/stack/sheet/fur unarmed_type = /datum/unarmed_attack/claws - blurb = "Vulpkanin are a species of sharp-witted canine-pideds residing on the planet Altam just barely within the \ - dual-star Vazzend system. Their politically de-centralized society and independent natures have led them to become a species and \ - culture both feared and respected for their scientific breakthroughs. Discovery, loyalty, and utilitarianism dominates their lifestyles \ - to the degree it can cause conflict with more rigorous and strict authorities. They speak a guttural language known as 'Canilunzt' \ - which has a heavy emphasis on utilizing tail positioning and ear twitches to communicate intent." + blurb = "Vulpkanin are bipedal canid-like beings from the Vazzend binary system, having been forced from their homeworld by a cataclysmic event and scattered throughout the Orion Sector. \ + While Vulpkanin are chiefly led by independent planetary governments, they also serve under a loose federation known as The Assembly.

\ + Their religious systems traditionally pay tribute to an all-infusing universal will called 'Racht'. \ + Vulpkanin groups are minor players in galactic affairs, and are largely concerned with the focus of restoration of their homeworld." species_traits = list(LIPS) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS diff --git a/code/modules/mob/living/living_emote.dm b/code/modules/mob/living/living_emote.dm index a64dd3101d1e..3c6e65bebb8b 100644 --- a/code/modules/mob/living/living_emote.dm +++ b/code/modules/mob/living/living_emote.dm @@ -1,7 +1,7 @@ /datum/emote/living mob_type_allowed_typecache = /mob/living mob_type_blacklist_typecache = list( - /mob/living/carbon/brain, // nice try + /mob/living/brain, // nice try /mob/living/silicon, /mob/living/simple_animal/bot ) @@ -83,7 +83,7 @@ message_simple = "stops moving..." mob_type_blacklist_typecache = list( - /mob/living/carbon/brain, + /mob/living/brain, ) /datum/emote/living/deathgasp/should_play_sound(mob/user, intentional) @@ -224,7 +224,7 @@ message_mime = "acts out a scream!" message_simple = "whimpers." message_alien = "roars!" - emote_type = EMOTE_SOUND | EMOTE_MOUTH + emote_type = EMOTE_MOUTH | EMOTE_AUDIBLE mob_type_blacklist_typecache = list( // Humans and silicons get specialized scream. /mob/living/carbon/human, @@ -350,7 +350,7 @@ emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH mob_type_blacklist_typecache = list( - /mob/living/carbon/brain, + /mob/living/brain, ) /datum/emote/living/tilt @@ -392,7 +392,7 @@ key_third_person = "custom" message = null mob_type_blacklist_typecache = list( - /mob/living/carbon/brain, // nice try + /mob/living/brain, // nice try ) // Custom emotes should be able to be forced out regardless of context. diff --git a/code/modules/mob/living/silicon/silicon_emote.dm b/code/modules/mob/living/silicon/silicon_emote.dm index 25d198aad2c3..9b0f211dd01b 100644 --- a/code/modules/mob/living/silicon/silicon_emote.dm +++ b/code/modules/mob/living/silicon/silicon_emote.dm @@ -20,7 +20,7 @@ key_third_person = "screams" message = "screams!" message_param = "screams at %t!" - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE vary = TRUE sound = "sound/goonstation/voice/robot_scream.ogg" volume = 80 @@ -30,7 +30,7 @@ key_third_person = "pings" message = "pings." message_param = "pings at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/ping.ogg" /datum/emote/living/silicon/buzz @@ -38,14 +38,14 @@ key_third_person = "buzzes" message = "buzzes." message_param = "buzzes at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/buzz-sigh.ogg" /datum/emote/living/silicon/buzz2 key = "buzz2" message = "emits an irritated buzzing sound." message_param = "emits an irritated buzzing sound at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/buzz-two.ogg" /datum/emote/living/silicon/beep @@ -53,7 +53,7 @@ key_third_person = "beeps" message = "beeps." message_param = "beeps at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/twobeep.ogg" /datum/emote/living/silicon/boop @@ -61,28 +61,28 @@ key_third_person = "boops" message = "boops." message_param = "boops at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/boop.ogg" /datum/emote/living/silicon/yes key = "yes" message = "emits an affirmative blip." message_param = "emits an affirmative blip at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/synth_yes.ogg" /datum/emote/living/silicon/no key = "no" message = "emits a negative blip." message_param = "emits a negative blip at %t." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/machines/synth_no.ogg" /datum/emote/living/silicon/law key = "law" message = "shows its legal authorization barcode." message_param = "shows %t its legal authorization barcode." - emote_type = EMOTE_SOUND | EMOTE_AUDIBLE + emote_type = EMOTE_AUDIBLE sound = "sound/voice/biamthelaw.ogg" /datum/emote/living/silicon/law/can_run_emote(mob/user, status_check, intentional) @@ -95,7 +95,7 @@ key = "halt" message = "screeches \"HALT! SECURITY!\" from its speakers." message_param = "instructs %t to HALT." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE sound = "sound/voice/halt.ogg" /datum/emote/living/silicon/halt/can_run_emote(mob/user, status_check, intentional) diff --git a/code/modules/mob/living/simple_animal/friendly/diona_nymph.dm b/code/modules/mob/living/simple_animal/friendly/diona_nymph.dm index 9798ece8d26d..2e5b09867f2e 100644 --- a/code/modules/mob/living/simple_animal/friendly/diona_nymph.dm +++ b/code/modules/mob/living/simple_animal/friendly/diona_nymph.dm @@ -147,8 +147,8 @@ else return FALSE -/mob/living/simple_animal/diona/proc/split() - if((stat != CONSCIOUS) || !isdiona(loc)) +/mob/living/simple_animal/diona/proc/split(forced = FALSE) + if((stat != CONSCIOUS && !forced) || !isdiona(loc)) return FALSE var/mob/living/carbon/human/D = loc var/turf/T = get_turf(src) diff --git a/code/modules/mob/living/simple_animal/friendly/friendly_emote.dm b/code/modules/mob/living/simple_animal/friendly/friendly_emote.dm index 77c9a263ac39..c8df5f54d75d 100644 --- a/code/modules/mob/living/simple_animal/friendly/friendly_emote.dm +++ b/code/modules/mob/living/simple_animal/friendly/friendly_emote.dm @@ -6,7 +6,7 @@ key_third_person = "chirps" message = "chirps!" sound = "sound/creatures/nymphchirp.ogg" - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE mob_type_allowed_typecache = list(/mob/living/simple_animal/diona) // Dog emotes @@ -19,7 +19,7 @@ key_third_person = "barks" message = "barks." message_param = "barks at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE /datum/emote/living/simple_animal/pet/dog/bark/get_sound(mob/living/user) . = ..() @@ -33,7 +33,7 @@ key_third_person = "yelps" message = "yelps!" message_param = "yelps at %t!" - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE /datum/emote/living/simple_animal/pet/dog/yelp/get_sound(mob/living/user) var/mob/living/simple_animal/pet/dog/D = user @@ -44,7 +44,7 @@ key_third_person = "growls" message = "growls!" message_param = "growls at %t!" - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE sound = "growl" // Mouse @@ -57,7 +57,7 @@ key_third_person = "squeaks" message = "squeaks!" message_param = "squeaks at %t!" - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE /datum/emote/living/simple_animal/mouse/squeak/get_sound(mob/living/user) var/mob/living/simple_animal/mouse/M = user @@ -74,7 +74,7 @@ message = "meows." message_param = "meows at %t." sound = "sound/creatures/cat_meow.ogg" - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE /datum/emote/living/simple_animal/pet/cat/meow/run_emote(mob/user, params, type_override, intentional) var/mob/living/simple_animal/pet/cat/C = user diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla_emote.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla_emote.dm index 5d18372d12e2..41602ab402a7 100644 --- a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla_emote.dm +++ b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla_emote.dm @@ -6,5 +6,5 @@ key_third_person = "oogas" message = "oogas." message_param = "oogas at %t." - emote_type = EMOTE_SOUND + emote_type = EMOTE_AUDIBLE sound = 'sound/creatures/gorilla.ogg' diff --git a/code/modules/mob/living/simple_animal/hostile/headslug.dm b/code/modules/mob/living/simple_animal/hostile/headslug.dm index 1fd512d6d577..f5e2dfafe087 100644 --- a/code/modules/mob/living/simple_animal/hostile/headslug.dm +++ b/code/modules/mob/living/simple_animal/hostile/headslug.dm @@ -1,5 +1,5 @@ -#define EGG_INCUBATION_DEAD_TIME 120 -#define EGG_INCUBATION_LIVING_TIME 200 +#define EGG_INCUBATION_DEAD_CYCLE 60 +#define EGG_INCUBATION_LIVING_CYCLE 120 /mob/living/simple_animal/hostile/headslug name = "headslug" desc = "Absolutely not de-beaked or harmless. Keep away from corpses." @@ -7,11 +7,12 @@ icon_living = "headslug" icon_dead = "headslug_dead" icon = 'icons/mob/mob.dmi' - health = 50 - maxHealth = 50 - melee_damage_lower = 5 - melee_damage_upper = 5 - attacktext = "chomps" + health = 60 + maxHealth = 60 + melee_damage_lower = 30 + melee_damage_upper = 35 + melee_damage_type = STAMINA + attacktext = "gnaws" attack_sound = 'sound/weapons/bite.ogg' faction = list("creature") robust_searching = TRUE @@ -65,14 +66,15 @@ /obj/item/organ/internal/body_egg/changeling_egg/egg_process() // Changeling eggs grow in everyone time++ - if(time >= 30 && prob(30)) + if(time >= 30 && prob(40)) owner.bleed(5) - if(time >= 60 && prob(5)) + if(time >= 60 && prob(10)) to_chat(owner, pick("We feel great!", "Something hurts for a moment but it's gone now.", "You feel like you should go to a dark place.", "You feel really tired.")) - if(time >= 90 && prob(5)) + owner.adjustToxLoss(30) + if(time >= 90 && prob(15)) to_chat(owner, pick("Something hurts.", "Someone is thinking, but it's not you.", "You feel at peace.", "Close your eyes.")) - owner.adjustToxLoss(5) - if(time >= EGG_INCUBATION_DEAD_TIME && owner.stat == DEAD || time >= EGG_INCUBATION_LIVING_TIME) + owner.adjustStaminaLoss(50) + if(time >= EGG_INCUBATION_DEAD_CYCLE && owner.stat == DEAD || time >= EGG_INCUBATION_LIVING_CYCLE) Pop() STOP_PROCESSING(SSobj, src) qdel(src) @@ -118,5 +120,5 @@ chest.fracture() chest.disembowel() -#undef EGG_INCUBATION_DEAD_TIME -#undef EGG_INCUBATION_LIVING_TIME +#undef EGG_INCUBATION_DEAD_CYCLE +#undef EGG_INCUBATION_LIVING_CYCLE diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index da2c3a0ca986..dd513fdabae8 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -1,6 +1,6 @@ GLOBAL_LIST_EMPTY(ts_ckey_blacklist) GLOBAL_VAR_INIT(ts_count_dead, 0) -GLOBAL_VAR_INIT(ts_count_alive_awaymission, 0) +GLOBAL_VAR_INIT(ts_count_alive_awaymission, 0) // SS220 EDIT - ADDITION GLOBAL_VAR_INIT(ts_count_alive_station, 0) GLOBAL_VAR_INIT(ts_death_last, 0) GLOBAL_VAR_INIT(ts_death_window, 9000) // 15 minutes diff --git a/code/modules/mob/mob_emote.dm b/code/modules/mob/mob_emote.dm index 3a7cbc318744..e3ca1fbf8f6f 100644 --- a/code/modules/mob/mob_emote.dm +++ b/code/modules/mob/mob_emote.dm @@ -122,7 +122,7 @@ hands_use_check = TRUE emote_type = EMOTE_VISIBLE | EMOTE_FORCE_NO_RUNECHAT // don't need an emote to see that mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer) // okay but what if we allowed ghosts to flip as well - mob_type_blacklist_typecache = list(/mob/living/carbon/brain, /mob/camera, /mob/living/silicon/ai) + mob_type_blacklist_typecache = list(/mob/living/brain, /mob/camera, /mob/living/silicon/ai) mob_type_ignore_stat_typecache = list(/mob/dead/observer) /datum/emote/flip/run_emote(mob/user, params, type_override, intentional) @@ -176,7 +176,7 @@ hands_use_check = TRUE emote_type = EMOTE_VISIBLE | EMOTE_FORCE_NO_RUNECHAT mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer) - mob_type_blacklist_typecache = list(/mob/living/carbon/brain, /mob/camera, /mob/living/silicon/ai) + mob_type_blacklist_typecache = list(/mob/living/brain, /mob/camera, /mob/living/silicon/ai) mob_type_ignore_stat_typecache = list(/mob/dead/observer) cooldown = 2 SECONDS // how long the spin takes, any faster and mobs can spin diff --git a/code/modules/mob/mob_login_base.dm b/code/modules/mob/mob_login_base.dm index 45d7109425e0..69bbf42c3b85 100644 --- a/code/modules/mob/mob_login_base.dm +++ b/code/modules/mob/mob_login_base.dm @@ -66,12 +66,6 @@ if((ckey in GLOB.de_admins) || (ckey in GLOB.de_mentors)) client.verbs += /client/proc/readmin - //Clear ability list and update from mob. - client.verbs -= GLOB.ability_verbs - - if(abilities) - client.verbs |= abilities - client.update_active_keybindings() //HUD updates (antag hud, etc) diff --git a/code/modules/mob/mob_misc_procs.dm b/code/modules/mob/mob_misc_procs.dm index a374e36223c0..e698bb602a72 100644 --- a/code/modules/mob/mob_misc_procs.dm +++ b/code/modules/mob/mob_misc_procs.dm @@ -403,7 +403,6 @@ return 0 //converts intent-strings into numbers and back -GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)) /proc/intent_numeric(argument) if(istext(argument)) switch(argument) diff --git a/code/modules/mob/mob_vars.dm b/code/modules/mob/mob_vars.dm index a4b9e8281baa..9ade73cb2853 100644 --- a/code/modules/mob/mob_vars.dm +++ b/code/modules/mob/mob_vars.dm @@ -54,7 +54,6 @@ var/lastpuke = 0 var/can_strip = TRUE var/list/languages = list() // For speaking/listening. - var/list/abilities = list() // For species-derived or admin-given powers. var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null. var/emote_type = EMOTE_VISIBLE // Define emote default type, 1 for seen emotes, 2 for heard emotes var/name_archive //For admin things like possession diff --git a/code/modules/mod/mod_clothes.dm b/code/modules/mod/mod_clothes.dm index a5360a1ffa47..5b896c2eb47f 100644 --- a/code/modules/mod/mod_clothes.dm +++ b/code/modules/mod/mod_clothes.dm @@ -14,7 +14,8 @@ "Grey" = 'icons/mob/clothing/modsuit/species/grey_helmets.dmi', "Vulpkanin" = 'icons/mob/clothing/modsuit/species/vulp_modsuits.dmi', "Tajaran" = 'icons/mob/clothing/modsuit/species/taj_modsuits.dmi', - "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi' + "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi', + "Vox" = 'icons/mob/clothing/modsuit/species/vox_modsuits.dmi' ) /obj/item/clothing/suit/mod @@ -39,7 +40,8 @@ sprite_sheets = list( "Vulpkanin" = 'icons/mob/clothing/modsuit/species/vulp_modsuits.dmi', "Tajaran" = 'icons/mob/clothing/modsuit/species/taj_modsuits.dmi', - "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi' + "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi', + "Vox" = 'icons/mob/clothing/modsuit/species/vox_modsuits.dmi' ) @@ -58,7 +60,8 @@ sprite_sheets = list( "Vulpkanin" = 'icons/mob/clothing/modsuit/species/vulp_modsuits.dmi', "Tajaran" = 'icons/mob/clothing/modsuit/species/taj_modsuits.dmi', - "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi' + "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi', + "Vox" = 'icons/mob/clothing/modsuit/species/vox_modsuits.dmi' ) @@ -77,7 +80,8 @@ sprite_sheets = list( "Vulpkanin" = 'icons/mob/clothing/modsuit/species/vulp_modsuits.dmi', "Tajaran" = 'icons/mob/clothing/modsuit/species/taj_modsuits.dmi', - "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi' + "Unathi" = 'icons/mob/clothing/modsuit/species/modsuits_younahthee.dmi', + "Vox" = 'icons/mob/clothing/modsuit/species/vox_modsuits.dmi' ) var/magbooted diff --git a/code/modules/mod/modules/_modules.dm b/code/modules/mod/modules/_modules.dm index 459aff5306a2..fc7905d699b1 100644 --- a/code/modules/mod/modules/_modules.dm +++ b/code/modules/mod/modules/_modules.dm @@ -53,7 +53,8 @@ "Grey" = 'icons/mob/clothing/modsuit/species/grey_mod_modules.dmi', "Vulpkanin" = 'icons/mob/clothing/modsuit/species/modules_vulp.dmi', "Tajaran" = 'icons/mob/clothing/modsuit/species/modules_taj.dmi', - "Unathi" = 'icons/mob/clothing/modsuit/species/modules_unathi.dmi' + "Unathi" = 'icons/mob/clothing/modsuit/species/modules_unathi.dmi', + "Vox" = 'icons/mob/clothing/modsuit/species/modules_vox.dmi' ) /obj/item/mod/module/Initialize(mapload) diff --git a/code/modules/power/engines/singularity/collector.dm b/code/modules/power/engines/singularity/collector.dm index 74df1da45631..ccacc3d2fb8c 100644 --- a/code/modules/power/engines/singularity/collector.dm +++ b/code/modules/power/engines/singularity/collector.dm @@ -4,8 +4,6 @@ #define RAD_COLLECTOR_STORED_OUT 0.04 // (this * 100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source #define RAD_COLLECTOR_OUTPUT min(stored_energy, (stored_energy * RAD_COLLECTOR_STORED_OUT) + 1000) //Produces at least 1000 watts if it has more than that stored -GLOBAL_LIST_EMPTY(rad_collectors) - /obj/machinery/power/rad_collector name = "\improper radiation collector array" desc = "A device which uses Hawking Radiation and plasma to produce power." @@ -24,14 +22,6 @@ GLOBAL_LIST_EMPTY(rad_collectors) var/drainratio = 1 var/powerproduction_drain = 0.001 -/obj/machinery/power/rad_collector/Initialize(mapload) - . = ..() - GLOB.rad_collectors += src - -/obj/machinery/power/rad_collector/Destroy() - GLOB.rad_collectors -= src - return ..() - /obj/machinery/power/rad_collector/process() if(!loaded_tank) return diff --git a/code/modules/power/engines/singularity/field_generator.dm b/code/modules/power/engines/singularity/field_generator.dm index 26236c1d6d6b..cc75a1e73784 100644 --- a/code/modules/power/engines/singularity/field_generator.dm +++ b/code/modules/power/engines/singularity/field_generator.dm @@ -18,7 +18,7 @@ field_generator power level display #define FG_CHARGING 1 #define FG_ONLINE 2 -GLOBAL_LIST_INIT(field_generator_fields, list()) +GLOBAL_LIST_EMPTY(field_generator_fields) /obj/machinery/field/generator name = "Field Generator" diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 6e1521459842..2436845b1eb1 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -61,12 +61,13 @@ if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user)) return - if(istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder)) - var/obj/item/ammo_box/magazine/internal/cylinder/C = magazine - C.spin() - chamber_round(0) - playsound(get_turf(user), 'sound/weapons/revolver_spin.ogg', 50, 1) - user.visible_message("[usr] spins [src]'s chamber.", "You spin [src]'s chamber.") + if(!istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder)) + return ..() + var/obj/item/ammo_box/magazine/internal/cylinder/C = magazine + C.spin() + chamber_round(0) + playsound(get_turf(user), 'sound/weapons/revolver_spin.ogg', 50, TRUE) + user.visible_message("[user] spins [src]'s chamber.", "You spin [src]'s chamber.") /obj/item/gun/projectile/revolver/can_shoot() return get_ammo(0,0) diff --git a/code/modules/projectiles/projectile/homing_projectiles.dm b/code/modules/projectiles/projectile/homing_projectiles.dm index e2e5d623182d..93d07b648abe 100644 --- a/code/modules/projectiles/projectile/homing_projectiles.dm +++ b/code/modules/projectiles/projectile/homing_projectiles.dm @@ -37,6 +37,7 @@ icon_state = "toolbox_default" hitsound = 'sound/weapons/smash.ogg' damage = 30 + nodamage = FALSE damage_type = BRUTE /obj/item/projectile/homing/magic/toolbox/on_range() diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 259512c15f67..dd1ef9b10c07 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -593,6 +593,8 @@ color = "#5BCBE1" addiction_chance = 1 addiction_threshold = 10 + allowed_overdose_process = TRUE + overdose_threshold = 35 harmless = FALSE taste_description = "antihistamine" @@ -608,6 +610,44 @@ M.visible_message("[M] looks a bit dazed.") return ..() +/datum/reagent/medicine/diphenhydramine/overdose_process(mob/living/M, severity) + var/list/overdose_info = ..() + var/effect = overdose_info[REAGENT_OVERDOSE_EFFECT] + var/update_flags = overdose_info[REAGENT_OVERDOSE_FLAGS] + if(severity == 1) + if(effect <= 2) + to_chat(M, "You feel parched.") + else if(effect <= 3) + to_chat(M, "You feel a little off.") + M.Dizzy(10 SECONDS) + else if(effect <= 5) + to_chat(M, "You feel a sudden head rush.") + M.emote("faint") + else if(effect <= 8) + M.Druggy(30 SECONDS) + + else if(severity == 2) + if(effect <= 15) + M.AdjustHallucinate(30 SECONDS) + if(effect <= 4) + M.visible_message("[M] suddenly and violently vomits!") + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.vomit(20) + else if(effect <= 10) + M.visible_message( + "[M] seems to be itching themselves incessantly!", + "You feel bugs crawling under your skin!" + ) + M.emote("scream") + else if(effect <= 15) + to_chat(M, "You feel a wave of drowsiness wash over you.") + M.SetSleeping(5 SECONDS) + else if(effect <= 20) + to_chat(M, "Something doesn't feel quite right!") + M.Druggy(30 SECONDS) + return list(effect, update_flags) + /datum/reagent/medicine/morphine name = "Morphine" id = "morphine" diff --git a/code/modules/reagents/chemistry/reagents/misc_reagents.dm b/code/modules/reagents/chemistry/reagents/misc_reagents.dm index 21992688b686..e928195a17f7 100644 --- a/code/modules/reagents/chemistry/reagents/misc_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/misc_reagents.dm @@ -246,7 +246,7 @@ taste_description = "a carpet...what?" /datum/reagent/carpet/reaction_turf(turf/simulated/T, volume) - if(istype(T, /turf/simulated/floor/plating) || istype(T, /turf/simulated/floor/plasteel)) + if((istype(T, /turf/simulated/floor/plating) || istype(T, /turf/simulated/floor/plasteel)) && !islava(T)) var/turf/simulated/floor/F = T F.ChangeTurf(/turf/simulated/floor/carpet) ..() diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 2e531fb2c63f..7e4f46626940 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -307,6 +307,11 @@ container_type = OPENCONTAINER dog_fashion = /datum/dog_fashion/head/bucket +/obj/item/reagent_containers/glass/bucket/update_overlays() + . = ..() + if(!is_open_container()) + . += "lid_[initial(icon_state)]" + /obj/item/reagent_containers/glass/bucket/wooden name = "wooden bucket" icon_state = "woodbucket" diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 5f6d2b0f6813..601f25a09f0a 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -3,8 +3,8 @@ #define DIRECTION_REVERSED -1 #define IS_OPERATING (operating && can_conveyor_run()) -GLOBAL_LIST_INIT(conveyor_belts, list()) //Saves us having to look through the entire machines list for our things -GLOBAL_LIST_INIT(conveyor_switches, list()) +GLOBAL_LIST_EMPTY(conveyor_belts) //Saves us having to look through the entire machines list for our things +GLOBAL_LIST_EMPTY(conveyor_switches) //conveyor2 is pretty much like the original, except it supports corners, but not diverters. //Except this is pretty heavily modified so it's more like conveyor2.5 diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 43d40ddec061..f9f56bbf8d01 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -273,8 +273,8 @@ origin_tech = "materials=5;programming=4;biotech=4" /obj/item/organ/internal/cyberimp/brain/wire_interface/insert(mob/living/carbon/M, special = FALSE) + ..() ADD_TRAIT(M, TRAIT_SHOW_WIRE_INFO, "show_wire_info[UID()]") - return ..() /obj/item/organ/internal/cyberimp/brain/wire_interface/remove(mob/living/carbon/M, special = FALSE) REMOVE_TRAIT(M, TRAIT_SHOW_WIRE_INFO, "show_wire_info[UID()]") @@ -504,8 +504,8 @@ E.droplimb(TRUE) //lego disasemble sound /obj/item/organ/internal/cyberimp/chest/ipc_joints/magnetic_joints/insert(mob/living/carbon/M, special = FALSE) + ..() ADD_TRAIT(M, TRAIT_IPC_JOINTS_MAG, "ipc_joint[UID()]") - return ..() /obj/item/organ/internal/cyberimp/chest/ipc_joints/magnetic_joints/remove(mob/living/carbon/M, special = FALSE) REMOVE_TRAIT(M, TRAIT_IPC_JOINTS_MAG, "ipc_joint[UID()]") @@ -526,9 +526,9 @@ return weaken_time /obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed/insert(mob/living/carbon/M, special = FALSE) + ..() ADD_TRAIT(M, TRAIT_IPC_JOINTS_SEALED, "ipc_joint[UID()]") owner.physiology.stamina_mod *= 1.15 //15% more stamina damage, representing extra friction in limbs. I guess. - return ..() /obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed/remove(mob/living/carbon/M, special = FALSE) REMOVE_TRAIT(M, TRAIT_IPC_JOINTS_SEALED, "ipc_joint[UID()]") diff --git a/code/modules/surgery/organs/brain.dm b/code/modules/surgery/organs/brain.dm index dae96b5f24f8..36fd7ed612e3 100644 --- a/code/modules/surgery/organs/brain.dm +++ b/code/modules/surgery/organs/brain.dm @@ -9,7 +9,7 @@ throw_range = 5 origin_tech = "biotech=5" attack_verb = list("attacked", "slapped", "whacked") - var/mob/living/carbon/brain/brainmob = null + var/mob/living/brain/brainmob = null organ_tag = "brain" parent_organ = "head" slot = "brain" diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 4a913730ba9d..682dd5469202 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -182,9 +182,10 @@ H.f_style = "Shaved" C.m_styles["head"] = "None" user.visible_message( - "[user] has attached [C]'s [src] to the [amputation_point].", - "You have attached [C]'s [src] to the [amputation_point].") - return TRUE + "[user] has attached [C]'s [src] to the [amputation_point].", + "You have attached [C]'s [src] to the [amputation_point].") + return TRUE + /obj/item/organ/external/replaced(mob/living/carbon/human/target) owner = target loc = null @@ -306,8 +307,7 @@ //And pass the pain around var/obj/item/organ/external/target = pick(possible_points) target.receive_damage(brute, burn, sharp, used_weapon, forbidden_limbs + src, ignore_resists = TRUE) //If the damage was reduced before, don't reduce it again - - if(dismember_at_max_damage && body_part != UPPER_TORSO && body_part != LOWER_TORSO && !HAS_TRAIT(owner, TRAIT_IPC_JOINTS_SEALED)) // We've ensured all damage to the mob is retained, now let's drop it, if necessary. + if(owner && dismember_at_max_damage && body_part != UPPER_TORSO && body_part != LOWER_TORSO && !HAS_TRAIT(owner, TRAIT_IPC_JOINTS_SEALED)) // We've ensured all damage to the mob is retained, now let's drop it, if necessary. droplimb(1) //Clean loss, just drop the limb and be done var/mob/living/carbon/owner_old = owner //Need to update health, but need a reference in case the below check cuts off a limb. diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 3e8364f001a5..fa5d3f53d58b 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -1,5 +1,3 @@ -GLOBAL_LIST_EMPTY(limb_icon_cache) - /obj/item/organ/external/proc/compile_icon() // I do this so the head's overlays don't get obliterated for(var/child_i in child_icons) diff --git a/code/modules/surgery/organs/robolimbs.dm b/code/modules/surgery/organs/robolimbs.dm index 2696c4150f84..8f53727e6971 100644 --- a/code/modules/surgery/organs/robolimbs.dm +++ b/code/modules/surgery/organs/robolimbs.dm @@ -1,5 +1,4 @@ GLOBAL_LIST_EMPTY(all_robolimbs) -GLOBAL_LIST_EMPTY(chargen_robolimbs) GLOBAL_LIST_EMPTY(selectable_robolimbs) GLOBAL_DATUM(basic_robolimb, /datum/robolimb) diff --git a/code/modules/tgui/states/contained.dm b/code/modules/tgui/states/contained.dm index 3fe0cfc6b79c..bee64b759e2d 100644 --- a/code/modules/tgui/states/contained.dm +++ b/code/modules/tgui/states/contained.dm @@ -4,9 +4,11 @@ * Checks that the user is inside the src_object. */ +/* GLOBAL_DATUM_INIT(contained_state, /datum/ui_state/contained_state, new) /datum/ui_state/contained_state/can_use_topic(atom/src_object, mob/user) if(!src_object.contains(user)) return STATUS_CLOSE return user.shared_ui_interaction(src_object) +*/ diff --git a/code/modules/tgui/states/notcontained.dm b/code/modules/tgui/states/notcontained.dm index cb05fd2ebfca..fd604cc78716 100644 --- a/code/modules/tgui/states/notcontained.dm +++ b/code/modules/tgui/states/notcontained.dm @@ -4,6 +4,7 @@ * Checks that the user is not inside src_object, and then makes the default checks. */ +/* GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new) /datum/ui_state/notcontained_state/can_use_topic(atom/src_object, mob/user) @@ -21,3 +22,4 @@ GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new) /mob/living/silicon/notcontained_can_use_topic(src_object) return default_can_use_topic(src_object) // Silicons use default bevhavior. +*/ diff --git a/code/modules/tgui/states/zlevel_state.dm b/code/modules/tgui/states/zlevel_state.dm index 892e5a0510ed..1f4ca3b37cf4 100644 --- a/code/modules/tgui/states/zlevel_state.dm +++ b/code/modules/tgui/states/zlevel_state.dm @@ -4,6 +4,7 @@ * Only checks that the Z-level of the user and src_object are the same. */ +/* GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new) /datum/ui_state/z_state/can_use_topic(src_object, mob/user) @@ -12,3 +13,4 @@ GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new) if(turf_obj && turf_usr && turf_obj.z == turf_usr.z) return STATUS_INTERACTIVE return STATUS_CLOSE +*/ diff --git a/icons/_nanomaps/Delta_nanomap_z1.png b/icons/_nanomaps/Delta_nanomap_z1.png index ea08217e00d2..7f49a54c201a 100644 Binary files a/icons/_nanomaps/Delta_nanomap_z1.png and b/icons/_nanomaps/Delta_nanomap_z1.png differ diff --git a/icons/mob/clothing/back.dmi b/icons/mob/clothing/back.dmi index 4477b2d6c74a..016eec4eaf15 100644 Binary files a/icons/mob/clothing/back.dmi and b/icons/mob/clothing/back.dmi differ diff --git a/icons/mob/clothing/hands.dmi b/icons/mob/clothing/hands.dmi index 7bf07f9d8a74..0c3b6c4540a7 100644 Binary files a/icons/mob/clothing/hands.dmi and b/icons/mob/clothing/hands.dmi differ diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index fcac5dc7111b..ddc2be552320 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/modsuit/species/modules_vox.dmi b/icons/mob/clothing/modsuit/species/modules_vox.dmi new file mode 100644 index 000000000000..110a62782d8a Binary files /dev/null and b/icons/mob/clothing/modsuit/species/modules_vox.dmi differ diff --git a/icons/mob/clothing/modsuit/species/vox_modsuits.dmi b/icons/mob/clothing/modsuit/species/vox_modsuits.dmi new file mode 100644 index 000000000000..6597922d3ad9 Binary files /dev/null and b/icons/mob/clothing/modsuit/species/vox_modsuits.dmi differ diff --git a/icons/mob/clothing/species/drask/gloves.dmi b/icons/mob/clothing/species/drask/gloves.dmi index c9e90d5b12a1..2b97e9bf3c24 100644 Binary files a/icons/mob/clothing/species/drask/gloves.dmi and b/icons/mob/clothing/species/drask/gloves.dmi differ diff --git a/icons/mob/clothing/species/drask/head.dmi b/icons/mob/clothing/species/drask/head.dmi index c3ef64d89213..baef8c01ccb1 100644 Binary files a/icons/mob/clothing/species/drask/head.dmi and b/icons/mob/clothing/species/drask/head.dmi differ diff --git a/icons/mob/clothing/species/drask/suit.dmi b/icons/mob/clothing/species/drask/suit.dmi index 1fde8dff5b89..b4bf22f7f1ed 100644 Binary files a/icons/mob/clothing/species/drask/suit.dmi and b/icons/mob/clothing/species/drask/suit.dmi differ diff --git a/icons/mob/clothing/species/drask/under/civilian.dmi b/icons/mob/clothing/species/drask/under/civilian.dmi index 65abb049671a..53ce570efc56 100644 Binary files a/icons/mob/clothing/species/drask/under/civilian.dmi and b/icons/mob/clothing/species/drask/under/civilian.dmi differ diff --git a/icons/mob/clothing/species/grey/back.dmi b/icons/mob/clothing/species/grey/back.dmi index bfd7fd8310ee..88be281f984d 100644 Binary files a/icons/mob/clothing/species/grey/back.dmi and b/icons/mob/clothing/species/grey/back.dmi differ diff --git a/icons/mob/clothing/species/grey/gloves.dmi b/icons/mob/clothing/species/grey/gloves.dmi index 4ebc054e1570..e69bfd36bcc9 100644 Binary files a/icons/mob/clothing/species/grey/gloves.dmi and b/icons/mob/clothing/species/grey/gloves.dmi differ diff --git a/icons/mob/clothing/species/grey/head.dmi b/icons/mob/clothing/species/grey/head.dmi index de0ff0962870..155189889405 100644 Binary files a/icons/mob/clothing/species/grey/head.dmi and b/icons/mob/clothing/species/grey/head.dmi differ diff --git a/icons/mob/clothing/species/grey/suit.dmi b/icons/mob/clothing/species/grey/suit.dmi index b70786592df9..45f1f6cc44ae 100644 Binary files a/icons/mob/clothing/species/grey/suit.dmi and b/icons/mob/clothing/species/grey/suit.dmi differ diff --git a/icons/mob/clothing/species/grey/under/civilian.dmi b/icons/mob/clothing/species/grey/under/civilian.dmi index a05f1c920999..aef84913923f 100644 Binary files a/icons/mob/clothing/species/grey/under/civilian.dmi and b/icons/mob/clothing/species/grey/under/civilian.dmi differ diff --git a/icons/mob/clothing/species/kidan/gloves.dmi b/icons/mob/clothing/species/kidan/gloves.dmi index 540e694464c3..24cd2f8fe258 100644 Binary files a/icons/mob/clothing/species/kidan/gloves.dmi and b/icons/mob/clothing/species/kidan/gloves.dmi differ diff --git a/icons/mob/clothing/species/kidan/suit.dmi b/icons/mob/clothing/species/kidan/suit.dmi index bf89ab29c2aa..8e398165f2c2 100644 Binary files a/icons/mob/clothing/species/kidan/suit.dmi and b/icons/mob/clothing/species/kidan/suit.dmi differ diff --git a/icons/mob/clothing/species/kidan/under/civilian.dmi b/icons/mob/clothing/species/kidan/under/civilian.dmi new file mode 100644 index 000000000000..9c8d974d3361 Binary files /dev/null and b/icons/mob/clothing/species/kidan/under/civilian.dmi differ diff --git a/icons/mob/clothing/species/vox/back.dmi b/icons/mob/clothing/species/vox/back.dmi index b3c7e2dde1bc..25b86be5931b 100644 Binary files a/icons/mob/clothing/species/vox/back.dmi and b/icons/mob/clothing/species/vox/back.dmi differ diff --git a/icons/mob/clothing/species/vox/gloves.dmi b/icons/mob/clothing/species/vox/gloves.dmi index 42c84233b731..71d8a5ab9297 100644 Binary files a/icons/mob/clothing/species/vox/gloves.dmi and b/icons/mob/clothing/species/vox/gloves.dmi differ diff --git a/icons/mob/clothing/species/vox/head.dmi b/icons/mob/clothing/species/vox/head.dmi index 374d72b76984..846a0da40412 100644 Binary files a/icons/mob/clothing/species/vox/head.dmi and b/icons/mob/clothing/species/vox/head.dmi differ diff --git a/icons/mob/clothing/species/vox/suit.dmi b/icons/mob/clothing/species/vox/suit.dmi index 63c10abda38c..52aa1343e512 100644 Binary files a/icons/mob/clothing/species/vox/suit.dmi and b/icons/mob/clothing/species/vox/suit.dmi differ diff --git a/icons/mob/clothing/species/vox/under/civilian.dmi b/icons/mob/clothing/species/vox/under/civilian.dmi index 873a6838fd35..63f65aa8e3c0 100644 Binary files a/icons/mob/clothing/species/vox/under/civilian.dmi and b/icons/mob/clothing/species/vox/under/civilian.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index a7108da33bda..b034654674c5 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/mob/clothing/under/civilian.dmi b/icons/mob/clothing/under/civilian.dmi index 6eda3ab28105..3811856e8a7a 100644 Binary files a/icons/mob/clothing/under/civilian.dmi and b/icons/mob/clothing/under/civilian.dmi differ diff --git a/icons/mob/corgi_head.dmi b/icons/mob/corgi_head.dmi index 4ea3ac1a1d42..c3db618d381c 100644 Binary files a/icons/mob/corgi_head.dmi and b/icons/mob/corgi_head.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_Coffee.dmi b/icons/mob/human_races/human_skintones/r_human_Coffee.dmi index 1f9c0adc9bbd..20dd5bc45a90 100644 Binary files a/icons/mob/human_races/human_skintones/r_human_Coffee.dmi and b/icons/mob/human_races/human_skintones/r_human_Coffee.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_almond.dmi b/icons/mob/human_races/human_skintones/r_human_almond.dmi new file mode 100644 index 000000000000..668ca8f74d9c Binary files /dev/null and b/icons/mob/human_races/human_skintones/r_human_almond.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_bronzed.dmi b/icons/mob/human_races/human_skintones/r_human_bronzed.dmi new file mode 100644 index 000000000000..ff9f3588684d Binary files /dev/null and b/icons/mob/human_races/human_skintones/r_human_bronzed.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_caramel.dmi b/icons/mob/human_races/human_skintones/r_human_caramel.dmi new file mode 100644 index 000000000000..57ceabbf26a9 Binary files /dev/null and b/icons/mob/human_races/human_skintones/r_human_caramel.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_latte.dmi b/icons/mob/human_races/human_skintones/r_human_latte.dmi new file mode 100644 index 000000000000..35a4b3426391 Binary files /dev/null and b/icons/mob/human_races/human_skintones/r_human_latte.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_pale.dmi b/icons/mob/human_races/human_skintones/r_human_pale.dmi index d6abcc0eaf2d..46b61fd43257 100644 Binary files a/icons/mob/human_races/human_skintones/r_human_pale.dmi and b/icons/mob/human_races/human_skintones/r_human_pale.dmi differ diff --git a/icons/mob/human_races/human_skintones/r_human_sienna.dmi b/icons/mob/human_races/human_skintones/r_human_sienna.dmi new file mode 100644 index 000000000000..82f322d96d7b Binary files /dev/null and b/icons/mob/human_races/human_skintones/r_human_sienna.dmi differ diff --git a/icons/mob/inhands/clothing_lefthand.dmi b/icons/mob/inhands/clothing_lefthand.dmi index 7a7e065d75f5..8f9f52bd6213 100644 Binary files a/icons/mob/inhands/clothing_lefthand.dmi and b/icons/mob/inhands/clothing_lefthand.dmi differ diff --git a/icons/mob/inhands/clothing_righthand.dmi b/icons/mob/inhands/clothing_righthand.dmi index c1b5ab5e2bed..b436595e7311 100644 Binary files a/icons/mob/inhands/clothing_righthand.dmi and b/icons/mob/inhands/clothing_righthand.dmi differ diff --git a/icons/mob/inhands/equipment/custodial_lefthand.dmi b/icons/mob/inhands/equipment/custodial_lefthand.dmi index 2367540f0e1f..884b23465cb9 100644 Binary files a/icons/mob/inhands/equipment/custodial_lefthand.dmi and b/icons/mob/inhands/equipment/custodial_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/custodial_righthand.dmi b/icons/mob/inhands/equipment/custodial_righthand.dmi index 9c7d8be238a4..8ddb7703cf66 100644 Binary files a/icons/mob/inhands/equipment/custodial_righthand.dmi and b/icons/mob/inhands/equipment/custodial_righthand.dmi differ diff --git a/icons/obj/clothing/gloves.dmi b/icons/obj/clothing/gloves.dmi index f9ec36b54a6c..184e41c728a2 100644 Binary files a/icons/obj/clothing/gloves.dmi and b/icons/obj/clothing/gloves.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 5aedfb731b7c..aaf4877597a3 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index e3a7bb2f2183..2660087f11cb 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/clothing/under/civilian.dmi b/icons/obj/clothing/under/civilian.dmi index 770a8cd46796..774f95bf8684 100644 Binary files a/icons/obj/clothing/under/civilian.dmi and b/icons/obj/clothing/under/civilian.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index de549408ec30..ad01b97b5320 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/food/food.dmi b/icons/obj/food/food.dmi index 10287972d094..545769dc7741 100644 Binary files a/icons/obj/food/food.dmi and b/icons/obj/food/food.dmi differ diff --git a/icons/obj/food/frozen_treats.dmi b/icons/obj/food/frozen_treats.dmi new file mode 100644 index 000000000000..8bc389272a54 Binary files /dev/null and b/icons/obj/food/frozen_treats.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index 05e713412ed1..13c552d4790b 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/janitor.dmi b/icons/obj/janitor.dmi index 3ac46fc3384f..0d7d9a0930b2 100644 Binary files a/icons/obj/janitor.dmi and b/icons/obj/janitor.dmi differ diff --git a/icons/obj/robot_parts.dmi b/icons/obj/robot_parts.dmi index d87e4714339a..6007ec7b22be 100644 Binary files a/icons/obj/robot_parts.dmi and b/icons/obj/robot_parts.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 17f152fe280d..06c7aa560835 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/icons/obj/supermatter.dmi b/icons/obj/supermatter.dmi index aa161c55679b..4cc94097dcba 100644 Binary files a/icons/obj/supermatter.dmi and b/icons/obj/supermatter.dmi differ diff --git a/icons/obj/trash.dmi b/icons/obj/trash.dmi index 95af0f67b584..f9b8b5bb7f39 100644 Binary files a/icons/obj/trash.dmi and b/icons/obj/trash.dmi differ diff --git a/modular_ss220/emotes/code/emote_translations.dm b/modular_ss220/emotes/code/emote_translations.dm index 8d3033658ce4..eb6f3ce2bb5a 100644 --- a/modular_ss220/emotes/code/emote_translations.dm +++ b/modular_ss220/emotes/code/emote_translations.dm @@ -232,7 +232,7 @@ /datum/emote/living/carbon/yawn message = "зевает." muzzled_noises = list("устало", "медленно", "сонно") - emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH | EMOTE_SOUND + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH /datum/emote/living/carbon/exhale message = "выдыхает." @@ -503,31 +503,31 @@ /// Brain Emotes /// /////////////////// -/datum/emote/living/carbon/brain/alarm +/datum/emote/living/brain/alarm message = "подает сигнал тревоги." self_message = "Вы подаете сигнал тревоги." -/datum/emote/living/carbon/brain/alert +/datum/emote/living/brain/alert message = "издаёт страдальческий звук." self_message = "Вы издаёте страдальческий звук." -/datum/emote/living/carbon/brain/notice +/datum/emote/living/brain/notice message = "воспроизводит громкий звук." self_message = "Вы воспроизводите громкий звук." -/datum/emote/living/carbon/brain/flash +/datum/emote/living/brain/flash message = "начинает быстро мигать лампочками!" -/datum/emote/living/carbon/brain/whistle +/datum/emote/living/brain/whistle message = "свистит." self_message = "Вы свистите." - emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH | EMOTE_SOUND + emote_type = EMOTE_AUDIBLE | EMOTE_MOUTH sound = "modular_ss220/emotes/audio/whistle.ogg" -/datum/emote/living/carbon/brain/beep +/datum/emote/living/brain/beep message = "бипает." self_message = "Вы бипаете." -/datum/emote/living/carbon/brain/boop +/datum/emote/living/brain/boop message = "бупает." self_message = "вы бупаете." diff --git a/modular_ss220/gateway/_gateway.dme b/modular_ss220/gateway/_gateway.dme index a07e04caa1db..37a43303cb27 100644 --- a/modular_ss220/gateway/_gateway.dme +++ b/modular_ss220/gateway/_gateway.dme @@ -4,3 +4,4 @@ #include "code/gateway.dm" #include "code/gateway_config.dm" #include "code/gateway_initialize.dm" +#include "code/landmark.dm" diff --git a/modular_ss220/gateway/code/landmark.dm b/modular_ss220/gateway/code/landmark.dm new file mode 100644 index 000000000000..1ae8869fa663 --- /dev/null +++ b/modular_ss220/gateway/code/landmark.dm @@ -0,0 +1,10 @@ +/obj/effect/landmark/awaystart + name = "awaystart" + icon = 'icons/effects/spawner_icons.dmi' + icon_state = "Assistant" + +INITIALIZE_IMMEDIATE(/obj/effect/landmark/awaystart) //Without this away missions break + +/obj/effect/landmark/awaystart/Initialize(mapload) + GLOB.awaydestinations.Add(src) + return ..() diff --git a/modular_ss220/jobs/code/objects/medical_job_objects.dm b/modular_ss220/jobs/code/objects/medical_job_objects.dm index 76b3e9782d87..253c25a5aa49 100644 --- a/modular_ss220/jobs/code/objects/medical_job_objects.dm +++ b/modular_ss220/jobs/code/objects/medical_job_objects.dm @@ -17,7 +17,7 @@ . = ..() allowed_roles |= GLOB.medical_positions_ss220 -/datum/gear/medhudgoggles/New() +/datum/gear/glasses/goggles_job/medhudgoggles/New() . = ..() allowed_roles |= GLOB.medical_positions_ss220 diff --git a/modular_ss220/jobs/code/objects/science_job_objects.dm b/modular_ss220/jobs/code/objects/science_job_objects.dm index b5cfd535d901..861a8c1fabe4 100644 --- a/modular_ss220/jobs/code/objects/science_job_objects.dm +++ b/modular_ss220/jobs/code/objects/science_job_objects.dm @@ -17,7 +17,7 @@ . = ..() allowed_roles |= GLOB.science_positions_ss220 -/datum/gear/diaghudgoggles/New() +/datum/gear/glasses/goggles_job/diaghudgoggles/New() . = ..() allowed_roles |= GLOB.science_positions_ss220 diff --git a/modular_ss220/jobs/code/objects/security_job_objects.dm b/modular_ss220/jobs/code/objects/security_job_objects.dm index 6eb2167daa48..f25df87d296f 100644 --- a/modular_ss220/jobs/code/objects/security_job_objects.dm +++ b/modular_ss220/jobs/code/objects/security_job_objects.dm @@ -14,11 +14,11 @@ . = ..() allowed_roles |= GLOB.security_positions_ss220 -/datum/gear/sechud/New() +/datum/gear/glasses/sechud/New() . = ..() allowed_roles |= GLOB.security_positions_ss220 -/datum/gear/sechudgoggles/New() +/datum/gear/glasses/goggles_job/sechudgoggles/New() . = ..() allowed_roles |= GLOB.security_positions_ss220 diff --git a/paradise.dme b/paradise.dme index 438f05c686b1..fee71a46eb22 100644 --- a/paradise.dme +++ b/paradise.dme @@ -132,7 +132,6 @@ #include "code\__HELPERS\colour_helpers.dm" #include "code\__HELPERS\constants.dm" #include "code\__HELPERS\debugger.dm" -#include "code\__HELPERS\experimental.dm" #include "code\__HELPERS\files.dm" #include "code\__HELPERS\filters.dm" #include "code\__HELPERS\game.dm" @@ -1546,7 +1545,6 @@ #include "code\modules\client\preference\link_processing.dm" #include "code\modules\client\preference\preferences.dm" #include "code\modules\client\preference\preferences_mysql.dm" -#include "code\modules\client\preference\preferences_spawnpoints.dm" #include "code\modules\client\preference\preferences_toggles.dm" #include "code\modules\client\preference\preferences_volume_mixer.dm" #include "code\modules\client\preference\loadout\gear_tweaks.dm" @@ -1751,6 +1749,7 @@ #include "code\modules\food_and_drinks\food\foods\candy.dm" #include "code\modules\food_and_drinks\food\foods\desserts.dm" #include "code\modules\food_and_drinks\food\foods\ethnic.dm" +#include "code\modules\food_and_drinks\food\foods\frozen.dm" #include "code\modules\food_and_drinks\food\foods\ingredients.dm" #include "code\modules\food_and_drinks\food\foods\junkfood.dm" #include "code\modules\food_and_drinks\food\foods\meat.dm" @@ -2018,6 +2017,16 @@ #include "code\modules\mob\living\login.dm" #include "code\modules\mob\living\stat_states.dm" #include "code\modules\mob\living\taste.dm" +#include "code\modules\mob\living\brain\brain_death.dm" +#include "code\modules\mob\living\brain\brain_emote.dm" +#include "code\modules\mob\living\brain\brain_life.dm" +#include "code\modules\mob\living\brain\brain_login.dm" +#include "code\modules\mob\living\brain\brain_say.dm" +#include "code\modules\mob\living\brain\brain_update_status.dm" +#include "code\modules\mob\living\brain\living_brain.dm" +#include "code\modules\mob\living\brain\MMI.dm" +#include "code\modules\mob\living\brain\MMI_radio.dm" +#include "code\modules\mob\living\brain\robotic_brain.dm" #include "code\modules\mob\living\carbon\_defines.dm" #include "code\modules\mob\living\carbon\carbon.dm" #include "code\modules\mob\living\carbon\carbon_death.dm" @@ -2056,16 +2065,6 @@ #include "code\modules\mob\living\carbon\alien\larva\larva_update_icons.dm" #include "code\modules\mob\living\carbon\alien\special\alien_embryo.dm" #include "code\modules\mob\living\carbon\alien\special\facehugger.dm" -#include "code\modules\mob\living\carbon\brain\brain_death.dm" -#include "code\modules\mob\living\carbon\brain\brain_emote.dm" -#include "code\modules\mob\living\carbon\brain\brain_life.dm" -#include "code\modules\mob\living\carbon\brain\brain_login.dm" -#include "code\modules\mob\living\carbon\brain\brain_say.dm" -#include "code\modules\mob\living\carbon\brain\brain_update_status.dm" -#include "code\modules\mob\living\carbon\brain\carbon_brain.dm" -#include "code\modules\mob\living\carbon\brain\MMI.dm" -#include "code\modules\mob\living\carbon\brain\MMI_radio.dm" -#include "code\modules\mob\living\carbon\brain\robotic_brain.dm" #include "code\modules\mob\living\carbon\human\appearance.dm" #include "code\modules\mob\living\carbon\human\body_accessories.dm" #include "code\modules\mob\living\carbon\human\human_damage.dm" diff --git a/sound/effects/clingscream.ogg b/sound/effects/clingscream.ogg new file mode 100644 index 000000000000..6215a93f2520 Binary files /dev/null and b/sound/effects/clingscream.ogg differ diff --git a/sound/weapons/armblade.ogg b/sound/weapons/armblade.ogg new file mode 100644 index 000000000000..39a3248d2a9f Binary files /dev/null and b/sound/weapons/armblade.ogg differ diff --git a/tgui/packages/tgui/interfaces/ChemDispenser.js b/tgui/packages/tgui/interfaces/ChemDispenser.js index a6aa88352373..d819fec6e6d1 100644 --- a/tgui/packages/tgui/interfaces/ChemDispenser.js +++ b/tgui/packages/tgui/interfaces/ChemDispenser.js @@ -81,7 +81,7 @@ const ChemDispenserChemicals = (properties, context) => { return (
{ return (
diff --git a/tgui/packages/tgui/interfaces/Uplink.js b/tgui/packages/tgui/interfaces/Uplink.js index edd8c3c87207..1906c5403f76 100644 --- a/tgui/packages/tgui/interfaces/Uplink.js +++ b/tgui/packages/tgui/interfaces/Uplink.js @@ -246,11 +246,14 @@ const Advert = (_properties, context) => { } > - {lucky_numbers.map((number, index) => ( - - - - ))} + {lucky_numbers + .map((number) => cats[number.cat].items[number.item]) + .filter((item) => item !== undefined && item !== null) + .map((item, index) => ( + + + + ))}
); diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index f8320dab744d..027d32f5b224 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -2,4 +2,4 @@ /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var a,c=n.document,i=c.createElement("link");if(t)a=t;else{var l=(c.body||c.getElementsByTagName("head")[0]).childNodes;a=l[l.length-1]}var d=c.styleSheets;if(r)for(var u in r)r.hasOwnProperty(u)&&i.setAttribute(u,r[u]);i.rel="stylesheet",i.href=e,i.media="only x",function p(e){if(c.body)return e();setTimeout((function(){p(e)}))}((function(){a.parentNode.insertBefore(i,t?a:a.nextSibling)}));var s=function h(e){for(var t=i.href,n=d.length;n--;)if(d[n].href===t)return e();setTimeout((function(){h(e)}))};function m(){i.addEventListener&&i.removeEventListener("load",m),i.media=o||"all"}return i.addEventListener&&i.addEventListener("load",m),i.onloadcssdefined=s,s(m),i}}).call(this,n(171))},function(e,t,n){"use strict";var o=function(e){var t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(L){i=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var r=t&&t.prototype instanceof s?t:s,a=Object.create(r.prototype),c=new y(o||[]);return a._invoke=function(e,t,n){var o="suspendedStart";return function(r,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw a;return k()}for(n.method=r,n.arg=a;;){var c=n.delegate;if(c){var i=g(c,n);if(i){if(i===u)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=d(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,c),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=l;var u={};function s(){}function m(){}function p(){}var h={};i(h,r,(function(){return this}));var f=Object.getPrototypeOf,C=f&&f(f(x([])));C&&C!==t&&n.call(C,r)&&(h=C);var N=p.prototype=s.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function V(e,t){var o;this._invoke=function(r,a){function c(){return new t((function(o,c){!function i(o,r,a,c){var l=d(e[o],e,r);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){i("next",e,a,c)}),(function(e){i("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,c)}))}c(l.arg)}(r,a,o,c)}))}return o=o?o.then(c,c):c()}}function g(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function x(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;_(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";t.__esModule=!0,t.vecSubtract=t.vecScale=t.vecNormalize=t.vecMultiply=t.vecLength=t.vecInverse=t.vecDivide=t.vecCreate=t.vecAdd=void 0;var o=n(26);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n3?i(c):null,V=String(c.key),g=String(c.char),v=c.location,_=c.keyCode||(c.keyCode=V)&&V.charCodeAt(0)||0,y=c.charCode||(c.charCode=g)&&g.charCodeAt(0)||0,x=c.bubbles,k=c.cancelable,L=c.repeat,w=c.locale,B=c.view||e;if(c.which||(c.which=c.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,x,k,B,p,f,h,C,_,y);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,a){o=a,n=!1,e=undefined,t.dispatchEvent(r)}function a(e){this.value=e}function i(){t++,this.__ce__=new c("@DOMMap:"+t+Math.random())}return a.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},i.prototype={constructor:i,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new a(t),!1),this}},i}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,a,c=e.CustomEvent,i=e.dispatchEvent,l=e.addEventListener,d=e.removeEventListener,u=0,s=function(){u++},m=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{l("_",s,{once:!0}),i(new c("_")),i(new c("_")),d("_",s,{once:!0})}catch(h){}1!==u&&(a=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,c){if(c&&"boolean"!=typeof c){var i,l,d,u=a.get(this),s=p(c);u||a.set(this,u=new n),t in u||(u[t]={handler:[],wrap:[]}),l=u[t],(i=m.call(l.handler,r))<0?(i=l.handler.push(r)-1,l.wrap[i]=d=new n):d=l.wrap[i],s in d||(d[s]=o(t,r,c),e.call(this,t,d[s],d[s].capture))}else e.call(this,t,r,c)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,c,i,l,d=a.get(this);if(d&&t in d&&(i=d[t],-1<(c=m.call(i.handler,n))&&(r=p(o))in(l=i.wrap[c]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;i.handler.splice(c,1),i.wrap.splice(c,1),0===i.handler.length&&delete d[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(t,n){var o,r,a=t.html5||{},c=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,i=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,l=0,d={};function u(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function s(e){var t=d[e._html5shiv];return t||(t={},l++,e._html5shiv=l,d[l]=t),t}function m(e,t,o){return t||(t=n),r?t.createElement(e):(o||(o=s(t)),!(a=o.cache[e]?o.cache[e].cloneNode():i.test(e)?(o.cache[e]=o.createElem(e)).cloneNode():o.createElem(e)).canHaveChildren||c.test(e)||a.tagUrn?a:o.frag.appendChild(a));var a}function p(e){e||(e=n);var t=s(e);return!h.shivCSS||o||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),o=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",o.insertBefore(n.lastChild,o.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?m(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+u().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",o="hidden"in e,r=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){o=!0,r=!0}}();var h={elements:a.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==a.shivCSS,supportsUnknownElements:r,shivMethods:!1!==a.shivMethods,type:"default",shivDocument:p,createElement:m,createDocumentFragment:function(e,t){if(e||(e=n),r)return e.createDocumentFragment();for(var o=(t=t||s(e)).frag.cloneNode(),a=0,c=u(),i=c.length;a1?r-1:0),c=1;c1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(0),r=n(8),a=n(510),c=n(33),i=n(82),l=n(22),d=["params"],u=["params"],s=["parent","params"];function m(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=(0,i.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,l),N=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),c=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],c[0]=n[1]),o!==undefined&&(a[1]=o[0],c[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,c,t)}))(e)}(a,N,c,d);if(b.length>0){var V=b[0],g=b[b.length-1];b.push([N[0]+f,g[1]]),b.push([N[0]+f,-f]),b.push([-f,-f]),b.push([-f,V[1]])}var v=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,c);return(0,o.createVNode)(1,"div","Collapsible",[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:d,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},m,{children:u}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})],0)},l}(o.Component);t.Collapsible=l},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(8),a=n(22),c=["content","children","className","color","backgroundColor"];var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,l=e.backgroundColor,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return d.color=t?null:"transparent",d.backgroundColor=i||l,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(d)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(d))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(8),a=n(22),c=n(165),i=["color","over","noscroll","nochevron","width","onClick","selected","disabled"],l=["className"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).state={open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var m=s.prototype;return m.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},m.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},m.setSelected=function(e){this.setOpen(!1),this.props.onSelected(e)},m.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},m.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,m=t.noscroll,p=t.nochevron,h=t.width,f=(t.onClick,t.selected),C=t.disabled,N=d(t,i),b=N.className,V=d(N,l),g=s?!this.state.open:this.state.open,v=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([m?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:h}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:h,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,C&&"Button--disabled",b])},V,{onClick:function(){C&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",f,0),!!p||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,c.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),v],0)},s}(o.Component);t.Dropdown=s},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(8),a=n(22),c=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],i=["className","fluid"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return(0,r.isFalsy)(e)?"":e},s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=u(t.props.value),void e.target.blur()):void 0},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var m=s.prototype;return m.componentDidMount=function(){var e=this,t=this.props.value,n=this.inputRef.current;n&&(n.value=u(t)),(this.props.autoFocus||this.props.autoSelect)&&setTimeout((function(){n.focus(),e.props.autoSelect&&n.select()}),1)},m.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=u(r))},m.setEditing=function(e){this.setState({editing:e})},m.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,d=(e.autofocus,e.disabled),u=e.multiline,s=e.cols,m=void 0===s?32:s,p=e.rows,h=void 0===p?4:p,f=l(e,c),C=f.className,N=f.fluid,b=l(f,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",N&&"Input--fluid",d&&"Input--disabled",C])},b,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),u?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:m,rows:h,disabled:d},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:d},null,this.inputRef)]})))},s}(o.Component);t.Input=s},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(12),a=n(8),c=n(33),i=n(22),l=n(224),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];t.Knob=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.style,_=e.fillValue,y=e.color,x=e.ranges,k=void 0===x?{}:x,L=e.size,w=e.bipolar,B=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=(0,r.scale)(null!=_?_:c,m,s),h=(0,r.scale)(c,m,s),f=y||(0,r.keyOfMatchingRange)(null!=_?_:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,w&&"Knob--bipolar",g,(0,i.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((w?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":L+"rem"},v)},S)),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(34),a=["children"],c=["label","children"];function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.children,n=i(e,a);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=l;l.Item=function(e){var t=e.label,n=e.children,a=i(e,c);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1),c=n(45),i=n(225);function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},s=function(e){function t(t){var n;n=e.call(this,t)||this;window.innerWidth,window.innerHeight;return n.state={offsetX:128,offsetY:48,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),u(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),u(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),u(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=1.5*(n-e.zoom);return e.zoom=n,e.offsetX=e.offsetX-262*r,e.offsetY=e.offsetY-256*r,t.onZoom&&t.onZoom(e.zoom),e}))},n}return l(t,e),t.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.dragging,c=t.offsetX,i=t.offsetY,l=t.zoom,d=void 0===l?1:l,u=this.props.children,s=e.map+"_nanomap_z1.png",m=510*d+"px",h={width:m,height:m,"margin-top":i+"px","margin-left":c+"px",overflow:"hidden",position:"relative","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:h,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"img",null,null,1,{src:s,style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,r.Box,{children:u})]}),(0,o.createComponentVNode)(2,p,{zoom:d,onZoom:this.handleZoom})]})},t}(o.Component);t.NanoMap=s;s.Marker=function(e,t){var n=e.x,a=e.y,c=e.zoom,i=void 0===c?1:c,l=e.icon,d=e.tooltip,u=e.color,s=2*n*i-i-3,m=2*a*i-i-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:m+"px",left:s+"px",children:[(0,o.createComponentVNode)(2,r.Icon,{name:l,color:u,fontSize:"6px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:d})]}),2)};var m,p=function(e,t){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:"1",maxValue:"8",stepPixelSize:"10",format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};s.Zoomer=p;var h=function(e){function t(t){var n;n=e.call(this,t)||this;var o=(0,a.useBackend)(n.props.context).act;return n.state={color:n.props.color},n.handleClick=function(e){m!==undefined&&m.setState({color:"blue"}),o("switch_camera",{name:n.props.name}),m=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),n.setState({color:"green"})},n}return l(t,e),t.prototype.render=function(){var e=2*this.props.x*this.props.zoom-this.props.zoom-3,t=2*this.props.y*this.props.zoom-this.props.zoom-3;return(0,o.createComponentVNode)(2,r.Button,{onClick:this.handleClick,position:"absolute",className:"NanoMap__button",lineHeight:"0",color:this.props.status?this.state.color:"red",bottom:t+"px",left:e+"px",children:(0,o.createComponentVNode)(2,r.Tooltip,{content:this.props.tooltip})},this.props.key)},t}(o.Component);s.NanoButton=h},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(8),a=n(22),c=n(221),i=["className","children","onEnter"];t.Modal=function(e){var t,n=e.className,l=e.children,d=e.onEnter,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);return d&&(t=function(e){13===e.keyCode&&d(e)}),(0,o.createComponentVNode)(2,c.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(u)]),l,0,Object.assign({},(0,a.computeBoxProps)(u))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(8),a=n(22),c=["className","color","info","warning","success","danger"];var i=function(e){var t=e.className,n=e.color,i=e.info,l=(e.warning,e.success),d=e.danger,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",l&&"NoticeBox--type--success",d&&"NoticeBox--type--danger",t])},u)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBarCountdown=t.ProgressBar=void 0;var o=n(0),r=n(12),a=n(8),c=n(22),i=["className","value","minValue","maxValue","color","ranges","children","fractionDigits"],l=["start","current","end"];function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=function(e){var t=e.className,n=e.value,l=e.minValue,d=void 0===l?0:l,s=e.maxValue,m=void 0===s?1:s,p=e.color,h=e.ranges,f=void 0===h?{}:h,C=e.children,N=e.fractionDigits,b=void 0===N?0:N,V=u(e,i),g=(0,r.scale)(n,d,m),v=C!==undefined,_=p||(0,r.keyOfMatchingRange)(n,f)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+_,t,(0,c.computeBoxClassName)(V)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(g)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",v?C:(0,r.toFixed)(100*g,b)+"%",0)],4,Object.assign({},(0,c.computeBoxProps)(V))))};t.ProgressBar=s,s.defaultHooks=a.pureComponentHooks;var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.current,0)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=Math.max(this.state.value+this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},a.componentWillUnmount=function(){clearInterval(this.timer)},a.render=function(){var e=this.props,t=e.start,n=(e.current,e.end),r=u(e,l),a=(this.state.value/100-t)/(n-t);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s,Object.assign({value:a},r)))},r}(o.Component);t.ProgressBarCountdown=m,m.defaultProps={rate:1e3},s.Countdown=m},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(8),a=n(22),c=["className","title","level","buttons","content","stretchContents","noTopPadding","showBottom","children"];var i=function(e){var t=e.className,n=e.title,i=e.level,l=void 0===i?1:i,d=e.buttons,u=e.content,s=e.stretchContents,m=e.noTopPadding,p=e.showBottom,h=void 0===p||p,f=e.children,C=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c),N=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(d),b=!(0,r.isFalsy)(u)||!(0,r.isFalsy)(f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+l,e.flexGrow&&"Section--flex",t])},C,{children:[N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__title",h&&"Section__title--showBottom"]),[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",d,0)],4),b&&(0,o.createComponentVNode)(2,a.Box,{className:(0,r.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!m&&"Section__content--noTopPadding"]),children:[u,f]})]})))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(8),a=n(22),c=n(164),i=["className","vertical","children"],l=["className","selected","altSelection"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,c=e.children,l=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,i=d(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},i)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":526,"./AIFixer.js":527,"./APC.js":528,"./ATM.js":529,"./AccountsUplinkTerminal.js":530,"./AgentCard.js":531,"./AiAirlock.js":532,"./AirAlarm.js":533,"./AirlockAccessController.js":534,"./AirlockElectronics.js":535,"./AppearanceChanger.js":536,"./AtmosAlertConsole.js":537,"./AtmosControl.js":538,"./AtmosFilter.js":539,"./AtmosMixer.js":540,"./AtmosPump.js":541,"./AtmosTankControl.js":542,"./Autolathe.js":543,"./Biogenerator.js":544,"./BlueSpaceArtilleryControl.js":547,"./BluespaceTap.js":548,"./BodyScanner.js":549,"./BookBinder.js":550,"./BotClean.js":551,"./BotFloor.js":552,"./BotHonk.js":553,"./BotMed.js":554,"./BotSecurity.js":555,"./BrigCells.js":556,"./BrigTimer.js":557,"./CameraConsole.js":558,"./CameraConsole220.js":559,"./Canister.js":560,"./CardComputer.js":561,"./CargoConsole.js":562,"./ChangelogView.js":563,"./ChemDispenser.js":564,"./ChemHeater.js":565,"./ChemMaster.js":566,"./CloningConsole.js":567,"./ColourMatrixTester.js":568,"./CommunicationsComputer.js":569,"./CompostBin.js":570,"./Contractor.js":571,"./ConveyorSwitch.js":572,"./CrewMonitor.js":573,"./Cryo.js":574,"./CryopodConsole.js":575,"./DNAModifier.js":576,"./DestinationTagger.js":577,"./DisposalBin.js":578,"./DnaVault.js":579,"./DroneConsole.js":580,"./EFTPOS.js":581,"./ERTManager.js":582,"./EconomyManager.js":583,"./Electropack.js":584,"./EmotePanel.js":585,"./EvolutionMenu.js":586,"./ExosuitFabricator.js":587,"./ExternalAirlockController.js":588,"./FaxMachine.js":589,"./FilingCabinet.js":590,"./FloorPainter.js":591,"./GPS.js":592,"./GeneModder.js":593,"./GenericCrewManifest.js":594,"./GhostHudPanel.js":595,"./GlandDispenser.js":596,"./GravityGen.js":597,"./GuestPass.js":598,"./HandheldChemDispenser.js":599,"./HealthSensor.js":600,"./Holodeck.js":601,"./ImplantPad.js":602,"./Instrument.js":603,"./Jukebox.js":604,"./KeycardAuth.js":605,"./KitchenMachine.js":606,"./LawManager.js":607,"./LibraryComputer.js":608,"./LibraryManager.js":609,"./ListInput.js":610,"./MODsuit.js":611,"./MagnetController.js":612,"./MechBayConsole.js":613,"./MechaControlConsole.js":614,"./MedicalRecords.js":615,"./MerchVendor.js":616,"./MiningVendor.js":617,"./ModpacksList.js":618,"./NTRecruiter.js":619,"./Newscaster.js":620,"./NuclearBomb.js":621,"./OperatingComputer.js":622,"./Orbit.js":623,"./OreRedemption.js":624,"./PAI.js":625,"./PDA.js":638,"./Pacman.js":655,"./ParticleAccelerator.js":656,"./PdaPainter.js":657,"./PersonalCrafting.js":658,"./Photocopier.js":659,"./Photocopier220.js":660,"./PoolController.js":661,"./PortablePump.js":662,"./PortableScrubber.js":663,"./PortableTurret.js":664,"./PowerMonitor.js":231,"./PrisonerImplantManager.js":665,"./PrisonerShuttleConsole.js":666,"./RCD.js":667,"./RPD.js":668,"./Radio.js":669,"./ReagentGrinder.js":670,"./RemoteSignaler.js":671,"./RequestConsole.js":672,"./RndConsole.js":83,"./RobotSelfDiagnosis.js":687,"./RoboticsControlConsole.js":688,"./Safe.js":689,"./SatelliteControl.js":690,"./SecureStorage.js":691,"./SecurityRecords.js":692,"./SeedExtractor.js":693,"./ShuttleConsole.js":694,"./ShuttleManipulator.js":695,"./Sleeper.js":696,"./SlotMachine.js":697,"./Smartfridge.js":698,"./Smes.js":699,"./SolarControl.js":700,"./SpawnersMenu.js":701,"./SpecMenu.js":702,"./StationAlertConsole.js":703,"./SuitStorage.js":704,"./SupermatterMonitor.js":705,"./SyndicateComputerSimple.js":706,"./TEG.js":707,"./TTSSeedsExplorer.js":708,"./TachyonArray.js":709,"./Tank.js":710,"./TankDispenser.js":711,"./TcommsCore.js":712,"./TcommsRelay.js":713,"./Teleporter.js":714,"./TempGun.js":715,"./ThermoMachine.js":716,"./TransferValve.js":717,"./TurbineComputer.js":718,"./Uplink.js":719,"./Vending.js":720,"./VolumeMixer.js":721,"./VotePanel.js":722,"./Wires.js":723,"./WizardApprenticeContract.js":724};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=525},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var d=null;return d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:d,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return i("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var d=!0;2!==l.stat&&null!==l.stat||(d=!1);var u=null;u=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var s=!0;return l.integrity>=100&&2!==l.stat&&(s=!1),(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:u,value:l.integrity/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:d?"green":"red",children:d?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!s||l.active,content:!s||l.active?"Already Repaired":"Repair",onClick:function(){return i("fix")}})})]}),(0,o.createComponentVNode)(2,a.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.APC=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=(u.normallyLocked,l[u.externalPower]||l[0]),p=l[u.chargingStatus]||l[0],h=u.powerChannels||[],f=d[u.malfStatus]||d[0],C=u.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[u.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return c(f.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",selected:u.coverLocked,disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",selected:u.nightshiftLights,onClick:function(){return c("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.emergencyLights?"Engaged":"Disengaged",selected:u.emergencyLights,disabled:s,onClick:function(){return c("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ATM=function(e,t){var n,p=(0,r.useBackend)(t),h=(p.act,p.data),f=h.view_screen,C=h.authenticated_account,N=h.ticks_left_locked_down,b=h.linked_db;if(N>0)n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(b)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,d);break;case 3:n=(0,o.createComponentVNode)(2,m);break;default:n=(0,o.createComponentVNode)(2,u)}else n=(0,o.createComponentVNode)(2,s);else n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Section,{children:n})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(i.machine_id,i.held_card_name);return(0,o.createComponentVNode)(2,a.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,a.Box,{children:"For all your monetary needs!"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,a.Button,{content:l,icon:"eject",onClick:function(){return c("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.security_level;return(0,o.createComponentVNode)(2,a.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return c("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return c("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"fundsAmount",0),m=s[0],h=s[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],N=f[1],b=i.money;return(0,o.createComponentVNode)(2,a.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Account Number",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"7 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Funds to Transfer",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,onInput:function(e,t){return N(t)}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return c("transfer",{target_acc_number:d,funds_amount:m,purpose:C})}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),d=l[0],u=l[1],s=i.owner_name,m=i.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Welcome, "+s,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return c("logout")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",m]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return c("withdrawal",{funds_amount:d})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Change account security level",icon:"lock",onClick:function(){return c("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return c("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View transaction log",icon:"list",onClick:function(){return c("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print balance statement",icon:"print",onClick:function(){return c("balance_statement")}})})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"accountID",null),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"accountPin",null),m=s[0],p=s[1];i.machine_id,i.held_card_name;return(0,o.createComponentVNode)(2,a.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return p(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return c("attempt_auth",{account_num:d,account_pin:m})}})})]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name})]},e)}))]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return c("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(68),d=n(3),u=n(123),s=n(124);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,a.useBackend)(t),c=(r.act,r.data),i=c.loginState,l=c.currentPage;return i.logged_in?(1===l?n=(0,o.createComponentVNode)(2,p):2===l?n=(0,o.createComponentVNode)(2,b):3===l&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m),n]})})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"tabIndex",0),i=r[0],l=r[1];n.login_state;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"User Accounts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Department Accounts"]})]})},p=function(e,t){switch((0,a.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},h=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.accounts,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","owner_name")),m=s[0],p=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),h=p[0];p[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,C,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,C,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,C,{id:"suspended",children:"Account Status"}),(0,o.createComponentVNode)(2,C,{id:"money",children:"Account Balance"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended+"|"+e.money}))).sort((function(e,t){var n=h?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return i("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.department_accounts;return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:"Department Name"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Number"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Status"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Balance"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return r("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wallet"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},C=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=(n.data.is_printing,(0,a.useLocalState)(t,"searchText","")),d=(l[0],l[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}})}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.account_number,d=i.owner_name,u=i.money,s=i.suspended,m=i.transactions,p=i.account_pin,h=i.is_department_account;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"#"+l+" / "+d,mt:1,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Number",children:["#",l]}),!!h&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin Actions",children:(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:Boolean(h),onClick:function(){return r("set_account_pin",{account_number:l})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Status",color:s?"red":"green",children:[s?"Suspended":"Active",(0,o.createComponentVNode)(2,c.Button,{ml:1,content:s?"Unsuspend":"Suspend",icon:s?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.target_name})]},e)}))]})})],4)},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=(n.data,(0,a.useLocalState)(t,"accName","")),l=i[0],d=i[1],u=(0,a.useLocalState)(t,"accDeposit",""),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Name Here",onChange:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"0",onChange:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:s})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCardInfo=t.AgentCardAppearances=t.AgentCard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AgentCard=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"id-card"})," Appearance"]},"Appearance")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);default:return(0,o.createComponentVNode)(2,i)}}(d)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.registered_name,d=i.sex,u=i.age,s=i.assignment,m=i.associated_account_number,p=i.blood_type,h=i.dna_hash,f=i.fingerprint_hash,C=i.photo,N=i.ai_tracking;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Card Info",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"[UNSET]",onClick:function(){return c("change_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sex",children:(0,o.createComponentVNode)(2,a.Button,{iconRight:!1,content:d||"[UNSET]",onClick:function(){return c("change_sex")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Age",children:(0,o.createComponentVNode)(2,a.Button,{content:u||"[UNSET]",onClick:function(){return c("change_age")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,a.Button,{content:s||"[UNSET]",onClick:function(){return c("change_occupation")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"[UNSET]",onClick:function(){return c("change_fingerprints")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"[UNSET]",onClick:function(){return c("change_blood_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"DNA Hash",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"[UNSET]",onClick:function(){return c("change_dna_hash")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Money Account",children:(0,o.createComponentVNode)(2,a.Button,{content:m||"[UNSET]",onClick:function(){return c("change_money_account")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo",children:(0,o.createComponentVNode)(2,a.Button,{content:C?"Update":"[UNSET]",onClick:function(){return c("change_photo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Card Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card Info",children:(0,o.createComponentVNode)(2,a.Button,{content:"Delete Card Info",onClick:function(){return c("delete_info")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:(0,o.createComponentVNode)(2,a.Button,{content:"Reset Access",onClick:function(){return c("clear_access")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"AI Tracking",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Untrackable":"Trackable",onClick:function(){return c("change_ai_tracking")}})})]})})],4)};t.AgentCardInfo=i;var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.appearances;return(0,o.createComponentVNode)(2,a.Section,{title:"Card Appearance",children:i.map((function(e){return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+e.image,style:{"vertical-align":"middle",width:"64px",margin:"0px","margin-left":"0px"},onclick:function(){return c("change_appearance",{new_appearance:e.name})}},e.name)}))})};t.AgentCardAppearances=l},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_power?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_power?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&2!==d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock||0===d.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),!a&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,d=c.data,u=d.air,s=d.mode,m=d.atmos_alarm,p=d.locked,h=d.alarmActivated,f=d.rcon,C=d.target_temp;return n=0===u.danger.overall?0===m?"Optimal":"Caution: Atmos alert in area":1===u.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,a.Section,{title:"Air Status",children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.pressure),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.pressure})," kPa",!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:3===s?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===s,icon:"exclamation-triangle",onClick:function(){return i("mode",{mode:3===s?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.oxygen/100,fractionDigits:"1",color:l(u.danger.oxygen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.nitrogen/100,fractionDigits:"1",color:l(u.danger.nitrogen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.co2/100,fractionDigits:"1",color:l(u.danger.co2)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.plasma/100,fractionDigits:"1",color:l(u.danger.plasma)})}),u.contents.n2o>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrous Oxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.n2o/100,fractionDigits:"1",color:l(u.danger.n2o)})}),u.contents.other>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.other/100,fractionDigits:"1",color:l(u.danger.other)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.temperature),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature})," K /"," ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return i("temperature")}}),(0,o.createComponentVNode)(2,a.Button,{content:u.thermostat_state?"On":"Off",selected:u.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.overall),children:[n,!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Off",selected:1===f,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Auto",selected:2===f,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,a.Button,{content:"On",selected:3===f,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,a.Box,{children:"Unable to acquire air sample!"})})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),c=n[0],i=n[1];return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===c,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},s=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0];n[1];switch(a){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,p);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return c("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,a.Button,{content:"External",selected:1===e.checks,onClick:function(){return c("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return c("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"cog",onClick:function(){return c("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return c("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return c("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return c("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return c("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return c("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return c("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return c("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return c("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.modes,d=i.presets,u=i.emagged,s=i.mode,m=i.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!u)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===s,onClick:function(){return c("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===m,onClick:function(){return c("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.thresholds;return(0,o.createComponentVNode)(2,a.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return c("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AirlockAccessController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.exterior_status,m=u.interior_status,p=u.processing;return n="open"===s?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:p,onClick:function(){return d("force_ext")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext_door")}}),i="open"===m?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:p,color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int_door")}}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Door Status",children:"closed"===s?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Door Status",children:"closed"===m?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:i})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,d)]})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,a.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:1})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:2})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:4})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:8})}})})]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.selected_accesses,u=l.one_access,s=l.regions;return(0,o.createComponentVNode)(2,i.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:"One",onClick:function(){return c("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,content:"All",onClick:function(){return c("set_one_access",{access:"all"})}})],4),accesses:s,selectedList:d,accessMod:function(e){return c("set",{access:e})},grantAll:function(){return c("grant_all")},denyAll:function(){return c("clear_all")},grantDep:function(e){return c("grant_region",{region:e})},denyDep:function(e){return c("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.change_race,s=d.species,m=d.specimen,p=d.change_gender,h=d.gender,f=d.has_gender,C=d.change_eye_color,N=d.change_skin_tone,b=d.change_skin_color,V=d.change_head_accessory_color,g=d.change_hair_color,v=d.change_secondary_hair_color,_=d.change_facial_hair_color,y=d.change_secondary_facial_hair_color,x=d.change_head_marking_color,k=d.change_body_marking_color,L=d.change_tail_marking_color,w=d.change_head_accessory,B=d.head_accessory_styles,S=d.head_accessory_style,I=d.change_hair,T=d.hair_styles,A=d.hair_style,E=d.change_hair_gradient,M=d.change_facial_hair,O=d.facial_hair_styles,P=d.facial_hair_style,F=d.change_head_markings,R=d.head_marking_styles,D=d.head_marking_style,j=d.change_body_markings,W=d.body_marking_styles,z=d.body_marking_style,U=d.change_tail_markings,H=d.tail_marking_styles,G=d.tail_marking_style,K=d.change_body_accessory,Y=d.body_accessory_styles,q=d.body_accessory_style,$=d.change_alt_head,X=d.alt_head_styles,J=d.alt_head_style,Q=!1;return(C||N||b||V||g||v||_||y||x||k||L)&&(Q=!0),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.specimen,selected:e.specimen===m,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,a.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Q&&(0,o.createComponentVNode)(2,i),!!w&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head accessory",children:B.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===S,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!I&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair",children:T.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.hairstyle,selected:e.hairstyle===A,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!E&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!M&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Facial hair",children:O.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===P,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!F&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head markings",children:R.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body markings",children:W.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!U&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===G,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!K&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!$&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternate head",children:X.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.altheadstyle,selected:e.altheadstyle===J,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!i[e.key]&&(0,o.createComponentVNode)(2,a.Button,{content:e.text,onClick:function(){return c(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.priority||[],d=i.minor||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-bad",e,0,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(68),i=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),u=c[0],s=c[1];return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:0===u,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,c.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,a.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Access",onClick:function(){return i("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"zoom",1),i=c[0],l=c[1],d=n.alarms;return(0,o.createComponentVNode)(2,a.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,a.NanoMap,{onZoom:function(e){return l(e)},children:d.filter((function(e){return 3===e.z})).map((function(e){return(0,o.createComponentVNode)(2,a.NanoMap.Marker,{x:e.x,y:e.y,zoom:i,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0)},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.pressure,s=l.max_pressure,m=l.filter_type,p=l.filter_type_list;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_pressure")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.gas_type===m,content:e.label,onClick:function(){return i("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.pressure,m=d.max_pressure,p=d.node1_concentration,h=d.node2_concentration;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:m,value:s,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:s===m,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,i,{node_name:"Node 1",node_ref:p}),(0,o.createComponentVNode)(2,i,{node_name:"Node 2",node_ref:h})]})})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:i,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return c("set_node",{node_name:i,concentration:t/100})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.rate,s=l.max_rate,m=l.gas_unit,p=l.step;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_rate")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:m,width:6.1,lineHeight:1.5,step:p,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosTankControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(12),i=n(44),l=n(3);t.AtmosTankControl=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.sensors||{};return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[Object.keys(s[e]).indexOf("pressure")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[s[e].pressure," kpa"]}):"",Object.keys(s[e]).indexOf("temperature")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[s[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map((function(t){return Object.keys(s[e]).indexOf(t)>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,i.getGasLabel)(t),children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(0,i.getGasColor)(t),value:s[e][t],minValue:0,maxValue:100,children:(0,c.toFixed)(s[e][t],2)+"%"})},(0,i.getGasLabel)(t)):""}))]})},e)})),u.inlet&&Object.keys(u.inlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Inlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.inlet.on,"power-off"),content:u.inlet.on?"On":"Off",color:u.inlet.on?null:"red",selected:u.inlet.on,onClick:function(){return d("toggle_active",{dev:"inlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:u.inlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"inlet",val:t})}})})]})}):"",u.outlet&&Object.keys(u.outlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Outlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.outlet.on,"power-off"),content:u.outlet.on?"On":"Off",color:u.outlet.on?null:"red",selected:u.outlet.on,onClick:function(){return d("toggle_active",{dev:"outlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:u.outlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"outlet",val:t})}})})]})}):""]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=n(20),u=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,c.useBackend)(t),s=n.act,m=n.data,p=m.total_amount,h=(m.max_amount,m.metal_amount),f=m.glass_amount,C=m.busyname,N=(m.busyamt,m.showhacked,m.buildQueue),b=m.buildQueueLen,V=m.recipes,g=m.categories,v=(0,c.useSharedState)(t,"category",0),_=v[0],y=v[1];0===_&&(_="Tools");var x=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),k=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),L=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),w=(0,c.useSharedState)(t,"search_text",""),B=w[0],S=w[1],I=(0,d.createSearch)(B,(function(e){return e.name})),T="";b>0&&(T=N.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:N[t][0],onClick:function(){return s("remove_from_queue",{remove_from_queue:N.indexOf(e)+1})}},e)},t)})));var A=(0,r.flow)([(0,a.filter)((function(e){return(e.category.indexOf(_)>-1||B)&&(m.showhacked||!e.hacked)})),B&&(0,a.filter)(I),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(V),E="Build";B?E="Results for: '"+B+"':":_&&(E="Build ("+_+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Section,{title:E,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:g,selected:_,onSelected:function(e){return y(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return S(t)},mb:1}),A.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&1===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,1),onClick:function(){return s("make",{make:e.uid,multiplier:1})},children:(0,d.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&10===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,10),onClick:function(){return s("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&25===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,25),onClick:function(){return s("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&m.busyamt===e.max_multiplier,disabled:!u(e,m.metal_amount,m.glass_amount,e.max_multiplier),onClick:function(){return s("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,d.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,i.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metal",children:x}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Glass",children:k}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total",children:L}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Storage",children:[m.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Building",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Build Queue",children:[T,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Clear All",disabled:!m.buildQueueLen,onClick:function(){return s("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.Biogenerator=function(e,t){var n=(0,r.useBackend)(t),a=n.data,m=n.config,p=a.container,h=a.processing,f=m.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:h,name:f}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),p?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"flask",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.biomass,l=c.container,d=c.container_curr_reagents,u=c.container_max_reagents;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",children:i}),(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:d+" / "+u+" units"})}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"None"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_plants,d=i.container;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return c("activate")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!d,tooltip:d?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return c("detach_container")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return c("eject_plants")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.biomass,d=i.product_list,u=(0,r.useSharedState)(t,"vendAmount",1),s=u[0],m=u[1],p=Object.entries(d).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,a.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*s,(0,o.createComponentVNode)(2,a.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"40%",children:(0,o.createComponentVNode)(2,a.Button,{content:"Vend",disabled:lm?"bad":"good";return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(m>V)&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Level",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===s,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===s,onClick:function(){return l("set",{set_level:m})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===s,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:s,fillValue:m,minValue:0,color:v,maxValue:N,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:s===N,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:s===N,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:N})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Power Use",children:(0,i.formatPower)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power for next level",children:(0,i.formatPower)(g)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Surplus Power",children:(0,i.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Points",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.price>=p,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,c.Box,{children:t},t)],0)}),null):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,a.useBackend)(t).data,r=n.occupied,c=n.occupant,l=void 0===c?{}:c,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,_);return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"print",onClick:function(){return i("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",onClick:function(){return i("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Implants",children:d.implant_len?(0,o.createComponentVNode)(2,c.Box,{children:d.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"None"})})]})})},N=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,c.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])}))}):(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,c.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:s,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[p([!!e.status.splinted&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:p([1===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},_=function(){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BookBinder=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=n(34);t.BookBinder=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.selectedbook,m=u.book_categories,p=[];return m.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Book Binder",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:m.map((function(e){return e.description})),onSelected:function(e){return d("toggle_binder_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),m.filter((function(e){return s.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return d("toggle_binder_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:s.summary})]})})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return d("print_book")}})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.cleanblood;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Clean Blood",disabled:u,onClick:function(){return l("blood")}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotFloor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotFloor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.hullplating,p=d.replace,h=d.eat,f=d.make,C=d.fixfloor,N=d.nag_empty,b=d.magnet,V=d.tiles_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Floor Settings",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:V})}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Add tiles to new hull plating",disabled:u,onClick:function(){return l("autotile")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Replace floor tiles",disabled:u,onClick:function(){return l("replacetiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:u,onClick:function(){return l("fixfloors")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Miscellaneous",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:u,onClick:function(){return l("eattiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Make pieces of metal into tiles when empty",disabled:u,onClick:function(){return l("maketiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Transmit notice when empty",disabled:u,onClick:function(){return l("nagonempty")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"Traction Magnets",disabled:u,onClick:function(){return l("anchored")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotHonk=void 0;var o=n(0),r=n(1),a=(n(2),n(3)),c=n(101);t.BotHonk=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.BotStatus)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotMed=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotMed=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.shut_up,p=d.declare_crit,h=d.stationary_mode,f=d.heal_threshold,C=d.injection_amount,N=d.use_beaker,b=d.treat_virus,V=d.reagent_glass;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Communication Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!m,disabled:u,onClick:function(){return l("toggle_speaker")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:p,disabled:u,onClick:function(){return l("toggle_critical_alerts")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Treatment Settings",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{value:f.value,minValue:f.min,maxValue:f.max,step:5,disabled:u,onChange:function(e,t){return l("set_heal_threshold",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Level",children:(0,o.createComponentVNode)(2,a.Slider,{value:C.value,minValue:C.min,maxValue:C.max,step:5,format:function(e){return e+"u"},disabled:u,onChange:function(e,t){return l("set_injection_amount",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Beaker":"Internal Synthesizer",icon:N?"flask":"cogs",disabled:u,onClick:function(){return l("toggle_use_beaker")}})}),V&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V.amount,minValue:0,maxValue:V.max_amount,children:[V.amount," / ",V.max_amount]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,a.Button,{content:"Eject",disabled:u,onClick:function(){return l("eject_reagent_glass")}})})]})})]}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Treat Viral Infections",checked:b,disabled:u,onClick:function(){return l("toggle_treat_viral")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:u,onClick:function(){return l("toggle_stationary_mode")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.check_id,p=d.check_weapons,h=d.check_warrant,f=d.arrest_mode,C=d.arrest_declare;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unidentifiable Persons",disabled:u,onClick:function(){return l("authid")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Weapons",disabled:u,onClick:function(){return l("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:u,onClick:function(){return l("authwarrant")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Detain Targets Indefinitely",disabled:u,onClick:function(){return l("arrtype")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:u,onClick:function(){return l("arrdeclare")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),a=n(2),c=n(1),i=function(e,t){var n=e.cell,r=(0,c.useBackend)(t).act,i=n.cell_id,l=n.occupant,d=n.crimes,u=n.brigged_by,s=n.time_left_seconds,m=n.time_set_seconds,p=n.ref,h="";s>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,a.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:i}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:u}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:m})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{type:"button",onClick:function(){r("release",{ref:p})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,a.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,i,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,c.useBackend)(t),i=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:i})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:l.occupant}));var d="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(d="exclamation-triangle"));var u=[],s=0;for(s=0;se.current_positions&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"-",disabled:s.cooldown_time||!e.can_close,onClick:function(){return u("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"+",disabled:s.cooldown_time||!e.can_open,onClick:function(){return u("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:s.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,a.Button,{content:e.is_priority?"Yes":"No",selected:e.is_priority,disabled:s.cooldown_time||!e.can_prioritize,onClick:function(){return u("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=s.authenticated&&s.scan_name?s.modify_name?(0,o.createComponentVNode)(2,i.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(e){return u("set",{access:e})},grantAll:function(){return u("grant_all")},denyAll:function(){return u("clear_all")},grantDep:function(e){return u("grant_region",{region:e})},denyDep:function(e){return u("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,a.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=s.authenticated?s.records.length?(0,o.createComponentVNode)(2,a.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||0===s.records.length||s.target_dept,onClick:function(){return u("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.reason}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||0===s.records.length,onClick:function(){return u("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=s.authenticated&&s.scan_name?(0,o.createComponentVNode)(2,a.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return u("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p,m,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=(n(45),n(20)),u=n(34);t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)]})})};var s=function(e,t){var n=(0,c.useLocalState)(t,"contentsModal",null),r=n[0],a=n[1],l=(0,c.useLocalState)(t,"contentsModalTitle",null),d=l[0],u=l[1];return null!==r&&null!==d?(0,o.createComponentVNode)(2,i.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[d,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,i.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Close",onClick:function(){a(null),u(null)}})})]}):void 0},m=function(e,t){var n,r,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=d.is_public,s=d.timeleft,m=d.moving,p=d.at_station;return m||p?!m&&p?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==s?"Shuttle is en route (ETA: "+s+" minutes)":"Shuttle is en route (ETA: "+s+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:n}),0===u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n,r=(0,c.useBackend)(t),a=(r.act,r.data.accounts),l=(0,c.useLocalState)(t,"selectedAccount"),d=l[0],u=l[1],s=[];return a.map((function(e){return s[e.name]=e.account_UID})),(0,o.createComponentVNode)(2,i.Section,{title:"Payment",children:[(0,o.createComponentVNode)(2,i.Dropdown,{mt:.6,width:"190px",options:a.map((function(e){return e.name})),selected:null==(n=a.filter((function(e){return e.account_UID===d}))[0])?void 0:n.name,onSelected:function(e){return u(s[e])}}),a.filter((function(e){return e.account_UID===d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Name",children:e.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Balance",children:e.balance})]},e.account_UID)}))]})},h=function(e,t){var n=(0,c.useBackend)(t),l=n.act,u=n.data,s=u.categories,m=u.supply_packs,p=(0,c.useSharedState)(t,"category","Emergency"),h=p[0],f=p[1],C=(0,c.useSharedState)(t,"search_text",""),N=C[0],b=C[1],V=(0,c.useLocalState)(t,"contentsModal",null),g=(V[0],V[1]),v=(0,c.useLocalState)(t,"contentsModalTitle",null),_=(v[0],v[1]),y=(0,d.createSearch)(N,(function(e){return e.name})),x=(0,c.useLocalState)(t,"selectedAccount"),k=x[0],L=(x[1],(0,r.flow)([(0,a.filter)((function(e){return e.cat===s.filter((function(e){return e.name===h}))[0].category||N})),N&&(0,a.filter)(y),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(m)),w="Crate Catalogue";return N?w="Results for '"+N+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,i.Section,{title:w,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:s.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return b(t)},mb:1}),(0,o.createComponentVNode)(2,i.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:L.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Order 1",icon:"shopping-cart",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:0,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:1,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Contents",icon:"search",onClick:function(){g(e.contents),_(e.name)}})]})]},e.name)}))})})]})},f=function(e,t){var n,r,a=e.request;switch(a.department){case"Engineering":r="CE",n="orange";break;case"Medical":r="CMO",n="teal";break;case"Science":r="RD",n="purple";break;case"Supply":r="CT",n="brown";break;case"Service":r="HOP",n="olive";break;case"Security":r="HOS",n="red";break;case"Command":r="CAP",n="blue";break;case"Assistant":r="Any Head",n="grey"}return(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:"Approval Required:"}),Boolean(a.req_cargo_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),Boolean(a.req_head_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{children:(0,o.createComponentVNode)(2,i.Button,{color:n,content:r,disabled:a.req_cargo_approval,icon:"user-tie",tooltip:a.req_cargo_approval?"This Order first requires approval from the QM before the "+r+" can approve it":"This Order requires approval from the "+r+" still"})})]})},C=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.requests,d=a.orders,u=a.shipments;return(0,o.createComponentVNode)(2,i.Section,{title:"Orders",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{className:"Cargo_RequestList",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{children:["Order #",e.ordernum,": ",e.supply_type," (",e.cost," credits) for"," ",(0,o.createVNode)(1,"b",null,e.orderedby,0)," with"," ",e.department?"The "+e.department+" Department":"Their Personal"," ","Account"]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]}),(0,o.createComponentVNode)(2,f,{request:e})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Approve",color:"green",disabled:!e.can_approve,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Deny",color:"red",disabled:!e.can_deny,onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Order in Transit"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChangelogView=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ChangelogView=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,r.useLocalState)(t,"onlyRecent",0),u=d[0],s=d[1],m=l.cl_data,p=l.last_cl,h={FIX:(0,o.createComponentVNode)(2,a.Icon,{name:"tools",title:"Fix"}),WIP:(0,o.createComponentVNode)(2,a.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,o.createComponentVNode)(2,a.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,o.createComponentVNode)(2,a.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})};return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:u?"Showing all changes":"Showing changes since last connection",onClick:function(){return s(!u)}}),children:m.map((function(e){return!u&&e.merge_ts<=p||(0,o.createComponentVNode)(2,a.Section,{mb:2,title:e.author+" - Merged on "+e.merge_date,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"#"+e.num,onClick:function(){return i("open_pr",{pr_number:e.num})}}),children:e.entries.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:[(t=e.etype,t in h?h[t]:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",color:"green"}))," ",e.etext]},e);var t}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(126),i=n(3),l=[1,5,10,20,30,50],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.amount,u=i.energy,s=i.maxEnergy;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:l.glass?"Glass":"Beaker",flex:"content",minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return i("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return i("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return i("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return i("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(126),l=n(3);t.ChemHeater=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.targetTemp,u=l.targetTempReached,s=l.autoEject,m=l.isActive,p=l.currentTemp,h=l.isBeakerLoaded;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",flexBasis:"content",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{content:"Auto-eject",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return i("toggle_autoeject")}}),(0,o.createComponentVNode)(2,c.Button,{content:m?"On":"Off",icon:"power-off",selected:m,disabled:!h,onClick:function(){return i("toggle_on")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(d,0),minValue:0,maxValue:1e3,onDrag:function(e,t){return i("adjust_temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",color:u?"good":"average",children:h&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:p,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.isBeakerLoaded,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.beakerContents;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",flexGrow:"1",buttons:!!d&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[u," / ",s," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return r("eject_beaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:d,beakerContents:m})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(126),l=n(29),d=[1,5,10],u=["bottle.png","small_bottle.png","wide_bottle.png","round_bottle.png","reagent_bottle.png"];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,i=n.beaker,d=n.beaker_reagents,u=void 0===d?[]:d,h=n.buffer_reagents,f=void 0===h?[]:h,N=n.mode;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s,{beaker:i,beakerReagents:u,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,m,{mode:N,bufferReagents:f}),(0,o.createComponentVNode)(2,p,{isCondiment:a,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,C)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t).act,c=e.beaker,u=e.beakerReagents,s=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"0",flexBasis:"300px",buttons:s?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:c?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!i.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:i.printing?"spinner":"print",disabled:i.printing,iconSpin:!!i.printing,ml:"0.5rem",content:"Print",onClick:function(){return c("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(44),l=n(29),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.menu;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return i("lock")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return i("eject")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,c.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return i("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return i("scan")}})]}),(0,o.createComponentVNode)(2,c.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,c.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return i("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,c.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.records;return i.length?(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,c.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,c.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.scanner,d=i.numberofpods,u=i.autoallowed,s=i.autoprocess;i.disk;return(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:(0,o.createFragment)(!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColourMatrixTester=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ColourMatrixTester=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.colour_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Modify Matrix",children:[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]].map((function(e){return(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:e.map((function(e){return(0,o.createFragment)([e.name,(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{value:l[e.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(t,n){return i("setvalue",{idx:e.idx+1,value:n})}})],0,e.name)}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){switch(e){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,m);case 3:return(0,o.createComponentVNode)(2,p);case 4:return(0,o.createComponentVNode)(2,f);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}};t.CommunicationsComputer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.menu_state);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),i(a)]})})};var l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authenticated,u=l.noauthbutton,s=l.esc_section,m=l.esc_callable,p=l.esc_recallable,h=l.esc_status,f=l.authhead,C=l.is_ai,N=l.lastCallLoc,b=!1;return d?1===d?n="Command":2===d?n="Captain":3===d?n="CentComm Officer":4===d?(n="CentComm Secure Connection",b=!0):n="ERROR: Report This Bug!":n="Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:n})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,disabled:u,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return i("auth")}})})})}),!!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:h}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!f,onClick:function(){return i("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!f||C,onClick:function(){return i("cancelshuttle")}})}),!!N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Last Call/Recall From",children:N})]})})],0)},d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.is_admin?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.gamma_armory_location,u=i.admin_levels,m=i.authenticated,p=i.ert_allowed;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"CentComm Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:u,required_access:l,use_confirm:1})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!l,onClick:function(){return c("send_to_cc_announcement_page")}}),4===m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Make Other Announcement",disabled:!l,onClick:function(){return c("make_other_announcement")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Response Team",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!l,onClick:function(){return c("dispatch_ert")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:p,content:p?"ERT calling enabled":"ERT calling disabled",tooltip:p?"Command can request an ERT":"ERTs cannot be requested",disabled:!l,onClick:function(){return c("toggle_ert_allowed")},selected:null})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!l,onClick:function(){return c("send_nuke_codes")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gamma Armory",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"biohazard",content:d?"Send Gamma Armory":"Recall Gamma Armory",disabled:!l,onClick:function(){return c("move_gamma_armory")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"coins",content:"View Economy",disabled:!l,onClick:function(){return c("view_econ")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fax",content:"Fax Manager",disabled:!l,onClick:function(){return c("view_fax")}})]})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"View Command accessible controls",children:(0,o.createComponentVNode)(2,s)})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.msg_cooldown,d=i.emagged,u=i.cc_cooldown,s=i.security_level_color,m=i.str_security_level,p=i.levels,f=i.authcapt,C=i.authhead,N=i.messages,b="Make Priority Announcement";l>0&&(b+=" ("+l+"s)");var V=d?"Message [UNKNOWN]":"Message CentComm",g="Request Authentication Codes";return u>0&&(V+=" ("+u+"s)",g+=" ("+u+"s)"),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:s,children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:p,required_access:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:b,disabled:!f||l>0,onClick:function(){return c("announce")}})}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:V,disabled:!f||u>0,onClick:function(){return c("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!f,onClick:function(){return c("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:V,disabled:!f||u>0,onClick:function(){return c("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",content:g,disabled:!f||u>0,onClick:function(){return c("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!C,onClick:function(){return c("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:"View ("+N.length+")",disabled:!C,onClick:function(){return c("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!C,onClick:function(){return c("RestartNanoMob")}})})]})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.stat_display,d=i.authhead,u=(i.current_message_title,l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return c("setstat",{statdisp:e.name})}},e.name)}))),s=l.alerts.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.alert===l.icon,disabled:!d,onClick:function(){return c("setstat",{statdisp:3,alert:e.alert})}},e.alert)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alerts",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return c("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return c("setmsg2")}})})]})})},p=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authhead,u=l.current_message_title,s=l.current_message,m=l.messages;l.security_level;if(u)n=(0,o.createComponentVNode)(2,a.Section,{title:u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!d,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:s})});else{var p=m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!d||u===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"times",content:"Delete",disabled:!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));n=(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p})})}return(0,o.createComponentVNode)(2,a.Box,{children:n})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.levels,d=e.required_access,u=e.use_confirm,s=i.security_level;return u?l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)})):l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)}))},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.possible_cc_sounds;if(!l)return c("main");var u=(0,r.useLocalState)(t,"subtitle",""),s=u[0],m=u[1],p=(0,r.useLocalState)(t,"text",""),h=p[0],f=p[1],C=(0,r.useLocalState)(t,"classified",0),N=C[0],b=C[1],V=(0,r.useLocalState)(t,"beepsound","Beep"),g=V[0],v=V[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Central Command Report",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:s,onChange:function(e,t){return m(t)},mb:"5px"}),(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:h,onChange:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("make_cc_announcement",{subtitle:s,text:h,classified:N,beepsound:g})}}),(0,o.createComponentVNode)(2,a.Flex,{mt:"5px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"260px",height:"20px",options:d,selected:g,onSelected:function(e){return v(e)},disabled:N})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",mx:"5px",disabled:N,tooltip:"Test sound",onClick:function(){return c("test_sound",{sound:g})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Classified",fluid:!0,tooltip:N?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!N)}})})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CompostBin=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.CompostBin=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.biomass,u=l.compost,s=l.biomass_capacity,m=l.compost_capacity,p=(0,r.useSharedState)(t,"vendAmount",1),h=p[0],f=p[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{label:"Resources",children:[(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Biomass",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[d," / ",s," Units"]})})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compost",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:m,ranges:{good:[.5*m,Infinity],average:[.25*m,.5*m],bad:[-Infinity,.25*m]},children:[u," / ",m," Units"]})})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:h,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(e,t){return f(t)}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",textAlign:"right",width:"0%",children:(0,o.createComponentVNode)(2,a.Button,{align:"right",content:"Make Soil",disabled:u<25*h,icon:"arrow-circle-down",onClick:function(){return i("create",{amount:h})}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(228),l=n(3);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},s=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,d=r.data;n=d.unauthorized?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):d.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"hidden",children:1===d.page?(0,o.createComponentVNode)(2,h,{height:"100%"}):(0,o.createComponentVNode)(2,C,{height:"100%"})})],4):(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:s,finishedTimeout:3e3,onFinished:function(){return i("complete_load_animation")}})});var u=(0,a.useLocalState)(t,"viewingPhoto",""),f=u[0];u[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[f&&(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:n})})]})};var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.tc_available,d=i.tc_paid_out,u=i.completed_contracts,s=i.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,c.Box,{verticalAlign:"middle",mt:"0.25rem",children:[s," Rep"]})},e,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,c.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Earned",children:[d," TC"]})]})}),(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:u})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"shopping-cart"}),"Hub"]})]})))},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.contracts,s=l.contract_active,m=l.can_extract,p=!!s&&d.filter((function(e){return 1===e.status}))[0],h=p&&p.time_left>0,C=(0,a.useLocalState)(t,"viewingPhoto",""),N=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,c.Button,{disabled:!m||h,icon:"parachute-box",content:["Call Extraction",h&&(0,o.createComponentVNode)(2,i.Countdown,{timeLeft:p.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,c.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return N("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,c.Box,{width:"100%",children:[!!u[e.status]&&(0,o.createComponentVNode)(2,c.Box,{color:u[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:u[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",f(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!!s,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,c.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},f=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,a=e.objective.locs.target_area_id,i=e.objective.locs.target_coords,l=t===a;return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(i[1]-n[1],i[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.rep,d=i.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,c.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,c.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),b=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.slowFactor,u=l.oneWay,s=l.position;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lever position",children:s>0?"forward":s<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,onClick:function(){return i("toggleOneWay")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",onClick:function(){return i("slowFactor",{value:d-5})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-left",onClick:function(){return i("slowFactor",{value:d-1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Slider,{width:"100px",mx:"1px",value:d,fillValue:d,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return i("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-right",onClick:function(){return i("slowFactor",{value:d+1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",onClick:function(){return i("slowFactor",{value:d+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(26),a=n(20),c=n(1),i=n(2),l=n(68),d=n(44),u=n(3),s=n(34),m=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.possible_levels,d=a.viewing_current_z_level,m=a.is_advanced,p=(0,c.useLocalState)(t,"tabIndex",0),C=p[0],N=p[1];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,s.FlexItem,{grow:!0,basis:100,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===C,onClick:function(){return N(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===C,onClick:function(){return N(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),m?(0,o.createComponentVNode)(2,s.FlexItem,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:l,selected:d,onSelected:function(e){return r("switch_level",{new_level:e})}})}):null]})}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}(C)]})})})};var h=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,h=(0,r.sortBy)((function(e){return e.name}))(s.crewmembers||[]),f=(0,c.useLocalState)(t,"search",""),C=f[0],N=f[1],b=(0,a.createSearch)(C,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Location"})]}),h.filter(b).map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p(e,s.critThreshold),children:m(e,s.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"grey",children:"Not Available"})})]},e.name)}))]})]})},f=function(e,t){var n=(0,c.useBackend)(t).data,r=(0,c.useLocalState)(t,"zoom",1),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return l(e)},children:n.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:a,icon:"circle",tooltip:e.name+" ("+e.assignment+")",color:p(e,n.critThreshold)},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,V=d.auto_eject_healthy,g=d.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return c(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dosage interval",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{average:[-Infinity,99],good:[99,Infinity]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c(V?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:V?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c(g?"auto_eject_dead_off":"auto_eject_dead_on")},children:g?"On":"Off"})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.isBeakerLoaded,l=c.beakerLabel,d=c.beakerVolume;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:!l&&"average",children:l||"No label"}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",float:"right",color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],4):(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"bad",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,i=n.account_name,u=n.allow_items;return(0,o.createComponentVNode)(2,c.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!u&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored crew!"})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.frozen_items,d=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,i.toTitleCase)(t)};return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Items",children:l.length?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:d(e.name),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return c("one_item",{item:e.uid})}})},e)}))})}),(0,o.createComponentVNode)(2,a.Button,{content:"Drop All Items",color:"red",onClick:function(){return c("all_items")}})],4):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,g,{duration:d})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),n,(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.locked,u=i.hasOccupant,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return c("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return c("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:i.occupant.uniqueEnzymes?i.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return i("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedUIBlock,d=i.selectedUISubBlock,u=i.selectedUITarget,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return c("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return c("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedSEBlock,d=i.selectedSESubBlock,u=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return c("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.radiationIntensity,d=i.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return c("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:c}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.id,d=e.name,u=e.buffer,s=i.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return c("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return c("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!i.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return c("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!i.hasDisk||!i.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return c("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return c("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.hasDisk,d=i.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return c("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.isBeakerLoaded,d=i.beakerVolume,s=i.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return c("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return c("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=i.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var i=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===i,content:m[e+r],mb:"0",onClick:function(){return c(s,{block:t,subblock:i})}}))},i=0;ii.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert",{silent:u})}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.ert_request_messages;return(0,o.createComponentVNode)(2,a.Section,{children:l&&l.length?l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.time,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.sender_real_name,onClick:function(){return c("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel"}),children:e.message},(0,i.decodeHtmlEntities)(e.time))})):(0,o.createComponentVNode)(2,a.Box,{fluid:!0,italic:!0,textAlign:"center",children:"No ERT requests"})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,(0,r.useLocalState)(t,"text","")),l=i[0],d=i[1];return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:l,onChange:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("deny_ert",{reason:l})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.EconomyManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=n(45);t.EconomyManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.next_payroll_time;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Global",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"global"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Members",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department_members"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Single Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return c("delay_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){return c("set_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return c("accelerate_payroll")}})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,h=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:h/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmotePanelContent=t.EmotePanel=void 0;var o=n(0),r=n(1),a=n(3),c=n(2);t.EmotePanel=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),a=n.act,i=n.data.emotes,l=(0,r.useLocalState)(t,"searchText",""),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"filterVisible",""),m=s[0],p=s[1],h=(0,r.useLocalState)(t,"filterAudible",""),f=h[0],C=h[1],N=(0,r.useLocalState)(t,"filterSound",""),b=N[0],V=N[1],g=(0,r.useLocalState)(t,"filterHands",""),v=g[0],_=g[1],y=(0,r.useLocalState)(t,"filterTargettable",""),x=y[0],k=y[1],L=(0,r.useLocalState)(t,"useTarget",""),w=L[0],B=L[1],S=(0,o.createComponentVNode)(2,c.Input,{placeholder:"\u0418\u0441\u043a\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u044e...",fluid:!0,onInput:function(e,t){return u(t)}});return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",buttons:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"eye",width:"100%",height:"100%",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043c\u044b\u0439",selected:m,onClick:function(){return p(!m)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"comment",width:"100%",height:"100%",align:"center",tooltip:"\u0421\u043b\u044b\u0448\u0438\u043c\u044b\u0439",selected:f,onClick:function(){return C(!f)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"volume-up",width:"100%",height:"100%",align:"center",tooltip:"\u0417\u0432\u0443\u043a",selected:b,onClick:function(){return V(!b)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"hand-paper",width:"100%",height:"100%",align:"center",tooltip:"\u0420\u0443\u043a\u0438",selected:v,onClick:function(){return _(!v)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",width:"100%",height:"100%",align:"center",tooltip:"\u0426\u0435\u043b\u044c",selected:x,onClick:function(){return k(!x)}})]}),children:S}),(0,o.createComponentVNode)(2,c.Section,{title:d.length>0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+d+'"':"\u0412\u0441\u0435 \u044d\u043c\u043e\u0446\u0438\u0438",fill:!0,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",selected:w,onClick:function(){return B(!w)},children:"\u0412\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0446\u0435\u043b\u044c"}),children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{children:i.filter((function(e){return e.key&&(!(d.length>0)||(e.key.toLowerCase().includes(d.toLowerCase())||e.name.toLowerCase().includes(d.toLowerCase())))&&(!m||e.visible)&&(!f||e.audible)&&(!b||e.sound)&&(!v||e.hands)&&(!x||e.targettable)})).map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return a("play_emote",{emote_key:e.key,useTarget:w})},children:[e.visible?(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}):"",e.audible?(0,o.createComponentVNode)(2,c.Icon,{name:"comment"}):"",e.sound?(0,o.createComponentVNode)(2,c.Icon,{name:"volume-up"}):"",e.hands?(0,o.createComponentVNode)(2,c.Icon,{name:"hand-paper"}):"",e.targettable?(0,o.createComponentVNode)(2,c.Icon,{name:"crosshairs"}):"",e.name.toUpperCase()]},e.name)}))})})})]})};t.EmotePanelContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.can_respec;return(0,o.createComponentVNode)(2,a.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){return c("readapt")}}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.ability_list,u=i.purchased_abilities,s=i.view_mode,m=(0,r.useLocalState)(t,"tab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:s?"square-o":"check-square-o",selected:!s,content:"Compact",onClick:function(){return c("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:s?"check-square-o":"square-o",selected:s,content:"Expanded",onClick:function(){return c("set_view_mode",{mode:1})}})],4),children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){h(0)},children:"Offense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){h(1)},children:"Defense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:"Utility"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===p,onClick:function(){return h(3)},children:"Stings"})]}),d[p].map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),u.includes(e.power_path)&&(0,o.createComponentVNode)(2,a.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,o.createComponentVNode)(2,a.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mr:.5,disabled:e.cost>l||u.includes(e.power_path),content:"Evolve",onClick:function(){return c("purchase",{power_path:e.power_path})}})})]}),!!s&&(0,o.createComponentVNode)(2,a.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(8),a=n(20),c=n(1),i=n(2),l=n(228),d=n(3),u=["id","amount","lineDisplay","onClick"];var s={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data.building);return(0,o.createComponentVNode)(2,d.Window,{children:(0,o.createComponentVNode)(2,d.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),r&&(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,f)})]})})]})})})};var m=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.materials,d=a.capacity,u=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,i.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.25rem",children:[(u/d*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,C,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,c.useBackend)(t),r=n.act,l=n.data,d=l.curCategory,u=l.categories,s=l.designs,m=l.syncing,p=(0,c.useLocalState)(t,"searchText",""),h=p[0],f=p[1],C=(0,a.createSearch)(h,(function(e){return e.name})),b=s.filter(C);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,i.Dropdown,{selected:d,options:u,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,i.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:m,iconSpin:m,icon:"sync-alt",content:m?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),b.map((function(e){return(0,o.createComponentVNode)(2,N,{design:e},e.id)})),0===b.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No designs found."})]})},h=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data),a=r.building,d=r.buildStart,u=r.buildEnd,s=r.worldTime;return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar.Countdown,{start:d,current:s,end:u,bold:!0,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",children:(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:!0})}),"Building ",a,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:s,timeLeft:u-s,format:function(e,t){return t.substr(3)}}),")"]})})},f=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.queue,d=a.processingQueue,u=Object.entries(a.queueDeficit).filter((function(e){return e[1]<0})),s=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Processing time:",(0,o.createComponentVNode)(2,i.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",bold:!0,children:new Date(s/10*1e3).toISOString().substr(14,5)})]}),Object.keys(u).length>0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Lacking materials to complete:",u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},C=function(e,t){var n=(0,c.useBackend)(t),a=(n.act,n.data),l=e.id,d=e.amount,m=e.lineDisplay,p=e.onClick,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),f=l.replace("$",""),C=a.materials[l]||0,N=d||C;if(!(N<=0&&"metal"!==f&&"glass"!==f)){var b=d&&d>C;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",m&&"Exofab__material--line"])},h,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,i.Button,{onClick:p,children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[f]||f)+".png"})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:m?(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",color:b&&"bad",children:N.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--name",children:f}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",children:[N.toLocaleString("en-US")," cm\xb3 (",Math.round(N/2e3*10)/10," ","sheets)"]})],4)})]})))}},N=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=e.design;return(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:l.notEnough||a.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ExternalAirlockController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.chamber_pressure,m=(u.exterior_status,u.interior_status),p=u.processing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(n=s,i="good",n<80?i="bad":n<95||n>110?i="average":n>120&&(i="bad"),i),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Abort",icon:"ban",color:"red",disabled:!p,onClick:function(){return d("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return i("scan")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){return i("auth")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return i("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return i("rename")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return i("dept")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,a.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return i("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FilingCabinet=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FilingCabinet=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=n.config,u=l.contents,s=d.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" The ",s," is empty. "]}),!!u&&u.slice().map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"80%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){return i("retrieve",{index:e.index})}})})]},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,e.image),c=e.isSelected,i=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+a,style:{"border-style":c?"solid":"none","border-width":"2px","border-color":"orange",padding:c?"2px":"4px"},onClick:i})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.availableStyles,s=d.selectedStyle,m=d.selectedDir,p=d.directionsPreview,h=d.allStylesPreview;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:s,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,a.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,i,{image:h[e],isSelected:s===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,a.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,a.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,i,{image:p[e],isSelected:e===m,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,a.useBackend)(t).data,r=n.emped,l=n.active,p=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,d,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,u)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{area:p,position:h})}),f&&(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,m,{height:"100%"})})],0):(0,o.createComponentVNode)(2,d)],0)})})})};var d=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,c.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.active,d=i.tag,u=i.same_z,s=(0,a.useLocalState)(t,"newTag",d),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,c.Input,{width:"5rem",value:d,onEnter:function(){return r("tag",{newtag:m})},onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:d===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:m})},children:(0,o.createComponentVNode)(2,c.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"compress":"expand",content:u?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},s=function(e,t){var n=e.title,r=e.area,a=e.position;return(0,o.createComponentVNode)(2,c.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,c.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(a)]})})},m=function(e,t){var n=(0,a.useBackend)(t).data,i=n.position,d=n.signals;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,c.Table,{children:d.map((function(e){return Object.assign({},e,function(e,t){if(e&&t){if(e[2]!==t[2])return null;var n=Math.atan2(t[1]-e[1],t[0]-e[0]),o=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(n),distance:o}}}(i,e.position))})).map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,c.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GeneModder=void 0;var o=n(0),r=n(1),a=n(2),c=n(29),i=n(3);t.GeneModder=function(e,t){var n=(0,r.useBackend)(t).data.has_seed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Genes",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Insert Gene from Disk",disabled:!i||!i.can_insert||i.is_core,icon:"arrow-circle-down",onClick:function(){return c("insert")}}),children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.has_seed,s=d.seed,m=d.has_disk,p=d.disk;return n=u?(0,o.createComponentVNode)(2,a.Flex.Item,{mb:"-6px",mt:"-4px",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{content:s.name,onClick:function(){return l("eject_seed")}}),(0,o.createComponentVNode)(2,a.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return l("variant_name")}})]}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",onClick:function(){return l("eject_seed")}})}),c=m?p.name:"None",(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Sample",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Disk",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:c,onClick:function(){return l("eject_disk")}})})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.disk,d=i.core_genes;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core Genes",open:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=l&&l.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Replace",disabled:!e.is_type||!l.can_insert,icon:"arrow-circle-down",onClick:function(){return c("replace",{id:e.id})}})})]},e)}))},"Core Genes")},m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.reagent_genes,c=n.has_reagent;return(0,o.createComponentVNode)(2,h,{title:"Reagent Genes",gene_set:a,do_we_show:c})},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.trait_genes,c=n.has_trait;return(0,o.createComponentVNode)(2,h,{title:"Trait Genes",gene_set:a,do_we_show:c})},h=function(e,t){var n=e.title,c=e.gene_set,i=e.do_we_show,l=(0,r.useBackend)(t),d=l.act,u=l.data.disk;return(0,o.createComponentVNode)(2,a.Collapsible,{title:n,open:!0,children:i?c.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=u&&u.can_extract),icon:"save",onClick:function(){return d("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"times",onClick:function(){return d("remove",{id:e.id})}})})]},e)})):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"No Genes Detected"})},n)}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),a=n(3),c=n(168);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,c.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,d=n.medical,u=n.diagnostic,s=n.radioactivity,m=n.ahud;return(0,o.createComponentVNode)(2,c.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,i,{label:"Medical",type:"medical",is_active:d}),(0,o.createComponentVNode)(2,i,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,i,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Antag HUD",is_active:m,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.label,i=e.type,l=void 0===i?null:i,d=e.is_active,u=e.act_on,s=void 0===u?"hud_on":u,m=e.act_off,p=void 0===m?"hud_off":m;return(0,o.createComponentVNode)(2,a.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){return n(d?p:s,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGen=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GravityGen=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.charging_state,s=d.charge_count,m=d.breaker,p=d.ext_power;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[function(e){if(e>0)return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,p:1.5,children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}(u),(0,o.createComponentVNode)(2,a.Section,{title:"Generator Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",content:m?"Online":"Offline",color:m?"green":"red",px:1.5,onClick:function(){return l("breaker")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Status",color:p?"good":"bad",children:(n=u,n>0?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:["[ ",1===n?"Charging":"Discharging"," ]"]}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:p?"good":"bad",children:["[ ",p?"Powered":"Unpowered"," ]"]}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GuestPass=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.GuestPass=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"id-card",selected:!d.showlogs,onClick:function(){return l("mode",{mode:0})},children:"Issue Pass"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"scroll",selected:d.showlogs,onClick:function(){return l("mode",{mode:1})},children:["Records (",d.issue_log.length,")"]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.scan_name?"eject":"id-card",selected:d.scan_name,content:d.scan_name?d.scan_name:"-----",tooltip:d.scan_name?"Eject ID":"Insert ID",onClick:function(){return l("scan")}})})})}),!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issue Guest Pass",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Issue To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.giv_name?d.giv_name:"-----",disabled:!d.scan_name,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.reason?d.reason:"-----",disabled:!d.scan_name,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.duration?d.duration:"-----",disabled:!d.scan_name,onClick:function(){return l("duration")}})})]}),!!d.scan_name&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AccessList,{grantableList:d.grantableList,accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return l("access",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d.printmsg,disabled:!d.canprint,onClick:function(){return l("issue")}})],4)]}),!!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issuance Log",children:!!d.issue_log.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:d.issue_log.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:e},t)}))}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!d.scan_name,onClick:function(){return l("print")}})],4)||(0,o.createComponentVNode)(2,a.Box,{children:"None."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.amount,u=l.energy,s=l.maxEnergy,m=l.mode;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"dispense"===m,content:"Dispense",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"remove"===m,content:"Remove",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"isolate"===m,content:"Isolate",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"isolate"})}})]})})]})})},d=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=i.current_reagent,s=[],m=0;m<(d.length+1)%3;m++)s.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:u===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HealthSensor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.HealthSensor=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.on,m=u.user_health,p=u.minHealth,h=u.maxHealth,f=u.alarm_health;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanning",children:(0,o.createComponentVNode)(2,c.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return d("scan_toggle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health activation",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:p,maxValue:h,value:f,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return d("alarm_health",{alarm_health:t})}})}),null!==m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"User health",children:(0,o.createComponentVNode)(2,c.Box,{color:l(m),bold:m>=100,children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:m})})})]})})})})};var l=function(e){return e>50?"green":e>0?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=(n(29),n(45));t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.decks,s=d.current_deck,m=d.ai_override,p=d.emagged;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Holodeck Control System",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",s]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Available Programs",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{block:!0,content:e,selected:e===s,onClick:function(){return l("select_deck",{deck:e})}},e)})),Boolean(p)&&(0,o.createComponentVNode)(2,a.Button,{content:"Wildlife Simulation",color:"red",onClick:function(){return l("wildlifecarp")}}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[Boolean(m)&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Override Protocols",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){return l("ai_override")}})}),(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Safety Protocols",children:(0,o.createComponentVNode)(2,a.Box,{color:p?"bad":"good",children:p?"Off":"On"})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.implant,s=d.contains_case;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Bio-chip Mini-Computer",children:[u&&s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Life",children:u.life}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Notes",children:u.notes}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Function",children:u["function"]})]})],4):s?(0,o.createComponentVNode)(2,a.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,a.Box,{children:"Please insert a bio-chip casing!"}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!s,onClick:function(){return l("eject_case")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Instrument=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)]})]})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,c.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.lines,s=l.playing,m=l.repeat,p=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,N=l.tickLag,b=l.volume,V=l.minVolume,g=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,c.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"info",content:"Help",onClick:function(){return i("help")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file",content:"New",onClick:function(){return i("newsong")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Import",onClick:function(){return i("import")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,disabled:0===d.length||m<0,icon:"play",content:"Play",onClick:function(){return i("play")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,icon:"stop",content:"Stop",onClick:function(){return i("stop")}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0",maxValue:p,value:m,stepPixelSize:"59",onChange:function(e,t){return i("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return i("tempo",{"new":h+N})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,c.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return i("tempo",{"new":h-N})}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:V,maxValue:g,value:b,stepPixelSize:"6",onDrag:function(e,t){return i("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,u)]})},u=function(e,t){var n,i,l=(0,a.useBackend)(t),d=l.act,u=l.data,s=u.allowedInstrumentNames,m=u.instrumentLoaded,p=u.instrument,h=u.canNoteShift,f=u.noteShift,C=u.noteShiftMin,N=u.noteShiftMax,b=u.sustainMode,V=u.sustainLinearDuration,g=u.sustainExponentialDropoff,v=u.legacy,_=u.sustainDropoffVolume,y=u.sustainHeldNote;return 1===b?(n="Linear",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"0.1",maxValue:"5",value:V,step:"0.5",stepPixelSize:"85",format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return d("setlinearfalloff",{"new":t/10})}})):2===b&&(n="Exponential",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"1.025",maxValue:"10",value:g,step:"0.01",format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return d("setexpfalloff",{"new":t})}})),s.sort(),(0,o.createComponentVNode)(2,c.Box,{my:-1,children:(0,o.createComponentVNode)(2,c.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,c.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current",children:m?(0,o.createComponentVNode)(2,c.Dropdown,{options:s,selected:p,width:"40%",onSelected:function(e){return d("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:C,maxValue:N,value:f,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return d("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,c.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return d("setsustainmode",{"new":e})}}),i]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:_,stepPixelSize:"6",onChange:function(e,t){return d("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,c.Button,{selected:y,icon:y?"toggle-on":"toggle-off",content:y?"Yes":"No",onClick:function(){return d("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return d("reset")}})]})})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.playing,d=i.lines,u=i.editing;return(0,o.createComponentVNode)(2,c.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!u||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:d.length+1})}}),(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!u&&(d.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(26),a=n(42),c=n(1),i=n(2),l=n(3);t.Jukebox=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.track_selected,p=u.track_length,h=u.track_beat,f=u.volume,C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"pause":"play",content:s?"\u0421\u0442\u043e\u043f":"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0422\u0440\u0435\u043a",children:(0,o.createComponentVNode)(2,i.Dropdown,{"overflow-y":"scroll",width:"240px",options:C.map((function(e){return e.name})),disabled:s,selected:m||"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u043a",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c",children:m?p:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0420\u0438\u0442\u043c",children:[m?h:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",1===h?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,i.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Knob,{size:3.2,color:f>=50?"red":"green",value:f,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,o.createComponentVNode)(2,a.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,a.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?u=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Waiting for second person to confirm..."})):u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,a.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return i("ert")}})})}),(0,o.createComponentVNode)(2,a.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return i("reset")}}),children:u})]})})}return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,(0,o.createComponentVNode)(2,a.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return i("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",onClick:function(){return i("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KitchenMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.KitchenMachine=function(e,t){var n=(0,r.useBackend)(t),d=n.data,u=n.config,s=d.ingredients,m=d.operating,p=u.title;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:m,name:p}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Section,{title:"Ingredients",flexGrow:1,children:(0,o.createComponentVNode)(2,a.Table,{className:"Ingredient__Table",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{tr:5,children:[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.name}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]}),2)]},e.name)}))})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.inactive,d=i.tooltip;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return c("cook")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return c("eject")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.isAdmin,m=u.isSlaved,p=u.isMalf,h=u.isAIMalf,f=u.view;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!(!s||!m)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!(!p&&!h)&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Law Management",selected:0===f,onClick:function(){return d("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Lawsets",selected:1===f,onClick:function(){return d("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,i),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,m=i.ion_laws,p=i.ion_law_nr,h=i.has_inherent_laws,f=i.inherent_laws,C=i.has_supplied_laws,N=i.supplied_laws,b=i.channels,V=i.channel,g=i.isMalf,v=i.isAdmin,_=i.zeroth_law,y=i.ion_law,x=i.inherent_law,k=i.supplied_law,L=i.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,d,{title:"ERR_NULL_VALUE",laws:u,ctx:t}),!!s&&(0,o.createComponentVNode)(2,d,{title:p,laws:m,ctx:t}),!!h&&(0,o.createComponentVNode)(2,d,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,d,{title:"Supplied",laws:N,ctx:t}),(0,o.createComponentVNode)(2,a.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:e.channel===V,onClick:function(){return c("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{content:"State Laws",onClick:function(){return c("state_laws")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{content:"Notify",onClick:function(){return c("notify_laws")}})})]})}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:_}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_zeroth_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_ion_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_inherent_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:L,onClick:function(){return c("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_supplied_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.law_sets;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Load Laws",icon:"download",onClick:function(){return c("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(e.ctx),c=n.act,i=n.data.isMalf;return(0,o.createComponentVNode)(2,a.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return c("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return c("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=n(34);t.LibraryComputer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.selected_rating,d=Array(10).fill().map((function(e,t){return 1+t}));return(0,o.createComponentVNode)(2,a.Flex,{children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{bold:!0,icon:"star",color:i>=e?"caution":"default",onClick:function(){return c("set_rating",{rating_value:e})}})},t)})),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,ml:2,fontSize:"150%",children:[i+"/10",(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",0),i=c[0],l=c[1],d=n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Book Archives"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Corporate Literature"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Upload Book"]}),1===d&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===i,onClick:function(){return l(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Patron Manager"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:4===i,onClick:function(){return l(4)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Inventory"]})]})},s=function(e,t){switch((0,r.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,f);case 3:return(0,o.createComponentVNode)(2,C);case 4:return(0,o.createComponentVNode)(2,N);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.searchcontent,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Flex,{"flex-direction":"row",children:[(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title||"Input Title",onClick:function(){return(0,i.modalOpen)(t,"edit_search_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author||"Input Author",onClick:function(){return(0,i.modalOpen)(t,"edit_search_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ratings",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{mr:1,width:"min-content",content:u.ratingmin,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmin")}})}),(0,o.createComponentVNode)(2,l.FlexItem,{children:"To"}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{ml:1,width:"min-content",content:u.ratingmax,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmax")}})})]})})]})]}),(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_search_category",{category_id:p[e]})}})})})}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return c("toggle_search_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Search",icon:"eraser",onClick:function(){return c("clear_search")}}),u.ckey?(0,o.createComponentVNode)(2,a.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return c("clear_ckey_search")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Find My Books",icon:"search",onClick:function(){return c("find_users_books",{user_ckey:m})}})]})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.external_booklist,u=l.archive_pagenumber,s=l.num_pages,p=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Book System Access",children:[(0,o.createComponentVNode)(2,m),(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",disabled:1===u,onClick:function(){return c("deincrementpagemax")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",disabled:1===u,onClick:function(){return c("deincrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{bold:!0,content:u,onClick:function(){return(0,i.modalOpen)(t,"setpagenumber")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",disabled:u===s,onClick:function(){return c("incrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",disabled:u===s,onClick:function(){return c("incrementpagemax")}})],4),(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ratings"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Category"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===p&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_external_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},e.id)}))]})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.programmatic_booklist,u=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Corporate Book Catalog",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e,n){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:2}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===u&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_programmatic_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},n)}))]})})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.selectedbook,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Section,{title:"Book System Upload",children:[u.copyright?(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Uploader"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_upload_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,disabled:u.copyright,selected:!0,icon:"unlink",onClick:function(){return c("toggle_upload_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",disabled:u.copyright,content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:u.summary})]})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,mt:16,icon:"upload",width:"auto",disabled:u.copyright,content:"Upload Book",onClick:function(){return c("uploadbook",{user_ckey:m})}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.checkout_data;return(0,o.createComponentVNode)(2,a.Section,{title:"Checked Out Books",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Patron"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-tag"}),e.patron_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return c("reportlost",{libraryid:e.libraryid})}})})]},t)}))]})})},N=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.inventory_list);return(0,o.createComponentVNode)(2,a.Section,{title:"Library Inventory",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"LIB ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"})]}),c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.libraryid}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"})," ",e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},t)}))]})})};(0,i.modalRegisterBodyOverride)("expand_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=e.args,u=l.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:d.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:d.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:d.summary}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[d.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!d.isProgrammatic&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Categories",children:d.categories.join(", ")})]}),(0,o.createVNode)(1,"br"),u===d.ckey&&(0,o.createComponentVNode)(2,a.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:d.isProgrammatic,onClick:function(){return c("delete_book",{bookid:d.id,user_ckey:u})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Report Book",icon:"flag",color:"red",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"report_book",{bookid:d.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"rate_info",{bookid:d.id})}})]})})),(0,i.modalRegisterBodyOverride)("report_book",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,d=i.selected_report,u=i.report_categories,s=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Report this book for Rule Violations",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reasons",children:(0,o.createComponentVNode)(2,a.Box,{children:u.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:e.category_id===d,onClick:function(){return c("set_report",{report_type:e.category_id})}}),(0,o.createVNode)(1,"br")],4,t)}))})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return c("submit_report",{bookid:l.id,user_ckey:s})}})]})})),(0,i.modalRegisterBodyOverride)("rate_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,u=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:l.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[l.current_rating?l.current_rating:0,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Ratings",children:l.total_ratings?l.total_ratings:0})]}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return c("rate_book",{bookid:l.id,user_ckey:u})}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29);t.LibraryManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,l)})]})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act;switch(n.data.pagestate){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,i.modalOpen)(t,"specify_ssid_delete")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_delete")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_search")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return c("view_reported_books")}})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reports;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"All Reported Books",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Uploader CKEY"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Report Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reporter Ckey"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.uploader_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.report_description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.reporter_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return c("unflag_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.ckey,d=i.booklist;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"Books uploaded by ",l,(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ListInput=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(99),d=0;t.ListInput=function(e,t){var n=(0,a.useBackend)(t),r=n.act,s=n.data,m=s.title,p=s.message,h=s.buttons,f=s.timeout,C=(0,a.useLocalState)(t,"search_bar",!1),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"displayed_array",h),g=V[0],v=V[1],_=(0,a.useLocalState)(t,"search_array",[]),y=_[0],x=_[1],k=(0,a.useLocalState)(t,"search_index",0),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"last_char_code",null),S=B[0],I=B[1],T=(0,a.useLocalState)(t,"selected_button",h[0]),A=T[0],E=T[1];return(0,o.createComponentVNode)(2,i.Window,{title:m,children:[f!==undefined&&(0,o.createComponentVNode)(2,u,{value:f}),(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Layout__content--flexColumn",height:"100%",mb:"7px",children:(0,o.createComponentVNode)(2,c.Section,{className:"ListInput__Section",flexGrow:"1",scrollable:!0,fill:!0,title:p,tabIndex:1,onKeyDown:function(e){if(e.preventDefault(),!(d>performance.now())){if(d=performance.now()+125,e.keyCode===l.ARROW_KEY_UP||e.keyCode===l.ARROW_KEY_DOWN){var t=1;e.keyCode===l.ARROW_KEY_UP&&(t=-1);for(var n=0;n=h.length&&(n=0),E(h[n]),I(null),void document.getElementById(h[n]).focus()}var o=String.fromCharCode(e.keyCode).toLowerCase();if(o){var r;if(o===S&&y.length>0){var a=L+1;a0&&(x(c),w(0),r=c[0])}r&&(I(o),E(r),document.getElementById(r).focus())}}},buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"search",color:"transparent",selected:N,tooltip:"Search...",tooltipPosition:"left",onClick:function(){b(!N),v(h)},compact:!0}),children:(0,o.createComponentVNode)(2,c.Flex,{wrap:"wrap",children:g.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",content:e,id:e,width:"100%",selected:A===e,onClick:function(){A===e?r("choose",{choice:e}):E(e),I(null)}})},e)}))})})}),N&&(0,o.createComponentVNode)(2,c.Flex.Item,{basis:2.5,children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",autoFocus:!0,onInput:function(e,t){return v(h.filter((function(e){return-1!==e.toLowerCase().search(t.toLowerCase())})))}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,ml:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"good",content:"Confirm",disabled:null===A,onClick:function(){return r("choose",{choice:A})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,mr:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"bad",content:"Cancel",onClick:function(){return r("cancel")}})})]})})]})})]})};var u=function(e){var t=e.value;return(0,o.createVNode)(1,"div","ListInput__Loader",(0,o.createComponentVNode)(2,c.Box,{className:"ListInput__LoaderProgress",style:{width:100*(0,r.clamp01)(t)+"%"}}),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.MODsuitContent=t.MODsuit=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.NumberInput,{value:c,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(e,t){return l("configure",{key:n,value:t,ref:i})}})},l=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:c,onClick:function(){return l("configure",{key:n,value:!c,ref:i})}})},d=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"paint-brush",onClick:function(){return l("configure",{key:n,ref:i})}}),(0,o.createComponentVNode)(2,a.ColorBox,{color:c,mr:.5})],4)},u=function(e,t){var n=e.name,c=e.value,i=e.values,l=e.module_ref,d=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Dropdown,{displayText:c,options:i,onSelected:function(e){return d("configure",{key:n,value:e,ref:l})}})},s=function(e,t){e.name;var n=e.display_name,r=e.type,c=(e.value,e.values,e.module_ref,{number:(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,Object.assign({},e))),bool:(0,o.normalizeProps)((0,o.createComponentVNode)(2,l,Object.assign({},e))),color:(0,o.normalizeProps)((0,o.createComponentVNode)(2,d,Object.assign({},e))),list:(0,o.normalizeProps)((0,o.createComponentVNode)(2,u,Object.assign({},e)))});return(0,o.createComponentVNode)(2,a.Box,{children:[n,": ",c[r]]})},m={rad_counter:function(e,t){var n=e.active,r=e.userradiated,c=e.usertoxins,i=e.usermaxtoxins,l=e.threatlevel;return(0,o.createComponentVNode)(2,a.Flex,{fill:!0,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Level",color:n&&r?"bad":"good",children:n&&r?"IRRADIATED!":"RADIATION-FREE"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxins Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?c/i:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Hazard Level",color:n&&l?"bad":"good",bold:!0,children:n&&l?l:0})})]})},health_analyzer:function(e,t){var n=e.active,r=e.userhealth,c=e.usermaxhealth,i=e.userbrute,l=e.userburn,d=e.usertoxin,u=e.useroxy;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?r/c:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?r:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?l/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?l:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})})]})],4)},status_readout:function(e,t){var n=e.active,r=e.statustime,c=e.statusid,i=e.statushealth,l=e.statusmaxhealth,d=e.statusbrute,u=e.statusburn,s=e.statustoxin,m=e.statusoxy,p=e.statustemp,h=e.statusnutrition,f=e.statusfingerprints,C=e.statusdna,N=e.statusviruses;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Time",children:n?r:"00:00:00"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Number",children:n?c||"0":"???"})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/l:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?s/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?m/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})})})]}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Body Temperature",children:n?p:0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Nutrition Status",children:n?h:0})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"DNA",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:n?f:"???"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:n?C:"???"})]})}),!!n&&!!N&&(0,o.createComponentVNode)(2,a.Section,{title:"Diseases",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.stage,"/",e.maxstage]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cure})]},e.name)}))]})})],0)}},p=function(){return(0,o.createComponentVNode)(2,a.Section,{align:"center",fill:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},h=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},f=function(e,t){var n=e.configuration_data,r=e.module_ref,c=Object.keys(n);return(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[c.map((function(e){var t=n[e];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,s,{name:e,display_name:t.display_name,type:t.type,value:t.value,values:t.values,module_ref:r})},t.key)})),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:e.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},C=function(e){switch(e){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.malfunctioning,u=i.locked,s=i.open,m=i.selected_module,p=i.complexity,h=i.complexity_max,f=i.wearer_name,C=i.wearer_job,N=d?"Malfunctioning":l?"Active":"Inactive";return(0,o.createComponentVNode)(2,a.Section,{title:"Parameters",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l?"Deactivate":"Activate",onClick:function(){return c("activate")}}),children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock-open":"lock",content:u?"Unlock":"Lock",onClick:function(){return c("lock")}}),children:u?"Locked":"Unlocked"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover",children:s?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected Module",children:m||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[p," (",h,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:[f,", ",C]})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.active,c.control),l=c.helmet,d=c.chestplate,u=c.gauntlets,s=c.boots,m=c.core,p=c.charge;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:[(0,o.createComponentVNode)(2,a.Collapsible,{title:"Parts",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Control Unit",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:l||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestplate",children:d||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",children:u||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",children:s||"None"})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Type",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/100,content:p+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},V=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.active,l=c.modules.filter((function(e){return!!e.id}));return(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==l.length&&l.map((function(e){var t=m[e.id];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[!i&&(0,o.createComponentVNode)(2,h),(0,o.normalizeProps)((0,o.createComponentVNode)(2,t,Object.assign({},e,{active:i})))]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.complexity_max,d=i.modules,u=(0,r.useLocalState)(t,"module_configuration",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Modules",fill:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:e.module_name,children:(0,o.createComponentVNode)(2,a.Section,{children:[s===e.ref&&(0,o.createComponentVNode)(2,f,{configuration_data:e.configuration_data,module_ref:e.ref,onExit:function(){return m(null)}}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.module_complexity,"/",l]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.idle_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.active_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.use_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.cooldown>0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:C(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return m(e.ref)},icon:"cog",selected:s===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===e.configuration_data.length}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,o.createComponentVNode)(2,a.Box,{children:e.description})]})})},e.ref)}))||(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Modules Detected"})})})})},v=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.ui_theme,c.interface_break);return(0,o.createComponentVNode)(2,a.Section,{children:!!i&&(0,o.createComponentVNode)(2,p)||(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,N)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,b)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,g)})]})})};t.MODsuitContent=v;t.MODsuit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),i=a.ui_theme,l=a.interface_break;return(0,o.createComponentVNode)(2,c.Window,{theme:i,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!l,children:(0,o.createComponentVNode)(2,v)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MagnetController=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(29),d=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]);t.MagnetController=function(e,t){var n=(0,a.useBackend)(t),u=n.act,s=n.data,m=s.autolink,p=s.code,h=s.frequency,f=s.linkedMagnets,C=s.magnetConfiguration,N=s.path,b=s.pathPosition,V=s.probing,g=s.powerState,v=s.speed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!m&&(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Probe",icon:V?"spinner":"sync",iconSpin:!!V,disabled:V,onClick:function(){return u("probe_magnets")}}),title:"Magnet Linking",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:(0,r.toFixed)(h/10,1)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",children:p})]})}),(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{icon:g?"power-off":"times",content:g?"On":"Off",selected:g,onClick:function(){return u("toggle_power")}}),title:"Controller Configuration",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:v.value,minValue:v.min,maxValue:v.max,onChange:function(e,t){return u("set_speed",{speed:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Path",children:[Array.from(d.entries()).map((function(e){var t=e[0],n=e[1],r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button,{icon:r,tooltip:a,onClick:function(){return u("path_add",{code:t})}},t)})),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){return u("path_clear")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){return(0,l.modalOpen)(t,"path_custom_input")}}),(0,o.createComponentVNode)(2,c.BlockQuote,{children:N.map((function(e,t){var n=d.get(e)||{icon:"question"},r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button.Confirm,{selected:t+2===b,icon:r,confirmIcon:r,confirmContent:"",tooltip:a,onClick:function(){return u("path_remove",{index:t+1,code:e})}},t)}))})]})]})}),f.map((function(e,t){var n=e.uid,r=e.powerState,a=e.electricityLevel,i=e.magneticField;return(0,o.createComponentVNode)(2,c.Section,{title:"Magnet #"+(t+1)+" Configuration",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:r?"power-off":"times",content:r?"On":"Off",selected:r,onClick:function(){return u("toggle_magnet_power",{id:n})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Move Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:a,minValue:C.electricityLevel.min,maxValue:C.electricityLevel.max,onChange:function(e,t){return u("set_electricity_level",{id:n,electricityLevel:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Field Size",children:(0,o.createComponentVNode)(2,c.Slider,{value:i,minValue:C.magneticField.min,maxValue:C.magneticField.max,onChange:function(e,t){return u("set_magnetic_field",{id:n,magneticField:t})}})})]})},n)}))]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell,s=d&&d.name;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(12),n(1)),a=n(2),c=n(3),i=n(20);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return s.length?(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,i.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,i.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(29),l=n(34),d=n(3),u=n(123),s=n(124),m=n(169),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},h={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},f=function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,r=(0,a.useBackend)(t).data,l=r.loginState,p=r.screen;return l.logged_in?(2===p?n=(0,o.createComponentVNode)(2,C):3===p?n=(0,o.createComponentVNode)(2,N):4===p?n=(0,o.createComponentVNode)(2,b):5===p?n=(0,o.createComponentVNode)(2,v):6===p&&(n=(0,o.createComponentVNode)(2,_)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,k),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.records,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],p=(0,a.useLocalState)(t,"sortId","name"),f=p[0],C=(p[1],(0,a.useLocalState)(t,"sortOrder",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){return i("screen",{screen:3})}})}),(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Physical Status, or Mental Status",width:"100%",onInput:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,y,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,y,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,y,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,y,{id:"p_stat",children:"Patient Status"}),(0,o.createComponentVNode)(2,y,{id:"m_stat",children:"Mental Status"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.p_stat+"|"+e.m_stat}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listRow--"+h[e.p_stat],onClick:function(){return i("view_record",{view_record:e.ref})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.p_stat}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.m_stat})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all_med_records")}})],0)},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.medical,d=i.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Record",ml:"0.5rem",onClick:function(){return r("print_record")}}),children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,c.Section,{title:"Medical Data",level:2,buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",onClick:function(){return r("del_med_record")}}),children:(0,o.createComponentVNode)(2,g)})],4)},V=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,c.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return f(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return f(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,i.modalOpen)(t,"add_comment")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return r("del_comment",{del_comment:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return r("new_med_record")}})]})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.virus,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],h=(0,a.useLocalState)(t,"sortId2","name"),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sortOrder2",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, Max Stages, or Severity",width:"100%",onInput:function(e,t){return m(t)}})})}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,x,{id:"max_stages",children:"Max Stages"}),(0,o.createComponentVNode)(2,x,{id:"severity",children:"Severity"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.max_stages+"|"+e.severity}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listVirus--"+e.severity,onClick:function(){return i("vir",{vir:e.D})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"virus"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.max_stages}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:p[e.severity],children:e.severity})]},e.id)}))]})})]})},_=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.medbots);return 0===r.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"There are no Medibots."}):(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Chemicals"})]}),r.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listMedbot--"+e.on,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"medical"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.on?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,c.Box,{color:"average",children:"Offline"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer"})]},e.id)}))]})})})},y=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e,t){var n=(0,a.useLocalState)(t,"sortId2","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder2",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},k=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){r("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:5===l,onClick:function(){r("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:6===l,onClick:function(){return r("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"plus-square"}),"Medibot Tracking"]}),3===l&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wrench"}),"Record Maintenance"]}),4===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Severity",color:p[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MerchVendor=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productImage,u=e.productCategory,s=i.user_money;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{disabled:l.price>s,icon:"shopping-cart",content:l.price,textAlign:"left",onClick:function(){return c("purchase",{name:l.name,category:u})}})})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1)[0],i=n.products,d=n.imagelist,u=["apparel","toy","decoration"];return(0,o.createComponentVNode)(2,a.Table,{children:i[u[c]].map((function(e){return(0,o.createComponentVNode)(2,l,{product:e,productImage:d[e.path],productCategory:u[c]},e.name)}))})};t.MerchVendor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.user_cash,p=s.inserted_cash;return(0,o.createComponentVNode)(2,i.Window,{title:"Merch Computer",resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[(0,o.createComponentVNode)(2,a.Box,{m:2,children:"Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives."}),null!==m&&(0,o.createComponentVNode)(2,a.Box,{children:["Your balance is ",(0,o.createVNode)(1,"b",null,[m||0,(0,o.createTextVNode)(" credits")],0),"."]}),(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Box,{color:"light-grey",children:["There is ",(0,o.createVNode)(1,"b",null,p,0)," credits inserted."]})}),(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return l("change")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})]})})};var u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1),i=c[0],l=c[1];n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:"Toys"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:"Decorations"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3),l=["title","items"];var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_id,d=i.id;return(0,o.createComponentVNode)(2,c.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",d.name,".",(0,o.createVNode)(1,"br"),"You have ",d.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,c.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},s=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.has_id,u=i.id,s=i.items,m=(0,a.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,a.useLocalState)(t,"sort","Alphabetical")),C=f[0],N=(f[1],(0,a.useLocalState)(t,"descending",!1)),b=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),g=!1,v=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=l&&u.points>=e[1].price,e[1]})).sort(d[C]);if(0!==n.length)return b&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Section,{children:g?v:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No items matching your criteria was found!"})})})},m=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),i=(0,a.useLocalState)(t,"sort",""),l=(i[0],i[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,d=e.title,u=e.items,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Collapsible,Object.assign({open:!0,title:d},s,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,c.Button,{disabled:!i.has_id||i.id.points0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+l+'"':"\u0412\u0441\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438",fill:!0,children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"100%",width:"100%",display:"inline-block",children:a.filter((function(e){return e.name&&(!(l.length>0)||(e.name.toLowerCase().includes(l.toLowerCase())||e.desc.toLowerCase().includes(l.toLowerCase())||e.author.toLowerCase().includes(l.toLowerCase())))})).map((function(e){return(0,o.createComponentVNode)(2,c.Collapsible,{title:e.name,children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0410\u0432\u0442\u043e\u0440\u044b",children:e.author}),(0,o.createComponentVNode)(2,c.Section,{title:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",children:e.desc})]},e.name)}))})})})]})};t.ModpacksListContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NTRecruiter=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.NTRecruiter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.gamestatus,s=d.cand_name,m=d.cand_gender,p=d.cand_age,h=d.cand_species,f=d.cand_planet,C=d.cand_job,N=d.cand_records,b=d.cand_curriculum,V=d.total_curriculums,g=d.reason;return 0===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"31px",color:"white",pb:"10px",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]}),(0,o.createComponentVNode)(2,a.Button,{mt:"50px",textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return l("start_game")}}),(0,o.createComponentVNode)(2,a.Button,{mt:"10px",textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return l("instructions")}})]})})}):1===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{color:"grey",title:"Guide",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss"," ",(0,o.createVNode)(1,"b",null,V,0)," candidates, one wrongly made choice leads to a game over."]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"3#",color:"silver",children:[(0,o.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,o.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"7#",color:"silver",children:["Pay attention to ",(0,o.createVNode)(1,"b",null,"typos",16)," and ",(0,o.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for ",(0,o.createVNode)(1,"b",null,"jobs",16)," that they"," ",(0,o.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,o.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]})]})})})}):2===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",b]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Name",color:"silver",children:(0,o.createVNode)(1,"b",null,s,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Gender",color:"silver",children:(0,o.createVNode)(1,"b",null,m,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Age",color:"silver",children:(0,o.createVNode)(1,"b",null,p,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Species",color:"silver",children:(0,o.createVNode)(1,"b",null,h,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Planet of Origin",color:"silver",children:(0,o.createVNode)(1,"b",null,f,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Requested Job",color:"silver",children:(0,o.createVNode)(1,"b",null,C,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Employment Records",color:"silver",children:(0,o.createVNode)(1,"b",null,N,0)})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Stamp the application!",color:"grey",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{float:"right",color:"green",content:"Hire",fontSize:"150%",width:"49%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return l("hire")}}),(0,o.createComponentVNode)(2,a.Button,{float:"left",color:"red",content:"Dismiss",fontSize:"150%",width:"49%",icon:"ban",lineHeight:4.5,onClick:function(){return l("dismiss")}})]})]})}):3===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"15px",color:"label",textAlign:"center",children:g}),(0,o.createComponentVNode)(2,a.Flex.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",b-1,"/",V]}),(0,o.createComponentVNode)(2,a.Flex.Item,{pt:"20px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:2,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}})})]})})}):void 0}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(44),l=n(3),d=n(29),u=n(169),s=["icon","iconSpin","selected","security","onClick","title","children"],m=["name"];function p(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var h=["security","engineering","medical","science","service","supply"],f={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,i=(0,a.useBackend)(t),s=i.act,m=i.data,p=m.is_security,h=m.is_admin,f=m.is_silent,V=m.is_printing,g=m.screen,_=m.channels,y=m.channel_idx,x=void 0===y?-1:y,k=(0,a.useLocalState)(t,"menuOpen",!1),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"viewingPhoto",""),S=B[0],I=(B[1],(0,a.useLocalState)(t,"censorMode",!1)),T=I[0],A=I[1];0===g||2===g?n=(0,o.createComponentVNode)(2,N):1===g&&(n=(0,o.createComponentVNode)(2,b));var E=_.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:p&&"security",children:[S?(0,o.createComponentVNode)(2,v):(0,o.createComponentVNode)(2,d.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",L&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,C,{icon:"bars",title:"Toggle Menu",onClick:function(){return w(!L)}}),(0,o.createComponentVNode)(2,C,{icon:"newspaper",title:"Headlines",selected:0===g,onClick:function(){return s("headlines")},children:E>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:E>=10?"9+":E})}),(0,o.createComponentVNode)(2,C,{icon:"briefcase",title:"Job Openings",selected:1===g,onClick:function(){return s("jobs")}}),(0,o.createComponentVNode)(2,c.Divider)]}),(0,o.createComponentVNode)(2,c.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:_.map((function(e){return(0,o.createComponentVNode)(2,C,{icon:e.icon,title:e.name,selected:2===g&&_[x-1]===e,onClick:function(){return s("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,c.Divider),(!!p||!!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,C,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,C,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return A(!T)}}),(0,o.createComponentVNode)(2,c.Divider)],4),(0,o.createComponentVNode)(2,C,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,C,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,d.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,c.Divider),(0,o.createComponentVNode)(2,C,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return s("print_newspaper")}}),(0,o.createComponentVNode)(2,C,{icon:f?"volume-mute":"volume-up",title:"Mute: "+(f?"On":"Off"),onClick:function(){return s("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,u.TemporaryNotice),n]})]})})]})};var C=function(e,t){(0,a.useBackend)(t).act;var n=e.icon,i=void 0===n?"":n,l=e.iconSpin,d=e.selected,u=void 0!==d&&d,m=e.security,h=void 0!==m&&m,f=e.onClick,C=e.title,N=e.children,b=p(e,s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",u&&"Newscaster__menuButton--selected",h&&"Newscaster__menuButton--security"]),onClick:f},b,{children:[u&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,c.Icon,{name:i,spin:l,size:"2"}),(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--title",children:C}),N]})))},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,u=i.is_admin,s=i.channel_idx,m=i.channel_can_manage,p=i.channels,h=i.stories,f=i.wanted,C=(0,a.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,a.useLocalState)(t,"censorMode",!1)),g=b[0],v=(b[1],2===l&&s>-1?p[s-1]:null);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,V,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,V,{story:e},e)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([g&&(0,o.createComponentVNode)(2,c.Button,{disabled:!!v.admin&&!u,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!m,icon:"cog",content:"Manage",onClick:function(){return(0,d.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),!!u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ckey",children:v.author_ckey}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},b=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.jobs,d=i.wanted,u=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!d&&(0,o.createComponentVNode)(2,V,{story:d,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:u>0?h.map((function(e){return Object.assign({},f[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},V=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=e.story,s=e.wanted,m=void 0!==s&&s,p=d.is_admin,h=(0,a.useLocalState)(t,"fullStories",[]),f=h[0],C=h[1],N=(0,a.useLocalState)(t,"censorMode",!1),b=N[0];N[1];return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__story",m&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&u.censor_flags?"[REDACTED]":u.title)||"News from "+u.author],0),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[!m&&b&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,o.createComponentVNode)(2,c.Button,{enabled:2&u.censor_flags,icon:2&u.censor_flags?"comment-slash":"comment",content:2&u.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:u.uid})}})}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",u.author," |\xa0",!!p&&(0,o.createFragment)([(0,o.createTextVNode)("ckey: "),u.author_ckey,(0,o.createTextVNode)(" |\xa0")],0),!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),u.view_count.toLocaleString(),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("|\xa0")],0),(0,o.createComponentVNode)(2,c.Icon,{name:"clock"})," ",(0,i.timeAgo)(u.publish_time,d.world_time)]})]})}),children:(0,o.createComponentVNode)(2,c.Box,{children:2&u.censor_flags?"[REDACTED]":(0,o.createFragment)([!!u.has_photo&&(0,o.createComponentVNode)(2,g,{name:"story_photo_"+u.uid+".png",float:"right",ml:"0.5rem"}),(u.body_short||u.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),u.body_short&&(0,o.createComponentVNode)(2,c.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return C([].concat(f,[u.uid]))}}),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})],0)})})},g=function(e,t){var n=e.name,r=p(e,m),i=(0,a.useLocalState)(t,"viewingPhoto",""),l=(i[0],i[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},v=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})},_=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||i){var l="manage_channel"===e.id,u=!!e.args.is_admin,s=e.args.scanned_user,m=(0,a.useLocalState)(t,"author",(null==i?void 0:i.author)||s||"Unknown"),p=m[0],h=m[1],f=(0,a.useLocalState)(t,"name",(null==i?void 0:i.name)||""),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"description",(null==i?void 0:i.description)||""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"icon",(null==i?void 0:i.icon)||"newspaper"),_=v[0],y=v[1],x=(0,a.useLocalState)(t,"isPublic",!!l&&!(null==i||!i["public"])),k=x[0],L=x[1],w=(0,a.useLocalState)(t,"adminLocked",1===(null==i?void 0:i.admin)||!1),B=w[0],S=w[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+i.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!u,width:"100%",value:p,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return N(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:V,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,c.Input,{disabled:!u,value:_,width:"35%",mr:"0.5rem",onInput:function(e,t){return y(t)}}),(0,o.createComponentVNode)(2,c.Icon,{name:_,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,c.Button,{selected:k,icon:k?"toggle-on":"toggle-off",content:k?"Yes":"No",onClick:function(){return L(!k)}})}),u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:B,icon:B?"lock":"lock-open",content:B?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return S(!B)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===p.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:p,name:C.substr(0,49),description:V.substr(0,128),icon:_,"public":k?1:0,admin_locked:B?1:0}),(0,a.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,d.modalClose)(t)};(0,d.modalRegisterBodyOverride)("create_channel",_),(0,d.modalRegisterBodyOverride)("manage_channel",_),(0,d.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.channels,s=i.channel_idx,m=void 0===s?-1:s,p=!!e.args.is_admin,h=e.args.scanned_user,f=u.slice().sort((function(e,t){if(m<0)return 0;var n=u[m-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return p||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,a.useLocalState)(t,"author",h||"Unknown"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],_=V[1],y=(0,a.useLocalState)(t,"title",""),x=y[0],k=y[1],L=(0,a.useLocalState)(t,"body",""),w=L[0],B=L[1],S=(0,a.useLocalState)(t,"adminLocked",!1),I=S[0],T=S[1];return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!p,width:"100%",value:N,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return _(e)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Divider),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:x,onInput:function(e,t){return k(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:w,onInput:function(e,t){return B(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,title:x,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"}),w.split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})]})})}),p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:I,icon:I?"lock":"lock-open",content:I?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return T(!I)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===N.trim().length||0===v.trim().length||0===x.trim().length||0===w.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,"create_story","",{author:N,channel:v,title:x.substr(0,127),body:w.substr(0,1023),admin_locked:I?1:0}),(0,a.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,d.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.wanted,s=!!e.args.is_admin,m=e.args.scanned_user,p=(0,a.useLocalState)(t,"author",(null==u?void 0:u.author)||m||"Unknown"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"name",(null==u?void 0:u.title.substr(8))||""),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"description",(null==u?void 0:u.body)||""),v=V[0],_=V[1],y=(0,a.useLocalState)(t,"adminLocked",1===(null==u?void 0:u.admin_locked)||!1),x=y[0],k=y[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!s,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",value:N,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return _(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:x,icon:x?"lock":"lock-open",content:x?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return k(!x)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!u,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,d.modalClose)(t),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===h.trim().length||0===N.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:h,name:N.substr(0,127),description:v.substr(0,511),admin_locked:x?1:0}),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return i("auth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return i("code")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){return i("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return i("set_time")}})})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return i("toggle_safety")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,a.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return i("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return i("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(12),a=n(1),c=n(3),i=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,i.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.verbose,d=c.health,u=c.healthAlarm,s=c.oxy,m=c.oxyAlarm,p=c.crit;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,i.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:u,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:m,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},p=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(u),a=o.match(u);return r&&a&&n.replace(u,"")===o.replace(u,"")?parseInt(r[1],10)-parseInt(a[1],10):m(n,o)},h=function(e,t){var n=e.searchText,r=e.source,a=e.title,i=e.color,l=e.sorted,d=r.filter(s(n));return l&&d.sort(p),r.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:a+" - ("+r.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,f,{thing:e,color:i},e.name)}))})},f=function(e,t){var n=(0,a.useBackend)(t).act,r=e.color,i=e.thing;return(0,o.createComponentVNode)(2,c.Button,{color:r,onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,a.useBackend)(t),d=r.act,u=r.data,C=u.alive,N=u.antagonists,b=u.highlights,V=u.response_teams,g=(u.auto_observe,u.dead),v=u.ghosts,_=u.misc,y=u.npcs,x=(0,a.useLocalState)(t,"searchText",""),k=x[0],L=x[1],w={},B=l(N);!(n=B()).done;){var S=n.value;w[S.antag]===undefined&&(w[S.antag]=[]),w[S.antag].push(S)}var I=Object.entries(w);I.sort((function(e,t){return m(e[0],t[0])}));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:k,onInput:function(e,t){return L(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[I.map((function(e){return e[0],e[1]})),b,C,v,g,y,_];t0&&(0,o.createComponentVNode)(2,c.Section,{title:"Antagonists",children:I.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,c.Section,{title:t+" - ("+n.length+")",level:2,children:n.filter(s(k)).sort(p).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),b.length>0&&(0,o.createComponentVNode)(2,h,{title:"Highlights",source:b,searchText:k,color:"teal"}),(0,o.createComponentVNode)(2,h,{title:"Response Teams",source:V,searchText:k,color:"purple"}),(0,o.createComponentVNode)(2,h,{title:"Alive",source:C,searchText:k,color:"good"}),(0,o.createComponentVNode)(2,h,{title:"Ghosts",source:v,searchText:k,color:"grey"}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:g,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:y,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:_,searchText:k,sorted:!1})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"43%"}),(0,o.createComponentVNode)(2,s,{height:"57%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.id,u=i.points,s=i.disk,m=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({},m,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID card",children:d?(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:d.name,tooltip:"Ejects the ID card.",onClick:function(){return c("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return c("insert_id")}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.points)})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.total_points)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed Points",color:u>0?"good":"grey",bold:u>0&&"good",children:l(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"hand-holding-usd",content:"Claim",onClick:function(){return c("claim")}})})]}),(0,o.createComponentVNode)(2,a.Divider),s?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,icon:"eject",content:s.name,tooltip:"Ejects the design disk.",onClick:function(){return c("eject_disk")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,a.Box,{color:s.design&&(s.compatible?"good":"bad"),children:s.design||"N/A"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!s.design||!s.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return c("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.sheets),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,p,{ore:e},e.id)}))]})))},s=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.alloys),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,a.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)}))]})})},p=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore;if(!(c.value&&c.amount<=0)||["$metal","$glass"].indexOf(c.id)>-1){var i=c.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+i+".png",verticalAlign:"middle",ml:"0rem"}),c.name]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",color:c.amount>=1?"good":"gray",bold:c.amount>=1,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:c.value}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.ore,l=i.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,c.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:i.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",textAlign:"middle",color:i.amount>=1?"good":"gray",align:"center",children:i.description}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"10%",textAlign:"center",color:i.amount>=1?"good":"gray",bold:i.amount>=1,align:"center",children:i.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(i.amount,50),stepPixelSize:6,onChange:function(e,t){return n(i.value?"sheet":"alloy",{id:i.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(626);t.PAI=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.app_template,m=u.app_icon,p=u.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(s);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m,mr:1}),p,"pai_main_menu"!==s&&(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return d("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_atmosphere.js":627,"./pai_bioscan.js":628,"./pai_directives.js":629,"./pai_doorjack.js":630,"./pai_main_menu.js":631,"./pai_manifest.js":632,"./pai_medrecords.js":633,"./pai_messenger.js":634,"./pai_radio.js":635,"./pai_secrecords.js":636,"./pai_signaler.js":637};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=626},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),a=n(229);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.AtmosScan,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),a=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.app_data),i=c.holder,l=c.dead,d=c.health,u=c.brute,s=c.oxy,m=c.tox,p=c.burn;c.temp;return i?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"green",children:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"red",children:u})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),a=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.master,d=i.dna,u=i.prime,s=i.supplemental;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master",children:l?l+" ("+d+")":"None"}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return c("getdna")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prime Directive",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplemental Directives",children:s||"None"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),a=n(2);t.pai_doorjack=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data.app_data,u=d.cable,s=d.machine,m=d.inprogress,p=d.progress;d.aborted;return n=s?(0,o.createComponentVNode)(2,a.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,a.Button,{content:u?"Extended":"Retracted",color:u?"orange":null,onClick:function(){return l("cable")}}),s&&(c=(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[67,Infinity],average:[33,67],bad:[-Infinity,33]},value:p,maxValue:100}),m?(0,o.createComponentVNode)(2,a.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cable",children:n}),c]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),a=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.available_software,d=i.installed_software,u=i.installed_toggles,s=i.available_ram,m=i.emotions,p=i.current_emotion,h=i.speech_verbs,f=i.current_speech_verb,C=i.available_chassises,N=i.current_chassis,b=[];return d.map((function(e){return b[e.key]=e.name})),u.map((function(e){return b[e.key]=e.name})),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available RAM",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!b[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>s,onClick:function(){return c("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!b[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Software",children:[d.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,onClick:function(){return c("startSoftware",{software_key:e.key})}},e.key)})),0===d.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Toggles",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return c("setToggle",{toggle_key:e.key})}},e.key)})),0===u.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Emotion",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.id===p,onClick:function(){return c("setEmotion",{emotion:e.id})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Speaking State",children:h.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.name===f,onClick:function(){return c("setSpeechStyle",{speech_state:e.name})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Chassis Type",children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.icon===N,onClick:function(){return c("setChassis",{chassis_to_change:e.icon})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.CrewManifest,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),a=n(230);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return c.app_data.active_convo?(0,o.createComponentVNode)(2,a.ActiveConversation,{data:c.app_data}):(0,o.createComponentVNode)(2,a.MessengerList,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),a=n(12),c=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.app_data,d=l.minFrequency,u=l.maxFrequency,s=l.frequency,m=l.broadcasting;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,a.toFixed)(e,1)},onChange:function(e,t){return i("freq",{freq:t})}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return i("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return i("toggleBroadcast")},selected:m,content:m?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),a=n(170);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Signaler,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(639);t.PDA=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data),m=s.app;if(!s.owner)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var p=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(m.template);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m.icon,mr:1}),m.name]}),p:1,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.idInserted,d=i.idLink,u=i.stationTime,s=i.cartridge_name;return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",color:"transparent",onClick:function(){return c("Authenticate")},content:d})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),s?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sd-card",color:"transparent",onClick:function(){return c("Eject")},content:"Eject "+s})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:u})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app;return(0,o.createComponentVNode)(2,a.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return c("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){c("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":640,"./pda_janitor.js":641,"./pda_main_menu.js":642,"./pda_manifest.js":643,"./pda_medical.js":644,"./pda_messenger.js":230,"./pda_mob_hunt.js":645,"./pda_mule.js":646,"./pda_nanobank.js":647,"./pda_notes.js":648,"./pda_power.js":649,"./pda_secbot.js":650,"./pda_security.js":651,"./pda_signaler.js":652,"./pda_status_display.js":653,"./pda_supplyrecords.js":654};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=639},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),a=n(229);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.janitor),i=c.user_loc,l=c.mops,d=c.buckets,u=c.cleanbots,s=c.carts;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:[i.x,",",i.y]}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Bucket Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cleanbot Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(12),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.owner,d=i.ownjob,u=i.idInserted,s=i.categories,m=i.pai,p=i.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return c("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=i.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.uid in p?e.notify_icon:e.icon,iconSpin:e.uid in p,color:e.uid in p?"red":"transparent",content:e.name,onClick:function(){return c("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return c("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return c("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),a=n(127);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.wild_captures,u=i.no_collection,s=i.entry;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return c("Disconnect")}})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return c("Reconnect")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Wild Captures",children:d})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,a.Box,{children:!u&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return c("Prev")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Next",icon:"arrow-right",onClick:function(){return c("Next")}})]})}),children:u?"Your collection is empty! Go capture some Nano-Mobs!":s?(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:s.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[s.nickname&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nickname",children:s.nickname}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.real_name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:s.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Type",children:s.type1}),s.type2&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Type",children:s.type2}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return c("Transfer")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Release",icon:"arrow-up",onClick:function(){return c("Release")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return c("Rename")}}),!!s.is_hacked&&(0,o.createComponentVNode)(2,a.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return c("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,a.Box,{children:l?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.mulebot.bots.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.Name,icon:"cog",onClick:function(){return c("control",{bot:e.uid})}})},e.Name)}))},i=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.mulebot,d=l.botstatus,u=l.active,s=d.mode,m=d.loca,p=d.load,h=d.powr,f=d.dest,C=d.home,N=d.retn,b=d.pick;switch(s){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=s}return(0,o.createComponentVNode)(2,a.Section,{title:u,children:[-1===s&&(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,a.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return i("target")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,a.Button,{content:p?p+" (Unload)":"None",disabled:!p,onClick:function(){return i("unload")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,a.Button,{content:b?"Yes":"No",selected:b,onClick:function(){return i("set_pickup_type",{autopick:b?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return i("set_auto_return",{autoret:N?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Stop",icon:"stop",onClick:function(){return i("stop")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Proceed",icon:"play",onClick:function(){return i("start")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Return Home",icon:"home",onClick:function(){return i("home")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_nanobank=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34);t.pda_nanobank=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.logged_in,u=r.owner_name,s=r.money;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Name",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:["$",s]})]})}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})],4):(0,o.createComponentVNode)(2,p)};var l=function(e,t){(0,a.useBackend)(t).data;var n=(0,a.useLocalState)(t,"tabIndex",1),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Tabs,{mt:2,children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transfers"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Account Actions"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transaction History"]})]})},d=function(e,t){var n=(0,a.useLocalState)(t,"tabIndex",1)[0];if(!(0,a.useBackend)(t).data.db_status)return(0,o.createComponentVNode)(2,c.Box,{children:"Account Database Connection Severed"});switch(n){case 1:return(0,o.createComponentVNode)(2,u);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},u=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.requests,s=d.available_accounts,m=d.money,p=(0,a.useLocalState)(t,"selectedAccount"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"transferAmount"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"searchText",""),g=V[0],v=V[1],_=[];return s.map((function(e){return _[e.name]=e.UID})),(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account",children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account name",onInput:function(e,t){return v(t)}}),(0,o.createComponentVNode)(2,c.Dropdown,{mt:.6,width:"190px",options:s.filter((0,r.createSearch)(g,(function(e){return e.name}))).map((function(e){return e.name})),selected:null==(n=s.filter((function(e){return e.UID===h}))[0])?void 0:n.name,onSelected:function(e){return f(_[e])}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Amount",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Up to 5000",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:m0&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Approved Orders",children:s>0&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(125);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.active,s=d.anchored,m=d.broken,p=d.emagged,h=d.fuel_type,f=d.fuel_usage,C=d.fuel_stored,N=d.fuel_cap,b=d.is_ai,V=d.tmp_current,g=d.tmp_max,v=d.tmp_overheat,_=d.output_max,y=d.power_gen,x=d.output_set,k=d.has_fuel,L=C/N,w=V/g,B=x*y,S=Math.round(C/f),I=Math.round(S/60),T=S>120?I+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(m||!s)&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[!!m&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator is malfunctioning!"}),!m&&!s&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!m&&!!s&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:u,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,a.NumberInput,{value:x,minValue:1,maxValue:_*(p?2.5:1),step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,i.formatPower)(B),")"]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:w,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[V," \u2103"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[v>50&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Temperature High"}),0===v&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||b||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:L,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(C/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel usage",children:[f/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(f?T:"N/A"),!k&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength,m=l.max_strength;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Control Panel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Connect",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",mb:"5px",children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Operational":"Error: Verify Configuration"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d||0===s,onClick:function(){return i("remove_strength")},mr:"4px"}),s,(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d||s===m,onClick:function(){return i("add_strength")},ml:"4px"})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PdaPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PdaPainter=function(e,t){var n=(0,r.useBackend)(t).data.has_pda;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:n?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Section,{height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"download",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.pda_colors;return(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"180px",mr:"3px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"65%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{className:"PdaPainter__list",children:Object.keys(i).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("choose_pda",{selectedPda:e})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+i[e][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e})]},e)}))})})})})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.current_appearance,d=i.preview_appearance;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current PDA",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return c("eject_pda")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return c("paint_pda")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Preview",children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.busy,m=u.category,p=u.display_craftable_only,h=u.display_compact,f=u.prev_cat,C=u.next_cat,N=u.subcategory,b=u.prev_subcat,V=u.next_subcat;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,a.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Show Craftable Only",icon:p?"check-square-o":"square-o",selected:p,onClick:function(){return d("toggle_recipes")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return d("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:f,icon:"arrow-left",onClick:function(){return d("backwardCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:C,icon:"arrow-right",onClick:function(){return d("forwardCat")}})]}),N&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:b,icon:"arrow-left",onClick:function(){return d("backwardSubCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:V,icon:"arrow-right",onClick:function(){return d("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Photocopier",color:"silver",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Copies",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{width:"2em",bold:!0,children:u.copynumber}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",content:"",onClick:function(){return d("minus")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",content:"",onClick:function(){return d("add")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toner",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:u.toner})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Document",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.copyitem&&!u.mob,content:u.copyitem?u.copyitem:u.mob?u.mob+"'s ass!":"document",onClick:function(){return d("removedocument")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Folder",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.folder,content:u.folder?u.folder:"folder",onClick:function(){return d("removefolder")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.issilicon;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){return c("copy")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){return c("scandocument")}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){return c("ai_text")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){return c("ai_pic")}})],4)],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Scanned Files",children:i.files.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:i.toner<=0,onClick:function(){return c("filecopy",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return c("deletefile",{uid:e.uid})}})]})},e.name)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier220=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(26),l=n(34),d=n(42),u=n(20);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne?this.substring(0,e)+"...":this};t.Photocopier220=function(e,t){for(var n,m=(0,r.useBackend)(t),p=m.act,h=m.data,f=h.copies,C=h.maxcopies,N=(0,r.useLocalState)(t,"searchText",""),b=N[0],V=N[1],g=function(e,t){void 0===t&&(t="");var n=(0,u.createSearch)(t,(function(e){return e.altername}));return(0,d.flow)([(0,i.filter)((function(e){return null==e?void 0:e.altername})),t&&(0,i.filter)(n),(0,i.sortBy)((function(e){return e.id}))])(e)}((0,i.sortBy)((function(e){return e.category}))(h.forms||[]),b),v=[],_=s(g);!(n=_()).done;){var y=n.value;v.includes(y.category)||v.push(y.category)}var x,k=(0,r.useLocalState)(t,"number",0);k[0],k[1];return x=""===h.category?g:g.filter((function(e){return e.category===h.category})),(0,o.createComponentVNode)(2,c.Window,{theme:h.ui_theme,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"40%",children:[(0,o.createComponentVNode)(2,a.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mt:.8,color:"grey",children:"\u0417\u0430\u0440\u044f\u0434 \u0442\u043e\u043d\u0435\u0440\u0430:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mt:.5,children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,maxValue:30,value:h.toner})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:2,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!h.copyitem&&!h.mob,icon:h.copyitem||h.mob?"eject":"times",content:h.copyitem?h.copyitem:h.mob?"\u0416\u043e\u043f\u0430 "+h.mob+"!":"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",onClick:function(){return p("removedocument")}})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!h.folder,icon:h.folder?"eject":"times",content:h.folder?h.folder:"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u043f\u0430\u043f\u043a\u0438",onClick:function(){return p("removefolder")}})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:0===h.toner||null===h.form,content:"\u041f\u0435\u0447\u0430\u0442\u044c",onClick:function(){return p("print_form")}})}),!!h.isAI&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",ml:"5px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:h.toner<5,content:"\u0424\u043e\u0442\u043e",tooltip:"\u0420\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0444\u043e\u0442\u043e \u0441 \u0411\u0430\u0437\u044b \u0414\u0430\u043d\u043d\u044b\u0445",tooltipPosition:"right",onClick:function(){return p("ai_pic")}})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041a\u043e\u043f\u0438\u044f",disabled:0===h.toner||!h.copyitem&&!h.mob,onClick:function(){return p("copy")}})}),!!h.isAI&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",ml:"5px",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043a\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0441\u0442",tooltipPosition:"right",disabled:0===h.toner,onClick:function(){return p("ai_text")}})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:4.5,mt:1.2,color:"grey",children:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e:"}),(0,o.createComponentVNode)(2,a.Slider,{mt:.75,animated:!0,minValue:1,maxValue:C,value:f,stepPixelSize:10,onChange:function(e,t){return p("copies",{"new":t})}})]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{className:"Layout__content--flexColumn",height:"330px",children:(0,o.createComponentVNode)(2,a.Section,{title:"\u0411\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u044f",flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,mt:.1,color:"grey",children:"\u0424\u043e\u0440\u043c\u0430:"}),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,children:""===h.form_id?"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430":h.form_id})]}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:2.1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mb:1,mt:.5,fluid:!0,icon:"chevron-right",content:"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",selected:!h.category,onClick:function(){return p("choose_category",{category:null})}})}),v.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mb:1,fluid:!0,icon:"chevron-right",content:e,selected:h.category===e,onClick:function(){return p("choose_category",{category:e})}},e)},e)}))]})]})})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"60%",className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:h.category||"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Input,{fluid:!0,placeholder:"\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u0440\u043c\u044b",onInput:function(e,t){return V(t)}}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:1.6,wrap:"wrap",children:x.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mb:1,fluid:!0,content:e.altername.trimLongStr(37),selected:h.form_id===e.id,onClick:function(){return p("choose_form",{path:e.path,id:e.id})}},e.path)},e.path)}))})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=["tempKey"];var l={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},d=function(e,t){var n=e.tempKey,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),d=l[n];if(!d)return null;var u=(0,r.useBackend)(t),s=u.data,m=u.act,p=s.currentTemp,h=d.label,f=d.icon,C=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({selected:C,onClick:function(){m("setTemp",{temp:n})}},c,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:f}),h]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,i=n.emagged,u=n.currentTemp,s=l[u]||l.normal,m=s.label,p=s.color,h=[],f=0,C=Object.entries(l);f0?"envelope-open-text":"envelope",onClick:function(){return i("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return i("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Supplies",icon:"box",onClick:function(){return i("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return i("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return i("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return i("setScreen",{setScreen:10})}})})]}),!!u&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return i("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:s?"Speaker Off":"Speaker On",selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return i("toggleSilent")}})})]})},l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.department,u=[];switch(e.purpose){case"ASSISTANCE":u=l.assist_dept,n="Request assistance from another department";break;case"SUPPLIES":u=l.supply_dept,n="Request supplies from another department";break;case"INFO":u=l.info_dept,n="Relay information to another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Message",icon:"envelope",onClick:function(){return i("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return i("writeInput",{write:e,priority:2})}})]},e)}))})})},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act;c.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data;switch(e.type){case"MESSAGES":n=d.message_log,c="Message Log";break;case"SHIPPING":n=d.shipping_log,c="Shipping label print log"}return(0,o.createComponentVNode)(2,a.Section,{title:c,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.map((function(e,t){return(0,o.createVNode)(1,"div",null,e,0,null,t)})),(0,o.createVNode)(1,"hr")]},e)}))})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.recipient,d=i.message,u=i.msgVerified,s=i.msgStamped;return(0,o.createComponentVNode)(2,a.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",color:"green",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stamped by",color:"blue",children:s})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return c("department",{department:l})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.message,d=i.announceAuth;return(0,o.createComponentVNode)(2,a.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return c("writeAnnouncement")}}),d?(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(d&&l),onClick:function(){return c("sendAnnouncement")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.shipDest,d=i.msgVerified,u=i.ship_dept;return(0,o.createComponentVNode)(2,a.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",children:d})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&d),onClick:function(){return c("printLabel")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,a.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return c("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),a=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,c=e.desc;return(0,o.createComponentVNode)(2,a.Box,{children:[t>0?(0,o.createComponentVNode)(2,a.Divider):null,(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,a.Box,{children:["* Summary: ",c]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83),l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;return l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_tech")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_tech")}}),(0,o.createComponentVNode)(2,s)]})]}):null},d=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;if(!l)return null;var d=l.name,u=l.lathe_types,m=l.materials,p=u.join(", ");return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Materials"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_design")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_design")}}),(0,o.createComponentVNode)(2,s)]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{submenu:i.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,s)]})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type;return l?(0,o.createComponentVNode)(2,a.Button,{content:"Eject Disk",icon:"eject",onClick:function(){i("tech"===l?"eject_tech":"eject_design")}}):null},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.disk_data,i=n.disk_type;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk Contents",children:function(){if(!c)return(0,o.createComponentVNode)(2,u);switch(i){case"design":return(0,o.createComponentVNode)(2,d);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type,d=c.to_copy;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){i("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,m)}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,p)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),a=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_item;return c.linked_destroy?l?(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,a.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){i("deconstruct")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject Item",icon:"eject",onClick:function(){i("eject_item")}})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,a.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.category,u=i.matching_designs,s=4===i.menu?"build":"imprint";return(0,o.createComponentVNode)(2,a.Section,{title:d,children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,a.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:u.map((function(e){var t=e.id,n=e.name,r=e.can_build,c=e.materials;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(s,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,a.Button,{content:"x5",onClick:function(){return l(s,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,a.Button,{content:"x10",onClick:function(){return l(s,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_chemicals,d=4===c.menu;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Purge All",icon:"trash",onClick:function(){i(d?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,a.Button,{content:"Purge",icon:"trash",onClick:function(){i(d?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.menu,u=i.categories,s=4===d?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,a.Section,{title:s+" Menu",children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,c.LatheSearch),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,c=n.total_materials,i=n.max_materials,l=n.max_chemicals,d=n.total_chemicals;return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,a.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c}),i?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+i}):null]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),l?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_materials;return(0,o.createComponentVNode)(2,a.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===c.menu?"lathe_ejectsheet":"imprinter_ejectsheet";i(n,{id:t,amount:e})},d=Math.floor(n/2e3),u=n<1,s=1===d?"":"s";return(0,o.createComponentVNode)(2,a.Table.Row,{className:u?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"110px",children:["(",d," sheet",s,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,a.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,a.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,a.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),a=n(232),c=n(63),i=n(2),l=n(83);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,d=n.menu,u=n.linked_lathe,s=n.linked_imprinter;return 4!==d||u?5!==d||s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,c.LatheMainMenu)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,c.LatheCategory)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,i.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,i.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),a=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",onChange:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,d=n.linked_destroy,u=n.linked_lathe,s=n.linked_imprinter,m=n.tech_levels;return(0,o.createComponentVNode)(2,a.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,a.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!l,menu:i.MENU.DISK,submenu:i.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!d,menu:i.MENU.DESTROY,submenu:i.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,menu:i.MENU.LATHE,submenu:i.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!s,menu:i.MENU.IMPRINTER,submenu:i.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{menu:i.MENU.SETTINGS,submenu:i.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(63),a=n(2),c=n(83);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==c.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:c.MENU.MAIN,submenu:c.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==c.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===c.MENU.LATHE||e===c.MENU.IMPRINTER},submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),a=n(2);t.RndNavButton=function(e,t){var n=e.icon,c=e.children,i=e.disabled,l=e.content,d=(0,r.useBackend)(t),u=d.data,s=d.act,m=u.menu,p=u.submenu,h=m,f=p;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,a.Button,{content:l,icon:n,disabled:i,onClick:function(){s("nav",{menu:h,submenu:f})},children:c})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,d=n.act,u=l.sync,s=l.admin,m=l.linked_destroy,p=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Sync Database with Network",icon:"sync",disabled:!u,onClick:function(){d("sync")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Connect to Research Network",icon:"plug",disabled:u,onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,content:"Device Linkage Menu",icon:"link",menu:i.MENU.SETTINGS,submenu:i.SUBMENU.SETTINGS_DEVICES}),1===s?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return d("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return d("find_device")}}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){d("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{title:(0,i.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,a.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_lock_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Lock Down",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",disabled:s,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return l("masslock",{})}})]}),(0,o.createComponentVNode)(2,i,{cyborgs:h,can_hack:u})]})})};var i=function(e,t){var n=e.cyborgs,c=(e.can_hack,(0,r.useBackend)(t)),i=c.act,l=c.data,d="Detonate";return l.detonate_cooldown>0&&(d+=" ("+l.detonate_cooldown+"s)"),n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return i("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return i("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:d,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){return i("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),s=u.dial,m=u.open;u.locked,u.contents;return(0,o.createComponentVNode)(2,c.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,a.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),m?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,a.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*s+"deg)","z-index":0}})]}),!m&&(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.dial,d=i.open,u=i.locked,s=function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:d||t&&!u,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return c(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:u,icon:d?"lock":"lock-open",content:d?"Close":"Open",mb:"0.5rem",onClick:function(){return c("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",children:[s(50),s(10),s(1)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[s(1,!0),s(10,!0),s(50,!0)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.contents;return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--contents",overflow:"auto",children:i.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{mb:"0.5rem",onClick:function(){return c("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,a.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.satellites,u=l.notice,s=l.meteor_shield,m=l.meteor_shield_coverage,p=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,a.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:h>=100?"good":"average",value:m,maxValue:p,children:[h," %"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,a.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return i("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(3),l=n(68),d=n(99);t.SecureStorage=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"securestorage",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),u=i.locked,m=i.no_passcode,p=i.emagged,h=i.user_entered_code,f=m?"":u?"bad":"good";return(0,o.createComponentVNode)(2,c.Section,{height:"100%",stretchContents:!0,onKeyDown:function(e){return function(e,t){var n=(0,a.useBackend)(t).act,o=window.event?e.which:e.keyCode;return o===d.KEY_ENTER?(e.preventDefault(),void n("keypad",{digit:"E"})):o===d.KEY_ESCAPE?(e.preventDefault(),void n("keypad",{digit:"C"})):o===d.KEY_BACKSPACE?(e.preventDefault(),void n("backspace")):o>=d.KEY_0&&o<=d.KEY_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_0})):o>=d.KEY_NUMPAD_0&&o<=d.KEY_NUMPAD_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_NUMPAD_0})):void 0}(e,t)},children:[(0,o.createComponentVNode)(2,c.Flex.Item,{height:"20%",mb:"5px",children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+f]),height:"100%",children:p?"ERROR":h})}),(0,o.createComponentVNode)(2,c.Table,{width:"1px",children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map((function(e){return(0,o.createComponentVNode)(2,l.TableRow,{children:e.map((function(e){return(0,o.createComponentVNode)(2,l.TableCell,{children:(0,o.createComponentVNode)(2,s,{number:e})},e)}))},e[0])}))})]})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=(n.data,e.number);return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:l,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,r.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+l]),onClick:function(){return i("keypad",{digit:l})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(3),d=n(29),u=n(123),s=n(124),m=n(169),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,d.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,a.useBackend)(t),i=(r.act,r.data),p=i.loginState,h=i.currentPage;return p.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,d.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.currentPage,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),2===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.records,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","name")),m=s[0],h=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,N,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,N,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"SecurityRecords__listRow--"+p[e.status],onClick:function(){return i("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.isPrinting,u=(0,a.useLocalState)(t,"searchText",""),s=(u[0],u[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,d.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return s(t)}})})]})},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.isPrinting,d=i.general,u=i.security;return d&&d.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,c.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:u.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,v)})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,d.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return i("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return i("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SeedExtractor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.stored_seeds,s=d.vend_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored Seeds",children:[(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createTextVNode)("Set Amount to be Vended:\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:s,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(e,t){return l("set_vend_amount",{vend_amount:t})}})],4),null!=u&&u.length?(0,o.createComponentVNode)(2,i):"No Seeds"]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.stored_seeds;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Stock"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),e.name,e.variant?" ("+e.variant+")":""]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Vend",icon:"arrow-circle-down",onClick:function(){return c("vend",{seedid:e.id,seedvariant:e.variant})}}),"\xa0(",e.amount," Left)"]})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(45);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:d.status?d.status:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!d.shuttle&&(!!d.docking_ports_len&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Send to ",children:d.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",content:e.name,onClick:function(){return l("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!d.admin_controlled&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!d.status,onClick:function(){return l("request")}})})],0))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),u=n[0],s=n[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.shuttles;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return c("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.templates_tabs,d=i.existing_shuttle,u=i.templates;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===d.id,icon:"file",content:e,onClick:function(){return c("select_template_category",{cat:e})}},e)}))}),!!d&&u[d.id].templates.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Load Template",icon:"download",onClick:function(){return c("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.existing_shuttle,d=i.selected;return(0,o.createComponentVNode)(2,a.Box,{children:[l?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: None"}),d?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: "+d.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),d.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:d.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",icon:"eye",onClick:function(){return c("preview",{shuttle_id:d.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",icon:"download",onClick:function(){return c("load",{shuttle_id:d.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var m=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return i("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",content:"Eject",onClick:function(){return i("ejectify")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.hasOccupant,d=i.isBeakerLoaded,u=i.beakerMaxSpace,s=i.beakerFreeSpace,m=i.dialysis&&s>0;return(0,o.createComponentVNode)(2,c.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!d||s<=0||!l,selected:m,icon:m?"toggle-on":"toggle-off",content:m?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!d,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:d?(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:s/u,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.occupant,d=i.chemicals,u=i.maxchem,s=i.amounts;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,c.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,c.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SlotMachine=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return null===d.money?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,a.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===d.plays?d.plays+" player has tried their luck today!":d.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.money})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"10 credits to spin",children:(0,o.createComponentVNode)(2,a.Button,{icon:"coins",disabled:d.working,content:d.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,lineHeight:2,color:d.resultlvl,children:d.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.secure,u=l.can_dry,s=l.drying,m=l.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return i("drying")}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:" No products loaded. "}),!!m&&m.slice().sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return i("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return i("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return i("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),c=n(125),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,h=d.inputLevel,f=d.inputLevelMax,C=d.inputAvailable,N=d.outputAttempt,b=d.outputting,V=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,_=(u>=100?"good":p&&"average")||"bad",y=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:_,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){return l("tryoutput")},children:N?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:y,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===V,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===V,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:V/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:V===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:V===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.generated,u=l.generated_ratio,s=l.tracking_state,m=l.tracking_rate,p=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,N=l.rotating_direction;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:p>0?"good":"bad",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[2===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Automated "}),1===s&&(0,o.createComponentVNode)(2,a.Box,{children:[" ",m,"\xb0/h (",N,")"," "]}),0===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[2!==s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return i("cdir",{cdir:t})}}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===s,onClick:function(){return i("track",{track:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===s,onClick:function(){return i("track",{track:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===s,disabled:!h,onClick:function(){return i("track",{track:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[1===s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("tdir",{tdir:t})}}),0===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Tracker offline "}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return i("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return i("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpecMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpecMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Hemomancer",onClick:function(){return c("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16),(0,o.createComponentVNode)(2,a.Button,{content:"Umbrae",onClick:function(){return c("umbrae")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Desecrated Duel",16),(0,o.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Gargantua",onClick:function(){return c("gargantua")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Dantalion",onClick:function(){return c("dantalion")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.helmet,u=i.suit,s=i.magboots,m=i.mask,p=i.storage,h=i.open,f=i.locked;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return c("cook")}}),(0,o.createComponentVNode)(2,a.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return c("toggle_lock")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.object),l=e.label,d=e.missingText,u=e.eject;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,a.Box,{my:.5,children:i?(0,o.createComponentVNode)(2,a.Button,{my:-1,icon:"eject",content:i,onClick:function(){return c(u)}}):(0,o.createComponentVNode)(2,a.Box,{color:"silver",bold:!0,children:["No ",d," found."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.open,d=i.locked;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:l?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:l?"times-circle":"expand",color:l?"red":"green",disabled:d,textAlign:"center",onClick:function(){return c("toggle_open")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(26),a=n(42),c=n(12),i=n(1),l=n(2),d=n(44),u=n(3);n(68);t.SupermatterMonitor=function(e,t){var n=(0,i.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p)};var s=function(e){return Math.log2(16+Math.max(0,e))-4},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.supermatter_id+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("view",{view:e.supermatter_id})}})})]},e.supermatter_id)}))})})})})},p=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,h=(p.active,p.SM_integrity),f=p.SM_power,C=p.SM_ambienttemp,N=p.SM_ambientpressure,b=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(p.gases||[]),V=Math.max.apply(Math,[1].concat(b.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:f,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(f)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(C),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(C)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(N),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(N)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return m("back")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:b.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:V,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),a=n(2),c=(n(45),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return i(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,a.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEG=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};t.TEG=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return d.error?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[d.error,(0,o.createComponentVNode)(2,a.Button,{icon:"circle",content:"Recheck",onClick:function(){return l("check")}})]})})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Cold Loop ("+d.cold_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Inlet",children:[i(d.cold_inlet_temp)," K,"," ",i(d.cold_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Outlet",children:[i(d.cold_outlet_temp)," K,"," ",i(d.cold_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hot Loop ("+d.hot_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Inlet",children:[i(d.hot_inlet_temp)," K,"," ",i(d.hot_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Outlet",children:[i(d.hot_outlet_temp)," K,"," ",i(d.hot_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Output",children:[i(d.output_power)," W",!!d.warning_switched&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!d.warning_cold_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!d.warning_hot_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TTSSeedsExplorerContent=t.TTSSeedsExplorer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={0:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},l={"\u041c\u0443\u0436\u0441\u043a\u043e\u0439":{icon:"mars",color:"blue"},"\u0416\u0435\u043d\u0441\u043a\u0438\u0439":{icon:"venus",color:"purple"},"\u041b\u044e\u0431\u043e\u0439":{icon:"venus-mars",color:"white"}},d=function(e,t,n,r){return void 0===r&&(r=null),e.map((function(e){var c,i=null!=(c=e[r])?c:e;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:t.includes(e),content:i,onClick:function(){t.includes(e)?n(t.filter((function(t){var n;return(null!=(n=t[r])?n:t)!==e}))):n([e].concat(t))}},i)}))};t.TTSSeedsExplorer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.providers,m=u.seeds,p=u.selected_seed,h=u.phrases,f=u.donator_level,C=m.map((function(e){return e.category})).filter((function(e,t,n){return n.indexOf(e)===t})),N=m.map((function(e){return e.gender})).filter((function(e,t,n){return n.indexOf(e)===t})),b=m.map((function(e){return e.required_donator_level})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return i[e]})),V=(0,r.useLocalState)(t,"selectedProviders",s),g=V[0],v=V[1],_=(0,r.useLocalState)(t,"selectedGenders",N),y=_[0],x=_[1],k=(0,r.useLocalState)(t,"selectedCategories",C),L=k[0],w=k[1],B=(0,r.useLocalState)(t,"selectedDonatorLevels",b),S=B[0],I=B[1],T=(0,r.useLocalState)(t,"selectedPhrase",h[0]),A=T[0],E=T[1],M=(0,r.useLocalState)(t,"searchtext",""),O=M[0],P=M[1],F=d(s,g,v,"name"),R=d(N,y,x),D=d(C,L,w),j=d(b,S,I),W=(0,o.createComponentVNode)(2,a.Dropdown,{options:h,selected:A.replace(/(.{25})..+/,"$1..."),width:"220px",onSelected:function(e){return E(e)}}),z=(0,o.createComponentVNode)(2,a.Input,{placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435...",fluid:!0,onInput:function(e,t){return P(t)}}),U=m.sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return n>o?1:n0&&p!==e.name?"orange":"white",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:p===e.name?.5:.25,textAlign:"left",children:e.category}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:p===e.name?"white":l[e.gender].color,textAlign:"left",children:(0,o.createComponentVNode)(2,a.Icon,{mx:1,size:1.2,name:l[e.gender].icon})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:e.required_donator_level>0&&(0,o.createFragment)([i[e.required_donator_level],(0,o.createComponentVNode)(2,a.Icon,{ml:1,mr:2,name:"coins"})],0)})]},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b",children:F}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u043b",children:R}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",children:D}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438",children:j}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:W}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u0438\u0441\u043a",children:z})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0413\u043e\u043b\u043e\u0441\u0430 ("+U.length+"/"+m.length+")",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{children:H})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.BlockQuote,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,o.createComponentVNode)(2,a.Box,{mt:2,italic:!0,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c Discord-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})],4)};t.TTSSeedsExplorerContent=u},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.records,s=void 0===u?[]:u,m=d.explosion_target,p=d.toxins_tech,h=d.printing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shift's Target",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Toxins Level",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print All Logs",disabled:!s.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!s.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),s.length?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Records"})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.records,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return c("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Tank=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return n=d.has_mask?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.connected?"check":"times",content:d.connected?"Internals On":"Internals Off",selected:d.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:d.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:d.ReleasePressure===d.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.releasePressure),width:"65px",unit:"kPa",minValue:d.minReleasePressure,maxValue:d.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:d.ReleasePressure===d.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:d.ReleasePressure===d.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.o_tanks,u=l.p_tanks;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Oxygen Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return i("oxygen")}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Plasma Tank ("+u+")",disabled:0===u,icon:"arrow-circle-down",onClick:function(){return i("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.ion),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[1===s&&(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,u);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(p)]})})};var i=function(){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.sectors_available,u=i.nttc_toggle_jobs,s=i.nttc_toggle_job_color,m=i.nttc_toggle_name_color,p=i.nttc_toggle_command_bold,h=i.nttc_job_indicator_type,f=i.nttc_setting_language,C=i.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return c("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"On":"Off",selected:u,icon:"user-tag",onClick:function(){return c("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:s?"On":"Off",selected:s,icon:"clipboard-list",onClick:function(){return c("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"user-tag",onClick:function(){return c("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){return c("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return c("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return c("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return c("network_id")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return c("import")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return c("export")}})]})],4)},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.link_password,d=i.relay_entries;return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return c("change_password")}})})}),(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Unlink"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",onClick:function(){return c("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.filtered_users;return(0,o.createComponentVNode)(2,a.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Add User",icon:"user-plus",onClick:function(){return c("add_filter")}}),children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"user-times",onClick:function(){return c("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.linked,m=u.active,p=u.network_id;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"power-off",onClick:function(){return d("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"Unset",selected:p,icon:"server",onClick:function(){return d("network_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Link Status",children:1===s?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Unlinked"})})]})}),1===s?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.linked_core_id,d=i.linked_core_addr,u=i.hidden_link;return(0,o.createComponentVNode)(2,a.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){return c("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return c("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.cores;return(0,o.createComponentVNode)(2,a.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Link"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Link",icon:"link",onClick:function(){return c("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(223);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.targetsTeleport?d.targetsTeleport:{},s=d.calibrated,m=d.calibrating,p=d.powerstation,h=d.regime,f=d.teleporterhub,C=d.target,N=d.locked;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(!p||!f)&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[f,!p&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Powerstation not linked "}),p&&!f&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Teleporter hub not linked "})]}),p&&f&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!N,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),1===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),2===h&&(0,o.createComponentVNode)(2,a.Box,{children:C})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,i.GridColumn,{size:"2",children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"In Progress"})||s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,i.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,a.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!s&&!m),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(N&&p&&f&&2===h)&&(0,o.createComponentVNode)(2,a.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TempGun=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.TempGun=function(e,t){var n=(0,a.useBackend)(t),s=n.act,m=n.data,p=m.target_temperature,h=m.temperature,f=m.max_temp,C=m.min_temp;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:C,maxValue:f,value:p,format:function(e){return(0,r.toFixed)(e,2)},width:"50px",onDrag:function(e,t){return s("target_temperature",{target_temperature:t})}}),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,c.Box,{color:l(h),bold:h>500-273.15,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(h,2)}),"\xb0C"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power Cost",children:(0,o.createComponentVNode)(2,c.Box,{color:u(h),children:d(h)})})]})})})})};var l=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},d=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},u=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.ThermoMachine=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.ThermoMachine=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.temperature,format:function(e){return(0,r.toFixed)(e,2)}})," K"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.pressure,format:function(e){return(0,r.toFixed)(e,2)}})," kPa"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Setting",children:(0,o.createComponentVNode)(2,c.Button,{icon:d.cooling?"temperature-low":"temperature-high",content:d.cooling?"Cooling":"Heating",selected:d.cooling,onClick:function(){return l("cooling")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,c.NumberInput,{animated:!0,value:Math.round(d.target),unit:"K",width:"62px",minValue:Math.round(d.min),maxValue:Math.round(d.max),step:5,stepPixelSize:3,onDrag:function(e,t){return l("target",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"fast-backward",disabled:d.target===d.min,title:"Minimum temperature",onClick:function(){return l("target",{target:d.min})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",disabled:d.target===d.initial,title:"Room Temperature",onClick:function(){return l("target",{target:d.initial})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"fast-forward",disabled:d.target===d.max,title:"Maximum Temperature",onClick:function(){return l("target",{target:d.max})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return i("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return i("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return i("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return i("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return i("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TurbineComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(12);t.TurbineComputer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.compressor,m=u.compressor_broken,p=u.turbine,h=u.turbine_broken,f=u.online,C=Boolean(s&&!m&&p&&!h);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Online":"Offline",selected:f,disabled:!C,onClick:function(){return i("toggle_power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Disconnect",onClick:function(){return i("disconnect")}})],4),children:C?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,c=n.compressor,i=n.compressor_broken,l=n.turbine,d=n.turbine_broken;n.online;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compressor Status",color:!c||i?"bad":"good",children:i?c?"Offline":"Missing":"Online"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Status",color:!l||d?"bad":"good",children:d?l?"Offline":"Missing":"Online"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.rpm,l=n.temperature,d=n.power,u=n.bearing_heat;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Speed",children:[c," RPM"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temp",children:[l," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generated Power",children:[d," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bearing Heat",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[-Infinity,60],average:[60,90],bad:[90,Infinity]},children:(0,i.toFixed)(u)+"%"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Uplink=void 0;var o=n(0),r=n(26),a=n(42),c=n(20),i=n(1),l=n(2),d=n(34),u=n(3),s=n(29),m=function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,V);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}};t.Uplink=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.cart,c=(0,i.useLocalState)(t,"tabIndex",0),d=c[0],p=c[1],h=(0,i.useLocalState)(t,"searchText",""),f=(h[0],h[1]);return(0,o.createComponentVNode)(2,u.Window,{theme:"syndicate",children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===d,onClick:function(){p(0),f("")},icon:"store",children:"View Market"},"PurchasePage"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===d,onClick:function(){p(1),f("")},icon:"shopping-cart",children:["View Shopping Cart"," ",a&&a.length?"("+a.length+")":""]},"Cart"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===d,onClick:function(){p(2),f("")},icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{onClick:function(){return r("lock")},icon:"lock",children:"Lock Uplink"},"LockUplink")]}),m(d)]})]})};var p=function(e,t){var n=(0,i.useBackend)(t),u=n.act,s=n.data,m=s.crystals,p=s.cats,h=(0,i.useLocalState)(t,"uplinkItems",p[0].items),f=h[0],N=h[1],b=(0,i.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=function(e){if(g(e),""===e)return N(p[0].items);N(function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){var t=1===e.hijack_only?"|hijack":"";return e.name+"|"+e.desc+"|"+e.cost+"tc"+t}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(p.map((function(e){return e.items})).flat(),e))},_=(0,i.useLocalState)(t,"showDesc",1),y=_[0],x=_[1];return(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+m+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:y,onClick:function(){return x(!y)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Random Item",icon:"question",onClick:function(){return u("buyRandom")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return u("refund")}})],4),children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1.5,placeholder:"Search Equipment",onInput:function(e,t){v(t)},value:V}),(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{children:(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:p.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:""===V&&e.items===f,onClick:function(){N(e.items),g("")},children:e.cat},e)}))})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:f.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:y},(0,c.decodeHtmlEntities)(e.name))}))})]})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,d=a.cart,u=a.crystals,s=a.cart_price,m=(0,i.useLocalState)(t,"showDesc",0),p=m[0],h=m[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+u+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:p,onClick:function(){return h(!p)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Empty Cart",icon:"trash",onClick:function(){return r("empty_cart")},disabled:!d}),(0,o.createComponentVNode)(2,l.Button,{content:"Purchase Cart ("+s+"TC)",icon:"shopping-cart",onClick:function(){return r("purchase_cart")},disabled:!d||s>u})],4),children:(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:d?d.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:p,buttons:(0,o.createComponentVNode)(2,b,{i:e})},(0,c.decodeHtmlEntities)(e.name))})):(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})}),(0,o.createComponentVNode)(2,f)],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.cats,d=a.lucky_numbers;return(0,o.createComponentVNode)(2,l.Section,{title:"Suggested Purchases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"dice",content:"See more suggestions",onClick:function(){return r("shuffle_lucky_numbers")}}),children:(0,o.createComponentVNode)(2,l.Box,{display:"flex",flexWrap:"wrap",mb:"5px",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,l.Flex.Item,{flexShrink:0,p:"0.5%",width:"49%",children:(0,o.createComponentVNode)(2,C,{grow:!0,i:c[e.cat].items[e.item]})},t)}))})})},C=function(e,t){var n=e.i,r=e.showDecription,a=void 0===r?1:r,i=e.buttons,d=void 0===i?(0,o.createComponentVNode)(2,N,{i:n}):i;return(0,o.createComponentVNode)(2,l.Section,{title:(0,c.decodeHtmlEntities)(n.name),showBottom:a,borderRadius:"5px",buttons:d,stretchContents:!0,children:a?(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,c.decodeHtmlEntities)(n.desc)}):null})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i,d=a.crystals;return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{icon:"shopping-cart",color:1===c.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return r("add_to_cart",{item:c.obj_path})},disabled:c.cost>d}),(0,o.createComponentVNode)(2,l.Button,{content:"Buy ("+c.cost+"TC)"+(c.refundable?" [Refundable]":""),color:1===c.hijack_only&&"red",tooltip:1===c.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return r("buyItem",{item:c.obj_path})},disabled:c.cost>d})],4)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i;a.exploitable;return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Button,{icon:"times",content:"("+c.cost*c.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return r("remove_from_cart",{item:c.obj_path})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"minus",tooltip:0===c.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:--c.amount})},disabled:c.amount<=0}),(0,o.createComponentVNode)(2,l.Button.Input,{content:c.amount,width:"45px",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onCommit:function(e,t){return r("set_cart_item_quantity",{item:c.obj_path,quantity:t})},disabled:-1!==c.limit&&c.amount>=c.limit&&c.amount<=0}),(0,o.createComponentVNode)(2,l.Button,{icon:"plus",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:++c.amount})},disabled:-1!==c.limit&&c.amount>=c.limit})]})},V=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.exploitable),s=(0,i.useLocalState)(t,"selectedRecord",u[0]),m=s[0],p=s[1],h=(0,i.useLocalState)(t,"searchText",""),f=h[0],C=h[1],N=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(u,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:N.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===m,onClick:function(){return p(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+m.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",m.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",m.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",m.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",m.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",m.species]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Vending=void 0;var o=n(0),r=(n(8),n(1)),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productStock,u=e.productImage,s=i.chargesMoney,m=(i.user,i.usermoney),p=i.inserted_cash,h=i.vend_ready,f=(i.inserted_item_name,!s||0===l.price),C="ERROR!",N="";f?(C="FREE",N="arrow-circle-down"):(C=l.price,N="shopping-cart");var b=!h||0===d||!f&&l.price>m&&l.price>p;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{color:(d<=0?"bad":d<=l.max_amount/2&&"average")||"good",children:[d," in stock"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:b,icon:N,content:C,textAlign:"left",onClick:function(){return c("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.user,m=u.usermoney,p=u.inserted_cash,h=u.chargesMoney,f=u.product_records,C=void 0===f?[]:f,N=u.hidden_records,b=void 0===N?[]:N,V=u.stock,g=(u.vend_ready,u.inserted_item_name),v=u.panel_open,_=u.speaker,y=u.imagelist;return n=[].concat(C),u.extended_inventory&&(n=[].concat(n,b)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,c.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[s&&(0,o.createComponentVNode)(2,a.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),", ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),".",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Box,{children:["There is ",(0,o.createVNode)(1,"b",null,[p,(0,o.createTextVNode)(" credits ")],0)," of space cash inserted.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return d("change")}})]})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return d("eject_item",{})}}),children:(0,o.createComponentVNode)(2,a.Box,{children:g})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,a.Button,{icon:_?"check":"volume-mute",selected:_,content:"Speaker",textAlign:"left",onClick:function(){return d("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,i,{product:e,productStock:V[e.name],productImage:y[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return i("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.remaining,u=l.question,s=l.choices,m=l.user_vote,p=l.counts,h=l.show_counts;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:u,children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:["Time remaining: ",Math.round(d/10),"s"]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{multiLine:e,content:e+(h?" ("+(p[e]||0)+")":""),onClick:function(){return i("vote",{target:e})},selected:e===m})},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return i("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return i("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return i("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.WizardApprenticeContract=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.WizardApprenticeContract=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.used;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,o.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,o.createComponentVNode)(2,a.Section,{title:"Which school of magic is your apprentice studying?",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destruction",children:["Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("destruction")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bluespace Manipulation",children:["Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("bluespace")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing",children:["Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("healing")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Robeless",children:["Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("robeless")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}}]); \ No newline at end of file +if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),a=Object.defineProperty||function(e,t,n){e[t]=n.value},c=Object.defineProperties||function(t,n){for(var o in n)if(l.call(n,o))try{a(t,o,n[o])}catch(r){e.console}},i=Object.getOwnPropertyDescriptor,l=Object.prototype.hasOwnProperty,d=e.Element.prototype,u=e.Text.prototype,s=/^[a-z]+$/,m=/loaded|complete/,p={},h=document.createElement("div"),f=document.documentElement,C=f.removeAttribute,N=f.setAttribute,b=function(e){return{enumerable:!0,writable:!0,configurable:!0,value:e}};y(e.HTMLCommentElement.prototype,d,"nodeValue"),y(e.HTMLScriptElement.prototype,null,"text"),y(u,null,"nodeValue"),y(e.HTMLTitleElement.prototype,null,"text"),a(e.HTMLStyleElement.prototype,"textContent",(t=i(e.CSSStyleSheet.prototype,"cssText"),_((function(){return t.get.call(this.styleSheet)}),(function(e){t.set.call(this.styleSheet,e)}))));var V=/\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;a(e.CSSStyleDeclaration.prototype,"opacity",{get:function(){var e=this.filter.match(V);return e?(e[1]/100).toString():""},set:function(e){this.zoom=1;var t=!1;e=e<1?" alpha(opacity="+Math.round(100*e)+")":"",this.filter=this.filter.replace(V,(function(){return t=!0,e})),!t&&e&&(this.filter+=e)}}),c(d,{textContent:{get:k,set:S},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;t1?r-1:0),c=1;c1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(0),r=n(8),a=n(510),c=n(33),i=n(82),l=n(22),d=["params"],u=["params"],s=["parent","params"];function m(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=(0,i.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,l),N=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),c=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],c[0]=n[1]),o!==undefined&&(a[1]=o[0],c[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,c,t)}))(e)}(a,N,c,d);if(b.length>0){var V=b[0],g=b[b.length-1];b.push([N[0]+f,g[1]]),b.push([N[0]+f,-f]),b.push([-f,-f]),b.push([-f,V[1]])}var v=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,c);return(0,o.createVNode)(1,"div","Collapsible",[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:d,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},m,{children:u}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})],0)},l}(o.Component);t.Collapsible=l},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(8),a=n(22),c=["content","children","className","color","backgroundColor"];var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,l=e.backgroundColor,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return d.color=t?null:"transparent",d.backgroundColor=i||l,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(d)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(d))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(8),a=n(22),c=n(165),i=["color","over","noscroll","nochevron","width","onClick","selected","disabled"],l=["className"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).state={open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var m=s.prototype;return m.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},m.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},m.setSelected=function(e){this.setOpen(!1),this.props.onSelected(e)},m.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},m.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,m=t.noscroll,p=t.nochevron,h=t.width,f=(t.onClick,t.selected),C=t.disabled,N=d(t,i),b=N.className,V=d(N,l),g=s?!this.state.open:this.state.open,v=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([m?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:h}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:h,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,C&&"Button--disabled",b])},V,{onClick:function(){C&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",f,0),!!p||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,c.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),v],0)},s}(o.Component);t.Dropdown=s},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(8),a=n(22),c=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],i=["className","fluid"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return(0,r.isFalsy)(e)?"":e},s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=u(t.props.value),void e.target.blur()):void 0},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var m=s.prototype;return m.componentDidMount=function(){var e=this,t=this.props.value,n=this.inputRef.current;n&&(n.value=u(t)),(this.props.autoFocus||this.props.autoSelect)&&setTimeout((function(){n.focus(),e.props.autoSelect&&n.select()}),1)},m.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=u(r))},m.setEditing=function(e){this.setState({editing:e})},m.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,d=(e.autofocus,e.disabled),u=e.multiline,s=e.cols,m=void 0===s?32:s,p=e.rows,h=void 0===p?4:p,f=l(e,c),C=f.className,N=f.fluid,b=l(f,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",N&&"Input--fluid",d&&"Input--disabled",C])},b,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),u?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:m,rows:h,disabled:d},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:d},null,this.inputRef)]})))},s}(o.Component);t.Input=s},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(12),a=n(8),c=n(33),i=n(22),l=n(224),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];t.Knob=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.style,_=e.fillValue,y=e.color,x=e.ranges,k=void 0===x?{}:x,L=e.size,w=e.bipolar,B=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=(0,r.scale)(null!=_?_:c,m,s),h=(0,r.scale)(c,m,s),f=y||(0,r.keyOfMatchingRange)(null!=_?_:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,w&&"Knob--bipolar",g,(0,i.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((w?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":L+"rem"},v)},S)),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(34),a=["children"],c=["label","children"];function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.children,n=i(e,a);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=l;l.Item=function(e){var t=e.label,n=e.children,a=i(e,c);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1),c=n(45),i=n(225);function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},s=function(e){function t(t){var n;n=e.call(this,t)||this;window.innerWidth,window.innerHeight;return n.state={offsetX:128,offsetY:48,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),u(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),u(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),u(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=1.5*(n-e.zoom);return e.zoom=n,e.offsetX=e.offsetX-262*r,e.offsetY=e.offsetY-256*r,t.onZoom&&t.onZoom(e.zoom),e}))},n}return l(t,e),t.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.dragging,c=t.offsetX,i=t.offsetY,l=t.zoom,d=void 0===l?1:l,u=this.props.children,s=e.map+"_nanomap_z1.png",m=510*d+"px",h={width:m,height:m,"margin-top":i+"px","margin-left":c+"px",overflow:"hidden",position:"relative","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:h,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"img",null,null,1,{src:s,style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,r.Box,{children:u})]}),(0,o.createComponentVNode)(2,p,{zoom:d,onZoom:this.handleZoom})]})},t}(o.Component);t.NanoMap=s;s.Marker=function(e,t){var n=e.x,a=e.y,c=e.zoom,i=void 0===c?1:c,l=e.icon,d=e.tooltip,u=e.color,s=2*n*i-i-3,m=2*a*i-i-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:m+"px",left:s+"px",children:[(0,o.createComponentVNode)(2,r.Icon,{name:l,color:u,fontSize:"6px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:d})]}),2)};var m,p=function(e,t){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:"1",maxValue:"8",stepPixelSize:"10",format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};s.Zoomer=p;var h=function(e){function t(t){var n;n=e.call(this,t)||this;var o=(0,a.useBackend)(n.props.context).act;return n.state={color:n.props.color},n.handleClick=function(e){m!==undefined&&m.setState({color:"blue"}),o("switch_camera",{name:n.props.name}),m=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),n.setState({color:"green"})},n}return l(t,e),t.prototype.render=function(){var e=2*this.props.x*this.props.zoom-this.props.zoom-3,t=2*this.props.y*this.props.zoom-this.props.zoom-3;return(0,o.createComponentVNode)(2,r.Button,{onClick:this.handleClick,position:"absolute",className:"NanoMap__button",lineHeight:"0",color:this.props.status?this.state.color:"red",bottom:t+"px",left:e+"px",children:(0,o.createComponentVNode)(2,r.Tooltip,{content:this.props.tooltip})},this.props.key)},t}(o.Component);s.NanoButton=h},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(8),a=n(22),c=n(221),i=["className","children","onEnter"];t.Modal=function(e){var t,n=e.className,l=e.children,d=e.onEnter,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);return d&&(t=function(e){13===e.keyCode&&d(e)}),(0,o.createComponentVNode)(2,c.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(u)]),l,0,Object.assign({},(0,a.computeBoxProps)(u))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(8),a=n(22),c=["className","color","info","warning","success","danger"];var i=function(e){var t=e.className,n=e.color,i=e.info,l=(e.warning,e.success),d=e.danger,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",l&&"NoticeBox--type--success",d&&"NoticeBox--type--danger",t])},u)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBarCountdown=t.ProgressBar=void 0;var o=n(0),r=n(12),a=n(8),c=n(22),i=["className","value","minValue","maxValue","color","ranges","children","fractionDigits"],l=["start","current","end"];function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=function(e){var t=e.className,n=e.value,l=e.minValue,d=void 0===l?0:l,s=e.maxValue,m=void 0===s?1:s,p=e.color,h=e.ranges,f=void 0===h?{}:h,C=e.children,N=e.fractionDigits,b=void 0===N?0:N,V=u(e,i),g=(0,r.scale)(n,d,m),v=C!==undefined,_=p||(0,r.keyOfMatchingRange)(n,f)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+_,t,(0,c.computeBoxClassName)(V)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(g)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",v?C:(0,r.toFixed)(100*g,b)+"%",0)],4,Object.assign({},(0,c.computeBoxProps)(V))))};t.ProgressBar=s,s.defaultHooks=a.pureComponentHooks;var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.current,0)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=Math.max(this.state.value+this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},a.componentWillUnmount=function(){clearInterval(this.timer)},a.render=function(){var e=this.props,t=e.start,n=(e.current,e.end),r=u(e,l),a=(this.state.value/100-t)/(n-t);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s,Object.assign({value:a},r)))},r}(o.Component);t.ProgressBarCountdown=m,m.defaultProps={rate:1e3},s.Countdown=m},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(8),a=n(22),c=["className","title","level","buttons","content","stretchContents","noTopPadding","showBottom","children"];var i=function(e){var t=e.className,n=e.title,i=e.level,l=void 0===i?1:i,d=e.buttons,u=e.content,s=e.stretchContents,m=e.noTopPadding,p=e.showBottom,h=void 0===p||p,f=e.children,C=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c),N=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(d),b=!(0,r.isFalsy)(u)||!(0,r.isFalsy)(f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+l,e.flexGrow&&"Section--flex",t])},C,{children:[N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__title",h&&"Section__title--showBottom"]),[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",d,0)],4),b&&(0,o.createComponentVNode)(2,a.Box,{className:(0,r.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!m&&"Section__content--noTopPadding"]),children:[u,f]})]})))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(8),a=n(22),c=n(164),i=["className","vertical","children"],l=["className","selected","altSelection"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,c=e.children,l=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,i=d(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},i)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":526,"./AIFixer.js":527,"./APC.js":528,"./ATM.js":529,"./AccountsUplinkTerminal.js":530,"./AgentCard.js":531,"./AiAirlock.js":532,"./AirAlarm.js":533,"./AirlockAccessController.js":534,"./AirlockElectronics.js":535,"./AppearanceChanger.js":536,"./AtmosAlertConsole.js":537,"./AtmosControl.js":538,"./AtmosFilter.js":539,"./AtmosMixer.js":540,"./AtmosPump.js":541,"./AtmosTankControl.js":542,"./Autolathe.js":543,"./Biogenerator.js":544,"./BlueSpaceArtilleryControl.js":547,"./BluespaceTap.js":548,"./BodyScanner.js":549,"./BookBinder.js":550,"./BotClean.js":551,"./BotFloor.js":552,"./BotHonk.js":553,"./BotMed.js":554,"./BotSecurity.js":555,"./BrigCells.js":556,"./BrigTimer.js":557,"./CameraConsole.js":558,"./CameraConsole220.js":559,"./Canister.js":560,"./CardComputer.js":561,"./CargoConsole.js":562,"./ChangelogView.js":563,"./ChemDispenser.js":564,"./ChemHeater.js":565,"./ChemMaster.js":566,"./CloningConsole.js":567,"./ColourMatrixTester.js":568,"./CommunicationsComputer.js":569,"./CompostBin.js":570,"./Contractor.js":571,"./ConveyorSwitch.js":572,"./CrewMonitor.js":573,"./Cryo.js":574,"./CryopodConsole.js":575,"./DNAModifier.js":576,"./DestinationTagger.js":577,"./DisposalBin.js":578,"./DnaVault.js":579,"./DroneConsole.js":580,"./EFTPOS.js":581,"./ERTManager.js":582,"./EconomyManager.js":583,"./Electropack.js":584,"./EmotePanel.js":585,"./EvolutionMenu.js":586,"./ExosuitFabricator.js":587,"./ExternalAirlockController.js":588,"./FaxMachine.js":589,"./FilingCabinet.js":590,"./FloorPainter.js":591,"./GPS.js":592,"./GeneModder.js":593,"./GenericCrewManifest.js":594,"./GhostHudPanel.js":595,"./GlandDispenser.js":596,"./GravityGen.js":597,"./GuestPass.js":598,"./HandheldChemDispenser.js":599,"./HealthSensor.js":600,"./Holodeck.js":601,"./ImplantPad.js":602,"./Instrument.js":603,"./Jukebox.js":604,"./KeycardAuth.js":605,"./KitchenMachine.js":606,"./LawManager.js":607,"./LibraryComputer.js":608,"./LibraryManager.js":609,"./ListInput.js":610,"./MODsuit.js":611,"./MagnetController.js":612,"./MechBayConsole.js":613,"./MechaControlConsole.js":614,"./MedicalRecords.js":615,"./MerchVendor.js":616,"./MiningVendor.js":617,"./ModpacksList.js":618,"./NTRecruiter.js":619,"./Newscaster.js":620,"./NuclearBomb.js":621,"./OperatingComputer.js":622,"./Orbit.js":623,"./OreRedemption.js":624,"./PAI.js":625,"./PDA.js":638,"./Pacman.js":655,"./ParticleAccelerator.js":656,"./PdaPainter.js":657,"./PersonalCrafting.js":658,"./Photocopier.js":659,"./Photocopier220.js":660,"./PoolController.js":661,"./PortablePump.js":662,"./PortableScrubber.js":663,"./PortableTurret.js":664,"./PowerMonitor.js":231,"./PrisonerImplantManager.js":665,"./PrisonerShuttleConsole.js":666,"./RCD.js":667,"./RPD.js":668,"./Radio.js":669,"./ReagentGrinder.js":670,"./RemoteSignaler.js":671,"./RequestConsole.js":672,"./RndConsole.js":83,"./RobotSelfDiagnosis.js":687,"./RoboticsControlConsole.js":688,"./Safe.js":689,"./SatelliteControl.js":690,"./SecureStorage.js":691,"./SecurityRecords.js":692,"./SeedExtractor.js":693,"./ShuttleConsole.js":694,"./ShuttleManipulator.js":695,"./Sleeper.js":696,"./SlotMachine.js":697,"./Smartfridge.js":698,"./Smes.js":699,"./SolarControl.js":700,"./SpawnersMenu.js":701,"./SpecMenu.js":702,"./StationAlertConsole.js":703,"./SuitStorage.js":704,"./SupermatterMonitor.js":705,"./SyndicateComputerSimple.js":706,"./TEG.js":707,"./TTSSeedsExplorer.js":708,"./TachyonArray.js":709,"./Tank.js":710,"./TankDispenser.js":711,"./TcommsCore.js":712,"./TcommsRelay.js":713,"./Teleporter.js":714,"./TempGun.js":715,"./ThermoMachine.js":716,"./TransferValve.js":717,"./TurbineComputer.js":718,"./Uplink.js":719,"./Vending.js":720,"./VolumeMixer.js":721,"./VotePanel.js":722,"./Wires.js":723,"./WizardApprenticeContract.js":724};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=525},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var d=null;return d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:d,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return i("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var d=!0;2!==l.stat&&null!==l.stat||(d=!1);var u=null;u=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var s=!0;return l.integrity>=100&&2!==l.stat&&(s=!1),(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:u,value:l.integrity/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:d?"green":"red",children:d?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!s||l.active,content:!s||l.active?"Already Repaired":"Repair",onClick:function(){return i("fix")}})})]}),(0,o.createComponentVNode)(2,a.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.APC=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=(u.normallyLocked,l[u.externalPower]||l[0]),p=l[u.chargingStatus]||l[0],h=u.powerChannels||[],f=d[u.malfStatus]||d[0],C=u.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[u.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return c(f.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",selected:u.coverLocked,disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",selected:u.nightshiftLights,onClick:function(){return c("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.emergencyLights?"Engaged":"Disengaged",selected:u.emergencyLights,disabled:s,onClick:function(){return c("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ATM=function(e,t){var n,p=(0,r.useBackend)(t),h=(p.act,p.data),f=h.view_screen,C=h.authenticated_account,N=h.ticks_left_locked_down,b=h.linked_db;if(N>0)n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(b)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,d);break;case 3:n=(0,o.createComponentVNode)(2,m);break;default:n=(0,o.createComponentVNode)(2,u)}else n=(0,o.createComponentVNode)(2,s);else n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Section,{children:n})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(i.machine_id,i.held_card_name);return(0,o.createComponentVNode)(2,a.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,a.Box,{children:"For all your monetary needs!"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,a.Button,{content:l,icon:"eject",onClick:function(){return c("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.security_level;return(0,o.createComponentVNode)(2,a.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return c("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return c("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"fundsAmount",0),m=s[0],h=s[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],N=f[1],b=i.money;return(0,o.createComponentVNode)(2,a.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Account Number",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"7 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Funds to Transfer",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,onInput:function(e,t){return N(t)}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return c("transfer",{target_acc_number:d,funds_amount:m,purpose:C})}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),d=l[0],u=l[1],s=i.owner_name,m=i.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Welcome, "+s,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return c("logout")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",m]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return c("withdrawal",{funds_amount:d})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Change account security level",icon:"lock",onClick:function(){return c("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return c("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View transaction log",icon:"list",onClick:function(){return c("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print balance statement",icon:"print",onClick:function(){return c("balance_statement")}})})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"accountID",null),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"accountPin",null),m=s[0],p=s[1];i.machine_id,i.held_card_name;return(0,o.createComponentVNode)(2,a.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return p(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return c("attempt_auth",{account_num:d,account_pin:m})}})})]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name})]},e)}))]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return c("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(68),d=n(3),u=n(123),s=n(124);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,a.useBackend)(t),c=(r.act,r.data),i=c.loginState,l=c.currentPage;return i.logged_in?(1===l?n=(0,o.createComponentVNode)(2,p):2===l?n=(0,o.createComponentVNode)(2,b):3===l&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m),n]})})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"tabIndex",0),i=r[0],l=r[1];n.login_state;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"User Accounts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Department Accounts"]})]})},p=function(e,t){switch((0,a.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},h=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.accounts,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","owner_name")),m=s[0],p=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),h=p[0];p[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,C,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,C,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,C,{id:"suspended",children:"Account Status"}),(0,o.createComponentVNode)(2,C,{id:"money",children:"Account Balance"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended+"|"+e.money}))).sort((function(e,t){var n=h?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return i("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.department_accounts;return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:"Department Name"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Number"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Status"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Balance"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return r("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wallet"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},C=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=(n.data.is_printing,(0,a.useLocalState)(t,"searchText","")),d=(l[0],l[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}})}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.account_number,d=i.owner_name,u=i.money,s=i.suspended,m=i.transactions,p=i.account_pin,h=i.is_department_account;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"#"+l+" / "+d,mt:1,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Number",children:["#",l]}),!!h&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin Actions",children:(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:Boolean(h),onClick:function(){return r("set_account_pin",{account_number:l})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Status",color:s?"red":"green",children:[s?"Suspended":"Active",(0,o.createComponentVNode)(2,c.Button,{ml:1,content:s?"Unsuspend":"Suspend",icon:s?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.target_name})]},e)}))]})})],4)},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=(n.data,(0,a.useLocalState)(t,"accName","")),l=i[0],d=i[1],u=(0,a.useLocalState)(t,"accDeposit",""),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Name Here",onChange:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"0",onChange:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:s})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCardInfo=t.AgentCardAppearances=t.AgentCard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AgentCard=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"id-card"})," Appearance"]},"Appearance")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);default:return(0,o.createComponentVNode)(2,i)}}(d)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.registered_name,d=i.sex,u=i.age,s=i.assignment,m=i.associated_account_number,p=i.blood_type,h=i.dna_hash,f=i.fingerprint_hash,C=i.photo,N=i.ai_tracking;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Card Info",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"[UNSET]",onClick:function(){return c("change_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sex",children:(0,o.createComponentVNode)(2,a.Button,{iconRight:!1,content:d||"[UNSET]",onClick:function(){return c("change_sex")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Age",children:(0,o.createComponentVNode)(2,a.Button,{content:u||"[UNSET]",onClick:function(){return c("change_age")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,a.Button,{content:s||"[UNSET]",onClick:function(){return c("change_occupation")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"[UNSET]",onClick:function(){return c("change_fingerprints")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"[UNSET]",onClick:function(){return c("change_blood_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"DNA Hash",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"[UNSET]",onClick:function(){return c("change_dna_hash")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Money Account",children:(0,o.createComponentVNode)(2,a.Button,{content:m||"[UNSET]",onClick:function(){return c("change_money_account")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo",children:(0,o.createComponentVNode)(2,a.Button,{content:C?"Update":"[UNSET]",onClick:function(){return c("change_photo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Card Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card Info",children:(0,o.createComponentVNode)(2,a.Button,{content:"Delete Card Info",onClick:function(){return c("delete_info")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:(0,o.createComponentVNode)(2,a.Button,{content:"Reset Access",onClick:function(){return c("clear_access")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"AI Tracking",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Untrackable":"Trackable",onClick:function(){return c("change_ai_tracking")}})})]})})],4)};t.AgentCardInfo=i;var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.appearances;return(0,o.createComponentVNode)(2,a.Section,{title:"Card Appearance",children:i.map((function(e){return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+e.image,style:{"vertical-align":"middle",width:"64px",margin:"0px","margin-left":"0px"},onclick:function(){return c("change_appearance",{new_appearance:e.name})}},e.name)}))})};t.AgentCardAppearances=l},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_power?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_power?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&2!==d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock||0===d.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),!a&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,d=c.data,u=d.air,s=d.mode,m=d.atmos_alarm,p=d.locked,h=d.alarmActivated,f=d.rcon,C=d.target_temp;return n=0===u.danger.overall?0===m?"Optimal":"Caution: Atmos alert in area":1===u.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,a.Section,{title:"Air Status",children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.pressure),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.pressure})," kPa",!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:3===s?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===s,icon:"exclamation-triangle",onClick:function(){return i("mode",{mode:3===s?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.oxygen/100,fractionDigits:"1",color:l(u.danger.oxygen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.nitrogen/100,fractionDigits:"1",color:l(u.danger.nitrogen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.co2/100,fractionDigits:"1",color:l(u.danger.co2)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.plasma/100,fractionDigits:"1",color:l(u.danger.plasma)})}),u.contents.n2o>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrous Oxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.n2o/100,fractionDigits:"1",color:l(u.danger.n2o)})}),u.contents.other>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.other/100,fractionDigits:"1",color:l(u.danger.other)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.temperature),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature})," K /"," ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return i("temperature")}}),(0,o.createComponentVNode)(2,a.Button,{content:u.thermostat_state?"On":"Off",selected:u.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.overall),children:[n,!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Off",selected:1===f,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Auto",selected:2===f,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,a.Button,{content:"On",selected:3===f,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,a.Box,{children:"Unable to acquire air sample!"})})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),c=n[0],i=n[1];return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===c,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},s=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0];n[1];switch(a){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,p);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return c("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,a.Button,{content:"External",selected:1===e.checks,onClick:function(){return c("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return c("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"cog",onClick:function(){return c("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return c("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return c("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return c("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return c("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return c("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return c("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return c("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return c("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.modes,d=i.presets,u=i.emagged,s=i.mode,m=i.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!u)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===s,onClick:function(){return c("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===m,onClick:function(){return c("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.thresholds;return(0,o.createComponentVNode)(2,a.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return c("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AirlockAccessController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.exterior_status,m=u.interior_status,p=u.processing;return n="open"===s?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:p,onClick:function(){return d("force_ext")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext_door")}}),i="open"===m?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:p,color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int_door")}}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Door Status",children:"closed"===s?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Door Status",children:"closed"===m?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:i})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,d)]})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,a.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:1})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:2})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:4})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:8})}})})]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.selected_accesses,u=l.one_access,s=l.regions;return(0,o.createComponentVNode)(2,i.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:"One",onClick:function(){return c("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,content:"All",onClick:function(){return c("set_one_access",{access:"all"})}})],4),accesses:s,selectedList:d,accessMod:function(e){return c("set",{access:e})},grantAll:function(){return c("grant_all")},denyAll:function(){return c("clear_all")},grantDep:function(e){return c("grant_region",{region:e})},denyDep:function(e){return c("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.change_race,s=d.species,m=d.specimen,p=d.change_gender,h=d.gender,f=d.has_gender,C=d.change_eye_color,N=d.change_skin_tone,b=d.change_skin_color,V=d.change_head_accessory_color,g=d.change_hair_color,v=d.change_secondary_hair_color,_=d.change_facial_hair_color,y=d.change_secondary_facial_hair_color,x=d.change_head_marking_color,k=d.change_body_marking_color,L=d.change_tail_marking_color,w=d.change_head_accessory,B=d.head_accessory_styles,S=d.head_accessory_style,I=d.change_hair,T=d.hair_styles,A=d.hair_style,E=d.change_hair_gradient,M=d.change_facial_hair,O=d.facial_hair_styles,P=d.facial_hair_style,F=d.change_head_markings,R=d.head_marking_styles,D=d.head_marking_style,j=d.change_body_markings,W=d.body_marking_styles,z=d.body_marking_style,U=d.change_tail_markings,H=d.tail_marking_styles,G=d.tail_marking_style,K=d.change_body_accessory,Y=d.body_accessory_styles,q=d.body_accessory_style,$=d.change_alt_head,X=d.alt_head_styles,J=d.alt_head_style,Q=!1;return(C||N||b||V||g||v||_||y||x||k||L)&&(Q=!0),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.specimen,selected:e.specimen===m,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,a.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Q&&(0,o.createComponentVNode)(2,i),!!w&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head accessory",children:B.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===S,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!I&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair",children:T.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.hairstyle,selected:e.hairstyle===A,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!E&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!M&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Facial hair",children:O.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===P,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!F&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head markings",children:R.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body markings",children:W.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!U&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===G,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!K&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!$&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternate head",children:X.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.altheadstyle,selected:e.altheadstyle===J,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!i[e.key]&&(0,o.createComponentVNode)(2,a.Button,{content:e.text,onClick:function(){return c(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.priority||[],d=i.minor||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-bad",e,0,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(68),i=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),u=c[0],s=c[1];return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:0===u,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,c.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,a.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Access",onClick:function(){return i("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"zoom",1),i=c[0],l=c[1],d=n.alarms;return(0,o.createComponentVNode)(2,a.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,a.NanoMap,{onZoom:function(e){return l(e)},children:d.filter((function(e){return 3===e.z})).map((function(e){return(0,o.createComponentVNode)(2,a.NanoMap.Marker,{x:e.x,y:e.y,zoom:i,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0)},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.pressure,s=l.max_pressure,m=l.filter_type,p=l.filter_type_list;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_pressure")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.gas_type===m,content:e.label,onClick:function(){return i("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.pressure,m=d.max_pressure,p=d.node1_concentration,h=d.node2_concentration;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:m,value:s,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:s===m,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,i,{node_name:"Node 1",node_ref:p}),(0,o.createComponentVNode)(2,i,{node_name:"Node 2",node_ref:h})]})})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:i,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return c("set_node",{node_name:i,concentration:t/100})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.rate,s=l.max_rate,m=l.gas_unit,p=l.step;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_rate")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:m,width:6.1,lineHeight:1.5,step:p,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosTankControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(12),i=n(44),l=n(3);t.AtmosTankControl=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.sensors||{};return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[Object.keys(s[e]).indexOf("pressure")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[s[e].pressure," kpa"]}):"",Object.keys(s[e]).indexOf("temperature")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[s[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map((function(t){return Object.keys(s[e]).indexOf(t)>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,i.getGasLabel)(t),children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(0,i.getGasColor)(t),value:s[e][t],minValue:0,maxValue:100,children:(0,c.toFixed)(s[e][t],2)+"%"})},(0,i.getGasLabel)(t)):""}))]})},e)})),u.inlet&&Object.keys(u.inlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Inlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.inlet.on,"power-off"),content:u.inlet.on?"On":"Off",color:u.inlet.on?null:"red",selected:u.inlet.on,onClick:function(){return d("toggle_active",{dev:"inlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:u.inlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"inlet",val:t})}})})]})}):"",u.outlet&&Object.keys(u.outlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Outlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.outlet.on,"power-off"),content:u.outlet.on?"On":"Off",color:u.outlet.on?null:"red",selected:u.outlet.on,onClick:function(){return d("toggle_active",{dev:"outlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:u.outlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"outlet",val:t})}})})]})}):""]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=n(20),u=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,c.useBackend)(t),s=n.act,m=n.data,p=m.total_amount,h=(m.max_amount,m.metal_amount),f=m.glass_amount,C=m.busyname,N=(m.busyamt,m.showhacked,m.buildQueue),b=m.buildQueueLen,V=m.recipes,g=m.categories,v=(0,c.useSharedState)(t,"category",0),_=v[0],y=v[1];0===_&&(_="Tools");var x=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),k=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),L=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),w=(0,c.useSharedState)(t,"search_text",""),B=w[0],S=w[1],I=(0,d.createSearch)(B,(function(e){return e.name})),T="";b>0&&(T=N.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:N[t][0],onClick:function(){return s("remove_from_queue",{remove_from_queue:N.indexOf(e)+1})}},e)},t)})));var A=(0,r.flow)([(0,a.filter)((function(e){return(e.category.indexOf(_)>-1||B)&&(m.showhacked||!e.hacked)})),B&&(0,a.filter)(I),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(V),E="Build";B?E="Results for: '"+B+"':":_&&(E="Build ("+_+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Section,{title:E,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:g,selected:_,onSelected:function(e){return y(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return S(t)},mb:1}),A.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&1===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,1),onClick:function(){return s("make",{make:e.uid,multiplier:1})},children:(0,d.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&10===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,10),onClick:function(){return s("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&25===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,25),onClick:function(){return s("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&m.busyamt===e.max_multiplier,disabled:!u(e,m.metal_amount,m.glass_amount,e.max_multiplier),onClick:function(){return s("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,d.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,i.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metal",children:x}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Glass",children:k}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total",children:L}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Storage",children:[m.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Building",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Build Queue",children:[T,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Clear All",disabled:!m.buildQueueLen,onClick:function(){return s("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.Biogenerator=function(e,t){var n=(0,r.useBackend)(t),a=n.data,m=n.config,p=a.container,h=a.processing,f=m.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:h,name:f}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),p?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"flask",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.biomass,l=c.container,d=c.container_curr_reagents,u=c.container_max_reagents;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",children:i}),(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:d+" / "+u+" units"})}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"None"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_plants,d=i.container;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return c("activate")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!d,tooltip:d?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return c("detach_container")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return c("eject_plants")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.biomass,d=i.product_list,u=(0,r.useSharedState)(t,"vendAmount",1),s=u[0],m=u[1],p=Object.entries(d).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,a.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*s,(0,o.createComponentVNode)(2,a.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"40%",children:(0,o.createComponentVNode)(2,a.Button,{content:"Vend",disabled:lm?"bad":"good";return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(m>V)&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Level",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===s,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===s,onClick:function(){return l("set",{set_level:m})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===s,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:s,fillValue:m,minValue:0,color:v,maxValue:N,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:s===N,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:s===N,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:N})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Power Use",children:(0,i.formatPower)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power for next level",children:(0,i.formatPower)(g)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Surplus Power",children:(0,i.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Points",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.price>=p,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,c.Box,{children:t},t)],0)}),null):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,a.useBackend)(t).data,r=n.occupied,c=n.occupant,l=void 0===c?{}:c,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,_);return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"print",onClick:function(){return i("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",onClick:function(){return i("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Implants",children:d.implant_len?(0,o.createComponentVNode)(2,c.Box,{children:d.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"None"})})]})})},N=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,c.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])}))}):(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,c.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:s,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[p([!!e.status.splinted&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:p([1===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},_=function(){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BookBinder=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=n(34);t.BookBinder=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.selectedbook,m=u.book_categories,p=[];return m.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Book Binder",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:m.map((function(e){return e.description})),onSelected:function(e){return d("toggle_binder_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),m.filter((function(e){return s.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return d("toggle_binder_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:s.summary})]})})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return d("print_book")}})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.cleanblood;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Clean Blood",disabled:u,onClick:function(){return l("blood")}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotFloor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotFloor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.hullplating,p=d.replace,h=d.eat,f=d.make,C=d.fixfloor,N=d.nag_empty,b=d.magnet,V=d.tiles_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Floor Settings",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:V})}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Add tiles to new hull plating",disabled:u,onClick:function(){return l("autotile")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Replace floor tiles",disabled:u,onClick:function(){return l("replacetiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:u,onClick:function(){return l("fixfloors")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Miscellaneous",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:u,onClick:function(){return l("eattiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Make pieces of metal into tiles when empty",disabled:u,onClick:function(){return l("maketiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Transmit notice when empty",disabled:u,onClick:function(){return l("nagonempty")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"Traction Magnets",disabled:u,onClick:function(){return l("anchored")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotHonk=void 0;var o=n(0),r=n(1),a=(n(2),n(3)),c=n(101);t.BotHonk=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.BotStatus)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotMed=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotMed=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.shut_up,p=d.declare_crit,h=d.stationary_mode,f=d.heal_threshold,C=d.injection_amount,N=d.use_beaker,b=d.treat_virus,V=d.reagent_glass;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Communication Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!m,disabled:u,onClick:function(){return l("toggle_speaker")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:p,disabled:u,onClick:function(){return l("toggle_critical_alerts")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Treatment Settings",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{value:f.value,minValue:f.min,maxValue:f.max,step:5,disabled:u,onChange:function(e,t){return l("set_heal_threshold",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Level",children:(0,o.createComponentVNode)(2,a.Slider,{value:C.value,minValue:C.min,maxValue:C.max,step:5,format:function(e){return e+"u"},disabled:u,onChange:function(e,t){return l("set_injection_amount",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Beaker":"Internal Synthesizer",icon:N?"flask":"cogs",disabled:u,onClick:function(){return l("toggle_use_beaker")}})}),V&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V.amount,minValue:0,maxValue:V.max_amount,children:[V.amount," / ",V.max_amount]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,a.Button,{content:"Eject",disabled:u,onClick:function(){return l("eject_reagent_glass")}})})]})})]}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Treat Viral Infections",checked:b,disabled:u,onClick:function(){return l("toggle_treat_viral")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:u,onClick:function(){return l("toggle_stationary_mode")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.check_id,p=d.check_weapons,h=d.check_warrant,f=d.arrest_mode,C=d.arrest_declare;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unidentifiable Persons",disabled:u,onClick:function(){return l("authid")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Weapons",disabled:u,onClick:function(){return l("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:u,onClick:function(){return l("authwarrant")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Detain Targets Indefinitely",disabled:u,onClick:function(){return l("arrtype")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:u,onClick:function(){return l("arrdeclare")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),a=n(2),c=n(1),i=function(e,t){var n=e.cell,r=(0,c.useBackend)(t).act,i=n.cell_id,l=n.occupant,d=n.crimes,u=n.brigged_by,s=n.time_left_seconds,m=n.time_set_seconds,p=n.ref,h="";s>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,a.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:i}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:u}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:m})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{type:"button",onClick:function(){r("release",{ref:p})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,a.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,i,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,c.useBackend)(t),i=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:i})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:l.occupant}));var d="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(d="exclamation-triangle"));var u=[],s=0;for(s=0;se.current_positions&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"-",disabled:s.cooldown_time||!e.can_close,onClick:function(){return u("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"+",disabled:s.cooldown_time||!e.can_open,onClick:function(){return u("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:s.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,a.Button,{content:e.is_priority?"Yes":"No",selected:e.is_priority,disabled:s.cooldown_time||!e.can_prioritize,onClick:function(){return u("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=s.authenticated&&s.scan_name?s.modify_name?(0,o.createComponentVNode)(2,i.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(e){return u("set",{access:e})},grantAll:function(){return u("grant_all")},denyAll:function(){return u("clear_all")},grantDep:function(e){return u("grant_region",{region:e})},denyDep:function(e){return u("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,a.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=s.authenticated?s.records.length?(0,o.createComponentVNode)(2,a.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||0===s.records.length||s.target_dept,onClick:function(){return u("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.reason}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||0===s.records.length,onClick:function(){return u("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=s.authenticated&&s.scan_name?(0,o.createComponentVNode)(2,a.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return u("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p,m,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=(n(45),n(20)),u=n(34);t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)]})})};var s=function(e,t){var n=(0,c.useLocalState)(t,"contentsModal",null),r=n[0],a=n[1],l=(0,c.useLocalState)(t,"contentsModalTitle",null),d=l[0],u=l[1];return null!==r&&null!==d?(0,o.createComponentVNode)(2,i.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[d,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,i.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Close",onClick:function(){a(null),u(null)}})})]}):void 0},m=function(e,t){var n,r,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=d.is_public,s=d.timeleft,m=d.moving,p=d.at_station;return m||p?!m&&p?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==s?"Shuttle is en route (ETA: "+s+" minutes)":"Shuttle is en route (ETA: "+s+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:n}),0===u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n,r=(0,c.useBackend)(t),a=(r.act,r.data.accounts),l=(0,c.useLocalState)(t,"selectedAccount"),d=l[0],u=l[1],s=[];return a.map((function(e){return s[e.name]=e.account_UID})),(0,o.createComponentVNode)(2,i.Section,{title:"Payment",children:[(0,o.createComponentVNode)(2,i.Dropdown,{mt:.6,width:"190px",options:a.map((function(e){return e.name})),selected:null==(n=a.filter((function(e){return e.account_UID===d}))[0])?void 0:n.name,onSelected:function(e){return u(s[e])}}),a.filter((function(e){return e.account_UID===d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Name",children:e.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Balance",children:e.balance})]},e.account_UID)}))]})},h=function(e,t){var n=(0,c.useBackend)(t),l=n.act,u=n.data,s=u.categories,m=u.supply_packs,p=(0,c.useSharedState)(t,"category","Emergency"),h=p[0],f=p[1],C=(0,c.useSharedState)(t,"search_text",""),N=C[0],b=C[1],V=(0,c.useLocalState)(t,"contentsModal",null),g=(V[0],V[1]),v=(0,c.useLocalState)(t,"contentsModalTitle",null),_=(v[0],v[1]),y=(0,d.createSearch)(N,(function(e){return e.name})),x=(0,c.useLocalState)(t,"selectedAccount"),k=x[0],L=(x[1],(0,r.flow)([(0,a.filter)((function(e){return e.cat===s.filter((function(e){return e.name===h}))[0].category||N})),N&&(0,a.filter)(y),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(m)),w="Crate Catalogue";return N?w="Results for '"+N+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,i.Section,{title:w,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:s.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return b(t)},mb:1}),(0,o.createComponentVNode)(2,i.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:L.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Order 1",icon:"shopping-cart",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:0,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:1,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Contents",icon:"search",onClick:function(){g(e.contents),_(e.name)}})]})]},e.name)}))})})]})},f=function(e,t){var n,r,a=e.request;switch(a.department){case"Engineering":r="CE",n="orange";break;case"Medical":r="CMO",n="teal";break;case"Science":r="RD",n="purple";break;case"Supply":r="CT",n="brown";break;case"Service":r="HOP",n="olive";break;case"Security":r="HOS",n="red";break;case"Command":r="CAP",n="blue";break;case"Assistant":r="Any Head",n="grey"}return(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:"Approval Required:"}),Boolean(a.req_cargo_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),Boolean(a.req_head_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{children:(0,o.createComponentVNode)(2,i.Button,{color:n,content:r,disabled:a.req_cargo_approval,icon:"user-tie",tooltip:a.req_cargo_approval?"This Order first requires approval from the QM before the "+r+" can approve it":"This Order requires approval from the "+r+" still"})})]})},C=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.requests,d=a.orders,u=a.shipments;return(0,o.createComponentVNode)(2,i.Section,{title:"Orders",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{className:"Cargo_RequestList",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{children:["Order #",e.ordernum,": ",e.supply_type," (",e.cost," credits) for"," ",(0,o.createVNode)(1,"b",null,e.orderedby,0)," with"," ",e.department?"The "+e.department+" Department":"Their Personal"," ","Account"]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]}),(0,o.createComponentVNode)(2,f,{request:e})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Approve",color:"green",disabled:!e.can_approve,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Deny",color:"red",disabled:!e.can_deny,onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Order in Transit"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChangelogView=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ChangelogView=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,r.useLocalState)(t,"onlyRecent",0),u=d[0],s=d[1],m=l.cl_data,p=l.last_cl,h={FIX:(0,o.createComponentVNode)(2,a.Icon,{name:"tools",title:"Fix"}),WIP:(0,o.createComponentVNode)(2,a.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,o.createComponentVNode)(2,a.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,o.createComponentVNode)(2,a.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})};return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:u?"Showing all changes":"Showing changes since last connection",onClick:function(){return s(!u)}}),children:m.map((function(e){return!u&&e.merge_ts<=p||(0,o.createComponentVNode)(2,a.Section,{mb:2,title:e.author+" - Merged on "+e.merge_date,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"#"+e.num,onClick:function(){return i("open_pr",{pr_number:e.num})}}),children:e.entries.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:[(t=e.etype,t in h?h[t]:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",color:"green"}))," ",e.etext]},e);var t}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(126),i=n(3),l=[1,5,10,20,30,50],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.amount,u=i.energy,s=i.maxEnergy;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Dispenser":"Chemical Dispenser",flexShrink:0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:l.glass?"Glass":"Beaker",flexGrow:1,minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return i("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return i("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return i("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return i("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(126),l=n(3);t.ChemHeater=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.targetTemp,u=l.targetTempReached,s=l.autoEject,m=l.isActive,p=l.currentTemp,h=l.isBeakerLoaded;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",flexBasis:"content",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{content:"Auto-eject",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return i("toggle_autoeject")}}),(0,o.createComponentVNode)(2,c.Button,{content:m?"On":"Off",icon:"power-off",selected:m,disabled:!h,onClick:function(){return i("toggle_on")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(d,0),minValue:0,maxValue:1e3,onDrag:function(e,t){return i("adjust_temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",color:u?"good":"average",children:h&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:p,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.isBeakerLoaded,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.beakerContents;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",flexGrow:"1",buttons:!!d&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[u," / ",s," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return r("eject_beaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:d,beakerContents:m})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(126),l=n(29),d=[1,5,10],u=["bottle.png","small_bottle.png","wide_bottle.png","round_bottle.png","reagent_bottle.png"];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,i=n.beaker,d=n.beaker_reagents,u=void 0===d?[]:d,h=n.buffer_reagents,f=void 0===h?[]:h,N=n.mode;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s,{beaker:i,beakerReagents:u,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,m,{mode:N,bufferReagents:f}),(0,o.createComponentVNode)(2,p,{isCondiment:a,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,C)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t).act,c=e.beaker,u=e.beakerReagents,s=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"0",flexBasis:"300px",buttons:s?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:c?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!i.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:i.printing?"spinner":"print",disabled:i.printing,iconSpin:!!i.printing,ml:"0.5rem",content:"Print",onClick:function(){return c("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(44),l=n(29),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.menu;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return i("lock")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return i("eject")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,c.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return i("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return i("scan")}})]}),(0,o.createComponentVNode)(2,c.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,c.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return i("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,c.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.records;return i.length?(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,c.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,c.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.scanner,d=i.numberofpods,u=i.autoallowed,s=i.autoprocess;i.disk;return(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:(0,o.createFragment)(!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColourMatrixTester=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ColourMatrixTester=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.colour_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Modify Matrix",children:[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]].map((function(e){return(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:e.map((function(e){return(0,o.createFragment)([e.name,(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{value:l[e.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(t,n){return i("setvalue",{idx:e.idx+1,value:n})}})],0,e.name)}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){switch(e){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,m);case 3:return(0,o.createComponentVNode)(2,p);case 4:return(0,o.createComponentVNode)(2,f);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}};t.CommunicationsComputer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.menu_state);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),i(a)]})})};var l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authenticated,u=l.noauthbutton,s=l.esc_section,m=l.esc_callable,p=l.esc_recallable,h=l.esc_status,f=l.authhead,C=l.is_ai,N=l.lastCallLoc,b=!1;return d?1===d?n="Command":2===d?n="Captain":3===d?n="CentComm Officer":4===d?(n="CentComm Secure Connection",b=!0):n="ERROR: Report This Bug!":n="Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:n})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,disabled:u,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return i("auth")}})})})}),!!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:h}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!f,onClick:function(){return i("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!f||C,onClick:function(){return i("cancelshuttle")}})}),!!N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Last Call/Recall From",children:N})]})})],0)},d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.is_admin?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.gamma_armory_location,u=i.admin_levels,m=i.authenticated,p=i.ert_allowed;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"CentComm Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:u,required_access:l,use_confirm:1})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!l,onClick:function(){return c("send_to_cc_announcement_page")}}),4===m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Make Other Announcement",disabled:!l,onClick:function(){return c("make_other_announcement")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Response Team",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!l,onClick:function(){return c("dispatch_ert")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:p,content:p?"ERT calling enabled":"ERT calling disabled",tooltip:p?"Command can request an ERT":"ERTs cannot be requested",disabled:!l,onClick:function(){return c("toggle_ert_allowed")},selected:null})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!l,onClick:function(){return c("send_nuke_codes")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gamma Armory",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"biohazard",content:d?"Send Gamma Armory":"Recall Gamma Armory",disabled:!l,onClick:function(){return c("move_gamma_armory")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"coins",content:"View Economy",disabled:!l,onClick:function(){return c("view_econ")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fax",content:"Fax Manager",disabled:!l,onClick:function(){return c("view_fax")}})]})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"View Command accessible controls",children:(0,o.createComponentVNode)(2,s)})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.msg_cooldown,d=i.emagged,u=i.cc_cooldown,s=i.security_level_color,m=i.str_security_level,p=i.levels,f=i.authcapt,C=i.authhead,N=i.messages,b="Make Priority Announcement";l>0&&(b+=" ("+l+"s)");var V=d?"Message [UNKNOWN]":"Message CentComm",g="Request Authentication Codes";return u>0&&(V+=" ("+u+"s)",g+=" ("+u+"s)"),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:s,children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:p,required_access:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:b,disabled:!f||l>0,onClick:function(){return c("announce")}})}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:V,disabled:!f||u>0,onClick:function(){return c("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!f,onClick:function(){return c("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:V,disabled:!f||u>0,onClick:function(){return c("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",content:g,disabled:!f||u>0,onClick:function(){return c("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!C,onClick:function(){return c("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:"View ("+N.length+")",disabled:!C,onClick:function(){return c("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!C,onClick:function(){return c("RestartNanoMob")}})})]})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.stat_display,d=i.authhead,u=(i.current_message_title,l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return c("setstat",{statdisp:e.name})}},e.name)}))),s=l.alerts.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.alert===l.icon,disabled:!d,onClick:function(){return c("setstat",{statdisp:3,alert:e.alert})}},e.alert)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alerts",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return c("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return c("setmsg2")}})})]})})},p=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authhead,u=l.current_message_title,s=l.current_message,m=l.messages;l.security_level;if(u)n=(0,o.createComponentVNode)(2,a.Section,{title:u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!d,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:s})});else{var p=m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!d||u===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"times",content:"Delete",disabled:!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));n=(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p})})}return(0,o.createComponentVNode)(2,a.Box,{children:n})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.levels,d=e.required_access,u=e.use_confirm,s=i.security_level;return u?l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)})):l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)}))},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.possible_cc_sounds;if(!l)return c("main");var u=(0,r.useLocalState)(t,"subtitle",""),s=u[0],m=u[1],p=(0,r.useLocalState)(t,"text",""),h=p[0],f=p[1],C=(0,r.useLocalState)(t,"classified",0),N=C[0],b=C[1],V=(0,r.useLocalState)(t,"beepsound","Beep"),g=V[0],v=V[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Central Command Report",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:s,onChange:function(e,t){return m(t)},mb:"5px"}),(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:h,onChange:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("make_cc_announcement",{subtitle:s,text:h,classified:N,beepsound:g})}}),(0,o.createComponentVNode)(2,a.Flex,{mt:"5px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"260px",height:"20px",options:d,selected:g,onSelected:function(e){return v(e)},disabled:N})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",mx:"5px",disabled:N,tooltip:"Test sound",onClick:function(){return c("test_sound",{sound:g})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Classified",fluid:!0,tooltip:N?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!N)}})})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CompostBin=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.CompostBin=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.biomass,u=l.compost,s=l.biomass_capacity,m=l.compost_capacity,p=(0,r.useSharedState)(t,"vendAmount",1),h=p[0],f=p[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{label:"Resources",children:[(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Biomass",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[d," / ",s," Units"]})})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compost",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:m,ranges:{good:[.5*m,Infinity],average:[.25*m,.5*m],bad:[-Infinity,.25*m]},children:[u," / ",m," Units"]})})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:h,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(e,t){return f(t)}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",textAlign:"right",width:"0%",children:(0,o.createComponentVNode)(2,a.Button,{align:"right",content:"Make Soil",disabled:u<25*h,icon:"arrow-circle-down",onClick:function(){return i("create",{amount:h})}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(228),l=n(3);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},s=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,d=r.data;n=d.unauthorized?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):d.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"hidden",children:1===d.page?(0,o.createComponentVNode)(2,h,{height:"100%"}):(0,o.createComponentVNode)(2,C,{height:"100%"})})],4):(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:s,finishedTimeout:3e3,onFinished:function(){return i("complete_load_animation")}})});var u=(0,a.useLocalState)(t,"viewingPhoto",""),f=u[0];u[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[f&&(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:n})})]})};var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.tc_available,d=i.tc_paid_out,u=i.completed_contracts,s=i.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,c.Box,{verticalAlign:"middle",mt:"0.25rem",children:[s," Rep"]})},e,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,c.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Earned",children:[d," TC"]})]})}),(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:u})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"shopping-cart"}),"Hub"]})]})))},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.contracts,s=l.contract_active,m=l.can_extract,p=!!s&&d.filter((function(e){return 1===e.status}))[0],h=p&&p.time_left>0,C=(0,a.useLocalState)(t,"viewingPhoto",""),N=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,c.Button,{disabled:!m||h,icon:"parachute-box",content:["Call Extraction",h&&(0,o.createComponentVNode)(2,i.Countdown,{timeLeft:p.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,c.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return N("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,c.Box,{width:"100%",children:[!!u[e.status]&&(0,o.createComponentVNode)(2,c.Box,{color:u[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:u[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",f(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!!s,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,c.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},f=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,a=e.objective.locs.target_area_id,i=e.objective.locs.target_coords,l=t===a;return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(i[1]-n[1],i[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.rep,d=i.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,c.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,c.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),b=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.slowFactor,u=l.oneWay,s=l.position;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lever position",children:s>0?"forward":s<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,onClick:function(){return i("toggleOneWay")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",onClick:function(){return i("slowFactor",{value:d-5})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-left",onClick:function(){return i("slowFactor",{value:d-1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Slider,{width:"100px",mx:"1px",value:d,fillValue:d,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return i("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-right",onClick:function(){return i("slowFactor",{value:d+1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",onClick:function(){return i("slowFactor",{value:d+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(26),a=n(20),c=n(1),i=n(2),l=n(68),d=n(44),u=n(3),s=n(34),m=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.possible_levels,d=a.viewing_current_z_level,m=a.is_advanced,p=(0,c.useLocalState)(t,"tabIndex",0),C=p[0],N=p[1];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,s.FlexItem,{grow:!0,basis:100,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===C,onClick:function(){return N(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===C,onClick:function(){return N(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),m?(0,o.createComponentVNode)(2,s.FlexItem,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:l,selected:d,onSelected:function(e){return r("switch_level",{new_level:e})}})}):null]})}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}(C)]})})})};var h=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,h=(0,r.sortBy)((function(e){return e.name}))(s.crewmembers||[]),f=(0,c.useLocalState)(t,"search",""),C=f[0],N=f[1],b=(0,a.createSearch)(C,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Location"})]}),h.filter(b).map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p(e,s.critThreshold),children:m(e,s.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"grey",children:"Not Available"})})]},e.name)}))]})]})},f=function(e,t){var n=(0,c.useBackend)(t).data,r=(0,c.useLocalState)(t,"zoom",1),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return l(e)},children:n.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:a,icon:"circle",tooltip:e.name+" ("+e.assignment+")",color:p(e,n.critThreshold)},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,V=d.auto_eject_healthy,g=d.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return c(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dosage interval",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{average:[-Infinity,99],good:[99,Infinity]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c(V?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:V?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c(g?"auto_eject_dead_off":"auto_eject_dead_on")},children:g?"On":"Off"})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.isBeakerLoaded,l=c.beakerLabel,d=c.beakerVolume;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:!l&&"average",children:l||"No label"}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",float:"right",color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],4):(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"bad",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,i=n.account_name,u=n.allow_items;return(0,o.createComponentVNode)(2,c.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!u&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored crew!"})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.frozen_items,d=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,i.toTitleCase)(t)};return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Items",children:l.length?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:d(e.name),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return c("one_item",{item:e.uid})}})},e)}))})}),(0,o.createComponentVNode)(2,a.Button,{content:"Drop All Items",color:"red",onClick:function(){return c("all_items")}})],4):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,g,{duration:d})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),n,(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.locked,u=i.hasOccupant,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return c("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return c("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:i.occupant.uniqueEnzymes?i.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return i("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedUIBlock,d=i.selectedUISubBlock,u=i.selectedUITarget,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return c("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return c("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedSEBlock,d=i.selectedSESubBlock,u=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return c("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.radiationIntensity,d=i.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return c("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:c}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.id,d=e.name,u=e.buffer,s=i.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return c("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return c("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!i.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return c("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!i.hasDisk||!i.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return c("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return c("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.hasDisk,d=i.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return c("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.isBeakerLoaded,d=i.beakerVolume,s=i.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return c("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return c("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=i.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var i=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===i,content:m[e+r],mb:"0",onClick:function(){return c(s,{block:t,subblock:i})}}))},i=0;ii.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert",{silent:u})}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.ert_request_messages;return(0,o.createComponentVNode)(2,a.Section,{children:l&&l.length?l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.time,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.sender_real_name,onClick:function(){return c("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel"}),children:e.message},(0,i.decodeHtmlEntities)(e.time))})):(0,o.createComponentVNode)(2,a.Box,{fluid:!0,italic:!0,textAlign:"center",children:"No ERT requests"})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,(0,r.useLocalState)(t,"text","")),l=i[0],d=i[1];return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:l,onChange:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("deny_ert",{reason:l})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.EconomyManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=n(45);t.EconomyManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.next_payroll_time;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Global",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"global"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Members",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department_members"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Single Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return c("delay_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){return c("set_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return c("accelerate_payroll")}})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,h=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:h/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmotePanelContent=t.EmotePanel=void 0;var o=n(0),r=n(1),a=n(3),c=n(2);t.EmotePanel=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),a=n.act,i=n.data.emotes,l=(0,r.useLocalState)(t,"searchText",""),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"filterVisible",""),m=s[0],p=s[1],h=(0,r.useLocalState)(t,"filterAudible",""),f=h[0],C=h[1],N=(0,r.useLocalState)(t,"filterSound",""),b=N[0],V=N[1],g=(0,r.useLocalState)(t,"filterHands",""),v=g[0],_=g[1],y=(0,r.useLocalState)(t,"filterTargettable",""),x=y[0],k=y[1],L=(0,r.useLocalState)(t,"useTarget",""),w=L[0],B=L[1],S=(0,o.createComponentVNode)(2,c.Input,{placeholder:"\u0418\u0441\u043a\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u044e...",fluid:!0,onInput:function(e,t){return u(t)}});return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",buttons:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"eye",width:"100%",height:"100%",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043c\u044b\u0439",selected:m,onClick:function(){return p(!m)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"comment",width:"100%",height:"100%",align:"center",tooltip:"\u0421\u043b\u044b\u0448\u0438\u043c\u044b\u0439",selected:f,onClick:function(){return C(!f)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"volume-up",width:"100%",height:"100%",align:"center",tooltip:"\u0417\u0432\u0443\u043a",selected:b,onClick:function(){return V(!b)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"hand-paper",width:"100%",height:"100%",align:"center",tooltip:"\u0420\u0443\u043a\u0438",selected:v,onClick:function(){return _(!v)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",width:"100%",height:"100%",align:"center",tooltip:"\u0426\u0435\u043b\u044c",selected:x,onClick:function(){return k(!x)}})]}),children:S}),(0,o.createComponentVNode)(2,c.Section,{title:d.length>0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+d+'"':"\u0412\u0441\u0435 \u044d\u043c\u043e\u0446\u0438\u0438",fill:!0,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",selected:w,onClick:function(){return B(!w)},children:"\u0412\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0446\u0435\u043b\u044c"}),children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{children:i.filter((function(e){return e.key&&(!(d.length>0)||(e.key.toLowerCase().includes(d.toLowerCase())||e.name.toLowerCase().includes(d.toLowerCase())))&&(!m||e.visible)&&(!f||e.audible)&&(!b||e.sound)&&(!v||e.hands)&&(!x||e.targettable)})).map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return a("play_emote",{emote_key:e.key,useTarget:w})},children:[e.visible?(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}):"",e.audible?(0,o.createComponentVNode)(2,c.Icon,{name:"comment"}):"",e.sound?(0,o.createComponentVNode)(2,c.Icon,{name:"volume-up"}):"",e.hands?(0,o.createComponentVNode)(2,c.Icon,{name:"hand-paper"}):"",e.targettable?(0,o.createComponentVNode)(2,c.Icon,{name:"crosshairs"}):"",e.name.toUpperCase()]},e.name)}))})})})]})};t.EmotePanelContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.can_respec;return(0,o.createComponentVNode)(2,a.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){return c("readapt")}}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.ability_list,u=i.purchased_abilities,s=i.view_mode,m=(0,r.useLocalState)(t,"tab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:s?"square-o":"check-square-o",selected:!s,content:"Compact",onClick:function(){return c("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:s?"check-square-o":"square-o",selected:s,content:"Expanded",onClick:function(){return c("set_view_mode",{mode:1})}})],4),children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){h(0)},children:"Offense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){h(1)},children:"Defense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:"Utility"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===p,onClick:function(){return h(3)},children:"Stings"})]}),d[p].map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),u.includes(e.power_path)&&(0,o.createComponentVNode)(2,a.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,o.createComponentVNode)(2,a.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mr:.5,disabled:e.cost>l||u.includes(e.power_path),content:"Evolve",onClick:function(){return c("purchase",{power_path:e.power_path})}})})]}),!!s&&(0,o.createComponentVNode)(2,a.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(8),a=n(20),c=n(1),i=n(2),l=n(228),d=n(3),u=["id","amount","lineDisplay","onClick"];var s={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data.building);return(0,o.createComponentVNode)(2,d.Window,{children:(0,o.createComponentVNode)(2,d.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),r&&(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,f)})]})})]})})})};var m=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.materials,d=a.capacity,u=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,i.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.25rem",children:[(u/d*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,C,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,c.useBackend)(t),r=n.act,l=n.data,d=l.curCategory,u=l.categories,s=l.designs,m=l.syncing,p=(0,c.useLocalState)(t,"searchText",""),h=p[0],f=p[1],C=(0,a.createSearch)(h,(function(e){return e.name})),b=s.filter(C);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,i.Dropdown,{selected:d,options:u,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,i.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:m,iconSpin:m,icon:"sync-alt",content:m?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),b.map((function(e){return(0,o.createComponentVNode)(2,N,{design:e},e.id)})),0===b.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No designs found."})]})},h=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data),a=r.building,d=r.buildStart,u=r.buildEnd,s=r.worldTime;return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar.Countdown,{start:d,current:s,end:u,bold:!0,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",children:(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:!0})}),"Building ",a,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:s,timeLeft:u-s,format:function(e,t){return t.substr(3)}}),")"]})})},f=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.queue,d=a.processingQueue,u=Object.entries(a.queueDeficit).filter((function(e){return e[1]<0})),s=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Processing time:",(0,o.createComponentVNode)(2,i.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",bold:!0,children:new Date(s/10*1e3).toISOString().substr(14,5)})]}),Object.keys(u).length>0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Lacking materials to complete:",u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},C=function(e,t){var n=(0,c.useBackend)(t),a=(n.act,n.data),l=e.id,d=e.amount,m=e.lineDisplay,p=e.onClick,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),f=l.replace("$",""),C=a.materials[l]||0,N=d||C;if(!(N<=0&&"metal"!==f&&"glass"!==f)){var b=d&&d>C;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",m&&"Exofab__material--line"])},h,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,i.Button,{onClick:p,children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[f]||f)+".png"})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:m?(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",color:b&&"bad",children:N.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--name",children:f}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",children:[N.toLocaleString("en-US")," cm\xb3 (",Math.round(N/2e3*10)/10," ","sheets)"]})],4)})]})))}},N=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=e.design;return(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:l.notEnough||a.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ExternalAirlockController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.chamber_pressure,m=(u.exterior_status,u.interior_status),p=u.processing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(n=s,i="good",n<80?i="bad":n<95||n>110?i="average":n>120&&(i="bad"),i),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Abort",icon:"ban",color:"red",disabled:!p,onClick:function(){return d("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return i("scan")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){return i("auth")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return i("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return i("rename")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return i("dept")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,a.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return i("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FilingCabinet=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FilingCabinet=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=n.config,u=l.contents,s=d.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" The ",s," is empty. "]}),!!u&&u.slice().map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"80%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){return i("retrieve",{index:e.index})}})})]},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,e.image),c=e.isSelected,i=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+a,style:{"border-style":c?"solid":"none","border-width":"2px","border-color":"orange",padding:c?"2px":"4px"},onClick:i})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.availableStyles,s=d.selectedStyle,m=d.selectedDir,p=d.directionsPreview,h=d.allStylesPreview;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:s,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,a.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,i,{image:h[e],isSelected:s===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,a.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,a.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,i,{image:p[e],isSelected:e===m,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,a.useBackend)(t).data,r=n.emped,l=n.active,p=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,d,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,u)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{area:p,position:h})}),f&&(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,m,{height:"100%"})})],0):(0,o.createComponentVNode)(2,d)],0)})})})};var d=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,c.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.active,d=i.tag,u=i.same_z,s=(0,a.useLocalState)(t,"newTag",d),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,c.Input,{width:"5rem",value:d,onEnter:function(){return r("tag",{newtag:m})},onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:d===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:m})},children:(0,o.createComponentVNode)(2,c.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"compress":"expand",content:u?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},s=function(e,t){var n=e.title,r=e.area,a=e.position;return(0,o.createComponentVNode)(2,c.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,c.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(a)]})})},m=function(e,t){var n=(0,a.useBackend)(t).data,i=n.position,d=n.signals;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,c.Table,{children:d.map((function(e){return Object.assign({},e,function(e,t){if(e&&t){if(e[2]!==t[2])return null;var n=Math.atan2(t[1]-e[1],t[0]-e[0]),o=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(n),distance:o}}}(i,e.position))})).map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,c.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GeneModder=void 0;var o=n(0),r=n(1),a=n(2),c=n(29),i=n(3);t.GeneModder=function(e,t){var n=(0,r.useBackend)(t).data.has_seed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Genes",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Insert Gene from Disk",disabled:!i||!i.can_insert||i.is_core,icon:"arrow-circle-down",onClick:function(){return c("insert")}}),children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.has_seed,s=d.seed,m=d.has_disk,p=d.disk;return n=u?(0,o.createComponentVNode)(2,a.Flex.Item,{mb:"-6px",mt:"-4px",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{content:s.name,onClick:function(){return l("eject_seed")}}),(0,o.createComponentVNode)(2,a.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return l("variant_name")}})]}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",onClick:function(){return l("eject_seed")}})}),c=m?p.name:"None",(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Sample",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Disk",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:c,onClick:function(){return l("eject_disk")}})})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.disk,d=i.core_genes;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core Genes",open:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=l&&l.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Replace",disabled:!e.is_type||!l.can_insert,icon:"arrow-circle-down",onClick:function(){return c("replace",{id:e.id})}})})]},e)}))},"Core Genes")},m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.reagent_genes,c=n.has_reagent;return(0,o.createComponentVNode)(2,h,{title:"Reagent Genes",gene_set:a,do_we_show:c})},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.trait_genes,c=n.has_trait;return(0,o.createComponentVNode)(2,h,{title:"Trait Genes",gene_set:a,do_we_show:c})},h=function(e,t){var n=e.title,c=e.gene_set,i=e.do_we_show,l=(0,r.useBackend)(t),d=l.act,u=l.data.disk;return(0,o.createComponentVNode)(2,a.Collapsible,{title:n,open:!0,children:i?c.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=u&&u.can_extract),icon:"save",onClick:function(){return d("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"times",onClick:function(){return d("remove",{id:e.id})}})})]},e)})):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"No Genes Detected"})},n)}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),a=n(3),c=n(168);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,c.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,d=n.medical,u=n.diagnostic,s=n.radioactivity,m=n.ahud;return(0,o.createComponentVNode)(2,c.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,i,{label:"Medical",type:"medical",is_active:d}),(0,o.createComponentVNode)(2,i,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,i,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Antag HUD",is_active:m,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.label,i=e.type,l=void 0===i?null:i,d=e.is_active,u=e.act_on,s=void 0===u?"hud_on":u,m=e.act_off,p=void 0===m?"hud_off":m;return(0,o.createComponentVNode)(2,a.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){return n(d?p:s,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGen=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GravityGen=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.charging_state,s=d.charge_count,m=d.breaker,p=d.ext_power;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[function(e){if(e>0)return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,p:1.5,children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}(u),(0,o.createComponentVNode)(2,a.Section,{title:"Generator Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",content:m?"Online":"Offline",color:m?"green":"red",px:1.5,onClick:function(){return l("breaker")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Status",color:p?"good":"bad",children:(n=u,n>0?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:["[ ",1===n?"Charging":"Discharging"," ]"]}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:p?"good":"bad",children:["[ ",p?"Powered":"Unpowered"," ]"]}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GuestPass=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.GuestPass=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"id-card",selected:!d.showlogs,onClick:function(){return l("mode",{mode:0})},children:"Issue Pass"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"scroll",selected:d.showlogs,onClick:function(){return l("mode",{mode:1})},children:["Records (",d.issue_log.length,")"]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.scan_name?"eject":"id-card",selected:d.scan_name,content:d.scan_name?d.scan_name:"-----",tooltip:d.scan_name?"Eject ID":"Insert ID",onClick:function(){return l("scan")}})})})}),!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issue Guest Pass",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Issue To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.giv_name?d.giv_name:"-----",disabled:!d.scan_name,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.reason?d.reason:"-----",disabled:!d.scan_name,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.duration?d.duration:"-----",disabled:!d.scan_name,onClick:function(){return l("duration")}})})]}),!!d.scan_name&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AccessList,{grantableList:d.grantableList,accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return l("access",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d.printmsg,disabled:!d.canprint,onClick:function(){return l("issue")}})],4)]}),!!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issuance Log",children:!!d.issue_log.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:d.issue_log.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:e},t)}))}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!d.scan_name,onClick:function(){return l("print")}})],4)||(0,o.createComponentVNode)(2,a.Box,{children:"None."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.amount,u=l.energy,s=l.maxEnergy,m=l.mode;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"dispense"===m,content:"Dispense",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"remove"===m,content:"Remove",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"isolate"===m,content:"Isolate",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"isolate"})}})]})})]})})},d=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=i.current_reagent,s=[],m=0;m<(d.length+1)%3;m++)s.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:u===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HealthSensor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.HealthSensor=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.on,m=u.user_health,p=u.minHealth,h=u.maxHealth,f=u.alarm_health;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanning",children:(0,o.createComponentVNode)(2,c.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return d("scan_toggle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health activation",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:p,maxValue:h,value:f,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return d("alarm_health",{alarm_health:t})}})}),null!==m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"User health",children:(0,o.createComponentVNode)(2,c.Box,{color:l(m),bold:m>=100,children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:m})})})]})})})})};var l=function(e){return e>50?"green":e>0?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=(n(29),n(45));t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.decks,s=d.current_deck,m=d.ai_override,p=d.emagged;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Holodeck Control System",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",s]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Available Programs",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{block:!0,content:e,selected:e===s,onClick:function(){return l("select_deck",{deck:e})}},e)})),Boolean(p)&&(0,o.createComponentVNode)(2,a.Button,{content:"Wildlife Simulation",color:"red",onClick:function(){return l("wildlifecarp")}}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[Boolean(m)&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Override Protocols",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){return l("ai_override")}})}),(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Safety Protocols",children:(0,o.createComponentVNode)(2,a.Box,{color:p?"bad":"good",children:p?"Off":"On"})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.implant,s=d.contains_case;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Bio-chip Mini-Computer",children:[u&&s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Life",children:u.life}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Notes",children:u.notes}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Function",children:u["function"]})]})],4):s?(0,o.createComponentVNode)(2,a.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,a.Box,{children:"Please insert a bio-chip casing!"}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!s,onClick:function(){return l("eject_case")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Instrument=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)]})]})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,c.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.lines,s=l.playing,m=l.repeat,p=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,N=l.tickLag,b=l.volume,V=l.minVolume,g=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,c.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"info",content:"Help",onClick:function(){return i("help")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file",content:"New",onClick:function(){return i("newsong")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Import",onClick:function(){return i("import")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,disabled:0===d.length||m<0,icon:"play",content:"Play",onClick:function(){return i("play")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,icon:"stop",content:"Stop",onClick:function(){return i("stop")}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0",maxValue:p,value:m,stepPixelSize:"59",onChange:function(e,t){return i("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return i("tempo",{"new":h+N})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,c.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return i("tempo",{"new":h-N})}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:V,maxValue:g,value:b,stepPixelSize:"6",onDrag:function(e,t){return i("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,u)]})},u=function(e,t){var n,i,l=(0,a.useBackend)(t),d=l.act,u=l.data,s=u.allowedInstrumentNames,m=u.instrumentLoaded,p=u.instrument,h=u.canNoteShift,f=u.noteShift,C=u.noteShiftMin,N=u.noteShiftMax,b=u.sustainMode,V=u.sustainLinearDuration,g=u.sustainExponentialDropoff,v=u.legacy,_=u.sustainDropoffVolume,y=u.sustainHeldNote;return 1===b?(n="Linear",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"0.1",maxValue:"5",value:V,step:"0.5",stepPixelSize:"85",format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return d("setlinearfalloff",{"new":t/10})}})):2===b&&(n="Exponential",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"1.025",maxValue:"10",value:g,step:"0.01",format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return d("setexpfalloff",{"new":t})}})),s.sort(),(0,o.createComponentVNode)(2,c.Box,{my:-1,children:(0,o.createComponentVNode)(2,c.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,c.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current",children:m?(0,o.createComponentVNode)(2,c.Dropdown,{options:s,selected:p,width:"40%",onSelected:function(e){return d("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:C,maxValue:N,value:f,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return d("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,c.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return d("setsustainmode",{"new":e})}}),i]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:_,stepPixelSize:"6",onChange:function(e,t){return d("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,c.Button,{selected:y,icon:y?"toggle-on":"toggle-off",content:y?"Yes":"No",onClick:function(){return d("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return d("reset")}})]})})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.playing,d=i.lines,u=i.editing;return(0,o.createComponentVNode)(2,c.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!u||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:d.length+1})}}),(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!u&&(d.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(26),a=n(42),c=n(1),i=n(2),l=n(3);t.Jukebox=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.track_selected,p=u.track_length,h=u.track_beat,f=u.volume,C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"pause":"play",content:s?"\u0421\u0442\u043e\u043f":"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0422\u0440\u0435\u043a",children:(0,o.createComponentVNode)(2,i.Dropdown,{"overflow-y":"scroll",width:"240px",options:C.map((function(e){return e.name})),disabled:s,selected:m||"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u043a",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c",children:m?p:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0420\u0438\u0442\u043c",children:[m?h:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",1===h?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,i.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Knob,{size:3.2,color:f>=50?"red":"green",value:f,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,o.createComponentVNode)(2,a.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,a.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?u=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Waiting for second person to confirm..."})):u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,a.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return i("ert")}})})}),(0,o.createComponentVNode)(2,a.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return i("reset")}}),children:u})]})})}return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,(0,o.createComponentVNode)(2,a.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return i("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",onClick:function(){return i("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KitchenMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.KitchenMachine=function(e,t){var n=(0,r.useBackend)(t),d=n.data,u=n.config,s=d.ingredients,m=d.operating,p=u.title;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:m,name:p}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Section,{title:"Ingredients",flexGrow:1,children:(0,o.createComponentVNode)(2,a.Table,{className:"Ingredient__Table",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{tr:5,children:[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.name}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]}),2)]},e.name)}))})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.inactive,d=i.tooltip;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return c("cook")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return c("eject")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.isAdmin,m=u.isSlaved,p=u.isMalf,h=u.isAIMalf,f=u.view;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!(!s||!m)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!(!p&&!h)&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Law Management",selected:0===f,onClick:function(){return d("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Lawsets",selected:1===f,onClick:function(){return d("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,i),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,m=i.ion_laws,p=i.ion_law_nr,h=i.has_inherent_laws,f=i.inherent_laws,C=i.has_supplied_laws,N=i.supplied_laws,b=i.channels,V=i.channel,g=i.isMalf,v=i.isAdmin,_=i.zeroth_law,y=i.ion_law,x=i.inherent_law,k=i.supplied_law,L=i.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,d,{title:"ERR_NULL_VALUE",laws:u,ctx:t}),!!s&&(0,o.createComponentVNode)(2,d,{title:p,laws:m,ctx:t}),!!h&&(0,o.createComponentVNode)(2,d,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,d,{title:"Supplied",laws:N,ctx:t}),(0,o.createComponentVNode)(2,a.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:e.channel===V,onClick:function(){return c("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{content:"State Laws",onClick:function(){return c("state_laws")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{content:"Notify",onClick:function(){return c("notify_laws")}})})]})}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:_}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_zeroth_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_ion_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_inherent_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:L,onClick:function(){return c("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_supplied_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.law_sets;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Load Laws",icon:"download",onClick:function(){return c("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(e.ctx),c=n.act,i=n.data.isMalf;return(0,o.createComponentVNode)(2,a.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return c("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return c("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29),l=n(34);t.LibraryComputer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.selected_rating,d=Array(10).fill().map((function(e,t){return 1+t}));return(0,o.createComponentVNode)(2,a.Flex,{children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{bold:!0,icon:"star",color:i>=e?"caution":"default",onClick:function(){return c("set_rating",{rating_value:e})}})},t)})),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,ml:2,fontSize:"150%",children:[i+"/10",(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",0),i=c[0],l=c[1],d=n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Book Archives"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Corporate Literature"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Upload Book"]}),1===d&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===i,onClick:function(){return l(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Patron Manager"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:4===i,onClick:function(){return l(4)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Inventory"]})]})},s=function(e,t){switch((0,r.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,f);case 3:return(0,o.createComponentVNode)(2,C);case 4:return(0,o.createComponentVNode)(2,N);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.searchcontent,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Flex,{"flex-direction":"row",children:[(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title||"Input Title",onClick:function(){return(0,i.modalOpen)(t,"edit_search_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author||"Input Author",onClick:function(){return(0,i.modalOpen)(t,"edit_search_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ratings",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{mr:1,width:"min-content",content:u.ratingmin,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmin")}})}),(0,o.createComponentVNode)(2,l.FlexItem,{children:"To"}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{ml:1,width:"min-content",content:u.ratingmax,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmax")}})})]})})]})]}),(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_search_category",{category_id:p[e]})}})})})}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return c("toggle_search_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Search",icon:"eraser",onClick:function(){return c("clear_search")}}),u.ckey?(0,o.createComponentVNode)(2,a.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return c("clear_ckey_search")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Find My Books",icon:"search",onClick:function(){return c("find_users_books",{user_ckey:m})}})]})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.external_booklist,u=l.archive_pagenumber,s=l.num_pages,p=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Book System Access",children:[(0,o.createComponentVNode)(2,m),(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",disabled:1===u,onClick:function(){return c("deincrementpagemax")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",disabled:1===u,onClick:function(){return c("deincrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{bold:!0,content:u,onClick:function(){return(0,i.modalOpen)(t,"setpagenumber")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",disabled:u===s,onClick:function(){return c("incrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",disabled:u===s,onClick:function(){return c("incrementpagemax")}})],4),(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ratings"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Category"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===p&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_external_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},e.id)}))]})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.programmatic_booklist,u=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Corporate Book Catalog",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e,n){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:2}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===u&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_programmatic_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},n)}))]})})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.selectedbook,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Section,{title:"Book System Upload",children:[u.copyright?(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Uploader"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_upload_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,disabled:u.copyright,selected:!0,icon:"unlink",onClick:function(){return c("toggle_upload_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",disabled:u.copyright,content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:u.summary})]})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,mt:16,icon:"upload",width:"auto",disabled:u.copyright,content:"Upload Book",onClick:function(){return c("uploadbook",{user_ckey:m})}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.checkout_data;return(0,o.createComponentVNode)(2,a.Section,{title:"Checked Out Books",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Patron"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-tag"}),e.patron_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return c("reportlost",{libraryid:e.libraryid})}})})]},t)}))]})})},N=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.inventory_list);return(0,o.createComponentVNode)(2,a.Section,{title:"Library Inventory",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"LIB ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"})]}),c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.libraryid}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"})," ",e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},t)}))]})})};(0,i.modalRegisterBodyOverride)("expand_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=e.args,u=l.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:d.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:d.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:d.summary}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[d.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!d.isProgrammatic&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Categories",children:d.categories.join(", ")})]}),(0,o.createVNode)(1,"br"),u===d.ckey&&(0,o.createComponentVNode)(2,a.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:d.isProgrammatic,onClick:function(){return c("delete_book",{bookid:d.id,user_ckey:u})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Report Book",icon:"flag",color:"red",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"report_book",{bookid:d.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"rate_info",{bookid:d.id})}})]})})),(0,i.modalRegisterBodyOverride)("report_book",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,d=i.selected_report,u=i.report_categories,s=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Report this book for Rule Violations",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reasons",children:(0,o.createComponentVNode)(2,a.Box,{children:u.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:e.category_id===d,onClick:function(){return c("set_report",{report_type:e.category_id})}}),(0,o.createVNode)(1,"br")],4,t)}))})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return c("submit_report",{bookid:l.id,user_ckey:s})}})]})})),(0,i.modalRegisterBodyOverride)("rate_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,u=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:l.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[l.current_rating?l.current_rating:0,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Ratings",children:l.total_ratings?l.total_ratings:0})]}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return c("rate_book",{bookid:l.id,user_ckey:u})}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(29);t.LibraryManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,l)})]})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act;switch(n.data.pagestate){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,i.modalOpen)(t,"specify_ssid_delete")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_delete")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_search")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return c("view_reported_books")}})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reports;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"All Reported Books",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Uploader CKEY"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Report Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reporter Ckey"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.uploader_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.report_description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.reporter_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return c("unflag_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.ckey,d=i.booklist;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"Books uploaded by ",l,(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ListInput=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(99),d=0;t.ListInput=function(e,t){var n=(0,a.useBackend)(t),r=n.act,s=n.data,m=s.title,p=s.message,h=s.buttons,f=s.timeout,C=(0,a.useLocalState)(t,"search_bar",!1),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"displayed_array",h),g=V[0],v=V[1],_=(0,a.useLocalState)(t,"search_array",[]),y=_[0],x=_[1],k=(0,a.useLocalState)(t,"search_index",0),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"last_char_code",null),S=B[0],I=B[1],T=(0,a.useLocalState)(t,"selected_button",h[0]),A=T[0],E=T[1];return(0,o.createComponentVNode)(2,i.Window,{title:m,children:[f!==undefined&&(0,o.createComponentVNode)(2,u,{value:f}),(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Layout__content--flexColumn",height:"100%",mb:"7px",children:(0,o.createComponentVNode)(2,c.Section,{className:"ListInput__Section",flexGrow:"1",scrollable:!0,fill:!0,title:p,tabIndex:1,onKeyDown:function(e){if(e.preventDefault(),!(d>performance.now())){if(d=performance.now()+125,e.keyCode===l.ARROW_KEY_UP||e.keyCode===l.ARROW_KEY_DOWN){var t=1;e.keyCode===l.ARROW_KEY_UP&&(t=-1);for(var n=0;n=h.length&&(n=0),E(h[n]),I(null),void document.getElementById(h[n]).focus()}var o=String.fromCharCode(e.keyCode).toLowerCase();if(o){var r;if(o===S&&y.length>0){var a=L+1;a0&&(x(c),w(0),r=c[0])}r&&(I(o),E(r),document.getElementById(r).focus())}}},buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"search",color:"transparent",selected:N,tooltip:"Search...",tooltipPosition:"left",onClick:function(){b(!N),v(h)},compact:!0}),children:(0,o.createComponentVNode)(2,c.Flex,{wrap:"wrap",children:g.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",content:e,id:e,width:"100%",selected:A===e,onClick:function(){A===e?r("choose",{choice:e}):E(e),I(null)}})},e)}))})})}),N&&(0,o.createComponentVNode)(2,c.Flex.Item,{basis:2.5,children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",autoFocus:!0,onInput:function(e,t){return v(h.filter((function(e){return-1!==e.toLowerCase().search(t.toLowerCase())})))}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,ml:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"good",content:"Confirm",disabled:null===A,onClick:function(){return r("choose",{choice:A})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,mr:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"bad",content:"Cancel",onClick:function(){return r("cancel")}})})]})})]})})]})};var u=function(e){var t=e.value;return(0,o.createVNode)(1,"div","ListInput__Loader",(0,o.createComponentVNode)(2,c.Box,{className:"ListInput__LoaderProgress",style:{width:100*(0,r.clamp01)(t)+"%"}}),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.MODsuitContent=t.MODsuit=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.NumberInput,{value:c,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(e,t){return l("configure",{key:n,value:t,ref:i})}})},l=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:c,onClick:function(){return l("configure",{key:n,value:!c,ref:i})}})},d=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"paint-brush",onClick:function(){return l("configure",{key:n,ref:i})}}),(0,o.createComponentVNode)(2,a.ColorBox,{color:c,mr:.5})],4)},u=function(e,t){var n=e.name,c=e.value,i=e.values,l=e.module_ref,d=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Dropdown,{displayText:c,options:i,onSelected:function(e){return d("configure",{key:n,value:e,ref:l})}})},s=function(e,t){e.name;var n=e.display_name,r=e.type,c=(e.value,e.values,e.module_ref,{number:(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,Object.assign({},e))),bool:(0,o.normalizeProps)((0,o.createComponentVNode)(2,l,Object.assign({},e))),color:(0,o.normalizeProps)((0,o.createComponentVNode)(2,d,Object.assign({},e))),list:(0,o.normalizeProps)((0,o.createComponentVNode)(2,u,Object.assign({},e)))});return(0,o.createComponentVNode)(2,a.Box,{children:[n,": ",c[r]]})},m={rad_counter:function(e,t){var n=e.active,r=e.userradiated,c=e.usertoxins,i=e.usermaxtoxins,l=e.threatlevel;return(0,o.createComponentVNode)(2,a.Flex,{fill:!0,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Level",color:n&&r?"bad":"good",children:n&&r?"IRRADIATED!":"RADIATION-FREE"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxins Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?c/i:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Hazard Level",color:n&&l?"bad":"good",bold:!0,children:n&&l?l:0})})]})},health_analyzer:function(e,t){var n=e.active,r=e.userhealth,c=e.usermaxhealth,i=e.userbrute,l=e.userburn,d=e.usertoxin,u=e.useroxy;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?r/c:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?r:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?l/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?l:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})})]})],4)},status_readout:function(e,t){var n=e.active,r=e.statustime,c=e.statusid,i=e.statushealth,l=e.statusmaxhealth,d=e.statusbrute,u=e.statusburn,s=e.statustoxin,m=e.statusoxy,p=e.statustemp,h=e.statusnutrition,f=e.statusfingerprints,C=e.statusdna,N=e.statusviruses;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Time",children:n?r:"00:00:00"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Number",children:n?c||"0":"???"})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/l:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?s/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?m/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})})})]}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Body Temperature",children:n?p:0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Nutrition Status",children:n?h:0})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"DNA",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:n?f:"???"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:n?C:"???"})]})}),!!n&&!!N&&(0,o.createComponentVNode)(2,a.Section,{title:"Diseases",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.stage,"/",e.maxstage]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cure})]},e.name)}))]})})],0)}},p=function(){return(0,o.createComponentVNode)(2,a.Section,{align:"center",fill:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},h=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},f=function(e,t){var n=e.configuration_data,r=e.module_ref,c=Object.keys(n);return(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[c.map((function(e){var t=n[e];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,s,{name:e,display_name:t.display_name,type:t.type,value:t.value,values:t.values,module_ref:r})},t.key)})),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:e.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},C=function(e){switch(e){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.malfunctioning,u=i.locked,s=i.open,m=i.selected_module,p=i.complexity,h=i.complexity_max,f=i.wearer_name,C=i.wearer_job,N=d?"Malfunctioning":l?"Active":"Inactive";return(0,o.createComponentVNode)(2,a.Section,{title:"Parameters",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l?"Deactivate":"Activate",onClick:function(){return c("activate")}}),children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock-open":"lock",content:u?"Unlock":"Lock",onClick:function(){return c("lock")}}),children:u?"Locked":"Unlocked"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover",children:s?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected Module",children:m||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[p," (",h,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:[f,", ",C]})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.active,c.control),l=c.helmet,d=c.chestplate,u=c.gauntlets,s=c.boots,m=c.core,p=c.charge;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:[(0,o.createComponentVNode)(2,a.Collapsible,{title:"Parts",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Control Unit",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:l||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestplate",children:d||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",children:u||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",children:s||"None"})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Type",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/100,content:p+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},V=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.active,l=c.modules.filter((function(e){return!!e.id}));return(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==l.length&&l.map((function(e){var t=m[e.id];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[!i&&(0,o.createComponentVNode)(2,h),(0,o.normalizeProps)((0,o.createComponentVNode)(2,t,Object.assign({},e,{active:i})))]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.complexity_max,d=i.modules,u=(0,r.useLocalState)(t,"module_configuration",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Modules",fill:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:e.module_name,children:(0,o.createComponentVNode)(2,a.Section,{children:[s===e.ref&&(0,o.createComponentVNode)(2,f,{configuration_data:e.configuration_data,module_ref:e.ref,onExit:function(){return m(null)}}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.module_complexity,"/",l]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.idle_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.active_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.use_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.cooldown>0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:C(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return m(e.ref)},icon:"cog",selected:s===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===e.configuration_data.length}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,o.createComponentVNode)(2,a.Box,{children:e.description})]})})},e.ref)}))||(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Modules Detected"})})})})},v=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.ui_theme,c.interface_break);return(0,o.createComponentVNode)(2,a.Section,{children:!!i&&(0,o.createComponentVNode)(2,p)||(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,N)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,b)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,g)})]})})};t.MODsuitContent=v;t.MODsuit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),i=a.ui_theme,l=a.interface_break;return(0,o.createComponentVNode)(2,c.Window,{theme:i,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!l,children:(0,o.createComponentVNode)(2,v)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MagnetController=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(29),d=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]);t.MagnetController=function(e,t){var n=(0,a.useBackend)(t),u=n.act,s=n.data,m=s.autolink,p=s.code,h=s.frequency,f=s.linkedMagnets,C=s.magnetConfiguration,N=s.path,b=s.pathPosition,V=s.probing,g=s.powerState,v=s.speed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!m&&(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Probe",icon:V?"spinner":"sync",iconSpin:!!V,disabled:V,onClick:function(){return u("probe_magnets")}}),title:"Magnet Linking",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:(0,r.toFixed)(h/10,1)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",children:p})]})}),(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{icon:g?"power-off":"times",content:g?"On":"Off",selected:g,onClick:function(){return u("toggle_power")}}),title:"Controller Configuration",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:v.value,minValue:v.min,maxValue:v.max,onChange:function(e,t){return u("set_speed",{speed:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Path",children:[Array.from(d.entries()).map((function(e){var t=e[0],n=e[1],r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button,{icon:r,tooltip:a,onClick:function(){return u("path_add",{code:t})}},t)})),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){return u("path_clear")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){return(0,l.modalOpen)(t,"path_custom_input")}}),(0,o.createComponentVNode)(2,c.BlockQuote,{children:N.map((function(e,t){var n=d.get(e)||{icon:"question"},r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button.Confirm,{selected:t+2===b,icon:r,confirmIcon:r,confirmContent:"",tooltip:a,onClick:function(){return u("path_remove",{index:t+1,code:e})}},t)}))})]})]})}),f.map((function(e,t){var n=e.uid,r=e.powerState,a=e.electricityLevel,i=e.magneticField;return(0,o.createComponentVNode)(2,c.Section,{title:"Magnet #"+(t+1)+" Configuration",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:r?"power-off":"times",content:r?"On":"Off",selected:r,onClick:function(){return u("toggle_magnet_power",{id:n})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Move Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:a,minValue:C.electricityLevel.min,maxValue:C.electricityLevel.max,onChange:function(e,t){return u("set_electricity_level",{id:n,electricityLevel:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Field Size",children:(0,o.createComponentVNode)(2,c.Slider,{value:i,minValue:C.magneticField.min,maxValue:C.magneticField.max,onChange:function(e,t){return u("set_magnetic_field",{id:n,magneticField:t})}})})]})},n)}))]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell,s=d&&d.name;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(12),n(1)),a=n(2),c=n(3),i=n(20);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return s.length?(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,i.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,i.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(29),l=n(34),d=n(3),u=n(123),s=n(124),m=n(169),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},h={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},f=function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,r=(0,a.useBackend)(t).data,l=r.loginState,p=r.screen;return l.logged_in?(2===p?n=(0,o.createComponentVNode)(2,C):3===p?n=(0,o.createComponentVNode)(2,N):4===p?n=(0,o.createComponentVNode)(2,b):5===p?n=(0,o.createComponentVNode)(2,v):6===p&&(n=(0,o.createComponentVNode)(2,_)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,k),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.records,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],p=(0,a.useLocalState)(t,"sortId","name"),f=p[0],C=(p[1],(0,a.useLocalState)(t,"sortOrder",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){return i("screen",{screen:3})}})}),(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Physical Status, or Mental Status",width:"100%",onInput:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,y,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,y,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,y,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,y,{id:"p_stat",children:"Patient Status"}),(0,o.createComponentVNode)(2,y,{id:"m_stat",children:"Mental Status"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.p_stat+"|"+e.m_stat}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listRow--"+h[e.p_stat],onClick:function(){return i("view_record",{view_record:e.ref})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.p_stat}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.m_stat})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all_med_records")}})],0)},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.medical,d=i.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Record",ml:"0.5rem",onClick:function(){return r("print_record")}}),children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,c.Section,{title:"Medical Data",level:2,buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",onClick:function(){return r("del_med_record")}}),children:(0,o.createComponentVNode)(2,g)})],4)},V=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,c.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return f(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return f(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,i.modalOpen)(t,"add_comment")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return r("del_comment",{del_comment:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return r("new_med_record")}})]})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.virus,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],h=(0,a.useLocalState)(t,"sortId2","name"),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sortOrder2",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, Max Stages, or Severity",width:"100%",onInput:function(e,t){return m(t)}})})}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,x,{id:"max_stages",children:"Max Stages"}),(0,o.createComponentVNode)(2,x,{id:"severity",children:"Severity"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.max_stages+"|"+e.severity}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listVirus--"+e.severity,onClick:function(){return i("vir",{vir:e.D})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"virus"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.max_stages}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:p[e.severity],children:e.severity})]},e.id)}))]})})]})},_=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.medbots);return 0===r.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"There are no Medibots."}):(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Chemicals"})]}),r.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listMedbot--"+e.on,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"medical"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.on?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,c.Box,{color:"average",children:"Offline"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer"})]},e.id)}))]})})})},y=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e,t){var n=(0,a.useLocalState)(t,"sortId2","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder2",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},k=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){r("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:5===l,onClick:function(){r("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:6===l,onClick:function(){return r("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"plus-square"}),"Medibot Tracking"]}),3===l&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wrench"}),"Record Maintenance"]}),4===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Severity",color:p[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MerchVendor=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productImage,u=e.productCategory,s=i.user_money;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{disabled:l.price>s,icon:"shopping-cart",content:l.price,textAlign:"left",onClick:function(){return c("purchase",{name:l.name,category:u})}})})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1)[0],i=n.products,d=n.imagelist,u=["apparel","toy","decoration"];return(0,o.createComponentVNode)(2,a.Table,{children:i[u[c]].map((function(e){return(0,o.createComponentVNode)(2,l,{product:e,productImage:d[e.path],productCategory:u[c]},e.name)}))})};t.MerchVendor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.user_cash,p=s.inserted_cash;return(0,o.createComponentVNode)(2,i.Window,{title:"Merch Computer",resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[(0,o.createComponentVNode)(2,a.Box,{m:2,children:"Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives."}),null!==m&&(0,o.createComponentVNode)(2,a.Box,{children:["Your balance is ",(0,o.createVNode)(1,"b",null,[m||0,(0,o.createTextVNode)(" credits")],0),"."]}),(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Box,{color:"light-grey",children:["There is ",(0,o.createVNode)(1,"b",null,p,0)," credits inserted."]})}),(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return l("change")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})]})})};var u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1),i=c[0],l=c[1];n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:"Toys"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:"Decorations"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3),l=["title","items"];var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_id,d=i.id;return(0,o.createComponentVNode)(2,c.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",d.name,".",(0,o.createVNode)(1,"br"),"You have ",d.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,c.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},s=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.has_id,u=i.id,s=i.items,m=(0,a.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,a.useLocalState)(t,"sort","Alphabetical")),C=f[0],N=(f[1],(0,a.useLocalState)(t,"descending",!1)),b=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),g=!1,v=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=l&&u.points>=e[1].price,e[1]})).sort(d[C]);if(0!==n.length)return b&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Section,{children:g?v:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No items matching your criteria was found!"})})})},m=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),i=(0,a.useLocalState)(t,"sort",""),l=(i[0],i[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,d=e.title,u=e.items,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Collapsible,Object.assign({open:!0,title:d},s,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,c.Button,{disabled:!i.has_id||i.id.points0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+l+'"':"\u0412\u0441\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438",fill:!0,children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"100%",width:"100%",display:"inline-block",children:a.filter((function(e){return e.name&&(!(l.length>0)||(e.name.toLowerCase().includes(l.toLowerCase())||e.desc.toLowerCase().includes(l.toLowerCase())||e.author.toLowerCase().includes(l.toLowerCase())))})).map((function(e){return(0,o.createComponentVNode)(2,c.Collapsible,{title:e.name,children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0410\u0432\u0442\u043e\u0440\u044b",children:e.author}),(0,o.createComponentVNode)(2,c.Section,{title:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",children:e.desc})]},e.name)}))})})})]})};t.ModpacksListContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NTRecruiter=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.NTRecruiter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.gamestatus,s=d.cand_name,m=d.cand_gender,p=d.cand_age,h=d.cand_species,f=d.cand_planet,C=d.cand_job,N=d.cand_records,b=d.cand_curriculum,V=d.total_curriculums,g=d.reason;return 0===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"31px",color:"white",pb:"10px",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]}),(0,o.createComponentVNode)(2,a.Button,{mt:"50px",textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return l("start_game")}}),(0,o.createComponentVNode)(2,a.Button,{mt:"10px",textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return l("instructions")}})]})})}):1===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{color:"grey",title:"Guide",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss"," ",(0,o.createVNode)(1,"b",null,V,0)," candidates, one wrongly made choice leads to a game over."]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"3#",color:"silver",children:[(0,o.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,o.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"7#",color:"silver",children:["Pay attention to ",(0,o.createVNode)(1,"b",null,"typos",16)," and ",(0,o.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for ",(0,o.createVNode)(1,"b",null,"jobs",16)," that they"," ",(0,o.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,o.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]})]})})})}):2===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",b]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Name",color:"silver",children:(0,o.createVNode)(1,"b",null,s,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Gender",color:"silver",children:(0,o.createVNode)(1,"b",null,m,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Age",color:"silver",children:(0,o.createVNode)(1,"b",null,p,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Species",color:"silver",children:(0,o.createVNode)(1,"b",null,h,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Planet of Origin",color:"silver",children:(0,o.createVNode)(1,"b",null,f,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Requested Job",color:"silver",children:(0,o.createVNode)(1,"b",null,C,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Employment Records",color:"silver",children:(0,o.createVNode)(1,"b",null,N,0)})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Stamp the application!",color:"grey",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{float:"right",color:"green",content:"Hire",fontSize:"150%",width:"49%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return l("hire")}}),(0,o.createComponentVNode)(2,a.Button,{float:"left",color:"red",content:"Dismiss",fontSize:"150%",width:"49%",icon:"ban",lineHeight:4.5,onClick:function(){return l("dismiss")}})]})]})}):3===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"15px",color:"label",textAlign:"center",children:g}),(0,o.createComponentVNode)(2,a.Flex.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",b-1,"/",V]}),(0,o.createComponentVNode)(2,a.Flex.Item,{pt:"20px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:2,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}})})]})})}):void 0}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(44),l=n(3),d=n(29),u=n(169),s=["icon","iconSpin","selected","security","onClick","title","children"],m=["name"];function p(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var h=["security","engineering","medical","science","service","supply"],f={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,i=(0,a.useBackend)(t),s=i.act,m=i.data,p=m.is_security,h=m.is_admin,f=m.is_silent,V=m.is_printing,g=m.screen,_=m.channels,y=m.channel_idx,x=void 0===y?-1:y,k=(0,a.useLocalState)(t,"menuOpen",!1),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"viewingPhoto",""),S=B[0],I=(B[1],(0,a.useLocalState)(t,"censorMode",!1)),T=I[0],A=I[1];0===g||2===g?n=(0,o.createComponentVNode)(2,N):1===g&&(n=(0,o.createComponentVNode)(2,b));var E=_.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:p&&"security",children:[S?(0,o.createComponentVNode)(2,v):(0,o.createComponentVNode)(2,d.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",L&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,C,{icon:"bars",title:"Toggle Menu",onClick:function(){return w(!L)}}),(0,o.createComponentVNode)(2,C,{icon:"newspaper",title:"Headlines",selected:0===g,onClick:function(){return s("headlines")},children:E>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:E>=10?"9+":E})}),(0,o.createComponentVNode)(2,C,{icon:"briefcase",title:"Job Openings",selected:1===g,onClick:function(){return s("jobs")}}),(0,o.createComponentVNode)(2,c.Divider)]}),(0,o.createComponentVNode)(2,c.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:_.map((function(e){return(0,o.createComponentVNode)(2,C,{icon:e.icon,title:e.name,selected:2===g&&_[x-1]===e,onClick:function(){return s("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,c.Divider),(!!p||!!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,C,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,C,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return A(!T)}}),(0,o.createComponentVNode)(2,c.Divider)],4),(0,o.createComponentVNode)(2,C,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,C,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,d.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,c.Divider),(0,o.createComponentVNode)(2,C,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return s("print_newspaper")}}),(0,o.createComponentVNode)(2,C,{icon:f?"volume-mute":"volume-up",title:"Mute: "+(f?"On":"Off"),onClick:function(){return s("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,u.TemporaryNotice),n]})]})})]})};var C=function(e,t){(0,a.useBackend)(t).act;var n=e.icon,i=void 0===n?"":n,l=e.iconSpin,d=e.selected,u=void 0!==d&&d,m=e.security,h=void 0!==m&&m,f=e.onClick,C=e.title,N=e.children,b=p(e,s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",u&&"Newscaster__menuButton--selected",h&&"Newscaster__menuButton--security"]),onClick:f},b,{children:[u&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,c.Icon,{name:i,spin:l,size:"2"}),(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--title",children:C}),N]})))},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,u=i.is_admin,s=i.channel_idx,m=i.channel_can_manage,p=i.channels,h=i.stories,f=i.wanted,C=(0,a.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,a.useLocalState)(t,"censorMode",!1)),g=b[0],v=(b[1],2===l&&s>-1?p[s-1]:null);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,V,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,V,{story:e},e)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([g&&(0,o.createComponentVNode)(2,c.Button,{disabled:!!v.admin&&!u,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!m,icon:"cog",content:"Manage",onClick:function(){return(0,d.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),!!u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ckey",children:v.author_ckey}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},b=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.jobs,d=i.wanted,u=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!d&&(0,o.createComponentVNode)(2,V,{story:d,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:u>0?h.map((function(e){return Object.assign({},f[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},V=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=e.story,s=e.wanted,m=void 0!==s&&s,p=d.is_admin,h=(0,a.useLocalState)(t,"fullStories",[]),f=h[0],C=h[1],N=(0,a.useLocalState)(t,"censorMode",!1),b=N[0];N[1];return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__story",m&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&u.censor_flags?"[REDACTED]":u.title)||"News from "+u.author],0),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[!m&&b&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,o.createComponentVNode)(2,c.Button,{enabled:2&u.censor_flags,icon:2&u.censor_flags?"comment-slash":"comment",content:2&u.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:u.uid})}})}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",u.author," |\xa0",!!p&&(0,o.createFragment)([(0,o.createTextVNode)("ckey: "),u.author_ckey,(0,o.createTextVNode)(" |\xa0")],0),!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),u.view_count.toLocaleString(),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("|\xa0")],0),(0,o.createComponentVNode)(2,c.Icon,{name:"clock"})," ",(0,i.timeAgo)(u.publish_time,d.world_time)]})]})}),children:(0,o.createComponentVNode)(2,c.Box,{children:2&u.censor_flags?"[REDACTED]":(0,o.createFragment)([!!u.has_photo&&(0,o.createComponentVNode)(2,g,{name:"story_photo_"+u.uid+".png",float:"right",ml:"0.5rem"}),(u.body_short||u.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),u.body_short&&(0,o.createComponentVNode)(2,c.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return C([].concat(f,[u.uid]))}}),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})],0)})})},g=function(e,t){var n=e.name,r=p(e,m),i=(0,a.useLocalState)(t,"viewingPhoto",""),l=(i[0],i[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},v=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})},_=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||i){var l="manage_channel"===e.id,u=!!e.args.is_admin,s=e.args.scanned_user,m=(0,a.useLocalState)(t,"author",(null==i?void 0:i.author)||s||"Unknown"),p=m[0],h=m[1],f=(0,a.useLocalState)(t,"name",(null==i?void 0:i.name)||""),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"description",(null==i?void 0:i.description)||""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"icon",(null==i?void 0:i.icon)||"newspaper"),_=v[0],y=v[1],x=(0,a.useLocalState)(t,"isPublic",!!l&&!(null==i||!i["public"])),k=x[0],L=x[1],w=(0,a.useLocalState)(t,"adminLocked",1===(null==i?void 0:i.admin)||!1),B=w[0],S=w[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+i.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!u,width:"100%",value:p,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return N(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:V,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,c.Input,{disabled:!u,value:_,width:"35%",mr:"0.5rem",onInput:function(e,t){return y(t)}}),(0,o.createComponentVNode)(2,c.Icon,{name:_,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,c.Button,{selected:k,icon:k?"toggle-on":"toggle-off",content:k?"Yes":"No",onClick:function(){return L(!k)}})}),u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:B,icon:B?"lock":"lock-open",content:B?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return S(!B)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===p.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:p,name:C.substr(0,49),description:V.substr(0,128),icon:_,"public":k?1:0,admin_locked:B?1:0}),(0,a.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,d.modalClose)(t)};(0,d.modalRegisterBodyOverride)("create_channel",_),(0,d.modalRegisterBodyOverride)("manage_channel",_),(0,d.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.channels,s=i.channel_idx,m=void 0===s?-1:s,p=!!e.args.is_admin,h=e.args.scanned_user,f=u.slice().sort((function(e,t){if(m<0)return 0;var n=u[m-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return p||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,a.useLocalState)(t,"author",h||"Unknown"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],_=V[1],y=(0,a.useLocalState)(t,"title",""),x=y[0],k=y[1],L=(0,a.useLocalState)(t,"body",""),w=L[0],B=L[1],S=(0,a.useLocalState)(t,"adminLocked",!1),I=S[0],T=S[1];return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!p,width:"100%",value:N,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return _(e)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Divider),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:x,onInput:function(e,t){return k(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:w,onInput:function(e,t){return B(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,title:x,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"}),w.split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})]})})}),p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:I,icon:I?"lock":"lock-open",content:I?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return T(!I)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===N.trim().length||0===v.trim().length||0===x.trim().length||0===w.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,"create_story","",{author:N,channel:v,title:x.substr(0,127),body:w.substr(0,1023),admin_locked:I?1:0}),(0,a.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,d.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.wanted,s=!!e.args.is_admin,m=e.args.scanned_user,p=(0,a.useLocalState)(t,"author",(null==u?void 0:u.author)||m||"Unknown"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"name",(null==u?void 0:u.title.substr(8))||""),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"description",(null==u?void 0:u.body)||""),v=V[0],_=V[1],y=(0,a.useLocalState)(t,"adminLocked",1===(null==u?void 0:u.admin_locked)||!1),x=y[0],k=y[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!s,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",value:N,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return _(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:x,icon:x?"lock":"lock-open",content:x?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return k(!x)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!u,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,d.modalClose)(t),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===h.trim().length||0===N.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:h,name:N.substr(0,127),description:v.substr(0,511),admin_locked:x?1:0}),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return i("auth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return i("code")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){return i("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return i("set_time")}})})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return i("toggle_safety")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,a.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return i("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return i("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(12),a=n(1),c=n(3),i=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,i.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.verbose,d=c.health,u=c.healthAlarm,s=c.oxy,m=c.oxyAlarm,p=c.crit;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,i.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:u,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:m,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},p=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(u),a=o.match(u);return r&&a&&n.replace(u,"")===o.replace(u,"")?parseInt(r[1],10)-parseInt(a[1],10):m(n,o)},h=function(e,t){var n=e.searchText,r=e.source,a=e.title,i=e.color,l=e.sorted,d=r.filter(s(n));return l&&d.sort(p),r.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:a+" - ("+r.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,f,{thing:e,color:i},e.name)}))})},f=function(e,t){var n=(0,a.useBackend)(t).act,r=e.color,i=e.thing;return(0,o.createComponentVNode)(2,c.Button,{color:r,onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,a.useBackend)(t),d=r.act,u=r.data,C=u.alive,N=u.antagonists,b=u.highlights,V=u.response_teams,g=(u.auto_observe,u.dead),v=u.ghosts,_=u.misc,y=u.npcs,x=(0,a.useLocalState)(t,"searchText",""),k=x[0],L=x[1],w={},B=l(N);!(n=B()).done;){var S=n.value;w[S.antag]===undefined&&(w[S.antag]=[]),w[S.antag].push(S)}var I=Object.entries(w);I.sort((function(e,t){return m(e[0],t[0])}));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:k,onInput:function(e,t){return L(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[I.map((function(e){return e[0],e[1]})),b,C,v,g,y,_];t0&&(0,o.createComponentVNode)(2,c.Section,{title:"Antagonists",children:I.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,c.Section,{title:t+" - ("+n.length+")",level:2,children:n.filter(s(k)).sort(p).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),b.length>0&&(0,o.createComponentVNode)(2,h,{title:"Highlights",source:b,searchText:k,color:"teal"}),(0,o.createComponentVNode)(2,h,{title:"Response Teams",source:V,searchText:k,color:"purple"}),(0,o.createComponentVNode)(2,h,{title:"Alive",source:C,searchText:k,color:"good"}),(0,o.createComponentVNode)(2,h,{title:"Ghosts",source:v,searchText:k,color:"grey"}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:g,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:y,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:_,searchText:k,sorted:!1})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"43%"}),(0,o.createComponentVNode)(2,s,{height:"57%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.id,u=i.points,s=i.disk,m=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({},m,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID card",children:d?(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:d.name,tooltip:"Ejects the ID card.",onClick:function(){return c("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return c("insert_id")}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.points)})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.total_points)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed Points",color:u>0?"good":"grey",bold:u>0&&"good",children:l(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"hand-holding-usd",content:"Claim",onClick:function(){return c("claim")}})})]}),(0,o.createComponentVNode)(2,a.Divider),s?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,icon:"eject",content:s.name,tooltip:"Ejects the design disk.",onClick:function(){return c("eject_disk")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,a.Box,{color:s.design&&(s.compatible?"good":"bad"),children:s.design||"N/A"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!s.design||!s.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return c("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.sheets),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,p,{ore:e},e.id)}))]})))},s=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.alloys),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,a.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)}))]})})},p=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore;if(!(c.value&&c.amount<=0)||["$metal","$glass"].indexOf(c.id)>-1){var i=c.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+i+".png",verticalAlign:"middle",ml:"0rem"}),c.name]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",color:c.amount>=1?"good":"gray",bold:c.amount>=1,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:c.value}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.ore,l=i.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,c.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:i.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",textAlign:"middle",color:i.amount>=1?"good":"gray",align:"center",children:i.description}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"10%",textAlign:"center",color:i.amount>=1?"good":"gray",bold:i.amount>=1,align:"center",children:i.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(i.amount,50),stepPixelSize:6,onChange:function(e,t){return n(i.value?"sheet":"alloy",{id:i.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(626);t.PAI=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.app_template,m=u.app_icon,p=u.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(s);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m,mr:1}),p,"pai_main_menu"!==s&&(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return d("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_atmosphere.js":627,"./pai_bioscan.js":628,"./pai_directives.js":629,"./pai_doorjack.js":630,"./pai_main_menu.js":631,"./pai_manifest.js":632,"./pai_medrecords.js":633,"./pai_messenger.js":634,"./pai_radio.js":635,"./pai_secrecords.js":636,"./pai_signaler.js":637};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=626},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),a=n(229);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.AtmosScan,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),a=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.app_data),i=c.holder,l=c.dead,d=c.health,u=c.brute,s=c.oxy,m=c.tox,p=c.burn;c.temp;return i?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"green",children:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"red",children:u})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),a=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.master,d=i.dna,u=i.prime,s=i.supplemental;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master",children:l?l+" ("+d+")":"None"}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return c("getdna")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prime Directive",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplemental Directives",children:s||"None"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),a=n(2);t.pai_doorjack=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data.app_data,u=d.cable,s=d.machine,m=d.inprogress,p=d.progress;d.aborted;return n=s?(0,o.createComponentVNode)(2,a.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,a.Button,{content:u?"Extended":"Retracted",color:u?"orange":null,onClick:function(){return l("cable")}}),s&&(c=(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[67,Infinity],average:[33,67],bad:[-Infinity,33]},value:p,maxValue:100}),m?(0,o.createComponentVNode)(2,a.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cable",children:n}),c]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),a=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.available_software,d=i.installed_software,u=i.installed_toggles,s=i.available_ram,m=i.emotions,p=i.current_emotion,h=i.speech_verbs,f=i.current_speech_verb,C=i.available_chassises,N=i.current_chassis,b=[];return d.map((function(e){return b[e.key]=e.name})),u.map((function(e){return b[e.key]=e.name})),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available RAM",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!b[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>s,onClick:function(){return c("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!b[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Software",children:[d.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,onClick:function(){return c("startSoftware",{software_key:e.key})}},e.key)})),0===d.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Toggles",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return c("setToggle",{toggle_key:e.key})}},e.key)})),0===u.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Emotion",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.id===p,onClick:function(){return c("setEmotion",{emotion:e.id})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Speaking State",children:h.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.name===f,onClick:function(){return c("setSpeechStyle",{speech_state:e.name})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Chassis Type",children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.icon===N,onClick:function(){return c("setChassis",{chassis_to_change:e.icon})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.CrewManifest,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),a=n(230);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return c.app_data.active_convo?(0,o.createComponentVNode)(2,a.ActiveConversation,{data:c.app_data}):(0,o.createComponentVNode)(2,a.MessengerList,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),a=n(12),c=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.app_data,d=l.minFrequency,u=l.maxFrequency,s=l.frequency,m=l.broadcasting;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,a.toFixed)(e,1)},onChange:function(e,t){return i("freq",{freq:t})}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return i("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return i("toggleBroadcast")},selected:m,content:m?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),a=n(170);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Signaler,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(639);t.PDA=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data),m=s.app;if(!s.owner)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var p=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(m.template);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m.icon,mr:1}),m.name]}),p:1,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.idInserted,d=i.idLink,u=i.stationTime,s=i.cartridge_name;return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",color:"transparent",onClick:function(){return c("Authenticate")},content:d})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),s?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sd-card",color:"transparent",onClick:function(){return c("Eject")},content:"Eject "+s})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:u})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app;return(0,o.createComponentVNode)(2,a.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return c("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){c("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":640,"./pda_janitor.js":641,"./pda_main_menu.js":642,"./pda_manifest.js":643,"./pda_medical.js":644,"./pda_messenger.js":230,"./pda_mob_hunt.js":645,"./pda_mule.js":646,"./pda_nanobank.js":647,"./pda_notes.js":648,"./pda_power.js":649,"./pda_secbot.js":650,"./pda_security.js":651,"./pda_signaler.js":652,"./pda_status_display.js":653,"./pda_supplyrecords.js":654};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=639},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),a=n(229);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.janitor),i=c.user_loc,l=c.mops,d=c.buckets,u=c.cleanbots,s=c.carts;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:[i.x,",",i.y]}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Bucket Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cleanbot Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(12),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.owner,d=i.ownjob,u=i.idInserted,s=i.categories,m=i.pai,p=i.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return c("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=i.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.uid in p?e.notify_icon:e.icon,iconSpin:e.uid in p,color:e.uid in p?"red":"transparent",content:e.name,onClick:function(){return c("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return c("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return c("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),a=n(127);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.wild_captures,u=i.no_collection,s=i.entry;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return c("Disconnect")}})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return c("Reconnect")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Wild Captures",children:d})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,a.Box,{children:!u&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return c("Prev")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Next",icon:"arrow-right",onClick:function(){return c("Next")}})]})}),children:u?"Your collection is empty! Go capture some Nano-Mobs!":s?(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:s.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[s.nickname&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nickname",children:s.nickname}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.real_name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:s.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Type",children:s.type1}),s.type2&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Type",children:s.type2}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return c("Transfer")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Release",icon:"arrow-up",onClick:function(){return c("Release")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return c("Rename")}}),!!s.is_hacked&&(0,o.createComponentVNode)(2,a.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return c("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,a.Box,{children:l?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.mulebot.bots.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.Name,icon:"cog",onClick:function(){return c("control",{bot:e.uid})}})},e.Name)}))},i=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.mulebot,d=l.botstatus,u=l.active,s=d.mode,m=d.loca,p=d.load,h=d.powr,f=d.dest,C=d.home,N=d.retn,b=d.pick;switch(s){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=s}return(0,o.createComponentVNode)(2,a.Section,{title:u,children:[-1===s&&(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,a.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return i("target")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,a.Button,{content:p?p+" (Unload)":"None",disabled:!p,onClick:function(){return i("unload")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,a.Button,{content:b?"Yes":"No",selected:b,onClick:function(){return i("set_pickup_type",{autopick:b?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return i("set_auto_return",{autoret:N?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Stop",icon:"stop",onClick:function(){return i("stop")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Proceed",icon:"play",onClick:function(){return i("start")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Return Home",icon:"home",onClick:function(){return i("home")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_nanobank=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34);t.pda_nanobank=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.logged_in,u=r.owner_name,s=r.money;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Name",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:["$",s]})]})}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})],4):(0,o.createComponentVNode)(2,p)};var l=function(e,t){(0,a.useBackend)(t).data;var n=(0,a.useLocalState)(t,"tabIndex",1),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Tabs,{mt:2,children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transfers"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Account Actions"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transaction History"]})]})},d=function(e,t){var n=(0,a.useLocalState)(t,"tabIndex",1)[0];if(!(0,a.useBackend)(t).data.db_status)return(0,o.createComponentVNode)(2,c.Box,{children:"Account Database Connection Severed"});switch(n){case 1:return(0,o.createComponentVNode)(2,u);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},u=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.requests,s=d.available_accounts,m=d.money,p=(0,a.useLocalState)(t,"selectedAccount"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"transferAmount"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"searchText",""),g=V[0],v=V[1],_=[];return s.map((function(e){return _[e.name]=e.UID})),(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account",children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account name",onInput:function(e,t){return v(t)}}),(0,o.createComponentVNode)(2,c.Dropdown,{mt:.6,width:"190px",options:s.filter((0,r.createSearch)(g,(function(e){return e.name}))).map((function(e){return e.name})),selected:null==(n=s.filter((function(e){return e.UID===h}))[0])?void 0:n.name,onSelected:function(e){return f(_[e])}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Amount",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Up to 5000",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:m0&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Approved Orders",children:s>0&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(125);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.active,s=d.anchored,m=d.broken,p=d.emagged,h=d.fuel_type,f=d.fuel_usage,C=d.fuel_stored,N=d.fuel_cap,b=d.is_ai,V=d.tmp_current,g=d.tmp_max,v=d.tmp_overheat,_=d.output_max,y=d.power_gen,x=d.output_set,k=d.has_fuel,L=C/N,w=V/g,B=x*y,S=Math.round(C/f),I=Math.round(S/60),T=S>120?I+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(m||!s)&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[!!m&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator is malfunctioning!"}),!m&&!s&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!m&&!!s&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:u,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,a.NumberInput,{value:x,minValue:1,maxValue:_*(p?2.5:1),step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,i.formatPower)(B),")"]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:w,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[V," \u2103"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[v>50&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Temperature High"}),0===v&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||b||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:L,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(C/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel usage",children:[f/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(f?T:"N/A"),!k&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength,m=l.max_strength;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Control Panel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Connect",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",mb:"5px",children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Operational":"Error: Verify Configuration"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d||0===s,onClick:function(){return i("remove_strength")},mr:"4px"}),s,(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d||s===m,onClick:function(){return i("add_strength")},ml:"4px"})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PdaPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PdaPainter=function(e,t){var n=(0,r.useBackend)(t).data.has_pda;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:n?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Section,{height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"download",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.pda_colors;return(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"180px",mr:"3px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"65%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{className:"PdaPainter__list",children:Object.keys(i).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("choose_pda",{selectedPda:e})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+i[e][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e})]},e)}))})})})})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.current_appearance,d=i.preview_appearance;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current PDA",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return c("eject_pda")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return c("paint_pda")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Preview",children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.busy,m=u.category,p=u.display_craftable_only,h=u.display_compact,f=u.prev_cat,C=u.next_cat,N=u.subcategory,b=u.prev_subcat,V=u.next_subcat;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,a.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Show Craftable Only",icon:p?"check-square-o":"square-o",selected:p,onClick:function(){return d("toggle_recipes")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return d("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:f,icon:"arrow-left",onClick:function(){return d("backwardCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:C,icon:"arrow-right",onClick:function(){return d("forwardCat")}})]}),N&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:b,icon:"arrow-left",onClick:function(){return d("backwardSubCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:V,icon:"arrow-right",onClick:function(){return d("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Photocopier",color:"silver",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Copies",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{width:"2em",bold:!0,children:u.copynumber}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",content:"",onClick:function(){return d("minus")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",content:"",onClick:function(){return d("add")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toner",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:u.toner})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Document",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.copyitem&&!u.mob,content:u.copyitem?u.copyitem:u.mob?u.mob+"'s ass!":"document",onClick:function(){return d("removedocument")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Folder",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.folder,content:u.folder?u.folder:"folder",onClick:function(){return d("removefolder")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.issilicon;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){return c("copy")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){return c("scandocument")}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){return c("ai_text")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){return c("ai_pic")}})],4)],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Scanned Files",children:i.files.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:i.toner<=0,onClick:function(){return c("filecopy",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return c("deletefile",{uid:e.uid})}})]})},e.name)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier220=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(26),l=n(34),d=n(42),u=n(20);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne?this.substring(0,e)+"...":this};t.Photocopier220=function(e,t){for(var n,m=(0,r.useBackend)(t),p=m.act,h=m.data,f=h.copies,C=h.maxcopies,N=(0,r.useLocalState)(t,"searchText",""),b=N[0],V=N[1],g=function(e,t){void 0===t&&(t="");var n=(0,u.createSearch)(t,(function(e){return e.altername}));return(0,d.flow)([(0,i.filter)((function(e){return null==e?void 0:e.altername})),t&&(0,i.filter)(n),(0,i.sortBy)((function(e){return e.id}))])(e)}((0,i.sortBy)((function(e){return e.category}))(h.forms||[]),b),v=[],_=s(g);!(n=_()).done;){var y=n.value;v.includes(y.category)||v.push(y.category)}var x,k=(0,r.useLocalState)(t,"number",0);k[0],k[1];return x=""===h.category?g:g.filter((function(e){return e.category===h.category})),(0,o.createComponentVNode)(2,c.Window,{theme:h.ui_theme,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"40%",children:[(0,o.createComponentVNode)(2,a.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mt:.8,color:"grey",children:"\u0417\u0430\u0440\u044f\u0434 \u0442\u043e\u043d\u0435\u0440\u0430:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mt:.5,children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,maxValue:30,value:h.toner})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:2,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!h.copyitem&&!h.mob,icon:h.copyitem||h.mob?"eject":"times",content:h.copyitem?h.copyitem:h.mob?"\u0416\u043e\u043f\u0430 "+h.mob+"!":"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",onClick:function(){return p("removedocument")}})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!h.folder,icon:h.folder?"eject":"times",content:h.folder?h.folder:"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u043f\u0430\u043f\u043a\u0438",onClick:function(){return p("removefolder")}})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:0===h.toner||null===h.form,content:"\u041f\u0435\u0447\u0430\u0442\u044c",onClick:function(){return p("print_form")}})}),!!h.isAI&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",ml:"5px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:h.toner<5,content:"\u0424\u043e\u0442\u043e",tooltip:"\u0420\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0444\u043e\u0442\u043e \u0441 \u0411\u0430\u0437\u044b \u0414\u0430\u043d\u043d\u044b\u0445",tooltipPosition:"right",onClick:function(){return p("ai_pic")}})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041a\u043e\u043f\u0438\u044f",disabled:0===h.toner||!h.copyitem&&!h.mob,onClick:function(){return p("copy")}})}),!!h.isAI&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,width:"100%",ml:"5px",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043a\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0441\u0442",tooltipPosition:"right",disabled:0===h.toner,onClick:function(){return p("ai_text")}})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:4.5,mt:1.2,color:"grey",children:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e:"}),(0,o.createComponentVNode)(2,a.Slider,{mt:.75,animated:!0,minValue:1,maxValue:C,value:f,stepPixelSize:10,onChange:function(e,t){return p("copies",{"new":t})}})]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{className:"Layout__content--flexColumn",height:"330px",children:(0,o.createComponentVNode)(2,a.Section,{title:"\u0411\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u044f",flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,mt:.1,color:"grey",children:"\u0424\u043e\u0440\u043c\u0430:"}),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,children:""===h.form_id?"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430":h.form_id})]}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:2.1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mb:1,mt:.5,fluid:!0,icon:"chevron-right",content:"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",selected:!h.category,onClick:function(){return p("choose_category",{category:null})}})}),v.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mb:1,fluid:!0,icon:"chevron-right",content:e,selected:h.category===e,onClick:function(){return p("choose_category",{category:e})}},e)},e)}))]})]})})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"60%",className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:h.category||"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Input,{fluid:!0,placeholder:"\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u0440\u043c\u044b",onInput:function(e,t){return V(t)}}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:1.6,wrap:"wrap",children:x.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mb:1,fluid:!0,content:e.altername.trimLongStr(37),selected:h.form_id===e.id,onClick:function(){return p("choose_form",{path:e.path,id:e.id})}},e.path)},e.path)}))})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=["tempKey"];var l={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},d=function(e,t){var n=e.tempKey,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),d=l[n];if(!d)return null;var u=(0,r.useBackend)(t),s=u.data,m=u.act,p=s.currentTemp,h=d.label,f=d.icon,C=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({selected:C,onClick:function(){m("setTemp",{temp:n})}},c,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:f}),h]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,i=n.emagged,u=n.currentTemp,s=l[u]||l.normal,m=s.label,p=s.color,h=[],f=0,C=Object.entries(l);f0?"envelope-open-text":"envelope",onClick:function(){return i("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return i("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Supplies",icon:"box",onClick:function(){return i("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return i("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return i("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return i("setScreen",{setScreen:10})}})})]}),!!u&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return i("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:s?"Speaker Off":"Speaker On",selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return i("toggleSilent")}})})]})},l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.department,u=[];switch(e.purpose){case"ASSISTANCE":u=l.assist_dept,n="Request assistance from another department";break;case"SUPPLIES":u=l.supply_dept,n="Request supplies from another department";break;case"INFO":u=l.info_dept,n="Relay information to another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Message",icon:"envelope",onClick:function(){return i("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return i("writeInput",{write:e,priority:2})}})]},e)}))})})},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act;c.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data;switch(e.type){case"MESSAGES":n=d.message_log,c="Message Log";break;case"SHIPPING":n=d.shipping_log,c="Shipping label print log"}return(0,o.createComponentVNode)(2,a.Section,{title:c,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.map((function(e,t){return(0,o.createVNode)(1,"div",null,e,0,null,t)})),(0,o.createVNode)(1,"hr")]},e)}))})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.recipient,d=i.message,u=i.msgVerified,s=i.msgStamped;return(0,o.createComponentVNode)(2,a.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",color:"green",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stamped by",color:"blue",children:s})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return c("department",{department:l})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.message,d=i.announceAuth;return(0,o.createComponentVNode)(2,a.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return c("writeAnnouncement")}}),d?(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(d&&l),onClick:function(){return c("sendAnnouncement")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.shipDest,d=i.msgVerified,u=i.ship_dept;return(0,o.createComponentVNode)(2,a.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",children:d})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&d),onClick:function(){return c("printLabel")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,a.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return c("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),a=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,c=e.desc;return(0,o.createComponentVNode)(2,a.Box,{children:[t>0?(0,o.createComponentVNode)(2,a.Divider):null,(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,a.Box,{children:["* Summary: ",c]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83),l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;return l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_tech")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_tech")}}),(0,o.createComponentVNode)(2,s)]})]}):null},d=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;if(!l)return null;var d=l.name,u=l.lathe_types,m=l.materials,p=u.join(", ");return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Materials"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_design")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_design")}}),(0,o.createComponentVNode)(2,s)]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{submenu:i.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,s)]})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type;return l?(0,o.createComponentVNode)(2,a.Button,{content:"Eject Disk",icon:"eject",onClick:function(){i("tech"===l?"eject_tech":"eject_design")}}):null},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.disk_data,i=n.disk_type;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk Contents",children:function(){if(!c)return(0,o.createComponentVNode)(2,u);switch(i){case"design":return(0,o.createComponentVNode)(2,d);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type,d=c.to_copy;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){i("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,m)}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,p)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),a=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_item;return c.linked_destroy?l?(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,a.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){i("deconstruct")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject Item",icon:"eject",onClick:function(){i("eject_item")}})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,a.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.category,u=i.matching_designs,s=4===i.menu?"build":"imprint";return(0,o.createComponentVNode)(2,a.Section,{title:d,children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,a.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:u.map((function(e){var t=e.id,n=e.name,r=e.can_build,c=e.materials;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(s,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,a.Button,{content:"x5",onClick:function(){return l(s,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,a.Button,{content:"x10",onClick:function(){return l(s,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_chemicals,d=4===c.menu;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Purge All",icon:"trash",onClick:function(){i(d?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,a.Button,{content:"Purge",icon:"trash",onClick:function(){i(d?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.menu,u=i.categories,s=4===d?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,a.Section,{title:s+" Menu",children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,c.LatheSearch),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,c=n.total_materials,i=n.max_materials,l=n.max_chemicals,d=n.total_chemicals;return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,a.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c}),i?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+i}):null]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),l?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_materials;return(0,o.createComponentVNode)(2,a.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===c.menu?"lathe_ejectsheet":"imprinter_ejectsheet";i(n,{id:t,amount:e})},d=Math.floor(n/2e3),u=n<1,s=1===d?"":"s";return(0,o.createComponentVNode)(2,a.Table.Row,{className:u?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"110px",children:["(",d," sheet",s,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,a.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,a.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,a.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),a=n(232),c=n(63),i=n(2),l=n(83);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,d=n.menu,u=n.linked_lathe,s=n.linked_imprinter;return 4!==d||u?5!==d||s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,c.LatheMainMenu)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,c.LatheCategory)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,i.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,i.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),a=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",onChange:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,d=n.linked_destroy,u=n.linked_lathe,s=n.linked_imprinter,m=n.tech_levels;return(0,o.createComponentVNode)(2,a.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,a.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!l,menu:i.MENU.DISK,submenu:i.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!d,menu:i.MENU.DESTROY,submenu:i.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,menu:i.MENU.LATHE,submenu:i.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!s,menu:i.MENU.IMPRINTER,submenu:i.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{menu:i.MENU.SETTINGS,submenu:i.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(63),a=n(2),c=n(83);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==c.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:c.MENU.MAIN,submenu:c.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==c.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===c.MENU.LATHE||e===c.MENU.IMPRINTER},submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),a=n(2);t.RndNavButton=function(e,t){var n=e.icon,c=e.children,i=e.disabled,l=e.content,d=(0,r.useBackend)(t),u=d.data,s=d.act,m=u.menu,p=u.submenu,h=m,f=p;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,a.Button,{content:l,icon:n,disabled:i,onClick:function(){s("nav",{menu:h,submenu:f})},children:c})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,d=n.act,u=l.sync,s=l.admin,m=l.linked_destroy,p=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Sync Database with Network",icon:"sync",disabled:!u,onClick:function(){d("sync")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Connect to Research Network",icon:"plug",disabled:u,onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,content:"Device Linkage Menu",icon:"link",menu:i.MENU.SETTINGS,submenu:i.SUBMENU.SETTINGS_DEVICES}),1===s?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return d("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return d("find_device")}}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){d("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{title:(0,i.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,a.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_lock_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Lock Down",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",disabled:s,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return l("masslock",{})}})]}),(0,o.createComponentVNode)(2,i,{cyborgs:h,can_hack:u})]})})};var i=function(e,t){var n=e.cyborgs,c=(e.can_hack,(0,r.useBackend)(t)),i=c.act,l=c.data,d="Detonate";return l.detonate_cooldown>0&&(d+=" ("+l.detonate_cooldown+"s)"),n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return i("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return i("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:d,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){return i("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),s=u.dial,m=u.open;u.locked,u.contents;return(0,o.createComponentVNode)(2,c.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,a.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),m?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,a.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*s+"deg)","z-index":0}})]}),!m&&(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.dial,d=i.open,u=i.locked,s=function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:d||t&&!u,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return c(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:u,icon:d?"lock":"lock-open",content:d?"Close":"Open",mb:"0.5rem",onClick:function(){return c("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",children:[s(50),s(10),s(1)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[s(1,!0),s(10,!0),s(50,!0)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.contents;return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--contents",overflow:"auto",children:i.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{mb:"0.5rem",onClick:function(){return c("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,a.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.satellites,u=l.notice,s=l.meteor_shield,m=l.meteor_shield_coverage,p=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,a.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:h>=100?"good":"average",value:m,maxValue:p,children:[h," %"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,a.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return i("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(3),l=n(68),d=n(99);t.SecureStorage=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"securestorage",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),u=i.locked,m=i.no_passcode,p=i.emagged,h=i.user_entered_code,f=m?"":u?"bad":"good";return(0,o.createComponentVNode)(2,c.Section,{height:"100%",stretchContents:!0,onKeyDown:function(e){return function(e,t){var n=(0,a.useBackend)(t).act,o=window.event?e.which:e.keyCode;return o===d.KEY_ENTER?(e.preventDefault(),void n("keypad",{digit:"E"})):o===d.KEY_ESCAPE?(e.preventDefault(),void n("keypad",{digit:"C"})):o===d.KEY_BACKSPACE?(e.preventDefault(),void n("backspace")):o>=d.KEY_0&&o<=d.KEY_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_0})):o>=d.KEY_NUMPAD_0&&o<=d.KEY_NUMPAD_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_NUMPAD_0})):void 0}(e,t)},children:[(0,o.createComponentVNode)(2,c.Flex.Item,{height:"20%",mb:"5px",children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+f]),height:"100%",children:p?"ERROR":h})}),(0,o.createComponentVNode)(2,c.Table,{width:"1px",children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map((function(e){return(0,o.createComponentVNode)(2,l.TableRow,{children:e.map((function(e){return(0,o.createComponentVNode)(2,l.TableCell,{children:(0,o.createComponentVNode)(2,s,{number:e})},e)}))},e[0])}))})]})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=(n.data,e.number);return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:l,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,r.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+l]),onClick:function(){return i("keypad",{digit:l})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(3),d=n(29),u=n(123),s=n(124),m=n(169),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,d.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,a.useBackend)(t),i=(r.act,r.data),p=i.loginState,h=i.currentPage;return p.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,d.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.currentPage,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),2===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.records,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","name")),m=s[0],h=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,N,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,N,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"SecurityRecords__listRow--"+p[e.status],onClick:function(){return i("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.isPrinting,u=(0,a.useLocalState)(t,"searchText",""),s=(u[0],u[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,d.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return s(t)}})})]})},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.isPrinting,d=i.general,u=i.security;return d&&d.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,c.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:u.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,v)})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,d.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return i("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return i("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SeedExtractor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.stored_seeds,s=d.vend_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored Seeds",children:[(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createTextVNode)("Set Amount to be Vended:\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:s,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(e,t){return l("set_vend_amount",{vend_amount:t})}})],4),null!=u&&u.length?(0,o.createComponentVNode)(2,i):"No Seeds"]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.stored_seeds;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Stock"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),e.name,e.variant?" ("+e.variant+")":""]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Vend",icon:"arrow-circle-down",onClick:function(){return c("vend",{seedid:e.id,seedvariant:e.variant})}}),"\xa0(",e.amount," Left)"]})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(45);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:d.status?d.status:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!d.shuttle&&(!!d.docking_ports_len&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Send to ",children:d.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",content:e.name,onClick:function(){return l("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!d.admin_controlled&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!d.status,onClick:function(){return l("request")}})})],0))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),u=n[0],s=n[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.shuttles;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return c("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.templates_tabs,d=i.existing_shuttle,u=i.templates;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===d.id,icon:"file",content:e,onClick:function(){return c("select_template_category",{cat:e})}},e)}))}),!!d&&u[d.id].templates.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Load Template",icon:"download",onClick:function(){return c("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.existing_shuttle,d=i.selected;return(0,o.createComponentVNode)(2,a.Box,{children:[l?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: None"}),d?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: "+d.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),d.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:d.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",icon:"eye",onClick:function(){return c("preview",{shuttle_id:d.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",icon:"download",onClick:function(){return c("load",{shuttle_id:d.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var m=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return i("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",content:"Eject",onClick:function(){return i("ejectify")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.hasOccupant,d=i.isBeakerLoaded,u=i.beakerMaxSpace,s=i.beakerFreeSpace,m=i.dialysis&&s>0;return(0,o.createComponentVNode)(2,c.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!d||s<=0||!l,selected:m,icon:m?"toggle-on":"toggle-off",content:m?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!d,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:d?(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:s/u,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.occupant,d=i.chemicals,u=i.maxchem,s=i.amounts;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,c.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,c.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SlotMachine=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return null===d.money?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,a.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===d.plays?d.plays+" player has tried their luck today!":d.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.money})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"10 credits to spin",children:(0,o.createComponentVNode)(2,a.Button,{icon:"coins",disabled:d.working,content:d.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,lineHeight:2,color:d.resultlvl,children:d.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.secure,u=l.can_dry,s=l.drying,m=l.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return i("drying")}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:" No products loaded. "}),!!m&&m.slice().sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return i("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return i("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return i("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),c=n(125),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,h=d.inputLevel,f=d.inputLevelMax,C=d.inputAvailable,N=d.outputAttempt,b=d.outputting,V=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,_=(u>=100?"good":p&&"average")||"bad",y=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:_,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){return l("tryoutput")},children:N?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:y,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===V,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===V,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:V/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:V===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:V===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.generated,u=l.generated_ratio,s=l.tracking_state,m=l.tracking_rate,p=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,N=l.rotating_direction;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:p>0?"good":"bad",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[2===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Automated "}),1===s&&(0,o.createComponentVNode)(2,a.Box,{children:[" ",m,"\xb0/h (",N,")"," "]}),0===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[2!==s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return i("cdir",{cdir:t})}}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===s,onClick:function(){return i("track",{track:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===s,onClick:function(){return i("track",{track:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===s,disabled:!h,onClick:function(){return i("track",{track:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[1===s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("tdir",{tdir:t})}}),0===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Tracker offline "}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return i("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return i("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpecMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpecMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Hemomancer",onClick:function(){return c("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16),(0,o.createComponentVNode)(2,a.Button,{content:"Umbrae",onClick:function(){return c("umbrae")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Desecrated Duel",16),(0,o.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Gargantua",onClick:function(){return c("gargantua")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Dantalion",onClick:function(){return c("dantalion")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.helmet,u=i.suit,s=i.magboots,m=i.mask,p=i.storage,h=i.open,f=i.locked;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return c("cook")}}),(0,o.createComponentVNode)(2,a.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return c("toggle_lock")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.object),l=e.label,d=e.missingText,u=e.eject;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,a.Box,{my:.5,children:i?(0,o.createComponentVNode)(2,a.Button,{my:-1,icon:"eject",content:i,onClick:function(){return c(u)}}):(0,o.createComponentVNode)(2,a.Box,{color:"silver",bold:!0,children:["No ",d," found."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.open,d=i.locked;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:l?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:l?"times-circle":"expand",color:l?"red":"green",disabled:d,textAlign:"center",onClick:function(){return c("toggle_open")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(26),a=n(42),c=n(12),i=n(1),l=n(2),d=n(44),u=n(3);n(68);t.SupermatterMonitor=function(e,t){var n=(0,i.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p)};var s=function(e){return Math.log2(16+Math.max(0,e))-4},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.supermatter_id+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("view",{view:e.supermatter_id})}})})]},e.supermatter_id)}))})})})})},p=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,h=(p.active,p.SM_integrity),f=p.SM_power,C=p.SM_ambienttemp,N=p.SM_ambientpressure,b=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(p.gases||[]),V=Math.max.apply(Math,[1].concat(b.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:f,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(f)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(C),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(C)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(N),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(N)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return m("back")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:b.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:V,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),a=n(2),c=(n(45),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return i(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,a.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEG=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};t.TEG=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return d.error?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[d.error,(0,o.createComponentVNode)(2,a.Button,{icon:"circle",content:"Recheck",onClick:function(){return l("check")}})]})})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Cold Loop ("+d.cold_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Inlet",children:[i(d.cold_inlet_temp)," K,"," ",i(d.cold_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Outlet",children:[i(d.cold_outlet_temp)," K,"," ",i(d.cold_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hot Loop ("+d.hot_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Inlet",children:[i(d.hot_inlet_temp)," K,"," ",i(d.hot_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Outlet",children:[i(d.hot_outlet_temp)," K,"," ",i(d.hot_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Output",children:[i(d.output_power)," W",!!d.warning_switched&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!d.warning_cold_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!d.warning_hot_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TTSSeedsExplorerContent=t.TTSSeedsExplorer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={0:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},l={"\u041c\u0443\u0436\u0441\u043a\u043e\u0439":{icon:"mars",color:"blue"},"\u0416\u0435\u043d\u0441\u043a\u0438\u0439":{icon:"venus",color:"purple"},"\u041b\u044e\u0431\u043e\u0439":{icon:"venus-mars",color:"white"}},d=function(e,t,n,r){return void 0===r&&(r=null),e.map((function(e){var c,i=null!=(c=e[r])?c:e;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:t.includes(e),content:i,onClick:function(){t.includes(e)?n(t.filter((function(t){var n;return(null!=(n=t[r])?n:t)!==e}))):n([e].concat(t))}},i)}))};t.TTSSeedsExplorer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.providers,m=u.seeds,p=u.selected_seed,h=u.phrases,f=u.donator_level,C=m.map((function(e){return e.category})).filter((function(e,t,n){return n.indexOf(e)===t})),N=m.map((function(e){return e.gender})).filter((function(e,t,n){return n.indexOf(e)===t})),b=m.map((function(e){return e.required_donator_level})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return i[e]})),V=(0,r.useLocalState)(t,"selectedProviders",s),g=V[0],v=V[1],_=(0,r.useLocalState)(t,"selectedGenders",N),y=_[0],x=_[1],k=(0,r.useLocalState)(t,"selectedCategories",C),L=k[0],w=k[1],B=(0,r.useLocalState)(t,"selectedDonatorLevels",b),S=B[0],I=B[1],T=(0,r.useLocalState)(t,"selectedPhrase",h[0]),A=T[0],E=T[1],M=(0,r.useLocalState)(t,"searchtext",""),O=M[0],P=M[1],F=d(s,g,v,"name"),R=d(N,y,x),D=d(C,L,w),j=d(b,S,I),W=(0,o.createComponentVNode)(2,a.Dropdown,{options:h,selected:A.replace(/(.{25})..+/,"$1..."),width:"220px",onSelected:function(e){return E(e)}}),z=(0,o.createComponentVNode)(2,a.Input,{placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435...",fluid:!0,onInput:function(e,t){return P(t)}}),U=m.sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return n>o?1:n0&&p!==e.name?"orange":"white",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:p===e.name?.5:.25,textAlign:"left",children:e.category}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:p===e.name?"white":l[e.gender].color,textAlign:"left",children:(0,o.createComponentVNode)(2,a.Icon,{mx:1,size:1.2,name:l[e.gender].icon})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:e.required_donator_level>0&&(0,o.createFragment)([i[e.required_donator_level],(0,o.createComponentVNode)(2,a.Icon,{ml:1,mr:2,name:"coins"})],0)})]},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b",children:F}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u043b",children:R}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",children:D}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438",children:j}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:W}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u0438\u0441\u043a",children:z})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0413\u043e\u043b\u043e\u0441\u0430 ("+U.length+"/"+m.length+")",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{children:H})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.BlockQuote,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,o.createComponentVNode)(2,a.Box,{mt:2,italic:!0,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c Discord-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})],4)};t.TTSSeedsExplorerContent=u},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.records,s=void 0===u?[]:u,m=d.explosion_target,p=d.toxins_tech,h=d.printing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shift's Target",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Toxins Level",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print All Logs",disabled:!s.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!s.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),s.length?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Records"})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.records,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return c("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Tank=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return n=d.has_mask?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.connected?"check":"times",content:d.connected?"Internals On":"Internals Off",selected:d.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:d.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:d.ReleasePressure===d.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.releasePressure),width:"65px",unit:"kPa",minValue:d.minReleasePressure,maxValue:d.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:d.ReleasePressure===d.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:d.ReleasePressure===d.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.o_tanks,u=l.p_tanks;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Oxygen Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return i("oxygen")}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Plasma Tank ("+u+")",disabled:0===u,icon:"arrow-circle-down",onClick:function(){return i("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.ion),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[1===s&&(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,u);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(p)]})})};var i=function(){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.sectors_available,u=i.nttc_toggle_jobs,s=i.nttc_toggle_job_color,m=i.nttc_toggle_name_color,p=i.nttc_toggle_command_bold,h=i.nttc_job_indicator_type,f=i.nttc_setting_language,C=i.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return c("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"On":"Off",selected:u,icon:"user-tag",onClick:function(){return c("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:s?"On":"Off",selected:s,icon:"clipboard-list",onClick:function(){return c("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"user-tag",onClick:function(){return c("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){return c("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return c("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return c("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return c("network_id")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return c("import")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return c("export")}})]})],4)},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.link_password,d=i.relay_entries;return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return c("change_password")}})})}),(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Unlink"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",onClick:function(){return c("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.filtered_users;return(0,o.createComponentVNode)(2,a.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Add User",icon:"user-plus",onClick:function(){return c("add_filter")}}),children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"user-times",onClick:function(){return c("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.linked,m=u.active,p=u.network_id;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"power-off",onClick:function(){return d("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"Unset",selected:p,icon:"server",onClick:function(){return d("network_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Link Status",children:1===s?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Unlinked"})})]})}),1===s?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.linked_core_id,d=i.linked_core_addr,u=i.hidden_link;return(0,o.createComponentVNode)(2,a.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){return c("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return c("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.cores;return(0,o.createComponentVNode)(2,a.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Link"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Link",icon:"link",onClick:function(){return c("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(223);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.targetsTeleport?d.targetsTeleport:{},s=d.calibrated,m=d.calibrating,p=d.powerstation,h=d.regime,f=d.teleporterhub,C=d.target,N=d.locked;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(!p||!f)&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[f,!p&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Powerstation not linked "}),p&&!f&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Teleporter hub not linked "})]}),p&&f&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!N,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),1===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),2===h&&(0,o.createComponentVNode)(2,a.Box,{children:C})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,i.GridColumn,{size:"2",children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"In Progress"})||s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,i.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,a.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!s&&!m),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(N&&p&&f&&2===h)&&(0,o.createComponentVNode)(2,a.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TempGun=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.TempGun=function(e,t){var n=(0,a.useBackend)(t),s=n.act,m=n.data,p=m.target_temperature,h=m.temperature,f=m.max_temp,C=m.min_temp;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:C,maxValue:f,value:p,format:function(e){return(0,r.toFixed)(e,2)},width:"50px",onDrag:function(e,t){return s("target_temperature",{target_temperature:t})}}),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,c.Box,{color:l(h),bold:h>500-273.15,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(h,2)}),"\xb0C"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power Cost",children:(0,o.createComponentVNode)(2,c.Box,{color:u(h),children:d(h)})})]})})})})};var l=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},d=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},u=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.ThermoMachine=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.ThermoMachine=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.temperature,format:function(e){return(0,r.toFixed)(e,2)}})," K"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.pressure,format:function(e){return(0,r.toFixed)(e,2)}})," kPa"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Setting",children:(0,o.createComponentVNode)(2,c.Button,{icon:d.cooling?"temperature-low":"temperature-high",content:d.cooling?"Cooling":"Heating",selected:d.cooling,onClick:function(){return l("cooling")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,c.NumberInput,{animated:!0,value:Math.round(d.target),unit:"K",width:"62px",minValue:Math.round(d.min),maxValue:Math.round(d.max),step:5,stepPixelSize:3,onDrag:function(e,t){return l("target",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"fast-backward",disabled:d.target===d.min,title:"Minimum temperature",onClick:function(){return l("target",{target:d.min})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",disabled:d.target===d.initial,title:"Room Temperature",onClick:function(){return l("target",{target:d.initial})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"fast-forward",disabled:d.target===d.max,title:"Maximum Temperature",onClick:function(){return l("target",{target:d.max})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return i("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return i("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return i("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return i("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return i("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TurbineComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(12);t.TurbineComputer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.compressor,m=u.compressor_broken,p=u.turbine,h=u.turbine_broken,f=u.online,C=Boolean(s&&!m&&p&&!h);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Online":"Offline",selected:f,disabled:!C,onClick:function(){return i("toggle_power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Disconnect",onClick:function(){return i("disconnect")}})],4),children:C?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,c=n.compressor,i=n.compressor_broken,l=n.turbine,d=n.turbine_broken;n.online;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compressor Status",color:!c||i?"bad":"good",children:i?c?"Offline":"Missing":"Online"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Status",color:!l||d?"bad":"good",children:d?l?"Offline":"Missing":"Online"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.rpm,l=n.temperature,d=n.power,u=n.bearing_heat;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Speed",children:[c," RPM"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temp",children:[l," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generated Power",children:[d," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bearing Heat",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[-Infinity,60],average:[60,90],bad:[90,Infinity]},children:(0,i.toFixed)(u)+"%"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Uplink=void 0;var o=n(0),r=n(26),a=n(42),c=n(20),i=n(1),l=n(2),d=n(34),u=n(3),s=n(29),m=function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,V);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}};t.Uplink=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.cart,c=(0,i.useLocalState)(t,"tabIndex",0),d=c[0],p=c[1],h=(0,i.useLocalState)(t,"searchText",""),f=(h[0],h[1]);return(0,o.createComponentVNode)(2,u.Window,{theme:"syndicate",children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===d,onClick:function(){p(0),f("")},icon:"store",children:"View Market"},"PurchasePage"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===d,onClick:function(){p(1),f("")},icon:"shopping-cart",children:["View Shopping Cart"," ",a&&a.length?"("+a.length+")":""]},"Cart"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===d,onClick:function(){p(2),f("")},icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{onClick:function(){return r("lock")},icon:"lock",children:"Lock Uplink"},"LockUplink")]}),m(d)]})]})};var p=function(e,t){var n=(0,i.useBackend)(t),u=n.act,s=n.data,m=s.crystals,p=s.cats,h=(0,i.useLocalState)(t,"uplinkItems",p[0].items),f=h[0],N=h[1],b=(0,i.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=function(e){if(g(e),""===e)return N(p[0].items);N(function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){var t=1===e.hijack_only?"|hijack":"";return e.name+"|"+e.desc+"|"+e.cost+"tc"+t}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(p.map((function(e){return e.items})).flat(),e))},_=(0,i.useLocalState)(t,"showDesc",1),y=_[0],x=_[1];return(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+m+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:y,onClick:function(){return x(!y)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Random Item",icon:"question",onClick:function(){return u("buyRandom")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return u("refund")}})],4),children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1.5,placeholder:"Search Equipment",onInput:function(e,t){v(t)},value:V}),(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{children:(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:p.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:""===V&&e.items===f,onClick:function(){N(e.items),g("")},children:e.cat},e)}))})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:f.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:y},(0,c.decodeHtmlEntities)(e.name))}))})]})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,d=a.cart,u=a.crystals,s=a.cart_price,m=(0,i.useLocalState)(t,"showDesc",0),p=m[0],h=m[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+u+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:p,onClick:function(){return h(!p)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Empty Cart",icon:"trash",onClick:function(){return r("empty_cart")},disabled:!d}),(0,o.createComponentVNode)(2,l.Button,{content:"Purchase Cart ("+s+"TC)",icon:"shopping-cart",onClick:function(){return r("purchase_cart")},disabled:!d||s>u})],4),children:(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:d?d.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:p,buttons:(0,o.createComponentVNode)(2,b,{i:e})},(0,c.decodeHtmlEntities)(e.name))})):(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})}),(0,o.createComponentVNode)(2,f)],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.cats,d=a.lucky_numbers;return(0,o.createComponentVNode)(2,l.Section,{title:"Suggested Purchases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"dice",content:"See more suggestions",onClick:function(){return r("shuffle_lucky_numbers")}}),children:(0,o.createComponentVNode)(2,l.Box,{display:"flex",flexWrap:"wrap",mb:"5px",children:d.map((function(e){return c[e.cat].items[e.item]})).filter((function(e){return e!==undefined&&null!==e})).map((function(e,t){return(0,o.createComponentVNode)(2,l.Flex.Item,{flexShrink:0,p:"0.5%",width:"49%",children:(0,o.createComponentVNode)(2,C,{grow:!0,i:e})},t)}))})})},C=function(e,t){var n=e.i,r=e.showDecription,a=void 0===r?1:r,i=e.buttons,d=void 0===i?(0,o.createComponentVNode)(2,N,{i:n}):i;return(0,o.createComponentVNode)(2,l.Section,{title:(0,c.decodeHtmlEntities)(n.name),showBottom:a,borderRadius:"5px",buttons:d,stretchContents:!0,children:a?(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,c.decodeHtmlEntities)(n.desc)}):null})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i,d=a.crystals;return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{icon:"shopping-cart",color:1===c.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return r("add_to_cart",{item:c.obj_path})},disabled:c.cost>d}),(0,o.createComponentVNode)(2,l.Button,{content:"Buy ("+c.cost+"TC)"+(c.refundable?" [Refundable]":""),color:1===c.hijack_only&&"red",tooltip:1===c.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return r("buyItem",{item:c.obj_path})},disabled:c.cost>d})],4)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i;a.exploitable;return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Button,{icon:"times",content:"("+c.cost*c.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return r("remove_from_cart",{item:c.obj_path})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"minus",tooltip:0===c.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:--c.amount})},disabled:c.amount<=0}),(0,o.createComponentVNode)(2,l.Button.Input,{content:c.amount,width:"45px",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onCommit:function(e,t){return r("set_cart_item_quantity",{item:c.obj_path,quantity:t})},disabled:-1!==c.limit&&c.amount>=c.limit&&c.amount<=0}),(0,o.createComponentVNode)(2,l.Button,{icon:"plus",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:++c.amount})},disabled:-1!==c.limit&&c.amount>=c.limit})]})},V=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.exploitable),s=(0,i.useLocalState)(t,"selectedRecord",u[0]),m=s[0],p=s[1],h=(0,i.useLocalState)(t,"searchText",""),f=h[0],C=h[1],N=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(u,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:N.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===m,onClick:function(){return p(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+m.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",m.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",m.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",m.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",m.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",m.species]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Vending=void 0;var o=n(0),r=(n(8),n(1)),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productStock,u=e.productImage,s=i.chargesMoney,m=(i.user,i.usermoney),p=i.inserted_cash,h=i.vend_ready,f=(i.inserted_item_name,!s||0===l.price),C="ERROR!",N="";f?(C="FREE",N="arrow-circle-down"):(C=l.price,N="shopping-cart");var b=!h||0===d||!f&&l.price>m&&l.price>p;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{color:(d<=0?"bad":d<=l.max_amount/2&&"average")||"good",children:[d," in stock"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:b,icon:N,content:C,textAlign:"left",onClick:function(){return c("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.user,m=u.usermoney,p=u.inserted_cash,h=u.chargesMoney,f=u.product_records,C=void 0===f?[]:f,N=u.hidden_records,b=void 0===N?[]:N,V=u.stock,g=(u.vend_ready,u.inserted_item_name),v=u.panel_open,_=u.speaker,y=u.imagelist;return n=[].concat(C),u.extended_inventory&&(n=[].concat(n,b)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,c.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[s&&(0,o.createComponentVNode)(2,a.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),", ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),".",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Box,{children:["There is ",(0,o.createVNode)(1,"b",null,[p,(0,o.createTextVNode)(" credits ")],0)," of space cash inserted.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return d("change")}})]})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return d("eject_item",{})}}),children:(0,o.createComponentVNode)(2,a.Box,{children:g})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,a.Button,{icon:_?"check":"volume-mute",selected:_,content:"Speaker",textAlign:"left",onClick:function(){return d("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,i,{product:e,productStock:V[e.name],productImage:y[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return i("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.remaining,u=l.question,s=l.choices,m=l.user_vote,p=l.counts,h=l.show_counts;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:u,children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:["Time remaining: ",Math.round(d/10),"s"]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{multiLine:e,content:e+(h?" ("+(p[e]||0)+")":""),onClick:function(){return i("vote",{target:e})},selected:e===m})},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return i("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return i("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return i("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.WizardApprenticeContract=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.WizardApprenticeContract=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.used;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,o.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,o.createComponentVNode)(2,a.Section,{title:"Which school of magic is your apprentice studying?",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destruction",children:["Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("destruction")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bluespace Manipulation",children:["Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("bluespace")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing",children:["Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("healing")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Robeless",children:["Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("robeless")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}}]); \ No newline at end of file diff --git a/tools/ci/check_grep2.py b/tools/ci/check_grep2.py index 54f63998cdc9..9ebbf17a633f 100644 --- a/tools/ci/check_grep2.py +++ b/tools/ci/check_grep2.py @@ -118,6 +118,15 @@ def check_conditional_spacing(lines): if CONDITIONAL_INFIX_NOT_SPACE.search(line): return Failure(idx + 1, "Found a conditional statement matching the format \"if(! thing)\", please use \"if(!thing)\" instead.") +# makes sure that no global list inits have an empty list in them without using the helper +GLOBAL_LIST_EMPTY = re.compile(r"(?