diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm index 2d2a06504ea..9bb6b7c07ae 100644 --- a/_maps/map_files/stations/boxstation.dmm +++ b/_maps/map_files/stations/boxstation.dmm @@ -13527,6 +13527,7 @@ /area/station/hallway/secondary/garden) "aXI" = ( /obj/structure/table/glass, +/obj/item/seeds/harebell, /turf/simulated/floor/plasteel, /area/station/hallway/secondary/garden) "aXJ" = ( @@ -65861,6 +65862,11 @@ }, /turf/simulated/floor/plasteel, /area/station/security/permabrig) +"neT" = ( +/obj/machinery/hydroponics/soil, +/obj/item/seeds/poppy, +/turf/simulated/floor/grass, +/area/station/maintenance/asmaint2) "nfe" = ( /obj/structure/cable, /obj/effect/spawner/window/reinforced/polarized/grilled{ @@ -75429,6 +75435,14 @@ /obj/effect/mapping_helpers/airlock/access/all/security/evidence, /turf/simulated/floor/plasteel/dark, /area/station/security/evidence) +"rwv" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/light_switch{ + name = "north bump"; + pixel_y = 24 + }, +/turf/simulated/floor/plasteel, +/area/station/maintenance/turbine) "rwR" = ( /obj/machinery/door/firedoor, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ @@ -78328,14 +78342,6 @@ }, /turf/simulated/floor/plating, /area/station/maintenance/fore) -"sPU" = ( -/obj/effect/decal/cleanable/dirt, -/obj/machinery/light_switch{ - name = "north bump"; - pixel_y = 24 - }, -/turf/simulated/floor/plasteel, -/area/station/maintenance/turbine) "sQe" = ( /obj/structure/table/wood, /obj/item/flashlight/lamp/green{ @@ -129256,7 +129262,7 @@ nZl dcs chf dgT -sPU +rwv rvr dcR dde @@ -134355,7 +134361,7 @@ lqd clX clX nbx -nbx +neT cuQ gRe gRe diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index 461f09c28fb..eb1a96c6e43 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -10385,6 +10385,12 @@ }, /turf/simulated/floor/plasteel, /area/station/security/permabrig) +"bGq" = ( +/obj/item/seeds/poppy, +/turf/simulated/floor/plating{ + icon_state = "asteroidplating" + }, +/area/station/maintenance/apmaint) "bGs" = ( /obj/structure/disposalpipe/junction/reversed{ dir = 1 @@ -37254,6 +37260,7 @@ /obj/item/reagent_containers/glass/bottle/nutrient/ez{ pixel_x = 5 }, +/obj/item/seeds/poppy, /turf/simulated/floor/grass/jungle, /area/station/hallway/secondary/garden) "gZz" = ( @@ -111484,6 +111491,11 @@ }, /turf/simulated/floor/plasteel, /area/station/security/prison/cell_block/a) +"xfe" = ( +/obj/structure/table/wood, +/obj/item/seeds/harebell, +/turf/simulated/floor/grass/jungle, +/area/station/hallway/secondary/garden) "xfi" = ( /obj/machinery/door/airlock/public/glass{ name = "Central Access" @@ -130521,7 +130533,7 @@ lMW jfl gtZ daM -sKh +bGq sKh xxb wIq @@ -150548,7 +150560,7 @@ jJC hXq oTB beb -beb +xfe beb aXP aXP diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm index 5f0a1ada896..4e89247fce7 100644 --- a/_maps/map_files/stations/deltastation.dmm +++ b/_maps/map_files/stations/deltastation.dmm @@ -70397,6 +70397,7 @@ /obj/item/seeds/harebell, /obj/item/seeds/wheat, /obj/item/seeds/watermelon, +/obj/item/seeds/poppy, /turf/simulated/floor/plasteel, /area/station/maintenance/abandoned_garden) "mWM" = ( diff --git a/_maps/map_files/stations/emeraldstation.dmm b/_maps/map_files/stations/emeraldstation.dmm index 75ef15ab41f..42c757df1dc 100644 --- a/_maps/map_files/stations/emeraldstation.dmm +++ b/_maps/map_files/stations/emeraldstation.dmm @@ -10320,6 +10320,7 @@ /obj/effect/turf_decal/tiles/department/virology/side{ dir = 5 }, +/obj/item/seeds/poppy, /turf/simulated/floor/plasteel, /area/station/hallway/secondary/garden) "cbf" = ( @@ -15420,6 +15421,12 @@ /obj/machinery/light, /turf/simulated/floor/plasteel/dark, /area/station/security/lobby) +"den" = ( +/obj/effect/spawner/random/oil/maybe, +/obj/effect/decal/cleanable/dirt, +/obj/item/seeds/poppy, +/turf/simulated/floor/plating, +/area/station/maintenance/security/aft_port) "deF" = ( /obj/machinery/alarm/directional/west, /obj/structure/cable{ @@ -46693,6 +46700,7 @@ /obj/effect/turf_decal/tiles/department/virology/side{ dir = 1 }, +/obj/item/seeds/harebell, /turf/simulated/floor/plasteel, /area/station/hallway/secondary/garden) "jqr" = ( @@ -162459,7 +162467,7 @@ oni omp paN hFG -uaV +den skm coS eRV diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index d938f0aaa8f..2ba24f6bdca 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -45058,6 +45058,8 @@ /obj/structure/table, /obj/item/hatchet, /obj/effect/spawner/random/maintenance, +/obj/item/seeds/poppy, +/obj/item/seeds/harebell, /turf/simulated/floor/grass/no_creep, /area/station/maintenance/abandoned_garden) "iDe" = ( diff --git a/_maps/map_files/templates/heretic_sacrifice_room.dmm b/_maps/map_files/templates/heretic_sacrifice_room.dmm new file mode 100644 index 00000000000..1a1083479bc --- /dev/null +++ b/_maps/map_files/templates/heretic_sacrifice_room.dmm @@ -0,0 +1,1979 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aO" = ( +/obj/structure/stone_tile/block/cracked, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"aV" = ( +/turf/simulated/wall/indestructible/rock, +/area/centcom/heretic_sacrifice/moon) +"bY" = ( +/obj/item/whetstone, +/obj/structure/rack, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"cN" = ( +/obj/effect/decal/cleanable/ash, +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) +"dT" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/asteroid/snow/mansus, +/area/centcom/heretic_sacrifice/void) +"es" = ( +/obj/structure/stone_tile/cracked{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"eD" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/obj/structure/decorative_structures/metal/statue/moon, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"fX" = ( +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"ge" = ( +/obj/effect/decal/cleanable/ash, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"gN" = ( +/turf/simulated/wall/indestructible/fakedoor, +/area/centcom/heretic_sacrifice/blade) +"gS" = ( +/obj/structure/stone_tile/burnt, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"hc" = ( +/obj/effect/decal/cleanable/dirt, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"hm" = ( +/turf/simulated/floor/plating/asteroid/snow/mansus, +/area/centcom/heretic_sacrifice/void) +"hz" = ( +/obj/structure/chair/wood{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"hR" = ( +/obj/item/instrument/trombone, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"hV" = ( +/obj/machinery/light/floor, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/rust) +"jd" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 8 + }, +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/obj/effect/landmark/heretic/void, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"js" = ( +/obj/machinery/light/very_dim/directional/east, +/turf/simulated/floor/fakespace{ + rust_resistance = 4 + }, +/area/centcom/heretic_sacrifice/cosmic) +"lh" = ( +/obj/item/clothing/mask/madness_mask, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"mc" = ( +/obj/structure/legionnaire_bonfire, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"mz" = ( +/obj/effect/landmark/heretic/rust, +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) +"mW" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/clothing/mask/gas, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"ob" = ( +/obj/item/shard, +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"op" = ( +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/rust) +"pf" = ( +/obj/structure/stone_tile/block, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"pG" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/clothing/under/color/grey, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"pS" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/effect/landmark/heretic/lock, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"pX" = ( +/obj/effect/decal/snow/clean/edge, +/obj/effect/decal/snow/clean/edge{ + dir = 4 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"qB" = ( +/obj/effect/spawner/random/blood/often, +/obj/item/kitchen/knife, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"qD" = ( +/obj/item/whetstone, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"qK" = ( +/obj/structure/kitchenspike, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"ra" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"ri" = ( +/obj/structure/shelf, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"rv" = ( +/obj/effect/landmark/heretic/ash, +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) +"rA" = ( +/turf/simulated/wall/indestructible, +/area/centcom/heretic_sacrifice/blade) +"rZ" = ( +/obj/structure/rack, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"sT" = ( +/obj/item/kitchen/knife, +/obj/structure/shelf, +/obj/item/kitchen/knife, +/obj/item/whetstone, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"tO" = ( +/turf/simulated/wall/indestructible/rock, +/area/centcom/heretic_sacrifice/rust) +"tT" = ( +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"ua" = ( +/obj/effect/decal/snow/clean/edge, +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"vg" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/indestructible/necropolis/normal_air, +/area/centcom/heretic_sacrifice/flesh) +"vN" = ( +/turf/simulated/wall/indestructible/rock/snow, +/area/centcom/heretic_sacrifice/void) +"wk" = ( +/obj/structure/stone_tile, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"wn" = ( +/obj/item/kitchen/knife, +/obj/structure/rack, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"wF" = ( +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"xO" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/spear, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"ye" = ( +/turf/simulated/wall/indestructible/fakedoor, +/area/centcom/heretic_sacrifice/lock) +"yH" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"yL" = ( +/obj/item/snowball, +/turf/simulated/floor/plating/asteroid/snow/mansus, +/area/centcom/heretic_sacrifice/void) +"yO" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"zL" = ( +/obj/machinery/light/very_dim/directional/north, +/turf/simulated/floor/fakespace{ + rust_resistance = 4 + }, +/area/centcom/heretic_sacrifice/cosmic) +"zS" = ( +/turf/simulated/wall/indestructible/necropolis, +/area/centcom/heretic_sacrifice/flesh) +"zU" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"Ac" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/item/clothing/under/color/grey, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"Ah" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"Am" = ( +/obj/machinery/light/very_dim/directional/west, +/turf/simulated/floor/fakespace{ + rust_resistance = 4 + }, +/area/centcom/heretic_sacrifice/cosmic) +"Ax" = ( +/obj/item/trash/popcorn, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"Bg" = ( +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) +"Bo" = ( +/obj/effect/landmark/heretic, +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) +"Bx" = ( +/obj/machinery/light/very_dim/directional/south, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"BC" = ( +/obj/effect/landmark/heretic/moon, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"BO" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/obj/effect/decal/snow/clean/edge{ + dir = 4 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"BR" = ( +/turf/simulated/floor/transparent/glass{ + desc = "A peek into the other side."; + name = "cosmic glass floor" + }, +/area/centcom/heretic_sacrifice/cosmic) +"Cu" = ( +/obj/structure/stone_tile/surrounding_tile, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"Cz" = ( +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"CR" = ( +/obj/effect/gibspawner/generic, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) +"Dq" = ( +/obj/structure/stone_tile/block{ + dir = 8 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"Du" = ( +/obj/machinery/light/floor, +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) +"Fe" = ( +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"FE" = ( +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"FW" = ( +/obj/effect/landmark/heretic/cosmic, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"Gd" = ( +/obj/structure/stone_tile/block/cracked{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"Gu" = ( +/obj/structure/decorative_structures/metal/statue/moon, +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"GH" = ( +/obj/structure/grille, +/turf/simulated/wall/indestructible/riveted, +/area/centcom/heretic_sacrifice/lock) +"IR" = ( +/turf/simulated/wall/indestructible/boss, +/area/centcom/heretic_sacrifice/ash) +"Kz" = ( +/obj/structure/stone_tile/block{ + dir = 4 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"KX" = ( +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) +"Ld" = ( +/obj/structure/barricade/wooden/crude/snow, +/turf/simulated/wall/indestructible/fakedoor, +/area/centcom/heretic_sacrifice/void) +"Ml" = ( +/obj/item/instrument/saxophone, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"Nx" = ( +/turf/simulated/floor/fakespace{ + rust_resistance = 4 + }, +/area/centcom/heretic_sacrifice/cosmic) +"OA" = ( +/obj/structure/legionnaire_bonfire, +/obj/effect/gibspawner/generic, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) +"OG" = ( +/turf/cordon, +/area/centcom/heretic_sacrifice/cosmic) +"OO" = ( +/obj/effect/landmark/heretic/flesh, +/turf/simulated/floor/indestructible/necropolis/normal_air, +/area/centcom/heretic_sacrifice/flesh) +"OZ" = ( +/obj/structure/signpost/void, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"Pc" = ( +/turf/simulated/floor/indestructible/necropolis/normal_air, +/area/centcom/heretic_sacrifice/flesh) +"Pu" = ( +/obj/effect/decal/snow/clean/surround, +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"Pw" = ( +/obj/structure/legionnaire_bonfire, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) +"Qp" = ( +/obj/effect/landmark/heretic/blade, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"Rp" = ( +/obj/item/instrument/recorder, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"RC" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 4 + }, +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"SR" = ( +/obj/effect/decal/cleanable/dirt, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/rust) +"SV" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/plating/asteroid/snow/mansus, +/area/centcom/heretic_sacrifice/void) +"TG" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"TH" = ( +/obj/effect/spawner/window/plastitanium, +/turf/simulated/floor/fakespace, +/area/centcom/heretic_sacrifice/cosmic) +"Ug" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/storage/toolbox/mechanical/old, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"Um" = ( +/turf/cordon, +/area/space) +"UH" = ( +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) +"Vx" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/item/storage/toolbox/mechanical/old, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/lock) +"Xh" = ( +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"Xx" = ( +/obj/structure/decorative_structures/metal/statue/moon, +/obj/structure/decorative_structures/metal/statue/moon, +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"Yf" = ( +/obj/structure/stone_tile/block/cracked{ + dir = 8 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"Yt" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 8 + }, +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"Yy" = ( +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) +"YG" = ( +/turf/simulated/wall/indestructible/riveted, +/area/centcom/heretic_sacrifice/lock) +"Zb" = ( +/obj/structure/curtain/open/shower/security, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) +"Zl" = ( +/obj/structure/stone_tile/slab, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"ZU" = ( +/obj/structure/stone_tile/block{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) + +(1,1,1) = {" +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +"} +(2,1,1) = {" +Um +vN +vN +vN +vN +vN +Ld +Ld +vN +vN +vN +vN +vN +Um +YG +YG +GH +GH +YG +ye +ye +YG +GH +GH +YG +YG +Um +IR +IR +IR +IR +IR +IR +IR +IR +IR +IR +IR +IR +Um +OG +OG +OG +OG +OG +TH +OG +OG +OG +OG +OG +OG +Um +"} +(3,1,1) = {" +Um +vN +hm +hm +hm +hm +BO +pX +hm +hm +hm +hm +vN +Um +YG +hc +hc +hc +hc +hc +hc +hc +hc +Ah +hc +YG +Um +IR +Xh +Xh +Xh +Xh +Xh +Xh +Xh +Xh +Xh +Xh +IR +Um +OG +Nx +BR +Nx +Nx +Am +Nx +Nx +Nx +BR +Cz +OG +Um +"} +(4,1,1) = {" +Um +vN +hm +dT +hm +hm +hm +hm +hm +hm +dT +hm +vN +Um +GH +hc +Ah +Ac +hc +hc +Vx +Ah +hc +xO +Ah +GH +Um +IR +Xh +mc +Xh +Xh +Xh +Xh +Xh +wk +mc +Xh +IR +Um +OG +BR +OZ +BR +Nx +Nx +Nx +Nx +Nx +Nx +BR +OG +Um +"} +(5,1,1) = {" +Um +vN +hm +hm +hm +hm +Pu +hm +hm +SV +hm +hm +vN +Um +GH +hc +mW +Ah +hc +hc +Ah +Ah +hc +Ah +hc +GH +Um +IR +Xh +ge +Xh +Xh +Xh +Xh +Xh +Xh +ge +Xh +IR +Um +OG +Nx +BR +Nx +Nx +Nx +Nx +Nx +Nx +Nx +Nx +OG +Um +"} +(6,1,1) = {" +Um +vN +hm +SV +hm +hm +hm +hm +hm +hm +hm +hm +vN +Um +YG +hc +Ah +Ah +hc +hc +Ah +hc +hc +Ah +hc +YG +Um +IR +Xh +Xh +Xh +Xh +Dq +Dq +Xh +Xh +Xh +Xh +IR +Um +OG +Nx +Nx +Nx +BR +BR +Nx +Nx +Nx +Nx +BR +OG +Um +"} +(7,1,1) = {" +Um +vN +hm +hm +hm +hm +hm +hm +hm +hm +hm +hm +vN +Um +ye +hc +Ah +Ah +hc +pS +pG +hc +hc +hc +Ah +ye +Um +IR +Xh +Xh +Xh +ZU +KX +cN +pf +Xh +Xh +Xh +IR +Um +OG +Nx +Nx +BR +FW +Cz +BR +Nx +Nx +BR +Bx +TH +Um +"} +(8,1,1) = {" +Um +vN +hm +hm +hm +hm +jd +Yt +hm +hm +hm +hm +vN +Um +ye +Ah +hc +hc +hc +Ah +yH +hc +hc +Ah +hc +ye +Um +IR +Xh +Xh +Xh +ZU +rv +Bo +pf +Xh +Xh +Xh +IR +Um +TH +zL +Nx +BR +Fe +Cz +BR +Nx +Nx +BR +Cz +OG +Um +"} +(9,1,1) = {" +Um +vN +hm +hm +hm +hm +yO +ua +hm +hm +yL +hm +vN +Um +YG +hc +hc +Ah +hc +Ah +hc +Ah +hc +hc +Ah +YG +Um +IR +Xh +Xh +Xh +Xh +Kz +Kz +Xh +Xh +Xh +Xh +IR +Um +OG +Nx +Nx +Nx +BR +BR +Nx +Nx +Nx +BR +Cz +OG +Um +"} +(10,1,1) = {" +Um +vN +hm +hm +hm +hm +yO +wF +hm +hm +hm +hm +vN +Um +GH +Ah +hc +Ug +Ah +hc +hc +Ug +Ah +hc +hc +GH +Um +IR +Xh +zU +aO +Xh +Xh +Yf +Xh +Xh +Xh +Xh +IR +Um +OG +BR +Nx +Nx +Nx +Nx +Nx +Nx +Nx +Nx +BR +OG +Um +"} +(11,1,1) = {" +Um +vN +hm +dT +hm +hm +BO +RC +hm +hm +dT +hm +vN +Um +GH +hc +Ah +hc +hc +hc +Ah +hc +pG +Ah +Ah +GH +Um +IR +Xh +mc +pf +Xh +Gd +Zl +gS +ge +mc +Xh +IR +Um +OG +Cz +BR +Nx +Nx +Nx +Nx +Nx +BR +Nx +Nx +OG +Um +"} +(12,1,1) = {" +Um +vN +hm +hm +hm +hm +SV +hm +hm +hm +hm +hm +vN +Um +YG +hc +hc +Ah +Ah +hc +hc +hc +hc +hc +hc +YG +Um +IR +Xh +Xh +Xh +Xh +es +Cu +Xh +Xh +ge +Xh +IR +Um +OG +Cz +Fe +BR +Nx +Nx +js +BR +ra +BR +Nx +OG +Um +"} +(13,1,1) = {" +Um +vN +vN +vN +vN +vN +vN +vN +vN +vN +vN +vN +vN +Um +YG +YG +GH +GH +YG +ye +ye +YG +GH +GH +YG +YG +Um +IR +IR +IR +IR +IR +IR +IR +IR +IR +IR +IR +IR +Um +OG +OG +OG +OG +OG +OG +TH +OG +OG +OG +OG +OG +Um +"} +(14,1,1) = {" +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +"} +(15,1,1) = {" +Um +rA +rA +rA +rA +rA +rA +rA +rA +rA +rA +rA +rA +Um +aV +aV +aV +aV +aV +aV +aV +aV +aV +aV +aV +aV +Um +tO +tO +tO +tO +tO +tO +tO +tO +tO +tO +tO +tO +Um +zS +zS +zS +zS +zS +zS +zS +zS +zS +zS +zS +zS +Um +"} +(16,1,1) = {" +Um +rA +qK +qK +qK +tT +wn +bY +tT +tT +tT +tT +rA +Um +aV +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +aV +Um +tO +Yy +op +Yy +Yy +Yy +Yy +Yy +Yy +op +Yy +tO +Um +zS +Pc +Bg +Pc +Pc +Pc +Pc +Pc +Pc +Bg +Pc +zS +Um +"} +(17,1,1) = {" +Um +rA +tT +TG +ob +tT +qD +tT +tT +tT +TG +tT +rA +Um +aV +fX +Gu +fX +fX +fX +fX +fX +fX +eD +fX +aV +Um +tO +op +hV +Yy +Yy +Yy +Yy +Yy +Yy +Du +Yy +tO +Um +zS +CR +Pw +Bg +Bg +Bg +Bg +Bg +CR +Pw +Bg +zS +Um +"} +(18,1,1) = {" +Um +rA +tT +tT +tT +UH +UH +tT +UH +tT +qD +tT +rA +Um +aV +fX +FE +FE +Zb +fX +hz +hz +hz +fX +fX +aV +Um +tO +Yy +Yy +Yy +SR +op +Yy +op +Yy +Yy +Yy +tO +Um +zS +Pc +Bg +vg +Bg +Pc +Pc +Bg +Pc +Bg +Pc +zS +Um +"} +(19,1,1) = {" +Um +rA +tT +tT +qD +tT +tT +tT +tT +tT +tT +ob +rA +Um +aV +fX +Rp +lh +Zb +fX +hz +hz +hz +fX +fX +aV +Um +tO +op +Yy +Yy +Yy +SR +op +op +Yy +op +Yy +tO +Um +zS +Pc +Bg +Bg +CR +Bg +Bg +Bg +Bg +Bg +Pc +zS +Um +"} +(20,1,1) = {" +Um +rA +ri +tT +tT +tT +tT +UH +tT +UH +tT +tT +rA +Um +aV +fX +FE +BC +Zb +fX +fX +fX +fX +fX +fX +aV +Um +tO +Yy +Yy +SR +Yy +Yy +Yy +Yy +Yy +SR +op +tO +Um +zS +Pc +Bg +Pc +Bg +Pc +Pc +Bg +Pc +Bg +Pc +zS +Um +"} +(21,1,1) = {" +Um +rA +sT +tT +UH +UH +UH +Qp +UH +UH +tT +wn +rA +Um +aV +fX +FE +FE +Zb +fX +fX +fX +fX +fX +fX +aV +Um +tO +op +SR +Yy +Yy +mz +op +SR +SR +Yy +Yy +tO +Um +zS +Pc +Bg +Pc +Bg +OO +Pc +Bg +vg +Bg +Pc +zS +Um +"} +(22,1,1) = {" +Um +rA +qD +tT +tT +tT +tT +tT +UH +tT +UH +rZ +rA +Um +aV +fX +hR +Ml +Zb +fX +hz +hz +hz +fX +fX +aV +Um +tO +Yy +Yy +Yy +Yy +Yy +Yy +Yy +Yy +Yy +Yy +tO +Um +zS +Pc +Bg +Bg +Bg +Bg +Bg +Bg +Bg +Bg +Pc +zS +Um +"} +(23,1,1) = {" +Um +rA +tT +tT +ob +tT +tT +tT +ob +tT +tT +tT +rA +Um +aV +fX +FE +FE +Zb +fX +hz +hz +hz +fX +fX +aV +Um +tO +op +SR +op +SR +op +Yy +Yy +Yy +Yy +Yy +tO +Um +zS +Pc +Bg +Pc +Bg +Pc +Pc +Bg +Pc +Bg +Pc +zS +Um +"} +(24,1,1) = {" +Um +rA +tT +TG +tT +qB +tT +tT +tT +qD +TG +tT +rA +Um +aV +fX +Gu +fX +fX +fX +Ax +fX +fX +Xx +fX +aV +Um +tO +Yy +Du +Yy +Yy +SR +Yy +Yy +Yy +hV +Yy +tO +Um +zS +Bg +OA +Bg +Bg +Bg +Bg +Bg +Bg +Pw +Bg +zS +Um +"} +(25,1,1) = {" +Um +rA +tT +tT +ri +tT +tT +tT +tT +tT +tT +tT +rA +Um +aV +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +aV +Um +tO +Yy +Yy +Yy +Yy +Yy +SR +op +Yy +Yy +op +tO +Um +zS +Pc +Bg +vg +Pc +Pc +Pc +Pc +Pc +CR +Pc +zS +Um +"} +(26,1,1) = {" +Um +rA +rA +rA +rA +rA +gN +gN +rA +rA +rA +rA +rA +Um +aV +aV +aV +aV +aV +aV +aV +aV +aV +aV +aV +aV +Um +tO +tO +tO +tO +tO +tO +tO +tO +tO +tO +tO +tO +Um +zS +zS +zS +zS +zS +zS +zS +zS +zS +zS +zS +zS +Um +"} +(27,1,1) = {" +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +Um +"} diff --git a/code/__DEFINES/ai/blackboard_defines.dm b/code/__DEFINES/ai/blackboard_defines.dm index 6a31c33eef3..1ce03481c1e 100644 --- a/code/__DEFINES/ai/blackboard_defines.dm +++ b/code/__DEFINES/ai/blackboard_defines.dm @@ -221,6 +221,7 @@ #define BB_TRAVEL_DESTINATION "BB_TRAVEL_DESTINATION" +#define BB_SHAPESHIFT_ACTION "BB_SHAPESHIFT_ACTION" // Giant Spiders /// Our webbing target #define BB_SPIDER_WEB_TARGET "BB_spider_web_target" diff --git a/code/__DEFINES/antag_defines.dm b/code/__DEFINES/antag_defines.dm index 2c83795c43c..1537c5b5de6 100644 --- a/code/__DEFINES/antag_defines.dm +++ b/code/__DEFINES/antag_defines.dm @@ -23,6 +23,8 @@ /// The name of the strings file containing data to use for contract fluff texts. #define CONTRACT_STRINGS_WANTED "syndicate_wanted_messages.json" +/// JSON string file for all of our heretic influence flavors +#define HERETIC_INFLUENCE_FILE "heretic_influences.json" // UI page numbers. #define HUB_PAGE_CONTRACTS 1 @@ -77,6 +79,55 @@ GLOBAL_LIST(contractors) #define IS_MINDSLAVE(mob) (ishuman(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/mindslave, FALSE)) +/** + * Heretic checks + */ + +/// Checks if the given mob is a heretic. +#define IS_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic)) + +/// Check if the given mob is a heretic monster. +#define IS_HERETIC_MONSTER(mob) (mob.mind?.has_antag_datum(/datum/antagonist/mindslave/heretic_monster)) +/// Checks if the given mob is either a heretic, heretic monster. +#define IS_HERETIC_OR_MONSTER(mob) (IS_HERETIC(mob) || IS_HERETIC_MONSTER(mob)) +/// CHecks if the given mob is in the mansus realm +#define IS_IN_MANSUS(mob) (istype(get_area(mob), /area/centcom/heretic_sacrifice)) + + +// Heretic path defines. +#define PATH_START "Start Path" +#define PATH_SIDE "Side Path" +#define PATH_ASH "Ash Path" +#define PATH_RUST "Rust Path" +#define PATH_FLESH "Flesh Path" +#define PATH_VOID "Void Path" +#define PATH_BLADE "Blade Path" +#define PATH_COSMIC "Cosmic Path" +#define PATH_LOCK "Lock Path" +#define PATH_MOON "Moon Path" + +//Heretic knowledge tree defines +#define HKT_NEXT "next" +#define HKT_BAN "ban" +#define HKT_DEPTH "depth" +#define HKT_ROUTE "route" +#define HKT_UI_BGR "ui_bgr" + + +/// Defines are used in /proc/has_living_heart() to report if the heretic has no heart period, no living heart, or has a living heart. +#define HERETIC_NO_HEART_ORGAN (-1) +#define HERETIC_NO_LIVING_HEART 0 +#define HERETIC_HAS_LIVING_HEART 1 + +/// A define used in ritual priority for heretics. +#define MAX_KNOWLEDGE_PRIORITY 100 + +/// Checks if the passed mob can become a heretic ghoul. +/// - Must be a human (type, not species) +/// - Skeletons cannot be husked (they are snowflaked instead of having a trait) +/// - Monkeys are monkeys, not quite human (balance reasons) +#define IS_VALID_GHOUL_MOB(mob) (ishuman(mob) && !isskeleton(mob) && !ismonkeybasic(mob)) + /** * Objective targeting flags */ diff --git a/code/__DEFINES/atmospherics_defines.dm b/code/__DEFINES/atmospherics_defines.dm index 039742aa3c3..f01cbfe10bf 100644 --- a/code/__DEFINES/atmospherics_defines.dm +++ b/code/__DEFINES/atmospherics_defines.dm @@ -199,3 +199,13 @@ #define ONLY_CHECK_EXT_PRESSURE 1 /// Only release until we reach this pressure #define ONLY_CHECK_INT_PRESSURE 2 + +// Defines to identify each individual gas (used for death_gas component) +#define SPAWN_GAS_OXYGEN "oxygen" +#define SPAWN_GAS_NITROGEN "nitrogen" +#define SPAWN_GAS_N2O "sleepy_gas" +#define SPAWN_GAS_CO2 "carbon_dioxide" +#define SPAWN_GAS_PLASMA "plasma" +#define SPAWN_GAS_AGENTB "plasma" +#define SPAWN_GAS_HYDROGEN "hydrogen" +#define SPAWN_GAS_WATER "water_vapor" diff --git a/code/__DEFINES/color_defines.dm b/code/__DEFINES/color_defines.dm index 558dd7d88c9..a99bdd04a53 100644 --- a/code/__DEFINES/color_defines.dm +++ b/code/__DEFINES/color_defines.dm @@ -12,6 +12,7 @@ #define COLOR_GRAY "#808080" #define COLOR_BLACK "#000000" #define COLOR_HALF_TRANSPARENT_BLACK "#0000007A" +#define COLOR_FULL_TONER_BLACK "#101010" #define COLOR_NAVY_BLUE "#000080" #define COLOR_LIGHT_GREEN "#008000" #define COLOR_DARK_GRAY "#404040" @@ -35,6 +36,7 @@ #define COLOR_WARM_YELLOW "#b3863c" #define COLOR_RED_GRAY "#aa5f61" #define COLOR_BROWN "#b19664" +#define COLOR_CARGO_BROWN "#B18644" #define COLOR_GREEN_GRAY "#8daf6a" #define COLOR_DARK_GREEN_GRAY "#54654c" #define COLOR_BLUE_GRAY "#6a97b0" @@ -43,6 +45,7 @@ #define COLOR_PURPLE_GRAY "#a2819e" #define COLOR_BLUE_LIGHT "#33ccff" #define COLOR_RED_LIGHT "#ff3333" +#define COLOR_VIVID_RED "#FF3232" #define COLOR_BEIGE "#ceb689" #define COLOR_BABY_BLUE "#89cff0" #define COLOR_PALE_GREEN_GRAY "#aed18b" @@ -86,9 +89,15 @@ #define COLOR_DIAMOND "#d8d4ea" #define COLOR_ANCIENT_ROCK "#575757" #define COLOR_COLD_ANCIENT_ROCK "#575764" -#define COLOR_HARD_ROCK "#363636" -#define COLOR_FLOOR_HARD_ROCK "#bdbdbd" +#define COLOR_HARD_ROCK "#363636" +#define COLOR_FLOOR_HARD_ROCK "#bdbdbd" #define COLOR_HEALING_GREEN "#375637" +#define COLOR_VOID_PURPLE "#53277E" +#define COLOR_VERY_PALE_LIME_GREEN "#DDFFD3" +#define COLOR_HERETIC_GREEN COLOR_VERY_PALE_LIME_GREEN +#define COLOR_RUSTED_GLASS "#917c65" +#define COLOR_SOFT_RED "#FA8282" +#define COLOR_CULT_RED "#960000" //Color defines used by the assembly detailer. #define COLOR_ASSEMBLY_BLACK "#545454" @@ -157,3 +166,15 @@ /// Color for dead external organs/zombies #define COLORTONE_DEAD_EXT_ORGAN "#0A3200" + +GLOBAL_LIST_INIT(heretic_path_to_color, list( + PATH_START = COLOR_LIME, + PATH_RUST = COLOR_CARGO_BROWN, + PATH_FLESH = COLOR_SOFT_RED, + PATH_ASH = COLOR_VIVID_RED, + PATH_VOID = COLOR_CYAN, + PATH_BLADE = COLOR_SILVER, + PATH_COSMIC = COLOR_PURPLE, + PATH_LOCK = COLOR_YELLOW, + PATH_MOON = COLOR_BLUE_LIGHT, + )) diff --git a/code/__DEFINES/cult_defines.dm b/code/__DEFINES/cult_defines.dm index e927982e6d1..adc434b37e8 100644 --- a/code/__DEFINES/cult_defines.dm +++ b/code/__DEFINES/cult_defines.dm @@ -17,6 +17,8 @@ #define MAX_BLOODCHARGE 4 /// Maximum number of spells without an empowering rune #define RUNELESS_MAX_BLOODCHARGE 1 +/// Maximum number of spells with enhanced magic +#define ENHANCED_BLOODCHARGE 5 #define BLOOD_SPEAR_COST 150 #define BLOOD_BARRAGE_COST 300 #define BLOOD_ORB_COST 50 @@ -69,3 +71,8 @@ /// Checks that the given element is living an has a cult antag datum #define IS_CULTIST(mob) (isliving(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/cultist)) // for someone TODO, move all antag checks over to TG's `IS_TRAITOR` defines. Also remove `isliving()` from this call someday + +// Used to keep track of items rewarded after a heretic is sacked. +#define CURSED_BLADE_UNLOCKED "Cursed Blade" +#define CRIMSON_MEDALLION_UNLOCKED "Crimson Medallion" +#define PROTEON_ORB_UNLOCKED "Proteon Orb" diff --git a/code/__DEFINES/dcs/heretic_signals.dm b/code/__DEFINES/dcs/heretic_signals.dm new file mode 100644 index 00000000000..6a3da08032a --- /dev/null +++ b/code/__DEFINES/dcs/heretic_signals.dm @@ -0,0 +1,19 @@ +/// Heretic signals + +/// From /datum/spell/touch/mansus_grasp/cast_on_hand_hit : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_MANSUS_GRASP_ATTACK "mansus_grasp_attack" + /// Default behavior is to use the hand, so return this to blocks the mansus fist from being consumed after use. + #define COMPONENT_BLOCK_HAND_USE (1<<0) +/// From /datum/spell/touch/mansus_grasp/cast_on_secondary_hand_hit : (mob/living/source, atom/target) +#define COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY "mansus_grasp_attack_secondary" + /// Default behavior is to continue attack chain and do nothing else, so return this to use up the hand after use. + #define COMPONENT_USE_HAND (1<<0) + +/// From /obj/item/melee/sickly_blade/afterattack : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_BLADE_ATTACK "blade_attack" + +/// From /obj/item/melee/sickly_blade/afterattack : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_BLADE_TRIGGER_MARK "blade_attack_upgrade" + +/// From /obj/item/melee/sickly_blade/ranged_interact_with_atom (without proximity) : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_RANGED_BLADE_ATTACK "ranged_blade_attack" diff --git a/code/__DEFINES/dcs/item_signals.dm b/code/__DEFINES/dcs/item_signals.dm index 68ab7cc4f26..3d65f7028ec 100644 --- a/code/__DEFINES/dcs/item_signals.dm +++ b/code/__DEFINES/dcs/item_signals.dm @@ -116,6 +116,13 @@ #define COMSIG_SPEED_POTION_APPLIED "speed_potion" #define SPEED_POTION_STOP (1<<0) + +// Organ signals +/// Called on the organ when it is implanted into someone (mob/living/carbon/receiver) +#define COMSIG_ORGAN_IMPLANTED "organ_implanted" +/// Called on the organ when it is removed from someone (mob/living/carbon/old_owner) +#define COMSIG_ORGAN_REMOVED "organ_removed" + // Cyborg specific items /// from /mob/living/silicon/robot/proc/activate_item() (mob/user), A general signal for if a specific borg item needs something done when being activated. @@ -123,3 +130,4 @@ /// from /mob/living/silicon/robot/proc/deactivate_item() (mob/user), A general signal for if a specific borg item needs something done when being deactivated. #define COMSIG_CYBORG_ITEM_DEACTIVATED "cyborg_deactivation" + diff --git a/code/__DEFINES/dcs/leash_signals.dm b/code/__DEFINES/dcs/leash_signals.dm new file mode 100644 index 00000000000..d85fdd3e6fa --- /dev/null +++ b/code/__DEFINES/dcs/leash_signals.dm @@ -0,0 +1,8 @@ +/// Called when a /datum/component/leash must forcibly teleport the parent to the owner. +/// Fired on the object with the leash component. +#define COMSIG_LEASH_FORCE_TELEPORT "leash_force_teleport" + +/// Called when a /datum/component/leash plans on pathfinding to the target, if out of range. +/// Fired on the object with the leash component. +#define COMSIG_LEASH_PATH_STARTED "leash_path_started" + diff --git a/code/__DEFINES/dcs/mob_signals.dm b/code/__DEFINES/dcs/mob_signals.dm index 7de55d13c33..d45d0383505 100644 --- a/code/__DEFINES/dcs/mob_signals.dm +++ b/code/__DEFINES/dcs/mob_signals.dm @@ -101,6 +101,17 @@ ///Called when movement intent is toggled. #define COMSIG_MOVE_INTENT_TOGGLED "move_intent_toggled" +///from base of obj/allowed(mob/M): (/obj) returns ACCESS_ALLOWED if mob has id access to the obj +#define COMSIG_MOB_TRIED_ACCESS "tried_access" + #define ACCESS_ALLOWED (1<<0) + #define ACCESS_DISALLOWED (1<<1) + #define LOCKED_ATOM_INCOMPATIBLE (1<<2) + +/// A mob has just equipped an item. Called on [/mob] from base of [/obj/item/equipped()]: (/obj/item/equipped_item, slot) +#define COMSIG_MOB_EQUIPPED_ITEM "mob_equipped_item" +/// A mob has just unequipped an item. +#define COMSIG_MOB_UNEQUIPPED_ITEM "mob_unequipped_item" + // /mob/living ///from base of mob/living/resist() (/mob/living) @@ -247,6 +258,38 @@ /// from remove_ventcrawler(): (mob/living/crawler) #define COMSIG_LIVING_EXIT_VENTCRAWL "living_exit_ventcrawl" + +///From living/Life(). (seconds, times_fired) +#define COMSIG_LIVING_LIFE "living_life" + /// Block the Life() proc from proceeding... this should really only be done in some really wacky situations. + #define COMPONENT_LIVING_CANCEL_LIFE_PROCESSING (1<<0) + +/// Sent from /datum/action/cooldown/spell/before_cast() to the caster: (datum/action/cooldown/spell/spell, atom/cast_on) +#define COMSIG_MOB_BEFORE_SPELL_CAST "mob_spell_pre_cast" +/// Sent from /datum/action/cooldown/spell/before_cast() to the spell: (atom/cast_on) +#define COMSIG_SPELL_BEFORE_CAST "spell_pre_cast" + /// Return to prevent the spell cast from continuing. + #define SPELL_CANCEL_CAST (1 << 0) + /// Return from before cast signals to prevent the spell from giving off sound or invocation. + #define SPELL_NO_FEEDBACK (1 << 1) + /// Return from before cast signals to prevent the spell from going on cooldown before aftercast. + #define SPELL_NO_IMMEDIATE_COOLDOWN (1 << 2) + +#define COMSIG_TOUCH_HANDLESS_CAST "spell_touch_handless_cast" + /// Return this to prevent the hand spawning/unspawning + #define COMPONENT_CAST_HANDLESS (1<<0) + +///From /obj/effect/rune/convert/do_sacrifice() : (list/invokers) +#define COMSIG_LIVING_CULT_SACRIFICED "living_cult_sacrificed" + /// Return to stop the sac from occurring + #define STOP_SACRIFICE (1<<0) + /// Don't send a message for sacrificing this thing, we have our own + #define SILENCE_SACRIFICE_MESSAGE (1<<1) + /// Don't send a message for sacrificing this thing UNLESS it's the cult target + #define SILENCE_NONTARGET_SACRIFICE_MESSAGE (1<<2) + /// Dusts the target instead of gibbing them (no soulstone) + #define DUST_SACRIFICE (1<<3) + /// From base of /client/Move(): (new_loc, direction) #define COMSIG_MOB_CLIENT_PRE_MOVE "mob_client_pre_move" /// Should always match COMPONENT_MOVABLE_BLOCK_PRE_MOVE as these are interchangeable and used to block movement. diff --git a/code/__DEFINES/dcs/obj_signals.dm b/code/__DEFINES/dcs/obj_signals.dm index 4e87397440f..1543f3a559a 100644 --- a/code/__DEFINES/dcs/obj_signals.dm +++ b/code/__DEFINES/dcs/obj_signals.dm @@ -47,3 +47,9 @@ #define COMSIG_SUPERMATTER_CONSUMED "sm_consumed_this" #define COMSIG_MOBILE_PORT_DOCKED "mobile_port_docked" + +/// When the lionhunter rifle hits something +#define COMSIG_LIONHUNTER_ON_HIT "lionhunter_on_hit" + +/// When the lionhunter shoots so I can unscope +#define COMSIG_LIONHUNTER_FIRE "lionhunter_fire" diff --git a/code/__DEFINES/dna.dm b/code/__DEFINES/dna.dm index 39cd592983d..8f8dac65ea1 100644 --- a/code/__DEFINES/dna.dm +++ b/code/__DEFINES/dna.dm @@ -70,4 +70,10 @@ #define DNA_GENDER_MALE 1 #define DNA_GENDER_PLURAL 2 + +#define ORGAN_SLOT_BRAIN "brain" +#define ORGAN_SLOT_LIVER "liver" +#define ORGAN_SLOT_LUNGS "lungs" + #define ENCODE_DNA_BLOCK(value) num2hex(value, 3) + diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 3024028bd44..5e203d399e1 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -154,6 +154,8 @@ #define NO_LAVA_GEN (1<<1) //Blocks lava rivers being generated on the turf #define NO_RUINS (1<<2) #define LAVA_BRIDGE (1<<3) //! This turf has already been reserved for a lavaland bridge placement. +/// Blocks this turf from being rusted +#define NO_RUST (1<<4) // turf flags, under the turf_flags variable /// If a turf is an unused reservation turf awaiting assignment diff --git a/code/__DEFINES/gamemode.dm b/code/__DEFINES/gamemode.dm index b1b026069b6..cf3fc5af889 100644 --- a/code/__DEFINES/gamemode.dm +++ b/code/__DEFINES/gamemode.dm @@ -16,6 +16,7 @@ #define TARGET_INVALID_HEAD 15 #define TARGET_INVALID_ANTAG 16 #define TARGET_INVALID_CONFLICTING_OBJECTIVE 17 +#define TARGET_INVALID_HERETIC 18 //gamemode istype helpers #define GAMEMODE_IS_CULT (SSticker && istype(SSticker.mode, /datum/game_mode/cult)) @@ -61,6 +62,7 @@ #define SPECIAL_ROLE_XENOMORPH_LARVA "Xenomorph Larva" #define SPECIAL_ROLE_ZOMBIE "Zombie" #define SPECIAL_ROLE_TOURIST "Tourist" +#define SPECIAL_ROLE_HERETIC "Heretic" #define SPECIAL_ROLE_EVENTMISC "Event Role" // Constants used by code which checks the status of nuclear blasts during a diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index c59f49b38d9..984c62d46d4 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -29,7 +29,8 @@ #define JANI_HUD "24" // Sign overlay over cleanable decals #define PRESSURE_HUD "25" // Pressure coloring for tiles #define MALF_AI_HUD "26" // Malf status blips for borgs -#define ANOMALOUS_HUD "27" // Seeing anomalous particulate +#define ANOMALOUS_HUD "27" // Seeing anomalous particulate +#define HERETIC_HUD "28" // Seeing reality smashes and shit //by default everything in the hud_list of an atom is an image //a value in hud_list with one of these will change that behavior @@ -64,6 +65,9 @@ #define ANTAG_HUD_BLOB 24 #define ANTAG_HUD_ZOMBIE 25 #define ANTAG_HUD_MIND_FLAYER 26 +#define DATA_HUD_HERETIC 27 +#define ANTAG_HUD_HERETIC 28 +#define ANTAG_HUD_HERETIC_BEAST 29 // Notification action types #define NOTIFY_JUMP "jump" diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index c834d74cd0d..6ffdcaa0bd8 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -16,7 +16,7 @@ #define FLOOR_LIGHTING_LAMPS_SELFGLOW -3 #define FLOOR_LIGHTING_LAMPS_PLANE -2 #define FLOOR_LIGHTING_LAMPS_RENDER_TARGET "*FLOOR_LIGHTING_LAMPS_RENDER_TARGET" - +#define ABOVE_GAME_PLANE -1.5 #define GAME_PLANE -1 #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index 3cfabf4d67e..d10528d8c28 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -497,6 +497,7 @@ #define MAPTEXT(text) {"[##text]"} #define MAPTEXT_CENTER(text) {"[##text]"} #define MAPTEXT_SMALL(text) {"[##text]"} +#define MAPTEXT_TINY_UNICODE(text) {"[##text]"} //Fullscreen overlay resolution in tiles. #define FULLSCREEN_OVERLAY_RESOLUTION_X 15 diff --git a/code/__DEFINES/mob_defines.dm b/code/__DEFINES/mob_defines.dm index 246236b5d4f..cd8fd19f730 100644 --- a/code/__DEFINES/mob_defines.dm +++ b/code/__DEFINES/mob_defines.dm @@ -10,6 +10,8 @@ #define ORGAN_DISFIGURED (1 << 6) #define ORGAN_BURNT (1 << 7) #define ORGAN_SALVED (1 << 8) +/// An organ that is ostensibly dangerous when inside a body +#define ORGAN_HAZARDOUS (1 << 9) // Organ datum defines. Each one of these represents a slot for organ datums in internal_organ_datums #define ORGAN_DATUM_HEART "heart" @@ -387,6 +389,13 @@ #define BRAIN_DAMAGE_RATIO_SEVERE 8 / 12 #define BRAIN_DAMAGE_RATIO_CRITICAL 10 / 12 +//Disgust levels for humans +#define DISGUST_LEVEL_MAXEDOUT 1500 +#define DISGUST_LEVEL_VERYDISGUSTED 1000 +#define DISGUST_LEVEL_DISGUSTED 750 +#define DISGUST_LEVEL_VERYGROSS 500 +#define DISGUST_LEVEL_GROSS 250 + #define GRAB_PIXEL_SHIFT_PASSIVE 6 #define GRAB_PIXEL_SHIFT_AGGRESSIVE 12 #define GRAB_PIXEL_SHIFT_NECK 16 diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 80fd173c43b..b73f39bf14a 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -28,6 +28,7 @@ #define ROLE_TOURIST "Tourist" #define ROLE_VAMPIRE "vampire" #define ROLE_MIND_FLAYER "mindflayer" +#define ROLE_HERETIC "heretic" // Role tags for EVERYONE! #define ROLE_DEMON "demon" #define ROLE_SENTIENT "sentient animal" @@ -69,6 +70,7 @@ GLOBAL_LIST_INIT(special_roles_antags, list( ROLE_ALIEN, // Xenomorph ROLE_WIZARD = /datum/game_mode/wizard, // Wizard ROLE_MIND_FLAYER, + ROLE_HERETIC, // UNUSED/BROKEN ANTAGS // ROLE_HOG_GOD = /datum/game_mode/hand_of_god, diff --git a/code/__DEFINES/sound_defines.dm b/code/__DEFINES/sound_defines.dm index eff43522ba3..b75a538e617 100644 --- a/code/__DEFINES/sound_defines.dm +++ b/code/__DEFINES/sound_defines.dm @@ -91,7 +91,7 @@ -#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\ +#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heartbeat.ogg', 'sound/effects/screech.ogg',\ 'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\ 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\ 'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\ diff --git a/code/__DEFINES/spell_defines.dm b/code/__DEFINES/spell_defines.dm index e23568a6103..ef982338e45 100644 --- a/code/__DEFINES/spell_defines.dm +++ b/code/__DEFINES/spell_defines.dm @@ -8,3 +8,7 @@ #define SMOKE_HARMLESS 1 #define SMOKE_COUGHING 2 #define SMOKE_SLEEPING 3 + +#define INVOCATION_NONE "none" +#define INVOCATION_WHISPER "whisper" +#define INVOCATION_SHOUT "shout" diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index d1636ce20d3..b9ab785276f 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -187,6 +187,7 @@ #define STATUS_EFFECT_NO_OXY_HEAL /datum/status_effect/transient/no_oxy_heal #define STATUS_EFFECT_JITTER /datum/status_effect/transient/jittery #define STATUS_EFFECT_CULT_SLUR /datum/status_effect/transient/cult_slurring +#define STATUS_EFFECT_HERETIC_SLUR /datum/status_effect/transient/heretic_slurring #define STATUS_EFFECT_STAMMER /datum/status_effect/transient/stammering #define STATUS_EFFECT_SLURRING /datum/status_effect/transient/slurring #define STATUS_EFFECT_LOSE_BREATH /datum/status_effect/transient/lose_breath diff --git a/code/__DEFINES/turfs.dm b/code/__DEFINES/turfs.dm index 9640523c7bc..91a5c46df2a 100644 --- a/code/__DEFINES/turfs.dm +++ b/code/__DEFINES/turfs.dm @@ -14,6 +14,14 @@ #define MINERAL_PREVENT_DIG 0 //! A mineral turf should not be changed when mined. #define MINERAL_ALLOW_DIG 1 //! A mineral turf should be dug out when mined. + +// Defines for turfs rust resistance +#define RUST_RESISTANCE_BASIC 1 +#define RUST_RESISTANCE_REINFORCED 2 +#define RUST_RESISTANCE_TITANIUM 3 +#define RUST_RESISTANCE_ORGANIC 4 +#define RUST_RESISTANCE_ABSOLUTE 5 + /// Returns an outline (neighboring turfs) of the given block #define CORNER_OUTLINE(corner, width, height) ( \ CORNER_BLOCK_OFFSET(corner, width + 2, 1, -1, -1) + \ diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 1f5f9b7f749..3da309f513c 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -242,6 +242,9 @@ GLOBAL_PROTECT(log_end) /proc/start_log(log) rustlibs_log_write(log, "Starting up. Round ID is [GLOB.round_id ? GLOB.round_id : "NULL"]\n-------------------------[GLOB.log_end]") +/proc/log_heretic_knowledge(log) + rustlibs_log_write(GLOB.world_game_log, "Heretic knowledge log: [log]") + // Helper procs for building detailed log lines /proc/datum_info_line(datum/d) diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm index 90888577dc8..300ff9e681a 100644 --- a/code/__HELPERS/cmp.dm +++ b/code/__HELPERS/cmp.dm @@ -63,3 +63,8 @@ /proc/cmp_ruin_placement_cost(datum/map_template/ruin/A, datum/map_template/ruin/B) return A.get_cost() - B.get_cost() + + +/// Orders heretic knowledge by priority +/proc/cmp_heretic_knowledge(datum/heretic_knowledge/knowledge_a, datum/heretic_knowledge/knowledge_b) + return initial(knowledge_b.priority) - initial(knowledge_a.priority) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index a9e9b459116..80d3d6414df 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -523,3 +523,28 @@ min(list_y), max(list_x), max(list_y)) + +///Checks to see if `atom/source` is behind `atom/target` +/proc/check_behind(atom/source, atom/target) + // Let's see if source is behind target + // "Behind" is defined as 3 tiles directly to the back of the target + // x . . + // x > . + // x . . + + // We'll take "same tile" as "behind" for ease + if(target.loc == source.loc) + return TRUE + + // We'll also assume lying down is behind, as mob directions when lying are unclear + if(isliving(target)) + var/mob/living/living_target = target + if(living_target.body_position == LYING_DOWN) + return TRUE + + // Exceptions aside, let's actually check if they're, yknow, behind + var/dir_target_to_source = get_dir(target, source) + if(target.dir & REVERSE_DIR(dir_target_to_source)) + return TRUE + + return FALSE diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index a5e3bd39474..f942c0d87e9 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -1038,3 +1038,11 @@ **/ /proc/list_clear_nulls(list/list_to_clear) return (list_to_clear.RemoveAll(null) > 0) + +///Flattens a keyed list into a list of its contents +/proc/flatten_list(list/key_list) + if(!islist(key_list)) + return null + . = list() + for(var/key in key_list) + . |= LIST_VALUE_WRAP_LISTS(key_list[key]) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index d2211a44d76..651fa6c3665 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -265,6 +265,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_RECENTLY_BLOCKED_MAGIC "recently_blocked_magic" #define TRAIT_UNKNOWN "unknown" // The person with this trait always appears as 'unknown'. #define TRAIT_CRYO_DESPAWNING "cryo_despawning" // dont adminbus this please + +/// Trait given to anything linked to, not necessarily allied to, the mansus +#define TRAIT_MANSUS_TOUCHED "mansus_touched" +/// This trait makes you immune to baton knockdown. +#define TRAIT_BATON_RESISTANCE "baton_resistance" + #define TRAIT_EXAMINE_HALLUCINATING "examine_hallucinating" #define TRAIT_WIRE_BLIND "wire_blind" // This doesn't block someone from seeing wires or recalling their position, but randomizes name / function to the user #define TRAIT_BOOTS_OF_JUMPING "boots_of_jumping" // Mob can do the jump emote without losing stamina @@ -278,9 +284,19 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_MOB_EATER "mob_eater" #define TRAIT_XENOBIO_SPAWNED "xenobio_spawned" +#define TRAIT_BOMBIMMUNE "bombimmune" + +/// Trait for when you can no longer gain body heat +#define TRAIT_HYPOTHERMIC "body_hypothermic" + +/// Used to prevent multiple floating blades from triggering over the same target +#define TRAIT_BEING_BLADE_SHIELDED "being_blade_shielded" + + /// Trait that prevents AI controllers from planning detached from ai_status to prevent weird state stuff. #define TRAIT_AI_PAUSED "trait_ai_paused" + //***** MIND TRAITS *****/ #define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion #define TRAIT_TABLE_LEAP "table_leap" // Lets bartender and chef mount tables faster @@ -311,9 +327,18 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_SILENT_INSERTION "silent_insertion" /// Makes an item active, this is generally used by energy based weapons or toggle based items. #define TRAIT_ITEM_ACTIVE "item_active" + +/// Allows heretics to cast their spells. +#define TRAIT_ALLOW_HERETIC_CASTING "allow_heretic_casting" +/// Designates a heart as a living heart for a heretic. +#define TRAIT_LIVING_HEART "living_heart" +/// Added to those who have been sacrificed. +#define TRAIT_WAS_SACRIFICED "was_sacrificed" + /// Forbids running broadcast_examine() in examinate(). #define TRAIT_HIDE_EXAMINE "hide_examine" + /// A surgical tool; when in hand in help intent (and with a surgery in progress) won't attack the user #define TRAIT_SURGICAL "surgical_tool" @@ -350,6 +375,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Prevents seeing this item on examine when on a mob, or seeing it in the strip menu. It's like ABSTRACT, without making the item fail to interact in several ways. The item can still be stripped however, combine with no_strip unless you have a reason not to. #define TRAIT_SKIP_EXAMINE "skip_examine" +/// Items with this trait will not have their worn icon overlayed. +#define TRAIT_NO_WORN_ICON "no_worn_icon" + /// A general trait for tracking whether a zombie owned the organ or limb #define TRAIT_I_WANT_BRAINS_ORGAN "zombie_organ" @@ -575,6 +603,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai // Causes the effect to go through a teleporter instead of being deleted by it. #define TRAIT_EFFECT_CAN_TELEPORT "trait_effect_can_teleport" +/// Trait applied by element +#define ELEMENT_TRAIT(source) "element_trait_[source]" + //***** MOVABLE ATOM TRAITS *****// // Prevents the atom from being transitioned to another Z level when approaching the edge of the map. #define TRAIT_NO_EDGE_TRANSITIONS "trait_no_edge_transitions" @@ -598,3 +629,13 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Proc wrapper of remove_trait. You should only use this for callback. Otherwise, use the macro. /proc/callback_remove_trait(datum/target, trait, source) REMOVE_TRAIT(target, trait, source) + +/// Proc that handles adding multiple traits to a target via a list. Must have a common source and target. +/datum/proc/add_traits(list/list_of_traits, source) + for(var/trait in list_of_traits) + ADD_TRAIT(src, trait, source) + +/// Proc that handles removing multiple traits from a target via a list. Must have a common source and target. +/datum/proc/remove_traits(list/list_of_traits, source) + for(var/trait in list_of_traits) + REMOVE_TRAIT(src, trait, source) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 4135db31786..7034031090e 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -336,3 +336,53 @@ if(input == "true") return TRUE return FALSE // + +/// Turns a Body_parts_covered bitfield into a list of organ/limb names. +/proc/cover_flags2body_zones(bpc) + var/list/covered_parts = list() + + if(!bpc) + return 0 + + if(bpc == FULL_BODY) + covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM,BODY_ZONE_HEAD,BODY_ZONE_CHEST,BODY_ZONE_L_LEG,BODY_ZONE_R_LEG) + + else + if(bpc & HEAD) + covered_parts |= list(BODY_ZONE_HEAD) + if(bpc & UPPER_TORSO || bpc & LOWER_TORSO) + covered_parts |= list(BODY_ZONE_CHEST) + + if(bpc & ARMS) + covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM) + else + if(bpc & ARM_LEFT) + covered_parts |= list(BODY_ZONE_L_ARM) + if(bpc & ARM_RIGHT) + covered_parts |= list(BODY_ZONE_R_ARM) + + if(bpc & HANDS) + covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM) + else + if(bpc & HAND_LEFT) + covered_parts |= list(BODY_ZONE_L_ARM) + if(bpc & HAND_RIGHT) + covered_parts |= list(BODY_ZONE_R_ARM) + + if(bpc & LEGS) + covered_parts |= list(BODY_ZONE_L_LEG,BODY_ZONE_R_LEG) + else + if(bpc & LEG_LEFT) + covered_parts |= list(BODY_ZONE_L_LEG) + if(bpc & LEG_RIGHT) + covered_parts |= list(BODY_ZONE_R_LEG) + + if(bpc & FEET) + covered_parts |= list(BODY_ZONE_L_LEG,BODY_ZONE_R_LEG) + else + if(bpc & FOOT_LEFT) + covered_parts |= list(BODY_ZONE_L_LEG) + if(bpc & FOOT_RIGHT) + covered_parts |= list(BODY_ZONE_R_LEG) + + return covered_parts diff --git a/code/_globalvars/game_modes.dm b/code/_globalvars/game_modes.dm index 9ceadf9e7c0..7946e038579 100644 --- a/code/_globalvars/game_modes.dm +++ b/code/_globalvars/game_modes.dm @@ -10,3 +10,6 @@ GLOBAL_VAR(roundstart_ready_players) // Number of players who were readied up at /// We want anomalous_particulate_tracker to exist only once and be accessible from anywhere. GLOBAL_DATUM_INIT(anomaly_smash_track, /datum/anomalous_particulate_tracker, new) + +/// We want reality_smash_tracker to exist only once and be accessible from anywhere. +GLOBAL_DATUM_INIT(reality_smash_track, /datum/reality_smash_tracker, new) diff --git a/code/_globalvars/lists/maint_loot_tables.dm b/code/_globalvars/lists/maint_loot_tables.dm index 9e4122601d3..712e360bbb2 100644 --- a/code/_globalvars/lists/maint_loot_tables.dm +++ b/code/_globalvars/lists/maint_loot_tables.dm @@ -32,6 +32,8 @@ GLOBAL_LIST_INIT(maintenance_loot_tier_0, list( /obj/item/storage/box, /obj/item/storage/fancy/crayons, /obj/item/storage/fancy/matches, + /obj/item/food/grown/harebell, + /obj/item/food/grown/poppy, ) = 2, list( diff --git a/code/_globalvars/lists/misc_lists.dm b/code/_globalvars/lists/misc_lists.dm index 208dfd7043c..829cd3147b9 100644 --- a/code/_globalvars/lists/misc_lists.dm +++ b/code/_globalvars/lists/misc_lists.dm @@ -98,3 +98,9 @@ GLOBAL_LIST_INIT(admin_permission_names, alist( R_VIEWLOGS = "VIEWLOGS", )) GLOBAL_PROTECT(admin_permission_names) + +GLOBAL_LIST_INIT(blacklisted_heretic_areas, list( + /area/station/turret_protected, + /area/station/aisat, + /area/station/science/toxins/test, + )) diff --git a/code/_globalvars/lists/reagents_lists.dm b/code/_globalvars/lists/reagents_lists.dm index 978acdbcd68..75ac58ef2cc 100644 --- a/code/_globalvars/lists/reagents_lists.dm +++ b/code/_globalvars/lists/reagents_lists.dm @@ -50,5 +50,5 @@ GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_i "teslium_paste", "omnizine_no_addiction", "zombiecure1", "zombiecure2", "zombiecure3", "zombiecure4", "admincleaner_all", "admincleaner_item", "admincleaner_mob", - "synthetic_omnizine_no_addiction", "surge_plus", "viral_eraser" + "synthetic_omnizine_no_addiction", "surge_plus", "viral_eraser", )) diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index e33fab6dd5d..a4214be4cb0 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -124,7 +124,10 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_WIRE_BLIND" = TRAIT_WIRE_BLIND, "TRAIT_FROM_TENDRIL" = TRAIT_FROM_TENDRIL, "TRAIT_TENTACLE_IMMUNE" = TRAIT_TENTACLE_IMMUNE, - "TRAIT_BOOTS_OF_JUMPING" = TRAIT_BOOTS_OF_JUMPING + "TRAIT_MANSUS_TOUCHED" = TRAIT_MANSUS_TOUCHED, + "TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE, + "TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE, + "TRAIT_BOOTS_OF_JUMPING" = TRAIT_BOOTS_OF_JUMPING, ), /datum/mind = list( @@ -154,7 +157,11 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_SKIP_EXAMINE" = TRAIT_SKIP_EXAMINE, "TRAIT_I_WANT_BRAINS_ORGAN" = TRAIT_I_WANT_BRAINS_ORGAN, "TRAIT_ANTI_VIRAL" = TRAIT_ANTI_VIRAL, - "TRAIT_ABSORB_RADS" = TRAIT_ABSORB_RADS + "TRAIT_ABSORB_RADS" = TRAIT_ABSORB_RADS, + "TRAIT_NO_WORN_ICON" = TRAIT_NO_WORN_ICON, + "TRAIT_ALLOW_HERETIC_CASTING" = TRAIT_ALLOW_HERETIC_CASTING, + "TRAIT_WAS_SACRIFICED" = TRAIT_WAS_SACRIFICED, + "TRAIT_LIVING_HEART" = TRAIT_LIVING_HEART, ), /turf = list( diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 4ab44ce1b49..7827eb8e416 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -121,6 +121,11 @@ icon_state = "fog" color = "#FF0000" +/atom/movable/screen/fullscreen/stretch/curse + icon = 'icons/mob/screen_fog.dmi' + icon_state = "curse" + layer = CURSE_LAYER + /atom/movable/screen/fullscreen/stretch/flash icon = 'icons/mob/screen_gen.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" diff --git a/code/controllers/subsystem/SSticker.dm b/code/controllers/subsystem/SSticker.dm index efb19d3d207..7eea0f7937a 100644 --- a/code/controllers/subsystem/SSticker.dm +++ b/code/controllers/subsystem/SSticker.dm @@ -68,6 +68,8 @@ SUBSYSTEM_DEF(ticker) /// List of biohazards keyed to the last time their population was sampled. var/list/biohazard_pop_times = list() var/list/biohazard_included_admin_spawns = list() + /// Has cult tried to summon? + var/cult_tried_summon = FALSE /datum/controller/subsystem/ticker/Initialize() login_music = pick(\ diff --git a/code/datums/ai/basic_mobs/basic_subtrees/maintain_distance.dm b/code/datums/ai/basic_mobs/basic_subtrees/maintain_distance.dm index cb2d5bdb8d3..221c1a8772c 100644 --- a/code/datums/ai/basic_mobs/basic_subtrees/maintain_distance.dm +++ b/code/datums/ai/basic_mobs/basic_subtrees/maintain_distance.dm @@ -102,7 +102,7 @@ var/required_distance = minimum_distance - get_dist(controller.pawn, target) // the distance we need to move var/distance = 0 var/turf/chosen_turf - for(var/turf/open/potential_turf in oview(required_distance, controller.pawn)) + for(var/turf/simulated/floor/potential_turf in oview(required_distance, controller.pawn)) var/new_distance_from_target = get_dist(potential_turf, target) if(potential_turf.is_blocked_turf()) continue diff --git a/code/datums/ai/basic_mobs/basic_subtrees/shapechange_ambush.dm b/code/datums/ai/basic_mobs/basic_subtrees/shapechange_ambush.dm new file mode 100644 index 00000000000..c8ed63039d5 --- /dev/null +++ b/code/datums/ai/basic_mobs/basic_subtrees/shapechange_ambush.dm @@ -0,0 +1,48 @@ +/// Shapeshift when we have no target, until someone has been nearby for long enough +/datum/ai_planning_subtree/shapechange_ambush + operational_datums = list(/datum/component/ai_target_timer) + /// Key where we keep our ability + var/ability_key = BB_SHAPESHIFT_ACTION + /// Key where we keep our target + var/target_key = BB_BASIC_MOB_CURRENT_TARGET + /// How long to lull our target into a false sense of security + var/minimum_target_time = 8 SECONDS + +/datum/ai_planning_subtree/shapechange_ambush/select_behaviors(datum/ai_controller/controller, seconds_per_tick) + var/mob/living/living_pawn = controller.pawn + var/is_shifted = ismob(living_pawn.loc) + var/has_target = controller.blackboard_key_exists(target_key) + var/datum/action/cooldown/using_action = controller.blackboard[ability_key] + + if(!is_shifted) + if(has_target) + return // We're busy + + if(using_action?.IsAvailable()) + controller.queue_behavior(/datum/ai_behavior/use_mob_ability/shapeshift, BB_SHAPESHIFT_ACTION) // Shift + return SUBTREE_RETURN_FINISH_PLANNING + + if(!has_target || !using_action?.IsAvailable()) + return SUBTREE_RETURN_FINISH_PLANNING // Lie in wait + var/time_on_target = controller.blackboard[BB_BASIC_MOB_HAS_TARGET_TIME] || 0 + if(time_on_target < minimum_target_time) + return // Wait a bit longer + controller.queue_behavior(/datum/ai_behavior/use_mob_ability/shapeshift, BB_SHAPESHIFT_ACTION) // Surprise! + +/// Selects a random shapeshift ability before shifting +/datum/ai_behavior/use_mob_ability/shapeshift + +/datum/ai_behavior/use_mob_ability/shapeshift/setup(datum/ai_controller/controller, ability_key) + var/datum/spell/mimic/using_action = controller.blackboard[ability_key] + if(using_action?.cooldown_handler.is_on_cooldown()) + return FALSE + if(isnull(using_action.selected_form)) // If we don't have a shape then pick one, AI can't use context wheels + var/list/things = list() + for(var/atom/movable/A in oview(src)) + if(using_action.valid_target(A, src)) + things += A + if(!length(things)) + return + var/atom/movable/T = pick(things) + using_action.take_form(new /datum/mimic_form(T, src), src) + return ..() diff --git a/code/datums/atom_hud.dm b/code/datums/atom_hud.dm index 66da34e945a..319806cdc95 100644 --- a/code/datums/atom_hud.dm +++ b/code/datums/atom_hud.dm @@ -28,7 +28,10 @@ GLOBAL_LIST_INIT(huds, alist( ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(), ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden(), ANTAG_HUD_ZOMBIE = new/datum/atom_hud/antag(), - ANTAG_HUD_MIND_FLAYER = new/datum/atom_hud/antag/hidden() + ANTAG_HUD_MIND_FLAYER = new/datum/atom_hud/antag/hidden(), + DATA_HUD_HERETIC = new/datum/atom_hud/data/heretic(), + ANTAG_HUD_HERETIC = new/datum/atom_hud/antag/hidden(), + ANTAG_HUD_HERETIC_BEAST = new/datum/atom_hud/antag/hidden(), )) /datum/atom_hud diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 1a288482f82..67a2163313f 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -239,7 +239,24 @@ var/armor = L.run_armor_check(limb_to_hit, LASER) L.apply_damage(damage, BURN, limb_to_hit, armor) -/atom/proc/Beam(atom/BeamTarget, +// The beam fireblast spits out, causes people to walk through it to be on fire +/obj/effect/ebeam/fire + name = "fire beam" + +/obj/effect/ebeam/fire/on_atom_entered(datum/source, atom/movable/entered) + if(!isliving(entered)) + return + var/mob/living/living_entered = entered + if(IS_HERETIC_OR_MONSTER(living_entered) || living_entered.has_status_effect(/datum/status_effect/fire_blasted)) + return + living_entered.apply_damage(10, BURN) + living_entered.adjust_fire_stacks(2) + living_entered.IgniteMob() + // Apply the fireblasted effect - no overlay + living_entered.apply_status_effect(/datum/status_effect/fire_blasted) + +/atom/proc/Beam( + atom/BeamTarget, icon_state = "b_beam", icon = 'icons/effects/beam.dmi', time = 5 SECONDS, diff --git a/code/datums/click_intercept.dm b/code/datums/click_intercept.dm index 78e8c8725f7..fe195a8161f 100644 --- a/code/datums/click_intercept.dm +++ b/code/datums/click_intercept.dm @@ -44,10 +44,11 @@ * * If the mob's `client.click_intercept` variable is set to something other than null, calls the `InterceptClickOn` proc for that click intercept datum. Aka, this proc. * + * If you return TRUE, click on ends the click. Otherwise, normal clicking happens * Arguments: * * user - the mob which just clicked on something. * * params - the `params` arguemnt passed from the `ClickOn` proc. * * object - the atom that was just clicked. */ /datum/click_intercept/proc/InterceptClickOn(mob/user, params, atom/object) - return + return TRUE diff --git a/code/datums/components/aura_healing.dm b/code/datums/components/aura_healing.dm new file mode 100644 index 00000000000..7a2ef14fca3 --- /dev/null +++ b/code/datums/components/aura_healing.dm @@ -0,0 +1,148 @@ +#define HEAL_EFFECT_COOLDOWN 1 SECONDS + +/// Applies healing to those in the area. +/// Will provide them with an alert while they're in range, as well as +/// give them a healing particle. +/// Can be applied to those only with a trait conditionally. +/datum/component/aura_healing + /// The range of which to heal + var/range = 5 + + /// Whether or not you must be a visible object of the parent + var/requires_visibility = TRUE + + /// Brute damage to heal over a second + var/brute_heal = 0 + + /// Burn damage to heal over a second + var/burn_heal = 0 + + /// Toxin damage to heal over a second + var/toxin_heal = 0 + + /// Suffocation damage to heal over a second + var/suffocation_heal = 0 + + /// Stamina damage to heal over a second + var/stamina_heal = 0 + + /// Amount of blood to heal over a second + var/blood_heal = 0 + + /// Amount of damage to heal on simple mobs over a second + var/simple_heal = 0 + + /// Trait to limit healing to, if set + var/limit_to_trait = null + + /// The color to give the healing visual + var/healing_color = COLOR_GREEN + + /// A list of being healed to active alerts + var/list/mob/living/current_alerts = list() + + /// Cooldown between showing the heal effect + COOLDOWN_DECLARE(last_heal_effect_time) + +/datum/component/aura_healing/Initialize( + range = 5, + requires_visibility = TRUE, + brute_heal = 0, + burn_heal = 0, + toxin_heal = 0, + suffocation_heal = 0, + stamina_heal = 0, + blood_heal = 0, + simple_heal = 0, + limit_to_trait = null, + healing_color = COLOR_GREEN, +) + if(!isatom(parent)) + return COMPONENT_INCOMPATIBLE + + START_PROCESSING(SSfastprocess, src) + + src.range = range + src.requires_visibility = requires_visibility + src.brute_heal = brute_heal + src.burn_heal = burn_heal + src.toxin_heal = toxin_heal + src.suffocation_heal = suffocation_heal + src.stamina_heal = stamina_heal + src.blood_heal = blood_heal + src.simple_heal = simple_heal + src.limit_to_trait = limit_to_trait + src.healing_color = healing_color + +/datum/component/aura_healing/Destroy(force) + STOP_PROCESSING(SSfastprocess, src) + var/alert_category = "aura_healing_[src.UID()]" + + for(var/mob/living/alert_holder as anything in current_alerts) + alert_holder.clear_alert(alert_category) + current_alerts.Cut() + + return ..() + +/datum/component/aura_healing/process() + var/should_show_effect = COOLDOWN_FINISHED(src, last_heal_effect_time) + if(should_show_effect) + COOLDOWN_START(src, last_heal_effect_time, HEAL_EFFECT_COOLDOWN) + + var/list/to_heal = list() + var/alert_category = "aura_healing_[src.UID()]" + + if(requires_visibility) + for(var/mob/living/candidate in view(range, parent)) + if(!isnull(limit_to_trait) && !HAS_TRAIT(candidate, limit_to_trait)) + continue + to_heal[candidate] = TRUE + else + for(var/mob/living/candidate in range(range, parent)) + if(!isnull(limit_to_trait) && !HAS_TRAIT(candidate, limit_to_trait)) + continue + to_heal[candidate] = TRUE + + for(var/mob/living/candidate as anything in to_heal) + if(!current_alerts[candidate]) + var/atom/movable/screen/alert/aura_healing/alert = candidate.throw_alert(alert_category, /atom/movable/screen/alert/aura_healing, new_master = parent) + alert.desc = "You are being healed by [parent]." + current_alerts[candidate] = TRUE + + if(should_show_effect && candidate.health < candidate.maxHealth) + new /obj/effect/temp_visual/heal(get_turf(candidate), healing_color) + + if(issilicon(candidate)) + candidate.adjustBruteLoss(-brute_heal, updating_health = FALSE) + candidate.adjustFireLoss(-burn_heal, updating_health = FALSE) + + if(iscarbon(candidate)) + candidate.adjustToxLoss(-toxin_heal, updating_health = FALSE) + candidate.adjustOxyLoss(-suffocation_heal, updating_health = FALSE) + candidate.adjustStaminaLoss(-stamina_heal) + if(ishuman(candidate)) + var/mob/living/carbon/human/i_wish_roboheal_was_global = candidate + i_wish_roboheal_was_global.adjustBruteLoss(-brute_heal, updating_health = FALSE, robotic = TRUE) + i_wish_roboheal_was_global.adjustFireLoss(-burn_heal, updating_health = FALSE, robotic = TRUE) + else + candidate.adjustBruteLoss(-brute_heal, updating_health = FALSE) + candidate.adjustFireLoss(-burn_heal, updating_health = FALSE) + + else if(isanimal(candidate)) + var/mob/living/simple_animal/animal_candidate = candidate + animal_candidate.adjustHealth(-simple_heal, updating_health = FALSE) + + if(candidate.blood_volume < BLOOD_VOLUME_NORMAL) + candidate.blood_volume += blood_heal + + candidate.updatehealth() + + for(var/mob/living/remove_alert_from as anything in current_alerts - to_heal) + remove_alert_from.clear_alert(alert_category) + current_alerts -= remove_alert_from + +/atom/movable/screen/alert/aura_healing + name = "Aura Healing" + icon_state = "template" + +#undef HEAL_EFFECT_COOLDOWN diff --git a/code/datums/components/damage_aura.dm b/code/datums/components/damage_aura.dm new file mode 100644 index 00000000000..6b9b27b4cf1 --- /dev/null +++ b/code/datums/components/damage_aura.dm @@ -0,0 +1,149 @@ +#define DAMAGE_EFFECT_COOLDOWN 1 SECONDS + +/// Applies a status effect and deals damage to people in the area. +/// Will deal more damage the more people are present. +/datum/component/damage_aura + /// The range of which to damage + var/range = 5 + + /// Whether or not you must be a visible object of the parent + var/requires_visibility = TRUE + + /// Brute damage to damage over a second + var/brute_damage = 0 + + /// Burn damage to damage over a second + var/burn_damage = 0 + + /// Toxin damage to damage over a second + var/toxin_damage = 0 + + /// Suffocation damage to damage over a second + var/suffocation_damage = 0 + + /// Stamina damage to damage over a second + var/stamina_damage = 0 + + /// Amount of blood to damage over a second + var/blood_damage = 0 + + /// Amount of damage to damage on simple mobs over a second + var/simple_damage = 0 + + /// Which factions are immune to the damage aura + var/list/immune_factions = null + + /// If set, gives a message when damaged + var/damage_message = null + + /// Probability for above. + var/message_probability = 0 + + /// Sets a special set of conditions for the owner + var/current_owner = null + + /// Declares the cooldown timer for the damage aura effect to take place + COOLDOWN_DECLARE(last_damage_effect_time) + +/datum/component/damage_aura/Initialize( + range = 5, + requires_visibility = TRUE, + brute_damage = 0, + burn_damage = 0, + toxin_damage = 0, + suffocation_damage = 0, + stamina_damage = 0, + organ_damage = null, + simple_damage = 0, + immune_factions = null, + damage_message = null, + message_probability = 0, + mob/living/current_owner = null, +) + if(!isatom(parent)) + return COMPONENT_INCOMPATIBLE + + START_PROCESSING(SSfastprocess, src) + + src.range = range + src.requires_visibility = requires_visibility + src.brute_damage = brute_damage + src.burn_damage = burn_damage + src.toxin_damage = toxin_damage + src.suffocation_damage = suffocation_damage + src.stamina_damage = stamina_damage + src.blood_damage = blood_damage + src.simple_damage = simple_damage + src.immune_factions = immune_factions + src.damage_message = damage_message + src.message_probability = message_probability + src.current_owner = current_owner.UID() + +/datum/component/damage_aura/Destroy(force) + STOP_PROCESSING(SSfastprocess, src) // On tg its something with a wait of 0.3 so close enough + return ..() + +/// The requirements for the mob to be effected by the damage aura. +/datum/component/damage_aura/proc/check_requirements(mob/living/target_mob) + if(target_mob.stat == DEAD || faction_check(target_mob.faction, immune_factions)) + return TRUE + return FALSE + +/// What effect the damage aura has if it has an owner. +/datum/component/damage_aura/proc/owner_effect(mob/living/owner_mob) + var/need_mob_update = FALSE + need_mob_update += owner_mob.adjustStaminaLoss(-20) + need_mob_update += owner_mob.adjustBruteLoss(-1, updating_health = FALSE) + need_mob_update += owner_mob.adjustFireLoss(-1, updating_health = FALSE) + need_mob_update += owner_mob.adjustToxLoss(-1, updating_health = FALSE) + need_mob_update += owner_mob.adjustOxyLoss(-1, updating_health = FALSE) + if(owner_mob.blood_volume < BLOOD_VOLUME_NORMAL) + owner_mob.blood_volume += 2 + if(need_mob_update) + owner_mob.updatehealth() + +/datum/component/damage_aura/process() + var/should_show_effect = COOLDOWN_FINISHED(src, last_damage_effect_time) + if(should_show_effect) + COOLDOWN_START(src, last_damage_effect_time, DAMAGE_EFFECT_COOLDOWN) + + var/list/to_damage = list() + if(requires_visibility) + for(var/mob/living/candidate in view(range, parent)) + to_damage += candidate + else + for(var/mob/living/candidate in range(range, parent)) + to_damage += candidate + + for(var/mob/living/candidate as anything in to_damage) + var/mob/living/owner = locateUID(current_owner) + if(owner && owner == candidate) + owner_effect(owner) + continue + if(check_requirements(candidate)) + continue + if(candidate.health < candidate.maxHealth) + new /obj/effect/temp_visual/cosmic_gem(get_turf(candidate)) + + if(damage_message && prob(message_probability)) + to_chat(candidate, damage_message) + + if(iscarbon(candidate) || issilicon(candidate)) + candidate.adjustBruteLoss(brute_damage, updating_health = FALSE) + candidate.adjustFireLoss(burn_damage, updating_health = FALSE) + + if(iscarbon(candidate)) + candidate.adjustToxLoss(toxin_damage, updating_health = FALSE) + candidate.adjustOxyLoss(suffocation_damage, updating_health = FALSE) + candidate.adjustStaminaLoss(stamina_damage) + + else if(isanimal(candidate)) + var/mob/living/simple_animal/animal_candidate = candidate + animal_candidate.adjustHealth(simple_damage, updating_health = FALSE) + + if(candidate.blood_volume > BLOOD_VOLUME_SURVIVE) + candidate.blood_volume -= blood_damage + + candidate.updatehealth() + +#undef DAMAGE_EFFECT_COOLDOWN diff --git a/code/datums/components/death_linked.dm b/code/datums/components/death_linked.dm new file mode 100644 index 00000000000..a8d41045b61 --- /dev/null +++ b/code/datums/components/death_linked.dm @@ -0,0 +1,30 @@ +/** + * ## Death link component + * + * When the owner of this component dies it also gibs a linked mob + */ +/datum/component/death_linked + ///The mob that also dies when the user dies + var/linked_mob_uid + +/datum/component/death_linked/Initialize(mob/living/target_mob) + . = ..() + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + if(isnull(target_mob)) + stack_trace("[type] added to [parent] with no linked mob.") + src.linked_mob_uid = target_mob.UID() + +/datum/component/death_linked/RegisterWithParent() + . = ..() + RegisterSignal(parent, COMSIG_MOB_DEATH, PROC_REF(on_death)) + +/datum/component/death_linked/UnregisterFromParent() + . = ..() + UnregisterSignal(parent, COMSIG_MOB_DEATH) + +///signal called by the stat of the target changing +/datum/component/death_linked/proc/on_death(mob/living/target, gibbed) + SIGNAL_HANDLER + var/mob/living/linked_mob_resolved = locateUID(linked_mob_uid) + linked_mob_resolved?.gib() diff --git a/code/datums/components/effect_remover.dm b/code/datums/components/effect_remover.dm new file mode 100644 index 00000000000..cb0c12c81b7 --- /dev/null +++ b/code/datums/components/effect_remover.dm @@ -0,0 +1,84 @@ +/* + * Simple component for something that is able to destroy + * certain effects (such as cult runes) in one attack. + */ +/datum/component/effect_remover + dupe_mode = COMPONENT_DUPE_ALLOWED + /// Line sent to the user on successful removal. + var/success_feedback + /// Line forcesaid by the user on successful removal. + var/success_forcesay + /// Callback invoked with removal is done. + var/datum/callback/on_clear_callback + /// A typecache of all effects we can clear with our item. + var/list/obj/effect/effects_we_clear + /// If above 0, how long it takes while standing still to remove the effect. + var/time_to_remove = 0 SECONDS + +/datum/component/effect_remover/Initialize( + success_forcesay, + success_feedback, + on_clear_callback, + effects_we_clear, + time_to_remove, + ) + + . = ..() + if(!isitem(parent)) + return COMPONENT_INCOMPATIBLE + + if(!effects_we_clear) + stack_trace("[type] was instantiated without any valid removable effects!") + return COMPONENT_INCOMPATIBLE + + src.success_feedback = success_feedback + src.success_forcesay = success_forcesay + src.on_clear_callback = on_clear_callback + src.effects_we_clear = typecacheof(effects_we_clear) + src.time_to_remove = time_to_remove + +/datum/component/effect_remover/Destroy(force) + on_clear_callback = null + return ..() + +/datum/component/effect_remover/RegisterWithParent() + RegisterSignal(parent, COMSIG_INTERACTING, PROC_REF(try_remove_effect)) + + + +/datum/component/effect_remover/UnregisterFromParent() + UnregisterSignal(parent, COMSIG_INTERACTING) + +/* + * Signal proc for [COMSIG_ITEM_INTERACTING_WITH_ATOM]. + */ + +/datum/component/effect_remover/proc/try_remove_effect(datum/source, mob/user, atom/target) + SIGNAL_HANDLER + + if(!isliving(user)) + return NONE + + if(is_type_in_typecache(target, effects_we_clear)) // Make sure we get all subtypes and everything + INVOKE_ASYNC(src, PROC_REF(do_remove_effect), target, user) + return ITEM_INTERACT_COMPLETE + +/* + * Actually removes the effect, invoking our on_clear_callback before it's deleted. + */ +/datum/component/effect_remover/proc/do_remove_effect(obj/effect/target, mob/living/user) + if(time_to_remove && !do_after(user, time_to_remove, target = target)) + return + + var/obj/item/item_parent = parent + if(success_forcesay) + user.say(success_forcesay) + if(success_feedback) + var/real_feedback = replacetext(success_feedback, "%THEEFFECT", "\the [target]") + real_feedback = replacetext(real_feedback, "%THEWEAPON", "\the [item_parent]") + to_chat(user, real_feedback) + on_clear_callback?.Invoke(target, user) + + if(!QDELETED(target)) + qdel(target) + diff --git a/code/datums/components/leash.dm b/code/datums/components/leash.dm new file mode 100644 index 00000000000..28642da5c6f --- /dev/null +++ b/code/datums/components/leash.dm @@ -0,0 +1,173 @@ +/// Keeps the parent within the distance of its owner as naturally as possible, +/// but teleporting if necessary. +/datum/component/leash + /// The owner of the leash. If this is qdeleted, the leash is as well. + var/atom/movable/owner + + /// The maximum distance you can move from your owner + var/distance + + /// The object type to create on the old turf when forcibly teleporting out + var/force_teleport_out_effect + + /// The object type to create on the new turf when forcibly teleporting out + var/force_teleport_in_effect + + VAR_PRIVATE + // Pathfinding can yield, so only move us closer if this is the best one + current_path_tick = 0 + last_completed_path_tick = 0 + + performing_path_move = FALSE + +/datum/component/leash/Initialize( + atom/movable/owner, + distance = 3, + force_teleport_out_effect, + force_teleport_in_effect, +) + . = ..() + + if(!ismovable(parent)) + stack_trace("Parent must be a movable") + return COMPONENT_INCOMPATIBLE + + if(!ismovable(owner)) + stack_trace("[owner] (owner) is not a movable") + return COMPONENT_INCOMPATIBLE + + if(!isnum(distance)) + stack_trace("[distance] (distance) must be a number") + return COMPONENT_INCOMPATIBLE + + if(!isnull(force_teleport_out_effect) && !ispath(force_teleport_out_effect)) + stack_trace("force_teleport_out_effect must be null or a path, not [force_teleport_out_effect]") + return COMPONENT_INCOMPATIBLE + + if(!isnull(force_teleport_in_effect) && !ispath(force_teleport_in_effect)) + stack_trace("force_teleport_in_effect must be null or a path, not [force_teleport_in_effect]") + return COMPONENT_INCOMPATIBLE + + src.owner = owner + src.distance = distance + src.force_teleport_out_effect = force_teleport_out_effect + src.force_teleport_in_effect = force_teleport_in_effect + + RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(on_owner_qdel)) + + var/static/list/container_connections = list( + COMSIG_MOVABLE_MOVED = PROC_REF(on_owner_moved), + ) + + AddComponent(/datum/component/connect_containers, owner, container_connections) + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_owner_moved)) + RegisterSignal(parent, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_parent_pre_move)) + + check_distance() + +/datum/component/leash/Destroy() + owner = null + return ..() + +/datum/component/leash/proc/set_distance(distance) + ASSERT(isnum(distance)) + src.distance = distance + check_distance() + +/datum/component/leash/proc/on_owner_qdel() + SIGNAL_HANDLER + PRIVATE_PROC(TRUE) + + qdel(src) + +/datum/component/leash/proc/on_owner_moved(atom/movable/source) + SIGNAL_HANDLER + PRIVATE_PROC(TRUE) + + check_distance() + +/datum/component/leash/proc/on_parent_pre_move(atom/movable/source, atom/new_location) + SIGNAL_HANDLER + PRIVATE_PROC(TRUE) + + if(performing_path_move) + return NONE + + var/turf/new_location_turf = get_turf(new_location) + if(get_dist(new_location_turf, owner) <= distance) + return NONE + + if(ismob(source)) + to_chat(source, SPAN_WARNING("You are too far away!")) + + return COMPONENT_MOVABLE_BLOCK_PRE_MOVE + +/datum/component/leash/proc/check_distance() + set waitfor = FALSE + PRIVATE_PROC(TRUE) + + if(get_dist(parent, owner) <= distance) + return + + var/atom/movable/atom_parent = parent + if(isnull(owner.loc)) + atom_parent.moveToNullspace() // If our parent is in nullspace I guess we gotta go there too + return + if(isnull(atom_parent.loc)) + force_teleport_back("in nullspace") // If we're in nullspace, get outta there + return + + SEND_SIGNAL(parent, COMSIG_LEASH_PATH_STARTED) + + current_path_tick += 1 + var/our_path_tick = current_path_tick + + var/list/path = get_path_to(parent, owner, mintargetdist = distance) + + if(last_completed_path_tick > our_path_tick) + return + + last_completed_path_tick = our_path_tick + + commit_path(path) + +/datum/component/leash/proc/commit_path(list/turf/path) + SHOULD_NOT_SLEEP(TRUE) + PRIVATE_PROC(TRUE) + + performing_path_move = TRUE + + var/atom/movable/movable_parent = parent + + for(var/turf/to_move as anything in path) + // Could be an older path, don't make us teleport back + if(!to_move.Adjacent(parent)) + continue + + if(!movable_parent.Move(to_move)) + force_teleport_back("bad path step") + performing_path_move = FALSE + return + + if(get_dist(parent, owner) > distance) + force_teleport_back("incomplete path") + + performing_path_move = FALSE + +/datum/component/leash/proc/force_teleport_back(reason) + PRIVATE_PROC(TRUE) + + var/atom/movable/movable_parent = parent + + SSblackbox.record_feedback("tally", "leash_force_teleport_back", 1, reason) + + if(force_teleport_out_effect) + new force_teleport_out_effect(movable_parent.loc) + + movable_parent.forceMove(get_turf(owner)) + + if(force_teleport_in_effect) + new force_teleport_in_effect(movable_parent.loc) + + SEND_SIGNAL(parent, COMSIG_LEASH_FORCE_TELEPORT) + diff --git a/code/datums/components/regenerator.dm b/code/datums/components/regenerator.dm new file mode 100644 index 00000000000..76aea559087 --- /dev/null +++ b/code/datums/components/regenerator.dm @@ -0,0 +1,142 @@ +#define REGENERATION_FILTER "healing_glow" + +/** + * # Regenerator component + * + * A mob with this component will regenerate its health over time, as long as it has not received damage + * in the last X seconds. Taking any damage will reset this cooldown. + */ +/datum/component/regenerator + /// You will only regain health if you haven't been hurt for this many seconds + var/regeneration_delay + /// Brute reagined every second + var/brute_per_second + /// Burn reagined every second + var/burn_per_second + /// Toxin reagined every second + var/tox_per_second + /// Oxygen reagined every second + var/oxy_per_second + /// List of damage types we don't care about, in case you want to only remove this with fire damage or something + var/list/ignore_damage_types + /// Colour of regeneration animation, or none if you don't want one + var/outline_colour + /// When this timer completes we start restoring health, it is a timer rather than a cooldown so we can do something on its completion + var/regeneration_start_timer + /// Callback for adding special checks for whether or not we can start regenning + var/datum/callback/regen_check = null + +/datum/component/regenerator/Initialize( + regeneration_delay = 3 SECONDS, + brute_per_second = 2, + burn_per_second = 0, + tox_per_second = 0, + oxy_per_second = 0, + ignore_damage_types = list(STAMINA), + outline_colour = COLOR_GREEN, + regen_check = null, +) + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + + src.regeneration_delay = regeneration_delay + src.brute_per_second = brute_per_second + src.burn_per_second = burn_per_second + src.tox_per_second = tox_per_second + src.oxy_per_second = oxy_per_second + src.ignore_damage_types = ignore_damage_types + src.outline_colour = outline_colour + src.regen_check = regen_check + +/datum/component/regenerator/RegisterWithParent() + . = ..() + RegisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_take_damage)) + +/datum/component/regenerator/UnregisterFromParent() + . = ..() + if(regeneration_start_timer) + deltimer(regeneration_start_timer) + UnregisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE) + stop_regenerating() + +/datum/component/regenerator/Destroy(force) + stop_regenerating() + . = ..() + if(regeneration_start_timer) + deltimer(regeneration_start_timer) + +/// When you take damage, reset the cooldown and start processing +/datum/component/regenerator/proc/on_take_damage(datum/source, damage, damagetype, ...) + SIGNAL_HANDLER + + if(damagetype in ignore_damage_types) + return + + reset_regeneration_timer() + +/datum/component/regenerator/proc/reset_regeneration_timer() + stop_regenerating() + regeneration_start_timer = addtimer(CALLBACK(src, PROC_REF(start_regenerating)), regeneration_delay, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE) + +/// Start processing health regeneration, and show animation if provided +/datum/component/regenerator/proc/start_regenerating() + if(!should_be_regenning(parent)) + return + var/mob/living/living_parent = parent + living_parent.visible_message(SPAN_NOTICE("[living_parent]'s wounds begin to knit closed!")) + START_PROCESSING(SSobj, src) + regeneration_start_timer = null + if(!outline_colour) + return + living_parent.add_filter(REGENERATION_FILTER, 2, list("type" = "outline", "color" = outline_colour, "alpha" = 150, "size" = 1)) + var/filter = living_parent.get_filter(REGENERATION_FILTER) + animate(filter, easing = TRUE, alpha = 125, time = 2 SECONDS, loop = -1) + +/datum/component/regenerator/proc/stop_regenerating() + STOP_PROCESSING(SSobj, src) + var/mob/living/living_parent = parent + var/filter = living_parent.get_filter(REGENERATION_FILTER) + animate(filter) + living_parent.remove_filter(REGENERATION_FILTER) + +/datum/component/regenerator/process() + if(!should_be_regenning(parent)) + stop_regenerating() + return + + var/mob/living/living_parent = parent + var/heal_mod = 1 + // Heal bonus for being in crit. Only applies to carbons + if(iscarbon(living_parent)) + var/mob/living/carbon/carbon_parent + if(/datum/disease/critical/heart_failure in carbon_parent.viruses) + heal_mod = 2 + + var/need_mob_update = FALSE + if(brute_per_second) + need_mob_update += living_parent.adjustBruteLoss(-1 * heal_mod * brute_per_second, updating_health = FALSE) + if(burn_per_second) + need_mob_update += living_parent.adjustFireLoss(-1 * heal_mod * burn_per_second, updating_health = FALSE) + if(tox_per_second) + need_mob_update += living_parent.adjustToxLoss(-1 * heal_mod * tox_per_second, updating_health = FALSE) + if(oxy_per_second) + need_mob_update += living_parent.adjustOxyLoss(-1 * heal_mod * oxy_per_second, updating_health = FALSE) + + if(need_mob_update) + living_parent.updatehealth() + +/// Checks if the passed mob is in a valid state to be regenerating +/datum/component/regenerator/proc/should_be_regenning(mob/living/who) + if(who.stat == DEAD) + return FALSE + + if(regen_check && !regen_check.Invoke(who)) + reset_regeneration_timer() + return FALSE + + if(who.health < who.maxHealth) + return TRUE + + return FALSE + +#undef REGENERATION_FILTER diff --git a/code/datums/components/scope.dm b/code/datums/components/scope.dm index a0e24b1a6e7..7b2206c002c 100644 --- a/code/datums/components/scope.dm +++ b/code/datums/components/scope.dm @@ -14,8 +14,10 @@ var/time_to_scope /// Flags for scoping. Check `code\__DEFINES\flags.dm` var/flags + /// A trait you want to add when scoped in to the mob. + var/trait_to_add -/datum/component/scope/Initialize(range_modifier = 1, zoom_method = ZOOM_METHOD_ITEM_ACTION, item_action_type = /datum/action/zoom, time_to_scope = 0, flags) +/datum/component/scope/Initialize(range_modifier = 1, zoom_method = ZOOM_METHOD_ITEM_ACTION, item_action_type = /datum/action/zoom, time_to_scope = 0, flags, trait_to_add) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE src.range_modifier = range_modifier @@ -23,6 +25,7 @@ src.item_action_type = item_action_type src.time_to_scope = time_to_scope src.flags = flags + src.trait_to_add = trait_to_add /datum/component/scope/Destroy(force) @@ -43,6 +46,7 @@ RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) if(istype(parent, /obj/item/gun)) RegisterSignal(parent, COMSIG_GUN_TRY_FIRE, PROC_REF(on_gun_fire)) + RegisterSignal(parent, COMSIG_LIONHUNTER_FIRE, PROC_REF(on_lionhunter_fire)) /datum/component/scope/UnregisterFromParent() if(item_action_type) @@ -55,6 +59,7 @@ SIGNAL_REMOVETRAIT(TRAIT_WIELDED), COMSIG_GUN_TRY_FIRE, COMSIG_PARENT_EXAMINE, + COMSIG_LIONHUNTER_FIRE, )) /datum/component/scope/process() @@ -115,6 +120,13 @@ if(ZOOM_METHOD_WIELD) examine_list += SPAN_NOTICE("You can [scope] by wielding it with both hands.") +/datum/component/scope/proc/on_lionhunter_fire(obj/item/gun/projectile/shotgun/boltaction/lionhunter/lion) + SIGNAL_HANDLER // COMSIG_LIONHUNTER_FIRE + if(is_zoomed_in()) + var/mob/living/user = lion.loc + stop_zooming(user) + + /** * We find and return the best target to hit on a given turf. * @@ -184,6 +196,9 @@ RegisterSignals(user, capacity_signals, PROC_REF(on_incapacitated)) START_PROCESSING(SSprojectiles, src) ADD_TRAIT(user, TRAIT_SCOPED, "[UID()]") + if(trait_to_add) + ADD_TRAIT(user, trait_to_add, "[UID()]") + user.update_sight() if(istype(parent, /obj/item/gun)) var/obj/item/gun/G = parent G.on_scope_success(user) @@ -219,6 +234,9 @@ COMSIG_PARENT_QDELETING, )) REMOVE_TRAIT(user, TRAIT_SCOPED, "[UID()]") + if(trait_to_add) + REMOVE_TRAIT(user, trait_to_add, "[UID()]") + user.update_sight() user.playsound_local(parent, 'sound/weapons/scope.ogg', 75, TRUE, frequency = -1) user.clear_fullscreen("scope") diff --git a/code/datums/elements/corrupt_organ.dm b/code/datums/elements/corrupt_organ.dm new file mode 100644 index 00000000000..bf68c0f82ca --- /dev/null +++ b/code/datums/elements/corrupt_organ.dm @@ -0,0 +1,57 @@ +/// Component applying shared behaviour by cursed organs granted when sacrificed by a heretic +/// Mostly just does something spooky when it is removed +/datum/element/corrupted_organ + +/datum/element/corrupted_organ/Attach(obj/item/organ/target) + . = ..() + if(!is_internal_organ(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_ORGAN_REMOVED, PROC_REF(on_removed)) + + var/atom/atom_parent = target + atom_parent.color = COLOR_VOID_PURPLE + + atom_parent.add_filter(name = "ray", priority = 1, params = list( + type = "rays", + size = 12, + color = COLOR_VOID_PURPLE, + density = 12 + )) + var/ray_filter = atom_parent.get_filter("ray") + animate(ray_filter, offset = 100, time = 2 MINUTES, loop = -1, flags = ANIMATION_PARALLEL) // Absurdly long animate so nobody notices it hitching when it loops + animate(offset = 0, time = 2 MINUTES) // I sure hope duration of animate doesnt have any performance effect + +/datum/element/corrupted_organ/Detach(datum/source) + UnregisterSignal(source, list(COMSIG_ORGAN_REMOVED)) + return ..() + +/// When we're taken out of someone, do something spooky +/datum/element/corrupted_organ/proc/on_removed(obj/item/organ/organ, mob/living/carbon/loser) + SIGNAL_HANDLER // COMSIG_ORGAN_REMOVED + if(loser.reagents?.has_reagent("holywater") || loser.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_HOLY) || prob(20)) + return + var/turf/origin_turf = get_turf(loser) + playsound(loser, 'sound/magic/forcewall.ogg', vol = 100) + new /obj/effect/temp_visual/curse_blast(origin_turf) + loser.visible_message(SPAN_DANGER("[organ] explodes in a burst of dark energy!")) + for(var/mob/living/target in range(1, origin_turf)) + var/armor = target.run_armor_check() + target.apply_damage(30, damagetype = BURN, blocked = armor, spread_damage = TRUE) + QDEL_IN(organ, 1 SECONDS) + +/obj/effect/temp_visual/curse_blast + icon = 'icons/effects/64x64.dmi' + pixel_x = -16 + pixel_y = -16 + icon_state = "curse" + duration = 0.3 SECONDS + +/obj/effect/temp_visual/curse_blast/Initialize(mapload) + . = ..() + animate(src, transform = matrix() * 0.2, time = 0, flags = ANIMATION_PARALLEL) + animate(transform = matrix() * 2, time = duration, easing = EASE_IN) + + animate(src, alpha = 255, time = 0, flags = ANIMATION_PARALLEL) + animate(alpha = 255, time = 0.2 SECONDS) + animate(alpha = 0, time = 0.1 SECONDS) diff --git a/code/datums/elements/death_gasses.dm b/code/datums/elements/death_gasses.dm new file mode 100644 index 00000000000..977af20c6a2 --- /dev/null +++ b/code/datums/elements/death_gasses.dm @@ -0,0 +1,50 @@ +/** + * ## death gases element! + * + * Bespoke element that spawns one type of gas when a mob is killed + */ +/datum/element/death_gases + element_flags = ELEMENT_BESPOKE + argument_hash_start_idx = 3 + ///What gas the target spawns when killed + var/list/gas_types = list(SPAWN_GAS_PLASMA = 50) + +/datum/element/death_gases/Attach(datum/target, list/gas_types) + . = ..() + if(!isliving(target)) + return ELEMENT_INCOMPATIBLE + if(!gas_types) + stack_trace("[type] added to [target] with NO GAS TYPE.") + return ELEMENT_INCOMPATIBLE + src.gas_types = gas_types + RegisterSignal(target, COMSIG_MOB_DEATH, PROC_REF(on_death)) + +/datum/element/death_gases/Detach(datum/target) + . = ..() + UnregisterSignal(target, COMSIG_MOB_DEATH) + +///signal called by the stat of the target changing +/datum/element/death_gases/proc/on_death(mob/living/target, gibbed) + SIGNAL_HANDLER + var/datum/gas_mixture/mix_to_spawn = new() + for(var/gas_to_add in gas_types) + switch(gas_to_add) + if(SPAWN_GAS_NITROGEN) + mix_to_spawn.set_nitrogen(gas_types[SPAWN_GAS_NITROGEN]) + if(SPAWN_GAS_OXYGEN) + mix_to_spawn.set_oxygen(gas_types[SPAWN_GAS_OXYGEN]) + if(SPAWN_GAS_N2O) + mix_to_spawn.sleeping_agent(gas_types[SPAWN_GAS_N2O]) + if(SPAWN_GAS_CO2) + mix_to_spawn.set_carbon_dioxide(gas_types[SPAWN_GAS_CO2]) + if(SPAWN_GAS_PLASMA) + mix_to_spawn.set_toxins(gas_types[SPAWN_GAS_PLASMA]) + if(SPAWN_GAS_AGENTB) + mix_to_spawn.set_agent_b(gas_types[SPAWN_GAS_AGENTB]) + if(SPAWN_GAS_HYDROGEN) + mix_to_spawn.set_hydrogen(gas_types[SPAWN_GAS_HYDROGEN]) + if(SPAWN_GAS_WATER) + mix_to_spawn.set_water_vapor(gas_types[SPAWN_GAS_WATER]) + mix_to_spawn.set_temperature(T20C) + var/turf/turf = get_turf(target) + turf.blind_release_air(mix_to_spawn) diff --git a/code/datums/elements/effect_trail.dm b/code/datums/elements/effect_trail.dm new file mode 100644 index 00000000000..94030b975f9 --- /dev/null +++ b/code/datums/elements/effect_trail.dm @@ -0,0 +1,27 @@ +/* + * An element used for making a trail of effects appear behind a movable atom when it moves. + */ + +/datum/element/effect_trail + element_flags = ELEMENT_BESPOKE + argument_hash_start_idx = 2 + /// The effect used for the trail generation. + var/chosen_effect + +/datum/element/effect_trail/Attach(datum/target, chosen_effect = /obj/effect/forcefield/cosmic_field) + . = ..() + if(!ismovable(target)) + return ELEMENT_INCOMPATIBLE + RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(generate_effect)) + src.chosen_effect = chosen_effect + +/datum/element/effect_trail/Detach(datum/target) + . = ..() + UnregisterSignal(target, COMSIG_MOVABLE_MOVED) + +/// Generates an effect +/datum/element/effect_trail/proc/generate_effect(atom/movable/target_object) + SIGNAL_HANDLER + + var/turf/our_turf = get_turf(target_object) + new chosen_effect(our_turf) diff --git a/code/datums/elements/leaching_walk.dm b/code/datums/elements/leaching_walk.dm new file mode 100644 index 00000000000..4553dec8cf1 --- /dev/null +++ b/code/datums/elements/leaching_walk.dm @@ -0,0 +1,65 @@ + +/// Buffs and heals the target while standing on rust. +/datum/element/leeching_walk + +/datum/element/leeching_walk/Attach(datum/target) + . = ..() + if(!isliving(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + RegisterSignal(target, COMSIG_LIVING_LIFE, PROC_REF(on_life)) + +/datum/element/leeching_walk/Detach(datum/source) + . = ..() + UnregisterSignal(source, list(COMSIG_MOVABLE_MOVED, COMSIG_LIVING_LIFE)) + +/* + * Signal proc for [COMSIG_MOVABLE_MOVED]. + * + * Checks if we should have baton resistance on the new turf. + */ +/datum/element/leeching_walk/proc/on_move(mob/source, atom/old_loc, dir, forced, list/old_locs) + SIGNAL_HANDLER + + var/turf/mover_turf = get_turf(source) + if(HAS_TRAIT(mover_turf, TRAIT_RUSTY)) + ADD_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + else + REMOVE_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + +/** + * Signal proc for [COMSIG_LIVING_LIFE]. + * + * Gradually heals the heretic ([source]) on rust, + * including baton knockdown and stamina damage. + */ +/datum/element/leeching_walk/proc/on_life(mob/living/source) + SIGNAL_HANDLER + + var/turf/our_turf = get_turf(source) + if(!HAS_TRAIT(our_turf, TRAIT_RUSTY)) + return + + // Heals all damage types + Stamina + var/need_mob_update = FALSE + if(ishuman(source)) + var/mob/living/carbon/human/we_should_make_robotic_a_general_argument = source + need_mob_update += we_should_make_robotic_a_general_argument.adjustBruteLoss(-3, updating_health = FALSE, robotic = TRUE) + need_mob_update += we_should_make_robotic_a_general_argument.adjustFireLoss(-3, updating_health = FALSE, robotic = TRUE) + need_mob_update += source.adjustBruteLoss(-3, updating_health = FALSE) + if(iscarbon(source)) //Avoids double simple mob healing + need_mob_update += source.adjustFireLoss(-3, updating_health = FALSE) + need_mob_update += source.adjustToxLoss(-3, updating_health = FALSE) + need_mob_update += source.adjustOxyLoss(-1.5, updating_health = FALSE) + need_mob_update += source.adjustStaminaLoss(-15) + if(need_mob_update) + source.updatehealth() + // Reduces duration of stuns/etc + source.AdjustParalysis(-0.8 SECONDS) + source.AdjustStunned(-0.8 SECONDS) + source.AdjustWeakened(-0.8 SECONDS) + source.AdjustKnockDown(-0.8 SECONDS) + // Heals blood loss + if(source.blood_volume < BLOOD_VOLUME_NORMAL) + source.blood_volume += 2.5 diff --git a/code/datums/elements/noticable_organ.dm b/code/datums/elements/noticable_organ.dm new file mode 100644 index 00000000000..373f61eb371 --- /dev/null +++ b/code/datums/elements/noticable_organ.dm @@ -0,0 +1,57 @@ +/** + * noticable organ element; which makes organs have a special description added to the person with the organ, if certain body zones aren't covered. + * + * Used for infused mutant organs + */ +/datum/element/noticable_organ + element_flags = ELEMENT_BESPOKE + argument_hash_start_idx = 2 + + ///Shows on examining someone with an infused organ. + var/infused_desc + /// Which body zone has to be exposed. If none is set, this is always noticable. + var/body_zone + +/datum/element/noticable_organ/Attach(obj/item/organ/target, infused_desc, body_zone) + . = ..() + + if(!is_organ(target)) + return ELEMENT_INCOMPATIBLE + + src.infused_desc = infused_desc + src.body_zone = body_zone + + RegisterSignal(target, COMSIG_ORGAN_IMPLANTED, PROC_REF(enable_description)) + RegisterSignal(target, COMSIG_ORGAN_REMOVED, PROC_REF(on_removed)) + if(target.owner) + enable_description(target, target.owner) + +/datum/element/noticable_organ/Detach(obj/item/organ/target) + UnregisterSignal(target, list(COMSIG_ORGAN_IMPLANTED, COMSIG_ORGAN_REMOVED)) + if(target.owner) + UnregisterSignal(target.owner, COMSIG_PARENT_EXAMINE) + return ..() + +/// Proc that returns true or false if the organ should show its examine check. +/datum/element/noticable_organ/proc/should_show_text(mob/living/carbon/examined) + if(body_zone && (body_zone in examined.get_covered_body_zones())) + return FALSE + return TRUE + +/datum/element/noticable_organ/proc/enable_description(obj/item/organ/target, mob/living/carbon/receiver) + SIGNAL_HANDLER // COMSIG_ORGAN_IMPLANTED + + RegisterSignal(receiver, COMSIG_PARENT_EXAMINE, PROC_REF(on_receiver_examine)) + +/datum/element/noticable_organ/proc/on_removed(obj/item/organ/target, mob/living/carbon/loser) + SIGNAL_HANDLER // COMSIG_ORGAN_REMOVED + + UnregisterSignal(loser, COMSIG_PARENT_EXAMINE) + +/datum/element/noticable_organ/proc/on_receiver_examine(atom/A, mob/user, list/examine_list) + SIGNAL_HANDLER // COMSIG_PARENT_EXAMINE + + if(!should_show_text(A)) + return + + examine_list += infused_desc diff --git a/code/datums/elements/rust_element.dm b/code/datums/elements/rust_element.dm index dcd9af8b52f..0954d56c378 100644 --- a/code/datums/elements/rust_element.dm +++ b/code/datums/elements/rust_element.dm @@ -97,6 +97,8 @@ var/mob/living/victim = entered if(istype(victim, /mob/living/basic/revenant)) return + if(IS_HERETIC_OR_MONSTER(victim)) + return victim.apply_status_effect(STATUS_EFFECT_RUST_CORRUPTION) /datum/element/rust/heretic/proc/on_exited(turf/source, atom/movable/gone) @@ -104,6 +106,8 @@ if(!isliving(gone)) return var/mob/living/leaver = gone + if(IS_HERETIC_OR_MONSTER(leaver)) + return leaver.remove_status_effect(STATUS_EFFECT_RUST_CORRUPTION) // Small visual effect imparted onto rusted things by revenants. diff --git a/code/datums/emote.dm b/code/datums/emote.dm index a4c4646d575..8893b1373fd 100644 --- a/code/datums/emote.dm +++ b/code/datums/emote.dm @@ -530,8 +530,13 @@ to_chat(user, SPAN_WARNING("You cannot [key] while [stat]!")) return FALSE if(HAS_TRAIT(user, TRAIT_FAKEDEATH)) - // Don't let people blow their cover by mistake - return FALSE + if(istype(user, /mob/living)) + var/mob/living/L + if(!L.has_status_effect(/datum/status_effect/ghoul)) + return FALSE + else + // Don't let people blow their cover by mistake + return FALSE if(hands_use_check && !user.can_use_hands() && (iscarbon(user))) if(!intentional) return FALSE diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index f4a845f97f9..ff73a9e5b56 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -222,7 +222,7 @@ return TRUE // Random safe location finder -/proc/find_safe_turf(zlevel, list/zlevels) +/proc/find_safe_turf(zlevel, list/zlevels, list/blacklist_areas) if(!zlevels) if(zlevel) zlevels = list(zlevel) @@ -236,8 +236,21 @@ var/z = pick(zlevels) var/turf/random_location = locate(x, y, z) - if(random_location.is_safe()) - return random_location + var/area/area = get_area(random_location) + var/blacklisted = FALSE + for(var/temp_area as anything in blacklist_areas) + if(area.type in typesof(temp_area)) + log_debug("TELEPORTED TO A FORBIDDEN AREA") + blacklisted = TRUE + continue + + if(blacklisted) + continue + + if(!random_location.is_safe()) + continue + + return random_location /// Returns a random department of areas to pass into get_safe_random_station_turf() for more equal spawning. /proc/get_safe_random_station_turf_equal_weight() diff --git a/code/datums/lazy_templates.dm b/code/datums/lazy_templates.dm new file mode 100644 index 00000000000..86a96e01749 --- /dev/null +++ b/code/datums/lazy_templates.dm @@ -0,0 +1,3 @@ +/datum/map_template/lazy/heretic_sacrifice_room + name = "The Mansus" + mappath = "_maps/map_files/templates/heretic_sacrifice_room.dmm" diff --git a/code/datums/looping_sounds/projectiles_sounds.dm b/code/datums/looping_sounds/projectiles_sounds.dm new file mode 100644 index 00000000000..5850461c62f --- /dev/null +++ b/code/datums/looping_sounds/projectiles_sounds.dm @@ -0,0 +1,5 @@ +/datum/looping_sound/moon_parade + mid_sounds = list('sound/effects/moon_parade_soundloop.ogg' = 1) + start_sound = 'sound/effects/moon_parade_soundloop.ogg' + mid_length = 1.9 SECONDS + volume = 50 diff --git a/code/datums/looping_sounds/weather_sounds.dm b/code/datums/looping_sounds/weather_sounds.dm index 3a2e1fa2b72..ec7de31a6c0 100644 --- a/code/datums/looping_sounds/weather_sounds.dm +++ b/code/datums/looping_sounds/weather_sounds.dm @@ -54,6 +54,15 @@ area_sound = TRUE channel = CHANNEL_ASH_STORM +/datum/looping_sound/void_loop + mid_sounds = list('sound/ambience/antag/heretic/VoidsEmbrace.ogg'=1) + mid_length = 166.9 SECONDS // exact length of the music in ticks + start_sound = 'sound/ambience/antag/heretic/VoidsEmbrace.ogg' + start_length = 166.9 SECONDS + volume = 120 + extra_range = 30 + + /datum/looping_sound/active_outside_acid mid_sounds = 'sound/weather/acid/outside/active_mid1.ogg' mid_length = 105 diff --git a/code/datums/mapping/map_template.dm b/code/datums/mapping/map_template.dm index 7ccdb39646f..8441719a4d8 100644 --- a/code/datums/mapping/map_template.dm +++ b/code/datums/mapping/map_template.dm @@ -135,6 +135,7 @@ preloadShuttleTemplates() preloadBridgeTemplates() preloadEventTemplates() + preloadLazyTemplates() /proc/preloadRuinTemplates() // Merge the active lists together @@ -207,3 +208,13 @@ var/datum/map_template/event/E = new event_type() GLOB.map_templates[E.event_id] = E + +/proc/preloadLazyTemplates() + for(var/item in subtypesof(/datum/map_template/lazy)) + var/datum/map_template/lazy/lazy_type = item + if(!initial(lazy_type.mappath)) + continue + + var/datum/map_template/lazy/L = new lazy_type() + + GLOB.map_templates[L.name] = L diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 0ed3bcaf9fd..c1f0bc60546 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -33,7 +33,11 @@ var/memory - var/assigned_role //assigned role is what job you're assigned to when you join the station. + /// Assigned role is what job you're assigned to when you join the station. + var/assigned_role + /// This is the the job datum you have + var/datum/job/job_datum + var/playtime_role //if set, overrides your assigned_role for the purpose of playtime awards. Set by IDcomputer when your ID is changed. var/special_role //special roles are typically reserved for antags or roles like ERT. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal. var/offstation_role = FALSE //set to true for ERT, deathsquad, abductors, etc, that can go from and to CC at will and shouldn't be antag targets @@ -83,6 +87,7 @@ /datum/mind/Destroy() SSticker.minds -= src + job_datum = null remove_all_antag_datums() qdel(objective_holder) unbind() @@ -418,6 +423,25 @@ . += _memory_edit_role_enabled(ROLE_MIND_FLAYER) +/datum/mind/proc/memory_edit_heretic(mob/living/carbon/human/H) + . = _memory_edit_header("heretic") + if(has_antag_datum(/datum/antagonist/heretic)) + var/datum/antagonist/heretic/wheretic = has_antag_datum(/datum/antagonist/heretic) + . += "HERETIC|no" + switch(wheretic.has_living_heart()) + if(HERETIC_NO_LIVING_HEART) + . += " |
Give Living heart" + if(HERETIC_HAS_LIVING_HEART) + . += " |
Add Heart Target (marked mob)" + . += " | Remove A Target" + . += " |
Targets are / have been: [english_list(wheretic.all_sac_targets, nothing_text = "No one")]" + . += " |
Give focus| or adjust knowledge points.." + + else + . += "heretic|NO" + + . += _memory_edit_role_enabled(ROLE_HERETIC) + /datum/mind/proc/memory_edit_nuclear(mob/living/carbon/human/H) . = _memory_edit_header("nuclear") if(src in SSticker.mode.syndicates) @@ -565,6 +589,7 @@ "changeling", "vampire", // "traitorvamp", "mind_flayer", + "heretic", "nuclear", "traitor", // "traitorchan", ) @@ -582,6 +607,8 @@ sections["vampire"] = memory_edit_vampire(H) /** MINDFLAYER ***/ sections["mind_flayer"] = memory_edit_mind_flayer(H) + /** HERETIC ***/ + sections["heretic"] = memory_edit_heretic(H) /** NUCLEAR ***/ sections["nuclear"] = memory_edit_nuclear(H) /** Abductors **/ @@ -1171,6 +1198,59 @@ log_admin("[key_name(usr)] has set [key_name(current)]'s current swarms to [new_swarms].") message_admins("[key_name_admin(usr)] has set [key_name_admin(current)]'s current swarms to [new_swarms].") + else if(href_list["heretic"]) + switch(href_list["heretic"]) + if("clear") + if(has_antag_datum(/datum/antagonist/heretic)) + remove_antag_datum(/datum/antagonist/heretic) + log_admin("[key_name(usr)] has de-heretic'd [key_name(current)].") + message_admins("[key_name(usr)] has de-heretic'd [key_name(current)].") + if("heretic") + make_heretic() + log_admin("[key_name(usr)] has heretic'd [key_name(current)].") + to_chat(current, "You feel a whisper in your head. You are a Heretic!") + message_admins("[key_name(usr)] has heretic'd [key_name(current)].") + if("Target") + var/mob/living/carbon/human/new_target = usr.client?.holder.marked_datum + if(!istype(new_target)) + to_chat(usr, "You need to mark a human to do this!") + return + + if(tgui_alert(usr, "Let them know their targets have been updated?", "Whispers of the Mansus", list("Yes", "No")) == "Yes") + to_chat(current, "The Mansus has modified your targets. Go find them!") + to_chat(current, "[new_target.real_name], the [new_target.mind?.assigned_role || "human"].") + var/datum/antagonist/heretic/hereitic = has_antag_datum(/datum/antagonist/heretic) + hereitic.add_sacrifice_target(new_target) + if("RemoveTarget") + var/datum/antagonist/heretic/thereitic = has_antag_datum(/datum/antagonist/heretic) + var/list/removable = list() + for(var/mob/living/carbon/human/old_target as anything in thereitic.sac_targets) + removable[old_target.name] = old_target + + var/name_of_removed = tgui_input_list(usr, "Choose a human to remove", "Who to Spare", removable) + if(QDELETED(src) || isnull(name_of_removed)) + return + var/mob/living/carbon/human/chosen_target = removable[name_of_removed] + if(QDELETED(chosen_target) || !ishuman(chosen_target)) + return + + if(!thereitic.remove_sacrifice_target(chosen_target)) + to_chat(usr, "Failed to remove [name_of_removed] from [current]'s sacrifice list. Perhaps they're no longer in the list anyways.") + return + + if(tgui_alert(usr, "Let them know their targets have been updated?", "Whispers of the Mansus", list("Yes", "No")) == "Yes") + to_chat(current, "The Mansus has modified your targets.") + if("focus") + current.equip_to_slot_if_possible(new /obj/item/clothing/neck/heretic_focus(get_turf(current)), ITEM_SLOT_NECK, TRUE, TRUE) + to_chat(current, "The Mansus has given you a focus!") + log_and_message_admins("[key_name(usr)] has equipped [key_name(current)] with a heretic focus") + if("knowledge") + var/change_num = tgui_input_number(usr, "Add or remove knowledge points", "Points", 0, 100, -100) + if(!change_num || QDELETED(src)) + return + var/datum/antagonist/heretic/whereitic = has_antag_datum(/datum/antagonist/heretic) + whereitic.knowledge_points += change_num + else if(href_list["nuclear"]) var/mob/living/carbon/human/H = current @@ -1745,6 +1825,11 @@ add_antag_datum(/datum/antagonist/mindflayer) SSticker.mode.mindflayers |= src +/datum/mind/proc/make_heretic() + if(!has_antag_datum(/datum/antagonist/heretic)) + add_antag_datum(/datum/antagonist/heretic) + SSticker.mode.heretics |= src + /datum/mind/proc/make_Abductor() if(alert(usr, "Are you sure you want to turn this person into an abductor? This can't be undone!", "New Abductor?", "Yes", "No") != "Yes") return diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 9d48ec1b53a..aa9214900af 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -1699,3 +1699,43 @@ /obj/item/shield/energy = 1, /obj/item/reagent_containers/hypospray/autoinjector/survival = 1 ) + +/datum/outfit/admin/heretic_long + name = "Heretic Long" + + uniform = /obj/item/clothing/under/suit/victsuit/red + neck = /obj/item/clothing/neck/heretic_focus + back = /obj/item/storage/backpack/satchel + gloves = /obj/item/clothing/gloves/combat + shoes = /obj/item/clothing/shoes/chameleon/noslip + l_ear = /obj/item/radio/headset/syndicate + id = /obj/item/card/id + backpack_contents = list( + /obj/item/storage/box/survival = 1, + /obj/item/melee/sickly_blade = 1, + /obj/item/codex_cicatrix = 1, + + ) + +/datum/outfit/admin/heretic_long/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + var/obj/item/clothing/suit/hooded/cultrobes/eldritch/R = new(H.loc) + if(istype(R)) + R.name = "ascendant robes" + R.hood.name = "ascendant hood" + H.equip_to_slot_or_del(R, ITEM_SLOT_OUTER_SUIT) + R.ToggleHood() + + if(visualsOnly) + return + + var/obj/item/card/id/I = H.wear_id + if(istype(I)) + apply_to_card(I, H, get_all_accesses(), "Heretic Long", "data") + +/datum/outfit/admin/heretic_long/on_mind_initialize(mob/living/carbon/human/H) + . = ..() + H.mind.add_antag_datum(/datum/antagonist/heretic) + var/datum/antagonist/heretic/A = H.mind.has_antag_datum(/datum/antagonist/heretic) + A.knowledge_points = 9999 + A.force_unlock_ascension = TRUE diff --git a/code/datums/proximity/advanced_proximity_monitor.dm b/code/datums/proximity/advanced_proximity_monitor.dm index bd47bfd6cb9..94889a6dd21 100644 --- a/code/datums/proximity/advanced_proximity_monitor.dm +++ b/code/datums/proximity/advanced_proximity_monitor.dm @@ -27,9 +27,11 @@ /datum/proximity_monitor/advanced/proc/cleanup_field() for(var/turf/turf as anything in edge_turfs) cleanup_edge_turf(turf) + cleanup_effects(turf) edge_turfs = list() for(var/turf/turf as anything in field_turfs) cleanup_field_turf(turf) + cleanup_effects(turf) field_turfs = list() //Call every time the field moves (done automatically if you use update_center) or a setup specification is changed. @@ -48,10 +50,12 @@ if(QDELETED(src)) return cleanup_field_turf(old_turf) + cleanup_effects(old_turf) for(var/turf/old_turf as anything in old_edge_turfs - edge_turfs) if(QDELETED(src)) return cleanup_edge_turf(old_turf) + cleanup_effects(old_turf) if(full_recalc) old_field_turfs = list() @@ -109,6 +113,10 @@ PRIVATE_PROC(TRUE) return +/// A holder proc for cleaning up various effects. +/datum/proximity_monitor/advanced/proc/cleanup_effects(turf/target) + return + /// Called when a turf in the edge of the monitor is linked /datum/proximity_monitor/advanced/proc/setup_edge_turf(turf/target) if(edge_is_a_field) // If the edge is considered a field, set it up like one diff --git a/code/datums/proximity/void_storm_proximity.dm b/code/datums/proximity/void_storm_proximity.dm new file mode 100644 index 00000000000..46dfe9558f1 --- /dev/null +++ b/code/datums/proximity/void_storm_proximity.dm @@ -0,0 +1,38 @@ +/*! + * Void storm for the void heretic ascension + * + * Follows the heretic around and acts like an aura with damaging effects for non-heretics + */ +/datum/proximity_monitor/advanced/void_storm + edge_is_a_field = TRUE + // lazylist that keeps track of the overlays added + var/list/turf_effects + var/static/image/storm_overlay = image('icons/effects/weather_effects.dmi', "snow_storm") + +/datum/proximity_monitor/advanced/void_storm/New(atom/_host, range, _ignore_if_not_on_turf) + . = ..() + recalculate_field(full_recalc = TRUE) + +/datum/proximity_monitor/advanced/void_storm/recalculate_field(full_recalc) + full_recalc = TRUE // We always perform a full recalc because we need to update ALL the sprites + return ..() + +/datum/proximity_monitor/advanced/void_storm/cleanup_effects(turf/target) + . = ..() + var/obj/effect/abstract/effect = LAZYACCESS(turf_effects, target) + LAZYREMOVE(turf_effects, target) + if(effect) + qdel(effect) + +/datum/proximity_monitor/advanced/void_storm/setup_field_turf(turf/target) + . = ..() + var/obj/effect/abstract/effect = new(target) // Makes the field visible to players. + effect.alpha = 255 - get_dist(target, host.loc) * 23 + effect.invisibility = 0 + effect.color = COLOR_BLACK + effect.icon = storm_overlay.icon + effect.icon_state = storm_overlay.icon_state + effect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + effect.layer = ABOVE_ALL_MOB_LAYER + effect.plane = ABOVE_GAME_PLANE + LAZYSET(turf_effects, target, effect) diff --git a/code/datums/spell_targeting/cone.dm b/code/datums/spell_targeting/cone.dm index f8f852da5cf..acd5a997dfe 100644 --- a/code/datums/spell_targeting/cone.dm +++ b/code/datums/spell_targeting/cone.dm @@ -72,3 +72,10 @@ /datum/spell_targeting/cone/proc/calculate_cone_shape(current_level) // Default formula: (1 (innate) -> 3 -> 5 -> 5 -> 7 -> 7 -> 9 -> 9 -> ...) return current_level + (current_level % 2) + 1 + +/datum/spell_targeting/cone/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell) + var/list/targets = choose_targets(user, spell, params, A) + if(!length(targets)) + return FALSE // no targets + spell.try_perform(targets, user) + return TRUE diff --git a/code/datums/spell_targeting/spell_targeting.dm b/code/datums/spell_targeting/spell_targeting.dm index 71f990364fd..fb6caa336a8 100644 --- a/code/datums/spell_targeting/spell_targeting.dm +++ b/code/datums/spell_targeting/spell_targeting.dm @@ -66,7 +66,14 @@ */ /datum/spell_targeting/proc/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell) var/list/targets = choose_targets(user, spell, params, A) + var/list/final_targets + for(var/thing in targets) + if(spell.valid_target(thing, user)) + final_targets += targets + if(!length(final_targets)) + return FALSE // no targets spell.try_perform(targets, user) + return TRUE /** * Checks whether or not the given target is valid. Calls spell.valid_target as well diff --git a/code/datums/spells/charge_up_bounce.dm b/code/datums/spells/charge_up_bounce.dm index 1960ed4d50c..2ac6c9a5542 100644 --- a/code/datums/spells/charge_up_bounce.dm +++ b/code/datums/spells/charge_up_bounce.dm @@ -56,7 +56,6 @@ return /datum/spell/charge_up/bounce/proc/bounce(mob/origin, mob/target, energy, bounces, mob/user) - SHOULD_CALL_PARENT(TRUE) create_beam(origin, target) apply_bounce_effect(origin, target, energy, user) add_attack_logs(user, target, "Bounce spell '[src]' bounced on") diff --git a/code/datums/spells/cones/cone_spell.dm b/code/datums/spells/cones/cone_spell.dm index 7c5d15dd255..cacf45ddac1 100644 --- a/code/datums/spells/cones/cone_spell.dm +++ b/code/datums/spells/cones/cone_spell.dm @@ -1,7 +1,19 @@ /datum/spell/cone + create_attack_logs = FALSE + create_custom_logs = TRUE + var/cone_levels = 3 + var/respect_density = TRUE /datum/spell/cone/create_new_targeting() - return new /datum/spell_targeting/cone + var/datum/spell_targeting/cone/C = new() + C.cone_levels = cone_levels + C.respect_density = respect_density + return C + +// Normally, cone spells will generate an attack log for every turf they loop over, while searching for targets. +// With this override, all /aoe type spells will only generate 1 log, saying that the user has cast the spell. +/datum/spell/cone/write_custom_logs(list/targets, mob/user) + add_attack_logs(user, null, "Cast the cone spell [name]", ATKLOG_ALL) /datum/spell/cone/cast(list/targets, mob/user) var/level_counter = 1 diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index 6945881d46b..7734fdaf95b 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -8,8 +8,10 @@ nonabstract_req = TRUE centcom_cancast = FALSE //Prevent people from getting to centcom var/sound1 = 'sound/magic/ethereal_enter.ogg' + var/sound2 = 'sound/magic/ethereal_exit.ogg' var/jaunt_duration = 50 //in deciseconds var/jaunt_in_time = 5 + var/jaunt_out_time = null var/jaunt_in_type = /obj/effect/temp_visual/wizard var/jaunt_out_type = /obj/effect/temp_visual/wizard/out var/jaunt_type_path = /obj/effect/dummy/spell_jaunt @@ -52,11 +54,14 @@ jaunt_steam(mobloc) ADD_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt") holder.reappearing = 1 - playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) + playsound(get_turf(target), sound2, 50, TRUE, -1) sleep(jaunt_in_time * 4) new jaunt_in_type(mobloc, holder.dir) target.setDir(holder.dir) - sleep(jaunt_in_time) + var/time_to_jaunt_out = jaunt_in_time + if(jaunt_out_time) + time_to_jaunt_out = jaunt_out_time + sleep(time_to_jaunt_out) qdel(holder) if(!QDELETED(target)) if(mobloc.is_blocked_turf(exclude_mobs = TRUE)) diff --git a/code/datums/spells/pointed.dm b/code/datums/spells/pointed.dm new file mode 100644 index 00000000000..93180893c29 --- /dev/null +++ b/code/datums/spells/pointed.dm @@ -0,0 +1,9 @@ +// Parent type for easy setup +/datum/spell/pointed + var/cast_range = 7 + +/datum/spell/pointed/create_new_targeting() + var/datum/spell_targeting/clicked_atom/C = new() + C.range = cast_range + C.try_auto_target = FALSE + return C diff --git a/code/datums/spells/sentient_sword_lunge.dm b/code/datums/spells/sentient_sword_lunge.dm index f1cd5f46d71..f04c1caaa38 100644 --- a/code/datums/spells/sentient_sword_lunge.dm +++ b/code/datums/spells/sentient_sword_lunge.dm @@ -15,6 +15,10 @@ if(!istype(user.loc, /obj/item)) to_chat(user, SPAN_WARNING("You cannot use this ability if you're outside a blade!")) return + if(istype(user.loc, /obj/item/melee/cultblade/haunted)) + var/obj/item/melee/cultblade/haunted/haunt_moment = user.loc + if(!haunt_moment.handle_haunted_movement()) + return FALSE var/obj/item/nullrod/scythe/talking/user_sword = user.loc if(ishuman(user_sword.loc)) var/mob/living/carbon/holder = user_sword.loc diff --git a/code/datums/spells/spell_base.dm b/code/datums/spells/spell_base.dm index 0392334a6c4..76de6368bba 100644 --- a/code/datums/spells/spell_base.dm +++ b/code/datums/spells/spell_base.dm @@ -8,7 +8,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) spell = spell_to_cast /datum/click_intercept/proc_holder/InterceptClickOn(user, params, atom/object) - spell.InterceptClickOn(user, params, object) + return spell.InterceptClickOn(user, params, object) /datum/click_intercept/proc_holder/quit() spell.remove_ranged_ability(spell.ranged_ability_user) @@ -91,6 +91,8 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) /// If SPELL_REQUIRES_NO_ANTIMAGIC is set in Spell requirements, /// The spell cannot be cast if the caster has any of the antimagic flags set. var/antimagic_flags = MAGIC_RESISTANCE + /// Is it a heretic spell? Used by heretics. + var/is_a_heretic_spell = FALSE /datum/spell/New() ..() @@ -315,7 +317,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) if(!cast_check(TRUE, TRUE, user)) return - perform(targets, should_recharge_after_cast, user) + perform(targets, user) /** * Called in `try_perform` before removing the click interceptor. useful to override if you have a spell that requires more than 1 click @@ -329,10 +331,9 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) * * Arguments: * * targets - The list of targets the spell is being cast on. Will not be empty or null - * * recharge - Whether or not the spell should go recharge * * user - The caster of the spell */ -/datum/spell/proc/perform(list/targets, recharge = TRUE, mob/user = usr) //if recharge is started is important for the trigger spells +/datum/spell/proc/perform(list/targets, mob/user = usr) //if recharge is started is important for the trigger spells SHOULD_NOT_OVERRIDE(TRUE) before_cast(targets, user) invocation(user) @@ -341,7 +342,8 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) write_custom_logs(targets, user) if(create_attack_logs) add_attack_logs(user, targets, "cast the spell [name]", ATKLOG_ALL) - if(recharge) + + if(should_recharge_after_cast) cooldown_handler.start_recharge() if(sound) @@ -461,6 +463,11 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) var/turf/T = get_turf(user) if(T && is_admin_level(T.z)) return FALSE + var/sig_return = FALSE + if(user) + sig_return = SEND_SIGNAL(user, COMSIG_MOB_BEFORE_SPELL_CAST, src, show_message) + if(sig_return) + return FALSE // If the spell requires the user has no antimagic equipped, and they're holding antimagic // that corresponds with the spell's antimagic, then they can't actually cast the spell @@ -505,7 +512,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) to_chat(user, SPAN_NOTICE("Your outfit isn't magical enough, you should put on your robe and wizard hat, as well as your sandals.")) return FALSE else - if(clothes_req || human_req) + if(human_req) if(show_message) to_chat(user, SPAN_NOTICE("This spell can only be cast by humans!")) return FALSE diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm index 6b43f5ec058..1c835fefa41 100644 --- a/code/datums/spells/touch_attacks.dm +++ b/code/datums/spells/touch_attacks.dm @@ -2,6 +2,8 @@ var/hand_path = /obj/item/melee/touch_attack var/obj/item/melee/touch_attack/attached_hand = null var/on_remove_message = TRUE + /// Has this spell been boosted by a heretic ascending? + var/ascended = FALSE /datum/spell/touch/create_new_targeting() return new /datum/spell_targeting/self @@ -13,6 +15,9 @@ charge_hand(user) /datum/spell/touch/proc/charge_hand(mob/living/carbon/user) + if(SEND_SIGNAL(user, COMSIG_TOUCH_HANDLESS_CAST, src) & COMPONENT_CAST_HANDLESS) + cooldown_handler.start_recharge(cooldown_handler.recharge_duration) + return var/hand_handled = 1 attached_hand = new hand_path(src) RegisterSignal(user, COMSIG_MOB_WILLINGLY_DROP, PROC_REF(discharge_hand)) diff --git a/code/datums/spells/wizard_spells.dm b/code/datums/spells/wizard_spells.dm index 2fc857edf0c..fb9a6979e21 100644 --- a/code/datums/spells/wizard_spells.dm +++ b/code/datums/spells/wizard_spells.dm @@ -325,9 +325,18 @@ selection_deactivated_message = SPAN_NOTICE("You extinguish your fireball...for now.") var/fireball_type = /obj/projectile/magic/fireball + var/what_icon_state = "fireball0" action_icon_state = "fireball0" sound = 'sound/magic/fireball.ogg' + should_recharge_after_cast = FALSE + + /// How many projectiles we can fire per cast. Not all at once, per click, kinda like charges. Unlike charges, it doesn't share cooldown + var/projectile_amount = 1 + /// How many projectiles we have yet to fire, based on projectile_amount + var/current_amount = 0 + /// Do we care if we are on a turf? + var/cares_about_turf = TRUE /datum/spell/fireball/apprentice centcom_cancast = FALSE @@ -340,26 +349,41 @@ /datum/spell/fireball/update_spell_icon() if(!action) return - action.button_icon_state = "fireball[active]" + action.button_icon_state = "[what_icon_state][active]" action.build_all_button_icons() /datum/spell/fireball/cast(list/targets, mob/living/user = usr) var/target = targets[1] //There is only ever one target for fireball - var/turf/T = user.loc - var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction - if(!isturf(U) || !isturf(T)) + var/turf/T = get_turf(user) + var/turf/U = get_step(get_turf(user), user.dir) // Get the tile infront of the move, based on their direction + if((!isturf(U) && cares_about_turf) || (!isturf(T) && cares_about_turf)) return FALSE - var/obj/projectile/magic/fireball/FB = new fireball_type(user.loc) + var/obj/projectile/magic/fireball/FB = new fireball_type(get_turf(user)) FB.current = get_turf(user) FB.original = target FB.firer = user FB.preparePixelProjectile(target, user) FB.fire() - user.newtonian_move(get_dir(U, T)) + if(cares_about_turf) + user.newtonian_move(get_dir(U, T)) + if(should_recharge_after_cast) + should_recharge_after_cast = FALSE + remove_ranged_ability(user) return TRUE +/datum/spell/fireball/should_remove_click_intercept() + return FALSE + +/datum/spell/fireball/before_cast(list/targets, mob/user) + . = ..() + current_amount++ + if(current_amount >= projectile_amount) + current_amount = 0 + should_recharge_after_cast = TRUE + + /datum/spell/fireball/toolbox name = "Homing Toolbox" desc = "This spell summons and throws a magical homing toolbox at your opponent." diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 4e3dd0498d6..d2a747a6dd9 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -524,6 +524,9 @@ /datum/status_effect/transient/cult_slurring id = "cult_slurring" +/datum/status_effect/transient/heretic_slurring + id = "heretic_slurring" + /datum/status_effect/incapacitating id = "incapacitating" tick_interval = 0 @@ -905,6 +908,74 @@ /datum/status_effect/transient/drugged/on_remove() owner.update_druggy_effects() +/datum/status_effect/transient/disgust + id = "disgust" + tick_interval = 2 SECONDS + ///How disgusted we were last tick. + var/old_disgust = 0 + +/datum/status_effect/transient/disgust/tick() + . = ..() + if(!.) + return + old_disgust = strength + if(strength) + var/pukeprob = 2.5 + (0.025 * strength / 10) + if(strength >= DISGUST_LEVEL_GROSS) + if(prob(5)) + owner.AdjustStuttering(2 SECONDS) + owner.AdjustConfused(2 SECONDS) + if(prob(5) && !owner.stat) + to_chat(owner, SPAN_WARNING("You feel kind of iffy...")) + owner.AdjustJitter(-6 SECONDS) + if(strength >= DISGUST_LEVEL_VERYGROSS) + if(prob(pukeprob)) //iT hAndLeS mOrE ThaN PukInG + owner.AdjustConfused(2.5 SECONDS) + owner.AdjustStuttering(2 SECONDS) + owner.adjust_disgust(- 50 SECONDS) + if(iscarbon(owner)) + var/mob/living/carbon/human/throwing_up = owner + throwing_up.vomit() + owner.KnockDown(8 SECONDS) + + owner.SetDizzy(10 SECONDS) + if(strength >= DISGUST_LEVEL_DISGUSTED) + if(prob(13)) + owner.EyeBlurry(6 SECONDS) + + // I would consider breaking this up into steps matching the disgust levels + // But disgust is used so rarely it wouldn't save a significant amount of time, and it makes the code just way worse + // We're in the same state as the last time we processed, so don't bother + + switch(strength) + if(0 to DISGUST_LEVEL_GROSS) + owner.clear_alert("disgust") + if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS) + owner.throw_alert("disgust", /atom/movable/screen/alert/gross) + if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED) + owner.throw_alert("disgust", /atom/movable/screen/alert/verygross) + if(DISGUST_LEVEL_DISGUSTED to INFINITY) + owner.throw_alert("disgust", /atom/movable/screen/alert/disgusted) + +/datum/status_effect/transient/disgust/calc_decay() + return -1 SECONDS //Yes, this sucks. Unfortunently how transient works, otherwise I need to tweak the prob in strange ways. + +/atom/movable/screen/alert/gross + name = "Grossed out." + desc = "That was kind of gross..." + icon_state = "gross" + +/atom/movable/screen/alert/verygross + name = "Very grossed out." + desc = "You're not feeling very well..." + icon_state = "gross2" + +/atom/movable/screen/alert/disgusted + name = "DISGUSTED" + desc = "ABSOLUTELY DISGUSTIN'" + icon_state = "gross3" + + #define FAKE_COLD 1 #define FAKE_FOOD_POISONING 2 #define FAKE_RETRO_VIRUS 3 @@ -1464,7 +1535,7 @@ //We don't have disgust, so... to_chat(owner, SPAN_USERDANGER("The unnatural rust makes you feel sick!")) if(ishuman(owner)) - owner.adjustBrainLoss(2.5) + owner.adjust_disgust(5 SECONDS) owner.reagents?.remove_all(0.75) else owner.adjustBruteLoss(3) //Weaker than borgs but still constant. diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 861e1242d2f..993e9f21577 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -13,6 +13,8 @@ var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves var/alert_type = /atom/movable/screen/alert/status_effect //the alert thrown by the status effect, contains name and description var/atom/movable/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists + /// Do we show the duration of the status effect on the alert + var/show_duration = FALSE /datum/status_effect/New(list/arguments) if(!id) @@ -37,6 +39,7 @@ var/atom/movable/screen/alert/status_effect/A = owner.throw_alert(id, alert_type) A.attached_effect = src //so the alert can reference us, if it needs to linked_alert = A //so we can reference the alert, if we need to + update_shown_duration() if(duration > 0 || initial(tick_interval) > 0) //don't process if we don't care START_PROCESSING(SSfastprocess, src) return TRUE @@ -57,6 +60,7 @@ if(!owner) qdel(src) return + update_shown_duration() if(tick_interval <= world.time) tick() tick_interval = world.time + initial(tick_interval) @@ -64,6 +68,14 @@ on_timeout() qdel(src) +/// Updates the status effect alert's maptext (if possible) +/datum/status_effect/proc/update_shown_duration() + PRIVATE_PROC(TRUE) + if(!linked_alert || !show_duration) + return + + linked_alert.maptext = MAPTEXT_TINY_UNICODE("[round((duration - world.time)/10, 1)]s") + /datum/status_effect/proc/on_apply() //Called whenever the buff is applied; returning FALSE will cause it to autoremove itself. return TRUE @@ -120,9 +132,12 @@ /// Applies a given status effect to this mob, returning the effect if it was successful or null otherwise /mob/living/proc/apply_status_effect(effect, ...) + RETURN_TYPE(/datum/status_effect) . = null if(QDELETED(src)) return + var/list/arguments = args.Copy() + arguments[1] = src var/datum/status_effect/S1 = effect LAZYINITLIST(status_effects) for(var/datum/status_effect/S in status_effects) @@ -130,14 +145,12 @@ if(S.status_type == STATUS_EFFECT_REPLACE) S.be_replaced() else if(S.status_type == STATUS_EFFECT_REFRESH) - S.refresh() + S.refresh(arglist(arguments)) return else return - var/list/arguments = args.Copy() - arguments[1] = src S1 = new effect(arguments) - . = S1 + return S1 /// Removes all of a given status effect from this mob, returning TRUE if at least one was removed /mob/living/proc/remove_status_effect(effect, ...) diff --git a/code/datums/weather/weather_datum.dm b/code/datums/weather/weather_datum.dm index c2f5ed99abd..6181af41349 100644 --- a/code/datums/weather/weather_datum.dm +++ b/code/datums/weather/weather_datum.dm @@ -44,6 +44,8 @@ GLOBAL_LIST_EMPTY(all_shelter_pods) var/barometer_predictable = FALSE var/next_hit_time = 0 //For barometers to know when the next storm will hit + /// This causes the weather to only end if forced to + var/perpetual = FALSE var/area_act = FALSE // Does this affect more than just mobs, or the landscape? @@ -106,7 +108,8 @@ GLOBAL_LIST_EMPTY(all_shelter_pods) to_chat(M, weather_message) if(weather_sound) SEND_SOUND(M, sound(weather_sound)) - addtimer(CALLBACK(src, PROC_REF(wind_down)), weather_duration) + if(!perpetual) + addtimer(CALLBACK(src, PROC_REF(wind_down)), weather_duration) /datum/weather/proc/wind_down() if(stage >= WEATHER_WIND_DOWN_STAGE) diff --git a/code/datums/weather/weather_types/void_storm.dm b/code/datums/weather/weather_types/void_storm.dm new file mode 100644 index 00000000000..a16b006ba27 --- /dev/null +++ b/code/datums/weather/weather_types/void_storm.dm @@ -0,0 +1,20 @@ +/datum/weather/void_storm + name = "void storm" + desc = "A rare and highly anomalous event often accompanied by unknown entities shredding spacetime continouum. We'd advise you to start running." + + telegraph_duration = 2 SECONDS + telegraph_overlay = "light_snow" + + weather_message = SPAN_HIEROPHANT("You feel the air around you getting colder... and void's sweet embrace...") + weather_overlay = "light_snow" + weather_color = COLOR_BLACK + weather_duration_lower = 60 SECONDS + weather_duration_upper = 120 SECONDS + + + end_duration = 10 SECONDS + + area_types = list(/area) + target_trait = REACHABLE_SPACE_ONLY + + perpetual = TRUE diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e50c85d5233..1067c161a07 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1133,6 +1133,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) playsound(src, 'sound/effects/splat.ogg', 50, TRUE) if(!isspaceturf(src)) var/type = green ? /obj/effect/decal/cleanable/vomit/green : /obj/effect/decal/cleanable/vomit + if(type_override) + type = type_override var/vomit_reagent = green ? "green_vomit" : "vomit" if(type_override) type = type_override @@ -1494,6 +1496,23 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) /atom/proc/relaydrive(mob/living/user, direction) return !(SEND_SIGNAL(src, COMSIG_RIDDEN_DRIVER_MOVE, user, direction) & COMPONENT_DRIVER_BLOCK_MOVE) +/** + * Causes effects when the atom gets hit by a rust effect from heretics + * + * Override this if you want custom behaviour in whatever gets hit by the rust + * /turf/rust_turf should be used instead for overriding rust on turfs + */ +/atom/proc/rust_heretic_act() + return + +///wrapper proc that passes our mob's rust_strength to the target we are rusting +/mob/living/proc/do_rust_heretic_act(atom/target) + var/datum/antagonist/heretic/heretic_data = IS_HERETIC(src) + target.rust_heretic_act(heretic_data?.rust_strength) + +/mob/living/basic/heretic_summon/rust_spirit/do_rust_heretic_act(atom/target) + target.rust_heretic_act(RUST_RESISTANCE_ORGANIC) + /// Used with the spawner component to do something when a mob is spawned. /atom/proc/on_mob_spawn(mob/created_mob) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index f8e062a3bc8..1cbc8b274b5 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -1027,7 +1027,7 @@ if(C.is_valid(src, victim)) return C -/atom/movable/proc/handle_squish_carbon(mob/living/carbon/victim, damage_to_deal, datum/tilt_crit/crit) +/atom/movable/proc/handle_squish_carbon(mob/living/carbon/victim, damage_to_deal, datum/tilt_crit/crit, duration = 80 SECONDS) // Damage points to "refund", if a crit already beats the shit out of you we can shelve some of the extra damage. var/crit_rebate = 0 @@ -1056,7 +1056,7 @@ picked_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_ARM, BODY_ZONE_R_LEG) victim.apply_damage((damage_to_deal) * (1 / num_parts_to_pick), BRUTE, picked_zone) - victim.AddElement(/datum/element/squish, 80 SECONDS) + victim.AddElement(/datum/element/squish, duration) #define NO_CRUSH_DIR "no_dir" diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 5e2e0fb39da..33dbc0d7256 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -74,6 +74,10 @@ /datum/atom_hud/data/pressure hud_icons = list(PRESSURE_HUD) +/datum/atom_hud/data/heretic + hud_icons = list(HERETIC_HUD) + ignore_invisibility_check = TRUE + /// Pressure hud is special, because it doesn't use hudatoms. SSair manages its images, so tell SSair to add the initial set. /datum/atom_hud/data/pressure/add_hud_to(mob/user) ..() @@ -511,6 +515,13 @@ else holder.icon_state = "" +/*~~~~~~~~~~~~~~ + HERETIC HUD +~~~~~~~~~~~~~~~*/ +/obj/effect/heretic_influence/proc/do_hud_stuff() + var/image/holder = hud_list[HERETIC_HUD] + holder.icon_state = "reality_smash" + /*~~~~~~~~~~~~~~ JANI HUD ~~~~~~~~~~~~~~~*/ diff --git a/code/game/dna/mutations/mutation_powers.dm b/code/game/dna/mutations/mutation_powers.dm index 1dab36652df..27e97d8662d 100644 --- a/code/game/dna/mutations/mutation_powers.dm +++ b/code/game/dna/mutations/mutation_powers.dm @@ -1010,7 +1010,7 @@ return new /datum/spell_targeting/telepathic /datum/spell/remotetalk/cast(list/targets, mob/user = usr) - if(!ishuman(user)) + if(!isliving(user)) return if(user.mind?.miming) // Dont let mimes telepathically talk to_chat(user,SPAN_WARNING("You can't communicate without breaking your vow of silence.")) @@ -1044,7 +1044,7 @@ return new /datum/spell_targeting/telepathic /datum/spell/mindscan/cast(list/targets, mob/user = usr) - if(!ishuman(user)) + if(!isliving(user)) return for(var/mob/living/target in targets) var/message = "You feel your mind expand briefly... (Click to send a message.)" diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index f44f84f4d87..d8d90b916ba 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -6,6 +6,8 @@ default_button_position = DEFAULT_BLOODSPELLS var/list/spells = list() var/channeling = FALSE + /// If the magic has been enhanced somehow, likely due to a crimson medallion. + var/magic_enhanced = FALSE /datum/action/innate/cult/blood_magic/Remove() for(var/X in spells) @@ -17,7 +19,7 @@ var/limit = RUNELESS_MAX_BLOODCHARGE for(var/obj/effect/rune/empower/R in range(1, owner)) rune = TRUE - limit = MAX_BLOODCHARGE + limit = magic_enhanced ? ENHANCED_BLOODCHARGE : MAX_BLOODCHARGE break if(length(spells) >= limit) if(rune) @@ -286,20 +288,21 @@ else add_ranged_ability(user, SPAN_CULT("You prepare to horrify a target...")) -/datum/spell/horror/InterceptClickOn(mob/living/user, params, atom/target) - if(..()) - return +/datum/spell/horror/InterceptClickOn(mob/living/user, params, atom/target) //This should not exist + . = ..() + if(!.) + return FALSE if(ranged_ability_user.incapacitated() || !IS_CULTIST(user)) user.ranged_ability.remove_ranged_ability(user) - return + return TRUE if(user.holy_check()) - return + return TRUE var/turf/T = get_turf(ranged_ability_user) if(!isturf(T)) - return FALSE + return TRUE if(target in view(7, ranged_ability_user)) if(!ishuman(target) || IS_CULTIST(target)) - return + return TRUE var/mob/living/carbon/human/H = target H.Hallucinate(120 SECONDS) attached_action.charges-- @@ -310,6 +313,7 @@ if(attached_action.charges <= 0) to_chat(ranged_ability_user, SPAN_CULT("You have exhausted the spell's power!")) qdel(src) + return TRUE /datum/action/innate/cult/blood_spell/veiling name = "Conceal Presence" @@ -470,22 +474,35 @@ target.visible_message(SPAN_WARNING("[target]'s holy weapon absorbs the red light!"), \ SPAN_USERDANGER("Your holy weapon absorbs the blinding light!")) else - to_chat(user, SPAN_CULTITALIC("In a brilliant flash of red, [L] falls to the ground!")) + if(IS_HERETIC(L)) + L.Stun(0.5 SECONDS) + L.AdjustConfused(3 SECONDS) + L.AdjustDizzy(3 SECONDS) - L.apply_status_effect(STATUS_EFFECT_CULT_STUN) - L.Silence(6 SECONDS) - if(issilicon(target)) - var/mob/living/silicon/S = L - S.emp_act(EMP_HEAVY) - else if(iscarbon(target)) - var/mob/living/carbon/C = L - C.KnockDown(10 SECONDS) - C.apply_damage(60, STAMINA) - C.flash_eyes(1, TRUE) - C.Stuttering(16 SECONDS) - C.CultSlur(20 SECONDS) - C.Jitter(16 SECONDS) - to_chat(user, SPAN_BOLDNOTICE("Stun mark applied! Stab them with a dagger, sword or blood spear to stun them fully!")) + var/old_color = target.color + target.color = COLOR_HERETIC_GREEN + animate(target, color = old_color, time = 4 SECONDS, easing = EASE_IN) + L.mob_light(COLOR_HERETIC_GREEN, 1.5, 2.5, 0.5 SECONDS) + playsound(L, 'sound/effects/curse.ogg', 50, TRUE) + + to_chat(user, SPAN_WARNING("An eldritch force intervenes as you touch [target], absorbing most of the effects!")) + to_chat(target, SPAN_WARNING("As [user] touches you with vile magicks, the Mansus absorbs most of the effects!")) + to_chat(user, SPAN_CULTITALIC("In a brilliant flash of red, [L] falls to the ground!")) + else + L.apply_status_effect(STATUS_EFFECT_CULT_STUN) + L.Silence(6 SECONDS) + if(issilicon(target)) + var/mob/living/silicon/S = L + S.emp_act(EMP_HEAVY) + else if(iscarbon(target)) + var/mob/living/carbon/C = L + C.KnockDown(10 SECONDS) + C.apply_damage(60, STAMINA) + C.flash_eyes(1, TRUE) + C.Stuttering(16 SECONDS) + C.CultSlur(20 SECONDS) + C.Jitter(16 SECONDS) + to_chat(user, SPAN_BOLDNOTICE("Stun mark applied! Stab them with a dagger, sword or blood spear to stun them fully!")) user.do_attack_animation(target) uses-- ..() diff --git a/code/game/gamemodes/cult/cult_actions.dm b/code/game/gamemodes/cult/cult_actions.dm index d5a0730b1e6..8b7ff880013 100644 --- a/code/game/gamemodes/cult/cult_actions.dm +++ b/code/game/gamemodes/cult/cult_actions.dm @@ -30,6 +30,9 @@ if(user.holy_check()) return + if(user.AmountHereticSlurring()) + to_chat(user, SPAN_HIEROPHANT_WARNING("The Mansus blocks your call!")) + return if(!user.can_speak()) to_chat(user, SPAN_WARNING("You can't speak!")) @@ -119,6 +122,12 @@ ..() /datum/action/innate/cult/use_dagger/Activate() + var/obj/item/melee/sickly_blade/cursed/better_tool = owner.find_item(/obj/item/melee/sickly_blade/cursed) + if(better_tool) + owner.unequip(better_tool) + owner.put_in_hands(better_tool) + better_tool.AltClick(owner) + return var/obj/item/melee/cultblade/dagger/D = owner.find_item(/obj/item/melee/cultblade/dagger) if(D) owner.unequip(D) diff --git a/code/game/gamemodes/cult/cult_datums.dm b/code/game/gamemodes/cult/cult_datums.dm index 33e6f2c59c9..1a82e4bba91 100644 --- a/code/game/gamemodes/cult/cult_datums.dm +++ b/code/game/gamemodes/cult/cult_datums.dm @@ -5,6 +5,7 @@ var/dagger_icon = "blood_dagger" var/sword_icon = "blood_blade" var/construct_glow = LIGHT_COLOR_BLOOD_MAGIC + var/haunted_longsword = "hauntedblade" //God Entity var/entity_name = "Nar'Sie" @@ -46,6 +47,10 @@ var/proteon_name = "Proteon" var/proteon_icon_state = "proteon" var/proteon_dead_state = "shade_dead" + //Rusted Harvester Construct + var/rusted_harvester_name = "Rusted Harvester" + var/rusted_harvester_icon_state = "harvester_heretic" + var/rusted_harvester_dead_state = "shade_dead" //Shade Spirit var/shade_name = "Shade" var/shade_icon_state = "shade2" @@ -216,6 +221,8 @@ return proteon_name if("shade") return shade_name + if("rusted_harvester") + return rusted_harvester_name /datum/cult_info/proc/get_icon(type_to_icon) if(!type_to_icon) @@ -235,6 +242,8 @@ return wraith_icon_state if("proteon") return proteon_icon_state + if("rusted_harvester") + return rusted_harvester_icon_state if("shade") return shade_icon_state if("forge") diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 560a3aafa50..99c762ddb73 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -22,6 +22,8 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sprite_sheets_inhand = list("Skrell" = 'icons/mob/clothing/species/skrell/held.dmi') // To stop skrell stabbing themselves in the head new_attack_chain = TRUE + /// Can anyone use this cult tool? If true, anyone can use it. If false, only cult + var/free_use = FALSE /obj/item/melee/cultblade/Initialize(mapload) . = ..() @@ -35,7 +37,7 @@ if(..()) return FINISH_ATTACK - if(!IS_CULTIST(user)) + if(!IS_CULTIST(user) && !free_use) user.Weaken(10 SECONDS) user.drop_item_to_ground(src, force = TRUE) user.visible_message(SPAN_WARNING("A powerful force shoves [user] away from [target]!"), @@ -59,7 +61,7 @@ /obj/item/melee/cultblade/pickup(mob/living/user) . = ..() - if(!IS_CULTIST(user)) + if(!IS_CULTIST(user) && !free_use) to_chat(user, SPAN_CULTLARGE("\"I wouldn't advise that.\"")) to_chat(user, SPAN_WARNING("An overwhelming sense of nausea overpowers you!")) user.Confused(20 SECONDS) @@ -69,6 +71,411 @@ to_chat(user, SPAN_DANGER("You can't seem to hold the blade properly!")) user.drop_item_to_ground(src, force = TRUE) + +#define WIELDER_SPELLS "wielder_spell" +#define SWORD_SPELLS "sword_spell" +#define SWORD_PREFIX "sword_prefix" + +/obj/item/melee/cultblade/haunted + name = "haunted longsword" + desc = "An eerie sword with a blade that is less 'black' than it is 'absolute nothingness'. It glows with furious, restrained green energy." + icon_state = "hauntedblade" + inhand_icon_state = "hauntedblade" + throwforce = 25 + free_use = TRUE + light_color = COLOR_HERETIC_GREEN + light_range = 3 + sprite_sheets_inhand = null + lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi' + righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' + inhand_x_dimension = 64 + inhand_y_dimension = 64 + /// holder for the actual action when created. + var/list/datum/spell/path_sword_actions + /// holder for the actual action when created. + var/list/datum/spell/path_wielder_actions + var/mob/living/trapped_entity + /// The heretic path that the variable below uses to index abilities. Assigned when the heretic is ensouled. + var/heretic_path + /// If the blade is bound, it cannot utilize its abilities, but neither can its wielder. They must unbind it to use it to its full potential. + var/bound = TRUE + /// Are we in the process of binding the blade? + var/binding = FALSE + /// Nested static list used to index abilities and names. + var/static/list/heretic_paths_to_haunted_sword_abilities = list( + // Ash + PATH_ASH = list( + WIELDER_SPELLS = list(/datum/spell/ethereal_jaunt/ash), + SWORD_SPELLS = list(/datum/spell/pointed/ash_beams), + SWORD_PREFIX = "ashen", + ), + // Flesh + PATH_FLESH = list( + WIELDER_SPELLS = list(/datum/spell/pointed/blood_siphon), + SWORD_SPELLS = list(/datum/spell/pointed/cleave), + SWORD_PREFIX = "sanguine", + ), + // Void + PATH_VOID = list( + WIELDER_SPELLS = list(/datum/spell/pointed/void_phase), + SWORD_SPELLS = list(/datum/spell/pointed/void_prison), + SWORD_PREFIX = "tenebrous", + ), + // Blade + PATH_BLADE = list( + WIELDER_SPELLS = list(/datum/spell/fireball/furious_steel/haunted), + SWORD_SPELLS = list(/datum/spell/fireball/furious_steel/solo), + SWORD_PREFIX = "keen", + ), + // Rust + PATH_RUST = list( + WIELDER_SPELLS = list(/datum/spell/cone/staggered/entropic_plume), + SWORD_SPELLS = list(/datum/spell/aoe/rust_conversion, /datum/spell/pointed/rust_construction), + SWORD_PREFIX = "rusted", + ), + // Cosmic + PATH_COSMIC = list( + WIELDER_SPELLS = list(/datum/spell/aoe/conjure/cosmic_expansion), + SWORD_SPELLS = list(/datum/spell/fireball/star_blast), + SWORD_PREFIX = "astral", + ), + // Lock + PATH_LOCK = list( + WIELDER_SPELLS = list(/datum/spell/pointed/burglar_finesse), + SWORD_SPELLS = list(/datum/spell/pointed/apetra_vulnera), + SWORD_PREFIX = "incisive", + ), + // Moon + PATH_MOON = list( + WIELDER_SPELLS = list(/datum/spell/fireball/moon_parade), + SWORD_SPELLS = list(/datum/spell/pointed/moon_smile), + SWORD_PREFIX = "shimmering", + ), + // Starter + PATH_START = list( + WIELDER_SPELLS = null, + SWORD_SPELLS = null, + SWORD_PREFIX = "stillborn", // lol loser + ) , + ) + actions_types = list(/datum/action/item_action/haunted_blade) + +/obj/item/melee/cultblade/haunted/examine(mob/user) + . = ..() + + var/examine_text = "" + if(bound) + examine_text = "[src] shines a dull, sickly green, the power emanating from it clearly bound by the runes on its blade. You could unbind it, and wield its fearsome power. But is it worth loosening the bindings of the spirit inside?" + else + examine_text = "[src] flares a bright and malicious pale lime shade. Someone has unbound the spirit within, and power now clearly resonates from inside the blade, barely restrained and brimming with fury. You may attempt to bind it once more, sealing the horror, or try to harness its strength as a blade." + + . += SPAN_CULT("[examine_text]") + +/datum/action/item_action/haunted_blade + name = "Unseal Spirit" // img is of a chained shade + button_icon = 'icons/mob/actions/actions_cult.dmi' + button_icon_state = "spirit_sealed" + +/datum/action/item_action/haunted_blade/build_button_icon(atom/movable/screen/movable/action_button/button, status_only, force) + var/obj/item/melee/cultblade/haunted/blade = target + if(istype(blade)) + button_icon_state = "spirit_[blade.bound ? "sealed" : "unsealed"]" + name = "[blade.bound ? "Unseal" : "Seal"] Spirit" + + return ..() + +/obj/item/melee/cultblade/haunted/ui_action_click(mob/living/user, actiontype) + if(binding) + return // gtfo + if(bound) + unbind_blade(user) + return + binding = TRUE + if(HAS_MIND_TRAIT(user, TRAIT_HOLY)) + on_priest_handle(user) + else if(IS_CULTIST(user)) + on_cultist_handle(user) + else if(IS_HERETIC_OR_MONSTER(user)) + on_heresy_handle(user) + else if(iswizard(user)) + on_wizard_handle(user) + else + on_normie_handle(user) + return + +/obj/item/melee/cultblade/haunted/proc/on_priest_handle(mob/living/user, actiontype) + user.visible_message(SPAN_CULT("You begin chanting the holy hymns of [GET_CULT_DATA(entity_name, "Nar'Sie")]..."),\ + SPAN_CULT(SPAN_CULT("[user] begins chanting while holding [src] aloft..."))) + if(!do_after(user, 6 SECONDS, src)) + to_chat(user, SPAN_NOTICE("You were interrupted!")) + binding = FALSE + return + playsound(user, 'sound/effects/pray_chaplain.ogg',60,TRUE) + rebind_blade(user) + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_cultist_handle(mob/living/user, actiontype) + var/binding_implements = list(/obj/item/melee/cultblade/dagger, /obj/item/melee/sickly_blade/cursed) + if(!user.is_holding_item_of_types(binding_implements)) + to_chat(user, SPAN_NOTICE("You need to hold a ritual dagger to bind [src]!")) + binding = FALSE + return + + user.visible_message(SPAN_CULT("[user] begins slicing open [user.p_their()] palm on top of [src]..."),\ + SPAN_CULT("You begin slicing open your palm on top of [src]...")) + if(!do_after(user, 6 SECONDS, src)) + binding = FALSE + to_chat(user, SPAN_NOTICE("You were interrupted!")) + return + playsound(user, 'sound/weapons/bladeslice.ogg', 30, TRUE) + rebind_blade(user) + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_heresy_handle(mob/living/user, actiontype) + var/binding_implements = list(/obj/item/clothing/neck/eldritch_amulet, /obj/item/clothing/neck/heretic_focus) + if(!user.is_holding_item_of_types(binding_implements)) + to_chat(user, SPAN_NOTICE("You need to hold a focus to bind [src]!")) + binding = FALSE + return + + user.visible_message(SPAN_CULT("You channel the Mansus through your focus, empowering the sealing runes..."), SPAN_CULT("[user] holds up their eldritch focus on top of [src] and begins concentrating...")) + if(!do_after(user, 6 SECONDS, src)) + binding = FALSE + to_chat(user, SPAN_NOTICE("You were interrupted!")) + return + rebind_blade(user) + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_wizard_handle(mob/living/user, actiontype) + user.visible_message(SPAN_CULT("You begin quickly and nimbly casting the sealing runes."), SPAN_CULT("[user] begins tracing anti-light runes on [src]...")) + if(!do_after(user, 3 SECONDS, src)) + binding = FALSE + to_chat(user, SPAN_NOTICE("You were interrupted!")) + return + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_normie_handle(mob/living/user, actiontype) + var/binding_implements = list(/obj/item/storage/bible) + if(!user.is_holding_item_of_types(binding_implements)) + to_chat(user, SPAN_NOTICE("You need to wield a bible to bind [src]!")) + binding = FALSE + return + + var/passage = "[pick(GLOB.first_names_male)] [rand(1,9)]:[rand(1,25)]" // Space Bibles will have Alejandro 9:21 passages, as part of the Very New Testament. + user.visible_message(SPAN_CULT("You start reading aloud the passage in [passage]..."), SPAN_CULT("[user] starts reading aloud the passage in [passage]...")) + if(!do_after(user, 12 SECONDS, src)) + binding = FALSE + to_chat(user, SPAN_NOTICE("You were interrupted!")) + return + rebind_blade(user) + return TRUE + + +/obj/item/melee/cultblade/haunted/proc/unbind_blade(mob/user) + var/holup = tgui_alert(user, "Are you sure you wish to unseal the spirit within?", "Sealed Evil In A Jar", list("I need the power!", "Maybe not...")) + if(holup != "I need the power!") + return + to_chat(user, SPAN_CULT("You start focusing on the power of the blade, letting it guide your fingers along the inscribed runes...")) + if(!do_after(user, 5 SECONDS, src)) + to_chat(user, SPAN_NOTICE("You were interrupted!")) + return + visible_message(SPAN_DANGER("[user] has unbound [src]!")) + bound = FALSE + for(var/datum/spell/sword_spell as anything in path_sword_actions) + trapped_entity.AddSpell(sword_spell) + for(var/datum/spell/wielder_spell as anything in path_wielder_actions) + user.AddSpell(wielder_spell) + free_use = TRUE + force += 5 + armor_penetration_flat += 10 + light_range += 3 + + playsound(src ,'sound/spookoween/insane_low_laugh.ogg', 200, TRUE) //quiet + binding_filters_update() + AddElement(/datum/element/heretic_focus) + +/obj/item/melee/cultblade/haunted/proc/rebind_blade(mob/user) + visible_message(SPAN_DANGER("[user] has bound [src]!")) + binding = FALSE + bound = TRUE + force -= 5 + armor_penetration_flat -= 10 + free_use = FALSE // it's a cult blade and you sealed away the other power. + light_range -= 3 + for(var/datum/spell/sword_spell as anything in path_sword_actions) + trapped_entity.RemoveSpell(sword_spell) + for(var/datum/spell/wielder_spell as anything in path_wielder_actions) + user.RemoveSpell(wielder_spell) + + playsound(src ,'sound/hallucinations/wail.ogg', 20, TRUE) // add BOUND alert and UNBOUND + rebuild_spells() + binding_filters_update() + RemoveElement(/datum/element/heretic_focus) + +/obj/item/melee/cultblade/haunted/Initialize(mapload, mob/soul_to_bind, mob/awakener, do_bind = TRUE) + . = ..() + icon_state = GET_CULT_DATA(haunted_longsword, "hauntedblade") + inhand_icon_state = GET_CULT_DATA(haunted_longsword, "hauntedblade") + AddElement(/datum/element/heretic_focus) + if(do_bind && !mapload) + bind_soul(soul_to_bind, awakener) + binding_filters_update() + addtimer(CALLBACK(src, PROC_REF(start_glow_loop)), rand(0.1 SECONDS, 1.9 SECONDS)) + AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.4, _parryable_attack_types = ALL_ATTACK_TYPES, _parry_cooldown = (5 / 3) SECONDS) // 0.666667 seconds for 60% uptime. + +/obj/item/melee/cultblade/haunted/proc/bind_soul(mob/soul_to_bind, mob/awakener) + + var/datum/mind/trapped_mind = soul_to_bind?.mind + + if(!trapped_mind) + return // Can't do anything further down the list + + trapped_entity = new/mob/living/simple_animal/shade/sword/generic_item(src) + trapped_entity.name = soul_to_bind.name + + // Get the heretic's new body and antag datum. + trapped_entity.key = trapped_mind.key + trapped_entity.mind = trapped_mind + var/datum/antagonist/heretic/heretic_holder = IS_HERETIC(trapped_entity) + if(!heretic_holder) + stack_trace("[soul_to_bind] in but not a heretic on the heretic soul blade.") + + // Set the sword's path for spell selection. + heretic_path = heretic_holder.heretic_path + + trapped_entity.mind.remove_antag_datum(/datum/antagonist/heretic) + + // Add the fallen antag datum, give them a heads-up of what's happening. + var/datum/antagonist/soultrapped_heretic/bozo = new() + trapped_entity.mind.add_antag_datum(bozo) + + // Assigning the spells to give to the wielder and spirit. + // Let them cast the given spell. + ADD_TRAIT(trapped_entity, TRAIT_ALLOW_HERETIC_CASTING, INNATE_TRAIT) + + var/list/path_spells = heretic_paths_to_haunted_sword_abilities[heretic_path] + + name = "[path_spells[SWORD_PREFIX]] [name]" + + + rebuild_spells() + + binding_filters_update() + +/obj/item/melee/cultblade/haunted/equipped(mob/user, slot, initial) + . = ..() + if((!(slot & ITEM_SLOT_BOTH_HANDS)) || bound) + return + for(var/datum/spell/wielder_spell in path_wielder_actions) + user.AddSpell(wielder_spell) + binding_filters_update() + +/obj/item/melee/cultblade/haunted/dropped(mob/user, silent) + . = ..() + for(var/datum/spell/wielder_spell in path_wielder_actions) + user.RemoveSpell(wielder_spell) + rebuild_spells(wielder_only = TRUE) + binding_filters_update() + +/obj/item/melee/cultblade/haunted/proc/rebuild_spells(wielder_only = FALSE) + var/list/path_spells = heretic_paths_to_haunted_sword_abilities[heretic_path] + var/list/wielder_spells = path_spells[WIELDER_SPELLS] + var/list/sword_spells = path_spells[SWORD_SPELLS] + if(!wielder_only) + QDEL_LIST_CONTENTS(path_sword_actions) + QDEL_LIST_CONTENTS(path_wielder_actions) + // Creating the path spells. + // The sword is created bound - so we do not grant it the spells just yet, but we still create and store them. + + if(sword_spells && !wielder_only) + for(var/datum/spell/sword_spell as anything in sword_spells) + var/datum/spell/instanced_spell = new sword_spell(trapped_entity) + LAZYADD(path_sword_actions, instanced_spell) + instanced_spell.overlay_icon_state = "bg_cult_border" // for flavor, and also helps distinguish + + if(wielder_spells) + for(var/datum/spell/wielder_spell as anything in wielder_spells) + var/datum/spell/instanced_spell = new wielder_spell(trapped_entity) + LAZYADD(path_wielder_actions, instanced_spell) + instanced_spell.overlay_icon_state = "bg_cult_border" + + +/obj/item/melee/cultblade/haunted/proc/binding_filters_update(mob/user) + + var/h_color = heretic_path ? GLOB.heretic_path_to_color[heretic_path] : "#FF00FF" + + // on bound + if(bound) + add_filter("bind_glow", 2, list("type" = "outline", "color" = h_color, "size" = 0.1)) + remove_filter("unbound_ray") + update_filters() + // on unbound + else + // we re-add this every time it's picked up or dropped + remove_filter("unbound_ray") + add_filter(name = "unbound_ray", priority = 1, params = list( + type = "rays", + size = 16, + color = COLOR_HERETIC_GREEN, // the sickly green of the heretic leaking through + density = 16, + )) + // because otherwise the animations stack and it looks ridiculous + var/ray_filter = get_filter("unbound_ray") + animate(ray_filter, offset = 100, time = 2 MINUTES, loop = -1, flags = ANIMATION_PARALLEL) // Absurdly long animate so nobody notices it hitching when it loops + animate(offset = 0, time = 2 MINUTES) // I sure hope duration of animate doesnt have any performance effect + + update_filters() + +/obj/item/melee/cultblade/haunted/proc/start_glow_loop() + var/filter = get_filter("bind_glow") + if(!filter) + return + + animate(filter, alpha = 110, time = 1.5 SECONDS, loop = -1) + animate(alpha = 40, time = 2.5 SECONDS) + +/obj/item/melee/cultblade/haunted/proc/handle_haunted_movement() + if(!isliving(loc)) + return TRUE + if(bound) + to_chat(trapped_entity, SPAN_WARNING("You are bound, and unable to move! Try to get someone to unbind you!")) + return FALSE + + var/mob/loccer = loc + var/resist_chance = 20 + var/fail_text = "You struggle, but [loccer] keeps [loccer.p_their()] grip on you!" + var/particle_to_spawn = null + if(IS_CULTIST(loccer)) + resist_chance = 5 // your mastahs + fail_text = "You struggle, but [loccer]'s grip is unnaturally hard to resist!" + particle_to_spawn = /obj/effect/temp_visual/cult/sparks + if(IS_HERETIC_OR_MONSTER(loccer)) + resist_chance = 10 + fail_text = "You struggle, but [loccer] deftly handles the grip movement." + particle_to_spawn = /obj/effect/temp_visual/revenant + if(HAS_MIND_TRAIT(loccer, TRAIT_HOLY)) + resist_chance = 6 + fail_text = "You struggle, but [loccer]'s holy grip holds tight against your thrashing." + particle_to_spawn = null + if(iswizard(loccer)) + resist_chance = 3 // magic master + fail_text = "You struggle, but [loccer]'s handle on magic easily neutralizes your movement." + particle_to_spawn = /obj/effect/particle_effect/sparks + + new particle_to_spawn(get_turf(loccer)) + + if(prob(resist_chance)) + return TRUE + // flung by later code + else + to_chat(trapped_entity, SPAN_WARNING("[fail_text]")) + return FALSE + + +#undef WIELDER_SPELLS +#undef SWORD_SPELLS +#undef SWORD_PREFIX + /obj/item/restraints/legcuffs/bola/cult name = "runed bola" desc = "A bola, crafted of dark metal and sinuous cords. The inscriptions covering the weights prevent it from striking the Faithful." @@ -586,7 +993,7 @@ var/datum/status_effect/cult_stun_mark/S = L.has_status_effect(STATUS_EFFECT_CULT_STUN) if(S) S.trigger() - else + else if(!IS_HERETIC(L)) L.KnockDown(10 SECONDS) L.apply_damage(60, STAMINA) L.apply_status_effect(STATUS_EFFECT_CULT_STUN) diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm index 99c53c66e3b..ac7c62bb159 100644 --- a/code/game/gamemodes/cult/cult_objectives.dm +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -42,6 +42,8 @@ return if(possible_target.has_antag_datum(/datum/antagonist/cultist)) return TARGET_INVALID_CULTIST + if(possible_target.has_antag_datum(/datum/antagonist/heretic)) + return TARGET_INVALID_HERETIC if(!SSticker.mode.cult_team) stack_trace("/datum/objective/sacrifice/is_invalid_target was called without there being an assigned cult team") return diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 37eac1d637f..aca3e80cfc2 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -40,6 +40,8 @@ var/creation_delay = 2400 var/list/choosable_items = list("A coder forgot to set this" = /obj/item/grown/bananapeel) var/creation_message = "A dank smoke comes out, and you pass out. When you come to, you notice a %ITEM%!" + /// The dispenser will create this item and then delete itself if it is rust converted. + var/obj/mansus_conversion_path = /obj/item/bikehorn/rubberducky /obj/structure/cult/functional/obj_destruction() visible_message(death_message) @@ -135,6 +137,13 @@ light_power = initial(light_power) update_light() +/obj/structure/cult/functional/rust_heretic_act() + visible_message(SPAN_NOTICE("[src] crumbles to dust. In its midst, you spot \a [initial(mansus_conversion_path.name)].")) + var/turf/turfy = get_turf(src) + new mansus_conversion_path(turfy) + turfy.rust_heretic_act() + return ..() + /obj/structure/cult/functional/altar name = "altar" desc = "A sacrifical altar, covered in fresh blood. The runes covering its sides glow with barely-restrained power." @@ -148,6 +157,15 @@ creation_message = SPAN_CULTITALIC("You kneel before the altar and your faith is rewarded with a %ITEM%!") choosable_items = list("Eldritch Whetstone" = /obj/item/whetstone/cult, "Flask of Unholy Water" = /obj/item/reagent_containers/drinks/bottle/unholywater, "Construct Shell" = /obj/structure/constructshell) + mansus_conversion_path = /obj/effect/heretic_rune/big + +/obj/structure/cult/functional/altar/get_choosable_items() + . = ..() + + if(!SSticker.mode.cult_team?.unlocked_heretic_items[PROTEON_ORB_UNLOCKED]) + return + . += "Summoning Orb" + .["Summoning Orb"] = /obj/item/proteon_orb /obj/structure/cult/functional/altar/Initialize(mapload) . = ..() @@ -168,6 +186,7 @@ selection_title = "Forge" creation_message = SPAN_CULTITALIC("You work the forge as dark knowledge guides your hands, creating a %ITEM%!") choosable_items = list("Shielded Robe" = /obj/item/clothing/suit/hooded/cultrobes/cult_shield, "Flagellant's Robe" = /obj/item/clothing/suit/hooded/cultrobes/flagellant_robe) + mansus_conversion_path = /obj/structure/eldritch_crucible /obj/structure/cult/functional/forge/get_choosable_items() . = ..() @@ -175,6 +194,10 @@ // Both lines here are needed. If you do it without, youll get issues. . += "Mirror Shield" .["Mirror Shield"] = /obj/item/shield/mirror + if(!SSticker.mode.cult_team?.unlocked_heretic_items[CURSED_BLADE_UNLOCKED]) + return + . += "Cursed Blade" + .["Cursed Blade"] = /obj/item/melee/sickly_blade/cursed /obj/structure/cult/functional/forge/Initialize(mapload) @@ -220,6 +243,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( /turf/simulated/wall/cult/artificer ))) +//why is this a subtype of the dispenser type /obj/structure/cult/functional/pylon name = "pylon" desc = "A floating, otherworldly crystal that radiates a baleful red light. Wherever the light touches, matter warps, and the faithful are invigorated." @@ -229,6 +253,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( max_integrity = 50 //Very fragile death_message = SPAN_DANGER("The pylon's crystal vibrates and glows fiercely before violently shattering!") death_sound = 'sound/effects/pylon_shatter.ogg' + mansus_conversion_path = /obj/item/clothing/neck/heretic_focus //I guess the crystal turns into a necklace. Look this shouldnt be a subtype, auugh var/heal_delay = 30 var/last_heal = 0 @@ -330,6 +355,15 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( creation_message = SPAN_CULTITALIC("You invoke the dark magic of the tomes creating a %ITEM%!") choosable_items = list("Shuttle Curse" = /obj/item/shuttle_curse, "Zealot's Blindfold" = /obj/item/clothing/glasses/hud/health/night/cultblind, "Veil Shifter" = /obj/item/cult_shift, "Reality sunderer" = /obj/item/portal_amulet, "Blank Tarot Card" = /obj/item/blank_tarot_card) + mansus_conversion_path = /obj/item/codex_cicatrix + +/obj/structure/cult/functional/archives/get_choosable_items() + . = ..() + + if(!SSticker.mode.cult_team?.unlocked_heretic_items[CRIMSON_MEDALLION_UNLOCKED]) + return + . += "Crimson Medallion" + .["Crimson Medallion"] = /obj/item/clothing/neck/heretic_focus/crimson_medallion /obj/structure/cult/functional/archives/Initialize(mapload) . = ..() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index ab8ce004dff..bddbdcedacd 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -1,6 +1,3 @@ -#define CULT_ELDERGOD "eldergod" -#define CULT_SLAUGHTER "slaughter" - /obj/item/melee/cultblade/dagger name = "ritual dagger" desc = "A small, well-balanced dagger that radiates an aura of palpable menace. The blade tapers to a razor-sharp point that is ideal for drawing with." @@ -10,14 +7,12 @@ throwforce = 25 armor_penetration_flat = 35 sprite_sheets_inhand = null // Override parent - var/drawing_rune = FALSE - var/scribe_multiplier = 1 // Lower is faster /obj/item/melee/cultblade/dagger/adminbus name = "ritual dagger of scribing, +1" desc = "VERY fast culto scribing at incredible high speed!" force = 16 - scribe_multiplier = 0.1 + toolspeed = 0.1 /obj/item/melee/cultblade/dagger/Initialize(mapload) . = ..() @@ -55,147 +50,3 @@ scribe_rune(user) else to_chat(user, SPAN_WARNING("[src] is covered in unintelligible shapes and markings.")) - -/obj/item/melee/cultblade/dagger/proc/narsie_rune_check(mob/living/user, area/A) - var/datum/game_mode/gamemode = SSticker.mode - - if(gamemode.cult_team.cult_status < NARSIE_NEEDS_SUMMONING) - to_chat(user, SPAN_CULTITALIC("[GET_CULT_DATA(entity_name, "Your god")] is not ready to be summoned yet!")) - return FALSE - if(gamemode.cult_team.cult_status == NARSIE_HAS_RISEN) - to_chat(user, SPAN_CULTLARGE("\"I am already here. There is no need to try to summon me now.\"")) - return FALSE - - var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots - if(!(A in summon_areas)) - to_chat(user, SPAN_CULTLARGE("[GET_CULT_DATA(entity_name, "Your god")] can only be summoned where the veil is weak - in [english_list(summon_areas)]!")) - return FALSE - var/confirm_final = tgui_alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence AND your location!", - "Are you prepared for the final battle?", list("My life for [GET_CULT_DATA(entity_name, "the cult")]!", "No")) - if(user) - if(confirm_final == "No" || confirm_final == null) - to_chat(user, SPAN_CULTITALIC("You decide to prepare further before scribing the rune.")) - return FALSE - else - if(locate(/obj/effect/rune) in range(1, user)) - to_chat(user, SPAN_CULTLARGE("You need a space cleared of runes before you can summon [GET_CULT_DATA(entity_title1, "your god")]!")) - return FALSE - else - return TRUE - -/obj/item/melee/cultblade/dagger/proc/can_scribe(mob/living/user) - if(!src || !user || loc != user || user.incapacitated()) - return FALSE - if(drawing_rune) - to_chat(user, SPAN_WARNING("You're already drawing a rune!")) - return FALSE - - var/turf/T = get_turf(user) - if(isspaceturf(T)) - return FALSE - if((locate(/obj/effect/rune) in T) || (locate(/obj/effect/rune/narsie) in range(1, T))) - to_chat(user, SPAN_WARNING("There's already a rune here!")) - return FALSE - return TRUE - -/obj/item/melee/cultblade/dagger/proc/scribe_rune(mob/living/user) - var/list/shields = list() - var/list/possible_runes = list() - var/keyword - - if(!can_scribe(user)) // Check this before anything else - return - - // Choosing a rune - for(var/I in (subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed)) - var/obj/effect/rune/R = I - var/rune_name = initial(R.cultist_name) - if(rune_name) - possible_runes[rune_name] = R - if(!length(possible_runes)) - return - - var/chosen_rune = tgui_input_list(user, "Choose a rite to scribe.", "Sigils of Power", possible_runes) - if(!chosen_rune) - return - var/obj/effect/rune/rune = possible_runes[chosen_rune] - var/narsie_rune = FALSE - if(rune == /obj/effect/rune/narsie) - narsie_rune = TRUE - if(initial(rune.req_keyword)) - keyword = tgui_input_text(user, "Please enter a keyword for the rune.", "Enter Keyword") - if(!keyword) - return - - // Check everything again, in case they moved - if(!can_scribe(user)) - return - - // Check if the rune is allowed - var/area/A = get_area(src) - var/turf/runeturf = get_turf(user) - var/datum/game_mode/gamemode = SSticker.mode - if(ispath(rune, /obj/effect/rune/summon)) - if(!is_station_level(runeturf.z) || isspacearea(A)) - to_chat(user, SPAN_CULTITALIC("The veil is not weak enough here to summon a cultist, you must be on station!")) - return - - if(ispath(rune, /obj/effect/rune/teleport)) - if(!is_level_reachable(user.z)) - to_chat(user, SPAN_CULTITALIC("You are too far away from the station to teleport!")) - return - - var/old_color = user.color // we'll temporarily redden the user for better feedback to fellow cultists. Store this to revert them back. - if(narsie_rune) - if(!narsie_rune_check(user, A)) - return // don't do shit - var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots - if(!(A in summon_areas)) // Check again to make sure they didn't move - to_chat(user, SPAN_CULTLARGE("The ritual can only begin where the veil is weak - in [english_list(summon_areas)]!")) - return - GLOB.major_announcement.Announce("Figments from an eldritch god are being summoned into the [A.map_name] from an unknown dimension. Disrupt the ritual at all costs, before the station is destroyed! Space Law and SOP are suspended. The entire crew must kill cultists on sight.", "Central Command Higher Dimensional Affairs", 'sound/AI/cult_summon.ogg') - for(var/I in spiral_range_turfs(1, user, 1)) - var/turf/T = I - var/obj/machinery/shield/cult/narsie/N = new(T) - shields |= N - user.color = COLOR_RED - - // Draw the rune - var/mob/living/carbon/human/H = user - H.cult_self_harm(initial(rune.scribe_damage)) - var/others_message - if(!narsie_rune) - others_message = SPAN_WARNING("[user] cuts [user.p_their()] body and begins writing in [user.p_their()] own blood!") - else - others_message = SPAN_BIGGERDANGER("[user] cuts [user.p_their()] body and begins writing something particularly ominous in [user.p_their()] own blood!") - user.visible_message(others_message, - SPAN_CULTITALIC("You slice open your body and begin drawing a sigil of [GET_CULT_DATA(entity_title3, "your god")].")) - - drawing_rune = TRUE // Only one at a time - var/scribe_successful = do_after(user, initial(rune.scribe_delay) * scribe_multiplier, target = runeturf) - for(var/V in shields) // Only used for the 'Tear Veil' rune - var/obj/machinery/shield/S = V - if(S && !QDELETED(S)) - qdel(S) - user.color = old_color - drawing_rune = FALSE - if(!scribe_successful) - return - - user.visible_message(SPAN_WARNING("[user] creates a strange circle in [user.p_their()] own blood."), - SPAN_CULTITALIC("You finish drawing the arcane markings of [GET_CULT_DATA(entity_title3, "your god")].")) - - var/obj/effect/rune/R = new rune(runeturf, keyword) - if(narsie_rune) - for(var/obj/effect/rune/I in orange(1, R)) - qdel(I) - SSblackbox.record_feedback("tally", "runes_scribed", 1, "[R.cultist_name]") - R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type - R.add_hiddenprint(H) - R.color = H.dna.species.blood_color - R.rune_blood_color = H.dna.species.blood_color - to_chat(user, SPAN_CULT("The [lowertext(initial(rune.cultist_name))] rune [initial(rune.cultist_desc)]")) - -#undef CULT_ELDERGOD -#undef CULT_SLAUGHTER diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 67ef308492e..e3113fa07c7 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -81,7 +81,7 @@ To draw a rune, use a ritual dagger. var/obj/item/melee/cultblade/dagger/dagger = used user.visible_message(SPAN_WARNING("[user] begins to erase [src] with [dagger].")) - if(do_after(user, initial(scribe_delay) * dagger.scribe_multiplier, target = src)) + if(do_after(user, initial(scribe_delay) * dagger.toolspeed, target = src)) to_chat(user, SPAN_NOTICE("You carefully erase the [lowertext(cultist_name)] rune.")) qdel(src) return ITEM_INTERACT_COMPLETE @@ -319,14 +319,37 @@ structure_check() searches for nearby cultist structures required for the invoca for(var/I in invokers) to_chat(I, SPAN_WARNING("You need at least two invokers to convert!")) return - + if(HAS_TRAIT(convertee, TRAIT_WAS_SACRIFICED) && length(invokers) < 3) // harder to convert heretic-touched + fail_invoke() + for(var/I in invokers) + to_chat(I, SPAN_WARNING("This one struggles against our influence with an unknown force. We require at least 3 invokers to convert them!")) + return convertee.visible_message(SPAN_WARNING("[convertee] writhes in pain as the markings below them glow a bloody red!"), \ SPAN_CULTLARGE("AAAAAAAAAAAAAA-")) convertee.mind.add_antag_datum(/datum/antagonist/cultist) - to_chat(convertee, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \ - and something evil takes root.") - to_chat(convertee, "Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [GET_CULT_DATA(entity_title3, "your god")] above all else. Bring it back.\ - ") + to_chat(convertee, SPAN_CULTITALIC("Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \ + and something evil takes root.")) + to_chat(convertee, SPAN_CULTITALIC("Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [GET_CULT_DATA(entity_title3, "your god")] above all else. Bring it back.\ + ")) + + if(HAS_TRAIT(convertee, TRAIT_WAS_SACRIFICED)) // Augh! heretic backlash! + playsound(convertee, 'sound/magic/voidblink.ogg', 50, FALSE) + if(prob(20)) + var/mob_type = pick(list( + /mob/living/basic/heretic_summon/rust_spirit, + /mob/living/basic/heretic_summon/ash_spirit, + /mob/living/basic/heretic_summon/stalker, + /mob/living/basic/heretic_summon/raw_prophet, + /mob/living/basic/heretic_summon/maid_in_the_mirror, + )) + convertee.visible_message(SPAN_DANGER("A heretical beast is pulled out of [convertee] during the offering!")) + new mob_type(convertee.loc) + for(var/mob in invokers) + if(iscarbon(mob)) + to_chat(mob, SPAN_HIEROPHANT_WARNING("AUGH! A vile magic recoils against our influence and poisons us!")) + var/mob/living/carbon/carbon = mob + carbon.reagents.add_reagent("toxin", 15) + carbon.reagents.add_reagent("histamine", 15) if(ishuman(convertee)) var/mob/living/carbon/human/H = convertee @@ -370,6 +393,21 @@ structure_check() searches for nearby cultist structures required for the invoca fail_invoke() log_game("Sacrifice rune failed - not enough acolytes and target is living") return + var/datum/antagonist/heretic/ascended_heretic = IS_HERETIC(offering) + if(ascended_heretic?.ascended && offering.stat != DEAD || istype(offering, /mob/living/basic/heretic_summon/star_gazer)) // No sliping an ascended heretic on a sacrifice rune to sacrifice them, lmao + for(var/M in invokers) + to_chat(M, SPAN_CULTITALIC("[offering] is too powerful to be sacrificed alive!")) + fail_invoke() + log_game("Sacrifice rune failed - heretic is ascended and alive") + return + var/mob/living/first_invoker = invokers[1] + var/datum/antagonist/cultist/first_invoker_datum = first_invoker.mind.has_antag_datum(/datum/antagonist/cultist) + var/datum/team/cult/cult_team = first_invoker_datum.get_team() + var/signal_result = SEND_SIGNAL(offering, COMSIG_LIVING_CULT_SACRIFICED, invokers, cult_team) + + var/do_message = TRUE + if(signal_result & SILENCE_SACRIFICE_MESSAGE) + do_message = FALSE var/sacrifice_fulfilled var/worthless = FALSE @@ -390,36 +428,43 @@ structure_check() searches for nearby cultist structures required for the invoca GLOB.sacrificed += offering new /obj/effect/temp_visual/cult/sac(loc) - for(var/M in invokers) - if(sacrifice_fulfilled) - to_chat(M, SPAN_CULTLARGE("\"Yes! This is the one I desire! You have done well.\"")) - if(!SSticker.mode.cult_team.mirror_shields_active) // Only show once - to_chat(M, SPAN_CULTITALIC("You are now able to construct mirror shields inside the daemon forge.")) - SSticker.mode.cult_team.mirror_shields_active = TRUE - else - if((ishuman(offering) && offering.mind?.offstation_role && offering.mind.special_role != SPECIAL_ROLE_ERT) || HAS_MIND_TRAIT(offering, TRAIT_XENOBIO_SPAWNED_HUMAN)) //If you try it on a ghost role, or an envolved caterpillar/nymph, you get nothing - to_chat(M, SPAN_CULTLARGE("\"This soul is of no use to either of us.\"")) - worthless = TRUE - else if(ishuman(offering) || isrobot(offering)) - to_chat(M, SPAN_CULTLARGE("\"I accept this sacrifice.\"")) + if(do_message) + for(var/M in invokers) + if(sacrifice_fulfilled) + to_chat(M, SPAN_CULTLARGE("\"Yes! This is the one I desire! You have done well.\"")) + if(!SSticker.mode.cult_team.mirror_shields_active) // Only show once + to_chat(M, SPAN_CULTLARGE("You are now able to construct mirror shields inside the daemon forge.")) + SSticker.mode.cult_team.mirror_shields_active = TRUE else - to_chat(M, SPAN_CULTLARGE("\"I accept this meager sacrifice.\"")) - playsound(offering, 'sound/misc/demon_consume.ogg', 100, TRUE, SOUND_RANGE_SET(10)) - - if(((ishuman(offering) || isrobot(offering) || isbrain(offering)) && offering.mind) && !worthless) - var/obj/item/soulstone/stone = new /obj/item/soulstone(get_turf(src)) - stone.invisibility = INVISIBILITY_MAXIMUM // So it's not picked up during transfer_soul() - stone.transfer_soul("FORCE", offering, user) // If it cannot be added - stone.invisibility = 0 - var/put_in_hands = user.put_in_any_hand_if_possible(stone) - if(put_in_hands) - to_chat(user, SPAN_CULTITALIC("A glowing crimson shard appears in your hand - your new ally contained within.")) + if((ishuman(offering) && offering.mind?.offstation_role && offering.mind.special_role != SPECIAL_ROLE_ERT) || HAS_MIND_TRAIT(offering, TRAIT_XENOBIO_SPAWNED_HUMAN)) //If you try it on a ghost role, or an envolved caterpillar/nymph, you get nothing + to_chat(M, SPAN_CULTLARGE("\"This soul is of no use to either of us.\"")) + worthless = TRUE + else if(ishuman(offering) || isrobot(offering)) + to_chat(M, SPAN_CULTLARGE("\"I accept this sacrifice.\"")) + else + to_chat(M, SPAN_CULTLARGE("\"I accept this meager sacrifice.\"")) + // post-message + if(signal_result & STOP_SACRIFICE) + return FALSE + if(offering && (signal_result & DUST_SACRIFICE)) // No soulstone when dusted + playsound(offering, 'sound/magic/teleport_diss.ogg', 100, TRUE) + offering.dust() else - if(isrobot(offering)) - offering.dust() //To prevent the MMI from remaining + playsound(offering, 'sound/misc/demon_consume.ogg', 100, TRUE, SOUND_RANGE_SET(10)) + if(((ishuman(offering) || isrobot(offering) || isbrain(offering)) && offering.mind) && !worthless) + var/obj/item/soulstone/stone = new /obj/item/soulstone(get_turf(src)) + stone.invisibility = INVISIBILITY_MAXIMUM // So it's not picked up during transfer_soul() + stone.transfer_soul("FORCE", offering, user) // If it cannot be added + stone.invisibility = 0 + var/put_in_hands = user.put_in_any_hand_if_possible(stone) + if(put_in_hands) + to_chat(user, SPAN_CULTITALIC("A glowing crimson shard appears in your hand - your new ally contained within.")) else - offering.gib() - playsound(offering, 'sound/magic/disintegrate.ogg', 100, TRUE, SOUND_RANGE_SET(10)) + if(isrobot(offering)) + offering.dust() //To prevent the MMI from remaining + else + offering.gib() + playsound(offering, 'sound/magic/disintegrate.ogg', 100, TRUE, SOUND_RANGE_SET(10)) if(sacrifice_fulfilled) SSticker.mode.cult_team.successful_sacrifice() return TRUE @@ -935,6 +980,11 @@ structure_check() searches for nearby cultist structures required for the invoca summon_ghosts(user, T) else if(choice == "Ascend as a Dark Spirit") + if(length(SSticker.mode.heretics)) + to_chat(user, SPAN_HIEROPHANT("The Mansus fogs your view into the spirit wrold...")) + fail_invoke() + log_game("Manifest rune failed - heretic blocked ghosting") + return list() ghostify(user, T) @@ -965,6 +1015,7 @@ structure_check() searches for nearby cultist structures required for the invoca new_human.key = ghost_to_spawn.key new_human.gender = ghost_to_spawn.gender new_human.alpha = 150 //Makes them translucent + ADD_TRAIT(new_human, TRAIT_MUTE, UID()) new_human.equipOutfit(/datum/outfit/ghost_cultist) //give them armor new_human.apply_status_effect(STATUS_EFFECT_SUMMONEDGHOST, user) //ghosts can't summon more ghosts, also lets you see actual ghosts for(var/obj/item/organ/external/current_organ in new_human.bodyparts) diff --git a/code/game/gamemodes/dynamic/antag_rulesets.dm b/code/game/gamemodes/dynamic/antag_rulesets.dm index db76e6fc850..a0a7b8b7173 100644 --- a/code/game/gamemodes/dynamic/antag_rulesets.dm +++ b/code/game/gamemodes/dynamic/antag_rulesets.dm @@ -220,6 +220,15 @@ latespawn_time = null addtimer(CALLBACK(src, PROC_REF(latespawn), dynamic), 5 MINUTES, TIMER_DELETE_ME|TIMER_LOOP) +/datum/ruleset/heretic + name = "Heretic" + ruleset_weight = 10 + antag_cost = 10 + antagonist_type = /datum/antagonist/heretic + + banned_jobs = list("Cyborg", "AI") + + /datum/ruleset/vampire name = "Vampire" ruleset_weight = 12 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index e53351d309b..9161902301e 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -59,6 +59,8 @@ var/list/datum/mind/vampire_enthralled = list() /// A list of all minds which have the mindflayer antag datum var/list/datum/mind/mindflayers = list() + /// A list of all minds which have the heretic antag datum + var/list/datum/mind/heretics = list() /// A list containing references to the minds of soon-to-be traitors. This is seperate to avoid duplicate entries in the `traitors` list. var/list/datum/mind/pre_traitors = list() @@ -632,6 +634,7 @@ . += auto_declare_completion_enthralled() . += auto_declare_completion_mindflayer() . += auto_declare_completion_changeling() + . += auto_declare_completion_heretic() . += auto_declare_completion_nuclear() . += auto_declare_completion_wizard() . += auto_declare_completion_revolution() diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index ff47e19fba8..fa50bdcecf1 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -295,7 +295,7 @@ if(has_guardian(user)) to_chat(user, "You already have a [mob_name]!") return - if(user.mind && (IS_CHANGELING(user) || user.mind.has_antag_datum(/datum/antagonist/vampire) || IS_MINDFLAYER(user))) + if(user.mind && (IS_CHANGELING(user) || user.mind.has_antag_datum(/datum/antagonist/vampire) || IS_MINDFLAYER(user)|| IS_HERETIC(user))) //God I hate this stupid check but it's needed to_chat(user, "[ling_failure]") return if(used) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index eb55b65d83f..323c6cde40d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1,5 +1,7 @@ /// Stores a reference to every [objective][/datum/objective] which currently exists. GLOBAL_LIST_EMPTY(all_objectives) +/// Stores a reference to every heretic sacrifice target. +GLOBAL_LIST_EMPTY(all_sacrifice_targets) // Used in admin procs to give them a pretty list to look at, and to also have sane reusable code. /// Stores objective [names][/datum/objective/var/name] as list keys, and their corresponding typepaths as list values. GLOBAL_LIST_EMPTY(admin_objective_list) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index d429d262dc3..3cd5becceef 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -1,6 +1,9 @@ //returns 1 if this mob has sufficient access to use this object /obj/proc/allowed(mob/M) //check if we don't require any access at all + var/attempted_access = SEND_SIGNAL(M, COMSIG_MOB_TRIED_ACCESS, src) + if(attempted_access & ACCESS_DISALLOWED) + return FALSE if(check_access()) return 1 diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 328a37f857f..f1312e42c4e 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -58,6 +58,9 @@ /// So explosion doesn't deal extra damage for multitile airlocks COOLDOWN_DECLARE(explosion_cooldown) + /// Blocks the door from making sparks when on cooldown. Lag preventor, disabled by disable_door_sparks for 3 seconds + COOLDOWN_DECLARE(spark_block_cooldown) + /obj/machinery/door/Initialize(mapload) . = ..() @@ -284,7 +287,7 @@ if(HAS_TRAIT(src, TRAIT_CMAGGED) && used.can_clean()) //If the cmagged door is being hit with cleaning supplies, don't open it, it's being cleaned! return ITEM_INTERACT_SKIP_TO_AFTER_ATTACK - if(!(used.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM) + if(!(used.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM && !istype(used, /obj/item/card/id/heretic)) try_to_activate_door(user) return ITEM_INTERACT_COMPLETE @@ -304,7 +307,7 @@ /obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() if(. && obj_integrity > 0) - if(damage_amount >= 10 && prob(30)) + if(damage_amount >= 10 && prob(30) && COOLDOWN_FINISHED(src, spark_block_cooldown)) spark_system.start() /obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) @@ -365,7 +368,7 @@ if(barricaded) to_chat(user, SPAN_WARNING("[src] is already barricaded!")) return - + if(used.get_amount() < 2) to_chat(user, SPAN_WARNING("You need at least two planks of wood to barricade [src]!")) return @@ -377,7 +380,7 @@ to_chat(user, SPAN_NOTICE("You begin boarding up [src]...")) if(!do_after_once(user, 4 SECONDS, target = src)) return - + /// Quick checks to make sure nothing has changed during the timer. if(!density || barricaded) return @@ -687,3 +690,6 @@ blockage.update_icon(UPDATE_ICON_STATE) #undef MAX_FOAM_LEVEL + +/obj/machinery/door/proc/disable_door_sparks() + COOLDOWN_START(src, spark_block_cooldown, 3 SECONDS) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 68feaf7444b..852fbc342bb 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -524,3 +524,8 @@ var/previouscolor = color color = "#960000" animate(src, color = previouscolor, time = 8) + +/obj/machinery/door/window/rust_heretic_act() + color = COLOR_RUSTED_GLASS + take_damage(obj_integrity * 0.5) + max_integrity = max_integrity * 0.5 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index f835b488e03..38521e2fe35 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -603,3 +603,6 @@ /obj/machinery/fall_and_crush(turf/target_turf, crush_damage, should_crit, crit_damage_factor, datum/tilt_crit/forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable, block_interactions) . = ..(target_turf, crush_damage, should_crit, crit_damage_factor, forced_crit, weaken_time, knockdown_time, ignore_gravity = FALSE, should_rotate = TRUE, rightable = TRUE, block_interactions_until_righted = TRUE) + +/obj/machinery/rust_heretic_act() + take_damage(500, BRUTE, MELEE, 1) diff --git a/code/game/machinery/vendors/departmental_vendors.dm b/code/game/machinery/vendors/departmental_vendors.dm index 22caf86e9fd..9550626fc23 100644 --- a/code/game/machinery/vendors/departmental_vendors.dm +++ b/code/game/machinery/vendors/departmental_vendors.dm @@ -204,6 +204,7 @@ /obj/item/seeds/glowshroom = 3, /obj/item/seeds/grape = 3, /obj/item/seeds/grass = 3, + /obj/item/seeds/harebell = 3, /obj/item/seeds/lemon = 3, /obj/item/seeds/lettuce = 3, /obj/item/seeds/lime = 3, diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 3b892e2f3b9..1ed16555458 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1702,4 +1702,7 @@ return FALSE return TRUE +/obj/mecha/rust_heretic_act() + take_damage(500, BRUTE) + #undef OCCUPANT_LOGGING diff --git a/code/game/objects/cleaning.dm b/code/game/objects/cleaning.dm index 65a51533c5c..0405e4846c5 100644 --- a/code/game/objects/cleaning.dm +++ b/code/game/objects/cleaning.dm @@ -37,6 +37,9 @@ for(var/obj/effect/decal/cleanable/C in src) is_dirty = TRUE break + for(var/obj/effect/heretic_rune/H in src) + is_dirty = TRUE + break if(!is_dirty && !isturf(src)) // We don't need cleaning, so let's spare the janitor a pixel hunt and let the floor under us get cleaned instead. @@ -65,6 +68,8 @@ //Generic cleaning functionality for(var/obj/effect/decal/cleanable/C in src) qdel(C) + for(var/obj/effect/heretic_rune/H in src) + qdel(H) clean_blood() SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT) return TRUE diff --git a/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm b/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm index 428f8bc5797..fbb715965c5 100644 --- a/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm +++ b/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm @@ -208,6 +208,29 @@ random_icon_states = list("gvomit_1", "gvomit_2", "gvomit_3", "gvomit_4") scoop_reagents = list("green_vomit" = 5) +/obj/effect/decal/cleanable/vomit/nebula + name = "nebula vomit" + desc = "Gosh, how... beautiful." + icon_state = "vomitnebula_1" + random_icon_states = list("vomitnebula_1", "vomitnebula_2", "vomitnebula_3", "vomitnebula_4") + +/obj/effect/decal/cleanable/vomit/nebula/Initialize(mapload) + . = ..() + update_appearance(UPDATE_OVERLAYS) + +/obj/effect/decal/cleanable/vomit/nebula/update_overlays() + . = ..() + . += emissive_appearance(icon, icon_state, src, alpha = src.alpha) + +/// Nebula vomit with extra guests +/obj/effect/decal/cleanable/vomit/nebula/worms + +/obj/effect/decal/cleanable/vomit/nebula/worms/Initialize(mapload) + . = ..() + for(var/i in 1 to rand(3, 6)) + new /mob/living/basic/mining/hivelordbrood(loc) + + /obj/effect/decal/cleanable/shreds name = "shreds" desc = "The shredded remains of what appears to be clothing." diff --git a/code/game/objects/effects/forcefields.dm b/code/game/objects/effects/forcefields.dm index 1d6daca7cc7..4eb216b7a72 100644 --- a/code/game/objects/effects/forcefields.dm +++ b/code/game/objects/effects/forcefields.dm @@ -67,3 +67,38 @@ name = "invisible blockade" desc = "You might be here a while." lifetime = 60 SECONDS + +/// The cosmic heretics forcefield +/obj/effect/forcefield/cosmic_field + name = "Cosmic Field" + desc = "A field that cannot be passed by people marked with a cosmic star." + icon = 'icons/effects/eldritch.dmi' + icon_state = "cosmic_carpet" + density = FALSE + layer = ABOVE_ICYOVERLAY_LAYER // Very low layer above turfs. Ensures you can click runes, but also means it can eat bullets if you missclick. + plane = FLOOR_PLANE + /// Flags for what antimagic can just ignore our forcefields + var/antimagic_flags = MAGIC_RESISTANCE + +/obj/effect/forcefield/cosmic_field/Initialize(mapload, flags = MAGIC_RESISTANCE) + . = ..() + antimagic_flags = flags + +/obj/effect/forcefield/cosmic_field/CanAtmosPass(direction) + return FALSE + +/obj/effect/forcefield/cosmic_field/CanPass(atom/movable/mover, border_dir) + if(!isliving(mover)) + return ..() + var/mob/living/living_mover = mover + if(living_mover.can_block_magic(antimagic_flags, charge_cost = 0)) + return ..() + if(living_mover.has_status_effect(/datum/status_effect/star_mark)) + return FALSE + return ..() + +/obj/effect/forcefield/cosmic_field/fast + lifetime = 5 SECONDS + +/obj/effect/forcefield/cosmic_field/extrafast + lifetime = 2.5 SECONDS diff --git a/code/game/objects/effects/spawners/random/engineering_spawners.dm b/code/game/objects/effects/spawners/random/engineering_spawners.dm index 79f38c3c396..8ee57e69db4 100644 --- a/code/game/objects/effects/spawners/random/engineering_spawners.dm +++ b/code/game/objects/effects/spawners/random/engineering_spawners.dm @@ -38,13 +38,16 @@ /obj/item/stack/sheet/glass, /obj/item/stack/sheet/rglass, /obj/item/stack/sheet/wood, - ) = 8, + ) = 7, list( /obj/item/stack/sheet/plastic, /obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/mineral/plasma, ) = 2, + list( + /obj/item/stack/sheet/mineral/titanium + ) = 1 //Makes the heretic knife path slightly easier. Not as useful as silver, so used in place. ) /obj/effect/spawner/random/engineering/materials/make_item(spawn_loc, type_path_to_make) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 0171da87792..a3d2f5e8f27 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -565,6 +565,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /obj/item/proc/equipped(mob/user, slot, initial = FALSE) mouse_opacity = MOUSE_OPACITY_OPAQUE SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) + SEND_SIGNAL(user, COMSIG_MOB_EQUIPPED_ITEM, src, slot) for(var/X in actions) var/datum/action/A = X if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot. diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm index fd67d06ced4..795e39a0b1d 100644 --- a/code/game/objects/items/weapons/batons.dm +++ b/code/game/objects/items/weapons/batons.dm @@ -97,6 +97,8 @@ playsound(target, stun_sound, 75, TRUE, -1) add_attack_logs(user, target, "Knocked down with [src]") // Hit 'em + if(!HAS_TRAIT(target, TRAIT_BATON_RESISTANCE)) + target.KnockDown(knockdown_duration) target.KnockDown(knockdown_duration) on_cooldown = TRUE addtimer(VARSET_CALLBACK(src, on_cooldown, FALSE), cooldown) diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 67ed956ea14..3b0093809c8 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -31,6 +31,12 @@ /obj/item/nullrod/Initialize(mapload) . = ..() AddComponent(/datum/component/anti_magic, antimagic_type) + AddComponent(/datum/component/effect_remover, \ + success_feedback = "You disrupt the magic of %THEEFFECT with %THEWEAPON.", \ + success_forcesay = "BEGONE FOUL MAGIKS!!", \ + effects_we_clear = list(/obj/effect/heretic_rune, /obj/effect/cosmic_rune), \ + time_to_remove = 5 SECONDS, \ + ) if(!length(variant_names)) for(var/I in typesof(/obj/item/nullrod)) var/obj/item/nullrod/rod = I diff --git a/code/game/objects/items/weapons/melee/melee.dm b/code/game/objects/items/weapons/melee/melee.dm index c38602c1ca0..153a385e51a 100644 --- a/code/game/objects/items/weapons/melee/melee.dm +++ b/code/game/objects/items/weapons/melee/melee.dm @@ -3,6 +3,7 @@ lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons_righthand.dmi' needs_permit = TRUE + var/drawing_rune = FALSE // MARK: CAPTAIN'S SABER /obj/item/melee/saber diff --git a/code/game/objects/items/weapons/melee/melee_misc.dm b/code/game/objects/items/weapons/melee/melee_misc.dm index e0f4a1701f7..0489c72cba2 100644 --- a/code/game/objects/items/weapons/melee/melee_misc.dm +++ b/code/game/objects/items/weapons/melee/melee_misc.dm @@ -1,3 +1,146 @@ +/// Used by cult daggers and the cursed sickly blade. No other melee item can do this, just a universal melee item proc so I don't have to copy paste code +/obj/item/melee/proc/scribe_rune(mob/living/user) + var/list/shields = list() + var/list/possible_runes = list() + var/keyword + + if(!can_scribe(user)) // Check this before anything else + return + + // Choosing a rune + for(var/I in (subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed)) + var/obj/effect/rune/R = I + var/rune_name = initial(R.cultist_name) + if(rune_name) + possible_runes[rune_name] = R + if(!length(possible_runes)) + return + + var/chosen_rune = tgui_input_list(user, "Choose a rite to scribe.", "Sigils of Power", possible_runes) + if(!chosen_rune) + return + var/obj/effect/rune/rune = possible_runes[chosen_rune] + var/narsie_rune = FALSE + if(rune == /obj/effect/rune/narsie) + narsie_rune = TRUE + if(initial(rune.req_keyword)) + keyword = tgui_input_text(user, "Please enter a keyword for the rune.", "Enter Keyword") + if(!keyword) + return + + // Check everything again, in case they moved + if(!can_scribe(user)) + return + + // Check if the rune is allowed + var/area/A = get_area(src) + var/turf/runeturf = get_turf(user) + var/datum/game_mode/gamemode = SSticker.mode + if(ispath(rune, /obj/effect/rune/summon)) + if(!is_station_level(runeturf.z) || isspacearea(A)) + to_chat(user, SPAN_CULTITALIC("The veil is not weak enough here to summon a cultist, you must be on station!")) + return + + if(ispath(rune, /obj/effect/rune/teleport)) + if(!is_level_reachable(user.z)) + to_chat(user, SPAN_CULTITALIC("You are too far away from the station to teleport!")) + return + + var/old_color = user.color // we'll temporarily redden the user for better feedback to fellow cultists. Store this to revert them back. + if(narsie_rune) + if(!narsie_rune_check(user, A)) + return // don't do shit + var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots + if(!(A in summon_areas)) // Check again to make sure they didn't move + to_chat(user, SPAN_CULTLARGE("The ritual can only begin where the veil is weak - in [english_list(summon_areas)]!")) + return + GLOB.major_announcement.Announce("Figments from an eldritch god are being summoned into the [A.map_name] from an unknown dimension. Disrupt the ritual at all costs, before the station is destroyed! Space Law and SOP are suspended. The entire crew must kill cultists on sight.", "Central Command Higher Dimensional Affairs", 'sound/AI/cult_summon.ogg') + SSticker.cult_tried_summon = TRUE + for(var/I in spiral_range_turfs(1, user, 1)) + var/turf/T = I + var/obj/machinery/shield/cult/narsie/N = new(T) + shields |= N + user.color = COLOR_RED + + // Draw the rune + var/mob/living/carbon/human/H = user + H.cult_self_harm(initial(rune.scribe_damage)) + var/others_message + if(!narsie_rune) + others_message = SPAN_WARNING("[user] cuts [user.p_their()] body and begins writing in [user.p_their()] own blood!") + else + others_message = SPAN_BIGGERDANGER("[user] cuts [user.p_their()] body and begins writing something particularly ominous in [user.p_their()] own blood!") + user.visible_message(others_message, + SPAN_CULTITALIC("You slice open your body and begin drawing a sigil of [GET_CULT_DATA(entity_title3, "your god")].")) + + drawing_rune = TRUE // Only one at a time + var/scribe_successful = do_after(user, initial(rune.scribe_delay) * toolspeed, target = runeturf) + for(var/V in shields) // Only used for the 'Tear Veil' rune + var/obj/machinery/shield/S = V + if(S && !QDELETED(S)) + qdel(S) + user.color = old_color + drawing_rune = FALSE + if(!scribe_successful) + return + + user.visible_message(SPAN_WARNING("[user] creates a strange circle in [user.p_their()] own blood."), + SPAN_CULTITALIC("You finish drawing the arcane markings of [GET_CULT_DATA(entity_title3, "your god")].")) + + var/obj/effect/rune/R = new rune(runeturf, keyword) + if(narsie_rune) + for(var/obj/effect/rune/I in orange(1, R)) + qdel(I) + SSblackbox.record_feedback("tally", "runes_scribed", 1, "[R.cultist_name]") + R.blood_DNA = list() + R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type + R.add_hiddenprint(H) + R.color = H.dna.species.blood_color + R.rune_blood_color = H.dna.species.blood_color + to_chat(user, SPAN_CULT("The [lowertext(initial(rune.cultist_name))] rune [initial(rune.cultist_desc)]")) + +/obj/item/melee/proc/narsie_rune_check(mob/living/user, area/A) + var/datum/game_mode/gamemode = SSticker.mode + + if(gamemode.cult_team.cult_status < NARSIE_NEEDS_SUMMONING) + to_chat(user, SPAN_CULTITALIC("[GET_CULT_DATA(entity_name, "Your god")] is not ready to be summoned yet!")) + return FALSE + if(gamemode.cult_team.cult_status == NARSIE_HAS_RISEN) + to_chat(user, SPAN_CULTLARGE("\"I am already here. There is no need to try to summon me now.\"")) + return FALSE + + var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots + if(!(A in summon_areas)) + to_chat(user, SPAN_CULTLARGE("[GET_CULT_DATA(entity_name, "Your god")] can only be summoned where the veil is weak - in [english_list(summon_areas)]!")) + return FALSE + var/confirm_final = tgui_alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence AND your location!", + "Are you prepared for the final battle?", list("My life for [GET_CULT_DATA(entity_name, "the cult")]!", "No")) + if(user) + if(confirm_final == "No" || confirm_final == null) + to_chat(user, SPAN_CULTITALIC("You decide to prepare further before scribing the rune.")) + return FALSE + else + if(locate(/obj/effect/rune) in range(1, user)) + to_chat(user, SPAN_CULTLARGE("You need a space cleared of runes before you can summon [GET_CULT_DATA(entity_title1, "your god")]!")) + return FALSE + else + return TRUE + +/obj/item/melee/proc/can_scribe(mob/living/user) + if(!src || !user || loc != user || user.incapacitated()) + return FALSE + if(drawing_rune) + to_chat(user, SPAN_WARNING("You're already drawing a rune!")) + return FALSE + + var/turf/T = get_turf(user) + if(isspaceturf(T)) + return FALSE + if((locate(/obj/effect/rune) in T) || (locate(/obj/effect/rune/narsie) in range(1, T))) + to_chat(user, SPAN_WARNING("There's already a rune here!")) + return FALSE + return TRUE + // MARK: CHAIN OF COMMAND /obj/item/melee/chainofcommand name = "chain of command" diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 5e349740d69..50685076608 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -94,7 +94,8 @@ /obj/item/stack/nanopaste, /obj/item/robotanalyzer, /obj/item/rpd/bluespace, - /obj/item/hammer + /obj/item/hammer, + /obj/item/melee/sickly_blade/lock ) /obj/item/storage/belt/utility/full/populate_contents() @@ -878,7 +879,8 @@ /obj/item/wirecutters, /obj/item/wrench, /obj/item/multitool, - /obj/item/handheld_defibrillator + /obj/item/handheld_defibrillator, + /obj/item/melee/sickly_blade/lock ) /obj/item/storage/belt/bluespace/owlman diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index f04e383a798..3edbbdc2d60 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -271,7 +271,8 @@ COOLDOWN_START(src, stun_cooldown, cooldown) ADD_TRAIT(L, TRAIT_WAS_BATONNED, user_UID) // so one person cannot hit the same person with two separate batons - L.apply_status_effect(STATUS_EFFECT_DELAYED, knockdown_delay, CALLBACK(L, TYPE_PROC_REF(/mob/living/, KnockDown), knockdown_duration), COMSIG_LIVING_CLEAR_STUNS) + if(!HAS_TRAIT(L, TRAIT_BATON_RESISTANCE)) + L.apply_status_effect(STATUS_EFFECT_DELAYED, knockdown_delay, CALLBACK(L, TYPE_PROC_REF(/mob/living/, KnockDown), knockdown_duration), COMSIG_LIVING_CLEAR_STUNS) addtimer(CALLBACK(src, PROC_REF(baton_delay), L, user_UID), knockdown_delay) SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK, 33) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index a1d25eda5ce..3c5ae79a4f6 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -215,3 +215,6 @@ /obj/structure/fall_and_crush(turf/target_turf, crush_damage, should_crit, crit_damage_factor, datum/tilt_crit/forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable, block_interactions) . = ..(target_turf, crush_damage, should_crit, crit_damage_factor, forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable = TRUE, block_interactions_until_righted = FALSE) + +/obj/structure/rust_heretic_act() + take_damage(100, BRUTE, "melee", 1) diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index f6e67cf47e0..2dd4914f829 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -64,6 +64,10 @@ if(current_size >= STAGE_FOUR) deconstruct() +/obj/structure/lattice/indestructible + resistance_flags = INDESTRUCTIBLE + + /obj/structure/lattice/catwalk name = "catwalk" desc = "A catwalk for easier EVA maneuvering and cable placement." diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index c1b4f3e07bc..f8a0030be41 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -578,6 +578,12 @@ explosion_block = 1 glass_type = /obj/item/stack/sheet/rglass +// You can't rust glass! So only reinforced glass can be impacted. +/obj/structure/window/reinforced/rust_heretic_act() + color = COLOR_RUSTED_GLASS + take_damage(obj_integrity * 0.5) + max_integrity = max_integrity * 0.5 + /obj/structure/window/reinforced/tinted name = "tinted window" desc = "It looks rather strong and opaque. Might take a few good hits to shatter it." diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index fd6c6c0dcc1..0fe896de20d 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -264,3 +264,9 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama /turf/simulated/floor/proc/get_prying_tools() return list(TOOL_CROWBAR) + +/turf/simulated/floor/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + return + ChangeTurf(/turf/simulated/floor/plating) + return ..() diff --git a/code/game/turfs/simulated/floor/asteroid_floors.dm b/code/game/turfs/simulated/floor/asteroid_floors.dm index ee7f6b4da01..cc5e6645a21 100644 --- a/code/game/turfs/simulated/floor/asteroid_floors.dm +++ b/code/game/turfs/simulated/floor/asteroid_floors.dm @@ -10,6 +10,7 @@ footstep = FOOTSTEP_SAND barefootstep = FOOTSTEP_SAND clawfootstep = FOOTSTEP_SAND + rust_resistance = RUST_RESISTANCE_ORGANIC var/environment_type = "asteroid" var/turf_type = /turf/simulated/floor/plating/asteroid //Because caves do whacky shit to revert to normal var/floor_variance = 20 //probability floor has a different icon state @@ -247,3 +248,9 @@ /turf/simulated/floor/plating/asteroid/snow/atmosphere atmos_mode = ATMOS_MODE_SEALED + +/turf/simulated/floor/plating/asteroid/snow/mansus + temperature = 293.15 + slowdown = 0 + atmos_mode = ATMOS_MODE_SEALED + atmos_environment = null diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index dd3d1e3605a..d1356c445a2 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -11,6 +11,7 @@ density = TRUE //This will prevent hostile mobs from pathing into chasms, while the canpass override will still let it function like an open turf layer = 1.7 intact = 0 + rust_resistance = RUST_RESISTANCE_ABSOLUTE var/static/list/falling_atoms = list() //Atoms currently falling into the chasm var/static/list/forbidden_types = typecacheof(list( /obj/singularity, diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 01abef7f4be..3bca189f58a 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -314,6 +314,7 @@ icon_state = "0" floor_tile = /obj/item/stack/tile/fakespace plane = PLANE_SPACE + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/fakespace/Initialize(mapload) . = ..() diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index 25f71102cdf..bdaba198b9e 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -24,6 +24,8 @@ intact = FALSE floor_tile = null real_layer = PLATING_LAYER + rust_resistance = RUST_RESISTANCE_ABSOLUTE + /turf/simulated/floor/lava/ex_act() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index bc90dd1eced..ba79d89fa5e 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -268,6 +268,7 @@ keep_dir = FALSE intact = FALSE transparent_floor = TRUE + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/catwalk/Initialize(mapload) . = ..() @@ -309,14 +310,14 @@ break_tile_to_plating() hotspot_expose(1000,CELL_VOLUME) -// Carpet used in the backrooms hallucination /turf/simulated/floor/backrooms_carpet name = "backrooms carpet" desc = "An old, musty carpet. It smells faintly mildewy." icon_state = "backrooms_carpet" baseturf = /turf/simulated/floor/backrooms_carpet -/turf/open/floor/plating/rust +/turf/simulated/floor/plating/rust +// Carpet used in the backrooms hallucination //SDMM supports colors, this is simply for easier mapping //and should be removed on initialize color = COLOR_BROWN @@ -326,7 +327,7 @@ AddElement(/datum/element/rust) color = null -/turf/open/floor/plating/heretic_rust +/turf/simulated/floor/plating/heretic_rust color = COLOR_GREEN_GRAY /turf/simulated/floor/plating/heretic_rust/Initialize(mapload) diff --git a/code/game/turfs/simulated/floor/plasteel/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel/plasteel_floor.dm index 8be25fc0b9b..499d1bdd030 100644 --- a/code/game/turfs/simulated/floor/plasteel/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel/plasteel_floor.dm @@ -1,6 +1,7 @@ /turf/simulated/floor/plasteel icon_state = "tile_standard" floor_tile = /obj/item/stack/tile/plasteel + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/plasteel/update_icon_state() if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index be3182b7cb1..6141c74c35f 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -8,6 +8,7 @@ footstep = FOOTSTEP_PLATING smoothing_groups = list(SMOOTH_GROUP_TURF) real_layer = PLATING_LAYER + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/plating/Initialize(mapload) . = ..() @@ -179,6 +180,7 @@ heat_capacity = 325000 floor_tile = /obj/item/stack/rods footstep = FOOTSTEP_PLATING + rust_resistance = RUST_RESISTANCE_REINFORCED /turf/simulated/floor/engine/update_icon_state() if(!broken && !burnt) diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 6d45d4cc727..d14166475e0 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -13,6 +13,7 @@ opacity = TRUE density = TRUE blocks_air = TRUE + flags = NO_RUST flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 rad_insulation_beta = RAD_BETA_BLOCKER layer = EDGED_TURF_LAYER diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 522c9811d57..23de07a1fbe 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -30,6 +30,7 @@ thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall + rust_resistance = RUST_RESISTANCE_BASIC var/heat_resistance = 5000 var/can_dismantle_with_welder = TRUE @@ -551,4 +552,11 @@ /turf/simulated/wall/MouseExited(location, control, params) usr.hud_used.screentip_text.maptext = "" +/turf/simulated/wall/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/floor/plating)// Did you know most walls baseturf is space? + return + + return ..() + #undef MAX_DENT_DECALS diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 4a85c07a832..ce5959a47ad 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -1,6 +1,7 @@ /turf/simulated/wall/indestructible desc = "Effectively impervious to conventional methods of destruction." explosion_block = 50 + rust_resistance = RUST_RESISTANCE_ABSOLUTE /turf/simulated/wall/indestructible/Initialize(mapload) . = ..() diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 156b6b9a359..0e95155db96 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -40,6 +40,7 @@ explosion_block = 3 smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_DIAMOND_WALLS) canSmoothWith = list(SMOOTH_GROUP_DIAMOND_WALLS) + rust_resistance = RUST_RESISTANCE_REINFORCED /turf/simulated/wall/mineral/bananium name = "bananium wall" @@ -71,6 +72,7 @@ sheet_type = /obj/item/stack/sheet/mineral/uranium smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS) canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS) + rust_resistance = RUST_RESISTANCE_REINFORCED /turf/simulated/wall/mineral/uranium/Initialize(mapload) . = ..() @@ -192,6 +194,7 @@ smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS) canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS) + rust_resistance = RUST_RESISTANCE_ORGANIC /////////////////////Titanium walls///////////////////// @@ -208,6 +211,14 @@ smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS smoothing_groups = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE) canSmoothWith = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE) + rust_resistance = RUST_RESISTANCE_TITANIUM + +/turf/simulated/wall/mineral/titanium/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/wall) + rust_turf() //Not magic rusting intentionally + return + return ..() /turf/simulated/wall/mineral/titanium/copyTurf(turf/T) . = ..() @@ -254,6 +265,14 @@ smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS smoothing_groups = list(SMOOTH_GROUP_PLASTITANIUM_WALLS) canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) + rust_resistance = RUST_RESISTANCE_TITANIUM + +/turf/simulated/wall/mineral/plastitanium/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/wall) + rust_turf() //Not magic rusting intentionally + return + return ..() /turf/simulated/wall/mineral/plastitanium/copyTurf(turf/T) . = ..() diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 6ba883bdf64..ca20194c7c3 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -15,6 +15,7 @@ smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) heat_resistance = 20000 // Ain't getting through this soon + rust_resistance = RUST_RESISTANCE_REINFORCED var/d_state = RWALL_INTACT var/can_be_reinforced = 1 @@ -232,3 +233,10 @@ /turf/simulated/wall/r_wall/devastate_wall() new sheet_type(src, sheet_amount) new /obj/item/stack/sheet/metal(src, 2) + +/turf/simulated/wall/r_wall/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/wall) + rust_turf() //Not magic rusting intentionally + return + return ..() diff --git a/code/game/turfs/space/space_turf.dm b/code/game/turfs/space/space_turf.dm index de52bdf38d5..6a33f65fd49 100644 --- a/code/game/turfs/space/space_turf.dm +++ b/code/game/turfs/space/space_turf.dm @@ -12,6 +12,7 @@ light_power = 0.25 dynamic_lighting = DYNAMIC_LIGHTING_DISABLED intact = FALSE + rust_resistance = RUST_RESISTANCE_ABSOLUTE atmos_mode = ATMOS_MODE_SPACE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 84983f2a0ec..463178b2b90 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -1,3 +1,5 @@ +GLOBAL_LIST_EMPTY(station_turfs) + /turf icon = 'icons/turf/floors.dmi' level = 1 @@ -94,6 +96,9 @@ var/list/milla_data = null + ///This turf's resistance to getting rusted + var/rust_resistance = RUST_RESISTANCE_ORGANIC + new_attack_chain = TRUE /// The destination x-coordinate that atoms entering this turf will be automatically moved to. var/destination_x @@ -145,6 +150,8 @@ directional_opacity = ALL_CARDINALS initialize_milla() + if(is_station_level(z)) + GLOB.station_turfs += src return INITIALIZE_HINT_NORMAL @@ -689,6 +696,12 @@ AddElement(/datum/element/rust/heretic) new /obj/effect/glowing_rune(src) +/// Check if the heretic is strong enough to rust this turf, and if so, rusts the turf with an added visual effect. +/turf/rust_heretic_act(rust_strength = 1) + if((flags & NO_RUST) || (rust_strength < rust_resistance)) + return + magic_rust_turf() + /// Returns a list of all attached /datum/element/decal/ for this turf /turf/proc/get_decals() var/list/datum/element/decals = list() diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 136423bd8cb..99187e022e1 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -458,6 +458,9 @@ if(length(SSticker.mode.mindflayers)) dat += check_role_table("Mindflayers", SSticker.mode.mindflayers) + if(length(SSticker.mode.heretics)) + dat += check_role_table("Heretics", SSticker.mode.heretics) + if(length(SSticker.mode.vampire_enthralled)) dat += check_role_table("Vampire Thralls", SSticker.mode.vampire_enthralled) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 42216be641e..310de5ef8c2 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -75,6 +75,10 @@ log_admin("[key_name(usr)] has spawned event characters.") if(!makeEventCharacters()) to_chat(usr, SPAN_WARNING("Unfortunately there weren't enough candidates available.")) + if("10") + log_admin("[key_name(usr)] has spawned heretics.") + if(!makeHeretics()) + to_chat(usr, SPAN_WARNING("Unfortunately there weren't enough candidates available.")) else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"] || href_list["dbsearchip"] || href_list["dbsearchcid"] || href_list["dbsearchbantype"]) var/adminckey = href_list["dbsearchadmin"] diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 367411efc2c..ceab68a50bf 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -10,6 +10,7 @@ Make Abductor Team (Requires Ghosts)
Make Mindflayers
Make Event Characters
+ Make Heretics
"} usr << browse(dat, "window=oneclickantag;size=400x400") return @@ -307,6 +308,38 @@ qdel(temp) return TRUE +/datum/admins/proc/makeHeretics() + var/datum/game_mode/traitor/temp = new + + if(GLOB.configuration.gamemode.prevent_mindshield_antags) + temp.restricted_jobs += temp.protected_jobs + + var/list/mob/living/carbon/human/candidates = list() + var/mob/living/carbon/human/H = null + + var/antnum = input(owner, "How many Heretics you want to create? Enter 0 to cancel","Amount:", 0) as num + if(!antnum || antnum <= 0) + return + log_admin("[key_name(owner)] tried making [antnum] Heretics with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making [antnum] Heretics with One-Click-Antag") + + for(var/mob/living/carbon/human/applicant in GLOB.player_list) + if(CandCheck(ROLE_HERETIC, applicant, temp)) + candidates += applicant + + if(length(candidates)) + var/numHeretics = min(length(candidates), antnum) + + for(var/i = 0, iYou catch a glimpse of the Realm of [GET_CULT_DATA(entity_name, "this is a bug at this point")], [GET_CULT_DATA(entity_title3, "I dont know what else to write")]. \ diff --git a/code/modules/antagonists/cult/team_cult.dm b/code/modules/antagonists/cult/team_cult.dm index 2a1339b9165..1c84c0b0e46 100644 --- a/code/modules/antagonists/cult/team_cult.dm +++ b/code/modules/antagonists/cult/team_cult.dm @@ -33,6 +33,12 @@ RESTRICT_TYPE(/datum/team/cult) /// Timer until we do a recount of cultist members var/recount_timer + /// List that keeps track of which items have been unlocked after a heretic was sacked. + var/list/unlocked_heretic_items = list( + CURSED_BLADE_UNLOCKED = FALSE, + CRIMSON_MEDALLION_UNLOCKED = FALSE, + PROTEON_ORB_UNLOCKED = FALSE, + ) /datum/team/cult/Destroy(force, ...) deltimer(recount_timer) @@ -261,6 +267,8 @@ RESTRICT_TYPE(/datum/team/cult) return FALSE if(isanimal_or_basicmob(mind.current)) return FALSE + if(IS_HERETIC(mind.current)) + return FALSE return TRUE /** diff --git a/code/modules/antagonists/heretic/cosmic_effect.dm b/code/modules/antagonists/heretic/cosmic_effect.dm new file mode 100644 index 00000000000..240263f0f60 --- /dev/null +++ b/code/modules/antagonists/heretic/cosmic_effect.dm @@ -0,0 +1,45 @@ +/obj/effect/cosmic_diamond + name = "Cosmic Diamond" + icon = 'icons/effects/eldritch.dmi' + icon_state = "cosmic_diamond" + +/obj/effect/temp_visual/cosmic_cloud + name = "Cosmic Cloud" + icon = 'icons/effects/eldritch.dmi' + icon_state = "cosmic_cloud" + duration = 8 + +/obj/effect/temp_visual/cosmic_explosion + name = "Cosmic Explosion" + icon = 'icons/effects/64x64.dmi' + icon_state = "cosmic_explosion" + duration = 5 + pixel_x = -16 + pixel_y = -16 + +/obj/effect/temp_visual/space_explosion + name = "Space Explosion" + icon = 'icons/effects/64x64.dmi' + icon_state = "space_explosion" + duration = 5 + pixel_x = -16 + pixel_y = -16 + +/obj/effect/temp_visual/cosmic_domain + name = "Cosmic Domain" + icon = 'icons/effects/160x160.dmi' + icon_state = "cosmic_domain" + duration = 6 + pixel_x = -64 + pixel_y = -64 + +/obj/effect/temp_visual/cosmic_gem + name = "cosmic gem" + icon = 'icons/effects/eldritch.dmi' + icon_state = "cosmic_gem" + duration = 12 + +/obj/effect/temp_visual/cosmic_gem/Initialize(mapload) + . = ..() + pixel_x = rand(-12, 12) + pixel_y = rand(-9, 0) diff --git a/code/modules/antagonists/heretic/heretic_antag.dm b/code/modules/antagonists/heretic/heretic_antag.dm new file mode 100644 index 00000000000..16627f18253 --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_antag.dm @@ -0,0 +1,978 @@ + + +/* + * Simple helper to generate a string of + * garbled symbols up to [length] characters. + * + * Used in creating spooky-text for heretic ascension announcements. + */ +/proc/generate_heretic_text(length = 25) + if(!isnum(length)) // stupid thing so we can use this directly in replacetext + length = 25 + . = "" + for(var/i in 1 to length) + . += pick("!", "$", "^", "@", "&", "#", "*", "(", ")", "?") + +/// The heretic antagonist itself. +/datum/antagonist/heretic + name = "\improper Heretic" + roundend_category = "Heretics" + + job_rank = ROLE_HERETIC + special_role = SPECIAL_ROLE_HERETIC + antag_hud_name = "hudheretic" + clown_gain_text = "Ancient knowledge described to you has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." + antag_hud_type = ANTAG_HUD_HERETIC + + /// Whether we've ascended! (Completed one of the final rituals) + var/ascended = FALSE + /// The path our heretic has chosen. Mostly used for flavor. + var/heretic_path = PATH_START + /// A sum of how many knowledge points this heretic CURRENTLY has. Used to research. + var/knowledge_points = 1 + /// The time between gaining influence passively. The heretic gain +1 knowledge points every this duration of time. + var/passive_gain_timer = 20 MINUTES + /// Assoc list of [typepath] = [knowledge instance]. A list of all knowledge this heretic's reserached. + var/list/researched_knowledge = list() + /// The organ slot we place our Living Heart in. + var/living_heart_organ_slot = "heart" + /// A list of TOTAL how many sacrifices completed. (Includes high value sacrifices) + var/total_sacrifices = 0 + /// A list of TOTAL how many high value sacrifices completed. (Heads of staff) + var/high_value_sacrifices = 0 + /// Lazy assoc list of [refs to humans] to [image previews of the human]. Humans that we have as sacrifice targets. + var/list/mob/living/carbon/human/sac_targets + /// List of all sacrifice target's names, used for end of round report + var/list/all_sac_targets = list() + /// Whether we're drawing a rune or not + var/drawing_rune = FALSE + /// A static typecache of all tools we can scribe with. + var/static/list/scribing_tools = typecacheof(list(/obj/item/pen, /obj/item/toy/crayon)) + /// A blacklist of turfs we cannot scribe on. + var/static/list/blacklisted_rune_turfs = typecacheof(list(/turf/space, /turf/simulated/floor/lava, /turf/simulated/floor/chasm)) + /// Controls what types of turf we can spread rust to, increases as we unlock more powerful rust abilites + var/rust_strength = 0 + /// Wether we are allowed to ascend + var/feast_of_owls = FALSE + /// Our research menu + var/datum/action/heretic_menu/our_menu + /// A list of all the monsters the heretic has active. + var/list/list_of_our_monsters = list() + /// The maximum mindslave limit. Applies to berserks as well + var/mindslave_limit = 2 + /// What is the limit of monsters we can have as a heretic? + var/monster_limit = 2 + /// Who do we currently have under our mindslavery? + var/list/mindslaves = list() + + /// List that keeps track of which items have been gifted to the heretic after a cultist was sacrificed. Used to alter drop chances to reduce dupes. + var/list/unlocked_heretic_items = list( + /obj/item/melee/sickly_blade/cursed = 0, + /obj/item/clothing/neck/heretic_focus/crimson_medallion = 0, + /mob/living/simple_animal/hostile/construct/harvester/heretic = 0, + ) + /// Simpler version of above used to limit amount of loot that can be hoarded + var/rewards_given = 0 + /// A variable for admins to tweak to allow ascending. + var/force_unlock_ascension = FALSE + +/datum/antagonist/heretic/Destroy() + LAZYNULL(sac_targets) + return ..() + + +/datum/antagonist/heretic/add_owner_to_gamemode() + SSticker.mode.heretics += owner + +/datum/antagonist/heretic/remove_owner_from_gamemode() + SSticker.mode.heretics -= owner + +/datum/antagonist/heretic/add_antag_hud(mob/living/antag_mob) + if(locate(/datum/objective/hijack) in owner.get_all_objectives()) + antag_hud_name = "hudheretichijack" + return ..() + +/datum/antagonist/heretic/proc/get_icon_of_knowledge(datum/heretic_knowledge/knowledge) + //basic icon parameters + var/icon_path = 'icons/mob/actions/actions_ecult.dmi' + var/icon_state = "eye" + var/icon_frame = knowledge.research_tree_icon_frame + var/icon_dir = knowledge.research_tree_icon_dir + //can't imagine why you would want this one, so it can't be overridden by the knowledge + var/icon_moving = 0 + + //item transmutation knowledge does not generate its own icon due to implementation difficulties, the icons have to be specified in the override vars + + //if the knowledge has a special icon, use that + if(!isnull(knowledge.research_tree_icon_path)) + icon_path = knowledge.research_tree_icon_path + icon_state = knowledge.research_tree_icon_state + + //if the knowledge is a spell, use the spell's button + else if(ispath(knowledge, /datum/heretic_knowledge/spell)) + var/datum/heretic_knowledge/spell/spell_knowledge = knowledge + var/datum/spell/result_action = spell_knowledge.action_to_add + icon_path = result_action.action_background_icon + icon_state = result_action.action_icon_state + + //if the knowledge is a summon, use the mob sprite + else if(ispath(knowledge, /datum/heretic_knowledge/summon)) + var/datum/heretic_knowledge/summon/summon_knowledge = knowledge + var/mob/living/result_mob = summon_knowledge.mob_to_summon + icon_path = result_mob.icon + icon_state = result_mob.icon_state + + //if the knowledge is an eldritch mark, use the mark sprite + else if(ispath(knowledge, /datum/heretic_knowledge/mark)) + var/datum/heretic_knowledge/mark/mark_knowledge = knowledge + var/datum/status_effect/eldritch/mark_effect = mark_knowledge.mark_type + icon_path = mark_effect.effect_icon + icon_state = mark_effect.effect_icon_state + + + + var/list/result_parameters = list() + result_parameters["icon"] = icon_path + result_parameters["state"] = icon_state + result_parameters["frame"] = icon_frame + result_parameters["dir"] = icon_dir + result_parameters["moving"] = icon_moving + return result_parameters + +/datum/antagonist/heretic/proc/get_knowledge_data(datum/heretic_knowledge/knowledge, done) + + var/list/knowledge_data = list() + + knowledge_data["path"] = knowledge + knowledge_data["icon_params"] = get_icon_of_knowledge(knowledge) + knowledge_data["name"] = initial(knowledge.name) + knowledge_data["gainFlavor"] = initial(knowledge.gain_text) + knowledge_data["cost"] = initial(knowledge.cost) + knowledge_data["disabled"] = (!done) && (initial(knowledge.cost) > knowledge_points) + knowledge_data["bgr"] = GLOB.heretic_research_tree[knowledge][HKT_UI_BGR] + knowledge_data["finished"] = done + knowledge_data["ascension"] = ispath(knowledge,/datum/heretic_knowledge/ultimate) + + //description of a knowledge might change, make sure we are not shown the initial() value in that case + if(done) + var/datum/heretic_knowledge/knowledge_instance = researched_knowledge[knowledge] + knowledge_data["desc"] = knowledge_instance.desc + else + knowledge_data["desc"] = initial(knowledge.desc) + + return knowledge_data + +/datum/antagonist/heretic/ui_data(mob/user) + var/list/data = list() + + data["charges"] = knowledge_points + data["total_sacrifices"] = total_sacrifices + data["ascended"] = ascended + + var/list/tiers = list() + + // This should be cached in some way, but the fact that final knowledge + // has to update its disabled state based on whether all objectives are complete, + // makes this very difficult. I'll figure it out one day maybe + for(var/datum/heretic_knowledge/knowledge as anything in researched_knowledge) + var/list/knowledge_data = get_knowledge_data(knowledge,TRUE) + + while(GLOB.heretic_research_tree[knowledge][HKT_DEPTH] > tiers.len) + tiers += list(list("nodes"=list())) + + tiers[GLOB.heretic_research_tree[knowledge][HKT_DEPTH]]["nodes"] += list(knowledge_data) + + for(var/datum/heretic_knowledge/knowledge as anything in get_researchable_knowledge()) + var/list/knowledge_data = get_knowledge_data(knowledge, FALSE) + + // Final knowledge can't be learned until all objectives are complete. + if(ispath(knowledge, /datum/heretic_knowledge/ultimate)) + knowledge_data["disabled"] ||= !can_ascend() + + while(GLOB.heretic_research_tree[knowledge][HKT_DEPTH] > tiers.len) + tiers += list(list("nodes"=list())) + + tiers[GLOB.heretic_research_tree[knowledge][HKT_DEPTH]]["nodes"] += list(knowledge_data) + + data["knowledge_tiers"] = tiers + + return data + +/datum/antagonist/heretic/ui_interact(mob/user, datum/tgui/ui = null) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "AntagInfoHeretic", name) + ui.open() + +/datum/antagonist/heretic/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + switch(action) + if("research") + var/datum/heretic_knowledge/researched_path = text2path(params["path"]) + if(!ispath(researched_path, /datum/heretic_knowledge)) + if(isnull(researched_path)) + CRASH("Heretic attempted to learn a non-existant path! (Got: [params["path"]])") + CRASH("Heretic attempted to learn non-heretic_knowledge path! (Got: [researched_path])") + + + if(!(researched_path in get_researchable_knowledge())) + log_and_message_admins("attempted to href exploit to skip heretic progression! ([researched_path])") + return FALSE + + if(ispath(researched_path, /datum/heretic_knowledge/ultimate) && !can_ascend()) + log_and_message_admins("attempted to href exploit to get the ascend ritual! ([researched_path])") + return FALSE + if(initial(researched_path.cost) > knowledge_points) + return FALSE + if(!gain_knowledge(researched_path)) + return FALSE + + log_heretic_knowledge("[key_name(owner)] gained knowledge: [initial(researched_path.name)]") + knowledge_points -= initial(researched_path.cost) + return TRUE + +/datum/antagonist/heretic/ui_status(mob/user, datum/ui_state/state) + if(user.stat == DEAD) + return UI_CLOSE + return ..() + +/datum/antagonist/heretic/ui_state(mob/user) + return GLOB.always_state + +/datum/antagonist/heretic/on_gain() + if(!GLOB.heretic_research_tree) + GLOB.heretic_research_tree = generate_heretic_research_tree() + our_menu = new() + our_menu.Grant(owner.current) + + if(give_objectives) + forge_primary_objectives() + + for(var/starting_knowledge in GLOB.heretic_start_knowledge) + gain_knowledge(starting_knowledge) + SEND_SOUND(owner.current, sound('sound/ambience/antag/heretic/heretic_gain.ogg')) + + + addtimer(CALLBACK(src, PROC_REF(passive_influence_gain)), passive_gain_timer) // Gain +1 knowledge every 20 minutes. + return ..() + +/datum/antagonist/heretic/farewell() + if(!silent) + to_chat(owner.current, SPAN_USERDANGER("Your mind begins to flare as the otherwordly knowledge escapes your grasp!")) + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + knowledge.on_lose(owner.current, src) + our_menu.Remove(owner.current) + + QDEL_LIST_ASSOC_VAL(researched_knowledge) + + return ..() + +/datum/antagonist/heretic/apply_innate_effects(mob/living/mob_override) + . = ..() + var/mob/living/our_mob = mob_override || owner.current + our_mob.faction |= "heretic" + + if(!issilicon(our_mob)) + GLOB.reality_smash_track.add_tracked_mind(owner) + var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC] + h_hud.add_hud_to(our_mob) + ADD_TRAIT(our_mob, TRAIT_MANSUS_TOUCHED, src.UID()) + RegisterSignal(our_mob, COMSIG_LIVING_CULT_SACRIFICED, PROC_REF(on_cult_sacrificed)) + RegisterSignal(our_mob, COMSIG_MOB_BEFORE_SPELL_CAST, PROC_REF(on_spell_cast)) + RegisterSignal(our_mob, COMSIG_INTERACT_USER, PROC_REF(on_item_use)) + +/datum/antagonist/heretic/remove_innate_effects(mob/living/mob_override) + . = ..() + var/mob/living/our_mob = mob_override || owner.current + our_mob.faction -= "heretic" + + if(owner in GLOB.reality_smash_track.tracked_heretics) + GLOB.reality_smash_track.remove_tracked_mind(owner) + var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC] + h_hud.remove_hud_from(our_mob) + + REMOVE_TRAIT(our_mob, TRAIT_MANSUS_TOUCHED, src.UID()) + UnregisterSignal(our_mob, list( + COMSIG_MOB_BEFORE_SPELL_CAST, + COMSIG_INTERACT_USER, + COMSIG_LIVING_CULT_SACRIFICED, + )) + +/datum/antagonist/heretic/on_body_transfer(mob/living/old_body, mob/living/new_body) + . = ..() + if(old_body == new_body) // if they were using a temporary body + return + + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + knowledge.on_lose(old_body, src) + knowledge.on_gain(new_body, src) + +/* + * Signal proc for [COMSIG_MOB_BEFORE_SPELL_CAST] and [COMSIG_MOB_SPELL_ACTIVATED]. + * + * Checks if our heretic has [TRAIT_ALLOW_HERETIC_CASTING] or is ascended. + * If so, allow them to cast like normal. + * If not, cancel the cast, and returns [SPELL_CANCEL_CAST]. + */ +/datum/antagonist/heretic/proc/on_spell_cast(mob/living/source, datum/spell/spell, show_message = TRUE) + SIGNAL_HANDLER + + // Heretic spells are of the forbidden school, otherwise we don't care + if(!spell.is_a_heretic_spell) + return FALSE + + // We dont want to cast spells in the void + if(istype(source.loc, /obj/effect/dummy/slaughter) && !istype(spell, /datum/spell/bloodcrawl/space_crawl)) + if(show_message) + to_chat(source, SPAN_HIEROPHANT_WARNING("You cannot cast spells space phased!")) + return SPELL_CANCEL_CAST + + // If we've got the trait, we don't care + if(HAS_TRAIT(source, TRAIT_ALLOW_HERETIC_CASTING)) + return FALSE + // All powerful, don't care + if(ascended) + return FALSE + + // We shouldn't be able to cast this! Cancel it. + if(show_message) + to_chat(source, SPAN_HIEROPHANT_WARNING("You need a focus to cast this spell!")) + return SPELL_CANCEL_CAST + +/* + * Signal proc for [COMSIG_USER_ITEM_INTERACTION]. + * + * If a heretic is holding a pen in their main hand, + * and have mansus grasp active in their offhand, + * they're able to draw a transmutation rune. + */ +/datum/antagonist/heretic/proc/on_item_use(mob/living/source, atom/target, obj/item/tool, list/modifiers) + SIGNAL_HANDLER + if(!is_type_in_typecache(tool, scribing_tools)) + return NONE + if(!isturf(target) || !isliving(source)) + return NONE + + var/obj/item/offhand = source.get_inactive_hand() + if(QDELETED(offhand) || !istype(offhand, /obj/item/melee/touch_attack/mansus_fist)) + return NONE + + try_draw_rune(source, target, additional_checks = CALLBACK(src, PROC_REF(check_mansus_grasp_offhand), source)) + return ITEM_INTERACT_COMPLETE + +/** + * Attempt to draw a rune on [target_turf]. + * + * Arguments + * * user - the mob drawing the rune + * * target_turf - the place the rune's being drawn + * * drawing_time - how long the do_after takes to make the rune + * * additional checks - optional callbacks to be ran while drawing the rune + */ +/datum/antagonist/heretic/proc/try_draw_rune(mob/living/user, turf/target_turf, drawing_time = 20 SECONDS, additional_checks) + for(var/turf/nearby_turf as anything in RANGE_TURFS(1, target_turf)) + if(!isfloorturf(nearby_turf) || is_type_in_typecache(nearby_turf, blacklisted_rune_turfs)) + to_chat(user, SPAN_HIEROPHANT_WARNING("This is not a valid placement for a rune.")) + return + + if(locate(/obj/effect/heretic_rune) in range(3, target_turf)) + to_chat(user, SPAN_HIEROPHANT_WARNING("This is too close to another rune.")) + return + + if(drawing_rune) + to_chat(user, SPAN_HIEROPHANT_WARNING("You are already drawing a rune.")) + return + + INVOKE_ASYNC(src, PROC_REF(draw_rune), user, target_turf, drawing_time, additional_checks) + +/** + * The actual process of drawing a rune. + * + * Arguments + * * user - the mob drawing the rune + * * target_turf - the place the rune's being drawn + * * drawing_time - how long the do_after takes to make the rune + * * additional checks - optional callbacks to be ran while drawing the rune + */ +/datum/antagonist/heretic/proc/draw_rune(mob/living/user, turf/target_turf, drawing_time = 20 SECONDS, additional_checks) + drawing_rune = TRUE + + var/rune_colour = GLOB.heretic_path_to_color[heretic_path] + var/obj/effect/temp_visual/drawing_heretic_rune/drawing_effect + if(drawing_time <= (10 SECONDS)) + drawing_effect = new /obj/effect/temp_visual/drawing_heretic_rune/fast(target_turf, rune_colour) + else + drawing_effect = new(target_turf, rune_colour) + + if(!do_after(user, drawing_time, target_turf, extra_checks = list(additional_checks))) + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target_turf, rune_colour) + qdel(drawing_effect) + drawing_rune = FALSE + return + to_chat(user, SPAN_HIEROPHANT("The rune is complete.")) + qdel(drawing_effect) + new /obj/effect/heretic_rune/big(target_turf, rune_colour) + drawing_rune = FALSE + +/** + * Callback to check that the user's still got their Mansus Grasp out when drawing a rune. + * + * Arguments + * * user - the mob drawing the rune + */ +/datum/antagonist/heretic/proc/check_mansus_grasp_offhand(mob/living/user) + var/obj/item/offhand = user.get_inactive_hand() + return !(!QDELETED(offhand) && istype(offhand, /obj/item/melee/touch_attack/mansus_fist)) + + +/// Signal proc for [COMSIG_LIVING_CULT_SACRIFICED] to reward cultists for sacrificing a heretic +/datum/antagonist/heretic/proc/on_cult_sacrificed(mob/living/source, list/invokers) + SIGNAL_HANDLER + + for(var/mob/dead/observer/ghost in GLOB.dead_mob_list) // uhh let's find the guy to shove him back in + if((ghost.mind?.current == source) && ghost.client) // is it the same guy and do they have the same client + ghost.reenter_corpse() // shove them in! it doesnt do it automatically + + // Drop all items and splatter them around messily. + var/list/dustee_items = source.unequip_everything() + for(var/obj/item/loot as anything in dustee_items) + loot.throw_at(get_step_rand(source), 2, 4, pick(invokers), TRUE) + + // Create the blade, give it the heretic and a randomly-chosen master for the soul sword component + var/obj/item/melee/cultblade/haunted/haunted_blade = new(get_turf(source), source, pick(invokers)) + + // Cool effect for the rune as well as the item + var/obj/effect/rune/convert/conversion_rune = locate() in get_turf(source) + if(conversion_rune) + conversion_rune.gender_reveal( + outline_color = COLOR_HERETIC_GREEN, + ray_color = null, + do_float = FALSE, + do_layer = FALSE, + ) + + haunted_blade.gender_reveal(outline_color = null, ray_color = COLOR_HERETIC_GREEN) + + for(var/mob/living/culto as anything in invokers) + to_chat(culto, SPAN_CULTLARGE("\"A follower of the forgotten gods! You must be rewarded for such a valuable sacrifice.\"")) + + // Locate a cultist team (Is there a better way??) + var/mob/living/random_cultist = pick(invokers) + var/datum/antagonist/cultist/antag = random_cultist.mind.has_antag_datum(/datum/antagonist/cultist) + ASSERT(antag) + var/datum/team/cult/cult_team = antag.get_team() + + // Unlock one of 3 special items! + var/list/possible_unlocks + for(var/i in cult_team.unlocked_heretic_items) + if(cult_team.unlocked_heretic_items[i]) + continue + LAZYADD(possible_unlocks, i) + if(length(possible_unlocks)) + var/result = pick(possible_unlocks) + cult_team.unlocked_heretic_items[result] = TRUE + + for(var/datum/mind/mind as anything in cult_team.members) + if(mind.current) + SEND_SOUND(mind.current, 'sound/magic/narsie_attack.ogg') + to_chat(mind.current, SPAN_CULTLARGE("Arcane and forbidden knowledge floods your forges and archives. The cult has learned how to create the [result]!")) + + return SILENCE_SACRIFICE_MESSAGE|DUST_SACRIFICE + +/** + * Creates an animation of the item slowly lifting up from the floor with a colored outline, then slowly drifting back down. + * Arguments: + * * outline_color: Default is between pink and light blue, is the color of the outline filter. + * * ray_color: Null by default. If not set, just copies outline. Used for the ray filter. + * * anim_time: Total time of the animation. Split into two different calls. + * * do_float: Lets you disable the sprite floating up and down. + * * do_layer: Lets you disable the layering increase. + */ +/obj/proc/gender_reveal( + outline_color = null, + ray_color = null, + anim_time = 10 SECONDS, + do_float = TRUE, + do_layer = TRUE, +) + + var/og_layer = layer + if(do_layer) + // Layering above to stand out! + layer = ABOVE_MOB_LAYER + + // Slowly floats up, then slowly goes down. + if(do_float) + animate(src, pixel_y = 12, time = anim_time * 0.5, easing = QUAD_EASING | EASE_OUT) + animate(pixel_y = 0, time = anim_time * 0.5, easing = QUAD_EASING | EASE_IN) + + // Adding a cool outline effect + if(outline_color) + add_filter("gender_reveal_outline", 3, list("type" = "outline", "color" = outline_color, "size" = 0.5)) + // Animating it! + var/gay_filter = get_filter("gender_reveal_outline") + animate(gay_filter, alpha = 110, time = 1.5 SECONDS, loop = -1) + animate(alpha = 40, time = 2.5 SECONDS) + + // Adding a cool ray effect + if(ray_color) + add_filter(name = "gender_reveal_ray", priority = 1, params = list( + type = "rays", + size = 45, + color = ray_color, + density = 6 + )) + // Animating it! + var/ray_filter = get_filter("gender_reveal_ray") + // I understand nothing but copypaste saves lives + animate(ray_filter, offset = 100, time = 30 SECONDS, loop = -1, flags = ANIMATION_PARALLEL) + + addtimer(CALLBACK(src, PROC_REF(remove_gender_reveal_fx), og_layer), anim_time) + +/** + * Removes the non-animate effects from above proc + */ +/obj/proc/remove_gender_reveal_fx(og_layer) + remove_filter(list("gender_reveal_outline", "gender_reveal_ray")) + layer = og_layer + +/** + * Create our objectives for our heretic. + */ +/datum/antagonist/heretic/proc/forge_primary_objectives() + var/datum/objective/heretic_research/research_objective = new() + add_antag_objective(research_objective) + + var/num_heads = 0 + var/list/heads = SSticker.mode.get_all_heads() + for(var/datum/mind/head in heads) + if(ishuman(head.current)) + num_heads++ + + var/datum/objective/minor_sacrifice/sac_objective = new() + if(num_heads < 2) // They won't get major sacrifice, so bump up minor sacrifice a bit + sac_objective.target_amount += 2 + sac_objective.update_explanation_text() + add_antag_objective(sac_objective) + + if(num_heads >= 2) + var/datum/objective/major_sacrifice/other_sac_objective = new() + add_antag_objective(other_sac_objective) + if(prob(5)) + add_antag_objective(/datum/objective/hijack) + else + add_antag_objective(/datum/objective/escape) + +/** + * Add [target] as a sacrifice target for the heretic. + * Generates a preview image and associates it with a weakref of the mob. + */ +/datum/antagonist/heretic/proc/add_sacrifice_target(mob/living/carbon/human/target) + + var/image/target_image = image(icon = target.icon, icon_state = target.icon_state) + target_image.overlays = target.overlays + + LAZYSET(sac_targets, target, target_image) + RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(on_target_deleted)) + all_sac_targets += target.real_name + +/** + * Removes [target] from the heretic's sacrifice list. + * Returns FALSE if no one was removed, TRUE otherwise + */ +/datum/antagonist/heretic/proc/remove_sacrifice_target(mob/living/carbon/human/target) + if(!(target in sac_targets)) + return FALSE + + LAZYREMOVE(sac_targets, target) + UnregisterSignal(target, COMSIG_PARENT_QDELETING) + return TRUE + +/** + * Signal proc for [COMSIG_PARENT_QDELETING] registered on sac targets + * if sacrifice targets are deleted (gibbed, dusted, whatever), free their slot and reference + */ +/datum/antagonist/heretic/proc/on_target_deleted(mob/living/carbon/human/source) + SIGNAL_HANDLER + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(owner.current) + var/mob/living/new_target = reroll_target(owner.current, heretic_datum, source) + if(new_target) + to_chat(owner.current, SPAN_HIEROPHANT("We feel that [source] has gone beyond our reach. Our new sacrifice target is: [new_target]")) + else + to_chat(owner.current, SPAN_HIEROPHANT("We feel that [source] has gone beyond our reach, and we were unable to find a new target.")) + SEND_SOUND(owner.current, sound('sound/ambience/alarm4.ogg')) + remove_sacrifice_target(source) + +/datum/antagonist/heretic/proc/reroll_target(mob/living/user, datum/antagonist/heretic/heretic_datum, mob/living/target) + var/datum/heretic_knowledge/hunt_and_sacrifice/knowledge = heretic_datum.get_knowledge(/datum/heretic_knowledge/hunt_and_sacrifice) + var/list/datum/mind/valid_targets = list() + for(var/datum/mind/possible_target as anything in SSticker.minds) + if(possible_target == user.mind) + continue + if(!possible_target.assigned_role) + continue + if(is_invalid_target(possible_target)) + continue + if(knowledge && (possible_target in knowledge.target_blacklist)) + continue + if(!ishuman(possible_target.current)) + continue + if(possible_target.current in heretic_datum.sac_targets) + continue + if(possible_target.current.stat == DEAD) + continue + + valid_targets += possible_target + + if(!valid_targets) + return FALSE + + if(target && (target.mind.assigned_role in GLOB.command_head_positions)) + for(var/datum/mind/head_mind as anything in shuffle(valid_targets)) + if(head_mind.assigned_role in GLOB.command_head_positions) + heretic_datum.add_sacrifice_target(head_mind.current) + return head_mind.current + + if(target && (target.mind.assigned_role in GLOB.active_security_positions)) + for(var/datum/mind/sec_mind as anything in shuffle(valid_targets)) + if(sec_mind.assigned_role in GLOB.active_security_positions) + heretic_datum.add_sacrifice_target(sec_mind.current) + return sec_mind.current + + // just grab literally anyone else + var/datum/mind/random_mind = pick(valid_targets) + heretic_datum.add_sacrifice_target(random_mind.current) + return random_mind + + +/** + * Increments knowledge by one. + * Used in callbacks for passive gain over time. + */ +/datum/antagonist/heretic/proc/passive_influence_gain() + knowledge_points++ + if(owner.current.stat == CONSCIOUS) + to_chat(owner.current, SPAN_HEAR("You hear a whisper... [pick_list(HERETIC_INFLUENCE_FILE, "drain_message")]")) + addtimer(CALLBACK(src, PROC_REF(passive_influence_gain)), passive_gain_timer) + +/datum/game_mode/proc/auto_declare_completion_heretic() + if(!length(heretics)) + log_debug("There are no heretics") + return + + var/list/text = list("
[SPAN_BOLD("The heretics were:")]") + for(var/datum/mind/heretic in heretics) + + text += "
[heretic.get_display_key()] was [heretic.name] (" + if(heretic.current) + if(heretic.current.stat == DEAD) + text += "died" + else + text += "survived" + else + text += "body destroyed" + text += ")" + var/datum/antagonist/heretic/our_heretic = heretic.has_antag_datum(/datum/antagonist/heretic) + text += "
Sacrifices Made: [our_heretic.total_sacrifices]" + text += "
The heretic's sacrifice targets were: [english_list(our_heretic.all_sac_targets, nothing_text = "No one")]." + var/list/all_objectives = heretic.get_all_objectives() + + if(length(all_objectives))//If the traitor had no objectives, don't need to process this. + var/count = 1 + for(var/datum/objective/objective in all_objectives) + text += "
Objective #[count]: [objective.explanation_text]" + count++ + if(our_heretic.feast_of_owls) + text += SPAN_GREENTEXT("
Ascension Forsaken") + if(our_heretic.ascended) + text += SPAN_HIEROPHANT_WARNING("
THE HERETIC ASCENDED!") + + text += "
Knowledge Researched: " + + var/list/string_of_knowledge = list() + + for(var/knowledge_index in our_heretic.researched_knowledge) + var/datum/heretic_knowledge/knowledge = our_heretic.researched_knowledge[knowledge_index] + string_of_knowledge += knowledge.name + + text += english_list(string_of_knowledge) + + return text.Join("") + + +/** + * Admin proc for giving a heretic a Living Heart easily. + */ +/datum/antagonist/heretic/proc/give_living_heart(mob/admin) + if(!admin.client?.holder) + to_chat(admin, SPAN_WARNING("You shouldn't be using this!")) + return + + var/datum/heretic_knowledge/living_heart/heart_knowledge = get_knowledge(/datum/heretic_knowledge/living_heart) + if(!heart_knowledge) + to_chat(admin, SPAN_WARNING("The heretic doesn't have a living heart knowledge for some reason. What?")) + return + + heart_knowledge.on_research(owner.current, src) + + +/** + * Admin proc for removing a mob from a heretic's sac list. + */ +/datum/antagonist/heretic/proc/remove_target(mob/admin) + if(!admin.client?.holder) + to_chat(admin, SPAN_WARNING("You shouldn't be using this!")) + return + + var/list/removable = list() + for(var/mob/living/carbon/human/old_target as anything in sac_targets) + removable[old_target.name] = old_target + + var/name_of_removed = tgui_input_list(admin, "Choose a human to remove", "Who to Spare", removable) + if(QDELETED(src) || !admin.client?.holder || isnull(name_of_removed)) + return + var/mob/living/carbon/human/chosen_target = removable[name_of_removed] + if(QDELETED(chosen_target) || !ishuman(chosen_target)) + return + + if(!remove_sacrifice_target(chosen_target)) + to_chat(admin, SPAN_WARNING("Failed to remove [name_of_removed] from [owner]'s sacrifice list. Perhaps they're no longer in the list anyways.")) + return + + if(tgui_alert(admin, "Let them know their targets have been updated?", "Whispers of the Mansus", list("Yes", "No")) == "Yes") + to_chat(owner.current, SPAN_DANGER("The Mansus has modified your targets.")) + +/** + * Admin proc for easily adding / removing knowledge points. + */ +/datum/antagonist/heretic/proc/admin_change_points(mob/admin) + if(!admin.client?.holder) + to_chat(admin, SPAN_WARNING("You shouldn't be using this!")) + return + + var/change_num = tgui_input_number(admin, "Add or remove knowledge points", "Points", 0, 100, -100) + if(!change_num || QDELETED(src)) + return + + knowledge_points += change_num + +/** + * Admin proc for giving a heretic a focus. + */ +/datum/antagonist/heretic/proc/admin_give_focus(mob/admin) + if(!admin.client?.holder) + to_chat(admin, SPAN_WARNING("You shouldn't be using this!")) + return + + var/mob/living/pawn = owner.current + pawn.equip_to_slot_if_possible(new /obj/item/clothing/neck/heretic_focus(get_turf(pawn)), ITEM_SLOT_NECK, TRUE, TRUE) + to_chat(pawn, SPAN_HIEROPHANT_WARNING("The Mansus has manifested you a focus.")) + + +/** + * Learns the passed [typepath] of knowledge, creating a knowledge datum + * and adding it to our researched knowledge list. + * + * Returns TRUE if the knowledge was added successfully. FALSE otherwise. + */ +/datum/antagonist/heretic/proc/gain_knowledge(datum/heretic_knowledge/knowledge_type) + if(!ispath(knowledge_type)) + stack_trace("[type] gain_knowledge was given an invalid path! (Got: [knowledge_type])") + return FALSE + if(get_knowledge(knowledge_type)) + return FALSE + var/datum/heretic_knowledge/initialized_knowledge = new knowledge_type() + researched_knowledge[knowledge_type] = initialized_knowledge + initialized_knowledge.on_research(owner.current, src) + SStgui.update_uis(src) + return TRUE + +/** + * Get a list of all knowledge TYPEPATHS that we can currently research. + */ +/datum/antagonist/heretic/proc/get_researchable_knowledge() + var/list/researchable_knowledge = list() + var/list/banned_knowledge = list() + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + researchable_knowledge |= GLOB.heretic_research_tree[knowledge_index][HKT_NEXT] + banned_knowledge |= GLOB.heretic_research_tree[knowledge_index][HKT_BAN] + banned_knowledge |= knowledge.type + researchable_knowledge -= banned_knowledge + return researchable_knowledge + +/** + * Check if the wanted type-path is in the list of research knowledge. + */ +/datum/antagonist/heretic/proc/get_knowledge(wanted) + return researched_knowledge[wanted] + +/// Makes our heretic more able to rust things. +/// if side_path_only is set to TRUE, this function does nothing for rust heretics. +/datum/antagonist/heretic/proc/increase_rust_strength(side_path_only=FALSE) + if(side_path_only && get_knowledge(/datum/heretic_knowledge/limited_amount/starting/base_rust)) + return + + rust_strength++ + +/** + * Get a list of all rituals this heretic can invoke on a rune. + * Iterates over all of our knowledge and, if we can invoke it, adds it to our list. + * + * Returns an associated list of [knowledge name] to [knowledge datum] sorted by knowledge priority. + */ +/datum/antagonist/heretic/proc/get_rituals() + var/list/rituals = list() + + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + if(!knowledge.can_be_invoked(src)) + continue + rituals[knowledge.name] = knowledge + + return sortTim(rituals, GLOBAL_PROC_REF(cmp_heretic_knowledge), associative = TRUE) + +/** + * Checks to see if our heretic can currently ascend. + * + * Returns FALSE if not all of our objectives are complete, or TRUE otherwise. + */ +/datum/antagonist/heretic/proc/can_ascend() + if(force_unlock_ascension) + return TRUE + if(feast_of_owls) + return FALSE // We sold our ambition for immediate power :/ + var/has_hijack = FALSE + for(var/datum/objective/must_be_done as anything in owner.get_all_objectives(include_team = FALSE)) + if(istype(must_be_done, /datum/objective/hijack) || SSticker.cult_tried_summon) + has_hijack = TRUE + continue + if(istype(must_be_done, /datum/objective/escape)) + continue + if(!must_be_done.check_completion()) + return FALSE + return has_hijack + +/** + * Helper to determine if a Heretic + * - Has a Living Heart + * - Has a an organ in the correct slot that isn't a living heart + * - Is missing the organ they need in the slot to make a living heart + * + * Returns HERETIC_NO_HEART_ORGAN if they have no heart (organ) at all, + * Returns HERETIC_NO_LIVING_HEART if they have a heart (organ) but it's not a living one, + * and returns HERETIC_HAS_LIVING_HEART if they have a living heart + */ +/datum/antagonist/heretic/proc/has_living_heart() + var/obj/item/organ/our_living_heart = owner.current?.get_organ_slot(living_heart_organ_slot) + if(!our_living_heart) + return HERETIC_NO_HEART_ORGAN + + if(!HAS_TRAIT(our_living_heart, TRAIT_LIVING_HEART)) + return HERETIC_NO_LIVING_HEART + + return HERETIC_HAS_LIVING_HEART + +/// Heretic's minor sacrifice objective. "Minor sacrifices" includes anyone. +/datum/objective/minor_sacrifice + name = "minor sacrifice" + needs_target = FALSE + +/datum/objective/minor_sacrifice/New() + target_amount = rand(3, 4) + update_explanation_text() + return ..() + +/datum/objective/minor_sacrifice/update_explanation_text() + explanation_text = "Sacrifice at least [target_amount] crewmembers." + +/datum/objective/minor_sacrifice/check_completion() + var/datum/antagonist/heretic/heretic_datum = owner?.has_antag_datum(/datum/antagonist/heretic) + if(!heretic_datum) + return FALSE + return completed || (heretic_datum.total_sacrifices >= target_amount) + +/// Heretic's major sacrifice objective. "Major sacrifices" are heads of staff. +/datum/objective/major_sacrifice + name = "major sacrifice" + target_amount = 1 + explanation_text = "Sacrifice 1 head of staff." + needs_target = FALSE + +/datum/objective/major_sacrifice/check_completion() + var/datum/antagonist/heretic/heretic_datum = owner?.has_antag_datum(/datum/antagonist/heretic) + if(!heretic_datum) + return FALSE + return completed || (heretic_datum.high_value_sacrifices >= target_amount) + +/// Heretic's research objective. "Research" is heretic knowledge nodes (You start with some). +/datum/objective/heretic_research + name = "research" + needs_target = FALSE + /// The length of a main path. Calculated once in New(). + var/static/main_path_length = 0 + +/datum/objective/heretic_research/New() + gen_amount_goal() + return ..() + +/datum/objective/heretic_research/proc/gen_amount_goal() + if(!main_path_length) + // Let's find the length of a main path. We'll use rust because it's the coolest. + // (All the main paths are (should be) the same length, so it doesn't matter.) + var/rust_paths_found = 0 + for(var/datum/heretic_knowledge/knowledge as anything in subtypesof(/datum/heretic_knowledge)) + if(GLOB.heretic_research_tree[knowledge][HKT_ROUTE] == PATH_RUST) + rust_paths_found++ + + main_path_length = rust_paths_found + + // Factor in the length of the main path first. + target_amount = main_path_length + // Add in the base research we spawn with, otherwise it'd be too easy. + target_amount += length(GLOB.heretic_start_knowledge) + // And add in some buffer, to require some sidepathing, especially since heretics get some free side paths. + target_amount += rand(2, 4) + update_explanation_text() + return target_amount + +/datum/objective/heretic_research/update_explanation_text() + explanation_text = "Research at least [target_amount] knowledge from the Mansus. You start with [length(GLOB.heretic_start_knowledge)] researched." + +/datum/objective/heretic_research/check_completion() + var/datum/antagonist/heretic/heretic_datum = owner?.has_antag_datum(/datum/antagonist/heretic) + if(!heretic_datum) + return FALSE + return completed || (length(heretic_datum.researched_knowledge) >= target_amount) + +/datum/objective/heretic_summon + name = "summon monsters" + target_amount = 2 + explanation_text = "Summon 2 monsters from the Mansus into this realm. Monsters created or converted from corpses will do not count towards this objective." + needs_target = FALSE + /// The total number of summons the objective owner has done + var/num_summoned = 0 + +/datum/objective/heretic_summon/check_completion() + return completed || (num_summoned >= target_amount) + +/datum/action/heretic_menu + name = "Info And Research" + desc = "Learn about the mansus and research your path" + button_icon = 'icons/mob/actions/actions_ecult.dmi' + background_icon = 'icons/mob/actions/actions_ecult.dmi' + button_icon_state = "book" + background_icon_state = "bg_heretic" + +/datum/action/heretic_menu/Trigger(left_click) + var/mob/living/L = owner + var/datum/antagonist/heretic = IS_HERETIC(L) + if(heretic) + heretic.ui_interact(L) + diff --git a/code/modules/antagonists/heretic/heretic_focus.dm b/code/modules/antagonists/heretic/heretic_focus.dm new file mode 100644 index 00000000000..de6816aa31e --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_focus.dm @@ -0,0 +1,61 @@ +/// Heretic focus element, simple element for making an item a heretic focus, +/// allowing heretics to cast advanced spells (examine message included). +/datum/element/heretic_focus + +/datum/element/heretic_focus/Attach(datum/target) + . = ..() + if(!isitem(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) + RegisterSignal(target, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) + RegisterSignal(target, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) + + var/obj/item/item_target = target + // If our loc is a mob, it's possible we already have it equippied + if(ismob(item_target.loc)) + var/mob/wearer = item_target.loc + if(!item_target.slot_flags || wearer.get_item_by_slot(item_target.slot_flags) == item_target) + ADD_TRAIT(wearer, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(target)) + +/datum/element/heretic_focus/Detach(obj/item/source) + . = ..() + UnregisterSignal(source, list(COMSIG_PARENT_EXAMINE, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED)) + if(isliving(source.loc)) + REMOVE_TRAIT(source.loc, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(source)) + +/** + * Signal proc for [COMSIG_PARENT_EXAMINE]. + * Let's the examiner see that this item is a heretic focus + */ +/datum/element/heretic_focus/proc/on_examine(obj/item/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + if(!IS_HERETIC(user)) + return + + examine_list += "Allows you to cast advanced heretic spells when worn." + +/** + * Signal proc for [COMSIG_ITEM_EQUIPPED]. + * When equipped in a right slot, give user our trait + */ +/datum/element/heretic_focus/proc/on_equip(obj/item/source, mob/user, slot) + SIGNAL_HANDLER + + if(!IS_HERETIC(user)) + return + + if(source.slot_flags && !(source.slot_flags & slot)) + return + + ADD_TRAIT(user, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(source)) + +/** + * Signal proc for [COMSIG_ITEM_DROPPED]. + * Remove our trait when we drop (unequip) our item + */ +/datum/element/heretic_focus/proc/on_drop(obj/item/source, mob/user) + SIGNAL_HANDLER + + REMOVE_TRAIT(user, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(source)) diff --git a/code/modules/antagonists/heretic/heretic_knowledge.dm b/code/modules/antagonists/heretic/heretic_knowledge.dm new file mode 100644 index 00000000000..df5217d6fea --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_knowledge.dm @@ -0,0 +1,670 @@ + +/** + * # Heretic Knowledge + * + * The datums that allow heretics to progress and learn new spells and rituals. + * + * Heretic Knowledge datums are not singletons - they are instantiated as they + * are given to heretics, and deleted if the heretic antagonist is removed. + * + */ +/datum/heretic_knowledge + /// Name of the knowledge, shown to the heretic. + var/name = "Basic knowledge" + /// Description of the knowledge, shown to the heretic. Describes what it unlocks / does. + var/desc = "Basic knowledge of forbidden arts." + /// What's shown to the heretic when the knowledge is aquired + var/gain_text + /// The abstract parent type of the knowledge, used in determine mutual exclusivity in some cases + var/datum/heretic_knowledge/abstract_parent_type = /datum/heretic_knowledge + /// Assoc list of [typepaths we need] to [amount needed]. + /// If set, this knowledge allows the heretic to do a ritual on a transmutation rune with the components set. + /// If one of the items in the list is a list, it's treated as 'any of these items will work' + var/list/required_atoms + /// Paired with above. If set, the resulting spawned atoms upon ritual completion. + var/list/result_atoms = list() + /// If set, required_atoms checks for these *exact* types and doesn't allow them to be ingredients. + var/list/banned_atom_types = list() + /// Cost of knowledge in knowledge points + var/cost = 0 + /// The priority of the knowledge. Higher priority knowledge appear higher in the ritual list. + /// Number itself is completely arbitrary. Does not need to be set for non-ritual knowledge. + var/priority = 0 + ///If this is considered starting knowledge, TRUE if yes + var/is_starting_knowledge = FALSE + /// In case we want to override the default UI icon getter and plug in our own icon instead. + /// if research_tree_icon_path is not null, research_tree_icon_state must also be specified or things may break + var/research_tree_icon_path + var/research_tree_icon_state + var/research_tree_icon_frame = 1 + var/research_tree_icon_dir = SOUTH + /// A spell we need to add to the mind vs the mob. + var/mind_spell + + +/** Called when the knowledge is first researched. + * This is only ever called once per heretic. + * + * Arguments + * * user - The heretic who researched something + * * our_heretic - The antag datum of who researched us. This should never be null. + */ +/datum/heretic_knowledge/proc/on_research(mob/user, datum/antagonist/heretic/our_heretic) + SHOULD_CALL_PARENT(TRUE) + + if(gain_text) + to_chat(user, SPAN_WARNING("[gain_text]")) + on_gain(user, our_heretic) + +/** + * Called when the knowledge is applied to a mob. + * This can be called multiple times per heretic, + * in the case of bodyswap shenanigans. + * + * Arguments + * * user - the heretic which we're applying things to + * * our_heretic - The antag datum of who gained us. This should never be null. + */ +/datum/heretic_knowledge/proc/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + return + +/** + * Called when the knowledge is removed from a mob, + * either due to a heretic being de-heretic'd or bodyswap memery. + * + * Arguments + * * user - the heretic which we're removing things from + * * our_heretic - The antag datum of who is losing us. This should never be null. + */ +/datum/heretic_knowledge/proc/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + return + +/** + * Determines if a heretic can actually attempt to invoke the knowledge as a ritual. + * By default, we can only invoke knowledge with rituals associated. + * + * Return TRUE to have the ritual show up in the rituals list, FALSE otherwise. + */ +/datum/heretic_knowledge/proc/can_be_invoked(datum/antagonist/heretic/invoker) + return !!LAZYLEN(required_atoms) + +/** + * Special check for rituals. + * Called before any of the required atoms are checked. + * + * If you are adding a more complex summoning, + * or something that requires a special check + * that parses through all the atoms, + * you should override this. + * + * Arguments + * * user - the mob doing the ritual + * * atoms - a list of all atoms being checked in the ritual. + * * selected_atoms - an empty list(!) instance passed in by the ritual. You can add atoms to it in this proc. + * * our_turf - the turf the ritual's occuring on + * + * Returns: TRUE, if the ritual will continue, or FALSE, if the ritual is skipped / cancelled + */ +/datum/heretic_knowledge/proc/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + return TRUE + +/** + * Parses specific items into a more readble form. + * Can be overriden by knoweldge subtypes. + */ +/datum/heretic_knowledge/proc/parse_required_item(atom/item_path, number_of_things) + // If we need a human, there is a high likelihood we actually need a (dead) body + if(ispath(item_path, /mob/living/carbon/human)) + return "bod[number_of_things > 1 ? "ies" : "y"]." + if(ispath(item_path, /mob/living)) + return "carcass[number_of_things > 1 ? "es" : ""] of any kind." + if(ispath(item_path, /obj/item/kitchen/knife)) + return "knife[number_of_things > 1 ? "s" : ""] of any kind." + if(ispath(item_path, /obj/item/toy/crayon)) + return "crayon[number_of_things > 1 ? "s" : ""] of any kind." + if(islist(item_path)) // we gotta get a bit weird here to pull the item out of the embedded list. + var/list/item_list = list() + item_list = item_path + var/atom/item = item_list[1] + return "[number_of_things > 1 ? "[item.name]\s" : "[item.name]"] of any kind." + return "[initial(item_path.name)]\s" +/** + * Called whenever the knowledge's associated ritual is completed successfully. + * + * Creates atoms from types in result_atoms. + * Override this if you want something else to happen. + * This CAN sleep, such as for summoning rituals which poll for ghosts. + * + * Arguments + * * user - the mob who did the ritual + * * selected_atoms - an list of atoms chosen as a part of this ritual. + * * our_turf - the turf the ritual's occuring on + * + * Returns: TRUE, if the ritual should cleanup afterwards, or FALSE, to avoid calling cleanup after. + */ +/datum/heretic_knowledge/proc/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + if(!length(result_atoms)) + return FALSE + for(var/result in result_atoms) + new result(our_turf) + return TRUE + +/** + * Called after on_finished_recipe returns TRUE + * and a ritual was successfully completed. + * + * Goes through and cleans up (deletes) + * all atoms in the selected_atoms list. + * + * Remove atoms from the selected_atoms + * (either in this proc or in on_finished_recipe) + * to NOT have certain atoms deleted on cleanup. + * + * Arguments + * * selected_atoms - a list of all atoms we intend on destroying. + */ +/datum/heretic_knowledge/proc/cleanup_atoms(list/selected_atoms) + SHOULD_CALL_PARENT(TRUE) + + for(var/atom/sacrificed as anything in selected_atoms) + if(isliving(sacrificed)) + continue + + if(isstack(sacrificed)) + var/obj/item/stack/sac_stack = sacrificed + var/how_much_to_use = 0 + for(var/requirement in required_atoms) + // If it's not requirement type and type is not a list, skip over this check + if(!istype(sacrificed, requirement) && !islist(requirement)) + continue + // If requirement *is* a list and the stack *is* in the list, skip over this check + if(islist(requirement) && !is_type_in_list(sacrificed, requirement)) + continue + how_much_to_use = min(required_atoms[requirement], sac_stack.amount) + break + sac_stack.use(how_much_to_use) + continue + + selected_atoms -= sacrificed + qdel(sacrificed) + +/** + * A knowledge subtype that grants the heretic a certain spell. + */ +/datum/heretic_knowledge/spell + abstract_parent_type = /datum/heretic_knowledge/spell + /// Spell path we add to the heretic. Type-path. + var/datum/spell/action_to_add + /// The spell we actually created. + var/created_action_ref + +/datum/heretic_knowledge/spell/Destroy() + created_action_ref = null + return ..() + +/datum/heretic_knowledge/spell/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + // Added spells are tracked on the body, and not the mind, + // because we handle heretic mind transfers + // via the antag datum (on_gain and on_lose). + var/datum/spell/created_action = locateUID(created_action_ref) || new action_to_add(user) + user.AddSpell(created_action) + created_action_ref = created_action.UID() + +/datum/heretic_knowledge/spell/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + var/datum/spell/created_action = locateUID(created_action_ref) + user.RemoveSpell(created_action) + +/** + * A knowledge subtype for knowledge that can only + * have a limited amount of its resulting atoms + * created at once. + */ +/datum/heretic_knowledge/limited_amount + abstract_parent_type = /datum/heretic_knowledge/limited_amount + /// The limit to how many items we can create at once. + var/limit = 1 + /// A list of weakrefs to all items we've created. + var/list/created_items + +/datum/heretic_knowledge/limited_amount/Destroy(force) + LAZYCLEARLIST(created_items) + return ..() + +/datum/heretic_knowledge/limited_amount/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + for(var/ref as anything in created_items) + var/atom/real_thing = locateUID(ref) + if(QDELETED(real_thing)) + LAZYREMOVE(created_items, ref) + + if(LAZYLEN(created_items) >= limit) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, you are at the limit for this item!")) + return FALSE + + return TRUE + +/datum/heretic_knowledge/limited_amount/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + for(var/result in result_atoms) + var/atom/created_thing = new result(our_turf) + LAZYADD(created_items,created_thing.UID()) + return TRUE + +/** + * A knowledge subtype for limited_amount knowledge + * used for base knowledge (the ones that make blades) + * + * A heretic can only learn one /starting type knowledge, + * and their ascension depends on whichever they chose. + */ +/datum/heretic_knowledge/limited_amount/starting + abstract_parent_type = /datum/heretic_knowledge/limited_amount/starting + limit = 3 + cost = 1 + priority = MAX_KNOWLEDGE_PRIORITY - 5 + +/datum/heretic_knowledge/limited_amount/starting/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.heretic_path = GLOB.heretic_research_tree[type][HKT_ROUTE] + SSblackbox.record_feedback("tally", "heretic_path_taken", 1, our_heretic.heretic_path) + + +/datum/heretic_knowledge/limited_amount/starting/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + var/datum/status_effect/broken_blade/BB = user.has_status_effect(/datum/status_effect/broken_blade) + var/datum/antagonist/heretic/ascend_check = IS_HERETIC(user) + if(!BB || ascend_check.ascended) + return ..() + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, you are unable to loan a blade from the mansus for another [round((BB.duration - world.time)/10, 1)] seconds!")) + return FALSE + +/** + * A knowledge subtype for heretic knowledge + * that applies a mark on use. + * + * A heretic can only learn one /mark type knowledge. + */ +/datum/heretic_knowledge/mark + abstract_parent_type = /datum/heretic_knowledge/mark + cost = 2 + /// The status effect typepath we apply on people on mansus grasp. + var/datum/status_effect/eldritch/mark_type + +/datum/heretic_knowledge/mark/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignals(user, list(COMSIG_HERETIC_MANSUS_GRASP_ATTACK, COMSIG_LIONHUNTER_ON_HIT), PROC_REF(on_mansus_grasp)) + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(on_eldritch_blade)) + +/datum/heretic_knowledge/mark/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, list(COMSIG_HERETIC_MANSUS_GRASP_ATTACK, COMSIG_HERETIC_BLADE_ATTACK)) + +/** + * Signal proc for [COMSIG_HERETIC_MANSUS_GRASP_ATTACK]. + * + * Whenever we cast mansus grasp on someone, apply our mark. + */ +/datum/heretic_knowledge/mark/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + create_mark(source, target) + +/** + * Signal proc for [COMSIG_HERETIC_BLADE_ATTACK]. + * + * Whenever we attack someone with our blade, attempt to trigger any marks on them. + */ +/datum/heretic_knowledge/mark/proc/on_eldritch_blade(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + + if(!isliving(target)) + return + trigger_mark(source, target) + +/** + * Creates the mark status effect on our target. + * This proc handles the instatiate and the application of the station effect, + * and returns the /datum/status_effect instance that was made. + * + * Can be overriden to set or pass in additional vars of the status effect. + */ +/datum/heretic_knowledge/mark/proc/create_mark(mob/living/source, mob/living/target) + if(target.stat == DEAD) + return + return target.apply_status_effect(mark_type) + +/** + * Handles triggering the mark on the target. + * + * If there is no mark, returns FALSE. Returns TRUE if a mark was triggered. + */ +/datum/heretic_knowledge/mark/proc/trigger_mark(mob/living/source, mob/living/target) + var/datum/status_effect/eldritch/mark = target.has_status_effect(/datum/status_effect/eldritch) + if(!istype(mark)) + return FALSE + + mark.on_effect() + return TRUE + +/** + * A knowledge subtype for heretic knowledge that + * upgrades their sickly blade, either on melee or range. + * + * A heretic can only learn one /blade_upgrade type knowledge. + */ +/datum/heretic_knowledge/blade_upgrade + abstract_parent_type = /datum/heretic_knowledge/blade_upgrade + cost = 2 + +/datum/heretic_knowledge/blade_upgrade/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(on_eldritch_blade_attack)) + RegisterSignal(user, COMSIG_HERETIC_RANGED_BLADE_ATTACK, PROC_REF(on_ranged_eldritch_blade)) + +/datum/heretic_knowledge/blade_upgrade/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, list(COMSIG_HERETIC_BLADE_ATTACK, COMSIG_HERETIC_RANGED_BLADE_ATTACK)) + + +/** + * Signal proc for [COMSIG_HERETIC_BLADE_ATTACK]. + * + * Apply any melee effects from hitting someone with our blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/on_eldritch_blade_attack(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + if(isliving(target)) + do_melee_effects(source, target, blade) + +/** + * Signal proc for [COMSIG_HERETIC_RANGED_BLADE_ATTACK]. + * + * Apply any ranged effects from hitting someone with our blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/on_ranged_eldritch_blade(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + + do_ranged_effects(source, target, blade) + +/** + * Overridable proc that invokes special effects + * whenever the heretic attacks someone in melee with their heretic blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + return + +/** + * Overridable proc that invokes special effects + * whenever the heretic clicks on someone at range with their heretic blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/do_ranged_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + return + +/** + * A knowledge subtype lets the heretic summon a monster with the ritual. + */ +/datum/heretic_knowledge/summon + abstract_parent_type = /datum/heretic_knowledge/summon + /// Typepath of a mob to summon when we finish the recipe. + var/mob/living/mob_to_summon + +/datum/heretic_knowledge/summon/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + return summon_ritual_mob(user, our_turf, mob_to_summon) + +/datum/heretic_knowledge/summon/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/howetic = IS_HERETIC(user) + for(var/uid_finder as anything in howetic.list_of_our_monsters) + var/atom/real_thing = locateUID(uid_finder) + if(QDELETED(real_thing)) + LAZYREMOVE(howetic.list_of_our_monsters, uid_finder) + if(LAZYLEN(howetic.list_of_our_monsters) >= howetic.monster_limit) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, you are at your limit of [howetic.monster_limit] monsters!")) + return FALSE + + return TRUE + +/** + * Creates the ritual mob and grabs a ghost for it + * + * * user - the mob doing the summoning + * * our_turf - where the summon is happening + * * mob_to_summon - either a mob instance or a mob typepath + */ +/datum/heretic_knowledge/proc/summon_ritual_mob(mob/living/user, turf/our_turf, mob/living/mob_to_summon) + var/mob/living/summoned + if(isanimal_or_basicmob(mob_to_summon)) + summoned = mob_to_summon + else + summoned = new mob_to_summon(our_turf) + // Fade in the summon while the ghost poll is ongoing. + // Also don't let them mess with the summon while waiting + if(isanimal(summoned)) + var/mob/living/simple_animal/simple = summoned + simple.AIStatus = AI_OFF + else if(isbasicmob(summoned)) + var/mob/living/basic/basic = summoned + basic.ai_controller.set_ai_status(AI_STATUS_OFF) + summoned.alpha = 0 + summoned.notransform = TRUE + summoned.move_resist = MOVE_FORCE_OVERPOWERING + animate(summoned, 10 SECONDS, alpha = 155) + + message_admins("A [summoned.name] is being summoned by [ADMIN_LOOKUPFLW(user)] in [ADMIN_COORDJMP(summoned)].") + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a heretic summon", ROLE_HERETIC, TRUE, 10 SECONDS, source = summoned) + var/mob/chosen_one + if(length(candidates)) + chosen_one = pick(candidates) + if(isnull(chosen_one)) + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, no spirits possessed the summon!")) + animate(summoned, 0.5 SECONDS, alpha = 0) + QDEL_IN(summoned, 0.6 SECONDS) + return FALSE + + // Ok let's make them an interactable mob now, since we got a ghost + summoned.alpha = 255 + summoned.notransform = FALSE + summoned.move_resist = initial(summoned.move_resist) + + summoned.ghostize(FALSE) + summoned.key = chosen_one.key + + message_admins("[ADMIN_LOOKUPFLW(user)] created a [summoned.name], [ADMIN_LOOKUPFLW(summoned)].") + + summoned.mind.add_antag_datum(new /datum/antagonist/mindslave/heretic_monster(user.mind)) + + var/datum/objective/heretic_summon/summon_objective = locate() in user.mind.get_all_objectives() + summon_objective?.num_summoned++ + var/datum/antagonist/heretic/whoetic = IS_HERETIC(user) + LAZYADD(whoetic.list_of_our_monsters,summoned.UID()) + if(mind_spell) + addtimer(CALLBACK(src, PROC_REF(add_mind_spell), summoned), 1 SECONDS) + return TRUE + +/datum/heretic_knowledge/proc/add_mind_spell(mob/living/summoned) + summoned.mind.AddSpell(mind_spell) + + +/// The amount of knowledge points the knowledge ritual gives on success. +#define KNOWLEDGE_RITUAL_POINTS 4 + +/** + * A subtype of knowledge that generates random ritual components. + */ +/datum/heretic_knowledge/knowledge_ritual + name = "Ritual of Knowledge" + desc = "A randomly generated transmutation ritual that rewards knowledge points and can only be completed once." + gain_text = "Everything can be a key to unlocking the secrets behind the Gates. I must be wary and wise." + abstract_parent_type = /datum/heretic_knowledge/knowledge_ritual + cost = 1 + priority = MAX_KNOWLEDGE_PRIORITY - 10 // A pretty important midgame ritual. + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "book_open" + /// Whether we've done the ritual. Only doable once. + var/was_completed = FALSE + +/datum/heretic_knowledge/knowledge_ritual/New() + . = ..() + var/static/list/potential_organs = list( + /obj/item/organ/internal/appendix, + /obj/item/organ/internal/eyes, + /obj/item/organ/internal/ears, + /obj/item/organ/internal/heart, + /obj/item/organ/internal/liver, + /obj/item/organ/internal/lungs, + ) + + var/static/list/potential_easy_items = list( + /obj/item/shard, + /obj/item/candle, + /obj/item/book, + /obj/item/pen, + /obj/item/paper, + /obj/item/toy/crayon, + /obj/item/flashlight, + /obj/item/clipboard, + ) + + var/static/list/potential_uncommoner_items = list( + //obj/item/restraints/legcuffs/beartrap, + list(/obj/item/restraints/handcuffs), + //obj/item/circular_saw, + //obj/item/scalpel, + //obj/item/clothing/gloves/color/yellow, + //obj/item/melee/baton, + //obj/item/clothing/glasses/sunglasses, + ) + + required_atoms = list() + // 2 organs. Can be the same. + required_atoms[pick(potential_organs)] += 1 + required_atoms[pick(potential_organs)] += 1 + // 2-3 random easy items. + required_atoms[pick(potential_easy_items)] += rand(2, 3) + // 1 uncommon item. + required_atoms[pick(potential_uncommoner_items)] += 1 + +/datum/heretic_knowledge/knowledge_ritual/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + + var/list/requirements_string = list() + + to_chat(user, SPAN_HIEROPHANT("The [name] requires the following:")) + for(var/obj/item/path as anything in required_atoms) + var/amount_needed = required_atoms[path] + + if(islist(path)) // we gotta get a bit weird here to pull the item out of the embedded list. + var/list/item_list = list() + item_list = path + var/atom/item = item_list[1] + to_chat(user, SPAN_HIEROPHANT_WARNING("[amount_needed] [item.name]\s...")) + else + to_chat(user, SPAN_HIEROPHANT_WARNING("[amount_needed] [initial(path.name)]\s...")) + + requirements_string += "[amount_needed == 1 ? "":"[amount_needed] "][initial(path.name)]\s" + + to_chat(user, SPAN_HIEROPHANT("Completing it will reward you [KNOWLEDGE_RITUAL_POINTS] knowledge points, as well as additional knowledge for creating an unsealed art. You can check the knowledge in your Researched Knowledge to be reminded.")) + + desc = "Allows you to transmute [english_list(requirements_string)] for [KNOWLEDGE_RITUAL_POINTS] bonus knowledge points. This can only be completed once." + +/datum/heretic_knowledge/knowledge_ritual/can_be_invoked(datum/antagonist/heretic/invoker) + return !was_completed + +/datum/heretic_knowledge/knowledge_ritual/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + return !was_completed + +/datum/heretic_knowledge/knowledge_ritual/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + our_heretic.knowledge_points += KNOWLEDGE_RITUAL_POINTS + was_completed = TRUE + + to_chat(user, SPAN_BOLDNOTICE("[name] completed!")) + to_chat(user, SPAN_BOLDNOTICE("We gain insights on how to perform a ritual to create an unsealed art!")) + to_chat(user, SPAN_HIEROPHANT("[pick_list(HERETIC_INFLUENCE_FILE, "drain_message")]")) + var/datum/antagonist/heretic/heretic = IS_HERETIC(user) + heretic.gain_knowledge(/datum/heretic_knowledge/unsealed_art) + desc += " (Completed!)" + log_heretic_knowledge("[key_name(user)] completed a [name] at [worldtime2text()].") + return TRUE + +#undef KNOWLEDGE_RITUAL_POINTS + +/** + * The special final tier of knowledges that unlocks ASCENSION. + */ +/datum/heretic_knowledge/ultimate + abstract_parent_type = /datum/heretic_knowledge/ultimate + cost = 2 + priority = MAX_KNOWLEDGE_PRIORITY + 1 // Yes, the final ritual should be ABOVE the max priority. + required_atoms = list(/mob/living/carbon/human = 3) + /// The text of the ascension announcement. + /// %NAME% is replaced with the heretic's real name, + /// and %SPOOKY% is replaced with output from [generate_heretic_text] + var/announcement_text + /// The sound that's played for the ascension announcement. + var/announcement_sound + +/datum/heretic_knowledge/ultimate/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + var/total_points = 0 + for(var/datum/heretic_knowledge/knowledge as anything in flatten_list(our_heretic.researched_knowledge)) + total_points += knowledge.cost + + log_heretic_knowledge("[key_name(user)] gained knowledge of their final ritual at [worldtime2text()]. \ + They have [length(our_heretic.researched_knowledge)] knowledge nodes researched, totalling [total_points] points \ + and have sacrificed [our_heretic.total_sacrifices] people ([our_heretic.high_value_sacrifices] of which were high value)") + +/datum/heretic_knowledge/ultimate/can_be_invoked(datum/antagonist/heretic/invoker) + if(invoker.ascended) + return FALSE + + if(!invoker.can_ascend()) + return FALSE + + return TRUE + +/datum/heretic_knowledge/ultimate/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!can_be_invoked(heretic_datum)) + return FALSE + + // Remove all non-dead humans from the atoms list. + // (We only want to sacrifice dead folk.) + for(var/mob/living/carbon/human/sacrifice in atoms) + if(!is_valid_sacrifice(sacrifice)) + atoms -= sacrifice + + // All the non-dead humans are removed in this proc. + // We handle checking if we have enough humans in the ritual itself. + return TRUE + +/** + * Checks if the passed human is a valid sacrifice for our ritual. + */ +/datum/heretic_knowledge/ultimate/proc/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + return (sacrifice.stat == DEAD) && !ismonkeybasic(sacrifice) && istype(sacrifice) + +/datum/heretic_knowledge/ultimate/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + heretic_datum.ascended = TRUE + heretic_datum.monster_limit = 99 // You've ascended, have fun. + + // Show the cool red gradiant in our UI + heretic_datum.update_static_data(user) + + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.physiology.brute_mod *= 0.5 + human_user.physiology.burn_mod *= 0.5 + if(ismachineperson(user)) + ADD_TRAIT(user, TRAIT_EMP_IMMUNE, "ascension") //Come on, they deserve it, let them have fun + + SSblackbox.record_feedback("tally", "heretic_ascended", 1, GLOB.heretic_research_tree[type][HKT_ROUTE]) + log_heretic_knowledge("[key_name(user)] completed their final ritual at [worldtime2text()].") + GLOB.major_announcement.Announce( + message = replacetext(replacetext(announcement_text, "%NAME%", user.real_name), "%SPOOKY%", GLOBAL_PROC_REF(generate_heretic_text)), + new_title = generate_heretic_text(), + new_sound = announcement_sound, + ) + + heretic_datum.increase_rust_strength() + return TRUE + +/datum/heretic_knowledge/ultimate/cleanup_atoms(list/selected_atoms) + for(var/mob/living/carbon/human/sacrifice in selected_atoms) + selected_atoms -= sacrifice + sacrifice.gib() + + return ..() diff --git a/code/modules/antagonists/heretic/heretic_living_heart.dm b/code/modules/antagonists/heretic/heretic_living_heart.dm new file mode 100644 index 00000000000..7d767c5550f --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_living_heart.dm @@ -0,0 +1,193 @@ +/** + * # Living Heart Component + * + * Applied to a heart to turn it into a heretic's 'living heart'. + * The living heart is what they use to track people they need to sacrifice. + * + * This component handles the action associated with it - + * if the organ is removed, the action should be deleted + */ +/datum/component/living_heart + /// The action we create and give to our heart. + var/datum/action/track_target/action + +/datum/component/living_heart/Initialize() + if(!is_internal_organ(parent)) + return COMPONENT_INCOMPATIBLE + + var/obj/item/organ/organ_parent = parent + action = new(src) + action.Grant(organ_parent.owner) + +/datum/component/living_heart/Destroy(force) + QDEL_NULL(action) + return ..() + +/datum/component/living_heart/RegisterWithParent() + ADD_TRAIT(parent, TRAIT_LIVING_HEART, UID()) + RegisterSignal(parent, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed)) + +/datum/component/living_heart/UnregisterFromParent() + REMOVE_TRAIT(parent, TRAIT_LIVING_HEART, UID()) + UnregisterSignal(parent, COMSIG_ORGAN_REMOVED) + +/datum/component/living_heart/PostTransfer(datum/new_parent) + if(!is_internal_organ(new_parent)) + return COMPONENT_INCOMPATIBLE + +/** + * Signal proc for [COMSIG_ORGAN_REMOVED]. + * + * If the organ is removed, the component will remove itself. + */ +/datum/component/living_heart/proc/on_organ_removed(obj/item/organ/source, mob/living/carbon/old_owner) + SIGNAL_HANDLER + + to_chat(old_owner, SPAN_USERDANGER("As your living [source.name] leaves your body, you feel less connected to the Mansus!")) + qdel(src) + +/** + * The action associated with the living heart. + * Allows a heretic to track sacrifice targets. + */ +/datum/action/track_target + name = "Living Heartbeat" + desc = "LMB: Chose one of your sacrifice targets to track." + check_flags = AB_CHECK_CONSCIOUS + + button_icon = 'icons/obj/antags/eldritch.dmi' + button_icon_state = "living_heart" + background_icon = 'icons/mob/actions/actions_ecult.dmi' + background_icon_state = "bg_heretic" + + /// Tracks whether we were right clicked or left clicked in our last trigger + var/right_clicked = FALSE + /// The real name of the last mob we tracked + var/last_tracked_name + /// Whether the target radial is currently opened. + var/radial_open = FALSE + +/datum/action/track_target/Grant(mob/granted) + if(!IS_HERETIC(granted)) + return + + return ..() + +/datum/action/track_target/IsAvailable(show_message = FALSE) + . = ..() + if(!.) + return + + if(!IS_HERETIC(owner)) + return FALSE + if(radial_open) + return FALSE + + return TRUE + +/datum/action/track_target/Trigger(left_click) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(owner) + var/datum/heretic_knowledge/sac_knowledge = heretic_datum.get_knowledge(/datum/heretic_knowledge/hunt_and_sacrifice) + if(!LAZYLEN(heretic_datum.sac_targets)) + to_chat(owner, SPAN_HIEROPHANT_WARNING("You have no targets, visit a rune!")) + return TRUE + + var/list/targets_to_choose = list() + var/list/mob/living/carbon/human/human_targets = list() + for(var/mob/living/carbon/human/sac_target as anything in heretic_datum.sac_targets) + human_targets[sac_target.real_name] = sac_target + targets_to_choose[sac_target.real_name] = heretic_datum.sac_targets[sac_target] + + // If we don't have a last tracked name, open a radial to set one. + // If we DO have a last tracked name, we skip the radial if they right click the action. + if(isnull(last_tracked_name) || !right_clicked) + radial_open = TRUE + last_tracked_name = show_radial_menu( + owner, + owner, + targets_to_choose, + custom_check = CALLBACK(src, PROC_REF(check_menu)), + radius = 40, + require_near = TRUE, + ) + radial_open = FALSE + + // If our last tracked name is still null, skip the trigger + if(isnull(last_tracked_name)) + return FALSE + + var/mob/living/carbon/human/tracked_mob = human_targets[last_tracked_name] + if(QDELETED(tracked_mob)) + last_tracked_name = null + return FALSE + + playsound(owner, 'sound/effects/singlebeat.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) + to_chat(owner, SPAN_HIEROPHANT("Your target is [get_distance_message(tracked_mob)]")) + + + // Let them know how to sacrifice people if they're able to be sac'd + if(tracked_mob.stat == DEAD) + to_chat(owner, SPAN_HIEROPHANT("[tracked_mob] is dead. Bring them to a transmutation rune \ + and invoke \"[sac_knowledge.name]\" to sacrifice them!")) + + return TRUE + +/// Callback for the radial to ensure it's closed when not allowed. +/datum/action/track_target/proc/check_menu() + if(QDELETED(src)) + return FALSE + if(!IS_HERETIC(owner)) + return FALSE + return TRUE + +/// Gets the balloon message for who we're tracking. +/datum/action/track_target/proc/get_distance_message(mob/living/carbon/human/tracked_mob) + var/balloon_message = "error text!" + var/turf/their_turf = get_turf(tracked_mob) + var/turf/our_turf = get_turf(owner) + var/their_z = their_turf?.z + var/our_z = our_turf?.z + + // One of us is in somewhere we shouldn't be + if(!our_z || !their_z) + // "Hell if I know" + balloon_message = "on another plane!" + + // They're not on the same z-level as us + else if(our_z != their_z) + // They're on the station + if(is_station_level(their_z)) + + // We're off station, they're not + balloon_message = "on station!" + + // Mining + else if(is_mining_level(their_z)) + balloon_message = "on lavaland!" + + // They're somewhere we probably can't get too - sacrifice z-level, centcom, etc + else + balloon_message = "on another plane!" + + // They're on the same z-level as us! + else + var/dist = get_dist(our_turf, their_turf) + var/dir = get_dir(our_turf, their_turf) + + + switch(dist) + if(0 to 15) + balloon_message = "very near, [dir2text(dir)]!" + if(16 to 31) + balloon_message = "near, [dir2text(dir)]!" + if(32 to 127) + balloon_message = "far, [dir2text(dir)]!" + else + balloon_message = "very far!" + + + if(tracked_mob.stat == DEAD) + balloon_message = "dead, and " + balloon_message + + return balloon_message + diff --git a/code/modules/antagonists/heretic/heretic_monster.dm b/code/modules/antagonists/heretic/heretic_monster.dm new file mode 100644 index 00000000000..c668452a812 --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_monster.dm @@ -0,0 +1,34 @@ +///Tracking reasons +/datum/antagonist/mindslave/heretic_monster + name = "\improper Eldritch Horror" + roundend_category = "Heretics" + job_rank = ROLE_HERETIC + antag_hud_type = ANTAG_HUD_HERETIC_BEAST + antag_hud_name = "heretic_beast" + master_hud_name = "heretic" + +/datum/antagonist/mindslave/heretic_monster/farewell() + if(owner.current) + to_chat(owner.current, "Your mind begins to fill with haze - your master is no longer[master ? " [master]":""], you are free!") + owner.current.visible_message("[owner.current] looks like [owner.current.p_theyve()] been freed from the chains of the Mansus!") + + return ..() + +/datum/antagonist/mindslave/heretic_monster/Destroy(force, ...) + if(master.current) + to_chat(master.current, "The essence of [owner], your servant, fades from your mind.") + return ..() + + +/datum/antagonist/mindslave/heretic_monster/add_owner_to_gamemode() + SSticker.mode.heretics += owner + +/datum/antagonist/mindslave/heretic_monster/remove_owner_from_gamemode() + SSticker.mode.heretics -= owner + +/datum/antagonist/mindslave/heretic_monster/greet() + var/list/messages = list() + messages.Add("You are a [ishuman(owner.current) ? "shambling corpse returned":"horrible creation brought"] to this plane through the Gates of the Mansus.") + messages.Add("Your master is [master.current.name]. Assist them to all ends.") + SEND_SOUND(owner.current, sound('sound/ambience/antag/heretic/heretic_gain.ogg')) + return messages diff --git a/code/modules/antagonists/heretic/influences.dm b/code/modules/antagonists/heretic/influences.dm new file mode 100644 index 00000000000..9292f64d267 --- /dev/null +++ b/code/modules/antagonists/heretic/influences.dm @@ -0,0 +1,263 @@ + +/// The number of influences spawned per heretic +#define NUM_INFLUENCES_PER_HERETIC 5 + +/** + * #Reality smash tracker + * + * A global singleton data that tracks all the heretic + * influences ("reality smashes") that we've created, + * and all of the heretics (minds) that can see them. + * + * Handles ensuring all minds can see influences, generating + * new influences for new heretic minds, and allowing heretics + * to see new influences that are created. + */ +/datum/reality_smash_tracker + /// The total number of influences that have been drained, for tracking. + var/num_drained = 0 + /// List of tracked influences (reality smashes) + var/list/obj/effect/heretic_influence/smashes = list() + /// List of minds with the ability to see influences + var/list/datum/mind/tracked_heretics = list() + +/datum/reality_smash_tracker/Destroy(force) + if(GLOB.reality_smash_track == src) + stack_trace("[type] was deleted. Heretics may no longer access any influences. Fix it, or call coder support.") + message_admins("The [type] was deleted. Heretics may no longer access any influences. Fix it, or call coder support.") + QDEL_LIST_CONTENTS(smashes) + tracked_heretics.Cut() + return ..() + +/** + * Generates a set amount of reality smashes + * based on the number of already existing smashes + * and the number of minds we're tracking. + */ +/datum/reality_smash_tracker/proc/generate_new_influences() + var/how_many_can_we_make = 0 + for(var/heretic_number in 1 to length(tracked_heretics)) + how_many_can_we_make += max(NUM_INFLUENCES_PER_HERETIC - heretic_number + 1, 1) + + var/location_sanity = 0 + while((length(smashes) + num_drained) < how_many_can_we_make && location_sanity < 100) + var/turf/chosen_location = get_safe_random_station_turf_equal_weight() + + // We don't want them close to each other - at least 1 tile of separation + var/list/nearby_things = range(1, chosen_location) + var/obj/effect/heretic_influence/what_if_i_have_one = locate() in nearby_things + var/obj/effect/visible_heretic_influence/what_if_i_had_one_but_its_used = locate() in nearby_things + if(what_if_i_have_one || what_if_i_had_one_but_its_used) + location_sanity++ + continue + + new /obj/effect/heretic_influence(chosen_location) + +/** + * Adds a mind to the list of people that can see the reality smashes + * + * Use this whenever you want to add someone to the list + */ +/datum/reality_smash_tracker/proc/add_tracked_mind(datum/mind/heretic) + tracked_heretics |= heretic + + // If our heretic's on station, generate some new influences + if(ishuman(heretic.current) && is_teleport_allowed(heretic.current.z)) + generate_new_influences() + +/** + * Removes a mind from the list of people that can see the reality smashes + * + * Use this whenever you want to remove someone from the list + */ +/datum/reality_smash_tracker/proc/remove_tracked_mind(datum/mind/heretic) + tracked_heretics -= heretic + +/obj/effect/visible_heretic_influence + name = "pierced reality" + icon = 'icons/effects/eldritch.dmi' + icon_state = "pierced_illusion" + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + alpha = 0 + invisibility = INVISIBILITY_LEVEL_TWO + +/obj/effect/visible_heretic_influence/Initialize(mapload) + . = ..() + addtimer(CALLBACK(src, PROC_REF(show_presence)), 15 SECONDS) + + var/image/silicon_image = image('icons/effects/eldritch.dmi', src, null, OBJ_LAYER) + silicon_image.override = TRUE + add_alt_appearance("pierced_reality", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/visible_heretic_influence/add_filter(name, priority, list/params) + return + +/* + * Makes the influence fade in after 15 seconds. + */ +/obj/effect/visible_heretic_influence/proc/show_presence() + invisibility = 0 + animate(src, alpha = 255, time = 15 SECONDS) + addtimer(CALLBACK(src, PROC_REF(fade_presence)), 15 SECONDS) + +/* + * Makes the influence fade out over 20 minutes. + */ +/obj/effect/visible_heretic_influence/proc/fade_presence() + animate(src, alpha = 0, time = 20 MINUTES) + QDEL_IN(src, 20 MINUTES) + +/obj/effect/visible_heretic_influence/attack_hand(mob/living/user, list/modifiers) + . = ..() + if(.) + return + if(!ishuman(user)) + return + + if(IS_HERETIC(user)) + to_chat(user, SPAN_BOLDWARNING("You know better than to tempt forces out of your control!")) + return TRUE + + var/mob/living/carbon/human/human_user = user + var/dam_zone = pick("l_arm", "r_arm") + var/obj/item/organ/external/their_poor_arm = human_user.get_organ(dam_zone) + if(prob(25) && their_poor_arm) + human_user.visible_message(SPAN_WARNING("An otherwordly presence tears and atomizes [human_user]'s arm as [human_user.p_they(FALSE)] try to reach into the hole in the very fabric of reality!"),SPAN_USERDANGER("An otherwordly presence tears and atomizes your [their_poor_arm.name] as you try to touch the hole in the very fabric of reality!")) + their_poor_arm.droplimb() + qdel(their_poor_arm) + human_user.update_body() + else + to_chat(human_user,SPAN_DANGER("You pull your hand away from the hole as the eldritch energy flails, trying to latch onto existence itself!")) + return TRUE + +/obj/effect/visible_heretic_influence/attack_tk(mob/user) + if(!ishuman(user)) + return + + . = COMPONENT_CANCEL_ATTACK_CHAIN + + if(IS_HERETIC(user)) + to_chat(user, SPAN_BOLDWARNING("You know better than to tempt forces out of your control!")) + return + + var/mob/living/carbon/human/human_user = user + + // A very elaborate way to suicide + to_chat(human_user, SPAN_USERDANGER("Eldritch energy lashes out, piercing your fragile mind, tearing it to pieces!")) + human_user.ghostize() + var/obj/item/organ/external/head/head = locate() in human_user.bodyparts + if(head) + head.droplimb() + qdel(head) + else + human_user.gib() + var/datum/effect_system/reagents_explosion/explosion = new() + explosion.set_up(1, get_turf(human_user), TRUE, 0) + explosion.start(src) + +/obj/effect/visible_heretic_influence/examine(mob/user) + . = ..() + if(IS_HERETIC(user) || !ishuman(user)) + return + + var/mob/living/carbon/human/human_user = user + to_chat(human_user, SPAN_USERDANGER("Your mind burns as you stare at the tear!")) + human_user.adjustBrainLoss(10) + human_user.AdjustConfused(10 SECONDS, 10 SECONDS, 60 SECONDS) + +/obj/effect/heretic_influence + name = "reality smash" + icon = 'icons/effects/eldritch.dmi' + icon_state = "reality_smash" + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + invisibility = INVISIBILITY_LEVEL_TWO + hud_possible = list(HERETIC_HUD) + /// Whether we're currently being drained or not. + var/being_drained = FALSE + +/obj/effect/heretic_influence/Initialize(mapload) + . = ..() + GLOB.reality_smash_track.smashes += src + generate_name() + prepare_huds() + var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC] + h_hud.add_to_hud(src) + do_hud_stuff() + + +/obj/effect/heretic_influence/Destroy() + GLOB.reality_smash_track.smashes -= src + return ..() + +/obj/effect/heretic_influence/add_fingerprint(mob/living/M, ignoregloves) + return //No detective you can not scan the fucking influence to find out who touched it + + +/obj/effect/heretic_influence/attack_hand(mob/user) + + if(!IS_HERETIC(user)) // Shouldn't be able to do this, but just in case + return + + INVOKE_ASYNC(src, PROC_REF(drain_influence), user, 1) + + +/obj/effect/heretic_influence/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(..()) + return + // Using a codex will give you two knowledge points for draining. + if(drain_influence_with_codex(user, used)) + return ITEM_INTERACT_COMPLETE + return ..() + +/obj/effect/heretic_influence/proc/drain_influence_with_codex(mob/user, obj/item/codex_cicatrix/codex) + if(!istype(codex) || being_drained) + return FALSE + if(!codex.book_open) + codex.activate_self(user) // open booke + INVOKE_ASYNC(src, PROC_REF(drain_influence), user, 2) + return TRUE + +/** + * Begin to drain the influence, setting being_drained, + * registering an examine signal, and beginning a do_after. + * + * If successful, the influence is drained and deleted. + */ +/obj/effect/heretic_influence/proc/drain_influence(mob/living/user, knowledge_to_gain) + + being_drained = TRUE + to_chat(user, SPAN_NOTICE("You begin to drain the influence...")) + + if(!do_after(user, 10 SECONDS, target = src, hidden = TRUE)) + being_drained = FALSE + return + + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + heretic_datum.knowledge_points += knowledge_to_gain + + // Aaand now we delete it + after_drain(user) + +/** + * Handle the effects of the drain. + */ +/obj/effect/heretic_influence/proc/after_drain(mob/living/user) + if(user) + to_chat(user, SPAN_HIEROPHANT("[pick_list(HERETIC_INFLUENCE_FILE, "drain_message")]")) + to_chat(user, SPAN_WARNING("[src] begins to fade into reality!")) + + var/obj/effect/visible_heretic_influence/illusion = new /obj/effect/visible_heretic_influence(drop_location()) + illusion.name = "\improper" + pick_list(HERETIC_INFLUENCE_FILE, "drained") + " " + format_text(name) + + GLOB.reality_smash_track.num_drained++ + qdel(src) + +/** + * Generates a random name for the influence. + */ +/obj/effect/heretic_influence/proc/generate_name() + name = "\improper" + pick_list(HERETIC_INFLUENCE_FILE, "prefix") + " " + pick_list(HERETIC_INFLUENCE_FILE, "postfix") + +#undef NUM_INFLUENCES_PER_HERETIC + diff --git a/code/modules/antagonists/heretic/items/corrupted_organs.dm b/code/modules/antagonists/heretic/items/corrupted_organs.dm new file mode 100644 index 00000000000..0e8273b8396 --- /dev/null +++ b/code/modules/antagonists/heretic/items/corrupted_organs.dm @@ -0,0 +1,128 @@ +/// Renders you unable to see people who were heretics at the time that this organ is gained +/obj/item/organ/internal/eyes/corrupt + name = "corrupt orbs" + desc = "These eyes have seen something they shouldn't have." + status = parent_type::status | ORGAN_HAZARDOUS + /// The override images we are applying + var/list/hallucinations + +/obj/item/organ/internal/eyes/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + AddElement(/datum/element/noticable_organ, "Their eyes have wide dilated pupils, and no iris. Something is moving in the darkness.", BODY_ZONE_PRECISE_EYES) + +/obj/item/organ/internal/eyes/corrupt/insert(mob/living/carbon/M, special = 0) + . = ..() + if(!owner.client) + return + + var/list/human_mobs = GLOB.human_list.Copy() + human_mobs -= owner + for(var/mob/living/carbon/human/check_human as anything in human_mobs) + if(!IS_HERETIC(check_human) && !prob(5)) // Throw in some false positives + continue + var/image/invisible_man = image('icons/blanks/32x32.dmi', check_human, "nothing") + invisible_man.override = TRUE + LAZYADD(hallucinations, invisible_man) + + if(LAZYLEN(hallucinations)) + owner.client.images |= hallucinations + +/obj/item/organ/internal/eyes/corrupt/remove(mob/living/carbon/M, special = 0) + . = ..() + if(!LAZYLEN(hallucinations)) + return + owner.client?.images -= hallucinations + QDEL_NULL(hallucinations) + + +/// Randomly secretes alcohol or hallucinogens +/obj/item/organ/internal/liver/corrupt + name = "corrupt liver" + desc = "After what you've seen you could really go for a drink." + status = parent_type::status | ORGAN_HAZARDOUS + /// How much extra ingredients to add? + var/amount_added = 5 + /// What extra ingredients can we add? + var/time_between_injections = 5 MINUTES + var/list/extra_ingredients = list( + /datum/reagent/consumable/ethanol/demonsblood, + /datum/reagent/consumable/ethanol/rum, + /datum/reagent/consumable/ethanol/thirteenloko, + /datum/reagent/consumable/ethanol/vodka, + /datum/reagent/consumable/ethanol/singulo, + /datum/reagent/consumable/ethanol/hippies_delight, + /datum/reagent/bath_salts, + /datum/reagent/happiness, + /datum/reagent/lsd, + ) + COOLDOWN_DECLARE(secrete_alcohol) + + +/obj/item/organ/internal/liver/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + +/obj/item/organ/internal/liver/corrupt/on_life() + . = ..() + if(COOLDOWN_FINISHED(src, secrete_alcohol) && prob(1)) + COOLDOWN_START(src, secrete_alcohol, time_between_injections) + owner.reagents.add_reagent(pick(extra_ingredients, amount_added)) + +/// Occasionally bombards you with spooky hands and lets everyone hear your pulse. +/obj/item/organ/internal/heart/corrupt + name = "corrupt heart" + desc = "What corruption is this spreading along with the blood?" + status = parent_type::status | ORGAN_HAZARDOUS + /// How long until the next heart? + COOLDOWN_DECLARE(hand_cooldown) + +/obj/item/organ/internal/heart/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + +/obj/item/organ/internal/heart/corrupt/on_life() + . = ..() + if(!COOLDOWN_FINISHED(src, hand_cooldown) || IS_IN_MANSUS(owner) || owner.reagents?.has_reagent("holywater")) + return + fire_curse_hand(owner) + COOLDOWN_START(src, hand_cooldown, rand(6 SECONDS, 30 SECONDS)) // Wide variance to put you off guard + + +/// Sometimes begin to suffocate +/obj/item/organ/internal/lungs/corrupt + name = "corrupt lungs" + desc = "Some things SHOULD be drowned in tar." + status = parent_type::status | ORGAN_HAZARDOUS + var/time_between_breaths = 2 MINUTES + COOLDOWN_DECLARE(time_to_breathe) + +/obj/item/organ/internal/lungs/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + +/obj/item/organ/internal/lungs/corrupt/on_life() + . = ..() + if(COOLDOWN_FINISHED(src, time_to_breathe)) + COOLDOWN_START(src, time_to_breathe, time_between_breaths) + owner.AdjustLoseBreath(45 SECONDS, 45 SECONDS, 2 MINUTES) + +/// It's full of worms +/obj/item/organ/internal/appendix/corrupt + name = "corrupt appendix" + desc = "What kind of dark, cosmic force is even going to bother to corrupt an appendix?" + status = parent_type::status | ORGAN_HAZARDOUS + /// How likely are we to spawn worms? + var/worm_chance = 3 + +/obj/item/organ/internal/appendix/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + AddElement(/datum/element/noticable_organ, "Their abdomen is distended... and wiggling.", BODY_ZONE_PRECISE_GROIN) + +/obj/item/organ/internal/appendix/corrupt/on_life() + . = ..() + if(owner.stat != CONSCIOUS || owner.reagents?.has_reagent("holywater") || IS_IN_MANSUS(owner) || !prob(worm_chance)) + return + owner.vomit(lost_nutrition = 10, blood = 0, should_confuse = TRUE, distance = 0, message = 1, vomit_type_overide = /obj/effect/decal/cleanable/vomit/nebula/worms) + owner.KnockDown(5 SECONDS) diff --git a/code/modules/antagonists/heretic/items/eldritch_flask.dm b/code/modules/antagonists/heretic/items/eldritch_flask.dm new file mode 100644 index 00000000000..59a53cfd46b --- /dev/null +++ b/code/modules/antagonists/heretic/items/eldritch_flask.dm @@ -0,0 +1,8 @@ +// An unholy water flask, but for heretics. +// Heals heretics, hearms non-heretics. Pretty much identical. +/obj/item/reagent_containers/drinks/bottle/eldritch + name = "flask of eldritch essence" + desc = "Toxic to the closed minded, yet refreshing to those with knowledge of the beyond." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "eldritch_flask" + list_reagents = list("eldritch" = 50) diff --git a/code/modules/antagonists/heretic/items/forbidden_book.dm b/code/modules/antagonists/heretic/items/forbidden_book.dm new file mode 100644 index 00000000000..e1a3c3bfa94 --- /dev/null +++ b/code/modules/antagonists/heretic/items/forbidden_book.dm @@ -0,0 +1,80 @@ +// Ye old forbidden book, the Codex Cicatrix. +/obj/item/codex_cicatrix + name = "Codex Cicatrix" + desc = "This heavy tome is full of cryptic scribbles and impossible diagrams. \ + According to legend, it can be deciphered to reveal the secrets of the veil between worlds." + icon = 'icons/obj/antags/eldritch.dmi' + base_icon_state = "book" + icon_state = "book" + w_class = WEIGHT_CLASS_SMALL + new_attack_chain = TRUE + /// Helps determine the icon state of this item when it's used on self. + var/book_open = FALSE + +/obj/item/codex_cicatrix/Initialize(mapload) + . = ..() + AddComponent(/datum/component/effect_remover, \ + success_feedback = "You remove %THEEFFECT.", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ + effects_we_clear = list(/obj/effect/heretic_rune)) + +/// Callback for effect_remover component after a rune is deleted +/obj/item/codex_cicatrix/proc/after_clear_rune(obj/effect/target, mob/living/user) + if(istype(target, /obj/effect/heretic_rune)) + var/obj/effect/heretic_rune/our_target = target + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target.loc, our_target.greyscale_colours) + +/obj/item/codex_cicatrix/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + . += SPAN_NOTICE("Can be used to tap influences for additional knowledge points.") + . += SPAN_NOTICE("Can also be used to draw or remove transmutation runes with ease.") + . += SPAN_NOTICE("Additionally, it can work as a focus for your spells when held.") + +/obj/item/codex_cicatrix/activate_self(mob/user) + if(..()) + return + + if(book_open) + close_animation() + RemoveElement(/datum/element/heretic_focus) + w_class = WEIGHT_CLASS_SMALL + else + if(IS_HERETIC(user)) + open_animation() + AddElement(/datum/element/heretic_focus) + w_class = WEIGHT_CLASS_NORMAL + else + to_chat(user, SPAN_WARNING("You cant seem to open the strange book.")) + +/obj/item/codex_cicatrix/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!heretic_datum) + return NONE + if(isfloorturf(interacting_with)) + var/obj/effect/heretic_influence/influence = locate(/obj/effect/heretic_influence) in interacting_with + if(!influence?.drain_influence_with_codex(user, src)) + heretic_datum.try_draw_rune(user, interacting_with, drawing_time = 8 SECONDS) + return ITEM_INTERACT_COMPLETE + return NONE + +/// Plays a little animation that shows the book opening and closing. +/obj/item/codex_cicatrix/proc/open_animation() + icon_state = "[base_icon_state]_open" + flick("[base_icon_state]_opening", src) + book_open = TRUE + +/// Plays a closing animation and resets the icon state. +/obj/item/codex_cicatrix/proc/close_animation() + icon_state = base_icon_state + flick("[base_icon_state]_closing", src) + book_open = FALSE + +/obj/item/codex_cicatrix/dropped(mob/user, silent) + . = ..() + if(book_open) + close_animation() + RemoveElement(/datum/element/heretic_focus) + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/antagonists/heretic/items/heretic_armor.dm b/code/modules/antagonists/heretic/items/heretic_armor.dm new file mode 100644 index 00000000000..475eae282ac --- /dev/null +++ b/code/modules/antagonists/heretic/items/heretic_armor.dm @@ -0,0 +1,173 @@ +// Eldritch armor. Looks cool, hood lets you cast heretic spells. +/obj/item/clothing/head/hooded/cult_hoodie/eldritch + name = "ominous hood" + icon_state = "eldritch" + desc = "A torn, dust-caked hood. Strange eyes line the inside." + flash_protect = FLASH_PROTECTION_WELDER + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/head.dmi', + "Drask" = 'icons/mob/clothing/species/drask/helmet.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/head.dmi', + ) + +/obj/item/clothing/head/hooded/cult_hoodie/eldritch/Initialize(mapload) + . = ..() + AddElement(/datum/element/heretic_focus) + +/obj/item/clothing/suit/hooded/cultrobes/eldritch + name = "ominous armor" + desc = "A ragged, dusty set of robes. Strange eyes line the inside." + icon_state = "eldritch_armor" + flags_inv = HIDESHOES|HIDEJUMPSUIT + allowed = list(/obj/item/melee/sickly_blade, /obj/item/gun/projectile/shotgun/boltaction/lionhunter, /obj/item/melee/cultblade/haunted) + hoodtype = /obj/item/clothing/head/hooded/cult_hoodie/eldritch + // Quite well armored, though not vs disablers + armor = list(MELEE = 50, BULLET = 40, LASER = 30, ENERGY = 10, BOMB = 15, RAD = 0, FIRE = 5, ACID = 20) + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/suit.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/suit.dmi', + "Drask" = 'icons/mob/clothing/species/drask/suit.dmi', + ) + + +/obj/item/clothing/suit/hooded/cultrobes/eldritch/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + // Our hood gains the heretic_focus element. + . += SPAN_NOTICE("Allows you to cast heretic spells while the hood is up.") + +// Void cloak. Turns invisible with the hood up, lets you hide stuff. +// To future coders, if we get atom storage, make it back into a hood again. + +/obj/item/clothing/suit/hooded/cultrobes/eldritch/mob_can_equip(mob/M, slot, disable_warning) + if(!IS_HERETIC(M)) + to_chat(M, SPAN_HIEROPHANT("The armor refuses to be equipped, repelling your attempts.")) + return FALSE + . = ..() + + +/obj/item/clothing/suit/storage/void_cloak + name = "void cloak" + desc = "Black like tar, reflecting no light. Runic symbols line the outside. \ + With each flash you lose comprehension of what you are seeing." + icon_state = "void_cloak" + flags_inv = NONE + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS + // slightly worse than normal cult robes + armor = list(MELEE = 30, BULLET = 25, LASER = 20, ENERGY = 10, BOMB = 15, RAD = 0, FIRE = 5, ACID = 5) + actions_types = list(/datum/action/item_action/toggle) + pockets = /obj/item/storage/internal/void_cloak + allowed = list(/obj/item/melee/sickly_blade, /obj/item/gun/projectile/shotgun/boltaction/lionhunter, /obj/item/melee/cultblade/haunted) + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/suit.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/suit.dmi', + "Drask" = 'icons/mob/clothing/species/drask/suit.dmi', + ) + /// Are we invisible? + var/cloak_invisible = FALSE + +/obj/item/clothing/suit/storage/void_cloak/Initialize(mapload) + . = ..() + make_visible() + // We have to overide the initalize from above + pockets.storage_slots = 3 //two slots + pockets.max_w_class = WEIGHT_CLASS_NORMAL + pockets.max_combined_w_class = 5 + +/obj/item/storage/internal/void_cloak + silent = TRUE //Sneaky cloak, sneaky storage + can_hold = list( + /obj/item/ammo_box/lionhunter, + /obj/item/heretic_labyrinth_handbook, + /obj/item/clothing/neck/eldritch_amulet, + /obj/item/clothing/neck/heretic_focus, + /obj/item/codex_cicatrix, + /obj/item/eldritch_potion, + /obj/item/food/grown/poppy, // Used to regain a Living Heart. + /obj/item/food/grown/harebell, // Used to reroll targets + /obj/item/melee/rune_carver, + /obj/item/melee/sickly_blade, + /obj/item/organ, // Organs are also often used in rituals. + /obj/item/reagent_containers/drinks/bottle/eldritch, + /obj/item/stack/sheet/glass, // Glass is often used by moon heretics + /obj/item/ammo_box/lionhunter, + ) + +/obj/item/clothing/suit/storage/void_cloak/equipped(mob/user, slot) + . = ..() + if(slot & ITEM_SLOT_OUTER_SUIT) + RegisterSignal(user, COMSIG_MOB_EQUIPPED_ITEM, PROC_REF(hide_item)) + RegisterSignal(user, COMSIG_MOB_UNEQUIPPED_ITEM, PROC_REF(show_item)) + if(IS_HERETIC(user)) + make_invisible() + else + make_visible() + if(ishuman(loc)) + var/mob/living/carbon/human/C = loc + C.update_inv_wear_suit() + +/obj/item/clothing/suit/storage/void_cloak/dropped(mob/user) + . = ..() + UnregisterSignal(user, list(COMSIG_MOB_EQUIPPED_ITEM, COMSIG_MOB_UNEQUIPPED_ITEM)) + +/obj/item/clothing/suit/storage/void_cloak/item_action_slot_check(slot, mob/user) + if(slot == ITEM_SLOT_OUTER_SUIT) //we only give the mob the ability to activate the vest if he's actually wearing it. + return TRUE + +/obj/item/clothing/suit/storage/void_cloak/attack_self__legacy__attackchain(mob/user) + if(!IS_HERETIC(user)) + to_chat(user, SPAN_HIEROPHANT("You lack the forbidden knowledge to access this cloaks potential.")) + return + if(cloak_invisible) + make_visible() + else + make_invisible() + if(ishuman(loc)) + var/mob/living/carbon/human/C = loc + C.update_inv_wear_suit() + + +/obj/item/clothing/suit/storage/void_cloak/proc/hide_item(atom/movable/source, obj/item/item, slot) + SIGNAL_HANDLER + if(slot & ITEM_SLOT_SUIT_STORE) + ADD_TRAIT(item, TRAIT_SKIP_EXAMINE, UID()) + ADD_TRAIT(item, TRAIT_NO_STRIP, UID()) + ADD_TRAIT(item, TRAIT_NO_WORN_ICON, UID()) + + +/obj/item/clothing/suit/storage/void_cloak/proc/show_item(atom/movable/source, obj/item/item) + SIGNAL_HANDLER + REMOVE_TRAIT(item, TRAIT_NO_STRIP, UID()) + REMOVE_TRAIT(item, TRAIT_SKIP_EXAMINE, UID()) + REMOVE_TRAIT(item, TRAIT_NO_WORN_ICON, UID()) + +/obj/item/clothing/suit/storage/void_cloak/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + // Let examiners know this works as a focus only if the hood is down + . += SPAN_NOTICE("Allows you to cast heretic spells while the hood is down.") + +/// Makes our cloak "invisible". Not the wearer, the cloak itself. +/obj/item/clothing/suit/storage/void_cloak/proc/make_invisible() + ADD_TRAIT(src, TRAIT_SKIP_EXAMINE, UID()) + ADD_TRAIT(src, TRAIT_NO_STRIP, UID()) + icon_state = "void_cloak_invisible" + cloak_invisible = TRUE + RemoveElement(/datum/element/heretic_focus) + + if(isliving(loc)) + loc.visible_message(SPAN_NOTICE("Light shifts around [loc], making the cloak around them invisible!")) + +/// Makes our cloak "visible" again. +/obj/item/clothing/suit/storage/void_cloak/proc/make_visible() + REMOVE_TRAIT(src, TRAIT_SKIP_EXAMINE, UID()) + REMOVE_TRAIT(src, TRAIT_NO_STRIP, UID()) + AddElement(/datum/element/heretic_focus) + icon_state = "void_cloak" + cloak_invisible = FALSE + if(isliving(loc)) + loc.visible_message(SPAN_NOTICE("A kaleidoscope of colours collapses around [loc], a cloak appearing suddenly around their person!")) diff --git a/code/modules/antagonists/heretic/items/heretic_blades.dm b/code/modules/antagonists/heretic/items/heretic_blades.dm new file mode 100644 index 00000000000..e4a7468e866 --- /dev/null +++ b/code/modules/antagonists/heretic/items/heretic_blades.dm @@ -0,0 +1,328 @@ + +/obj/item/melee/sickly_blade + name = "\improper sickly blade" + desc = "A sickly green crescent blade, decorated with an ornamental eye. You feel like you're being watched..." + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "eldritch_blade" + inhand_icon_state = "eldritch_blade" + lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi' + righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' + inhand_x_dimension = 64 + inhand_y_dimension = 64 + slot_flags = ITEM_SLOT_BELT + sharp = TRUE + force = 20 + throwforce = 10 + toolspeed = 0.375 + hitsound = 'sound/weapons/bladeslice.ogg' + armor_penetration_percentage = 35 + attack_verb = list("attacks", "slashes", "slices", "tears", "lacerates", "rips", "dices", "rends") + new_attack_chain = TRUE + var/after_use_message = "" + +/obj/item/melee/sickly_blade/examine(mob/user) + . = ..() + if(!check_usability(user)) + return + + . += SPAN_NOTICE("You can shatter the blade to teleport to a random, (mostly) safe location by activating it in-hand.") + +/// Checks if the passed mob can use this blade without being stunned +/obj/item/melee/sickly_blade/proc/check_usability(mob/living/user) + return IS_HERETIC_OR_MONSTER(user) + +/obj/item/melee/sickly_blade/pre_attack(atom/target, mob/living/user, params) + if(..()) + return FINISH_ATTACK + if(!check_usability(user)) + to_chat(user, SPAN_DANGER("You feel a pulse of alien intellect lash out at your mind!")) + var/mob/living/carbon/human/human_user = user + human_user.Weaken(5 SECONDS) + return FINISH_ATTACK + +/obj/item/melee/sickly_blade/activate_self(mob/user) + if(..()) + return + seek_safety(user) + +/// Attempts to teleport the passed mob to somewhere safe on the station, if they can use the blade. +/obj/item/melee/sickly_blade/proc/seek_safety(mob/user) + to_chat(user, SPAN_WARNING("You begin to break the blade...")) + if(!do_after(user, 1 SECONDS, target = src, allow_moving = TRUE, must_be_held = TRUE)) + to_chat(user, SPAN_WARNING("You fail to break the blade!")) + return + var/turf/safe_turf = find_safe_turf(blacklist_areas = GLOB.blacklisted_heretic_areas) + var/turf/blade_turf = get_turf(user) + var/area/our_area = get_area(blade_turf) + if(isnull(safe_turf) || !is_teleport_allowed(blade_turf.z) || our_area.tele_proof) + to_chat(user, SPAN_WARNING("You shatter [src], but your plea goes unanswered.")) + playsound(src, "shatter", 70, TRUE) + qdel(src) + return + if(check_usability(user) && isliving(user)) + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/broken_blade, icon_state) + if(do_teleport(living_user, safe_turf)) + to_chat(living_user, SPAN_WARNING("As you shatter [src], you feel a gust of energy flow through your body. [after_use_message]")) + else + to_chat(living_user, SPAN_WARNING("You shatter [src], but your plea goes unanswered.")) + else + to_chat(user,SPAN_WARNING("You shatter [src].")) + playsound(src, "shatter", 70, TRUE) //copied from the code for smashing a glass sheet onto the ground to turn it into a shard + qdel(src) + +/obj/item/melee/sickly_blade/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + SEND_SIGNAL(user, COMSIG_HERETIC_BLADE_ATTACK, target, src) + +/obj/item/melee/sickly_blade/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + SEND_SIGNAL(user, COMSIG_HERETIC_RANGED_BLADE_ATTACK, interacting_with, src) + return ITEM_INTERACT_COMPLETE + +// Path of Rust's blade +/obj/item/melee/sickly_blade/rust + name = "\improper rusted blade" + desc = "This crescent blade is decrepit, wasting to rust. \ + Yet still it bites, ripping flesh and bone with jagged, rotten teeth." + icon_state = "rust_blade" + inhand_icon_state = "rust_blade" + after_use_message = "The Rusted Hills hear your call..." + +// Path of Ash's blade +/obj/item/melee/sickly_blade/ash + name = "\improper ashen blade" + desc = "Molten and unwrought, a hunk of metal warped to cinders and slag. \ + Unmade, it aspires to be more than it is, and shears soot-filled wounds with a blunt edge." + icon_state = "ash_blade" + inhand_icon_state = "ash_blade" + after_use_message = "The Nightwatcher hears your call..." + resistance_flags = FIRE_PROOF + +// Path of Flesh's blade +/obj/item/melee/sickly_blade/flesh + name = "\improper bloody blade" + desc = "A crescent blade born from a fleshwarped creature. \ + Keenly aware, it seeks to spread to others the suffering it has endured from its dreadful origins." + icon_state = "flesh_blade" + inhand_icon_state = "flesh_blade" + after_use_message = "The Marshal hears your call..." + +// Path of Void's blade +/obj/item/melee/sickly_blade/void + name = "\improper void blade" + desc = "Devoid of any substance, this blade reflects nothingness. \ + It is a real depiction of purity, and chaos that ensues after its implementation." + icon_state = "void_blade" + inhand_icon_state = "void_blade" + after_use_message = "The Aristocrat hears your call..." + var/chilling = FALSE + var/cooling_power = 40000 + +/obj/item/melee/sickly_blade/void/Initialize(mapload) + . = ..() + START_PROCESSING(SSprocessing, src) + +/obj/item/melee/sickly_blade/void/Destroy() + STOP_PROCESSING(SSprocessing, src) + return ..() + +/obj/item/melee/sickly_blade/void/examine(mob/user) + . = ..() + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!heretic_datum) + return + . += "We may touch the blade to ourself to call forth an aspect of winter's end." + +/obj/item/melee/sickly_blade/void/dropped(mob/user, silent) + . = ..() + chilling = FALSE + +/obj/item/melee/sickly_blade/void/pre_attack(atom/target, mob/living/user, params) + if(..()) + return + + if(user == target) + if(chilling) + to_chat(user, SPAN_WARNING("We are already calling forth the patient end.")) + return FINISH_ATTACK + else + chilling = TRUE + to_chat(user, SPAN_WARNING("We begin to bring forth a fragment of winter.")) + while(chilling) + if(!do_after_once(user, 10 SECONDS, TRUE, src, TRUE, FALSE, TRUE, SPAN_WARNING("We finish channeling winter."))) + chilling = FALSE + return FINISH_ATTACK + +/obj/item/melee/sickly_blade/void/process() + if(!chilling) + return + var/datum/milla_safe/void_blade/milla = new() + milla.invoke_async(src) + +/datum/milla_safe/void_blade + +/datum/milla_safe/void_blade/on_run(obj/item/melee/sickly_blade/void/blade) + var/turf/T = get_turf(blade) + var/datum/gas_mixture/env = get_turf_air(T) + var/initial_temperature = env.temperature() + var/target_temp = 100 + + if(!issimulatedturf(T) || T.density) + return + if(initial_temperature <= target_temp) //Can we actually cool this? + return + + var/amount_cooled = initial_temperature - blade.cooling_power / env.heat_capacity() + env.set_temperature(max(amount_cooled, target_temp)) + +// Path of the Blade's... blade. +// Opting for /dark instead of /blade to avoid "sickly_blade/blade". +/obj/item/melee/sickly_blade/dark + name = "\improper sundered blade" + desc = "A galliant blade, sundered and torn. \ + Furiously, the blade cuts. Silver scars bind it forever to its dark purpose." + icon_state = "dark_blade" + base_icon_state = "dark_blade" + inhand_icon_state = "dark_blade" + after_use_message = "The Torn Champion hears your call..." + ///If our blade is currently infused with the mansus grasp + var/infused = FALSE + +/obj/item/melee/sickly_blade/dark/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + if(!proximity_flag) + return + if(!infused || target == user || !isliving(target)) + return + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/mob/living/living_target = target + if(!heretic_datum) + return + + //Apply our heretic mark + var/datum/heretic_knowledge/mark/blade_mark/mark_to_apply = heretic_datum.get_knowledge(/datum/heretic_knowledge/mark/blade_mark) + if(!mark_to_apply) + return + mark_to_apply.create_mark(user, living_target) + + //Remove the infusion from any blades we own (and update their sprite) + for(var/obj/item/melee/sickly_blade/dark/to_infuse in user.get_contents()) + to_infuse.infused = FALSE + to_infuse.update_appearance(UPDATE_ICON) + user.update_inv_l_hand() + user.update_inv_r_hand() + + if(!check_behind(user, living_target)) + return + // We're officially behind them, apply effects + living_target.Weaken(1.5 SECONDS) + living_target.apply_damage(10, BRUTE) + playsound(living_target, 'sound/weapons/guillotine.ogg', 100, TRUE) + +/obj/item/melee/sickly_blade/dark/dropped(mob/user, silent) + . = ..() + if(infused) + infused = FALSE + update_appearance(UPDATE_ICON) + +/obj/item/melee/sickly_blade/dark/update_icon_state() + . = ..() + if(infused) + icon_state = base_icon_state + "_infused" + inhand_icon_state = base_icon_state + "_infused" + else + icon_state = base_icon_state + inhand_icon_state = base_icon_state + +// Path of Cosmos's blade +/obj/item/melee/sickly_blade/cosmic + name = "\improper cosmic blade" + desc = "A mote of celestial resonance, shaped into a star-woven blade. \ + An iridescent exile, carving radiant trails, desperately seeking unification." + icon_state = "cosmic_blade" + inhand_icon_state = "cosmic_blade" + after_use_message = "The Stargazer hears your call..." + +// Path of Knock's blade +/obj/item/melee/sickly_blade/lock + name = "\improper key blade" + desc = "A blade and a key, a key to what? \ + What grand gates does it open?" + icon_state = "key_blade" + inhand_icon_state = "key_blade" + after_use_message = "The Stewards hear your call..." + tool_behaviour = TOOL_CROWBAR + usesound = 'sound/items/crowbar.ogg' //Maybe something else? + toolspeed = 0.5 + +// Path of Moon's blade +/obj/item/melee/sickly_blade/moon + name = "\improper moon blade" + desc = "A blade of iron, reflecting the truth of the earth: All join the troupe one day. \ + A troupe bringing joy, carving smiles on their faces if they want one or not." + icon_state = "moon_blade" + inhand_icon_state = "moon_blade" + after_use_message = "The Moon hears your call..." + +// Path of Nar'Sie's blade +// What!? This blade is given to cultists as an altar item when they sacrifice a heretic. +// It is also given to the heretic themself if they sacrifice a cultist. +/obj/item/melee/sickly_blade/cursed + name = "\improper cursed blade" + desc = "A dark blade, cursed to bleed forever. In constant struggle between the eldritch and the dark, it is forced to accept any wielder as its master. \ + Its eye's cornea drips blood endlessly into the ground, yet its piercing gaze remains on you. Cultists can scribe runes faster with it." + force = 25 + throwforce = 15 + icon_state = "cursed_blade" + inhand_icon_state = "cursed_blade" + toolspeed = 0.5 + +/obj/item/melee/sickly_blade/cursed/Initialize(mapload) + . = ..() + AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = ALL_ATTACK_TYPES) + +/obj/item/melee/sickly_blade/cursed/check_usability(mob/living/user) + if(!isliving(user)) + return FALSE + if(IS_HERETIC_OR_MONSTER(user) || IS_CULTIST(user)) + return TRUE + if(!ishuman(user)) + return FALSE + var/mob/living/carbon/human/human_mob = user + if(prob(15)) + to_chat(human_mob, SPAN_CULTLARGE("[pick("\"An untouched mind? Amusing.\"", "\" I suppose it isn't worth the effort to stop you.\"", "\"Go ahead. I don't care.\"", "\"You'll be mine soon enough.\"")]")) + human_mob.apply_damage(5, BURN, user.get_active_hand()) + playsound(src, 'sound/weapons/sear.ogg', 25, TRUE) + to_chat(human_mob, SPAN_DANGER("Your hand sizzles.")) // Nar nar might not care but their essence still doesn't like you + else if(prob(15)) + to_chat(human_mob, SPAN_HIEROPHANT("LW'NAFH'NAHOR UH'ENAH'YMG EPGOKA AH NAFL MGEMPGAH'EHYE")) + to_chat(human_mob, SPAN_DANGER("Horrible, unintelligible utterances flood your mind!")) + human_mob.apply_status_effect(/datum/status_effect/stacking/heretic_insanity, 2) + return TRUE + +/obj/item/melee/sickly_blade/cursed/equipped(mob/user, slot) + . = ..() + if(IS_HERETIC_OR_MONSTER(user)) + after_use_message = "The Mansus hears your call..." + else if(IS_CULTIST(user)) + after_use_message = "Nar'Sie hears your call..." + else + after_use_message = null + +/obj/item/melee/sickly_blade/cursed/interact_with_atom(atom/target, mob/living/user, list/modifiers) + . = ..() + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!heretic_datum) + return NONE + + // Can only carve runes with it if off combat mode. + if(isfloorturf(target) && user.a_intent == INTENT_HELP) + heretic_datum.try_draw_rune(user, target, drawing_time = 8 SECONDS) + return ITEM_INTERACT_COMPLETE + return NONE + +/obj/item/melee/sickly_blade/cursed/AltClick(mob/user) + . = ..() + if(IS_CULTIST(user)) + scribe_rune(user) diff --git a/code/modules/antagonists/heretic/items/heretic_necks.dm b/code/modules/antagonists/heretic/items/heretic_necks.dm new file mode 100644 index 00000000000..f7f95ff7c34 --- /dev/null +++ b/code/modules/antagonists/heretic/items/heretic_necks.dm @@ -0,0 +1,197 @@ +/obj/item/clothing/neck/heretic_focus + name = "amber focus" + desc = "An amber focusing glass that provides a link to the world beyond. The necklace seems to twitch, but only when you look at it from the corner of your eye." + icon_state = "eldritch_necklace" + resistance_flags = FIRE_PROOF + new_attack_chain = TRUE + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/neck.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/neck.dmi', + "Grey" = 'icons/mob/clothing/species/drask/neck.dmi', + ) + +/obj/item/clothing/neck/heretic_focus/Initialize(mapload) + . = ..() + AddElement(/datum/element/heretic_focus) + +/obj/item/clothing/neck/heretic_focus/crimson_medallion + name = "crimson medallion" + desc = "A blood-red focusing glass that provides a link to the world beyond, and worse. Its eye is constantly twitching and gazing in all directions. It almost seems to be silently screaming..." + icon_state = "crimson_medallion" + /// The aura healing component. Used to delete it when taken off. + var/datum/component/component + /// If active or not, used to add and remove its cult and heretic buffs. + var/active = FALSE + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/equipped(mob/living/user, slot) + . = ..() + if(!(slot & ITEM_SLOT_NECK)) + return + var/team_color = COLOR_PINK + if(IS_CULTIST(user)) + var/datum/action/innate/cult/blood_magic/magic_holder = locate() in user.actions + magic_holder.magic_enhanced = TRUE + team_color = COLOR_PURPLE //I was going to keep it cult red, then remebered the red cross exists + else if(IS_HERETIC_OR_MONSTER(user) && !active) + for(var/datum/spell/spell_action in user.mob_spell_list) + spell_action.cooldown_handler.recharge_duration *= 0.5 + active = TRUE + team_color = COLOR_GREEN + else + team_color = pick(COLOR_PURPLE, COLOR_GREEN) + + ADD_TRAIT(user, TRAIT_MANSUS_TOUCHED, UID()) + to_chat(user, SPAN_ALERT("Your heart takes on a strange yet soothing irregular rhythm, and your blood feels significantly less viscous than it used to be. You're not sure if that's a good thing.")) + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.physiology.bleed_mod *= 3 + component = user.AddComponent( \ + /datum/component/aura_healing, \ + range = 3, \ + brute_heal = 0.4, \ + burn_heal = 0.4, \ + blood_heal = 0.2, \ + suffocation_heal = 1, \ + simple_heal = 0.3, \ + requires_visibility = FALSE, \ + limit_to_trait = TRAIT_MANSUS_TOUCHED, \ + healing_color = team_color, \ + ) + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/dropped(mob/living/user) + . = ..() + + if(!istype(user)) + return + + if(HAS_TRAIT_FROM(user, TRAIT_MANSUS_TOUCHED, UID())) + to_chat(user, SPAN_NOTICE("Your heart and blood return to their regular old rhythm and flow.")) + + if(IS_HERETIC_OR_MONSTER(user) && active) + for(var/datum/spell/spell_action in user.mob_spell_list) + spell_action.cooldown_handler.recharge_duration *= 2 + active = FALSE + QDEL_NULL(component) + REMOVE_TRAIT(user, TRAIT_MANSUS_TOUCHED, UID()) + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.physiology.bleed_mod /= 3 + + // If boosted enable is set, to prevent false dropped() calls from repeatedly nuking the max spells. + var/datum/action/innate/cult/blood_magic/magic_holder = locate() in user.actions + // Remove the last spell if over new limit, as we will reduce our max spell amount. Done beforehand as it causes a index out of bounds runtime otherwise. + if(magic_holder?.magic_enhanced) + QDEL_NULL(magic_holder.spells[ENHANCED_BLOODCHARGE]) + magic_holder?.magic_enhanced = FALSE + + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/activate_self(mob/user) + if(..() || !isliving(user)) + return + var/mob/living/our_user = user + to_chat(our_user, SPAN_DANGER("You start tightly squeezing [src]...")) + if(!do_after(user, 1.25 SECONDS, src)) + return + to_chat(our_user, SPAN_DANGER("[src] explodes into a shower of gore and blood, drenching your arm. You can feel the blood seeping into your skin. You inmediately feel better, but soon, the feeling turns hollow as your veins itch.")) + new /obj/effect/gibspawner/generic(get_turf(src)) + var/heal_amt = our_user.adjustBruteLoss(-50) + our_user.adjustFireLoss( -(50 - abs(heal_amt)) ) // no double dipping + + our_user.reagents?.add_reagent("unholywater", rand(6, 10)) + our_user.reagents?.add_reagent("eldritch", rand(6, 10)) + qdel(src) + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/examine(mob/user) + . = ..() + + var/magic_dude + if(IS_CULTIST(user)) + . += SPAN_CULT("This focus will allow you to store one extra spell and halve the empowering time, alongside providing a small regenerative effect.") + magic_dude = TRUE + if(IS_HERETIC_OR_MONSTER(user)) + . += SPAN_NOTICE("This focus will halve your spell cooldowns, alongside granting a small regenerative effect to any nearby heretics or monsters, including you.") + magic_dude = TRUE + + if(magic_dude) + . += SPAN_CULT("You can also squeeze it to recover a large amount of health quickly, at a cost...") + +/obj/item/clothing/neck/eldritch_amulet + name = "warm eldritch medallion" + desc = "A strange medallion. Peering through the crystalline surface, the world around you melts away. You see your own beating heart, and the pulsing of a thousand others." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "eye_medalion" + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + /// A secondary clothing trait only applied to heretics. + var/heretic_only_trait = TRAIT_THERMAL_VISION + +/obj/item/clothing/neck/eldritch_amulet/Initialize(mapload) + . = ..() + AddElement(/datum/element/heretic_focus) + +/obj/item/clothing/neck/eldritch_amulet/equipped(mob/user, slot) + . = ..() + if(!(slot & ITEM_SLOT_NECK)) + return + if(!ishuman(user) || !IS_HERETIC_OR_MONSTER(user)) + return + + ADD_TRAIT(user, heretic_only_trait, "[CLOTHING_TRAIT]_[UID()]") + user.update_sight() + +/obj/item/clothing/neck/eldritch_amulet/dropped(mob/user) + . = ..() + REMOVE_TRAIT(user, heretic_only_trait, "[CLOTHING_TRAIT]_[UID()]") + user.update_sight() + +/obj/item/clothing/neck/eldritch_amulet/piercing + name = "piercing eldritch medallion" + desc = "A strange medallion. Peering through the crystalline surface, the light refracts into new and terrifying spectrums of color. You see yourself, reflected off cascading mirrors, warped into impossible shapes." + heretic_only_trait = TRAIT_XRAY_VISION + +// Cosmetic-only version +/obj/item/clothing/neck/fake_heretic_amulet + name = "religious icon" + desc = "A strange plastic medallion, which makes its wearer look like they're part of some cult." + icon_state = "eldritch_necklace" + + +// The amulet conversion tool used by moon heretics +/obj/item/clothing/neck/heretic_focus/moon_amulet + name = "moonlight amulet" + desc = "A piece of the mind, the soul and the moon. Gazing into it makes your head spin and hear whispers of laughter and joy." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "moon_amulette" + +/obj/item/clothing/neck/heretic_focus/moon_amulet/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user)) + return + . += SPAN_INFORMATION("Using this amulet on the ignorant will cause them to slowly lose their minds.") + . += SPAN_INFORMATION("Using this amulent on one who has lost their mind will cause them to go berserk.") + +/obj/item/clothing/neck/heretic_focus/moon_amulet/attack(mob/living/target, mob/living/user, params) + if(!ishuman(target)) + return . = ..() + var/mob/living/carbon/human/hit = target + if(!IS_HERETIC_OR_MONSTER(user)) + to_chat(user, SPAN_DANGER("You feel a presence watching you!")) + user.apply_status_effect(/datum/status_effect/stacking/heretic_insanity) + return + if(hit.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND)) + return + var/datum/antagonist/heretic/heretic = user.mind.has_antag_datum(/datum/antagonist/heretic) + var/datum/status_effect/stacking/insanity = hit.has_status_effect(/datum/status_effect/stacking/heretic_insanity) + if(!insanity || insanity.stacks < 14 || target == user) + hit.apply_status_effect(/datum/status_effect/stacking/heretic_insanity) + else + if(target.mind) + if(length(heretic.mindslaves) < heretic.mindslave_limit) + to_chat(user, SPAN_HIEROPHANT_WARNING("Their mind has bent to see the truth!")) + hit.apply_status_effect(/datum/status_effect/moon_converted) + add_attack_logs(user, target, "[target] was driven insane by [user]([src])") + log_game("[target] was driven insane by [user]") + else + to_chat(user, SPAN_HIEROPHANT_WARNING("We do not have the power to drive more beings mad!")) + else + to_chat(user, SPAN_HIEROPHANT_WARNING("This one cannot go mad.")) + return ..() diff --git a/code/modules/antagonists/heretic/items/hunter_rifle.dm b/code/modules/antagonists/heretic/items/hunter_rifle.dm new file mode 100644 index 00000000000..4bb6cb28ccc --- /dev/null +++ b/code/modules/antagonists/heretic/items/hunter_rifle.dm @@ -0,0 +1,198 @@ +/// The max range we can zoom in on people from. +#define MAX_LIONHUNTER_RANGE 30 + +// The Lionhunter, a gun for heretics +// The ammo it uses takes time to "charge" before firing, +// releasing a homing, very damaging projectile +/obj/item/gun/projectile/shotgun/boltaction/lionhunter + name = "\improper Lionhunter's Rifle" + desc = "An antique looking rifle that looks immaculate despite being clearly very old." + icon = 'icons/obj/weapons/wide_guns.dmi' + icon_state = "lionhunter" + inhand_icon_state = "lionhunter" + mag_type = /obj/item/ammo_box/magazine/internal/boltaction/lionhunter + fire_sound = 'sound/weapons/gunshots/gunshot_sniper.ogg' + pixel_x = -8 + +/obj/item/gun/projectile/shotgun/boltaction/lionhunter/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread) + . = ..() + SEND_SIGNAL(src, COMSIG_LIONHUNTER_FIRE) + +/obj/item/gun/projectile/shotgun/boltaction/lionhunter/Initialize(mapload) + . = ..() + AddComponent(/datum/component/scope, range_modifier = 3.2, flags = SCOPE_TURF_ONLY | SCOPE_NEED_ACTIVE_HAND, trait_to_add = TRAIT_THERMAL_VISION) + +/obj/item/ammo_box/magazine/internal/boltaction/lionhunter + name = "lionhunter rifle internal magazine" + icon_state = "310_strip" + ammo_type = /obj/item/ammo_casing/lionhunter + caliber = "a762-H" + max_ammo = 3 + multi_sprite_step = 1 + +/obj/item/ammo_casing/lionhunter + icon = 'icons/obj/ammo.dmi' + icon_state = "310-casing" + caliber = "a762-H" + projectile_type = /obj/projectile/homing/lionhunter + /// Whether we're currently aiming this casing at something + var/currently_aiming = FALSE + /// How many seconds it takes to aim per tile of distance between the target + var/seconds_per_distance = 0.2 SECONDS + /// The minimum distance required to gain a damage bonus from aiming + var/min_distance = 4 + +/obj/item/ammo_casing/lionhunter/fire(atom/target, mob/living/user, params, distro, quiet, zone_override = "", spread, atom/firer_source_atom) + if(!BB) + return + if(!check_fire(target, user)) + return + return ..() + +/// Checks if we can successfully fire our projectile. +/obj/item/ammo_casing/lionhunter/proc/check_fire(atom/target, mob/living/user) + // In case someone puts this in turrets or something wacky, just fire like normal + if(!iscarbon(user) || !istype(loc, /obj/item/ammo_box/magazine/internal/boltaction/lionhunter)) + return TRUE + + if(currently_aiming) + to_chat(user, SPAN_HIEROPHANT_WARNING("You are already aiming!")) + return FALSE + + var/distance = get_dist(user, target) + if(target.z != user.z || distance > MAX_LIONHUNTER_RANGE) + return FALSE + + var/fire_time = min(distance * seconds_per_distance, 10 SECONDS) + + if(distance <= min_distance || !isliving(target)) + return TRUE + + to_chat(user, SPAN_HIEROPHANT("Taking aim...")) + user.playsound_local(get_turf(user), 'sound/weapons/gun_interactions/rifle_load.ogg', 100, TRUE) + + var/image/reticle = image( + icon = 'icons/mob/actions/actions.dmi', + icon_state = "sniper_zoom", + layer = ABOVE_MOB_LAYER, + loc = target, + ) + reticle.alpha = 0 + + var/list/mob/viewers = viewers(target) + // The shooter might be out of view, but they should be included + viewers |= user + + for(var/mob/viewer as anything in viewers) + viewer.client?.images |= reticle + + // Animate the fade in + animate(reticle, fire_time * 0.5, alpha = 255, transform = turn(reticle.transform, 180)) + animate(reticle, fire_time * 0.5, transform = turn(reticle.transform, 180)) + + currently_aiming = TRUE + var/output = do_after(user, fire_time, target = target, extra_checks = list(CALLBACK(src, PROC_REF(check_fire_callback), target, user)), allow_moving_target = TRUE) + animate(reticle, 0.5 SECONDS, alpha = 0) + for(var/mob/viewer as anything in viewers) + viewer.client?.images -= reticle + if(!output) + currently_aiming = FALSE + to_chat(user, SPAN_HIEROPHANT_WARNING("You were interrupted!")) + return FALSE + + return TRUE + +/// Callback for the do_after within the check_fire proc to see if something will prevent us from firing while aiming +/obj/item/ammo_casing/lionhunter/proc/check_fire_callback(mob/living/target, mob/living/user) + if(!isturf(target.loc)) + return TRUE + + return FALSE + +/obj/item/ammo_casing/lionhunter/ready_proj(atom/target, mob/living/user, quiet, zone_override, atom/fired_from) + if(!BB) + return + + var/distance = get_dist(user, target) + // If we're close range, or the target's not a living, OR for some reason a non-carbon is firing the gun + // The projectile is dry-fired, and gains no buffs + // BUT, if we're at a decent range and the target's a living mob, + // the projectile's been channel fired. It has full effects and homes in. + if(distance > min_distance && isliving(target) && iscarbon(user)) + BB.stamina *= 2 + BB.knockdown = 0.5 SECONDS + BB.stutter = 6 SECONDS + BB.forcedodge = -1 + BB.armor_penetration_flat = 100 //No parrying this bad boy + if(istype(BB, /obj/projectile/homing/lionhunter)) + var/obj/projectile/homing/lionhunter/if_an_admin_var_edits_another_projectile_inside_an_ammo_casing_ill_be_very_mad = BB + if_an_admin_var_edits_another_projectile_inside_an_ammo_casing_ill_be_very_mad.homing_active = TRUE + + return ..() + +/obj/projectile/homing/lionhunter + name = "hunter's .310 bullet" + // These stats are only applied if the weapon is fired unscoped + // If fired without aiming or at someone too close, it will do this much + damage = 30 + stamina = 30 + homing_active = FALSE + ///The mob that is currently inside the bullet + var/mob/stored_mob + +/obj/projectile/homing/lionhunter/fire(angle, atom/direct_target) + . = ..() + if(QDELETED(src) || !isliving(firer) || !isliving(original)) + return + var/mob/living/living_firer = firer + if(IS_HERETIC(living_firer)) + living_firer.forceMove(src) + stored_mob = living_firer + + +/obj/projectile/homing/lionhunter/Exited(atom/movable/gone) + if(gone == stored_mob) + stored_mob = null + return ..() + +/obj/projectile/homing/lionhunter/on_range() + stored_mob?.forceMove(loc) + return ..() + +/obj/projectile/homing/lionhunter/on_hit(atom/target, blocked, pierce_hit) + . = ..() + if(target != original) + return + stored_mob?.forceMove(loc) //Pretty important to get our mob out of the bullet once we hit our target + var/mob/living/victim = target + var/mob/firing_mob = firer + if(IS_HERETIC_OR_MONSTER(victim) || !IS_HERETIC(firing_mob)) + qdel(src) + return + + SEND_SIGNAL(firer, COMSIG_LIONHUNTER_ON_HIT, victim) + qdel(src) + return + +/obj/projectile/homing/lionhunter/Destroy() + if(stored_mob) + stack_trace("Lionhunter bullet qdel'd with its firer still inside!") + stored_mob.forceMove(loc) + return ..() + +// Extra ammunition can be made with a heretic ritual. +/obj/item/ammo_box/lionhunter + name = "stripper clip (.310 hunter)" + desc = "A stripper clip of mysterious, atypical ammo. It doesn't fit into normal ballistic rifles." + icon_state = "310_strip" + ammo_type = /obj/item/ammo_casing/lionhunter + max_ammo = 3 + multi_sprite_step = 1 + +/obj/effect/temp_visual/bullet_target + icon = 'icons/mob/actions/actions.dmi' + icon_state = "sniper_zoom" + layer = BELOW_MOB_LAYER + light_range = 2 + +#undef MAX_LIONHUNTER_RANGE diff --git a/code/modules/antagonists/heretic/items/keyring.dm b/code/modules/antagonists/heretic/items/keyring.dm new file mode 100644 index 00000000000..6c1d67225a1 --- /dev/null +++ b/code/modules/antagonists/heretic/items/keyring.dm @@ -0,0 +1,235 @@ +/obj/effect/lock_portal + name = "crack in reality" + desc = "A crack in space, impossibly deep and painful to the eyes. Definitely not safe." + icon = 'icons/effects/eldritch.dmi' + icon_state = "realitycrack" + light_color = COLOR_GREEN + light_range = 3 + opacity = TRUE + ///The knock portal we teleport to + var/obj/effect/lock_portal/destination + ///The airlock we are linked to, we delete if it is destroyed + var/obj/machinery/door/our_airlock + /// if true the heretic is teleported to a random airlock, nonheretics are sent to the target + var/inverted = FALSE + +/obj/effect/lock_portal/Initialize(mapload, target, invert = FALSE) + . = ..() + if(target) + our_airlock = target + RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(delete_on_door_delete)) + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + inverted = invert + +///Deletes us and our destination portal if our_airlock is destroyed +/obj/effect/lock_portal/proc/delete_on_door_delete(datum/source) + SIGNAL_HANDLER + qdel(src) + +///Signal handler for when our location is entered, calls teleport on the victim, if their old_loc didnt contain a portal already (to prevent loops) +/obj/effect/lock_portal/proc/on_entered(datum/source, mob/living/loser, atom/old_loc) + SIGNAL_HANDLER + if(istype(loser) && !(locate(type) in old_loc)) + teleport(loser) + +/obj/effect/lock_portal/Destroy() + if(!isnull(destination) && !QDELING(destination)) + QDEL_NULL(destination) + + destination = null + our_airlock = null + return ..() + +///Teleports the teleportee, to a random airlock if the teleportee isnt a heretic, or the other portal if they are one +/obj/effect/lock_portal/proc/teleport(mob/living/teleportee) + if(isnull(destination)) //dumbass + qdel(src) + return + + if(!is_teleport_allowed(destination.z) || !is_teleport_allowed(z)) + qdel(src) + return + + //get it? + var/obj/machinery/door/doorstination = (inverted ? !IS_HERETIC_OR_MONSTER(teleportee) : IS_HERETIC_OR_MONSTER(teleportee)) ? destination.our_airlock : find_random_airlock() + if(SEND_SIGNAL(teleportee, COMSIG_MOVABLE_TELEPORTING, get_turf(doorstination)) & COMPONENT_BLOCK_TELEPORT) + return FALSE + teleportee.forceMove(get_turf(doorstination)) + + teleportee.client?.move_delay = 0 //make moving through smoother + + if(!IS_HERETIC_OR_MONSTER(teleportee)) + teleportee.apply_damage(20, BRUTE) //so they dont roll it like a jackpot machine to see if they can land in the armory + to_chat(teleportee, SPAN_USERDANGER("You stumble through [src], battered by forces beyond your comprehension, landing anywhere but where you thought you were going.")) + + INVOKE_ASYNC(src, PROC_REF(async_opendoor), doorstination) + +///Returns a random airlock on the same Z level as our portal, that isnt our airlock +/obj/effect/lock_portal/proc/find_random_airlock() + var/list/turf/possible_destinations = list() + for(var/obj/machinery/door/airlock/ourlock in GLOB.airlocks) + if(ourlock.z != z) + continue + if(ourlock.loc == loc) + continue + var/area/airlock_area = get_area(ourlock) + if(airlock_area.tele_proof) + continue + possible_destinations += ourlock + if(!length(possible_destinations)) + return + return pick(possible_destinations) + +///Asynchronous proc to unbolt, then open the passed door +/obj/effect/lock_portal/proc/async_opendoor(obj/machinery/door/door) + if(istype(door, /obj/machinery/door/airlock)) //they can create portals on ANY door, but we should unlock airlocks so they can actually open + var/obj/machinery/door/airlock/as_airlock = door + as_airlock.unlock(TRUE) + door.open() + +///An ID card capable of shapeshifting to other IDs given by the Key Keepers Burden knowledge +/obj/item/card/id/heretic + can_id_flash = FALSE + ///List of IDs this card consumed + var/list/obj/item/card/id/fused_ids = list() + ///The first portal in the portal pair, so we can clear it later + var/obj/effect/lock_portal/portal_one + ///The second portal in the portal pair, so we can clear it later + var/obj/effect/lock_portal/portal_two + ///The first door we are linking in the pair, so we can create a portal pair + var/link + /// are our created portals inverted? (heretics get sent to a random airlock, crew get sent to the target) + var/inverted = FALSE + +/obj/item/card/id/heretic/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user)) + return + . += SPAN_HIEROPHANT("Enchanted by the Mansus!") + . += SPAN_HIEROPHANT("Using an ID on this or using this ID on another ID will consume it and allow you to copy its accesses.") + . += SPAN_HIEROPHANT("Using this in-hand allows you to change its appearance.") + . += SPAN_HIEROPHANT("Using this on a pair of doors, allows you to link them together. Entering one door will transport you to the other, while heathens are instead teleported to a random airlock.") + . += SPAN_HIEROPHANT("Ctrl-clicking the ID, makes the ID make inverted portals instead, which teleport you onto a random airlock onstation, while heathens are teleported to the destination.") + +/obj/item/card/id/heretic/activate_self(mob/user) + if(..()) + return + if(!IS_HERETIC(user)) + return flash_card() + if(!length(fused_ids)) + to_chat(user, SPAN_HIEROPHANT("There is no ID to shapeshift into!")) + return ..() + var/cardname = tgui_input_list(user, "Shapeshift into?", "Shapeshift", fused_ids) + if(!cardname) + to_chat(user, SPAN_HIEROPHANT("You decide not to shapeshift the id.")) + return ..() + var/obj/item/card/id/card = fused_ids[cardname] + shapeshift(card) + +/obj/item/card/id/heretic/CtrlClick(mob/user) + . = ..() + if(loc != user) // Not being held + return + if(!IS_HERETIC(user)) + return + inverted = !inverted + to_chat(user, SPAN_HIEROPHANT("[inverted ? "now" : "no longer"] creating inverted rifts.")) + +///Changes our appearance to the passed ID card +/obj/item/card/id/heretic/proc/shapeshift(obj/item/card/id/card) + icon_state = card.icon_state + assignment = card.assignment + age = card.age + sex = card.sex + registered_name = card.registered_name + name = card.name + photo = card.photo + dat = card.dat + blood_type = card.blood_type + dna_hash = card.dna_hash + fingerprint_hash = card.fingerprint_hash + rank = card.rank + update_icon() + +///Deletes and nulls our portal pair +/obj/item/card/id/heretic/proc/clear_portals() + QDEL_NULL(portal_one) + QDEL_NULL(portal_two) + +///Clears portal references +/obj/item/card/id/heretic/proc/clear_portal_refs() + SIGNAL_HANDLER + portal_one = null + portal_two = null + +///Creates a portal pair at door1 and door2, displays a balloon alert to user +/obj/item/card/id/heretic/proc/make_portal(mob/user, obj/machinery/door/door1, obj/machinery/door/door2) + var/message = "Door linked" + if(portal_one || portal_two) + clear_portals() + message += ", previous cleared" + + portal_one = new(get_turf(door2), door2, inverted) + portal_two = new(get_turf(door1), door1, inverted) + portal_one.destination = portal_two + RegisterSignal(portal_one, COMSIG_PARENT_QDELETING, PROC_REF(clear_portal_refs)) //we only really need to register one because they already qdel both portals if one is destroyed + portal_two.destination = portal_one + to_chat(user, SPAN_HIEROPHANT("[message].")) + +/obj/item/card/id/heretic/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(!istype(tool, /obj/item/card/id) || !IS_HERETIC(user)) + return ..() + eat_card(tool, user) + return ITEM_INTERACT_COMPLETE + +/obj/item/card/id/heretic/proc/eat_card(obj/item/card/id/card, mob/user) + if(card == src) + return //no self vore + if(!ishuman(user)) + return + var/mob/living/carbon/human/human_user = user + if(human_user.wear_id == card) + to_chat(user, SPAN_WARNING("Take the card off first!")) + return + fused_ids[card.name] = card + card.forceMove(get_turf(user)) + card.moveToNullspace() + playsound(drop_location(), 'sound/items/eatfood.ogg', rand(10,30), TRUE) + access += card.access + +/obj/item/card/id/heretic/interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!IS_HERETIC(user)) + return NONE + if(istype(target, /obj/item/card/id)) + eat_card(target, user) + return ITEM_INTERACT_COMPLETE + if(istype(target, /obj/effect/lock_portal)) + clear_portals() + return ITEM_INTERACT_COMPLETE + if(!istype(target, /obj/machinery/door)) + return NONE + if(!is_teleport_allowed(z)) + return NONE + var/reference_resolved = locateUID(link) + if(reference_resolved == target) + return ITEM_INTERACT_COMPLETE + + if(reference_resolved) + make_portal(user, reference_resolved, target) + to_chat(user, SPAN_NOTICE("You use [src], to link [reference_resolved] and [target] together.")) + link = null + to_chat(user, SPAN_HIEROPHANT("Link 2/2.")) + else + link = target.UID() + to_chat(user, SPAN_HIEROPHANT("Link 1/2.")) + return ITEM_INTERACT_COMPLETE + +/obj/item/card/id/heretic/Destroy() + QDEL_LIST_ASSOC(fused_ids) + link = null + clear_portals() + return ..() diff --git a/code/modules/antagonists/heretic/items/labyrinth_handbook.dm b/code/modules/antagonists/heretic/items/labyrinth_handbook.dm new file mode 100644 index 00000000000..ce3d92a2edf --- /dev/null +++ b/code/modules/antagonists/heretic/items/labyrinth_handbook.dm @@ -0,0 +1,73 @@ +/obj/effect/forcefield/wizard/heretic + name = "labyrinth pages" + desc = "A field of papers flying in the air, repulsing heathens with impossible force." + icon_state = "lintel" + lifetime = 10 SECONDS + +/obj/effect/forcefield/wizard/heretic/Bumped(mob/living/bumpee) + . = ..() + if(!istype(bumpee) || IS_HERETIC_OR_MONSTER(bumpee)) + return + var/throwtarget = get_edge_target_turf(loc, get_dir(loc, get_step_away(bumpee, loc))) + bumpee.throw_at(throwtarget, 10, 1) + visible_message(SPAN_DANGER("[src] repulses [bumpee] in a storm of paper!")) + +///A heretic item that spawns a barrier at the clicked turf, 3 uses +/obj/item/heretic_labyrinth_handbook + name = "labyrinth handbook" + desc = "A book containing the laws and regulations of the Locked Labyrinth, penned on an unknown substance. Its pages squirm and strain, looking to lash out and escape." + icon = 'icons/obj/library.dmi' + icon_state = "heretichandbook" + force = 10 + damtype = BURN + throw_speed = 1 + throw_range = 5 + attack_verb = list("bashes", "curses") + resistance_flags = FLAMMABLE + drop_sound = 'sound/items/handling/book_drop.ogg' + pickup_sound = 'sound/items/handling/book_pickup.ogg' + new_attack_chain = TRUE + ///what type of barrier do we spawn when used + var/barrier_type = /obj/effect/forcefield/wizard/heretic + ///how many uses do we have left + var/uses = 3 + +/obj/item/heretic_labyrinth_handbook/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user)) + return + . += SPAN_HIEROPHANT_WARNING("Materializes a barrier upon any tile in sight, which only you can pass through. Lasts 8 seconds.") + . += SPAN_HIEROPHANT_WARNING("It has [uses] uses left.") + +/obj/item/heretic_labyrinth_handbook/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!IS_HERETIC(user)) + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + to_chat(human_user, SPAN_USERDANGER(">Your mind burns as you stare deep into the book, a headache setting in like your brain is on fire!")) + human_user.adjustBrainLoss(30) + human_user.drop_item() + return ITEM_INTERACT_COMPLETE + + var/turf/turf_target = get_turf(target) + if(locate(barrier_type) in turf_target) + to_chat(user, SPAN_WARNING("This turf already has a barrier!")) + return ITEM_INTERACT_COMPLETE + turf_target.visible_message(SPAN_WARNING("A storm of paper materializes!")) + new /obj/effect/temp_visual/paper_scatter(turf_target) + playsound(turf_target, 'sound/magic/smoke.ogg', 30) + new barrier_type(turf_target, user) + uses-- + if(uses <= 0) + to_chat(user, SPAN_WARNING("[src] falls apart, turning into ash and dust!")) + qdel(src) + return ITEM_INTERACT_COMPLETE + + +//fancy effects +/obj/effect/temp_visual/paper_scatter + name = "scattering paper" + desc = "Pieces of paper scattering to the wind." + layer = ABOVE_NORMAL_TURF_LAYER + icon_state = "paper_scatter" + duration = 0.5 SECONDS + randomdir = FALSE diff --git a/code/modules/antagonists/heretic/items/madness_mask.dm b/code/modules/antagonists/heretic/items/madness_mask.dm new file mode 100644 index 00000000000..28905d0624a --- /dev/null +++ b/code/modules/antagonists/heretic/items/madness_mask.dm @@ -0,0 +1,104 @@ +// The spooky "void" / "abyssal" / "madness" mask for heretics. +/obj/item/clothing/mask/madness_mask + name = "abyssal mask" + desc = "A mask created from suffering. When you look into its eyes, it looks back." + icon_state = "mad_mask" + inhand_icon_state = null + flags = AIRTIGHT + flags_cover = MASKCOVERSEYES + flags_inv = HIDEEARS|HIDEEYES|HIDEFACE + flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES + ///Who is wearing this + var/mob/living/carbon/human/local_user + sprite_sheets = list( + "Vox" = 'icons/mob/clothing/species/vox/mask.dmi', + "Drask" = 'icons/mob/clothing/species/drask/mask.dmi', + "Kidan" = 'icons/mob/clothing/species/kidan/mask.dmi', + "Grey" = 'icons/mob/clothing/species/grey/mask.dmi', + "Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/mask.dmi', + ) + var/time_to_insanity = 15 SECONDS + COOLDOWN_DECLARE(insanity_gain) + +/obj/item/clothing/mask/madness_mask/Destroy() + local_user = null + return ..() + +/obj/item/clothing/mask/madness_mask/examine(mob/user) + . = ..() + if(IS_HERETIC_OR_MONSTER(user)) + . += SPAN_NOTICE("Actively drains the sanity and stamina of nearby non-heretics when worn.") + . += SPAN_NOTICE("If forced onto the face of a non-heretic, they will be unable to remove it willingly.") + else + . += SPAN_DANGER("The eyes fill you with dread... You best avoid it.") + +/obj/item/clothing/mask/madness_mask/equipped(mob/user, slot) + . = ..() + if(!(slot & ITEM_SLOT_MASK)) + return + if(!ishuman(user) || !user.mind) + return + + local_user = user + START_PROCESSING(SSobj, src) + COOLDOWN_START(src, insanity_gain, time_to_insanity) + + if(IS_HERETIC_OR_MONSTER(user)) + return + + flags |= NODROP + to_chat(user, SPAN_USERDANGER("[src] clamps tightly to your face as you feel your soul draining away!")) + +/obj/item/clothing/mask/madness_mask/dropped(mob/M) + local_user = null + STOP_PROCESSING(SSobj, src) + flags &= ~NODROP + return ..() + +/obj/item/clothing/mask/madness_mask/process() + if(!local_user) + return PROCESS_KILL + + if(IS_HERETIC_OR_MONSTER(local_user) && (flags & NODROP)) + flags &= ~NODROP + + local_user.AdjustJitter(10 SECONDS, 10 SECONDS, 30 SECONDS) + + if(!IS_HERETIC_OR_MONSTER(local_user)) + if(COOLDOWN_FINISHED(src, insanity_gain)) + COOLDOWN_START(src, insanity_gain, time_to_insanity) + local_user.apply_status_effect(/datum/status_effect/stacking/heretic_insanity) + if(prob(1)) + local_user.AdjustDizzy(30 SECONDS) + local_user.Paralyse(5 SECONDS) + local_user.AdjustJitter(2000 SECONDS) + local_user.adjustStaminaLoss(60) + local_user.emote("laugh") + local_user.visible_message("[local_user] falls to the ground and cackles uncontrollably!") + addtimer(CALLBACK(src, PROC_REF(undo_jitter)), 5 SECONDS) + + for(var/mob/living/carbon/human/human_in_range in view(local_user)) + if(IS_HERETIC_OR_MONSTER(human_in_range) || HAS_TRAIT(human_in_range, TRAIT_BLIND)) + continue + + if(human_in_range.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND)) + continue + + if(human_in_range == local_user) + continue + + if(prob(60)) + human_in_range.SetHallucinate(30 SECONDS) + + if(prob(40)) + human_in_range.AdjustJitter(10 SECONDS, 10 SECONDS, 1 MINUTES) + + if(human_in_range.getStaminaLoss() <= 85 && prob(30)) + human_in_range.emote(pick("giggle", "laugh")) + human_in_range.adjustStaminaLoss(10) + + if(prob(25)) + human_in_range.AdjustDizzy(10 SECONDS) + +/obj/item/clothing/mask/madness_mask/proc/undo_jitter() + local_user.SetJitter(1 MINUTES) diff --git a/code/modules/antagonists/heretic/items/unfathomable_curio.dm b/code/modules/antagonists/heretic/items/unfathomable_curio.dm new file mode 100644 index 00000000000..055474d192a --- /dev/null +++ b/code/modules/antagonists/heretic/items/unfathomable_curio.dm @@ -0,0 +1,89 @@ +//Item for knock/moon heretic sidepath, it can block 5 hits of damage, acts as storage and if the heretic is examined the examiner suffers brain damage and blindness + +/obj/item/storage/belt/unfathomable_curio + name = "Unfathomable Curio" + desc = "It. It looks backs. It looks past. It looks in. It sees. It hides. It opens." + icon_state = "unfathomable_curio" + inhand_icon_state = "unfathomable_curio" + drop_sound = 'sound/items/handling/toolbelt_drop.ogg' + pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg' + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = 21 + can_hold = list( + /obj/item/ammo_box/lionhunter, + /obj/item/heretic_labyrinth_handbook, + /obj/item/clothing/neck/eldritch_amulet, + /obj/item/clothing/neck/heretic_focus, + /obj/item/codex_cicatrix, + /obj/item/eldritch_potion, + /obj/item/food/grown/poppy, // Used to regain a Living Heart. + /obj/item/food/grown/harebell, // Used to reroll targets + /obj/item/melee/rune_carver, + /obj/item/melee/sickly_blade, + /obj/item/organ, // Organs are also often used in rituals. + /obj/item/reagent_containers/drinks/bottle/eldritch, + /obj/item/stack/sheet/glass, // Glass is often used by moon heretics + ) + //Vars used for the shield component + var/heretic_shield_icon = "unfathomable_shield" + var/max_charges = 1 + var/recharge_start_delay = 30 SECONDS + var/charge_increment_delay = 30 SECONDS + var/charge_recovery = 1 + +/obj/item/storage/belt/unfathomable_curio/Initialize(mapload) + . = ..() + + AddComponent(/datum/component/shielded, max_charges = max_charges, recharge_start_delay = recharge_start_delay, charge_increment_delay = charge_increment_delay, \ + charge_recovery = charge_recovery, shield_icon = heretic_shield_icon, run_hit_callback = CALLBACK(src, PROC_REF(shield_damaged))) + + +/obj/item/storage/belt/unfathomable_curio/equipped(mob/user, slot, initial) + . = ..() + if(!(slot & slot_flags)) + return + + RegisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS, PROC_REF(shield_reaction)) + + if(!IS_HERETIC(user)) + to_chat(user, SPAN_WARNING("The curio wraps around you, and you feel the beating of something dark inside it...")) + +/obj/item/storage/belt/unfathomable_curio/dropped(mob/user) + . = ..() + UnregisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS) + +// Here we make sure our curio is only able to block while worn on the belt slot +/obj/item/storage/belt/unfathomable_curio/proc/shield_reaction(mob/living/carbon/human/owner, + atom/movable/hitby, + attack_text = "the attack", + final_block_chance = 0, + damage = 0, + attack_type = MELEE_ATTACK, + damage_type = BRUTE +) + SIGNAL_HANDLER + + if(hit_reaction(owner, hitby, attack_text, 0, damage, attack_type) && (owner.belt == src)) + return TRUE + return NONE + +// Our on hit effect +/obj/item/storage/belt/unfathomable_curio/proc/shield_damaged(mob/living/carbon/wearer, attack_text, new_current_charges) + wearer.visible_message(SPAN_DANGER("[wearer]'s veil makes [attack_text] miss, but the force behind the blow causes it to disperse!")) + if(IS_HERETIC(wearer)) + return + + to_chat(wearer, SPAN_WARNING("Laughter echoes in your mind....")) + wearer.adjustBrainLoss(80) + + +/obj/item/storage/belt/unfathomable_curio/examine(mob/living/carbon/user) + . = ..() + if(IS_HERETIC(user)) + return + + user.adjustBrainLoss(10) + user.EyeBlind(5 SECONDS) + . += SPAN_NOTICE("It. It looked. IT WRAPS ITSELF AROUND ME.") + + diff --git a/code/modules/antagonists/heretic/items/unsealed_arts.dm b/code/modules/antagonists/heretic/items/unsealed_arts.dm new file mode 100644 index 00000000000..d796886bd2e --- /dev/null +++ b/code/modules/antagonists/heretic/items/unsealed_arts.dm @@ -0,0 +1,332 @@ +/obj/structure/unsealed_art + name = "Unsealed Art" + desc = "A painting of unfathomable madness. Such a piece will never let down those who refuse to desert its wisdom." + icon = 'icons/obj/antags/unsealed_arts.dmi' + icon_state = "debug" + pass_flags_self = LETPASSTHROW + max_integrity = 200 + layer = ABOVE_LYING_MOB_LAYER + armor = list(MELEE = 50, BULLET = 30, LASER = 0, ENERGY = 0, BOMB = 0, RAD = INFINITY, FIRE = 0, ACID = 0) + /// is the painting curredly draped over + var/covered = FALSE + +/obj/structure/unsealed_art/Initialize(mapload) + . = ..() + START_PROCESSING(SSprocessing, src) + +/obj/structure/unsealed_art/Destroy() + STOP_PROCESSING(SSprocessing, src) + if(covered) + new /obj/item/stack/sheet/cloth(loc, 3) + return ..() + +/obj/structure/unsealed_art/process() + return + +/obj/structure/unsealed_art/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(..()) + return + if(istype(used, /obj/item/stack/sheet/cloth)) + var/obj/item/stack/sheet/cloth/coverings = used + if(coverings.amount >= 3) + if(do_after_once(user, 3 SECONDS, TRUE, src, TRUE, FALSE)) + on_cover() + else + to_chat(user, SPAN_WARNING("You need at least 3 sheets of cloth to cover this!")) + return ITEM_INTERACT_COMPLETE + return ..() + +/obj/structure/unsealed_art/attack_hand(mob/living/user) + if(..()) + return + if(covered) + if(do_after_once(user, 3 SECONDS, TRUE, src, TRUE, FALSE)) + on_uncover() + return FINISH_ATTACK + +/obj/structure/unsealed_art/wrench_act(mob/living/user, obj/item/I) + . = ..() + default_unfasten_wrench(user, I, 3 SECONDS) + +/// This proc triggers when the art has been covered by sheets, going inert +/obj/structure/unsealed_art/proc/on_cover() + covered = TRUE + icon_state = "covered" + STOP_PROCESSING(SSprocessing, src) + +/// This proc triggers when the art has been uncovered by sheets, becomming active again +/obj/structure/unsealed_art/proc/on_uncover() + covered = FALSE + icon_state = initial(icon_state) + START_PROCESSING(SSprocessing, src) + +// MARK: Beauty +/obj/structure/unsealed_art/beauty + name = "\improper Lady of the Gates" + desc = "A painting of an otherworldly being. Its thin, porcelain-coloured skin is stretched tight over its strange bone structure. It has a haunting beauty that you cant keep your eyes from." + icon_state = "beauty" + var/mob/camera/eye/beauty/eyeobj + var/mob/living/carbon/charmed_creature + /// Is the painting currently enchanting someone + var/enchanting = FALSE + +/obj/structure/unsealed_art/beauty/examine_more(mob/user) + . = ..() + . += "This unsealed art will bewitch any non-heretic that lays their eyes on it, forcing them to stare deeply upon its beauty. They cannot look away. 7 || charmed_creature.stat == DEAD) + disenchant(charmed_creature) + return + for(var/mob/living/carbon/creature in range(7, loc)) + if(is_ai(creature)) + continue + if(creature.stat == DEAD) + continue + if(HAS_TRAIT(creature, TRAIT_ANTIMAGIC)) + continue + if(IS_HERETIC(creature)) + continue + if(creature.mind && creature.client) + if(isInSight(creature, src) && creature.stat != DEAD) + INVOKE_ASYNC(src, PROC_REF(pre_enchant), creature) + break + +/obj/structure/unsealed_art/beauty/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change) + . = ..() + if(eyeobj) + eyeobj.loc = loc + +/obj/structure/unsealed_art/beauty/proc/pre_enchant(mob/living/carbon/creature) + enchanting = TRUE + to_chat(creature, SPAN_DANGER("You can feel the painting pulling your gaze to it!")) + creature.SetDizzy(3 MINUTES) + creature.playsound_local(creature, 'sound/effects/curse/curse1.ogg', 30, FALSE) + sleep(3 SECONDS) + enchanting = FALSE + creature.SetDizzy(0) + if(isInSight(creature, src) && creature.stat != DEAD) + enchant(creature) + else + to_chat(creature, SPAN_WARNING("You can feel your gaze return to normal.")) + +/obj/structure/unsealed_art/beauty/proc/enchant(mob/living/carbon/creature) + to_chat(creature, SPAN_HIEROPHANT_WARNING("She's so beautiful. You can't look away!")) + eyeobj = new /mob/camera/eye/beauty(loc, "Enchanted Eyes", src, creature) + eyeobj.see_in_dark = creature.see_in_dark + charmed_creature = creature + +/obj/structure/unsealed_art/beauty/proc/disenchant() + to_chat(charmed_creature, SPAN_WARNING("You can feel your gaze return to normal.")) + charmed_creature = null + QDEL_NULL(eyeobj) + +/mob/camera/eye/beauty + sight = SEE_BLACKNESS + static_visibility_range = 0 + +/mob/camera/eye/beauty/give_control(mob/new_user) + . = ..() + user.remote_control = null + +/mob/camera/eye/beauty/relaymove(mob/user, direct) // no moving + return + +/mob/camera/eye/beauty/update_visibility() + return + +// MARK: Weeping +/obj/structure/unsealed_art/weeping + name = "\improper He Who Wept" + desc = "A beautiful painting depicting a fair lady sitting beside Him. He weeps. You will see him again." + icon_state = "weeping" + +/obj/structure/unsealed_art/weeping/examine_more(mob/user) + . = ..() + . += SPAN_NOTICE("This unsealed art will overwhelm non-heretics with grief for him. They will lose the strength to stand, collapsing to the floor.") + +/obj/structure/unsealed_art/weeping/process() + for(var/mob/living/carbon/human/creature in range(7, loc)) + if(IS_HERETIC(creature)) + continue + if(HAS_TRAIT(creature, TRAIT_ANTIMAGIC)) + continue + if(!isInSight(creature, src) || creature.stat == DEAD) + continue + + creature.SetDizzy(2 MINUTES) + creature.AdjustConfused(20 SECONDS, 20 SECONDS, 3 MINUTES) + if(prob(10)) + to_chat(creature, SPAN_NOTICE("You feel an overwhelming crushing grief!")) + continue + if(prob(10)) + creature.custom_emote(EMOTE_VISIBLE, "weeps uncontrollably", FALSE) + if(creature.get_confusion() >= 1 MINUTES && prob(15)) + to_chat(creature, SPAN_DANGER("You are completely overcome with grief!")) + creature.KnockDown(4 SECONDS) + continue + +GLOBAL_LIST_INIT(blacklisted_vine_turfs, typecacheof(list( + /turf/simulated/floor/grass/jungle, + /turf/simulated/floor/lava, + /turf/simulated/floor/chasm + ))) + +// MARK: Vines +/obj/structure/unsealed_art/vines + name = "\improper Great Chaparral Over Rolling Hills" + desc = "A painting depicting a massive green thicket, spanning over several hills. This painting is lush with purest life, and seems to strain against its frame." + icon_state = "vines" + /// the delay between terf conversions and mob creation + var/delay = 4 SECONDS + /// how many creatures do we own + var/creatures_owned = 0 + /// What kinds of creatures can we spawn? + var/list/creature_list = list() + + COOLDOWN_DECLARE(time_to_convert) + +/obj/structure/unsealed_art/vines/Initialize(mapload) + . = ..() + for(var/mob in subtypesof(/mob/living/basic)) // we only want basic mobs to modify their controller + var/mob/living/basic/basic_mob = mob + if(initial(basic_mob.gold_core_spawnable) == FRIENDLY_SPAWN) + creature_list += basic_mob + +/obj/structure/unsealed_art/vines/examine_more(mob/user) + . = ..() + . += SPAN_NOTICE("This unsealed art will bring forth purest life, converting all around it into lush greenery. All unlightened beware, the creatures birthed forth are hungry.") + +/obj/structure/unsealed_art/vines/process() + if(!COOLDOWN_FINISHED(src, time_to_convert)) + return + + COOLDOWN_START(src, time_to_convert, delay) + var/list/validturfs = list() + var/list/vineturfs = list() + for(var/turf/simulated/floor/T in circleviewturfs(src, 7)) + if(istype(T, /turf/simulated/floor/grass/jungle) && !T.density) + vineturfs |= T + continue + if(is_type_in_typecache(T, GLOB.blacklisted_pylon_turfs)) + continue + else + validturfs |= T + + var/turf/T = safepick(validturfs) + if(isfloorturf(T)) + T.ChangeTurf(/turf/simulated/floor/grass/jungle) + + if(creatures_owned >= 5) // only 5 creatures allowed max + return + var/creature_chance = 15 / (creatures_owned + 1) + if(length(vineturfs) && prob(creature_chance)) + var/turf/V = safepick(vineturfs) + var/chosen_mob = pick(creature_list) + var/mob/living/basic/spawned_mob = new chosen_mob(V) + creatures_owned++ + spawned_mob.visible_message("[spawned_mob] grows out of the grass flooring, knit together from the plant fibers!") + spawned_mob.faction = list("heretic") + spawned_mob.maxHealth = 60 + spawned_mob.health = 60 + spawned_mob.melee_damage_lower = 4 + spawned_mob.melee_damage_upper = 8 + spawned_mob.melee_attack_cooldown_min = 1 SECONDS + spawned_mob.melee_attack_cooldown_max = 1.5 SECONDS + spawned_mob.environment_smash = ENVIRONMENT_SMASH_STRUCTURES + spawned_mob.ai_controller = new /datum/ai_controller/basic_controller/simple/simple_hostile_obstacles(spawned_mob) + spawned_mob.density = TRUE + RegisterSignal(spawned_mob, COMSIG_MOB_DEATH, PROC_REF(on_mob_death)) + +/obj/structure/unsealed_art/vines/proc/on_mob_death() + creatures_owned-- + COOLDOWN_START(src, time_to_convert, 20 SECONDS) // if a mob dies, stop spawning for a bit + +// MARK: Desire +/obj/structure/unsealed_art/desire + name = "\improper The First Desire" + desc = "A painting of an elaborate feast. Despite being made entirely of rotting meat and decaying organs, the meal somehow looks incredibly appetising." + icon_state = "desire" + var/hunger_threshold = NUTRITION_LEVEL_HUNGRY + var/list/sick_messages = list( + SPAN_WARNING("Your stomach feels tied up in knots."), + SPAN_WARNING("You feel sick to your stomach."), + SPAN_WARNING("You feel incredibly nauseous."), + SPAN_WARNING("You feel like you could vomit at any moment!"), + SPAN_WARNING("The food on that painting looks absolutely delicious."), + SPAN_WARNING("You cant stop looking at how delicious the painting's food it, even though the contents make you feel sick!"), + ) + +/obj/structure/unsealed_art/desire/examine_more(mob/user) + . = ..() + . += SPAN_NOTICE("This unsealed art fills the unenlightened with the temptation of the first desire. Their hunger will never be sated in its presence, and will reject the gifts of the feast violently.") + +/obj/structure/unsealed_art/desire/process() + for(var/mob/living/carbon/human/creature in range(7, loc)) + if(IS_HERETIC(creature)) + if(creature.nutrition <= hunger_threshold) + creature.adjust_nutrition(15) + if(prob(5)) + to_chat(creature, SPAN_NOTICE("Your hunger feels sated.")) + continue + if(HAS_TRAIT(creature, TRAIT_ANTIMAGIC)) + continue + if(!isInSight(creature, src) || creature.stat == DEAD) + continue + + creature.AdjustConfused(5 SECONDS, 10 SECONDS, 1 MINUTES) + creature.adjust_nutrition(-5) + + if(creature.get_confusion() <= 20 SECONDS) + return + if(prob(10)) + to_chat(creature, pick(sick_messages)) + if(prob(5)) + creature.vomit(-10, TRUE, FALSE, 2, FALSE) + var/turf/T = get_step(creature.loc, creature.dir) + var/obj/meat = new /obj/item/food/meat(T) + meat.name = "rotten meat" + creature.visible_message(SPAN_WARNING("[creature] vomits up rotten meat and decayed organs!"), SPAN_WARNING("You vomit up rotten meat and decayed organs!")) + +// MARK: Rust +/obj/structure/unsealed_art/rust + name = "\improper Master of the Rusted Mountain" + desc = "A painting of a strange being climbing a rust-coloured mountain. The brushwork is unnatural and unnerving." + icon_state = "rust" + var/cooldown_delay = 3 SECONDS + COOLDOWN_DECLARE(time_to_rust) + +/obj/structure/unsealed_art/rust/examine_more(mob/user) + . = ..() + . += SPAN_NOTICE("This unsealed art brings reminds the world around it of its fate, bringing all to its final decayed destination.") + +/obj/structure/unsealed_art/rust/process() + if(!COOLDOWN_FINISHED(src, time_to_rust)) + return + + var/list/validturfs = list() + for(var/turf/simulated/T in circleviewturfs(src, 7)) + validturfs += T + + var/turf/chosen_turf = safepick(validturfs) + if(chosen_turf) + if(istype(chosen_turf, /turf/simulated/floor/plating/rust)) + for(var/mob/living/mob in chosen_turf) + if(IS_HERETIC(mob)) + continue + mob.do_rust_heretic_act(chosen_turf) + playsound(chosen_turf, 'sound/items/welder.ogg', 30, TRUE) + if(!HAS_TRAIT(chosen_turf, TRAIT_RUSTY)) + chosen_turf.rust_heretic_act() + COOLDOWN_START(src, time_to_rust, cooldown_delay) diff --git a/code/modules/antagonists/heretic/knife_effect.dm b/code/modules/antagonists/heretic/knife_effect.dm new file mode 100644 index 00000000000..29fdd3a405e --- /dev/null +++ b/code/modules/antagonists/heretic/knife_effect.dm @@ -0,0 +1,16 @@ +// "Floating ghost blade" effect for blade heretics +/obj/effect/floating_blade + name = "knife" + icon = 'icons/effects/eldritch.dmi' + icon_state = "dio_knife" + layer = 3.75 + /// The color the knife glows around it. + var/glow_color = "#ececff" + +/obj/effect/floating_blade/Initialize(mapload) + . = ..() + add_filter("dio_knife", 2, list("type" = "outline", "color" = glow_color, "size" = 1)) + +/obj/effect/floating_blade/haunted + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "render" diff --git a/code/modules/antagonists/heretic/knowledge/_heretic_paths.dm b/code/modules/antagonists/heretic/knowledge/_heretic_paths.dm new file mode 100644 index 00000000000..a53fe01b140 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/_heretic_paths.dm @@ -0,0 +1,203 @@ +//Global typecache of all heretic knowledges -> instantiate the tree columns -> make them link themselves -> replace the old heretic stuff + +//heretic research tree is a directional graph so we can use some basic graph stuff to make internally handling it easier +GLOBAL_LIST(heretic_research_tree) + +//HKT = Heretic Knowledge Tree (Heretic Research Tree :3) these objects really only exist for a short period of time at startup and then get deleted +/datum/heretic_knowledge_tree_column + ///Route that symbolizes what path this is + var/route + ///Used to determine if this is a side path or a main path + var/abstract_parent_type = /datum/heretic_knowledge_tree_column + ///IDs od neighbours (to left and right) + var/neighbour_type_left + var/neighbour_type_right + ///Tier1 knowledge (or knowledges) + var/tier1 + ///Tier2 knowledge (or knowledges) + var/tier2 + ///Tier3 knowledge (or knowledges) + var/tier3 + ///UI background + var/ui_bgr = "node_side" + +/datum/heretic_knowledge_tree_column/main + abstract_parent_type = /datum/heretic_knowledge_tree_column/main + + ///Starting knowledge - first thing you pick + var/start + ///Grasp upgrade + var/grasp + ///Mark upgrade + var/mark + ///Unique ritual of knoweldge + var/ritual_of_knowledge + ///Path specific unique ability + var/unique_ability + ///Blade upgrade + var/blade + ///Ascension + var/ascension + +/proc/generate_heretic_research_tree() + var/list/heretic_research_tree = list() + + //Initialize the data structure + for(var/type in subtypesof(/datum/heretic_knowledge)) + heretic_research_tree[type] = list() + heretic_research_tree[type][HKT_NEXT] = list() + heretic_research_tree[type][HKT_BAN] = list() + heretic_research_tree[type][HKT_DEPTH] = 1 + heretic_research_tree[type][HKT_UI_BGR] = "node_side" + + var/datum/heretic_knowledge/knowledge = type + if(initial(knowledge.is_starting_knowledge)) + heretic_research_tree[type][HKT_ROUTE] = PATH_START + continue + + heretic_research_tree[type][HKT_ROUTE] = null + + var/list/paths = list() + for(var/type in subtypesof(/datum/heretic_knowledge_tree_column)) + var/datum/heretic_knowledge_tree_column/column_path = type + if(initial(column_path.abstract_parent_type) == column_path) + continue + + var/datum/heretic_knowledge_tree_column/column = new type() + paths[column.type] = column + + var/list/start_blacklist = list() + var/list/grasp_blacklist = list() + var/list/mark_blacklist = list() + var/list/blade_blacklist = list() + var/list/asc_blacklist = list() + + for(var/id in paths) + if(!istype(paths[id],/datum/heretic_knowledge_tree_column/main)) + continue + var/datum/heretic_knowledge_tree_column/main/column = paths[id] + + start_blacklist += column.start + grasp_blacklist += column.grasp + mark_blacklist += column.mark + blade_blacklist += column.blade + asc_blacklist += column.ascension + + heretic_research_tree[/datum/heretic_knowledge/spell/basic][HKT_NEXT] += start_blacklist + + for(var/id in paths) + var/datum/heretic_knowledge_tree_column/this_column = paths[id] + var/datum/heretic_knowledge_tree_column/neighbour_0 = paths[this_column.neighbour_type_left] + var/datum/heretic_knowledge_tree_column/neighbour_1 = paths[this_column.neighbour_type_right] + //horizontal (two way) + var/list/tier1 = this_column.tier1 + var/list/tier2 = this_column.tier2 + var/list/tier3 = this_column.tier3 + + //Tier1, 2 and 3 can technically be lists so we handle them here + if(!islist(this_column.tier1)) + tier1 = list(this_column.tier1) + + if(!islist(this_column.tier2)) + tier2 = list(this_column.tier2) + + if(!islist(this_column.tier3)) + tier3 = list(this_column.tier3) + + for(var/t1_knowledge in tier1) + heretic_research_tree[t1_knowledge][HKT_NEXT] += neighbour_0.tier1 + heretic_research_tree[t1_knowledge][HKT_NEXT] += neighbour_1.tier1 + heretic_research_tree[t1_knowledge][HKT_ROUTE] = this_column.route + heretic_research_tree[t1_knowledge][HKT_UI_BGR] = this_column.ui_bgr + heretic_research_tree[t1_knowledge][HKT_DEPTH] = 4 + + for(var/t2_knowledge in tier2) + heretic_research_tree[t2_knowledge][HKT_NEXT] += neighbour_0.tier2 + heretic_research_tree[t2_knowledge][HKT_NEXT] += neighbour_1.tier2 + heretic_research_tree[t2_knowledge][HKT_ROUTE] = this_column.route + heretic_research_tree[t2_knowledge][HKT_UI_BGR] = this_column.ui_bgr + heretic_research_tree[t2_knowledge][HKT_DEPTH] = 8 + + for(var/t3_knowledge in tier3) + heretic_research_tree[t3_knowledge][HKT_NEXT] += neighbour_0.tier3 + heretic_research_tree[t3_knowledge][HKT_NEXT] += neighbour_1.tier3 + heretic_research_tree[t3_knowledge][HKT_ROUTE] = this_column.route + heretic_research_tree[t3_knowledge][HKT_UI_BGR] = this_column.ui_bgr + heretic_research_tree[t3_knowledge][HKT_DEPTH] = 10 + + //Everything below this line is considered to be a "main path" and not a side path + //Since we are handling the heretic research tree column by column this is required + if(this_column.abstract_parent_type != /datum/heretic_knowledge_tree_column/main) + continue + + var/datum/heretic_knowledge_tree_column/main/main_column = this_column + //vertical (one way) + heretic_research_tree[/datum/heretic_knowledge/spell/basic] += main_column.start + heretic_research_tree[main_column.start][HKT_NEXT] += main_column.grasp + heretic_research_tree[main_column.grasp][HKT_NEXT] += main_column.tier1 + //t1 handling + for(var/t1_knowledge in tier1) + heretic_research_tree[t1_knowledge][HKT_NEXT] += main_column.mark + + heretic_research_tree[main_column.mark][HKT_NEXT] += main_column.ritual_of_knowledge + heretic_research_tree[main_column.ritual_of_knowledge][HKT_NEXT] += main_column.unique_ability + heretic_research_tree[main_column.unique_ability][HKT_NEXT] += main_column.tier2 + //t2 handling + for(var/t2_knowledge in tier2) + heretic_research_tree[t2_knowledge][HKT_NEXT] += main_column.blade + + heretic_research_tree[main_column.blade][HKT_NEXT] += main_column.tier3 + //t3 handling + for(var/t3_knowledge in tier3) + heretic_research_tree[t3_knowledge][HKT_NEXT] += main_column.ascension + + //blacklist + heretic_research_tree[main_column.start][HKT_BAN] += (start_blacklist - main_column.start) + (asc_blacklist - main_column.ascension) + heretic_research_tree[main_column.grasp][HKT_BAN] += (grasp_blacklist - main_column.grasp) + heretic_research_tree[main_column.mark][HKT_BAN] += (mark_blacklist - main_column.mark) + heretic_research_tree[main_column.blade][HKT_BAN] += (blade_blacklist - main_column.blade) + + //route stuff + heretic_research_tree[main_column.start][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.grasp][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.mark][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.ritual_of_knowledge][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.unique_ability][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.blade][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.ascension][HKT_ROUTE] = main_column.route + + heretic_research_tree[main_column.start][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.grasp][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.mark][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.ritual_of_knowledge][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.unique_ability][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.blade][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.ascension][HKT_UI_BGR] = main_column.ui_bgr + //depth stuff + heretic_research_tree[main_column.start][HKT_DEPTH] = 2 + heretic_research_tree[main_column.grasp][HKT_DEPTH] = 3 + heretic_research_tree[main_column.mark][HKT_DEPTH] = 5 + heretic_research_tree[main_column.ritual_of_knowledge][HKT_DEPTH] = 6 + heretic_research_tree[main_column.unique_ability][HKT_DEPTH] = 7 + heretic_research_tree[main_column.blade][HKT_DEPTH] = 9 + heretic_research_tree[main_column.ascension][HKT_DEPTH] = 11 + + //Per path bullshit goes here \/\/\/ + for(var/t2_knowledge in tier2) + heretic_research_tree[t2_knowledge][HKT_NEXT] += /datum/heretic_knowledge/reroll_targets + + // If you want to do any custom bullshit put it here \/\/\/ + heretic_research_tree[/datum/heretic_knowledge/reroll_targets][HKT_ROUTE] = PATH_SIDE + heretic_research_tree[/datum/heretic_knowledge/reroll_targets][HKT_DEPTH] = 8 + + heretic_research_tree[/datum/heretic_knowledge/rifle][HKT_NEXT] += /datum/heretic_knowledge/rifle_ammo + heretic_research_tree[/datum/heretic_knowledge/rifle_ammo][HKT_ROUTE] = PATH_SIDE + heretic_research_tree[/datum/heretic_knowledge/rifle_ammo][HKT_DEPTH] = heretic_research_tree[/datum/heretic_knowledge/rifle][HKT_DEPTH] + + heretic_research_tree[/datum/heretic_knowledge/rust_regen][HKT_NEXT] += /datum/heretic_knowledge/entropy_pulse + heretic_research_tree[/datum/heretic_knowledge/entropy_pulse][HKT_ROUTE] = PATH_SIDE + heretic_research_tree[/datum/heretic_knowledge/entropy_pulse][HKT_DEPTH] = heretic_research_tree[/datum/heretic_knowledge/rust_regen][HKT_DEPTH] + + //and we're done + QDEL_LIST_ASSOC_VAL(paths) + return heretic_research_tree diff --git a/code/modules/antagonists/heretic/knowledge/ash_lore.dm b/code/modules/antagonists/heretic/knowledge/ash_lore.dm new file mode 100644 index 00000000000..016c4009e56 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/ash_lore.dm @@ -0,0 +1,217 @@ + +/datum/heretic_knowledge_tree_column/main/ash + neighbour_type_left = /datum/heretic_knowledge_tree_column/cosmic_to_ash + neighbour_type_right = /datum/heretic_knowledge_tree_column/ash_to_moon + + route = PATH_ASH + ui_bgr = "node_ash" + start = /datum/heretic_knowledge/limited_amount/starting/base_ash + grasp = /datum/heretic_knowledge/ashen_grasp + tier1 = /datum/heretic_knowledge/spell/ash_passage + mark = /datum/heretic_knowledge/mark/ash_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/ash + unique_ability = /datum/heretic_knowledge/spell/fire_blast + tier2 = /datum/heretic_knowledge/mad_mask + blade = /datum/heretic_knowledge/blade_upgrade/ash + tier3 = /datum/heretic_knowledge/spell/flame_birth + ascension = /datum/heretic_knowledge/ultimate/ash_final + +/datum/heretic_knowledge/limited_amount/starting/base_ash + name = "Nightwatcher's Secret" + desc = "Opens up the Path of Ash to you. \ + Allows you to transmute a match and a knife into an Ashen Blade. \ + You can only create three at a time." + gain_text = "The City Guard know their watch. If you ask them at night, they may tell you about the ashy lantern." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/match = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/ash) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "ash_blade" + +/datum/heretic_knowledge/ashen_grasp + name = "Grasp of Ash" + desc = "Your Mansus Grasp will burn the eyes of the victim, damaging them and blurring their vision." + gain_text = "The Nightwatcher was the first of them, his treason started it all. \ + Their lantern, expired to ash - their watch, absent." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_ash" + +/datum/heretic_knowledge/ashen_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/ashen_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/ashen_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(HAS_TRAIT(target, TRAIT_BLIND)) + return + + var/obj/item/organ/internal/eyes/E = target.get_int_organ(/obj/item/organ/internal/eyes) + if(!E) + return + + to_chat(target, SPAN_DANGER("A bright green light burns your eyes horrifically!")) + E.receive_damage(9) + target.EyeBlurry(20 SECONDS) + +/datum/heretic_knowledge/spell/ash_passage + name = "Ashen Passage" + desc = "Grants you Ashen Passage, a spell that lets you phase out of reality and traverse a short distance, passing though any walls." + gain_text = "He knew how to walk between the planes." + + action_to_add = /datum/spell/ethereal_jaunt/ash + cost = 1 + + +/datum/heretic_knowledge/mark/ash_mark + name = "Mark of Ash" + desc = "Your Mansus Grasp now applies the Mark of Ash. The mark is triggered from an attack with your Ashen Blade. \ + When triggered, the victim takes additional stamina and burn damage, and the mark is transferred to a nearby heathen. \ + Damage dealt is decreased with each transfer. \ + Triggering the mark will also greatly reduce the cooldown of your Mansus Grasp." + gain_text = "He was a very particular man, always watching in the dead of night. \ + But in spite of his duty, he regularly tranced through the Manse with his blazing lantern held high. \ + He shone brightly in the darkness, until the blaze begin to die." + mark_type = /datum/status_effect/eldritch/ash + +/datum/heretic_knowledge/mark/ash_mark/trigger_mark(mob/living/source, mob/living/target) + . = ..() + if(!.) + return + + // Also refunds 75% of charge! + var/datum/spell/touch/mansus_grasp/grasp = locate() in source.actions + if(grasp && grasp.cooldown_handler.is_on_cooldown()) + grasp.cooldown_handler.start_recharge(grasp.cooldown_handler.recharge_duration * 0.25) + +/datum/heretic_knowledge/knowledge_ritual/ash + + + +/datum/heretic_knowledge/spell/fire_blast + name = "Volcano Blast" + desc = "This makes you fire immune and heat immune, and grants you Volcano Blast, a spell that - after a short charge - fires off a beam of energy \ + at a nearby enemy, setting them on fire and burning them. If they do not extinguish themselves, \ + the beam will continue to another target." + gain_text = "No fire was hot enough to rekindle them. No fire was bright enough to save them. No fire is eternal." + action_to_add = /datum/spell/charge_up/bounce/fire_blast + cost = 1 + research_tree_icon_frame = 7 + +/datum/heretic_knowledge/spell/fire_blast/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + ADD_TRAIT(user, TRAIT_RESISTHEAT, type) + return ..() + +/datum/heretic_knowledge/spell/fire_blast/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + REMOVE_TRAIT(user, TRAIT_RESISTHEAT, type) + return ..() + + +/datum/heretic_knowledge/mad_mask + name = "Mask of Madness" + desc = "Allows you to transmute any mask, four candles, a stun baton, and a liver to create a Mask of Madness. \ + The mask instills fear into heathens who witness it, causing stamina damage, hallucinations, and insanity. \ + It can also be forced onto a heathen, to make them unable to take it off..." + gain_text = "The Nightwatcher was lost. That's what the Watch believed. Yet he walked the world, unnoticed by the masses." + required_atoms = list( + /obj/item/organ/internal/liver = 1, + /obj/item/melee/baton = 1, // Technically means a cattleprod is valid + /obj/item/clothing/mask = 1, + /obj/item/candle = 4, + ) + result_atoms = list(/obj/item/clothing/mask/madness_mask) + cost = 1 + research_tree_icon_path = 'icons/obj/clothing/masks.dmi' + research_tree_icon_state = "mad_mask" + +/datum/heretic_knowledge/blade_upgrade/ash + name = "Fiery Blade" + desc = "Your blade now lights enemies ablaze on attack." + gain_text = "He returned, blade in hand, he swung and swung as the ash fell from the skies. \ + His city, the people he swore to watch... and watch he did, as they all burnt to cinders." + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_ash" + +/datum/heretic_knowledge/blade_upgrade/ash/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + + target.adjust_fire_stacks(1) + target.IgniteMob() + +/datum/heretic_knowledge/spell/flame_birth + name = "Nightwatcher's Rebirth" + desc = "Grants you Nightwatcher's Rebirth, a spell that extinguishes you and \ + burns all nearby heathens who are currently on fire, healing you for every victim afflicted. \ + If any victims afflicted are in critical condition, they will also instantly die." + gain_text = "The fire was inescapable, and yet, life remained in his charred body. \ + The Nightwatcher was a particular man, always watching." + action_to_add = /datum/spell/aoe/fiery_rebirth + cost = 1 + research_tree_icon_frame = 5 + +/datum/heretic_knowledge/ultimate/ash_final + name = "Ashlord's Rite" + desc = "The ascension ritual of the Path of Ash. \ + Bring 3 burning or husked corpses to a transmutation rune to complete the ritual. \ + When completed, you become a harbinger of flames, gaining two abilites. \ + Cascade, which causes a massive, growing ring of fire around you, \ + and Oath of Flame, causing you to passively create a ring of flames as you walk. \ + Some ashen spells you already knew will be empowered as well. \ + You will also become immune to flames, space, and similar environmental hazards." + gain_text = "The Watch is dead, the Nightwatcher burned with it. Yet his fire burns evermore, \ + for the Nightwatcher brought forth the rite to mankind! His gaze continues, as now I am one with the flames, \ + WITNESS MY ASCENSION, THE ASHY LANTERN BLAZES ONCE MORE!" + + announcement_text = "%SPOOKY% Fear the blaze, for the Ashlord, %NAME% has ascended! The flames shall consume all! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_ash.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "ashascend" + /// A static list of all traits we apply on ascension. + var/static/list/traits_to_apply = list( + TRAIT_BOMBIMMUNE, + TRAIT_NOBREATH, + TRAIT_NOFIRE, + TRAIT_RESISTCOLD, + TRAIT_RESISTHEAT, + TRAIT_RESISTHIGHPRESSURE, + TRAIT_RESISTLOWPRESSURE, + TRAIT_NOSLIP, // so pressure doesn't meme them + ) + +/datum/heretic_knowledge/ultimate/ash_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + . = ..() + if(!.) + return + + if(sacrifice.on_fire) + return TRUE + if(HAS_TRAIT_FROM(sacrifice, TRAIT_HUSK, BURN)) + return TRUE + return FALSE + +/datum/heretic_knowledge/ultimate/ash_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + var/datum/spell/fire_sworn/circle_spell = new(user.mind) + user.AddSpell(circle_spell) + + var/datum/spell/fire_cascade/big/screen_wide_fire_spell = new(user.mind) + user.AddSpell(screen_wide_fire_spell) + + var/datum/spell/charge_up/bounce/fire_blast/existing_beam_spell = locate() in user.mob_spell_list + if(existing_beam_spell) + existing_beam_spell.max_beam_bounces *= 2 // Double beams + existing_beam_spell.bounce_time *= 0.66 // Faster beams + existing_beam_spell.cooldown_handler.recharge_duration *= 0.66 // Lower cooldown + + var/datum/spell/aoe/fiery_rebirth/fiery_rebirth = locate() in user.mob_spell_list + fiery_rebirth?.base_cooldown *= 0.16 + + user.add_traits(traits_to_apply, type) diff --git a/code/modules/antagonists/heretic/knowledge/blade_lore.dm b/code/modules/antagonists/heretic/knowledge/blade_lore.dm new file mode 100644 index 00000000000..7b50f92c8d3 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/blade_lore.dm @@ -0,0 +1,422 @@ + +/datum/heretic_knowledge_tree_column/main/blade + neighbour_type_left = /datum/heretic_knowledge_tree_column/void_to_blade + neighbour_type_right = /datum/heretic_knowledge_tree_column/blade_to_rust + + route = PATH_BLADE + ui_bgr = "node_blade" + + start = /datum/heretic_knowledge/limited_amount/starting/base_blade + grasp = /datum/heretic_knowledge/blade_grasp + tier1 = /datum/heretic_knowledge/blade_dance + mark = /datum/heretic_knowledge/mark/blade_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/blade + unique_ability = /datum/heretic_knowledge/spell/realignment + tier2 = /datum/heretic_knowledge/duel_stance + blade = /datum/heretic_knowledge/blade_upgrade/blade + tier3 = /datum/heretic_knowledge/spell/furious_steel + ascension = /datum/heretic_knowledge/ultimate/blade_final + +/datum/heretic_knowledge/limited_amount/starting/base_blade + name = "The Cutting Edge" + desc = "Opens up the Path of Blades to you. \ + Allows you to transmute a knife with one bar of silver or titanium to create a Sundered Blade. \ + You can create up to five at a time." + gain_text = "Our great ancestors forged swords and practiced sparring on the eve of great battles." + required_atoms = list( + /obj/item/kitchen/knife = 1, + list(/obj/item/stack/sheet/mineral/silver, /obj/item/stack/sheet/mineral/titanium) = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/dark) + limit = 5 // It's the blade path, it's a given + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "dark_blade" + +/datum/heretic_knowledge/blade_grasp + name = "Grasp of the Blade" + desc = "Your Mansus Grasp will cause a short stun when used on someone lying down or facing away from you." + gain_text = "The story of the footsoldier has been told since antiquity. It is one of blood and valor, \ + and is championed by sword, steel and silver." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_blade" + +/datum/heretic_knowledge/blade_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/blade_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/blade_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(!check_behind(source, target)) + return + + // We're officially behind them, apply effects + target.Weaken(2 SECONDS) + target.apply_damage(10, BRUTE) + playsound(target, 'sound/weapons/guillotine.ogg', 100, TRUE) + +/// The cooldown duration between triggers of blade dance +#define BLADE_DANCE_COOLDOWN (20 SECONDS) + +/datum/heretic_knowledge/blade_dance + name = "Dance of the Brand" + desc = "Being attacked while wielding a Heretic Blade in either hand will deliver a riposte \ + towards your attacker. This effect can only trigger once every 20 seconds." + gain_text = "The footsoldier was known to be a fearsome duelist. \ + Their general quickly appointed them as their personal Champion." + cost = 1 + research_tree_icon_path = 'icons/mob/actions/actions_ecult.dmi' + research_tree_icon_state = "shatter" + /// Whether the counter-attack is ready or not. + /// Used instead of cooldowns, so we can give feedback when it's ready again + var/riposte_ready = TRUE + +/datum/heretic_knowledge/blade_dance/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS, PROC_REF(on_shield_reaction)) + +/datum/heretic_knowledge/blade_dance/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS) + +/datum/heretic_knowledge/blade_dance/proc/on_shield_reaction( + mob/living/carbon/human/source, + atom/movable/hitby, + attack_text = "the attack", + final_block_chance = 0, + damage = 0, + attack_type = MELEE_ATTACK, + damage_type = BRUTE +) + + SIGNAL_HANDLER + + if(attack_type != MELEE_ATTACK && attack_type != UNARMED_ATTACK) + return + + if(!riposte_ready) + return + + if(HAS_TRAIT(source, TRAIT_HANDS_BLOCKED)) + return + + var/mob/living/attacker = hitby.loc + if(!istype(attacker)) + attacker = hitby + + if(!istype(attacker)) + return + + if(!source.Adjacent(attacker)) + return + + // Let's check their held items to see if we can do a riposte + var/obj/item/main_hand = source.l_hand + var/obj/item/off_hand = source.r_hand + // This is the item that ends up doing the "blocking" (flavor) + var/obj/item/striking_with + + // First we'll check if the offhand is valid + if(!QDELETED(off_hand) && istype(off_hand, /obj/item/melee/sickly_blade)) + striking_with = off_hand + + // Then we'll check the mainhand + // We do mainhand second, because we want to prioritize it over the offhand + if(!QDELETED(main_hand) && istype(main_hand, /obj/item/melee/sickly_blade)) + striking_with = main_hand + + // No valid item in either slot? No riposte + if(!striking_with) + return + + // If we made it here, deliver the strike + INVOKE_ASYNC(src, PROC_REF(counter_attack), source, attacker, striking_with, attack_text) + + // And reset after a bit + riposte_ready = FALSE + addtimer(CALLBACK(src, PROC_REF(reset_riposte), source), BLADE_DANCE_COOLDOWN) + return SHIELD_BLOCK + +/datum/heretic_knowledge/blade_dance/proc/counter_attack(mob/living/carbon/human/source, mob/living/target, obj/item/melee/sickly_blade/weapon, attack_text) + if(source == target) // no riposte of ourself + return + playsound(get_turf(source), 'sound/weapons/parry.ogg', 100, TRUE) + source.visible_message( + SPAN_WARNING("[source] leans into [attack_text] and delivers a sudden riposte back at [target]!"), + SPAN_WARNING("You lean into [attack_text] and deliver a sudden riposte back at [target]!"), + SPAN_HEAR("You hear a clink, followed by a stab."), + ) + weapon.melee_attack_chain(source, target) + +/datum/heretic_knowledge/blade_dance/proc/reset_riposte(mob/living/carbon/human/source) + riposte_ready = TRUE + to_chat(source, SPAN_HIEROPHANT("Your riposte is ready.")) + +#undef BLADE_DANCE_COOLDOWN + +/datum/heretic_knowledge/mark/blade_mark + name = "Mark of the Blade" + desc = "Your Mansus Grasp now applies the Mark of the Blade. While marked, \ + the victim will be unable to leave their current room until it expires or is triggered. \ + Triggering the mark will summon a knife that will orbit you for a short time. \ + The knife will block any attack directed towards you, but is consumed on use." + gain_text = "His general wished to end the war, but the Champion knew there could be no life without death. \ + He would slay the coward himself, and anyone who tried to run." + mark_type = /datum/status_effect/eldritch/blade + +/datum/heretic_knowledge/mark/blade_mark/create_mark(mob/living/source, mob/living/target) + var/datum/status_effect/eldritch/blade/blade_mark = ..() + if(istype(blade_mark)) + var/area/to_lock_to = get_area(target) + blade_mark.locked_to = to_lock_to + to_chat(target, SPAN_HIEROPHANT_WARNING("An otherworldly force is compelling you to stay in [get_area_name(to_lock_to)]!")) + return blade_mark + +/datum/heretic_knowledge/mark/blade_mark/trigger_mark(mob/living/source, mob/living/target) + . = ..() + if(!.) + return + source.apply_status_effect(/datum/status_effect/protective_blades, 60 SECONDS, 1, 20, 0 SECONDS) + +/datum/heretic_knowledge/knowledge_ritual/blade + + + +/datum/heretic_knowledge/spell/realignment + name = "Realignment" + desc = "Grants you Realignment a spell that wil realign your body rapidly for a short period. \ + During this process, you will rapidly regenerate stamina and quickly recover from stuns, however, you will be unable to attack. \ + This spell can be cast in rapid succession, but doing so will increase the cooldown." + gain_text = "In the flurry of death, he found peace within himself. Despite insurmountable odds, he forged on." + action_to_add = /datum/spell/realignment + cost = 1 + + +/// The amount of blood flow reduced per level of severity of gained bleeding wounds for Stance of the Torn Champion. +#define BLOOD_FLOW_PER_SEVEIRTY -1 + +/datum/heretic_knowledge/duel_stance + name = "Stance of the Torn Champion" + desc = "Grants immunity to having your limbs dismembered. \ + Additionally, when damaged below 50% of your maximum health, \ + you gain resistance to batons." + gain_text = "In time, it was he who stood alone among the bodies of his former comrades, awash in blood, none of it his own. \ + He was without rival, equal, or purpose." + cost = 1 + research_tree_icon_path = 'icons/effects/blood.dmi' + research_tree_icon_state = "u_madman" + /// Whether we're currently in duelist stance, gaining certain buffs (low health) + var/in_duelist_stance = FALSE + +/datum/heretic_knowledge/duel_stance/on_gain(mob/living/carbon/human/user, datum/antagonist/heretic/our_heretic) + for(var/obj/item/organ/external/current_organ in user.bodyparts) + current_organ.limb_flags |= CANNOT_DISMEMBER //you can't chop of the limbs of a ghost, silly + RegisterSignal(user, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) + RegisterSignal(user, COMSIG_LIVING_HEALTH_UPDATE, PROC_REF(on_health_update)) + + on_health_update(user) // Run this once, so if the knowledge is learned while hurt it activates properly + +/datum/heretic_knowledge/duel_stance/on_lose(mob/living/carbon/human/user, datum/antagonist/heretic/our_heretic) + for(var/obj/item/organ/external/current_organ in user.bodyparts) + current_organ.limb_flags &= ~CANNOT_DISMEMBER //you can't chop of the limbs of a ghost, silly + if(in_duelist_stance) + REMOVE_TRAIT(user, TRAIT_BATON_RESISTANCE, type) + + UnregisterSignal(user, list(COMSIG_PARENT_EXAMINE, COMSIG_LIVING_HEALTH_UPDATE)) + +/datum/heretic_knowledge/duel_stance/proc/on_examine(mob/living/carbon/human/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + var/obj/item/held_item = source.get_active_hand() + if(in_duelist_stance) + examine_list += SPAN_WARNING("[source] looks unnaturally poised[held_item?.force >= 15 ? " and ready to strike out":""].") + +/datum/heretic_knowledge/duel_stance/proc/on_health_update(mob/living/source) + SIGNAL_HANDLER + + if(in_duelist_stance && source.health > source.maxHealth * 0.5) + in_duelist_stance = FALSE + REMOVE_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + return + + if(!in_duelist_stance && source.health <= source.maxHealth * 0.5) + in_duelist_stance = TRUE + ADD_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + SEND_SIGNAL(source, COMSIG_LIVING_CLEAR_STUNS) + return + +#undef BLOOD_FLOW_PER_SEVEIRTY + +/datum/heretic_knowledge/blade_upgrade/blade + name = "Empowered Blades" + desc = "Attacking someone with a Sundered Blade in both hands \ + will now deliver a blow with both at once, dealing two attacks in rapid succession. \ + The second blow will be slightly weaker. \ + You are able to infuse your mansus grasp directly into your blades." + gain_text = "I found him cleaved in twain, halves locked in a duel without end; \ + a flurry of blades, neither hitting their mark, for the Champion was indomitable." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_blade" + /// How much force do we apply to the offhand? + var/offand_force_decrement = 0 + /// How much force was the last weapon we offhanded with? If it's different, we need to re-calculate the decrement + var/last_weapon_force = -1 + +/datum/heretic_knowledge/blade_upgrade/blade/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + RegisterSignal(user, COMSIG_TOUCH_HANDLESS_CAST, PROC_REF(on_grasp_cast)) + +/datum/heretic_knowledge/blade_upgrade/blade/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + UnregisterSignal(user, list(COMSIG_TOUCH_HANDLESS_CAST, COMSIG_HERETIC_BLADE_ATTACK)) + +///Tries to infuse our held blade with our mansus grasp +/datum/heretic_knowledge/blade_upgrade/blade/proc/on_grasp_cast(mob/living/carbon/cast_on) + SIGNAL_HANDLER + + var/held_item = cast_on.get_active_hand() + if(!istype(held_item, /obj/item/melee/sickly_blade/dark)) + return NONE + var/obj/item/melee/sickly_blade/dark/held_blade = held_item + if(held_blade.infused) + return NONE + held_blade.infused = TRUE + held_blade.update_appearance(UPDATE_ICON) + + //Infuse our off-hand blade just so it's nicer visually + var/obj/item/melee/sickly_blade/dark/off_hand_blade = cast_on.get_inactive_hand() + if(istype(off_hand_blade, /obj/item/melee/sickly_blade/dark)) + off_hand_blade.infused = TRUE + off_hand_blade.update_appearance(UPDATE_ICON) + + return COMPONENT_CAST_HANDLESS + +/datum/heretic_knowledge/blade_upgrade/blade/do_melee_effects(mob/living/carbon/human/source, atom/target, obj/item/melee/sickly_blade/blade) + if(target == source) + return + + var/obj/item/off_hand = source.get_inactive_hand() + if(QDELETED(off_hand) || !istype(off_hand, /obj/item/melee/sickly_blade)) + return + // If our off-hand is the blade that's attacking, + // quit out now to avoid an infinite stab combo + if(off_hand == blade) + return + + // Give it a short delay (for style, also lets people dodge it I guess) + addtimer(CALLBACK(src, PROC_REF(follow_up_attack), source, target, off_hand), 0.25 SECONDS) + +/datum/heretic_knowledge/blade_upgrade/blade/proc/follow_up_attack(mob/living/carbon/human/source, atom/target, obj/item/melee/sickly_blade/blade) + if(QDELETED(source) || QDELETED(target) || QDELETED(blade)) + return + // Sanity to ensure that the blade we're delivering an offhand attack with is ACTUALLY our offhand + if(blade != source.get_inactive_hand()) + return + // And we easily could've moved away + if(!source.Adjacent(target)) + return + + // Check if we need to recaclulate our offhand force + // This is just so we don't run this block every attack, that's wasteful + if(last_weapon_force != blade.force) + offand_force_decrement = 0 + // We want to make sure that the offhand blade increases their hits to crit by one, just about + // So, let's do some quick math. Yes this'll be inaccurate if their mainhand blade is modified (whetstone), no I don't care + // Find how much force we need to detract from the second blade + var/hits_to_crit_on_average = ROUND_UP(100 / (blade.force * 2)) + while(hits_to_crit_on_average <= 3) // 3 hits and beyond is a bit too absurd + if(offand_force_decrement + 2 > blade.force * 0.5) // But also cutting the force beyond half is absurd + break + + offand_force_decrement += 2 + hits_to_crit_on_average = ROUND_UP(100 / (blade.force * 2 - offand_force_decrement)) + + // Save the force as our last weapon force + last_weapon_force = blade.force + // Subtract the decrement, but only if the target is living + if(isliving(target)) + blade.force -= offand_force_decrement + // Perform the offhand attack + blade.melee_attack_chain(source, target) + // Restore the force. + blade.force = last_weapon_force + +/datum/heretic_knowledge/spell/furious_steel + name = "Furious Steel" + desc = "Grants you Furious Steel, a targeted spell. Using it will summon three \ + orbiting blades around you. These blades will protect you from all attacks, \ + but are consumed on use. Additionally, you can click to fire the blades \ + at a target, dealing damage and causing bleeding." + gain_text = "Without thinking, I took the knife of a fallen soldier and threw with all my might. My aim was true! \ + The Torn Champion smiled at their first taste of agony, and with a nod, their blades became my own." + action_to_add = /datum/spell/fireball/furious_steel + cost = 1 + +/datum/heretic_knowledge/ultimate/blade_final + name = "Maelstrom of Silver" + desc = "The ascension ritual of the Path of Blades. \ + Bring 3 corpses with no head to a transmutation rune to complete the ritual. \ + When completed, you will be surrounded in a constant, regenerating orbit of blades. \ + These blades will protect you from all attacks, but are consumed on use. \ + Your Furious Steel spell will also have a shorter cooldown. \ + Additionally, you become a master of combat, gaining full wound immunity and the ability to shrug off short stuns. \ + Your Sundered Blades deal bonus damage and heal you on attack for a portion of the damage dealt." + gain_text = "The Torn Champion is freed! I will become the blade reunited, and with my greater ambition, \ + I AM UNMATCHED! A STORM OF STEEL AND SILVER IS UPON US! WITNESS MY ASCENSION!" + + announcement_text = "%SPOOKY% Master of blades, the Torn Champion's disciple, %NAME% has ascended! Their steel is that which will cut reality in a maelstom of silver! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_blade.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "bladeascend" + +/datum/heretic_knowledge/ultimate/blade_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + . = ..() + if(!.) + return FALSE + var/obj/item/organ/external/head/head = sacrifice.get_organ("head") + if(!head) + return TRUE + return FALSE + +/datum/heretic_knowledge/ultimate/blade_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(on_eldritch_blade_final), TRUE) + user.apply_status_effect(/datum/status_effect/protective_blades/recharging, null, 8, 30, 0.25 SECONDS, /obj/effect/floating_blade, 1 MINUTES) + user.add_stun_absorption( + key = name, + duration = INFINITY, + message = SPAN_WARNING("%EFFECT_OWNER throws off the stun!"), + self_message = SPAN_WARNING("You throw off the stun!"), + examine_message = SPAN_HIEROPHANT_WARNING("%EFFECT_OWNER_THEYRE standing stalwartly."), + ) + var/datum/spell/fireball/furious_steel/steel_spell = locate() in user.mob_spell_list + steel_spell?.cooldown_handler.recharge_duration *= 0.5 + + var/mob/living/carbon/human/heretic = user + ADD_TRAIT(heretic, TRAIT_NO_BONES, name) + ADD_TRAIT(heretic, TRAIT_STURDY_LIMBS, name) + ADD_TRAIT(heretic, TRAIT_BURN_WOUND_IMMUNE, name) + ADD_TRAIT(heretic, TRAIT_IB_IMMUNE, name) + for(var/obj/item/organ/external/limb in heretic.bodyparts) + limb.add_limb_flags() // Otherwise knockdowns would probably overpower the stun absorption effect. + +/datum/heretic_knowledge/ultimate/blade_final/proc/on_eldritch_blade_final(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + + if(target == source) + return + + // Turns your heretic blades into eswords, pretty much. + var/bonus_damage = clamp(30 - blade.force, 0, 12) + + target.apply_damage( + damage = bonus_damage, + damagetype = BRUTE, + spread_damage = TRUE, + sharp = TRUE, + ) + + if(target.stat != DEAD) + // And! Get some free healing for a portion of the bonus damage dealt. + source.heal_overall_damage(bonus_damage / 2, bonus_damage / 2) diff --git a/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm b/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm new file mode 100644 index 00000000000..f5aa664a497 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm @@ -0,0 +1,272 @@ + +/datum/heretic_knowledge_tree_column/main/cosmic + neighbour_type_left = /datum/heretic_knowledge_tree_column/rust_to_cosmic + neighbour_type_right = /datum/heretic_knowledge_tree_column/cosmic_to_ash + + route = PATH_COSMIC + ui_bgr = "node_cosmos" + + start = /datum/heretic_knowledge/limited_amount/starting/base_cosmic + grasp = /datum/heretic_knowledge/cosmic_grasp + tier1 = /datum/heretic_knowledge/spell/cosmic_runes + mark = /datum/heretic_knowledge/mark/cosmic_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/cosmic + unique_ability = /datum/heretic_knowledge/spell/star_touch + tier2 = /datum/heretic_knowledge/spell/star_blast + blade = /datum/heretic_knowledge/blade_upgrade/cosmic + tier3 = /datum/heretic_knowledge/spell/cosmic_expansion + ascension = /datum/heretic_knowledge/ultimate/cosmic_final + +/datum/heretic_knowledge/limited_amount/starting/base_cosmic + name = "Eternal Gate" + desc = "Opens up the Path of Cosmos to you. \ + Allows you to transmute a sheet of plasma and a knife into an Cosmic Blade. \ + You can only create three at a time." + gain_text = "A nebula appeared in the sky, its infernal birth shone upon me. This was the start of a great transcendence." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/stack/sheet/mineral/plasma = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/cosmic) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "cosmic_blade" + +/datum/heretic_knowledge/cosmic_grasp + name = "Grasp of Cosmos" + desc = "Your Mansus Grasp will give people a star mark (cosmic ring) and create a cosmic field where you stand. \ + People with a star mark can not pass cosmic fields." + gain_text = "Some stars dimmed, others' magnitude increased. \ + With newfound strength I could channel the nebula's power into myself." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_cosmos" + +/datum/heretic_knowledge/cosmic_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/cosmic_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/// Aplies the effect of the mansus grasp when it hits a target. +/datum/heretic_knowledge/cosmic_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + to_chat(target, SPAN_DANGER("A cosmic ring appeared above your head!")) + target.apply_status_effect(/datum/status_effect/star_mark, source) + new /obj/effect/forcefield/cosmic_field(get_turf(source)) + +/datum/heretic_knowledge/spell/cosmic_runes + name = "Cosmic Runes" + desc = "Grants you Cosmic Runes, a spell that creates two runes linked with each other for easy teleportation. \ + Only the entity activating the rune will get transported, and it can be used by anyone without a star mark. \ + However, people with a star mark will get transported along with another person using the rune." + gain_text = "The distant stars crept into my dreams, roaring and screaming without reason. \ + I spoke, and heard my own words echoed back." + action_to_add = /datum/spell/cosmic_rune + cost = 1 + + +/datum/heretic_knowledge/mark/cosmic_mark + name = "Mark of Cosmos" + desc = "Your Mansus Grasp now applies the Mark of Cosmos. The mark is triggered from an attack with your Cosmic Blade. \ + When triggered, the victim is returned to the location where the mark was originally applied to them, \ + leaving a cosmic field in their place. \ + They will then be paralyzed for 2 seconds." + gain_text = "The Beast now whispered to me occasionally, only small tidbits of their circumstances. \ + I can help them, I have to help them." + mark_type = /datum/status_effect/eldritch/cosmic + +/datum/heretic_knowledge/knowledge_ritual/cosmic + +/datum/heretic_knowledge/spell/star_touch + name = "Star Touch" + desc = "Grants you Star Touch, a spell which places a star mark upon your target \ + and creates a cosmic field at your feet and to the turfs next to you. Targets which already have a star mark \ + will be forced to sleep for 4 seconds. When the victim is hit it also creates a beam that burns them. \ + The beam lasts a minute, until the beam is obstructed or until a new target has been found." + gain_text = "After waking in a cold sweat I felt a palm on my scalp, a sigil burned onto me. \ + My veins now emitted a strange purple glow, the Beast knows I will surpass its expectations." + action_to_add = /datum/spell/touch/star_touch + cost = 1 + +/datum/heretic_knowledge/spell/star_blast + name = "Star Blast" + desc = "Fires a projectile that moves very slowly, raising a short-lived wall of cosmic fields where it goes. \ + Anyone hit by the projectile will receive burn damage, a knockdown, and give people in a three tile range a star mark." + gain_text = "The Beast was behind me now at all times, with each sacrifice words of affirmation coursed through me." + action_to_add = /datum/spell/fireball/star_blast + cost = 1 + +/datum/heretic_knowledge/blade_upgrade/cosmic + name = "Cosmic Blade" + desc = "Your blade now deals damage to people's organs through cosmic radiation. \ + Your attacks will chain bonus damage to up to two previous victims. \ + The combo is reset after two seconds without making an attack, \ + or if you attack someone already marked. If you combo more than four attacks you will receive, \ + a cosmic trail and increase your combo timer up to ten seconds." + gain_text = "The Beast took my blades in their hand, I kneeled and felt a sharp pain. \ + The blades now glistened with fragmented power. I fell to the ground and wept at the beast's feet." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_cosmos" + /// Storage for the second target. + var/second_target + /// Storage for the third target. + var/third_target + /// When this timer completes we reset our combo. + var/combo_timer + /// The active duration of the combo. + var/combo_duration = 3 SECONDS + /// The duration of a combo when it starts. + var/combo_duration_amount = 3 SECONDS + /// The maximum duration of the combo. + var/max_combo_duration = 10 SECONDS + /// The amount the combo duration increases. + var/increase_amount = 0.5 SECONDS + /// The hits we have on a mob with a mind. + var/combo_counter = 0 + +/datum/heretic_knowledge/blade_upgrade/cosmic/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + var/static/list/valid_organ_slots = list( + /obj/item/organ/internal/heart, + /obj/item/organ/internal/lungs, + /obj/item/organ/internal/eyes, + /obj/item/organ/internal/ears, + /obj/item/organ/internal/liver, + /obj/item/organ/internal/brain + ) + if(source == target || !isliving(target)) + return + if(combo_timer) + deltimer(combo_timer) + combo_timer = addtimer(CALLBACK(src, PROC_REF(reset_combo), source), combo_duration, TIMER_STOPPABLE) + var/mob/living/second_target_resolved = locateUID(second_target) + var/mob/living/third_target_resolved = locateUID(third_target) + var/need_mob_update = FALSE + need_mob_update += target.adjustFireLoss(5, updating_health = FALSE) + var/obj/item/organ/internal/organ_to_stab = target.get_int_organ(/obj/item/organ/internal/liver) + if(organ_to_stab) + organ_to_stab.receive_damage(8, TRUE) + if(need_mob_update) + target.updatehealth() + if(target == second_target_resolved || target == third_target_resolved) + reset_combo(source) + return + if(target.mind && target.stat != DEAD) + combo_counter += 1 + if(second_target_resolved) + new /obj/effect/temp_visual/cosmic_explosion(get_turf(second_target_resolved)) + playsound(get_turf(second_target_resolved), 'sound/magic/cosmic_energy.ogg', 25, FALSE) + need_mob_update = FALSE + need_mob_update += second_target_resolved.adjustFireLoss(14, updating_health = FALSE) + var/obj/item/organ/internal/second_organ_to_stab = second_target_resolved.get_int_organ(/obj/item/organ/internal/liver) + if(second_organ_to_stab) + second_organ_to_stab.receive_damage(12, TRUE) + if(need_mob_update) + second_target_resolved.updatehealth() + if(third_target_resolved) + new /obj/effect/temp_visual/cosmic_domain(get_turf(third_target_resolved)) + playsound(get_turf(third_target_resolved), 'sound/magic/cosmic_energy.ogg', 50, FALSE) + need_mob_update = FALSE + need_mob_update += third_target_resolved.adjustFireLoss(28, updating_health = FALSE) + var/obj/item/organ/internal/third_organ_to_stab = third_target_resolved.get_int_organ(/obj/item/organ/internal/liver) + if(third_organ_to_stab) + third_organ_to_stab.receive_damage(14, TRUE) + if(need_mob_update) + third_target_resolved.updatehealth() + if(combo_counter > 3) + target.apply_status_effect(/datum/status_effect/star_mark, source) + if(target.mind && target.stat != DEAD) + increase_combo_duration() + if(combo_counter == 4) + source.AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + third_target = second_target + second_target = target.UID() + +/// Resets the combo. +/datum/heretic_knowledge/blade_upgrade/cosmic/proc/reset_combo(mob/living/source) + second_target = null + third_target = null + if(combo_counter > 3) + source.RemoveElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + combo_duration = combo_duration_amount + combo_counter = 0 + new /obj/effect/temp_visual/cosmic_cloud(get_turf(source)) + if(combo_timer) + deltimer(combo_timer) + +/// Increases the combo duration. +/datum/heretic_knowledge/blade_upgrade/cosmic/proc/increase_combo_duration() + if(combo_duration < max_combo_duration) + combo_duration += increase_amount + +/datum/heretic_knowledge/spell/cosmic_expansion + name = "Cosmic Expansion" + desc = "Grants you Cosmic Expansion, a spell that creates a 3x3 area of cosmic fields around you. \ + Nearby beings will also receive a star mark." + gain_text = "The ground now shook beneath me. The Beast inhabited me, and their voice was intoxicating." + action_to_add = /datum/spell/aoe/conjure/cosmic_expansion + cost = 1 + +/datum/heretic_knowledge/ultimate/cosmic_final + name = "Creators's Gift" + desc = "The ascension ritual of the Path of Cosmos. \ + Bring sentient 3 corpses with bluespace dust in their body to a transmutation rune to complete the ritual. \ + When completed, you become the owner of a Star Gazer. \ + You will be able to command the Star Gazer with Alt+click. \ + You can also give it commands through speech. \ + The Star Gazer is a strong ally who can even break down reinforced walls. \ + The Star Gazer has an aura that will heal you and damage opponents. \ + Star Touch can now teleport you to the Star Gazer when activated in your hand. \ + Your cosmic expansion spell and your blades also become greatly empowered." + gain_text = "The Beast held out its hand, I grabbed hold and they pulled me to them. Their body was towering, but it seemed so small and feeble after all their tales compiled in my head. \ + I clung on to them, they would protect me, and I would protect it. \ + I closed my eyes with my head laid against their form. I was safe. \ + WITNESS MY ASCENSION!" + + + announcement_text = "%SPOOKY% A Star Gazer has arrived into the station, %NAME% has ascended! This station is the domain of the Cosmos! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_cosmic.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "cosmicascend" + +/datum/heretic_knowledge/ultimate/cosmic_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + . = ..() + if(!.) + return FALSE + if(!sacrifice.reagents.has_reagent("bluespace_dust")) + return FALSE + return TRUE + +/datum/heretic_knowledge/ultimate/cosmic_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + var/mob/living/basic/heretic_summon/star_gazer/star_gazer_mob = new /mob/living/basic/heretic_summon/star_gazer(our_turf) + star_gazer_mob.master_commander = user + star_gazer_mob.befriend(user) + star_gazer_mob.maxHealth = INFINITY + star_gazer_mob.health = INFINITY + user.AddComponent(/datum/component/death_linked, star_gazer_mob) + star_gazer_mob.AddComponent(/datum/component/damage_aura, range = 7, burn_damage = 0.5, simple_damage = 0.5, immune_factions = list("heretic"), current_owner = user) + var/datum/spell/touch/star_touch/star_touch_spell = locate() in user.mob_spell_list + if(star_touch_spell) + star_touch_spell.set_star_gazer(star_gazer_mob) + star_touch_spell.ascended = TRUE + + var/datum/antagonist/heretic/heretic_datum = user.mind.has_antag_datum(/datum/antagonist/heretic) + var/datum/heretic_knowledge/blade_upgrade/cosmic/blade_upgrade = heretic_datum.get_knowledge(/datum/heretic_knowledge/blade_upgrade/cosmic) + blade_upgrade.combo_duration = 10 SECONDS + blade_upgrade.combo_duration_amount = 10 SECONDS + blade_upgrade.max_combo_duration = 30 SECONDS + blade_upgrade.increase_amount = 2 SECONDS + + var/datum/spell/aoe/conjure/cosmic_expansion/cosmic_expansion_spell = locate() in user.mob_spell_list + cosmic_expansion_spell?.ascended = TRUE + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a star gazer?", ROLE_HERETIC, TRUE, 10 SECONDS, min_hours = 100, source = star_gazer_mob) + var/mob/chosen_one + if(length(candidates)) + chosen_one = pick(candidates) + if(!chosen_one) + return + star_gazer_mob.key = chosen_one.key + + star_gazer_mob.mind.add_antag_datum(new /datum/antagonist/mindslave/heretic_monster(user.mind)) + diff --git a/code/modules/antagonists/heretic/knowledge/flesh_lore.dm b/code/modules/antagonists/heretic/knowledge/flesh_lore.dm new file mode 100644 index 00000000000..4d36b9acb54 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/flesh_lore.dm @@ -0,0 +1,328 @@ +/// The max amount of health a ghoul has. +#define GHOUL_MAX_HEALTH 25 +/// The max amount of health a voiceless dead has. +#define MUTE_MAX_HEALTH 50 + +/datum/heretic_knowledge_tree_column/main/flesh + neighbour_type_left = /datum/heretic_knowledge_tree_column/lock_to_flesh + neighbour_type_right = /datum/heretic_knowledge_tree_column/flesh_to_void + + route = PATH_FLESH + ui_bgr = "node_flesh" + + start = /datum/heretic_knowledge/limited_amount/starting/base_flesh + grasp = /datum/heretic_knowledge/limited_amount/flesh_grasp + tier1 = /datum/heretic_knowledge/limited_amount/flesh_ghoul + mark = /datum/heretic_knowledge/mark/flesh_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/flesh + unique_ability = /datum/heretic_knowledge/spell/flesh_surgery + tier2 = /datum/heretic_knowledge/summon/raw_prophet + blade = /datum/heretic_knowledge/blade_upgrade/flesh + tier3 = /datum/heretic_knowledge/summon/stalker + ascension = /datum/heretic_knowledge/ultimate/flesh_final + +/datum/heretic_knowledge/limited_amount/starting/base_flesh + name = "Principle of Hunger" + desc = "Opens up the Path of Flesh to you. \ + Allows you to transmute a knife and a pool of blood into a Bloody Blade. \ + You can only create four at a time." + gain_text = "Hundreds of us starved, but not me... I found strength in my greed." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/effect/decal/cleanable/blood = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/flesh) + limit = 4 // Bumped up so they can arm up their ghouls too. + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "flesh_blade" + +/datum/heretic_knowledge/limited_amount/starting/base_flesh/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.add_antag_objective(/datum/objective/heretic_summon) + + to_chat(user, SPAN_HIEROPHANT("Undertaking the Path of Flesh, you are given another objective.")) + +/datum/heretic_knowledge/limited_amount/flesh_grasp + name = "Grasp of Flesh" + desc = "Your Mansus Grasp gains the ability to create a ghoul out of corpse with a soul. \ + Ghouls have only 25 health and look like husks to the heathens' eyes, but can use Bloody Blades effectively. \ + You can only create one at a time by this method." + gain_text = "My new found desires drove me to greater and greater heights." + + cost = 1 + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_flesh" + +/datum/heretic_knowledge/limited_amount/flesh_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + our_heretic.monster_limit = 4 // Flesh path uniquely gets a 4 monster limit. + +/datum/heretic_knowledge/limited_amount/flesh_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + our_heretic.monster_limit = 2 + +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(target.stat != DEAD) + return + + if(LAZYLEN(created_items) >= limit) + to_chat(source, SPAN_HIEROPHANT_WARNING("The ritual has failed, you are at your ghoul limit.")) + return COMPONENT_BLOCK_HAND_USE + + if(HAS_TRAIT(target, TRAIT_HUSK)) + to_chat(source, SPAN_HIEROPHANT_WARNING("The ritual has failed, the target is husked.")) + return COMPONENT_BLOCK_HAND_USE + + if(!IS_VALID_GHOUL_MOB(target)) + to_chat(source, SPAN_HIEROPHANT_WARNING("The ritual has failed, the target not valid.")) + return COMPONENT_BLOCK_HAND_USE + + var/datum/antagonist/heretic/howetic = IS_HERETIC(source) + for(var/uid_finder as anything in howetic.list_of_our_monsters) + var/atom/real_thing = locateUID(uid_finder) + if(QDELETED(real_thing)) + LAZYREMOVE(howetic.list_of_our_monsters, uid_finder) + if(LAZYLEN(howetic.list_of_our_monsters) >= howetic.monster_limit) + to_chat(source, SPAN_HIEROPHANT("The ritual failed, you are at your limit of [howetic.monster_limit] monsters!")) + return COMPONENT_BLOCK_HAND_USE + + target.grab_ghost() + + // The grab failed, so they're mindless or playerless. We can't continue + if(!target.mind || !target.client) + to_chat(source, SPAN_HIEROPHANT_WARNING("The ritual has failed, the target has no soul.")) + return COMPONENT_BLOCK_HAND_USE + + make_ghoul(source, target) + +/// Makes [victim] into a ghoul. +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/make_ghoul(mob/living/user, mob/living/carbon/human/victim) + message_admins("[ADMIN_LOOKUPFLW(user)] created a ghoul, [ADMIN_LOOKUPFLW(victim)].") + + victim.apply_status_effect( + /datum/status_effect/ghoul, + GHOUL_MAX_HEALTH, + user.mind, + CALLBACK(src, PROC_REF(apply_to_ghoul)), + CALLBACK(src, PROC_REF(remove_from_ghoul)), + ) + var/datum/antagonist/heretic/whoetic = IS_HERETIC(user) + LAZYADD(whoetic.list_of_our_monsters,victim.UID()) + +/// Callback for the ghoul status effect - Tracking all of our ghouls +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/apply_to_ghoul(mob/living/ghoul) + LAZYADD(created_items, ghoul.UID()) + ghoul.adjustBruteLoss(-10) //Undoes the damage of the hand + +/// Callback for the ghoul status effect - Tracking all of our ghouls +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/remove_from_ghoul(mob/living/ghoul) + LAZYREMOVE(created_items, ghoul.UID()) + +/datum/heretic_knowledge/limited_amount/flesh_ghoul + name = "Imperfect Ritual" + desc = "Allows you to transmute a corpse and a poppy to create a Voiceless Dead. \ + The corpse does not need to have a soul. \ + Voiceless Dead are mute ghouls and only have 50 health, but can use Bloody Blades effectively. \ + You can only create two at a time." + gain_text = "I found notes of a dark ritual, unfinished... yet still, I pushed forward." + required_atoms = list( + /mob/living/carbon/human = 1, + /obj/item/food/grown/poppy = 1, + ) + limit = 2 + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "ghoul_voiceless" + + + +/datum/heretic_knowledge/limited_amount/flesh_ghoul/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + . = ..() + if(!.) + return FALSE + + var/datum/antagonist/heretic/howetic = IS_HERETIC(user) + for(var/uid_finder as anything in howetic.list_of_our_monsters) + var/atom/real_thing = locateUID(uid_finder) + if(QDELETED(real_thing)) + LAZYREMOVE(howetic.list_of_our_monsters, uid_finder) + if(LAZYLEN(howetic.list_of_our_monsters) >= howetic.monster_limit) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, you are at your limit of [howetic.monster_limit] monsters!")) + return FALSE + + for(var/mob/living/carbon/human/body in atoms) + if(body.stat != DEAD) + continue + if(!IS_VALID_GHOUL_MOB(body) || HAS_TRAIT(body, TRAIT_HUSK)) + to_chat(user, SPAN_HIEROPHANT_WARNING("[body] is not in a valid state to be made into a ghoul.")) + continue + + // We'll select any valid bodies here. If they're clientless, we'll give them a new one. + selected_atoms += body + return TRUE + + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, there is no valid body.")) + return FALSE + +/datum/heretic_knowledge/limited_amount/flesh_ghoul/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/mob/living/carbon/human/soon_to_be_ghoul = locate() in selected_atoms + if(QDELETED(soon_to_be_ghoul)) // No body? No ritual + stack_trace("[type] reached on_finished_recipe without a human in selected_atoms to make a ghoul out of.") + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, there is no valid body.")) + return FALSE + + soon_to_be_ghoul.grab_ghost() + + if(!soon_to_be_ghoul.mind || !soon_to_be_ghoul.client) + message_admins("[ADMIN_LOOKUPFLW(user)] is creating a voiceless dead of a body with no player.") + var/list/possible_ones = SSghost_spawns.poll_candidates("Do you want to play as [soon_to_be_ghoul.real_name], a voiceless dead?", ROLE_HERETIC, TRUE, 10 SECONDS, source = soon_to_be_ghoul) + if(!length(possible_ones)) + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, no spirits possessed the summon!")) + return FALSE + var/mob/chosen_one = pick(possible_ones) + message_admins("[key_name_admin(chosen_one)] has taken control of ([key_name_admin(soon_to_be_ghoul)]) to replace an AFK player.") + soon_to_be_ghoul.ghostize(FALSE) + soon_to_be_ghoul.key = chosen_one.key + + selected_atoms -= soon_to_be_ghoul + make_ghoul(user, soon_to_be_ghoul) + return TRUE + +/// Makes [victim] into a ghoul. +/datum/heretic_knowledge/limited_amount/flesh_ghoul/proc/make_ghoul(mob/living/user, mob/living/carbon/human/victim) + message_admins("[ADMIN_LOOKUPFLW(user)] created a voiceless dead, [ADMIN_LOOKUPFLW(victim)].") + + victim.apply_status_effect( + /datum/status_effect/ghoul, + MUTE_MAX_HEALTH, + user.mind, + CALLBACK(src, PROC_REF(apply_to_ghoul)), + CALLBACK(src, PROC_REF(remove_from_ghoul)), + ) + var/datum/antagonist/heretic/whoetic = IS_HERETIC(user) + LAZYADD(whoetic.list_of_our_monsters,victim.UID()) + +/// Callback for the ghoul status effect - Tracks all of our ghouls and applies effects +/datum/heretic_knowledge/limited_amount/flesh_ghoul/proc/apply_to_ghoul(mob/living/ghoul) + LAZYADD(created_items, ghoul.UID()) + ADD_TRAIT(ghoul, TRAIT_MUTE, MAGIC_TRAIT) + +/// Callback for the ghoul status effect - Tracks all of our ghouls and applies effects +/datum/heretic_knowledge/limited_amount/flesh_ghoul/proc/remove_from_ghoul(mob/living/ghoul) + LAZYREMOVE(created_items, ghoul.UID()) + REMOVE_TRAIT(ghoul, TRAIT_MUTE, MAGIC_TRAIT) + +/datum/heretic_knowledge/mark/flesh_mark + name = "Mark of Flesh" + desc = "Your Mansus Grasp now applies the Mark of Flesh. The mark is triggered from an attack with your Bloody Blade. \ + When triggered, the victim begins to bleed significantly." + gain_text = "That's when I saw them, the marked ones. They were out of reach. They screamed, and screamed." + + + mark_type = /datum/status_effect/eldritch/flesh + +/datum/heretic_knowledge/knowledge_ritual/flesh + +/datum/heretic_knowledge/spell/flesh_surgery + name = "Knitting of Flesh" + desc = "Grants you the spell Knit Flesh. This spell allows you to remove organs from victims \ + without requiring a lengthy surgery. This process is much longer if the target is not dead. \ + This spell also allows you to heal your minions and summons, or restore failing organs to acceptable status." + gain_text = "But they were not out of my reach for long. With every step, the screams grew, until at last \ + I learned that they could be silenced." + action_to_add = /datum/spell/touch/flesh_surgery + cost = 1 + +/datum/heretic_knowledge/summon/raw_prophet + name = "Raw Ritual" + desc = "Allows you to transmute a pair of eyes, a left arm, and a pool of blood to create a Raw Prophet. \ + Raw Prophets have a greatly increased sight range and x-ray vision, as well as a long range jaunt, \ + but are very fragile and weak in combat." + gain_text = "I could not continue alone. I was able to summon The Uncanny Man to help me see more. \ + The screams... once constant, now silenced by their wretched appearance. Nothing was out of reach." + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/effect/decal/cleanable/blood = 1, + list(/obj/item/organ/external/arm, /obj/item/robot_parts/l_arm) = 1, + ) + banned_atom_types = list( + /obj/item/organ/external/arm/right + ) + + mob_to_summon = /mob/living/basic/heretic_summon/raw_prophet + cost = 1 + + +/datum/heretic_knowledge/blade_upgrade/flesh + name = "Bleeding Steel" + desc = "Your Bloody Blade now causes enemies to bleed heavily on attack." + gain_text = "The Uncanny Man was not alone. They led me to the Marshal. \ + I finally began to understand. And then, blood rained from the heavens." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_flesh" + ///What type of wound do we apply on hit + +/datum/heretic_knowledge/blade_upgrade/flesh/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(!iscarbon(target) || source == target) + return + + var/mob/living/carbon/carbon_target = target + carbon_target.bleed(50) + +/datum/heretic_knowledge/summon/stalker + name = "Lonely Ritual" + desc = "Allows you to transmute three slabs of meat, a pen and a piece of paper to create a Stalker. \ + Stalkers can jaunt, release EMPs, shapeshift into animals or automatons, and are strong in combat." + gain_text = "I was able to combine my greed and desires to summon an eldritch beast I had never seen before. \ + An ever shapeshifting mass of flesh, it knew well my goals. The Marshal approved." + + required_atoms = list( + /obj/item/food/meat = 3, + /obj/item/pen = 1, + /obj/item/paper = 1, + ) + mob_to_summon = /mob/living/basic/heretic_summon/stalker + mind_spell = /datum/spell/shapeshift/eldritch + cost = 1 + + + +/datum/heretic_knowledge/ultimate/flesh_final + name = "Priest's Final Hymn" + desc = "The ascension ritual of the Path of Flesh. \ + Bring 4 corpses to a transmutation rune to complete the ritual. \ + When completed, you gain the ability to shed your human form \ + and become the Lord of the Night, a supremely powerful creature. \ + Just the act of transforming causes nearby heathens great fear and trauma. \ + While in the Lord of the Night form, you can consume arms to heal and regain segments. \ + Additionally, you can summon three times as many Ghouls and Voiceless Dead, \ + and can create unlimited blades to arm them all." + gain_text = "With the Marshal's knowledge, my power had peaked. The throne was open to claim. \ + Men of this world, hear me, for the time has come! The Marshal guides my army! \ + Reality will bend to THE LORD OF THE NIGHT or be unraveled! WITNESS MY ASCENSION!" + required_atoms = list(/mob/living/carbon/human = 4) + + announcement_text = "%SPOOKY% Ever coiling vortex. Reality unfolded. ARMS OUTREACHED, THE LORD OF THE NIGHT, %NAME% has ascended! Fear the ever twisting hand! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_flesh.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "fleshascend" + +/datum/heretic_knowledge/ultimate/flesh_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + var/datum/spell/shapeshift/shed_human_form/worm_spell = new(user.mind) + user.mind.AddSpell(worm_spell) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/datum/heretic_knowledge/limited_amount/flesh_grasp/grasp_ghoul = heretic_datum.get_knowledge(/datum/heretic_knowledge/limited_amount/flesh_grasp) + grasp_ghoul.limit *= 3 + var/datum/heretic_knowledge/limited_amount/flesh_ghoul/ritual_ghoul = heretic_datum.get_knowledge(/datum/heretic_knowledge/limited_amount/flesh_ghoul) + ritual_ghoul.limit *= 3 + var/datum/heretic_knowledge/limited_amount/starting/base_flesh/blade_ritual = heretic_datum.get_knowledge(/datum/heretic_knowledge/limited_amount/starting/base_flesh) + blade_ritual.limit = 999 + +#undef GHOUL_MAX_HEALTH +#undef MUTE_MAX_HEALTH diff --git a/code/modules/antagonists/heretic/knowledge/general_side.dm b/code/modules/antagonists/heretic/knowledge/general_side.dm new file mode 100644 index 00000000000..a92c0c9c184 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/general_side.dm @@ -0,0 +1,105 @@ +// Some general sidepath options. + +/datum/heretic_knowledge/reroll_targets + name = "The Relentless Heartbeat" + desc = "Allows you transmute a harebell, a book, and a jumpsuit while standing over a rune \ + to reroll your sacrifice targets." + gain_text = "The heart is the principle that continues and preserves." + required_atoms = list( + /obj/item/food/grown/harebell = 1, + /obj/item/book = 1, + /obj/item/clothing/under = 1, + ) + cost = 1 + research_tree_icon_path = 'icons/mob/actions/actions_animal.dmi' + research_tree_icon_state = "gaze" + +/datum/heretic_knowledge/reroll_targets/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + // Check first if they have a Living Heart. If it's missing, we should + // throw a fail to show the heretic that there's no point in rerolling + // if you don't have a heart to track the targets in the first place. + if(heretic_datum.has_living_heart() != HERETIC_HAS_LIVING_HEART) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, you have no living heart!")) + return FALSE + + return TRUE + +/datum/heretic_knowledge/reroll_targets/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + for(var/mob/living/carbon/human/target as anything in heretic_datum.sac_targets) + heretic_datum.remove_sacrifice_target(target) + + var/datum/heretic_knowledge/hunt_and_sacrifice/target_finder = heretic_datum.get_knowledge(/datum/heretic_knowledge/hunt_and_sacrifice) + if(!target_finder) + CRASH("Heretic datum didn't have a hunt_and_sacrifice knowledge learned, what?") + + if(!target_finder.obtain_targets(user, heretic_datum = heretic_datum)) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, there were no targets found!")) + return FALSE + + return TRUE + +// This is automatically gained after the knowledge ritual. +/datum/heretic_knowledge/unsealed_art + name = "The Arts Unsealed" + desc = "Open yourself to the influences of the manuses, gleaning what you have learned to \ + create a magnum opus of art. A masterpiece above all others, that exudes its own unique influence." + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "book_open" + abstract_parent_type = /datum/heretic_knowledge/unsealed_art + required_atoms = list() + priority = 20 // fairly low priority + var/was_completed = FALSE + +/datum/heretic_knowledge/unsealed_art/New() + var/static/list/potential_organs = list( + /obj/item/organ/internal/appendix, + /obj/item/organ/internal/eyes, + /obj/item/organ/internal/ears, + /obj/item/organ/internal/heart, + /obj/item/organ/internal/liver, + /obj/item/organ/internal/lungs, + ) + + var/static/list/potential_uncommoner_items = list( + /obj/item/food/monkeycube, + /obj/item/megaphone, + /obj/item/toy/figure, + /obj/item/multitool, + /obj/item/clothing/gloves/color/yellow, + /obj/item/melee/baton, + /obj/item/reagent_containers/drinks/mug, + ) + + var/static/list/paint_item = list( + list(/obj/item/toy/crayon), + list(/obj/item/pen), + /obj/item/pen/red, + /obj/item/pen/blue, + /obj/item/pen/fancy, + /obj/item/painter, + /obj/item/reagent_containers/glass/paint, + ) + + required_atoms[pick(potential_organs)] += 1 + required_atoms[pick(potential_uncommoner_items)] += 1 + required_atoms[pick(paint_item)] += 1 + required_atoms[pick(paint_item)] += 1 + required_atoms[pick(paint_item)] += 1 + required_atoms[/obj/item/stack/sheet/cloth] += 1 + +/datum/heretic_knowledge/unsealed_art/can_be_invoked(datum/antagonist/heretic/invoker) + return !was_completed + +/datum/heretic_knowledge/unsealed_art/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + return !was_completed + +/datum/heretic_knowledge/unsealed_art/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/art = pick(subtypesof(/obj/structure/unsealed_art)) + new art(our_turf) + to_chat(user, SPAN_HIEROPHANT("We open ourself to otherworldly influences, and through them we glean inspiration for a masterpiece!")) + was_completed = TRUE + log_heretic_knowledge("[key_name(user)] completed a [name] at [worldtime2text()].") + return TRUE diff --git a/code/modules/antagonists/heretic/knowledge/lock_lore.dm b/code/modules/antagonists/heretic/knowledge/lock_lore.dm new file mode 100644 index 00000000000..65c6ee93d57 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/lock_lore.dm @@ -0,0 +1,230 @@ + +/datum/heretic_knowledge_tree_column/main/lock + neighbour_type_left = /datum/heretic_knowledge_tree_column/moon_to_lock + neighbour_type_right = /datum/heretic_knowledge_tree_column/lock_to_flesh + + route = PATH_LOCK + ui_bgr = "node_lock" + + start = /datum/heretic_knowledge/limited_amount/starting/base_knock + grasp = /datum/heretic_knowledge/lock_grasp + tier1 = /datum/heretic_knowledge/key_ring + mark = /datum/heretic_knowledge/mark/lock_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/lock + unique_ability = /datum/heretic_knowledge/limited_amount/concierge_rite + tier2 = /datum/heretic_knowledge/spell/burglar_finesse + blade = /datum/heretic_knowledge/blade_upgrade/flesh/lock + tier3 = /datum/heretic_knowledge/spell/caretaker_refuge + ascension = /datum/heretic_knowledge/ultimate/lock_final + +/datum/heretic_knowledge/limited_amount/starting/base_knock + name = "A Steward's Secret" + desc = "Opens up the Path of Lock to you. \ + Allows you to transmute a knife and a crowbar into a Key Blade. \ + You can only create two at a time and they function as fast crowbars. \ + In addition, they can fit into utility belts." + gain_text = "The Locked Labyrinth leads to freedom. But only the trapped Stewards know the correct path." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/crowbar = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/lock) + limit = 2 + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "key_blade" + +/datum/heretic_knowledge/lock_grasp + name = "Grasp of Lock" + desc = "Your mansus grasp allows you to access *mostly* anything! Alt click on an airlock or a locker to force it open. \ + DNA locks on mechs will be removed, and any pilot will be ejected. \ + Makes a distinctive knocking sound on use." + gain_text = "Nothing may remain closed from my touch." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_lock" + +/datum/heretic_knowledge/lock_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, PROC_REF(on_secondary_mansus_grasp)) + +/datum/heretic_knowledge/lock_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY) + + +/datum/heretic_knowledge/lock_grasp/proc/on_secondary_mansus_grasp(mob/living/source, atom/target) + SIGNAL_HANDLER + + if(ismecha(target)) + var/obj/mecha/mecha = target + mecha.dna = null + mecha.operation_req_access = list() + for(var/mob/living/occupant as anything in mecha.occupant) + if(issilicon(occupant)) + continue + INVOKE_ASYNC(src, PROC_REF(try_kick_out), mecha, occupant) + else if(istype(target, /obj/machinery/door/airlock)) + INVOKE_ASYNC(src, PROC_REF(try_open_airlock), target) + else if(istype(target, /obj/structure/closet)) + INVOKE_ASYNC(src, PROC_REF(try_open_closet), target) + + + playsound(target, 'sound/magic/hereticknock.ogg', 100, TRUE, -1) + + return COMPONENT_USE_HAND + +/datum/heretic_knowledge/lock_grasp/proc/try_open_airlock(obj/machinery/door/airlock/ourlock) + ourlock.unlock() + ourlock.open() + +/datum/heretic_knowledge/lock_grasp/proc/try_open_closet(obj/structure/closet/C) + if(istype(C, /obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/SC = C + SC.locked = FALSE + C.open() + +/datum/heretic_knowledge/lock_grasp/proc/try_kick_out(obj/mecha/mecha, mob/living/occupant) + mecha.go_out(1) + occupant.Weaken(5 SECONDS) + + +/datum/heretic_knowledge/key_ring + name = "Key Keeper’s Burden" + desc = "Allows you to transmute a wallet, an iron rod, and an ID card to create an Eldritch Card. \ + Hit a pair of airlocks with it to create a pair of portals, which will teleport you between them, but teleport non-heretics randomly. \ + You can ctrl-click the card to invert this behavior for created portals. \ + Each card may only sustain a single pair of portals at the same time. \ + It also functions and appears the same as a regular ID Card. \ + Attacking it with a normal ID card consumes it and gains its access, and you can use it in-hand to change its appearance to a card you fused. \ + Does not preserve the card originally used in the ritual." + gain_text = "The Keeper sneered. \"These plastic rectangles are a mockery of keys, and I curse every door that desires them.\"" + required_atoms = list( + /obj/item/storage/wallet = 1, + /obj/item/stack/rods = 1, + /obj/item/card/id = 1, + ) + result_atoms = list(/obj/item/card/id/heretic) + cost = 1 + research_tree_icon_path = 'icons/obj/card.dmi' + research_tree_icon_state = "card_gold" + /// passes the sacrificed ID's access to the card. + var/list/accesses = list() + +/datum/heretic_knowledge/key_ring/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + if(!length(result_atoms)) + return FALSE + for(var/obj/item/card/id/id in selected_atoms) + accesses += id.access + for(var/result in result_atoms) + if(istype(result, /obj/item/card/id)) + var/obj/item/card/id/new_card = new result(our_turf) + new_card.access = accesses + else + new result(our_turf) + accesses = list() + return TRUE + +/datum/heretic_knowledge/mark/lock_mark + name = "Mark of Lock" + desc = "Your Mansus Grasp now applies the Mark of Lock. \ + Attack a marked person to bar them from all passages for the duration of the mark. \ + This will make it so that they have no access whatsoever, even public access doors will reject them." + gain_text = "The Gatekeeper was a corrupt Steward. She hindered her fellows for her own twisted amusement." + mark_type = /datum/status_effect/eldritch/lock + +/datum/heretic_knowledge/knowledge_ritual/lock + +/datum/heretic_knowledge/limited_amount/concierge_rite // item that creates 3 max at a time heretic only barriers, probably should limit to 1 only, holy people can also pass + name = "Concierge's Rite" + desc = "Allows you to transmute a crayon, a wooden plank, and a multitool to create a Labyrinth Handbook. \ + It can materialize a barricade at range that only you and people resistant to magic can pass. 3 uses." + gain_text = "The Concierge scribbled my name into the Handbook. \"Welcome to your new home, fellow Steward.\"" + required_atoms = list( + /obj/item/toy/crayon = 1, + /obj/item/stack/sheet/wood = 1, + /obj/item/multitool = 1, + ) + result_atoms = list(/obj/item/heretic_labyrinth_handbook) + limit = 2 + cost = 1 + research_tree_icon_path = 'icons/obj/library.dmi' + research_tree_icon_state = "heretichandbook" + +/datum/heretic_knowledge/spell/burglar_finesse + name = "Burglar's Finesse" + desc = "Grants you Burglar's Finesse, a single-target spell \ + that puts a random item from the victims backpack into your hand." + gain_text = "Consorting with Burglar spirits is frowned upon, but a Steward will always want to learn about new doors." + + action_to_add = /datum/spell/pointed/burglar_finesse + cost = 1 + +/datum/heretic_knowledge/blade_upgrade/flesh/lock //basically a chance-based limb opening + name = "Opening Blade" + desc = "Your blade has a chance to open an limb on attack." + gain_text = "The Pilgrim-Surgeon was not an Steward. Nonetheless, its blades and sutures proved a match for their keys." + research_tree_icon_state = "blade_upgrade_lock" + var/chance = 35 + +/datum/heretic_knowledge/blade_upgrade/flesh/lock/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(prob(chance) && ishuman(target)) + var/obj/item/organ/external/lockbox = target.get_organ(source.zone_selected) + lockbox.open = ORGAN_ORGANIC_VIOLENT_OPEN + return ..() + +/datum/heretic_knowledge/spell/caretaker_refuge + name = "Caretaker’s Last Refuge" + desc = "Gives you a spell that makes you transparent and not dense. Cannot be used near living sentient beings. \ + While in refuge, you cannot use your hands or spells, and you are immune to slowdown. \ + You are invincible but unable to harm anything. Cancelled by being hit with an anti-magic item." + gain_text = "Jealously, the Guard and the Hound hunted me. But I unlocked my form, and was but a haze, untouchable." + action_to_add = /datum/spell/caretaker + cost = 1 + +/datum/heretic_knowledge/ultimate/lock_final + name = "Unlock the Labyrinth" + desc = "The ascension ritual of the Path of Knock. \ + Bring 3 corpses without organs in their torso to a transmutation rune to complete the ritual. \ + When completed, you will create a tear to the Labyrinth's heart; \ + a tear in reality located at the site of this ritual. \ + Eldritch creatures will endlessly pour from this rift \ + who are bound to obey your instructions, \ + and your keyblades will become even deadlier." + gain_text = "The Stewards guided me, and I guided them. \ + My foes were the Locks and my blades were the Key! \ + The Labyrinth will be Locked no more, and freedom will be ours! WITNESS US!" + required_atoms = list(/mob/living/carbon/human = 3) + + announcement_text = "Delta-class dimensional anomaly detec%SPOOKY% Reality rended, torn. Gates open, doors open, %NAME% has ascended! Fear the tide! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_knock.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "lockascend" + +/datum/heretic_knowledge/ultimate/lock_final/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + . = ..() + if(!.) + return FALSE + + for(var/mob/living/carbon/human/body in atoms) + if(body.stat != DEAD) + continue + var/obj/item/organ/external/affecting = body.get_organ(BODY_ZONE_CHEST) + if(length(affecting.contents)) + to_chat(user, SPAN_HIEROPHANT_WARNING("[body] has organs in their chest.")) + continue + + selected_atoms += body + + if(!LAZYLEN(selected_atoms)) + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, you do not have enough valid bodies.")) + return FALSE + return TRUE + +/datum/heretic_knowledge/ultimate/lock_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + // buffs +// var/datum/spell/shapeshift/eldritch/ascension/transform_spell = new(user.mind) +// user.mind.AddSpell(transform_spell) //qwertodo after tm, needs tweaks of shapeshift spell + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/datum/heretic_knowledge/blade_upgrade/flesh/lock/blade_upgrade = heretic_datum.get_knowledge(/datum/heretic_knowledge/blade_upgrade/flesh/lock) + blade_upgrade.chance += 30 + new /obj/structure/lock_tear(our_turf, user.mind) diff --git a/code/modules/antagonists/heretic/knowledge/moon_lore.dm b/code/modules/antagonists/heretic/knowledge/moon_lore.dm new file mode 100644 index 00000000000..5e2d59726d2 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/moon_lore.dm @@ -0,0 +1,200 @@ + +/datum/heretic_knowledge_tree_column/main/moon + neighbour_type_left = /datum/heretic_knowledge_tree_column/ash_to_moon + neighbour_type_right = /datum/heretic_knowledge_tree_column/moon_to_lock + + route = PATH_MOON + ui_bgr = "node_moon" + + start = /datum/heretic_knowledge/limited_amount/starting/base_moon + grasp = /datum/heretic_knowledge/moon_grasp + tier1 = /datum/heretic_knowledge/spell/moon_smile + mark = /datum/heretic_knowledge/mark/moon_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/moon + unique_ability = /datum/heretic_knowledge/spell/moon_parade + tier2 = /datum/heretic_knowledge/moon_amulet + blade = /datum/heretic_knowledge/blade_upgrade/moon + tier3 = /datum/heretic_knowledge/spell/moon_ringleader + ascension = /datum/heretic_knowledge/ultimate/moon_final + +/datum/heretic_knowledge/limited_amount/starting/base_moon + name = "Moonlight Troupe" + desc = "Opens up the Path of Moon to you. \ + Allows you to transmute 2 sheets of iron and a knife into an Lunar Blade. \ + You can only create three at a time." + gain_text = "Under the light of the moon the laughter echoes." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/stack/sheet/metal = 2, + ) + result_atoms = list(/obj/item/melee/sickly_blade/moon) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "moon_blade" + +/datum/heretic_knowledge/moon_grasp + name = "Grasp of Lunacy" + desc = "Your Mansus Grasp will cause your victims to hallucinate everyone as lunar mass, \ + and hides your identity for a short duration." + gain_text = "The troupe on the side of the moon showed me truth, and I took it." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_moon" + +/datum/heretic_knowledge/moon_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/moon_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/moon_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + if(target.can_block_magic(MAGIC_RESISTANCE_MIND)) + to_chat(target, SPAN_DANGER("You hear echoing laughter from above..but it is dull and distant.")) + return + + source.apply_status_effect(/datum/status_effect/moon_grasp_hide) + + if(!iscarbon(target)) + return + var/mob/living/carbon/carbon_target = target + to_chat(carbon_target, SPAN_DANGER("You hear echoing laughter from above
")) + new /obj/effect/hallucination/delusion(get_turf(carbon_target), carbon_target, 'icons/effects/eldritch.dmi', "heretic") + carbon_target.apply_status_effect(/datum/status_effect/stacking/heretic_insanity, 2) + +/datum/heretic_knowledge/spell/moon_smile + name = "Smile of the moon" + desc = "Grants you Smile of the moon, a ranged spell muting, blinding, and deafening the target for a\ + duration based on their sanity, and knocks down the victim with sufficient sanity loss." + gain_text = "The moon smiles upon us all and those who see its true side can bring its joy." + + action_to_add = /datum/spell/pointed/moon_smile + cost = 1 + +/datum/heretic_knowledge/mark/moon_mark + name = "Mark of Moon" + desc = "Your Mansus Grasp now applies the Mark of Moon, pacifying the victim until attacked. \ + The mark can also be triggered from an attack with your Moon Blade, leaving the victim confused." + gain_text = "The troupe on the moon would dance all day long \ + and in that dance the moon would smile upon us \ + but when the night came its smile would dull forced to gaze on the earth." + mark_type = /datum/status_effect/eldritch/moon + +/datum/heretic_knowledge/knowledge_ritual/moon + +/datum/heretic_knowledge/spell/moon_parade + name = "Lunar Parade" + desc = "Grants you Lunar Parade, a spell that - after a short charge - sends a carnival forward \ + when hitting someone they are forced to join the parade and suffer hallucinations." + gain_text = "The music like a reflection of the soul compelled them, like moths to a flame they followed" + action_to_add = /datum/spell/fireball/moon_parade + cost = 1 + +/datum/heretic_knowledge/moon_amulet + name = "Moonlight Amulet" + desc = "Allows you to transmute 2 sheets of glass, a heart and a tie to create a Moonlight Amulet. \ + If the item is used on someone with low sanity they go berserk attacking everyone around them." + gain_text = "At the head of the parade he stood, the moon condensed into one mass, a reflection of the soul." + + required_atoms = list( + /obj/item/organ/internal/heart = 1, + /obj/item/stack/sheet/glass = 2, + /obj/item/clothing/neck/tie = 1, + ) + result_atoms = list(/obj/item/clothing/neck/heretic_focus/moon_amulet) + cost = 1 + + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "moon_amulette" + research_tree_icon_frame = 9 + +/datum/heretic_knowledge/blade_upgrade/moon + name = "Moonlight Blade" + desc = "Your blade now inflicts insanity, and causes random halleucinations." + gain_text = "His wit was sharp as a blade, cutting through the lie to bring us joy." + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_moon" + +/datum/heretic_knowledge/blade_upgrade/moon/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + + if(target.can_block_magic(MAGIC_RESISTANCE_MIND)) + return + + target.apply_status_effect(/datum/spell/pointed/moon_smile) + target.Hallucinate(10 SECONDS) + target.emote(pick("giggle", "laugh")) + +/datum/heretic_knowledge/spell/moon_ringleader + name = "Ringleaders Rise" + desc = "Grants you Ringleaders Rise, an AoE spell that inflicts sanity and confusion upon its victims. \ + If the victim has been inflicted with enough insanity, they will convert into a follower of the moon." + gain_text = "I grabbed his hand and we rose, those who saw the truth rose with us. \ + The ringleader pointed up and the dim light of truth illuminated us further." + + action_to_add = /datum/spell/aoe/moon_ringleader + cost = 1 + + + research_tree_icon_frame = 5 + +/datum/heretic_knowledge/ultimate/moon_final + name = "The Last Act" + desc = "The ascension ritual of the Path of Moon. \ + Bring 3 corpses with more than 50 brain damage to a transmutation rune to complete the ritual. \ + When completed, you will summon forth an Avatar of the Moon to ride atop in its glory. \ + The Avatar may crush walls, people, and objects underneath it with ease, and will \ + potentially convert those it crushes into lunatics." + gain_text = "We dived down towards the crowd, his soul splitting off in search of greater venture \ + for where the Ringleader had started the parade, I shall continue it unto the suns demise \ + WITNESS MY ASCENSION, THE MOON SMILES ONCE MORE AND FOREVER MORE IT SHALL!" + + announcement_text = "%SPOOKY% Laugh, for the ringleader %NAME% has ascended! \ + The truth shall finally devour the lie! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_moon.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "moonascend" + +/datum/heretic_knowledge/ultimate/moon_final/is_valid_sacrifice(mob/living/sacrifice) + var/brain_damage = sacrifice.getBrainLoss() + // Checks if our target has enough brain damage + if(brain_damage < 50) + return FALSE + return ..() + +/datum/heretic_knowledge/ultimate/moon_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + var/obj/tgvehicle/moon_ascension/ball = new(our_turf) + ball.owner = user + var/datum/spell/summonitem/moon/spell = new() + spell.marked_item = ball + spell.moon = ball + user.AddSpell(spell) + +/datum/spell/summonitem/moon + name = "Summon Avatar" + desc = "Summon the Avatar of the Moon to your current location." + invocation = "RISE!" + invocation_type = "shout" + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + action_icon_state = "moon_ride" + var/obj/tgvehicle/moon_ascension/moon + +/datum/spell/summonitem/moon/cast(list/targets, mob/user = usr) + if(!moon) + to_chat(user, SPAN_HIEROPHANT_WARNING("THE AVATAR IS DEAD! DESPAIR!")) + cooldown_handler.revert_cast() + return FALSE + if(moon.is_occupant(user)) // prevents use of the spell when on the moon. + to_chat(user, SPAN_WARNING("You cannot summon the avatar while utilizing it!")) + cooldown_handler.revert_cast() + return FALSE + return ..() + +/datum/spell/summonitem/moon/create_new_targeting() + return new /datum/spell_targeting/self diff --git a/code/modules/antagonists/heretic/knowledge/rust_lore.dm b/code/modules/antagonists/heretic/knowledge/rust_lore.dm new file mode 100644 index 00000000000..4a6b39702f1 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/rust_lore.dm @@ -0,0 +1,291 @@ + +/datum/heretic_knowledge_tree_column/main/rust + neighbour_type_left = /datum/heretic_knowledge_tree_column/blade_to_rust + neighbour_type_right = /datum/heretic_knowledge_tree_column/rust_to_cosmic + + route = PATH_RUST + ui_bgr = "node_rust" + + start = /datum/heretic_knowledge/limited_amount/starting/base_rust + grasp = /datum/heretic_knowledge/rust_fist + tier1 = /datum/heretic_knowledge/rust_regen + mark = /datum/heretic_knowledge/mark/rust_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/rust + unique_ability = /datum/heretic_knowledge/spell/rust_construction + tier2 = /datum/heretic_knowledge/spell/area_conversion + blade = /datum/heretic_knowledge/blade_upgrade/rust + tier3 = /datum/heretic_knowledge/spell/entropic_plume + ascension = /datum/heretic_knowledge/ultimate/rust_final + +/datum/heretic_knowledge/limited_amount/starting/base_rust + name = "Blacksmith's Tale" + desc = "Opens up the Path of Rust to you. \ + Allows you to transmute a knife with any trash item into a Rusty Blade. \ + You can only create three at a time." + gain_text = "\"Let me tell you a story\", said the Blacksmith, as he gazed deep into his rusty blade." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/trash = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/rust) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "rust_blade" + +/datum/heretic_knowledge/rust_fist + name = "Grasp of Rust" + desc = "Your Mansus Grasp will deal 500 damage to non-living matter and rust any surface it touches. \ + Already rusted surfaces are destroyed. Surfaces and structures can only be rusted by using Alt-Click. \ + Allows you to rust basic iron walls and floors." + gain_text = "On the ceiling of the Mansus, rust grows as moss does on a stone." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_rust" + +/datum/heretic_knowledge/rust_fist/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, PROC_REF(on_secondary_mansus_grasp)) + our_heretic.increase_rust_strength() + +/datum/heretic_knowledge/rust_fist/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, list(COMSIG_HERETIC_MANSUS_GRASP_ATTACK, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY)) + +/datum/heretic_knowledge/rust_fist/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(!issilicon(target) && !(target.mob_biotypes & MOB_ROBOTIC)) + return + + source.do_rust_heretic_act(target) + +/datum/heretic_knowledge/rust_fist/proc/on_secondary_mansus_grasp(mob/living/source, atom/target) + SIGNAL_HANDLER + + // Rusting an airlock causes it to lose power, mostly to prevent the airlock from shocking you. + // This is a bit of a hack, but fixing this would require the entire wire cut/pulse system to be reworked. + if(istype(target, /obj/machinery/door/airlock)) + var/obj/machinery/door/airlock/airlock = target + airlock.loseMainPower() + + source.do_rust_heretic_act(target) + return COMPONENT_USE_HAND + +/datum/heretic_knowledge/rust_regen + name = "Leeching Walk" + desc = "Grants you passive healing and resistance to batons while standing over rust." + gain_text = "The speed was unparalleled, the strength unnatural. The Blacksmith was smiling." + cost = 1 + research_tree_icon_path = 'icons/effects/eldritch.dmi' + research_tree_icon_state = "cloud_swirl" + + +/datum/heretic_knowledge/rust_regen/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + user.AddElement(/datum/element/leeching_walk) + +/datum/heretic_knowledge/rust_regen/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + user.RemoveElement(/datum/element/leeching_walk) + +/datum/heretic_knowledge/mark/rust_mark + name = "Mark of Rust" + desc = "Your Mansus Grasp now applies the Mark of Rust. The mark is triggered from an attack with your Rusty Blade. \ + When triggered, your victim will suffer heavy disgust and confusion. \ + Allows you to rust reinforced walls and floors as well as plasteel." + gain_text = "The Blacksmith looks away. To a place lost long ago. \"Rusted Hills help those in dire need... at a cost.\"" + mark_type = /datum/status_effect/eldritch/rust + +/datum/heretic_knowledge/mark/rust_mark/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.increase_rust_strength() + +/datum/heretic_knowledge/knowledge_ritual/rust + +/datum/heretic_knowledge/spell/rust_construction + name = "Rust Construction" + desc = "Grants you Rust Construction, a spell that allows you to raise a wall out of a rusted floor. \ + Anyone overtop the wall will be throw aside (or upwards) and sustain damage." + gain_text = "Images of foreign and ominous structures began to dance in my mind. Covered head to toe in thick rust, \ + they no longer looked man made. Or perhaps they never were in the first place." + action_to_add = /datum/spell/pointed/rust_construction + cost = 1 + +/datum/heretic_knowledge/spell/area_conversion + name = "Aggressive Spread" + desc = "Grants you Aggressive Spread, a spell that spreads rust to nearby surfaces. \ + Already rusted surfaces are destroyed \ Also improves the rusting abilities of non rust-heretics." + gain_text = "All wise men know well not to visit the Rusted Hills... Yet the Blacksmith's tale was inspiring." + action_to_add = /datum/spell/aoe/rust_conversion + cost = 1 + research_tree_icon_frame = 5 + +/datum/heretic_knowledge/spell/area_conversion/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.increase_rust_strength(TRUE) + +/datum/heretic_knowledge/blade_upgrade/rust + name = "Toxic Blade" + desc = "Your Rusty Blade now disgusts enemies on attack \ Allows you to rust Titanium and Plastitanium.." + gain_text = "The Blacksmith hands you their blade. \"The Blade will guide you through the flesh, should you let it.\" \ + The heavy rust weights it down. You stare deeply into it. The Rusted Hills call for you, now." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_rust" + +/datum/heretic_knowledge/blade_upgrade/rust/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.increase_rust_strength() + +/datum/heretic_knowledge/blade_upgrade/rust/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + target.adjust_disgust(10 SECONDS) + +/datum/heretic_knowledge/spell/entropic_plume + name = "Entropic Plume" + desc = "Grants you Entropic Plume, a spell that releases a vexing wave of Rust. \ + Blinds, poisons, and inflicts Amok on any heathen it hits, causing them to strike \ + at friend or foe wildly. Also rusts and destroys and surfaces it hits and improves the rusting abilities of non-rust heretics." + gain_text = "The corrosion was unstoppable. The rust was unpleasable. \ + The Blacksmith was gone, and you hold their blade. Champions of hope, the Rustbringer is nigh!" + + action_to_add = /datum/spell/cone/staggered/entropic_plume + cost = 1 + + + +/datum/heretic_knowledge/spell/entropic_plume/on_gain(mob/user) + . = ..() + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + our_heretic.increase_rust_strength(TRUE) + +/datum/heretic_knowledge/ultimate/rust_final + name = "Rustbringer's Oath" + desc = "The ascension ritual of the Path of Rust. \ + Bring 3 corpses to a transmutation rune on the bridge of the station to complete the ritual. \ + When completed, the ritual site will endlessly spread rust onto any surface, stopping for nothing. \ + Additionally, you will become extremely resilient on rust, healing at triple the rate \ + and becoming immune to many effects and dangers \ You will be able to rust almost anything upon ascending." + gain_text = "Champion of rust. Corruptor of steel. Fear the dark, for the RUSTBRINGER has come! \ + The Blacksmith forges ahead! Rusted Hills, CALL MY NAME! WITNESS MY ASCENSION!" + + announcement_text = "%SPOOKY% Fear the decay, for the Rustbringer, %NAME% has ascended! None shall escape the corrosion! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_rust.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "rustascend" + /// If TRUE, then immunities are currently active. + var/immunities_active = FALSE + /// A typepath to an area that we must finish the ritual in. + var/area/ritual_location = /area/station/command/bridge + /// A static list of traits we give to the heretic when on rust. + var/static/list/conditional_immunities = list( + TRAIT_BOMBIMMUNE, + TRAIT_IGNORESLOWDOWN, + TRAIT_NOSLIP, + TRAIT_NOBREATH, + TRAIT_PIERCEIMMUNE, + TRAIT_RADIMMUNE, + TRAIT_RESISTCOLD, + TRAIT_RESISTHEAT, + TRAIT_RESISTHIGHPRESSURE, + TRAIT_RESISTLOWPRESSURE, + TRAIT_SHOCKIMMUNE, + TRAIT_IGNOREDAMAGESLOWDOWN, + ) + +/datum/heretic_knowledge/ultimate/rust_final/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + // This map doesn't have a Bridge, for some reason?? + // Let them complete the ritual anywhere + //if(!GLOB.areas_by_type[ritual_location]) + //ritual_location = null + +/datum/heretic_knowledge/ultimate/rust_final/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + if(ritual_location) + var/area/our_area = get_area(our_turf) + if(!istype(our_area, ritual_location)) + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, it must be done in [initial(ritual_location.name)]!")) + return FALSE + + return ..() + +/datum/heretic_knowledge/ultimate/rust_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + trigger(our_turf) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + RegisterSignal(user, COMSIG_LIVING_LIFE, PROC_REF(on_life)) + var/datum/spell/aoe/rust_conversion/rust_spread_spell = locate() in user.mob_spell_list + rust_spread_spell?.cooldown_handler.recharge_duration /= 2 + +/datum/heretic_knowledge/ultimate/rust_final/proc/trigger(turf/center) + var/greatest_dist = 0 + var/list/turfs_to_transform = list() + for(var/turf/transform_turf as anything in GLOB.station_turfs) + if(transform_turf.flags & NO_RUST) + continue + var/dist = get_dist(center, transform_turf) + if(dist > greatest_dist) + greatest_dist = dist + if(!turfs_to_transform["[dist]"]) + turfs_to_transform["[dist]"] = list() + turfs_to_transform["[dist]"] += transform_turf + + for(var/iterator in 1 to greatest_dist) + if(!turfs_to_transform["[iterator]"]) + continue + addtimer(CALLBACK(src, PROC_REF(transform_area), turfs_to_transform["[iterator]"]), (5 SECONDS) * iterator) + +/datum/heretic_knowledge/ultimate/rust_final/proc/transform_area(list/turfs) + turfs = shuffle(turfs) + var/numturfs = length(turfs) + var/first_third = turfs.Copy(1, round(numturfs * 0.33)) + var/second_third = turfs.Copy(round(numturfs * 0.33), round(numturfs * 0.66)) + var/third_third = turfs.Copy(round(numturfs * 0.66), numturfs) + addtimer(CALLBACK(src, PROC_REF(delay_transform_turfs), first_third), 5 SECONDS) + addtimer(CALLBACK(src, PROC_REF(delay_transform_turfs), second_third), 5 SECONDS * 0.33) + addtimer(CALLBACK(src, PROC_REF(delay_transform_turfs), third_third), 5 SECONDS * 0.66) + +/datum/heretic_knowledge/ultimate/rust_final/proc/delay_transform_turfs(list/turfs) + for(var/turf/turf as anything in turfs) + turf.rust_heretic_act(5) + CHECK_TICK + +/** + * Signal proc for [COMSIG_MOVABLE_MOVED]. + * + * Gives our heretic ([source]) buffs if they stand on rust. + */ +/datum/heretic_knowledge/ultimate/rust_final/proc/on_move(mob/living/source, atom/old_loc, dir, forced, list/old_locs) + SIGNAL_HANDLER + + // If we're on a rusty turf, and haven't given out our traits, buff our guy + var/turf/our_turf = get_turf(source) + if(HAS_TRAIT(our_turf, TRAIT_RUSTY)) + if(!immunities_active) + source.add_traits(conditional_immunities, type) + immunities_active = TRUE + + // If we're not on a rust turf, and we have given out our traits, nerf our guy + else + if(immunities_active) + source.remove_traits(conditional_immunities, type) + immunities_active = FALSE + +/** + * Signal proc for [COMSIG_LIVING_LIFE]. + * + * Gradually heals the heretic ([source]) on rust. + */ +/datum/heretic_knowledge/ultimate/rust_final/proc/on_life(mob/living/source, seconds_per_tick, times_fired) + SIGNAL_HANDLER + //qwertodo: nerf this to the ground if a problem during tm + var/turf/our_turf = get_turf(source) + if(!HAS_TRAIT(our_turf, TRAIT_RUSTY)) + return + var/base_heal_amt = 2.5 + var/need_mob_update = FALSE + need_mob_update += source.adjustBruteLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustFireLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustToxLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustOxyLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustStaminaLoss(-base_heal_amt * 10) + if(source.blood_volume < BLOOD_VOLUME_NORMAL) + source.blood_volume += base_heal_amt + if(need_mob_update) + source.updatehealth() diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm new file mode 100644 index 00000000000..a1d41a4abd2 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm @@ -0,0 +1,79 @@ +// A buff given to people sacrificed to help them survive. + +/// Screen alert for the below status effect. +/atom/movable/screen/alert/status_effect/unholy_determination + name = "Unholy Determination" + desc = "You appear in a unfamiliar room. The darkness begins to close in. Panic begins to set in. There is no time. Fight on, or die!" + icon_state = "wounded" + +/// The buff given to people within the shadow realm to assist them in surviving. +/datum/status_effect/unholy_determination + id = "unholy_determination" + duration = 3 MINUTES // Given a default duration so no one gets to hold onto this buff forever by accident. + alert_type = /atom/movable/screen/alert/status_effect/unholy_determination + /// How much to heal every second + var/heal_per_second = 0.25 + +/datum/status_effect/unholy_determination/on_creation(mob/living/new_owner, set_duration) + if(isnum(set_duration)) + duration = set_duration + return ..() + + +/datum/status_effect/unholy_determination/tick() + // The amount we heal of each damage type per tick. + var/healing_amount = heal_per_second + + // In softcrit you're, strong enough to stay up. + if(owner.health <= HEALTH_THRESHOLD_CRIT && owner.health >= HEALTH_THRESHOLD_DEAD) + if(prob(5)) + to_chat(owner, SPAN_HIEROPHANT_WARNING("Your body feels like giving up, but you fight on!")) + healing_amount *= 2 + // ...But reach hardcrit and you're done. You now die faster. + if(owner.health < -100) + if(prob(5)) + to_chat(owner, SPAN_HIEROPHANT_WARNING("You can't hold on for much longer...")) + healing_amount *= -0.5 + + if(owner.health > 0 && prob(4)) + owner.AdjustJitter(20 SECONDS) + owner.AdjustDizzy(10 SECONDS) + owner.AdjustHallucinate(10 SECONDS) + + if(prob(2)) + playsound(owner, pick(CREEPY_SOUNDS), 50, TRUE) + + adjust_all_damages(healing_amount) + +/* + * Heals up all the owner a bit, fire stacks and losebreath included. + */ +/datum/status_effect/unholy_determination/proc/adjust_all_damages(amount) + + owner.adjust_fire_stacks(-1) + if(ishuman(owner)) + var/mob/living/carbon/human/our_human = owner + + var/damage_healed = 0 + damage_healed += our_human.adjustToxLoss(-amount, updating_health = FALSE) + damage_healed += our_human.adjustOxyLoss(-amount, updating_health = FALSE) + damage_healed += our_human.adjustBruteLoss(-amount, updating_health = FALSE, robotic = TRUE) + damage_healed += our_human.adjustFireLoss(-amount, updating_health = FALSE, robotic = TRUE) + if(damage_healed > 0) + owner.updatehealth() + + +/// Torment the target with a frightening hand +/proc/fire_curse_hand(mob/living/carbon/victim, turf/forced_turf) + var/grab_dir = turn(victim.dir, pick(-90, 90, 180, 180)) // Not in front, favour behind + var/turf/spawn_turf = get_ranged_target_turf(victim, grab_dir, 8) + spawn_turf = forced_turf ? forced_turf : spawn_turf + if(isnull(spawn_turf)) + return + new /obj/effect/temp_visual/dir_setting/curse/grasp_portal(spawn_turf, victim.dir) + playsound(spawn_turf, 'sound/effects/curse/curse2.ogg', 80, TRUE, -1) + var/obj/projectile/curse_hand/hel/hand = new (spawn_turf) + hand.preparePixelProjectile(victim, spawn_turf) + if(QDELETED(hand)) // safety check if above fails - above has a stack trace if it does fail + return + hand.fire() diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_curse.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_curse.dm new file mode 100644 index 00000000000..7cf75f938ea --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_curse.dm @@ -0,0 +1,52 @@ +/// A curse given to people to disencourage them from retaliating against someone who sacrificed them +/datum/status_effect/heretic_curse + id = "heretic_curse" + alert_type = null + status_type = STATUS_EFFECT_REFRESH + /// Who cursed us? + var/mob/living/the_curser + /// Don't experience bad things too often + COOLDOWN_DECLARE(consequence_cooldown) + +/datum/status_effect/heretic_curse/on_creation(mob/living/new_owner, mob/living/curser) + the_curser = curser + return ..() + +/datum/status_effect/heretic_curse/Destroy() + the_curser = null + return ..() + +/datum/status_effect/heretic_curse/on_apply() + if(isnull(the_curser) || !iscarbon(owner)) + return FALSE + if(!COOLDOWN_FINISHED(src, consequence_cooldown)) + return FALSE + COOLDOWN_START(src, consequence_cooldown, 20 SECONDS) + playsound(the_curser, 'sound/magic/repulse.ogg', 75, TRUE) + owner.visible_message(SPAN_HIEROPHANT("Vile magic lashes out at [owner] as their curse activates!"), SPAN_HIEROPHANT_WARNING("Your body recoils as your curse punishes you for your attack!")) + if(prob(25)) + owner.AdjustJitter(1 MINUTES, 1 MINUTES, 3 MINUTES) + owner.AdjustConfused(1 MINUTES, 1 MINUTES, 3 MINUTES) + return TRUE + if(prob(25)) + owner.AdjustJitter(1 MINUTES, 1 MINUTES, 3 MINUTES) + owner.AdjustDizzy(1 MINUTES, 1 MINUTES, 3 MINUTES) + if(iscarbon(owner)) + var/mob/living/carbon/C = owner + C.vomit(50, TRUE) + return TRUE + if(prob(25)) + var/fling_dir = REVERSE_DIR(owner.dir) + var/turf/general_direction = get_edge_target_turf(owner, fling_dir) + owner.throw_at(general_direction, 5, 3) + return TRUE + + // If nothing else procs, this happens. + owner.KnockDown(5 SECONDS) + owner.AdjustJitter(1 MINUTES, 1 MINUTES, 3 MINUTES) + owner.AdjustConfused(1 MINUTES, 1 MINUTES, 3 MINUTES) + if(iscarbon(owner)) + var/mob/living/carbon/C = owner + C.vomit(50, TRUE) + + diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm new file mode 100644 index 00000000000..8fc8415bbe7 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm @@ -0,0 +1,639 @@ +// The knowledge and process of heretic sacrificing. + +/// How long we put the target so sleep for during sacrifice. +#define SACRIFICE_SLEEP_DURATION (12 SECONDS) +/// How long sacrifices must stay in the shadow realm to survive. +#define SACRIFICE_REALM_DURATION (2.5 MINUTES) + +/** + * Allows the heretic to sacrifice living heart targets. + */ +/datum/heretic_knowledge/hunt_and_sacrifice + name = "Heartbeat of the Mansus" + desc = "Allows you to sacrifice targets to the Mansus by bringing them to a rune in critical (or worse) condition. \ + If you have no targets, stand on a transmutation rune and invoke it to acquire some." + required_atoms = list(/mob/living/carbon/human = 1) + priority = MAX_KNOWLEDGE_PRIORITY // Should be at the top + is_starting_knowledge = TRUE + research_tree_icon_path = 'icons/effects/eldritch.dmi' + research_tree_icon_state = "eye_close" + /// How many targets do we generate? + var/num_targets_to_generate = 5 + /// Whether we've generated a heretic sacrifice z-level yet, from any heretic. + var/static/heretic_level_generated = FALSE + /// A weakref to the mind of our heretic. + var/datum/mind/heretic_mind + /// Lazylist of minds that we won't pick as targets. + var/list/datum/mind/target_blacklist + /// An assoc list of [uif] to [timers] - a list of all the timers of people in the shadow realm currently + var/list/return_timers + /// Evil organs we can put in people + var/static/list/grantable_organs = list( + /obj/item/organ/internal/appendix/corrupt, + /obj/item/organ/internal/eyes/corrupt, + /obj/item/organ/internal/heart/corrupt, + /obj/item/organ/internal/liver/corrupt, + /obj/item/organ/internal/lungs/corrupt, + ) + +/datum/heretic_knowledge/hunt_and_sacrifice/Destroy(force) + heretic_mind = null + LAZYCLEARLIST(target_blacklist) + return ..() + +/datum/heretic_knowledge/hunt_and_sacrifice/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + addtimer(CALLBACK(src, PROC_REF(generate_targets), user, our_heretic), 10 SECONDS) + +/datum/heretic_knowledge/hunt_and_sacrifice/proc/generate_targets(mob/user, datum/antagonist/heretic/our_heretic) + obtain_targets(user, silent = TRUE, heretic_datum = our_heretic) + heretic_mind = our_heretic.owner + + +#ifndef UNIT_TESTS // This is a decently hefty thing to generate while unit testing, so we should skip it. + if(!heretic_level_generated) + heretic_level_generated = TRUE + log_game("Loading heretic lazytemplate for heretic sacrifices...") + INVOKE_ASYNC(src, PROC_REF(generate_heretic_z_level)) +#endif + +/// Generate the sacrifice z-level. +/datum/heretic_knowledge/hunt_and_sacrifice/proc/generate_heretic_z_level() + var/datum/map_template/template = GLOB.map_templates["The Mansus"] + var/datum/turf_reservation/reserve = SSmapping.lazy_load_template(template) + if(!reserve) + log_game("The heretic sacrifice template failed to load.") + message_admins("The heretic sacrifice lazy template failed to load. Heretic sacrifices won't be teleported to the shadow realm. \ + If you want, you can spawn an /obj/effect/landmark/heretic somewhere to stop that from happening.") + CRASH("Failed to lazy load heretic sacrifice template!") + + +/datum/heretic_knowledge/hunt_and_sacrifice/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + // First we have to check if the heretic has a Living Heart. + // You may wonder why we don't straight up prevent them from invoking the ritual if they don't have one - + // Hunt and sacrifice should always be invokable for clarity's sake, even if it'll fail immediately. + if(heretic_datum.has_living_heart() != HERETIC_HAS_LIVING_HEART) + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual failed, you have no living heart!")) + return FALSE + + // We've got no targets set, let's try to set some. + // If we recently failed to acquire targets, we will be unable to acquire any. + if(!LAZYLEN(heretic_datum.sac_targets)) + atoms += user + return TRUE + + // If we have targets, we can check to see if we can do a sacrifice + // Let's remove any humans in our atoms list that aren't a sac target + for(var/mob/living/carbon/human/sacrifice in atoms) + // If the mob's not in soft crit or worse, nor are they handcuffed, remove from list + if(sacrifice.health > HEALTH_THRESHOLD_CRIT && sacrifice.stat != DEAD && (!HAS_TRAIT(sacrifice, TRAIT_RESTRAINED))) + atoms -= sacrifice + // Otherwise if it's neither a target nor a cultist, remove it + else if(!(sacrifice in heretic_datum.sac_targets) && !IS_CULTIST(sacrifice)) + atoms -= sacrifice + + // Finally, return TRUE if we have a target in the list + if(locate(/mob/living/carbon/human) in atoms) + return TRUE + + // or FALSE if we don't + to_chat(user, SPAN_HIEROPHANT("The ritual failed, no valid sacrifice was found!")) + return FALSE + +/datum/heretic_knowledge/hunt_and_sacrifice/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + // Force it to work if the sacrifice is a cultist, even if there's no targets. + var/mob/living/carbon/human/sac = selected_atoms[1] + if(!LAZYLEN(heretic_datum.sac_targets) && !IS_CULTIST(sac)) + if(obtain_targets(user, heretic_datum = heretic_datum)) + return TRUE + else + to_chat(user, SPAN_HIEROPHANT("The ritual failed, no valid sacrifice was found!")) + return FALSE + + sacrifice_process(user, selected_atoms, our_turf) + return TRUE + + +/** + * Obtain a list of targets for the user to hunt down and sacrifice. + * Tries to get four targets (minds) with living human currents. + * + * Returns FALSE if no targets are found, TRUE if the targets list was populated. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/obtain_targets(mob/living/user, silent = FALSE, datum/antagonist/heretic/heretic_datum) + + // First construct a list of minds that are valid objective targets. + var/list/datum/mind/valid_targets = list() + for(var/datum/mind/possible_target as anything in SSticker.minds) + if(possible_target == user.mind) + continue + if(!possible_target.assigned_role) + continue + if(is_invalid_target(possible_target)) + continue + if(possible_target in target_blacklist) + continue + if(!ishuman(possible_target.current)) + continue + if(possible_target.current.stat == DEAD) + continue + + valid_targets += possible_target + + if(!length(valid_targets)) + if(!silent) + to_chat(user, SPAN_HIEROPHANT_WARNING("No sacrifice targets could be found!")) + return FALSE + + // Now, let's try to get five targets. + // - Two are completely random + // - One from your department + // - One from security + // - One from heads of staff ("high value") + var/list/datum/mind/final_targets = list() + + // First target, any command. + for(var/datum/mind/head_mind as anything in shuffle(valid_targets)) + if(head_mind.assigned_role in GLOB.command_head_positions) + final_targets += head_mind + valid_targets -= head_mind + break + + // Second target, any security + for(var/datum/mind/sec_mind as anything in shuffle(valid_targets)) + if(sec_mind.assigned_role in GLOB.active_security_positions) + final_targets += sec_mind + valid_targets -= sec_mind + break + + // Third target, someone in their department. + for(var/datum/mind/department_mind as anything in shuffle(valid_targets)) + if(!user.mind.job_datum) + break + if(department_mind.job_datum.job_department_flags & user.mind.job_datum.job_department_flags) + final_targets += department_mind + valid_targets -= department_mind + break + + // Now grab completely random targets until we'll full + var/target_sanity = 0 + while(length(final_targets) < num_targets_to_generate && length(valid_targets) > num_targets_to_generate && target_sanity < 25) + final_targets += pick_n_take(valid_targets) + target_sanity++ + + if(!silent) + to_chat(user, SPAN_DANGER("Your targets have been determined. Your Living Heart will allow you to track their position. Go and sacrifice them!")) + + for(var/datum/mind/chosen_mind as anything in final_targets) + heretic_datum.add_sacrifice_target(chosen_mind.current) + if(!silent) + to_chat(user, SPAN_DANGER("[chosen_mind.current.real_name], the [chosen_mind.assigned_role].")) + + return TRUE + +/** + * Begin the process of sacrificing the target. + * + * Arguments + * * user - the mob doing the sacrifice (a heretic) + * * selected_atoms - a list of all atoms chosen. Should be (at least) one human. + * * our_turf - the turf the sacrifice is occurring on + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/sacrifice_process(mob/living/user, list/selected_atoms, turf/our_turf) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/mob/living/carbon/human/sacrifice = locate() in selected_atoms + if(!sacrifice) + CRASH("[type] sacrifice_process didn't have a human in the atoms list. How'd it make it so far?") + if(!(sacrifice in heretic_datum.sac_targets) && !IS_CULTIST(sacrifice)) + CRASH("[type] sacrifice_process managed to get a non-target, non-cult human. This is incorrect.") + + if(sacrifice.mind) + LAZYADD(target_blacklist, sacrifice.mind) + sacrifice.get_ghost(FALSE) + heretic_datum.remove_sacrifice_target(sacrifice) + + + var/feedback = "Your patrons accept your offer" + var/sac_job = sacrifice.mind?.assigned_role + var/datum/antagonist/cultist/cultist_datum = IS_CULTIST(sacrifice) + // Heads give 3 points, cultists give 1 point (and a special reward), normal sacrifices give 2 points. + heretic_datum.total_sacrifices++ + if(sac_job in GLOB.command_head_positions) + heretic_datum.knowledge_points += 3 + heretic_datum.high_value_sacrifices++ + feedback += " graciously" + if(cultist_datum) + heretic_datum.knowledge_points += 3 + grant_reward(user, sacrifice, our_turf) + // easier to read + var/rewards_given = heretic_datum.rewards_given + // Chance for it to send a warning to cultists, higher with each reward. Stops after 5 because they probably got the hint by then. + if(prob(min(15 * rewards_given)) && (rewards_given <= 5)) + for(var/datum/mind/mind as anything in cultist_datum.get_team()) + if(mind.current) + SEND_SOUND(mind.current, 'sound/magic/narsie_attack.ogg') + var/message = "A vile heretic has " + \ + "sacrificed" + \ + " one of our own. Destroy and sacrifice the infidel before it claims more!" + to_chat(mind.current, message) + // he(retic) gets a warn too + to_chat(user, "How DARE you!? I will see you destroyed for this.") + var/non_flavor_warning = SPAN_CULTLARGE("You feel that your action has attracted ") + SPAN_HIEROPHANT_WARNING("attention") + to_chat(user, non_flavor_warning) + else + heretic_datum.knowledge_points += 2 + + ADD_TRAIT(sacrifice, TRAIT_WAS_SACRIFICED, CULT_TRAIT) + to_chat(user, SPAN_HIEROPHANT_WARNING("[feedback].")) + if(!begin_sacrifice(sacrifice)) + disembowel_target(sacrifice) + return + + sacrifice.apply_status_effect(/datum/status_effect/heretic_curse, user) + +/datum/heretic_knowledge/hunt_and_sacrifice/proc/grant_reward(mob/living/user, mob/living/sacrifice, turf/our_turf) + + // Visible and audible encouragement! + to_chat(user, SPAN_HIEROPHANT_WARNING("A servant of the Sanguine Apostate!")) + to_chat(user, SPAN_HIEROPHANT("Your patrons are rapturous!")) + playsound(sacrifice, 'sound/magic/disintegrate.ogg', 75, TRUE) + + to_chat(sacrifice, SPAN_HIEROPHANT("No! Your feel your connection with your god has been severed!")) + sacrifice.mind.remove_antag_datum(/datum/antagonist/cultist) + + // Increase reward counter + var/datum/antagonist/heretic/antag = IS_HERETIC(user) + antag.rewards_given++ + + // Cool effect for the rune as well as the item + var/obj/effect/heretic_rune/rune = locate() in range(2, user) + if(rune) + rune.gender_reveal( + outline_color = COLOR_RED_LIGHT, + ray_color = null, + do_float = FALSE, + do_layer = FALSE, + ) + + addtimer(CALLBACK(src, PROC_REF(deposit_reward), user, our_turf, null, rune), 5 SECONDS) + + +/datum/heretic_knowledge/hunt_and_sacrifice/proc/deposit_reward(mob/user, turf/our_turf, loop = 0, obj/rune) + if(loop > 5) // Max limit for retrying a reward + return + // Remove the outline, we don't need it anymore. + rune?.remove_filter("reward_outline") + playsound(our_turf, 'sound/magic/repulse.ogg', 75, TRUE) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + ASSERT(heretic_datum) + // This list will be almost identical to unlocked_heretic_items, with the same keys, the difference being the values will be 1 to 5. + var/list/rewards = heretic_datum.unlocked_heretic_items.Copy() + // We will make it increasingly less likely to get a reward if you've already got it + for(var/possible_reward in heretic_datum.unlocked_heretic_items) + var/amount_already_awarded = heretic_datum.unlocked_heretic_items[possible_reward] + rewards[possible_reward] = min(5 - (amount_already_awarded * 2), 1) + + var/atom/reward = pickweight(rewards) + reward = new reward(our_turf) + + if(isliving(reward)) + if(summon_ritual_mob(user, our_turf, reward) == FALSE) + qdel(reward) + deposit_reward(user, our_turf, loop++, rune) // If no ghosts, try again until limit is hit + return + + else if(isitem(reward)) + var/obj/item/item_reward = reward + item_reward.gender_reveal(outline_color = null, ray_color = COLOR_RED_LIGHT) + + ASSERT(reward) + + return reward + +/** + * This proc is called from [proc/sacrifice_process] after the heretic successfully sacrifices [sac_target].) + * + * Sets off a chain that sends the person sacrificed to the shadow realm to dodge hands to fight for survival. + * + * Arguments + * * sac_target - the mob being sacrificed. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/begin_sacrifice(mob/living/carbon/human/sac_target) + . = FALSE + + var/datum/antagonist/heretic/our_heretic = heretic_mind?.has_antag_datum(/datum/antagonist/heretic) + if(!our_heretic) + CRASH("[type] - begin_sacrifice was called, and no heretic [heretic_mind ? "antag datum":"mind"] could be found!") + + if(!LAZYLEN(GLOB.heretic_sacrifice_landmarks)) + CRASH("[type] - begin_sacrifice was called, but no heretic sacrifice landmarks were found!") + + var/obj/effect/landmark/heretic/destination_landmark = GLOB.heretic_sacrifice_landmarks[our_heretic.heretic_path] || GLOB.heretic_sacrifice_landmarks[PATH_START] + if(!destination_landmark) + CRASH("[type] - begin_sacrifice could not find a destination landmark OR default landmark to send the sacrifice! (Heretic's path: [our_heretic.heretic_path])") + + var/turf/destination = get_turf(destination_landmark) + + sac_target.visible_message(SPAN_DANGER("[sac_target] begins to shudder violenty as dark tendrils begin to drag them into thin air!")) + sac_target.handcuffed = new /obj/item/restraints/handcuffs/cult(sac_target) + sac_target.update_handcuffed() + if(sac_target.legcuffed) + sac_target.clear_legcuffs(TRUE) + + sac_target.setBrainLoss(40) + sac_target.do_jitter_animation() + for(var/datum/disease/critical/heart_failure/HF in sac_target.viruses) + HF.cure() + + addtimer(CALLBACK(sac_target, TYPE_PROC_REF(/mob/living/carbon, do_jitter_animation)), SACRIFICE_SLEEP_DURATION * (1/3)) + addtimer(CALLBACK(sac_target, TYPE_PROC_REF(/mob/living/carbon, do_jitter_animation)), SACRIFICE_SLEEP_DURATION * (2/3)) + + // If our target is dead, try to revive them + // and if we fail to revive them, don't proceede the chain + if(sac_target.stat & DEAD) + sac_target.adjustOxyLoss(-100, FALSE) + if(!sac_target.heal_and_revive(50, SPAN_DANGER("[sac_target]'s heart begins to beat with an unholy force as they return from death!"))) + return + + if(sac_target.AdjustSleeping(SACRIFICE_SLEEP_DURATION)) + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("Your mind feels torn apart as you fall into a shallow slumber...")) + else + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("Your mind begins to tear apart as you watch dark tendrils envelop you.")) + + sac_target.AdjustWeakened(SACRIFICE_SLEEP_DURATION * 1.2) + sac_target.AdjustImmobilized(SACRIFICE_SLEEP_DURATION * 1.2) + if(HAS_TRAIT(sac_target, TRAIT_RESTRAINED) && sac_target.health > 60) // We gotta harm the restrained ones JUST a lil. For fun! + sac_target.adjustBruteLoss(20) + sac_target.adjustFireLoss(20) + + addtimer(CALLBACK(src, PROC_REF(after_target_sleeps), sac_target, destination), SACRIFICE_SLEEP_DURATION * 0.5) // Teleport to the minigame + + return TRUE + +/** + * This proc is called from [proc/begin_sacrifice] after the [sac_target] falls asleep), shortly after the sacrifice occurs. + * + * Teleports the [sac_target] to the heretic room, asleep. + * If it fails to teleport, they will be disemboweled and stop the chain. + * + * Arguments + * * sac_target - the mob being sacrificed. + * * destination - the spot they're being teleported to. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_target_sleeps(mob/living/carbon/human/sac_target, turf/destination) + if(QDELETED(sac_target)) + return + + curse_organs(sac_target) + + // The target disconnected or something, we shouldn't bother sending them along. + if(!sac_target.client || !sac_target.mind) + return + + // Send 'em to the destination. If the teleport fails, just disembowel them and stop the chain + if(!destination || SEND_SIGNAL(sac_target, COMSIG_MOVABLE_TELEPORTING, destination) & COMPONENT_BLOCK_TELEPORT) + disembowel_target(sac_target) + return + sac_target.forceMove(destination) + // If our target died during the (short) wait timer, + // and we fail to revive them (using a lower number than before), + // just disembowel them and stop the chain + sac_target.adjustOxyLoss(-100, FALSE) + if(!sac_target.heal_and_revive(50, SPAN_DANGER("[sac_target]'s heart begins to beat with an unholy force as they return from death!"))) + return + else // lets give them a little help + for(var/organ_name in list("l_leg", "r_leg", "l_foot", "r_foot")) + var/obj/item/organ/external/E = sac_target.get_organ(organ_name) + if(!E) + sac_target.regrow_external_limb_if_missing(organ_name) + else if(E.status |= ORGAN_BROKEN) + E.status &= ~ORGAN_BROKEN + sac_target.update_body() // Update the limb sprites + + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("Unnatural forces begin to claw at your every being from beyond the veil.")) + + playsound(sac_target, 'sound/ambience/antag/heretic/heretic_sacrifice.ogg', 50, FALSE) // play theme + + sac_target.apply_status_effect(/datum/status_effect/unholy_determination, SACRIFICE_REALM_DURATION) + addtimer(CALLBACK(src, PROC_REF(after_target_wakes), sac_target), SACRIFICE_SLEEP_DURATION * 0.5) // Begin the minigame + + RegisterSignal(sac_target, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(on_target_escape)) // Cheese condition + RegisterSignal(sac_target, COMSIG_MOB_DEATH, PROC_REF(on_target_death)) // Loss condition + +/// Apply a sinister curse to some of the target's organs as an incentive to leave us alone +/datum/heretic_knowledge/hunt_and_sacrifice/proc/curse_organs(mob/living/carbon/human/sac_target) + var/usable_organs = grantable_organs.Copy() + if(isplasmaman(sac_target) || isvox(sac_target)) + usable_organs -= /obj/item/organ/internal/lungs/corrupt // Their lungs are already more cursed than anything I could give them + + var/total_implant = rand(2, 4) + + for(var/i in 1 to total_implant) + if(!length(usable_organs)) + return + var/organ_path = pick_n_take(usable_organs) + var/obj/item/organ/internal/to_give = new organ_path + var/obj/item/organ/internal/to_eject = sac_target.get_int_organ(to_give.parent_type) + if(to_eject) + to_eject.remove(sac_target) + to_eject.forceMove(get_turf(sac_target)) + to_give.insert(sac_target) + + new /obj/effect/gibspawner/generic(get_turf(sac_target)) + sac_target.visible_message(SPAN_BOLDWARNING("Several organs force themselves out of [sac_target]!")) + sac_target.set_heartattack(FALSE) //Otherwise you die if you try to do an organic heart, very funny, very bad + +/** + * This proc is called from [proc/after_target_sleeps] when the [sac_target] should be waking up.) + * + * Begins the survival minigame, featuring the sacrifice targets. + * Gives them Helgrasp, throwing cursed hands towards them that they must dodge to survive. + * Also gives them a status effect, Unholy Determination, to help them in this endeavor. + * + * Then applies some miscellaneous effects. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_target_wakes(mob/living/carbon/human/sac_target) + if(QDELETED(sac_target)) + return + + // About how long should the helgrasp last? (1 metab a tick = helgrasp_time / 2 ticks (so, 1 minute = 60 seconds = 30 ticks)) + var/helgrasp_time = 1 MINUTES + + sac_target.reagents?.add_reagent("mansusgrasp", helgrasp_time / 40) + sac_target.apply_status_effect(/datum/status_effect/necropolis_curse) + + sac_target.EyeBlurry(30 SECONDS) + sac_target.AdjustJitter(20 SECONDS) + sac_target.AdjustDizzy(20 SECONDS) + sac_target.emote("scream") + + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("The grasp of the Mansus reveal themselves to you!")) + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("You feel invigorated! Fight to survive!")) + // When it runs out, let them know they're almost home free + addtimer(CALLBACK(src, PROC_REF(after_helgrasp_ends), sac_target), helgrasp_time) + // Win condition + var/win_timer = addtimer(CALLBACK(src, PROC_REF(return_target), sac_target), SACRIFICE_REALM_DURATION, TIMER_STOPPABLE) + LAZYSET(return_timers, sac_target.UID(), win_timer) + +/** + * This proc is called from [proc/after_target_wakes] after the helgrasp runs out in the [sac_target].) + * + * It gives them a message letting them know it's getting easier and they're almost free. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_helgrasp_ends(mob/living/carbon/human/sac_target) + if(QDELETED(sac_target) || sac_target.stat == DEAD) + return + + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("The worst is behind you... Not much longer! Hold fast, or expire!")) + +/** + * This proc is called from [proc/begin_sacrifice] if the target survived the shadow realm), or [COMSIG_MOB_DEATH] if they don't. + * + * Teleports [sac_target] back to a random safe turf on the station (or observer spawn if it fails to find a safe turf). + * Also clears their status effects, unregisters any signals associated with the shadow realm, and sends a message + * to the heretic who did the sacrificed about whether they survived, and where they ended up. + * + * Arguments + * * sac_target - the mob being sacrificed + * * heretic - the heretic who originally did the sacrifice. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/return_target(mob/living/carbon/human/sac_target) + if(QDELETED(sac_target)) + return + + var/current_timer = LAZYACCESS(return_timers, sac_target.UID()) + if(current_timer) + deltimer(current_timer) + LAZYREMOVE(return_timers, sac_target.UID()) + + UnregisterSignal(sac_target, COMSIG_MOVABLE_Z_CHANGED) + UnregisterSignal(sac_target, COMSIG_MOB_DEATH) + sac_target.remove_status_effect(/datum/status_effect/necropolis_curse) + sac_target.remove_status_effect(/datum/status_effect/unholy_determination) + sac_target.reagents?.del_reagent("mansusgrasp") + sac_target.clear_restraints() + if(IS_HERETIC(sac_target)) + var/datum/antagonist/heretic/victim_heretic = sac_target.mind?.has_antag_datum(/datum/antagonist/heretic) + victim_heretic.knowledge_points -= 3 + + // Wherever we end up, we sure as hell won't be able to explain + sac_target.HereticSlur(40 SECONDS) + sac_target.AdjustStuttering(40 SECONDS) + + // They're already back on the station for some reason, don't bother teleporting + var/turf/below_target = get_turf(sac_target) + // is_station_level runtimes when passed z = 0, so I'm being very explicit here about checking for nullspace until fixed + // otherwise, we really don't want this to runtime error, as it'll get people stuck in hell forever - not ideal! + if(below_target && below_target.z != 0 && is_station_level(below_target.z)) + return + + // Teleport them to a random safe coordinate on the station z level. + var/turf/simulated/floor/safe_turf = get_safe_random_station_turf_equal_weight() + if(!safe_turf) + safe_turf = sac_target.forceMove(pick(GLOB.latejoin)) + stack_trace("[type] - return_target was unable to find a safe turf for [sac_target] to return to. Defaulting to arrivals.") + sac_target.forceMove(safe_turf) + + if(sac_target.stat == DEAD) + after_return_dead_target(sac_target) + else + after_return_live_target(sac_target) + + if(heretic_mind?.current) + var/composed_return_message = "" + composed_return_message += SPAN_NOTICE("Your victim, [sac_target], was returned to the station - ") + if(sac_target.stat == DEAD) + composed_return_message += "dead. " + else + composed_return_message += "alive, but with a shattered mind. " + + composed_return_message += SPAN_NOTICE("You hear a whisper... ") + composed_return_message += SPAN_HIEROPHANT_WARNING("[get_area_name(safe_turf, TRUE)]") + to_chat(heretic_mind.current, composed_return_message) + +/** + * If they die in the shadow realm, they lost. Send them back. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/on_target_death(mob/living/carbon/human/sac_target, gibbed) + SIGNAL_HANDLER + + if(gibbed) // Nothing to return + return + + return_target(sac_target) + +/** + * If they somehow cheese the shadow realm by teleporting out, they are disemboweled and killed. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/on_target_escape(mob/living/carbon/human/sac_target, old_z, new_z) + SIGNAL_HANDLER + + to_chat(sac_target, SPAN_BOLDWARNING("Your attempt to escape the Mansus is not taken kindly!")) + // Ends up calling return_target() via death signal to clean up. + disembowel_target(sac_target) + +/** + * This proc is called from [proc/return_target] if the [sac_target] survives the shadow realm.) + * + * Gives the sacrifice target some after effects upon ariving back to reality. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_return_live_target(mob/living/carbon/human/sac_target) + to_chat(sac_target, SPAN_USERDANGER("The fight is over, but at great cost. You have been returned to the station in one piece.")) + if(IS_HERETIC(sac_target)) + to_chat(sac_target, SPAN_USERDANGER("You don't remember anything leading up to the experience, but you feel your connection with the Mansus weakened - Knowledge once known, forgotten...")) + else + to_chat(sac_target, SPAN_USERDANGER("You don't remember anything leading up to the experience - All you can think about are those horrific hands...")) + + // Oh god where are we? + sac_target.AdjustConfused(60 SECONDS) + sac_target.AdjustJitter(120 SECONDS) + sac_target.EyeBlurry(100 SECONDS) + sac_target.AdjustDizzy(1 MINUTES) + sac_target.AdjustKnockDown(8 SECONDS) + sac_target.adjustStaminaLoss(120) + + + // Could use a little pick-me-up... + sac_target.reagents?.add_reagent("atropine", 8) + sac_target.reagents?.add_reagent("epinephrine", 8) + +/** + * This proc is called from [proc/return_target] if the target dies in the shadow realm.) + * + * After teleporting the target back to the station (dead), + * it spawns a special red broken illusion on their spot, for style. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_return_dead_target(mob/living/carbon/human/sac_target) + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("You failed to resist the horrors of the Mansus! Your ruined body has been returned to the station.")) + to_chat(sac_target, SPAN_HIEROPHANT_WARNING("The experience leaves your mind torn and memories tattered. You will not remember anything leading up to the experience if revived.")) + + var/obj/effect/visible_heretic_influence/illusion = new(get_turf(sac_target)) + illusion.name = "\improper weakened rift in reality" + illusion.desc = "A rift wide enough for something... or someone... to come through." + illusion.color = COLOR_RED + +/** + * "Fuck you" proc that gets called if the chain is interrupted at some points. + * Disembowels the [sac_target] and brutilizes their body. Throws some gibs around for good measure. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/disembowel_target(mob/living/carbon/human/sac_target) + if(heretic_mind) + add_attack_logs(src, sac_target, "disemboweled via sacrifice") + var/obj/item/organ/external/chest = sac_target.get_organ(BODY_ZONE_CHEST) + chest.fracture() + chest.droplimb() + sac_target.apply_damage(250, BRUTE) + if(sac_target.stat != DEAD) + sac_target.death() + sac_target.visible_message( + SPAN_DANGER("[sac_target]'s organs are pulled out of [sac_target.p_their()] chest by shadowy hands!"), + SPAN_USERDANGER("our organs are violently pulled out of your chest by shadowy hands!") + ) + + new /obj/effect/gibspawner/human(get_turf(sac_target)) + +#undef SACRIFICE_SLEEP_DURATION +#undef SACRIFICE_REALM_DURATION diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm new file mode 100644 index 00000000000..782adb62c9d --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm @@ -0,0 +1,143 @@ +// Some various defines used in the heretic sacrifice map. + +/// A global assoc list of all landmarks that denote a heretic sacrifice location. [string heretic path] = [landmark]. +GLOBAL_LIST_EMPTY(heretic_sacrifice_landmarks) + +/// Lardmarks meant to designate where heretic sacrifices are sent. +/obj/effect/landmark/heretic + name = "default heretic sacrifice landmark" + icon_state = "x" + /// What path this landmark is intended for. + var/for_heretic_path = PATH_START + +/obj/effect/landmark/heretic/Initialize(mapload) + . = ..() + GLOB.heretic_sacrifice_landmarks[for_heretic_path] = src + +/obj/effect/landmark/heretic/Destroy() + GLOB.heretic_sacrifice_landmarks[for_heretic_path] = null + return ..() + +/obj/effect/landmark/heretic/ash + name = "ash heretic sacrifice landmark" + for_heretic_path = PATH_ASH + +/obj/effect/landmark/heretic/flesh + name = "flesh heretic sacrifice landmark" + for_heretic_path = PATH_FLESH + +/obj/effect/landmark/heretic/void + name = "void heretic sacrifice landmark" + for_heretic_path = PATH_VOID + +/obj/effect/landmark/heretic/rust + name = "rust heretic sacrifice landmark" + for_heretic_path = PATH_RUST + +/obj/effect/landmark/heretic/lock + name = "lock heretic sacrifice landmark" + for_heretic_path = PATH_LOCK + +/obj/effect/landmark/heretic/moon + name = "moon heretic sacrifice landmark" + for_heretic_path = PATH_MOON + +/obj/effect/landmark/heretic/cosmic + name = "cosmic heretic sacrifice landmark" + for_heretic_path = PATH_COSMIC + +/obj/effect/landmark/heretic/blade + name = "blade heretic sacrifice landmark" + for_heretic_path = PATH_BLADE + + +/obj/structure/signpost/void + name = "signpost at the edge of the universe" + desc = "A direction in the directionless cosmos." + /// Brightness of the signpost. + var/range = 2 + /// Light power of the signpost. + var/power = 0.8 + +/obj/structure/signpost/void/Initialize(mapload) + . = ..() + set_light(range, power) + +// Some VERY dim lights, used for the void sacrifice realm. +/obj/machinery/light/very_dim + nightshift_allowed = FALSE + brightness_color = "#d6b6a6ff" + brightness_range = 3 + brightness_power = 0.5 + +/obj/machinery/light/very_dim/directional/north + dir = NORTH + +/obj/machinery/light/very_dim/directional/south + dir = SOUTH + +/obj/machinery/light/very_dim/directional/east + dir = EAST + +/obj/machinery/light/very_dim/directional/west + dir = WEST + +// Rooms for where heretic sacrifices send people. +/area/centcom/heretic_sacrifice + name = "Mansus" + icon_state = "heretic" + sound_environment = SOUND_ENVIRONMENT_CAVE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED + +/area/centcom/heretic_sacrifice/Initialize(mapload) + ambientsounds = list('sound/ambience/ambireebe1.ogg', + 'sound/ambience/ambireebe2.ogg', + 'sound/ambience/ambireebe3.ogg',) + return ..() + +/area/centcom/heretic_sacrifice/ash //also, the default + name = "Mansus Ash Gate" + +/area/centcom/heretic_sacrifice/void + name = "Mansus Void Gate" + sound_environment = SOUND_ENVIRONMENT_UNDERWATER + +/area/centcom/heretic_sacrifice/void/Initialize(mapload) + ambientsounds = list('sound/ambience/ambireebe1.ogg', + 'sound/ambience/ambireebe2.ogg', + 'sound/ambience/ambireebe3.ogg', + 'sound/ambience/antag/heretic/VoidsEmbrace.ogg' //a little void, in the end... + ) + return ..() + +/area/centcom/heretic_sacrifice/flesh + name = "Mansus Flesh Gate" + sound_environment = SOUND_ENVIRONMENT_STONEROOM + +/area/centcom/heretic_sacrifice/rust + name = "Mansus Rust Gate" + sound_environment = SOUND_ENVIRONMENT_SEWER_PIPE + +/area/centcom/heretic_sacrifice/lock + name = "Mansus Lock Gate" + sound_environment = SOUND_ENVIRONMENT_PSYCHOTIC + +/area/centcom/heretic_sacrifice/cosmic + name = "Mansus Cosmic Gate" + sound_environment = SOUND_ENVIRONMENT_UNDERWATER + +/area/centcom/heretic_sacrifice/blade + name = "Mansus Blade Gate" + sound_environment = SOUND_ENVIRONMENT_ARENA + +/area/centcom/heretic_sacrifice/moon + name = "Mansus Moon Gate" + sound_environment = SOUND_ENVIRONMENT_AUDITORIUM + +/area/centcom/heretic_sacrifice/moon/Initialize(mapload) + ambientsounds = list('sound/ambience/ambireebe1.ogg', + 'sound/ambience/ambireebe2.ogg', + 'sound/ambience/ambireebe3.ogg', + 'sound/effects/moon_parade.ogg' //a little moon, why not + ) + return ..() diff --git a/code/modules/antagonists/heretic/knowledge/side_ash_moon.dm b/code/modules/antagonists/heretic/knowledge/side_ash_moon.dm new file mode 100644 index 00000000000..320c0a7030d --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_ash_moon.dm @@ -0,0 +1,51 @@ +/datum/heretic_knowledge_tree_column/ash_to_moon + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/ash + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/moon + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/medallion + tier2 = /datum/heretic_knowledge/dummy_ash_to_moon + tier3 = /datum/heretic_knowledge/summon/ashy + +// Sidepaths for knowledge between Ash and Flesh. + +/datum/heretic_knowledge/dummy_ash_to_moon + name = "Ash and Moon ways" + desc = "Research this to gain access to the other path" + gain_text = "Madness leads to decay, and the fire is as great show for the soul." + cost = 1 + + +/datum/heretic_knowledge/medallion + name = "Ashen Eyes" + desc = "Allows you to transmute a pair of eyes, a candle, and a glass shard into an Eldritch Medallion. \ + The Eldritch Medallion grants you thermal vision while worn, and also functions as a focus." + gain_text = "Piercing eyes guided them through the mundane. Neither darkness nor terror could stop them." + + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/item/shard = 1, + /obj/item/candle = 1, + ) + result_atoms = list(/obj/item/clothing/neck/eldritch_amulet) + cost = 1 + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "eye_medalion" + +/datum/heretic_knowledge/summon/ashy + name = "Ashen Ritual" + desc = "Allows you to transmute a head, a pile of ash, and a book to create an Ash Spirit. \ + Ash Spirits have a short range jaunt and the ability to cause bleeding in foes at range. \ + They also have the ability to create a ring of fire around themselves for a length of time." + gain_text = "I combined my principle of hunger with my desire for destruction. The Marshal knew my name, and the Nightwatcher gazed on." + + required_atoms = list( + /obj/effect/decal/cleanable/ash = 1, + /obj/item/organ/external/head = 1, + /obj/item/book = 1, + ) + mob_to_summon = /mob/living/basic/heretic_summon/ash_spirit + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_blade_rust.dm b/code/modules/antagonists/heretic/knowledge/side_blade_rust.dm new file mode 100644 index 00000000000..31fe2ecae5d --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_blade_rust.dm @@ -0,0 +1,98 @@ +/datum/heretic_knowledge_tree_column/blade_to_rust + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/blade + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/rust + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/armor + tier2 = list(/datum/heretic_knowledge/crucible, /datum/heretic_knowledge/rifle) + tier3 = /datum/heretic_knowledge/dummy_rust_to_blade + +// Sidepaths for knowledge between Rust and Blade. + +/datum/heretic_knowledge/dummy_rust_to_blade + name = "Rust and Blade ways" + desc = "Research this to gain access to the other path" + gain_text = "For what is rust, but the tale of a blade used well." + cost = 1 + + +/datum/heretic_knowledge/armor + name = "Armorer's Ritual" + desc = "Allows you to transmute a table and a gas mask to create Eldritch Armor. \ + Eldritch Armor provides great protection while also acting as a focus when hooded." + gain_text = "The Rusted Hills welcomed the Blacksmith in their generosity. And the Blacksmith \ + returned their generosity in kind." + + required_atoms = list( + /obj/structure/table = 1, + /obj/item/clothing/mask/gas = 1, + ) + result_atoms = list(/obj/item/clothing/suit/hooded/cultrobes/eldritch) + cost = 1 + + research_tree_icon_path = 'icons/obj/clothing/suits.dmi' + research_tree_icon_state = "eldritch_armor" + research_tree_icon_frame = 12 + + +/datum/heretic_knowledge/crucible + name = "Mawed Crucible" + desc = "Allows you to transmute a portable water tank and a table to create a Mawed Crucible. \ + The Mawed Crucible can brew powerful potions for combat and utility, but must be fed bodyparts and organs between uses." + gain_text = "This is pure agony. I wasn't able to summon the figure of the Aristocrat, \ + but with the Priest's attention I stumbled upon a different recipe..." + + required_atoms = list( + /obj/structure/reagent_dispensers/watertank = 1, + /obj/structure/table = 1, + ) + result_atoms = list(/obj/structure/eldritch_crucible) + cost = 1 + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "crucible" + + +/datum/heretic_knowledge/rifle + name = "Lionhunter's Rifle" + desc = "Allows you to transmute a piece of wood, with hide \ + from any animal,and a camera to create the Lionhunter's rifle. \ + The Lionhunter's Rifle is a long ranged ballistic weapon with three shots. \ + These shots function as normal, albeit weak high-caliber munitions when fired from \ + close range or at inanimate objects. You can aim the rifle at distant foes, \ + causing the shot to mark your victim with your grasp and teleport you directly to them. \ + Grants thermal vision when scoped in." + gain_text = "I met an old man in an antique shop who wielded a very unusual weapon. \ + I could not purchase it at the time, but they showed me how they made it ages ago." + + required_atoms = list( + /obj/item/stack/sheet/wood = 1, + /obj/item/stack/sheet/animalhide = 1, + /obj/item/camera = 1, + ) + result_atoms = list(/obj/item/gun/projectile/shotgun/boltaction/lionhunter) + cost = 1 + + + research_tree_icon_path = 'icons/obj/weapons/wide_guns.dmi' + research_tree_icon_state = "lionhunter" + +/datum/heretic_knowledge/rifle_ammo + name = "Lionhunter Rifle Ammunition" + desc = "Allows you to transmute 3 ballistic ammo casings (used or unused) of any caliber, \ + including shotgun shells to create an extra clip of ammunition for the Lionhunter Rifle." + gain_text = "The weapon came with three rough iron balls, intended to be used as ammunition. \ + They were very effective, for simple iron, but used up quickly. I soon ran out. \ + No replacement munitions worked in their stead. It was peculiar in what it wanted." + required_atoms = list( + list(/obj/item/ammo_casing, /obj/item/trash/spentcasing) = 3, + ) + banned_atom_types = list(/obj/item/ammo_casing/lionhunter) // The gods are very generous with ingredients, but not *that* generous + result_atoms = list(/obj/item/ammo_box/lionhunter) + + research_tree_icon_path = 'icons/obj/ammo.dmi' + research_tree_icon_state = "310_strip" + + + diff --git a/code/modules/antagonists/heretic/knowledge/side_cosmos_ash.dm b/code/modules/antagonists/heretic/knowledge/side_cosmos_ash.dm new file mode 100644 index 00000000000..b2243393084 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_cosmos_ash.dm @@ -0,0 +1,64 @@ +/datum/heretic_knowledge_tree_column/cosmic_to_ash + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/cosmic + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/ash + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/dummy_cosmic_to_ash + tier2 = list(/datum/heretic_knowledge/eldritch_coin, /datum/heretic_knowledge/spell/space_phase) + tier3 = /datum/heretic_knowledge/summon/fire_shark + +// Sidepaths for knowledge between Ash and comsic. + +/datum/heretic_knowledge/dummy_cosmic_to_ash + name = "Cosmic and Ash ways" + desc = "Research this to gain access to the other path" + gain_text = "Stars to stardust, to us, to Ash, back to stardust." + cost = 1 + +/datum/heretic_knowledge/spell/space_phase + name = "Space Phase" + desc = "Grants you Space Phase, a spell that allows you to move freely through space. \ + You can only phase in and out when you are on a space or misc turf." + gain_text = "You feel like your body can move through space as if you where dust." + + action_to_add = /datum/spell/bloodcrawl/space_crawl + cost = 1 + + research_tree_icon_frame = 6 + +/datum/heretic_knowledge/eldritch_coin + name = "Eldritch Coin" + desc = "Allows you to transmute a sheet of plasma and a diamond to create an Eldritch Coin. \ + The coin will open or close nearby doors when landing on heads and toggle their bolts \ + when landing on tails. If you insert the coin into an airlock, it will be consumed \ + to fry its electronics, opening the airlock permanently unless bolted. " + gain_text = "The Mansus is a place of all sorts of sins. But greed held a special role." + + required_atoms = list( + /obj/item/stack/sheet/mineral/diamond = 1, + /obj/item/stack/sheet/mineral/plasma = 1, + ) + result_atoms = list(/obj/item/coin/eldritch) + cost = 1 + + research_tree_icon_path = 'icons/obj/economy.dmi' + research_tree_icon_state = "coin_heretic_heretic" + +/datum/heretic_knowledge/summon/fire_shark + + name = "Scorching Shark" + desc = "Allows you to transmute a pile of ash, a liver, and a sheet of plasma into a Fire Shark. \ + Fire Sharks are fast and strong in groups, but die quickly. They are also highly resistant against fire attacks. \ + Fire Sharks inject phlogiston into its victims and erupt into plasma once they die." + gain_text = "The cradle of the nebula was cold, but not dead. Light and heat flits even through the deepest darkness, and is hunted by its own predators." + + required_atoms = list( + /obj/effect/decal/cleanable/ash = 1, + /obj/item/organ/internal/liver = 1, + /obj/item/stack/sheet/mineral/plasma = 1, + ) + mob_to_summon = /mob/living/basic/heretic_summon/fire_shark + cost = 2 + + research_tree_icon_dir = EAST diff --git a/code/modules/antagonists/heretic/knowledge/side_flesh_void.dm b/code/modules/antagonists/heretic/knowledge/side_flesh_void.dm new file mode 100644 index 00000000000..368847c6bd3 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_flesh_void.dm @@ -0,0 +1,64 @@ +/datum/heretic_knowledge_tree_column/flesh_to_void + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/flesh + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/void + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/void_cloak + tier2 = /datum/heretic_knowledge/spell/blood_siphon + tier3 = list(/datum/heretic_knowledge/spell/void_prison, /datum/heretic_knowledge/spell/cleave) + +// Sidepaths for knowledge between Flesh and Void. + +/datum/heretic_knowledge/void_cloak + name = "Void Cloak" + desc = "Allows you to transmute a glass shard, a bedsheet, and any outer clothing item (such as armor or a suit jacket) \ + to create a Void Cloak. While the hood is down, the cloak functions as a focus, \ + and while the hood is up, the cloak is completely invisible. It also provide decent armor and \ + has pockets which can hold one of your blades, various ritual components (such as organs), and small heretical trinkets. \ + A blade or lionhunter can be stored in it's suit storage, and will be hidden when the hood is up." + gain_text = "The Owl is the keeper of things that are not quite in practice, but in theory are. Many things are." + + required_atoms = list( + /obj/item/shard = 1, + /obj/item/clothing/suit = 1, + /obj/item/bedsheet = 1, + ) + result_atoms = list(/obj/item/clothing/suit/storage/void_cloak) + cost = 1 + + research_tree_icon_path = 'icons/obj/clothing/suits.dmi' + research_tree_icon_state = "void_cloak" + +/datum/heretic_knowledge/spell/blood_siphon + name = "Blood Siphon" + desc = "Grants you Blood Siphon, a spell that drains a victim of blood and health, transferring it to you. \ + Also has a chance to transfer wounds from you to the victim." + gain_text = "\"No matter the man, we bleed all the same.\" That's what the Marshal told me." + + action_to_add = /datum/spell/pointed/blood_siphon + cost = 1 + +/datum/heretic_knowledge/spell/void_prison + name = "Void Prison" + desc = "Grants you Void Prison, a spell that places your victim into ball, making them unable to do anything or speak. \ + Applies void chill afterwards." + gain_text = "At first, I see myself, waltzing along a snow-laden street. \ + I try to yell, grab hold of this fool and tell them to run. \ + But the only welts made are on my own beating fist. \ + My smiling face turns to regard me, reflecting back in glassy eyes the empty path I have been lead down." + + action_to_add = /datum/spell/pointed/void_prison + cost = 1 + +/datum/heretic_knowledge/spell/cleave + name = "Blood Cleave" + desc = "Grants you Cleave, an area-of-effect targeted spell \ + that causes heavy bleeding and blood loss to anyone afflicted." + gain_text = "At first I didn't understand these instruments of war, but the Priest \ + told me to use them regardless. Soon, he said, I would know them well." + + action_to_add = /datum/spell/pointed/cleave + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_lock_flesh.dm b/code/modules/antagonists/heretic/knowledge/side_lock_flesh.dm new file mode 100644 index 00000000000..7130c30a338 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_lock_flesh.dm @@ -0,0 +1,38 @@ +/datum/heretic_knowledge_tree_column/lock_to_flesh + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/lock + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/flesh + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/dummy_lock_to_flesh + tier2 = /datum/heretic_knowledge/spell/opening_blast + tier3 = /datum/heretic_knowledge/spell/apetra_vulnera + +/datum/heretic_knowledge/dummy_lock_to_flesh + name = "Flesh and Lock ways" + desc = "Research this to gain access to the other path" + gain_text = "There are ways from feasting to wounding, the power of birth is close to the power of opening." + cost = 1 + +// Sidepaths for knowledge between Knock and Flesh. +/datum/heretic_knowledge/spell/opening_blast + name = "Wave Of Desperation" + desc = "Grants you Wave Of Desparation, a spell which can only be cast while restrained. \ + It removes your restraints, repels and knocks down adjacent people, and applies the Mansus Grasp to everything nearby. \ + However, you will fall unconscious a short time after casting this spell." + gain_text = "My shackles undone in dark fury, their feeble bindings crumble before my power." + + action_to_add = /datum/spell/aoe/wave_of_desperation + cost = 1 + +/datum/heretic_knowledge/spell/apetra_vulnera + name = "Apetra Vulnera" + desc = "Grants you Apetra Vulnera, a spell \ + which causes heavy bleeding on all bodyparts of the victim that have more than 15 brute damage. \ + Wounds a random limb if no limb is sufficiently damaged." + gain_text = "Flesh opens, and blood spills. My master seeks sacrifice, and I shall appease." + + action_to_add = /datum/spell/pointed/apetra_vulnera + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_lock_moon.dm b/code/modules/antagonists/heretic/knowledge/side_lock_moon.dm new file mode 100644 index 00000000000..08a6c2370fb --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_lock_moon.dm @@ -0,0 +1,49 @@ +/datum/heretic_knowledge_tree_column/moon_to_lock + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/moon + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/lock + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/spell/mind_gate + tier2 = /datum/heretic_knowledge/unfathomable_curio + tier3 = /datum/heretic_knowledge/dummy_moon_to_lock + +// Sidepaths for knowledge between Knock and Moon. + +/datum/heretic_knowledge/dummy_moon_to_lock + name = "Lock and Moon ways" + desc = "Research this to gain access to the other path" + gain_text = "The powers of Madness are like a wound in one's soul, and every wound can be opened and closed." + cost = 1 + + + +/datum/heretic_knowledge/spell/mind_gate + name = "Mind Gate" + desc = "Grants you Mind Gate, a spell which inflicts hallucinations, \ + confusion, oxygen loss and insanity to its target over 10 seconds.\ + The caster's mind is likewise also inflicted with insanity in return." + gain_text = "My mind swings open like a gate, and its insight will let me perceive the truth." + + action_to_add = /datum/spell/mind_gate + cost = 1 + +/datum/heretic_knowledge/unfathomable_curio + name = "Unfathomable Curio" + desc = "Allows you to transmute 3 rods, lungs and any belt into an Unfathomable Curio, \ + a belt that can hold blades and items for rituals. Whilst worn it will also \ + veil you, allowing you to take 5 hits without suffering damage, this veil will recharge very slowly \ + outside of combat." + gain_text = "The mansus holds many a curio, some are not meant for the mortal eye." + + required_atoms = list( + /obj/item/organ/internal/lungs = 1, + /obj/item/stack/rods = 3, + /obj/item/storage/belt = 1, + ) + result_atoms = list(/obj/item/storage/belt/unfathomable_curio) + cost = 1 + + research_tree_icon_path = 'icons/obj/clothing/belts.dmi' + research_tree_icon_state = "unfathomable_curio" + diff --git a/code/modules/antagonists/heretic/knowledge/side_rust_cosmos.dm b/code/modules/antagonists/heretic/knowledge/side_rust_cosmos.dm new file mode 100644 index 00000000000..e916e3d5ede --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_rust_cosmos.dm @@ -0,0 +1,78 @@ +/datum/heretic_knowledge_tree_column/rust_to_cosmic + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/rust + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/cosmic + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/essence + tier2 = /datum/heretic_knowledge/dummy_rust_to_cosmos + tier3 = /datum/heretic_knowledge/summon/rusty + +// Sidepaths for knowledge between Rust and Cosmos. + +/datum/heretic_knowledge/dummy_rust_to_cosmos + name = "Cosmic and Rust ways" + desc = "Research this to gain access to the other path" + gain_text = "Rust is but the stardust of metal." + cost = 1 + +/datum/heretic_knowledge/essence + name = "Priest's Ritual" + desc = "Allows you to transmute a tank of water and a glass shard into a Flask of Eldritch Essence. \ + Eldritch water can be consumed for potent healing, or given to heathens for deadly poisoning." + gain_text = "This is an old recipe. The Owl whispered it to me. \ + Created by the Priest - the Liquid that both was and is not." + + required_atoms = list( + /obj/structure/reagent_dispensers/watertank = 1, + /obj/item/shard = 1, + ) + result_atoms = list(/obj/item/reagent_containers/drinks/bottle/eldritch) + cost = 1 + + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "eldritch_flask" + +/datum/heretic_knowledge/entropy_pulse + name = "Pulse of Entropy" + desc = "Allows you to transmute 10 iron sheets and a garbage item to fill the surrounding vicinity of the rune with rust." + gain_text = "Reality begins to whisper to me. To give it its entropic end." + required_atoms = list( + /obj/item/stack/sheet/metal = 10, + /obj/item/trash = 1, + ) + + research_tree_icon_path = 'icons/mob/actions/actions_ecult.dmi' + research_tree_icon_state = "corrode" + research_tree_icon_frame = 10 + + var/rusting_range = 8 + +/datum/heretic_knowledge/entropy_pulse/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + for(var/turf/nearby_turf in view(rusting_range, our_turf)) + if(get_dist(nearby_turf, our_turf) <= 1) //tiles on rune should always be rusted + nearby_turf.rust_heretic_act() + //we exclude closed turf to avoid exposing cultist bases + if(prob(60) || iswallturf(nearby_turf)) + continue + nearby_turf.rust_heretic_act() + return TRUE + + +/datum/heretic_knowledge/summon/rusty + name = "Rusted Ritual" + desc = "Allows you to transmute a pool of vomit, some cable coil, and 10 sheets of iron into a Rust Walker. \ + Rust Walkers excel at spreading rust and are moderately strong in combat." + gain_text = "I combined my knowledge of creation with my desire for corruption. The Marshal knew my name, and the Rusted Hills echoed out." + + required_atoms = list( + /obj/effect/decal/cleanable/vomit = 1, + /obj/item/stack/sheet/metal = 10, + /obj/item/stack/cable_coil = 15, + ) + mob_to_summon = /mob/living/basic/heretic_summon/rust_spirit + cost = 1 + + + diff --git a/code/modules/antagonists/heretic/knowledge/side_void_blade.dm b/code/modules/antagonists/heretic/knowledge/side_void_blade.dm new file mode 100644 index 00000000000..a985b6bae48 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_void_blade.dm @@ -0,0 +1,173 @@ +// Sidepaths for knowledge between Void and Blade. + +/datum/heretic_knowledge_tree_column/void_to_blade + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/void + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/blade + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/limited_amount/risen_corpse + tier2 = /datum/heretic_knowledge/rune_carver + tier3 = /datum/heretic_knowledge/summon/maid_in_mirror + + + +/// The max health given to Shattered Risen +#define RISEN_MAX_HEALTH 125 + +/datum/heretic_knowledge/limited_amount/risen_corpse + name = "Shattered Ritual" + desc = "Allows you to transmute a corpse with a soul, a pair of latex or nitrile gloves, and \ + and any exosuit clothing (such as armor) to create a Shattered Risen. \ + Shattered Risen are strong ghouls that have 125 health, but cannot hold items, \ + instead having two brutal weapons for hands. You can only create one at a time." + gain_text = "I witnessed a cold, rending force drag this corpse back to near-life. \ + When it moves, it crunches like broken glass. Its hands are no longer recognizable as human - \ + each clenched fist contains a brutal nest of sharp bone-shards instead." + + required_atoms = list( + /obj/item/clothing/suit = 1, + /obj/item/clothing/gloves/color/latex = 1, + ) + cost = 1 + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "ghoul_shattered" + + +/datum/heretic_knowledge/limited_amount/risen_corpse/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + . = ..() + if(!.) + return FALSE + + var/datum/antagonist/heretic/howetic = IS_HERETIC(user) + for(var/uid_finder as anything in howetic.list_of_our_monsters) + var/atom/real_thing = locateUID(uid_finder) + if(QDELETED(real_thing)) + LAZYREMOVE(howetic.list_of_our_monsters, uid_finder) + if(LAZYLEN(howetic.list_of_our_monsters) >= howetic.monster_limit) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, you are at your limit of [howetic.monster_limit] monsters!")) + return FALSE + + for(var/mob/living/carbon/human/body in atoms) + if(body.stat != DEAD) + continue + if(!IS_VALID_GHOUL_MOB(body) || HAS_TRAIT(body, TRAIT_HUSK)) + to_chat(user, SPAN_HIEROPHANT_WARNING("[body] is not in a valid state to be made into a ghoul.")) + continue + if(!body.mind) + to_chat(user, SPAN_HIEROPHANT_WARNING("[body] is mindless and cannot be made into a ghoul.")) + continue + if(!body.client && !body.mind.get_ghost()) + to_chat(user, SPAN_HIEROPHANT_WARNING("[body] is soulless and cannot be made into a ghoul.")) + continue + + // We will only accept valid bodies with a mind, or with a ghost connected that used to control the body + selected_atoms += body + return TRUE + + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, there is no valid body.")) + return FALSE + +/datum/heretic_knowledge/limited_amount/risen_corpse/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/mob/living/carbon/human/soon_to_be_ghoul = locate() in selected_atoms + if(QDELETED(soon_to_be_ghoul)) // No body? No ritual + stack_trace("[type] reached on_finished_recipe without a human in selected_atoms to make a ghoul out of.") + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, there is no valid body.")) + return FALSE + + soon_to_be_ghoul.grab_ghost() + if(!soon_to_be_ghoul.mind || !soon_to_be_ghoul.client) + stack_trace("[type] reached on_finished_recipe without a minded / cliented human in selected_atoms to make a ghoul out of.") + to_chat(user, SPAN_HIEROPHANT_WARNING("The ritual has failed, there is no valid body.")) + return FALSE + + selected_atoms -= soon_to_be_ghoul + make_risen(user, soon_to_be_ghoul) + return TRUE + +/// Make [victim] into a shattered risen ghoul. +/datum/heretic_knowledge/limited_amount/risen_corpse/proc/make_risen(mob/living/user, mob/living/carbon/human/victim) + message_admins("[ADMIN_LOOKUPFLW(user)] created a shattered risen, [ADMIN_LOOKUPFLW(victim)].") + + victim.apply_status_effect( + /datum/status_effect/ghoul, + RISEN_MAX_HEALTH, + user.mind, + CALLBACK(src, PROC_REF(apply_to_risen)), + CALLBACK(src, PROC_REF(remove_from_risen)), + ) + var/datum/antagonist/heretic/whoetic = IS_HERETIC(user) + LAZYADD(whoetic.list_of_our_monsters,victim.UID()) + +/// Callback for the ghoul status effect - what effects are applied to the ghoul. +/datum/heretic_knowledge/limited_amount/risen_corpse/proc/apply_to_risen(mob/living/risen) + LAZYADD(created_items, risen.UID()) + risen.put_in_active_hand(new/obj/item/shattered_risen) + +/// Callback for the ghoul status effect - cleaning up effects after the ghoul status is removed. +/datum/heretic_knowledge/limited_amount/risen_corpse/proc/remove_from_risen(mob/living/risen) + LAZYREMOVE(created_items, risen.UID()) + for(var/obj/item/shattered_risen/bone_shards in risen) + qdel(bone_shards) + +#undef RISEN_MAX_HEALTH + +/// The "hand" "weapon" used by shattered risen +/obj/item/shattered_risen + name = "bone-shards" + desc = "What once appeared to be a normal human fist, now holds a maulled nest of sharp bone-shards." + icon = 'icons/effects/vampire_effects.dmi' + icon_state = "vamp_claws" + lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons_righthand.dmi' + w_class = WEIGHT_CLASS_BULKY + flags = ABSTRACT | NODROP | DROPDEL + color = "#001aff" + hitsound = "shatter" + force = 16 + sharp = TRUE + +/obj/item/shattered_risen/Initialize(mapload) + . = ..() + AddComponent(/datum/component/two_handed, require_twohands = TRUE) + +/datum/heretic_knowledge/rune_carver + name = "Carving Knife" + desc = "Allows you to transmute a knife, a shard of glass, and a piece of paper to create a Carving Knife. \ + The Carving Knife allows you to etch difficult to see traps that trigger on heathens who walk overhead. \ + Also makes for a handy throwing weapon." + gain_text = "Etched, carved... eternal. There is power hidden in everything. I can unveil it! \ + I can carve the monolith to reveal the chains!" + + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/shard = 1, + /obj/item/paper = 1, + ) + result_atoms = list(/obj/item/melee/rune_carver) + cost = 1 + + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "rune_carver" + +/datum/heretic_knowledge/summon/maid_in_mirror + name = "Maid in the Mirror" + desc = "Allows you to transmute five sheets of titanium, a flash, a suit of armor, and a pair of lungs \ + to create a Maid in the Mirror. Maid in the Mirrors are decent combatants that can become incorporeal by \ + phasing in and out of the mirror realm, serving as powerful scouts and ambushers. \ + However, they are weak to mortal gaze and take damage by being examined." + gain_text = "Within each reflection, lies a gateway into an unimaginable world of colors never seen and \ + people never met. The ascent is glass, and the walls are knives. Each step is blood, if you do not have a guide." + + required_atoms = list( + /obj/item/stack/sheet/mineral/titanium = 5, + /obj/item/clothing/suit/armor = 1, + /obj/item/flash = 1, + /obj/item/organ/internal/lungs = 1, + ) + cost = 1 + + mob_to_summon = /mob/living/basic/heretic_summon/maid_in_the_mirror + diff --git a/code/modules/antagonists/heretic/knowledge/starting_lore.dm b/code/modules/antagonists/heretic/knowledge/starting_lore.dm new file mode 100644 index 00000000000..ea52e7bcfc9 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/starting_lore.dm @@ -0,0 +1,340 @@ +// Heretic starting knowledge. + +/// Global list of all heretic knowledge that have is_starting_knowledge = TRUE. List of PATHS. +GLOBAL_LIST_INIT(heretic_start_knowledge, initialize_starting_knowledge()) + +/** + * Returns a list of all heretic knowledge TYPEPATHS + * that have route set to PATH_START. + */ +/proc/initialize_starting_knowledge() + . = list() + for(var/datum/heretic_knowledge/knowledge as anything in subtypesof(/datum/heretic_knowledge)) + if(initial(knowledge.is_starting_knowledge) == TRUE) + . += knowledge + +/* + * The base heretic knowledge. Grants the Mansus Grasp spell. + */ +/datum/heretic_knowledge/spell/basic + name = "Break of Dawn" + desc = "Starts your journey into the Mansus. \ + Grants you the Mansus Grasp, a powerful and upgradable \ + disabling spell that can be cast regardless of having a focus." + action_to_add = /datum/spell/touch/mansus_grasp + is_starting_knowledge = TRUE + +/** + * The Living Heart heretic knowledge. + * + * Gives the heretic a living heart. + * Also includes a ritual to turn their heart into a living heart. + */ +/datum/heretic_knowledge/living_heart + name = "The Living Heart" + desc = "Grants you a Living Heart, allowing you to track sacrifice targets. \ + Should you lose your heart, you can transmute a poppy and a pool of blood \ + to awaken your heart into a Living Heart. If your heart is cybernetic, \ + you will additionally require a usable organic heart in the transmutation." + required_atoms = list( + /obj/effect/decal/cleanable/blood = 1, + /obj/item/food/grown/poppy = 1, + ) + priority = MAX_KNOWLEDGE_PRIORITY - 1 // Knowing how to remake your heart is important + is_starting_knowledge = TRUE + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "living_heart" + /// The typepath of the organ type required for our heart. + var/required_organ_type = /obj/item/organ/internal/heart + +/datum/heretic_knowledge/living_heart/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + + var/obj/item/organ/where_to_put_our_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + // Our heart slot is not valid to put a heart + if(!is_valid_heart(where_to_put_our_heart)) + where_to_put_our_heart = null + + // If a heretic is made from a species without a heart, we need to find a backup. + if(!where_to_put_our_heart) + var/static/list/backup_organs = list( + ORGAN_SLOT_LUNGS = /obj/item/organ/internal/lungs, + ORGAN_SLOT_LIVER = /obj/item/organ/internal/liver, + ORGAN_SLOT_BRAIN = /obj/item/organ/internal/brain/mmi_holder/posibrain + ) + + for(var/backup_slot in backup_organs) + var/obj/item/organ/look_for_backup = user.get_organ_slot(backup_slot) + // This backup slot is not a valid slot to put a heart + if(!is_valid_heart(look_for_backup)) + continue + + // We found a replacement place to put our heart + where_to_put_our_heart = look_for_backup + our_heretic.living_heart_organ_slot = backup_slot + required_organ_type = backup_organs[backup_slot] + to_chat(user, SPAN_BOLDNOTICE("As your species does not have a heart, your Living Heart is located in your [look_for_backup.name].")) + break + + if(where_to_put_our_heart) + where_to_put_our_heart.AddComponent(/datum/component/living_heart) + desc = "Grants you a Living Heart, tied to your [where_to_put_our_heart.name], \ + allowing you to track sacrifice targets. \ + Should you lose your [where_to_put_our_heart.name], you can transmute a poppy and a pool of blood \ + to awaken your replacement [where_to_put_our_heart.name] into a Living Heart. \ + If your [where_to_put_our_heart.name] is cybernetic, \ + you will additionally require a usable organic [where_to_put_our_heart.name] in the transmutation." + + else + to_chat(user, SPAN_BOLDNOTICE("You don't have a heart, or any chest organs for that matter. You didn't get a Living Heart because of it.")) + message_admins("Oh fuck me, [user] did not have a heart, lungs, or liver. give [user] some organic lungs or something, then have them use the ritual again, then report this to me") + +/datum/heretic_knowledge/living_heart/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + var/obj/item/organ/our_living_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + if(our_living_heart) + qdel(our_living_heart.GetComponent(/datum/component/living_heart)) + +// Don't bother letting them invoke this ritual if they have a Living Heart already in their chest +/datum/heretic_knowledge/living_heart/can_be_invoked(datum/antagonist/heretic/invoker) + if(invoker.has_living_heart() == HERETIC_HAS_LIVING_HEART) + return FALSE + return TRUE + +/datum/heretic_knowledge/living_heart/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + var/obj/item/organ/our_living_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + // For sanity's sake, check if they've got a living heart - + // even though it's not invokable if you already have one, + // they may have gained one unexpectantly in between now and then + if(!QDELETED(our_living_heart)) + if(HAS_TRAIT(our_living_heart, TRAIT_LIVING_HEART)) + to_chat(user, SPAN_HIEROPHANT("The ritual failed, you already have a living heart!")) + return FALSE + + // By this point they are making a new heart + // If their current heart is organic / not synthetic, we can continue the ritual as normal + if(is_valid_heart(our_living_heart)) + return TRUE + + + // Otherwise, seek out a replacement in our atoms + for(var/obj/item/organ/nearby_organ in atoms) + if(!istype(nearby_organ, required_organ_type)) + continue + if(!is_valid_heart(nearby_organ)) + continue + + selected_atoms += nearby_organ + return TRUE + + to_chat(user, "The ritual failed, you need a replacement [our_heretic.living_heart_organ_slot]!") // "need a replacement heart!" + return FALSE + +/datum/heretic_knowledge/living_heart/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + var/obj/item/organ/internal/our_new_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + + // Our heart is robotic or synthetic - we need to replace it, and we fortunately should have one by here + if(!is_valid_heart(our_new_heart)) + var/obj/item/organ/internal/our_replacement_heart = locate(required_organ_type) in selected_atoms + if(!our_replacement_heart) + CRASH("[type] required a replacement organic heart in on_finished_recipe, but did not find one.") + // Repair the organic heart, if needed, to just below the high threshold + if(our_replacement_heart.damage >= our_replacement_heart.min_broken_damage) + our_replacement_heart.damage = our_replacement_heart.min_broken_damage - 1 + // And now, put our organic heart in its place + our_replacement_heart.insert(user, TRUE) + if(our_new_heart) + // Throw our current heart out of our chest, violently + user.visible_message(SPAN_BOLDWARNING("[user]'s [our_new_heart.name] bursts suddenly out of [user.p_their()] chest!")) + INVOKE_ASYNC(user, TYPE_PROC_REF(/mob, emote), "scream") + user.apply_damage(20, BRUTE, BODY_ZONE_CHEST) + selected_atoms -= our_new_heart // so we don't delete our old heart while we dramatically toss is out + our_new_heart.throw_at(get_edge_target_turf(user, pick(GLOB.alldirs)), 2, 2) + our_new_heart = our_replacement_heart + + if(!our_new_heart) + CRASH("[type] somehow made it to on_finished_recipe without a heart. What?") + + // Snowflakey, but if the user used a heart that wasn't beating + // they'll immediately collapse into a heart attack. Funny but not ideal. + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.set_heartattack(FALSE) + + // Don't delete our shiny new heart + selected_atoms -= our_new_heart + // Make it the living heart + our_new_heart.AddComponent(/datum/component/living_heart) + to_chat(user, SPAN_WARNING("You feel your [our_new_heart.name] begin pulse faster and faster as it awakens!")) + playsound(user, 'sound/misc/demon_consume.ogg', 50, TRUE) + return TRUE + +/// Checks if the passed heart is a valid heart to become a living heart +/datum/heretic_knowledge/living_heart/proc/is_valid_heart(obj/item/organ/new_heart) + if(QDELETED(new_heart)) + return FALSE + if(new_heart.status & (ORGAN_ROBOT|ORGAN_DEAD) && !istype(new_heart, /obj/item/organ/internal/brain/mmi_holder/posibrain)) //posibrains are living enough I guess + return FALSE + + return TRUE + +/** + * Allows the heretic to craft a spell focus. + * They require a focus to cast advanced spells. + */ +/datum/heretic_knowledge/amber_focus + name = "Amber Focus" + desc = "Allows you to transmute a sheet of glass and a pair of eyes to create an Amber Focus. \ + A focus must be worn in order to cast more advanced spells." + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/item/stack/sheet/glass = 1, + ) + result_atoms = list(/obj/item/clothing/neck/heretic_focus) + priority = MAX_KNOWLEDGE_PRIORITY - 2 // Not as important as making a heart or sacrificing, but important enough. + is_starting_knowledge = TRUE + research_tree_icon_path = 'icons/obj/clothing/neck.dmi' + research_tree_icon_state = "eldritch_necklace" + +/datum/heretic_knowledge/spell/cloak_of_shadows + name = "Cloak of Shadow" + desc = "Grants you the spell Cloak of Shadow. This spell will completely conceal your identity in a purple smoke \ + for three minutes, assisting you in keeping secrecy. Requires a focus to cast." + action_to_add = /datum/spell/shadow_cloak + is_starting_knowledge = TRUE + +/** + * Codex Cicatrixi is available at the start: + * This allows heretics to choose if they want to rush all the influences and take them stealthily, or + * Construct a codex and take what's left with more points. + * Another downside to having the book is strip searches, which means that it's not just a free nab, at least until you get exposed - and when you do, you'll probably need the faster drawing speed. + * Overall, it's a tradeoff between speed and stealth or power. + */ +/datum/heretic_knowledge/codex_cicatrix + name = "Codex Cicatrix" + desc = "Allows you to transmute a book, any unique pen (anything but a generic pen, blue pen, or red pen), and your pick from any carcass (animal or human), leather, or hide to create a Codex Cicatrix. \ + The Codex Cicatrix can be used when draining influences to gain additional knowledge, but comes at greater risk of being noticed. \ + It can also be used to draw and remove transmutation runes easier, and as a spell focus in a pinch." + gain_text = "The occult leaves fragments of knowledge and power anywhere and everywhere. The Codex Cicatrix is one such example. \ + Within the leather-bound faces and age old pages, a path into the Mansus is revealed." + required_atoms = list( + /obj/item/book = 1, + /obj/item/pen = 1, + list(/mob/living, /obj/item/stack/sheet/leather, /obj/item/stack/sheet/animalhide) = 1, + ) + banned_atom_types = list(/obj/item/pen, /obj/item/pen/blue, /obj/item/pen/red) + result_atoms = list(/obj/item/codex_cicatrix) + cost = 1 + is_starting_knowledge = TRUE + priority = MAX_KNOWLEDGE_PRIORITY - 3 // Least priority out of the starting knowledges, as it's an optional boon. + var/static/list/non_mob_bindings = typecacheof(list(/obj/item/stack/sheet/leather, /obj/item/stack/sheet/animalhide)) + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "book" + +/datum/heretic_knowledge/codex_cicatrix/parse_required_item(atom/item_path, number_of_things) + if(item_path == /obj/item/pen || item_path == /obj/item/pen/blue || item_path == /obj/item/pen/red) + return "any type of pen that is not a basic, blue, or red pen" + return ..() + +/datum/heretic_knowledge/codex_cicatrix/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + . = ..() + if(!.) + return FALSE + + for(var/thingy in atoms) + if(is_type_in_typecache(thingy, non_mob_bindings)) + selected_atoms += thingy + return TRUE + else if(isliving(thingy)) + var/mob/living/body = thingy + if(body.stat != DEAD) + continue + selected_atoms += body + return TRUE + return FALSE + +/datum/heretic_knowledge/codex_cicatrix/cleanup_atoms(list/selected_atoms) + var/mob/living/body = locate() in selected_atoms + if(!body) + return ..() + var/exterior_text = "skin" + // If human, it's the limb. If not, it's the body. + var/atom/movable/ripped_thing = body + + // We will check if it's a humann's body. + // If it is, we will damage a random bodypart, and check that bodypart for its body type, to select between 'skin' or 'exterior'. + if(ishuman(body)) + var/mob/living/carbon/human/carbody = body + var/obj/item/organ/external/bodypart = pick(carbody.bodyparts) + ripped_thing = bodypart + carbody.apply_damage(25, BRUTE, bodypart, sharp = TRUE) + else + body.apply_damage(25, BRUTE, sharp = TRUE) + // If it is not a carbon mob, we will just check biotypes and damage it directly. + if(body.mob_biotypes & (MOB_MINERAL|MOB_ROBOTIC)) + exterior_text = "exterior" + + // Procure book for flavor text. This is why we call parent at the end. + var/obj/item/book/le_book = locate() in selected_atoms + if(!le_book) + stack_trace("Somehow, no book in codex cicatrix selected atoms! [english_list(selected_atoms)]") + playsound(body, 'sound/items/poster_ripped.ogg', 100, TRUE) + body.do_jitter_animation() + var/turf/our_turf = get_turf(body) + our_turf.visible_message(SPAN_DANGER("An awful ripping sound is heard as [ripped_thing]'s [exterior_text] is ripped straight out, wrapping around [le_book || "the book"], turning into an eldritch shade of blue!")) + return ..() + +/datum/heretic_knowledge/feast_of_owls + name = "Feast of Owls" + desc = "Allows you to undergo a ritual that gives you 5 knowledge points but locks you out of ascension. This can only be done once and cannot be reverted. You can only do this with hijack, or at least 6 cultists around" + gain_text = "Under the soft glow of unreason there is a beast that stalks the night. I shall bring it forth and let it enter my presence. It will feast upon my amibitions and leave knowledge in its wake." + is_starting_knowledge = TRUE + required_atoms = list() + research_tree_icon_path = 'icons/mob/actions/actions_animal.dmi' + research_tree_icon_state = "god_transmit" + /// amount of research points granted + var/reward = 5 + +/datum/heretic_knowledge/feast_of_owls/can_be_invoked(datum/antagonist/heretic/invoker) + return !invoker.feast_of_owls + +/datum/heretic_knowledge/feast_of_owls/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + var/has_hijack = FALSE + for(var/datum/objective/is_it_hijack as anything in user.mind.get_all_objectives(include_team = FALSE)) + if(istype(is_it_hijack, /datum/objective/hijack)) + has_hijack = TRUE + var/cult_players = 0 + var/datum/team/cult/cult_team = SSticker.mode.cult_team + if(cult_team) + cult_players = cult_team.get_cultists() + if(!has_hijack && cult_players < 6) + to_chat(user, SPAN_HIEROPHANT_WARNING("You lack the ambition of hijacking to ascend, or there is not enough cultists!")) + return FALSE + var/alert = tgui_alert(user,"Do you really want to forsake your ascension? This action cannot be reverted.", "Feast of Owls", list("Yes I'm sure", "No"), 30 SECONDS) + if(alert != "Yes I'm sure" || QDELETED(user) || QDELETED(src) || get_dist(user, our_turf) > 2) + return FALSE + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(QDELETED(heretic_datum) || heretic_datum.feast_of_owls) + return FALSE + + . = TRUE + + heretic_datum.feast_of_owls = TRUE + user.playsound_local(get_turf(user), 'sound/ambience/antag/heretic/heretic_gain_intense.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) + user.EyeBlind(reward * 1 SECONDS) + user.Weaken(reward * 1 SECONDS) + for(var/i in 1 to reward) + user.emote("scream") + playsound(our_turf, 'sound/items/eatfood.ogg', 100, TRUE) + heretic_datum.knowledge_points++ + to_chat(user, SPAN_DANGER("You feel something invisible tearing away at your very essence!")) + user.do_jitter_animation() + sleep(1 SECONDS) + if(QDELETED(user) || QDELETED(heretic_datum)) + return FALSE + + to_chat(user, SPAN_DANGER("Your ambition is ravaged, but something powerful remains in its wake...")) + var/drain_message = pick_list(HERETIC_INFLUENCE_FILE, "drain_message") + to_chat(user, SPAN_HIEROPHANT("[drain_message]")) + return . diff --git a/code/modules/antagonists/heretic/knowledge/void_lore.dm b/code/modules/antagonists/heretic/knowledge/void_lore.dm new file mode 100644 index 00000000000..86b6f63a77d --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/void_lore.dm @@ -0,0 +1,326 @@ + +/datum/heretic_knowledge_tree_column/main/void + neighbour_type_left = /datum/heretic_knowledge_tree_column/flesh_to_void + neighbour_type_right = /datum/heretic_knowledge_tree_column/void_to_blade + + route = PATH_VOID + ui_bgr = "node_void" + + start = /datum/heretic_knowledge/limited_amount/starting/base_void + grasp = /datum/heretic_knowledge/void_grasp + tier1 = /datum/heretic_knowledge/cold_snap + mark = /datum/heretic_knowledge/mark/void_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/void + unique_ability = /datum/heretic_knowledge/spell/void_conduit + tier2 = /datum/heretic_knowledge/spell/void_phase + blade = /datum/heretic_knowledge/blade_upgrade/void + tier3 = /datum/heretic_knowledge/spell/void_pull + ascension = /datum/heretic_knowledge/ultimate/void_final + +/datum/heretic_knowledge/limited_amount/starting/base_void + name = "Glimmer of Winter" + desc = "Opens up the Path of Void to you. \ + Allows you to transmute a knife in sub-zero temperatures into a Void Blade. \ + You can only create three at a time." + gain_text = "I feel a shimmer in the air, the air around me gets colder. \ + I start to realize the emptiness of existence. Something's watching me." + required_atoms = list(/obj/item/kitchen/knife = 1) + result_atoms = list(/obj/item/melee/sickly_blade/void) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "void_blade" + +/datum/heretic_knowledge/limited_amount/starting/base_void/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + if(!isfloorturf(our_turf)) + to_chat(user, "The ritual failed, this is not a valid location!") + return FALSE + + var/turf/simulated/our_simulated_turf = our_turf + var/datum/gas_mixture/G = our_simulated_turf.get_readonly_air() + var/turf_hotness = G.temperature() + var/turf_pressure = G.return_pressure() + if(turf_hotness > T0C && turf_pressure >= ONE_ATMOSPHERE / 2 || turf_hotness > 475) // The magic number is approximently lavalands temperature. No, lavaland is not cold, depsite being low pressure + to_chat(user, "The ritual failed, it is too hot for the ritual!") + return FALSE + + return ..() + +/datum/heretic_knowledge/void_grasp + name = "Grasp of Void" + desc = "Your Mansus Grasp will temporarily mute and chill the victim." + gain_text = "I saw the cold watcher who observes me. The chill mounts within me. \ + They are quiet. This isn't the end of the mystery." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_void" + +/datum/heretic_knowledge/void_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/void_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/void_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(!iscarbon(target)) + return + + var/mob/living/carbon/carbon_target = target + carbon_target.Silence(10 SECONDS) + carbon_target.apply_status_effect(/datum/status_effect/void_chill, 2) + +/datum/heretic_knowledge/cold_snap + name = "Aristocrat's Way" + desc = "Grants you immunity to cold temperatures, and removes your need to breathe. \ + You can still take damage due to a lack of pressure." + gain_text = "I found a thread of cold breath. It lead me to a strange shrine, all made of crystals. \ + Translucent and white, a depiction of a nobleman stood before me." + cost = 1 + research_tree_icon_path = 'icons/effects/effects.dmi' + research_tree_icon_state = "the_freezer" + + /// How many life cycles have we failed? After 3, remove the buff + var/failed_life_cycles = 0 + /// Traits we apply to become immune to the environment + var/static/list/gain_traits = list(TRAIT_NOSLIP) + +/datum/heretic_knowledge/cold_snap/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + user.add_traits(list(TRAIT_NOBREATH, TRAIT_RESISTCOLD), type) + RegisterSignal(user, COMSIG_LIVING_LIFE, PROC_REF(check_environment)) + +/datum/heretic_knowledge/cold_snap/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + user.remove_traits(list(TRAIT_RESISTCOLD, TRAIT_NOBREATH), type) + UnregisterSignal(user, COMSIG_LIVING_LIFE) + +///Checks if our traits should be active +/datum/heretic_knowledge/cold_snap/proc/check_environment(mob/living/user) + SIGNAL_HANDLER + var/turf/simulated/our_turf = get_turf(user) + var/datum/gas_mixture/G = our_turf.get_readonly_air() + var/turf_hotness = G.temperature() + var/turf_pressure = G.return_pressure() + if(turf_hotness <= T0C || turf_pressure < ONE_ATMOSPHERE) + user.add_traits(gain_traits, type) + failed_life_cycles = 0 + else + if(failed_life_cycles >= 3) + failed_life_cycles = 0 + user.remove_traits(gain_traits, type) + return + failed_life_cycles++ + +/datum/heretic_knowledge/mark/void_mark + name = "Mark of Void" + desc = "Your Mansus Grasp now applies the Mark of Void. The mark is triggered from an attack with your Void Blade. \ + When triggered, further silences the victim and swiftly lowers the temperature of their body and the air around them." + gain_text = "A gust of wind? A shimmer in the air? The presence is overwhelming, \ + my senses began to betray me. My mind is my own enemy." + mark_type = /datum/status_effect/eldritch/void + +/datum/heretic_knowledge/knowledge_ritual/void + +/datum/heretic_knowledge/spell/void_conduit + name = "Void Conduit" + desc = "Grants you Void Conduit, a spell which summons a pulsing gate to the Void itself. Every pulse breaks windows and airlocks, while afflicting Heathens with an eldritch chill and shielding Heretics against low pressure." + gain_text = "The hum in the still, cold air turns to a cacophonous rattle. \ + Over the noise, there is no distinction to the clattering of window panes and the yawning knowledge that ricochets through my skull. \ + The doors won't close. I can't keep the cold out now." + action_to_add = /datum/spell/aoe/conjure/void_conduit + cost = 1 + +/datum/heretic_knowledge/spell/void_phase + name = "Void Phase" + desc = "Grants you Void Phase, a long range targeted teleport spell. \ + Additionally causes damage to heathens around your original and target destination." + gain_text = "The entity calls themself the Aristocrat. They effortlessly walk through air like \ + nothing - leaving a harsh, cold breeze in their wake. They disappear, and I am left in the blizzard." + action_to_add = /datum/spell/pointed/void_phase + cost = 1 + research_tree_icon_frame = 7 + +/datum/heretic_knowledge/blade_upgrade/void + name = "Seeking Blade" + desc = "Your blade now freezes enemies. Additionally, you can now attack distant marked targets with your Void Blade, teleporting directly next to them." + gain_text = "Fleeting memories, fleeting feet. I mark my way with frozen blood upon the snow. Covered and forgotten." + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_void" + +/datum/heretic_knowledge/blade_upgrade/void/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + + target.apply_status_effect(/datum/status_effect/void_chill, 2) + +/datum/heretic_knowledge/blade_upgrade/void/do_ranged_effects(mob/living/user, mob/living/target, obj/item/melee/sickly_blade/blade) + if(!isliving(target)) + return + if(!target.has_status_effect(/datum/status_effect/eldritch)) + return + + var/dir = angle2dir(dir2angle(get_dir(user, target)) + 180) + user.forceMove(get_step(target, dir)) + + INVOKE_ASYNC(src, PROC_REF(follow_up_attack), user, target, blade) + +/datum/heretic_knowledge/blade_upgrade/void/proc/follow_up_attack(mob/living/user, mob/living/target, obj/item/melee/sickly_blade/blade) + blade.melee_attack_chain(user, target) + +/datum/heretic_knowledge/spell/void_pull + name = "Void Pull" + desc = "Grants you Void Pull, a spell that pulls all nearby heathens towards you, stunning them briefly." + gain_text = "All is fleeting, but what else stays? I'm close to ending what was started. \ + The Aristocrat reveals themselves to me again. They tell me I am late. Their pull is immense, I cannot turn back." + + action_to_add = /datum/spell/aoe/void_pull + cost = 1 + + + research_tree_icon_frame = 6 + +/datum/heretic_knowledge/ultimate/void_final + name = "Waltz at the End of Time" + desc = "The ascension ritual of the Path of Void. \ + Bring 3 corpses to a transmutation rune in sub-zero temperatures to complete the ritual. \ + When completed, causes a violent storm of void snow \ + to assault the station, freezing and damaging heathens. Those nearby will be silenced and frozen even quicker. \ + Additionally, you will become immune to the effects of space." + gain_text = "The world falls into darkness. I stand in an empty plane, small flakes of ice fall from the sky. \ + The Aristocrat stands before me, beckoning. We will play a waltz to the whispers of dying reality, \ + as the world is destroyed before our eyes. The void will return all to nothing, WITNESS MY ASCENSION!" + + announcement_text = "%SPOOKY% The nobleman of void %NAME% has arrived, stepping along the Waltz that ends worlds! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_void.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "voidascend" + ///soundloop for the void theme + var/datum/looping_sound/void_loop/sound_loop + ///Reference to the ongoing voidstrom that surrounds the heretic + var/datum/weather/void_storm/storm + ///The storm where there are actual effects + var/datum/proximity_monitor/advanced/void_storm/heavy_storm + +/datum/heretic_knowledge/ultimate/void_final/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/our_turf) + if(!isfloorturf(our_turf)) + to_chat(user, "The ritual failed, this is not a valid location!") + return FALSE + + var/datum/gas_mixture/G = our_turf.get_readonly_air() + var/turf_hotness = G.temperature() + var/turf_pressure = G.return_pressure() + if(turf_hotness > T0C && turf_pressure >= ONE_ATMOSPHERE / 2 || turf_hotness > 475) + to_chat(user, "The ritual failed, it is too hot for the ritual!") + return FALSE + + return ..() + +/datum/heretic_knowledge/ultimate/void_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/our_turf) + . = ..() + user.add_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_FLYING), type) + + // Let's get this show on the road! + sound_loop = new(user, TRUE, TRUE) + RegisterSignal(user, COMSIG_LIVING_LIFE, PROC_REF(on_life)) + RegisterSignal(user, COMSIG_ATOM_PREHIT, PROC_REF(hit_by_projectile)) + RegisterSignals(user, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING), PROC_REF(on_death)) + heavy_storm = new(user, 10) + user.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + user.update_sight() + +/datum/heretic_knowledge/ultimate/void_final/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + on_death() // Losing is pretty much dying. I think + +/** + * Signal proc for [COMSIG_LIVING_LIFE]. + * + * Any non-heretics nearby the heretic ([source]) + * are constantly silenced and battered by the storm. + * + * Also starts storms in any area that doesn't have one. + */ +/datum/heretic_knowledge/ultimate/void_final/proc/on_life(mob/living/source, seconds_per_tick, times_fired) + SIGNAL_HANDLER + + for(var/atom/thing_in_range as anything in range(10, source)) + if(iscarbon(thing_in_range)) + var/mob/living/carbon/close_carbon = thing_in_range + if(IS_HERETIC_OR_MONSTER(close_carbon)) + close_carbon.apply_status_effect(/datum/status_effect/void_conduit) + continue + close_carbon.Silence(2 SECONDS) + close_carbon.apply_status_effect(/datum/status_effect/void_chill, 1) + close_carbon.EyeBlurry(rand(0, 2 SECONDS)) + close_carbon.adjust_bodytemperature(-30 * TEMPERATURE_DAMAGE_COEFFICIENT) + + if(istype(thing_in_range, /obj/machinery/door)) + var/obj/machinery/door/affected_door = thing_in_range + affected_door.disable_door_sparks() //Sparks are the majority of the lag from this ascension, let us kill that off. + affected_door.take_damage(rand(60, 80)) + + if(istype(thing_in_range, /obj/structure/window) || istype(thing_in_range, /obj/structure/grille) || istype(thing_in_range, /obj/structure/door_assembly) || istype(thing_in_range, /obj/structure/firelock_frame)) + var/obj/structure/affected_structure = thing_in_range + affected_structure.take_damage(rand(20, 40)) + + if(isturf(thing_in_range)) + var/datum/milla_safe/void_cool/milla = new() + milla.invoke_async(thing_in_range) + + // Telegraph the storm in every area on the station. + var/list/station_levels = levels_by_trait(STATION_LEVEL) + if(!storm) + storm = new /datum/weather/void_storm(station_levels) + storm.telegraph() + + +/datum/milla_safe/void_cool + +/datum/milla_safe/void_cool/on_run(turf/T) + var/datum/gas_mixture/air = get_turf_air(T) + if(air.temperature() < T0C - 100) + return + air.set_temperature(air.temperature() * 0.9) + air.react() + +/** + * Signal proc for [COMSIG_MOB_DEATH]. + * + * Stop the storm when the heretic passes away. + */ +/datum/heretic_knowledge/ultimate/void_final/proc/on_death(datum/source) + SIGNAL_HANDLER + + if(sound_loop) + sound_loop.stop() + if(storm) + storm.end() + QDEL_NULL(storm) + if(heavy_storm) + QDEL_NULL(heavy_storm) + UnregisterSignal(source, list(COMSIG_LIVING_LIFE, COMSIG_ATOM_PREHIT, COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING)) + +///Few checks to determine if we can deflect bullets +/datum/heretic_knowledge/ultimate/void_final/proc/can_deflect(mob/living/ascended_heretic) + if(!(ascended_heretic.mobility_flags & MOBILITY_USE)) + return FALSE + if(!isturf(ascended_heretic.loc)) + return FALSE + return TRUE + +/datum/heretic_knowledge/ultimate/void_final/proc/hit_by_projectile(mob/living/ascended_heretic, obj/projectile/hitting_projectile, def_zone) + SIGNAL_HANDLER + + if(!can_deflect(ascended_heretic)) + return NONE + + ascended_heretic.visible_message( + "The void storm surrounding [ascended_heretic] deflects [hitting_projectile]!", + "The void storm protects you from [hitting_projectile]!", + ) + playsound(ascended_heretic, "void_deflect", 75, TRUE) + hitting_projectile.firer = ascended_heretic + if(prob(75)) + hitting_projectile.reflect_back(src) + else + hitting_projectile.set_angle(rand(0, 360))//SHING + return ATOM_PREHIT_FAILURE diff --git a/code/modules/antagonists/heretic/magic/aggressive_spread.dm b/code/modules/antagonists/heretic/magic/aggressive_spread.dm new file mode 100644 index 00000000000..1efdb37de2d --- /dev/null +++ b/code/modules/antagonists/heretic/magic/aggressive_spread.dm @@ -0,0 +1,48 @@ +/datum/spell/aoe/rust_conversion + name = "Aggressive Spread" + desc = "Spreads rust onto nearby surfaces." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "corrode" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/items/welder.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "A'GRSV SPR'D" + invocation_type = INVOCATION_WHISPER + aoe_range = 3 + + +/datum/spell/aoe/rust_conversion/create_new_targeting() + var/datum/spell_targeting/aoe/turf/targeting = new() + targeting.range = aoe_range + targeting.use_turf_of_user = TRUE + return targeting + +/datum/spell/aoe/rust_conversion/cast(list/targets, mob/living/user = usr) + for(var/turf/target_turfs in targets) + // We have less chance of rusting stuff that's further + var/distance_to_caster = get_dist(target_turfs, user) + var/chance_of_not_rusting = (max(distance_to_caster, 1) - 1) * 100 / (aoe_range + 1) + + if(prob(chance_of_not_rusting)) + continue + for(var/atom/victim in target_turfs) + if(isliving(user)) + user.do_rust_heretic_act(victim) + else + victim.rust_heretic_act() + if(isliving(user)) + user.do_rust_heretic_act(target_turfs) + else + target_turfs.rust_heretic_act() + + +/datum/spell/aoe/rust_conversion/construct + name = "Construct Spread" + base_cooldown = 15 SECONDS diff --git a/code/modules/antagonists/heretic/magic/apetravulnera.dm b/code/modules/antagonists/heretic/magic/apetravulnera.dm new file mode 100644 index 00000000000..fea21f1926a --- /dev/null +++ b/code/modules/antagonists/heretic/magic/apetravulnera.dm @@ -0,0 +1,68 @@ +/datum/spell/pointed/apetra_vulnera + name = "Apetra Vulnera" + desc = "Causes severe bleeding and opens every limb of a target which has more than 15 brute damage. \ + Opens a random limb if no limb is sufficiently damaged." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "apetra_vulnera" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "AP'TRA VULN'RA!" + invocation_type = INVOCATION_WHISPER + + cast_range = 4 + +/datum/spell/pointed/apetra_vulnera/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.use_turf_of_user = TRUE + C.allowed_type = /mob/living/carbon/human + C.range = cast_range + C.try_auto_target = FALSE + return C + + +/datum/spell/pointed/apetra_vulnera/valid_target(target, user) + return ..() && ishuman(target) + +/datum/spell/pointed/apetra_vulnera/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/human/cast_on = targets[1] + if(IS_HERETIC_OR_MONSTER(cast_on)) + return FALSE + + if(!cast_on.blood_volume) + return FALSE + + if(cast_on.can_block_magic(antimagic_flags)) + cast_on.visible_message( + SPAN_DANGER("[cast_on]'s bruises briefly glow, but repels the effect!"), + SPAN_DANGER("Your bruises sting a little, but you are protected!") + ) + return FALSE + + var/a_limb_got_damaged = FALSE + for(var/obj/item/organ/external/bodypart in cast_on.bodyparts) + if(bodypart.brute_dam < 15) + continue + a_limb_got_damaged = TRUE + bodypart.open = ORGAN_ORGANIC_VIOLENT_OPEN + + if(!a_limb_got_damaged) + var/obj/item/organ/external/other_bodypart = (pick(cast_on.bodyparts)) + other_bodypart.open = ORGAN_ORGANIC_VIOLENT_OPEN + + cast_on.visible_message( + SPAN_DANGER("[cast_on]'s scratches and bruises are torn open by an unholy force!"), + SPAN_DANGER("Your scratches and bruises are torn open by some horrible unholy force!") + ) + + new /obj/effect/temp_visual/cleave(get_turf(cast_on)) + + return TRUE diff --git a/code/modules/antagonists/heretic/magic/ascended_shapeshift.dm b/code/modules/antagonists/heretic/magic/ascended_shapeshift.dm new file mode 100644 index 00000000000..5ca09e99291 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/ascended_shapeshift.dm @@ -0,0 +1,5 @@ +// Given to ascended knock heretics, is a form of shapeshift that can turn into all 4 common heretic summons, and is not limited to 1 selection. +/datum/spell/shapeshift/eldritch/ascension + name = "Ascended Shapechange" + desc = "A spell that allows you to take on the form of another eldritch creature, gaining their abilities. \ + You can change your choice at any time, and if your form dies, you dont die." diff --git a/code/modules/antagonists/heretic/magic/ash_ascension.dm b/code/modules/antagonists/heretic/magic/ash_ascension.dm new file mode 100644 index 00000000000..2c430704d5d --- /dev/null +++ b/code/modules/antagonists/heretic/magic/ash_ascension.dm @@ -0,0 +1,181 @@ +/// Creates a constant Ring of Fire around the caster for a set duration of time, which follows them. +/datum/spell/fire_sworn + name = "Oath of Flame" + desc = "For a minute, you will passively create a ring of fire around you." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "fire_ring" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 70 SECONDS + + invocation = "FL'MS" + invocation_type = INVOCATION_WHISPER + + /// The radius of the fire ring + var/fire_radius = 1 + /// How long it the ring lasts + var/duration = 1 MINUTES + + +/datum/spell/fire_sworn/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/fire_sworn/cast(list/targets, mob/user) + . = ..() + if(isliving(user)) + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/fire_ring, duration, fire_radius) + +/// Simple status effect for adding a ring of fire around a mob. +/datum/status_effect/fire_ring + id = "fire_ring" + tick_interval = 0.2 SECONDS + status_type = STATUS_EFFECT_REFRESH + alert_type = null + /// The radius of the ring around us. + var/ring_radius = 1 + +/datum/status_effect/fire_ring/on_creation(mob/living/new_owner, duration = 1 MINUTES, radius = 1) + src.duration = duration + src.ring_radius = radius + return ..() + +/datum/status_effect/fire_ring/tick() + if(QDELETED(owner) || owner.stat == DEAD) + qdel(src) + return + + if(!isturf(owner.loc)) + return + + for(var/turf/nearby_turf as anything in RANGE_TURFS(1, owner)) + fireflash(nearby_turf, 0, 750) + for(var/mob/living/fried_living in nearby_turf.contents - owner) + fried_living.apply_damage(1.5, BURN) + for(var/obj/effect/hotspot/flame_tile in range(2, owner)) //Extra range for if they are moving about since there is async shit going on + flame_tile.alpha = 125 + +/// Creates one, large, expanding ring of fire around the caster, which does not follow them. +/datum/spell/fire_cascade + name = "Lesser Fire Cascade" + desc = "Heats the air around you." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "fire_ring" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/items/welder.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "C'SC'DE" + invocation_type = INVOCATION_WHISPER + + /// The radius the flames will go around the caster. + var/flame_radius = 4 + +/datum/spell/fire_cascade/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/fire_cascade/cast(list/targets, mob/user) + . = ..() + INVOKE_ASYNC(src, PROC_REF(fire_cascade), get_turf(user), user, flame_radius) + +/// Spreads a huge wave of fire in a radius around us, staggered between levels +/datum/spell/fire_cascade/proc/fire_cascade(atom/centre, mob/user, flame_radius = 1) + for(var/i in 0 to flame_radius) + for(var/turf/nearby_turf as anything in spiral_range_turfs(i + 1, centre)) + fireflash(nearby_turf, 0, 750) + for(var/mob/living/fried_living in nearby_turf.contents - user) + fried_living.apply_damage(5, BURN) + + stoplag(0.3 SECONDS) + for(var/obj/effect/hotspot/flame_tile in range(i + 2, user)) //Extra range for if they are moving about since there is async shit going on + flame_tile.alpha = 125 + +/datum/spell/fire_cascade/big + name = "Greater Fire Cascade" + flame_radius = 6 + +// Currently used only by the funny haunted longsword +/datum/spell/pointed/ash_beams + name = "Nightwatcher's Rite" + desc = "A powerful spell that releases five streams of eldritch fire towards the target." + + + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + action_icon_state = "flames" + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 300 + + invocation = "F'RE" + invocation_type = INVOCATION_WHISPER + + /// The length of the flame line spit out. + var/flame_line_length = 15 + +/datum/spell/pointed/ash_beams/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.use_turf_of_user = TRUE + C.allowed_type = /atom + return C + + +/datum/spell/pointed/ash_beams/cast(list/targets, mob/user) + . = ..() + var/target = targets[1] + var/static/list/offsets = list(-25, -10, 0, 10, 25) + for(var/offset in offsets) + INVOKE_ASYNC(src, PROC_REF(fire_line), user, line_target(offset, flame_line_length, target, user)) + +/datum/spell/pointed/ash_beams/proc/line_target(offset, range, atom/at, atom/user) + var/turf/user_loc = get_turf(user) + if(!at) + return + var/angle = ATAN2(at.x - user_loc.x, at.y - user_loc.y) + offset + var/turf/T = get_turf(user) + for(var/i in 1 to range) + var/turf/check = locate(user_loc.x + cos(angle) * i, user_loc.y + sin(angle) * i, user_loc.z) + if(!check) + break + T = check + return (get_line(user_loc, T) - user_loc) + +/datum/spell/pointed/ash_beams/proc/fire_line(atom/source, list/turfs) + var/list/hit_list = list() + for(var/turf/T in turfs) + if(iswallturf(T)) + break + + for(var/mob/living/L in T.contents) + if(L.can_block_magic()) + L.visible_message(SPAN_DANGER("The spell bounces off of [L]!"), SPAN_USERDANGER("The spell bounces off of you!")) + continue + if((L in hit_list) || L == source) + continue + hit_list += L + L.adjustFireLoss(20) + to_chat(L, SPAN_USERDANGER("You're hit by [source]'s eldritch flames!")) + + fireflash(T, 0, 750) + // deals damage to mechs + for(var/obj/mecha/M in T.contents) + if(M in hit_list) + continue + hit_list += M + M.take_damage(45, BURN, MELEE, 1) + sleep(0.15 SECONDS) diff --git a/code/modules/antagonists/heretic/magic/ash_jaunt.dm b/code/modules/antagonists/heretic/magic/ash_jaunt.dm new file mode 100644 index 00000000000..484fff2554c --- /dev/null +++ b/code/modules/antagonists/heretic/magic/ash_jaunt.dm @@ -0,0 +1,42 @@ +/datum/spell/ethereal_jaunt/ash + name = "Ashen Passage" + desc = "A short range spell that allows you to pass unimpeded through walls." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "ash_shift" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = null + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 40 SECONDS + + invocation = "ASH'N P'SSG'" + invocation_type = INVOCATION_WHISPER + + sound1 = null + sound2 = null + jaunt_duration = 1.1 SECONDS + jaunt_in_time = 0.35 SECONDS //Did you know it sleeps 4x this number? So you have to make it 1/4th of what it actually is? + jaunt_out_time = 0.6 SECONDS + jaunt_in_type = /obj/effect/temp_visual/dir_setting/ash_shift + jaunt_out_type = /obj/effect/temp_visual/dir_setting/ash_shift/out + + +/datum/spell/ethereal_jaunt/ash/jaunt_steam() + return + +/datum/spell/ethereal_jaunt/ash/long + name = "Ashen Walk" + desc = "A long range spell that allows you pass unimpeded through multiple walls." + jaunt_duration = 5 SECONDS + +/obj/effect/temp_visual/dir_setting/ash_shift + name = "ash_shift" + icon_state = "ash_shift2" + duration = 1.3 SECONDS + +/obj/effect/temp_visual/dir_setting/ash_shift/out + icon_state = "ash_shift" diff --git a/code/modules/antagonists/heretic/magic/blood_cleave.dm b/code/modules/antagonists/heretic/magic/blood_cleave.dm new file mode 100644 index 00000000000..fc6831225db --- /dev/null +++ b/code/modules/antagonists/heretic/magic/blood_cleave.dm @@ -0,0 +1,69 @@ +/datum/spell/pointed/cleave + name = "Cleave" + desc = "Causes severe bleeding on a target and several targets around them." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "cleave" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "CL'VE!" + invocation_type = INVOCATION_WHISPER + + cast_range = 4 + + /// The radius of the cleave effect + var/cleave_radius = 1 + + +/datum/spell/pointed/cleave/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.use_turf_of_user = TRUE + C.allowed_type = /mob/living/carbon/human + C.range = cast_range + C.try_auto_target = FALSE + return C + +/datum/spell/pointed/cleave/cast(list/targets, mob/user) + . = ..() + for(var/mob/living/carbon/human/victim in range(cleave_radius, targets[1])) + if(victim == user || IS_HERETIC_OR_MONSTER(victim)) + continue + if(victim.can_block_magic(antimagic_flags)) + victim.visible_message( + SPAN_DANGER("[victim]'s flashes in a firey glow, but repels the blaze!"), + SPAN_DANGER("Your body begins to flash a firey glow, but you are protected!!") + ) + continue + + if(!victim.blood_volume) + continue + + victim.visible_message( + SPAN_DANGER("[victim]'s veins are shredded from within as an unholy blaze erupts from [victim.p_their()] blood!"), + SPAN_DANGER("Your veins burst from within and unholy flame erupts from your blood!") + ) + + var/obj/item/organ/external/bodypart = pick(victim.bodyparts) + bodypart.cause_internal_bleeding() + victim.apply_damage(20, BURN) + + new /obj/effect/temp_visual/cleave(get_turf(victim)) + + return TRUE + +/datum/spell/pointed/cleave/long + name = "Lesser Cleave" + base_cooldown = 90 SECONDS + +/obj/effect/temp_visual/cleave + icon = 'icons/effects/eldritch.dmi' + icon_state = "cleave" + duration = 6 diff --git a/code/modules/antagonists/heretic/magic/blood_siphon.dm b/code/modules/antagonists/heretic/magic/blood_siphon.dm new file mode 100644 index 00000000000..df1122f2284 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/blood_siphon.dm @@ -0,0 +1,82 @@ +/datum/spell/pointed/blood_siphon + name = "Blood Siphon" + desc = "A targeted spell that heals your wounds while damaging the enemy. \ + It has a chance to transfer wounds between you and your enemy." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "blood_siphon" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 15 SECONDS + + invocation = "FL'MS O'ET'RN'ITY." + invocation_type = INVOCATION_WHISPER + + cast_range = 6 + +/datum/spell/pointed/blood_siphon/valid_target(target, user) + if(!isliving(target)) + return FALSE + return TRUE + +/datum/spell/pointed/blood_siphon/cast(list/targets, mob/user) + . = ..() + var/mob/living/cast_on = targets[1] + playsound(user, 'sound/misc/demon_attack1.ogg', 75, TRUE) + if(cast_on.can_block_magic()) + cast_on.visible_message( + SPAN_DANGER("The spell bounces off of [cast_on]!"), + SPAN_DANGER("The spell bounces off of you!"), + ) + return FALSE + + cast_on.visible_message( + SPAN_DANGER("[cast_on] turns pale as a red glow envelops [cast_on.p_them()]!"), + SPAN_DANGER("You pale as a red glow enevelops you!"), + ) + + var/mob/living/living_owner = user + cast_on.adjustBruteLoss(20) + living_owner.adjustBruteLoss(-20) + + if(!cast_on.blood_volume || !living_owner.blood_volume) + return TRUE + + cast_on.blood_volume -= 20 + if(living_owner.blood_volume < BLOOD_VOLUME_MAXIMUM) // we dont want to explode from casting + living_owner.blood_volume += 20 + + if(!ishuman(cast_on) || !ishuman(living_owner)) + return TRUE + + var/mob/living/carbon/human/carbon_target = cast_on + var/mob/living/carbon/human/carbon_user = living_owner + for(var/obj/item/organ/external/E in carbon_user.bodyparts) + if(E.status & ORGAN_INT_BLEEDING) + if(prob(50)) + var/obj/item/organ/external/target_bodypart = locate(E.type) in carbon_target.bodyparts + if(!target_bodypart) + continue + E.fix_internal_bleeding() + target_bodypart.cause_internal_bleeding() + if(E.status & ORGAN_BROKEN) + if(prob(50)) + var/obj/item/organ/external/target_bodypart = locate(E.type) in carbon_target.bodyparts + if(!target_bodypart) + continue + E.mend_fracture() + target_bodypart.fracture() + if(E.status & ORGAN_BURNT) + if(prob(50)) + var/obj/item/organ/external/target_bodypart = locate(E.type) in carbon_target.bodyparts + if(!target_bodypart) + continue + E.fix_burn_wound() + target_bodypart.cause_burn_wound() + + return TRUE diff --git a/code/modules/antagonists/heretic/magic/burglar_finesse.dm b/code/modules/antagonists/heretic/magic/burglar_finesse.dm new file mode 100644 index 00000000000..71d3949cd89 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/burglar_finesse.dm @@ -0,0 +1,58 @@ +/datum/spell/pointed/burglar_finesse + name = "Burglar's Finesse" + desc = "Steal a random item from the victim's backpack." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "burglarsfinesse" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 40 SECONDS + + invocation = "Y'O'K!" + invocation_type = INVOCATION_WHISPER + + cast_range = 6 + + +/datum/spell/pointed/burglar_finesse/valid_target(target, user) + if(!ishuman(target)) + return FALSE + if(!get_dist(target, user >= 10)) // no yoinking through cams or scopes. + return FALSE + var/mob/living/carbon/human/human_target = target + if(locate(/obj/item/storage/backpack) in human_target.contents) + return TRUE + if(locate(/obj/item/mod/control) in human_target.contents) + return TRUE + return FALSE + +/datum/spell/pointed/burglar_finesse/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/cast_on = targets[1] + if(cast_on.can_block_magic(antimagic_flags)) + to_chat(cast_on, SPAN_DANGER("You feel a light tug, but are otherwise fine, you were protected by magical forces!")) + to_chat(user, SPAN_DANGER("[cast_on] is protected by magical forces!")) + return FALSE + + var/obj/storage_item = locate(/obj/item/storage/backpack) in cast_on.contents + + if(isnull(storage_item)) + if(locate(/obj/item/mod/control) in cast_on.contents) + var/obj/item/mod/control/temp_item = locate(/obj/item/mod/control) in cast_on.contents + if(temp_item.bag) + storage_item = temp_item.bag + + if(isnull(storage_item)) + return FALSE + if(isnull(storage_item.contents)) + return FALSE + var/item = pick(storage_item.contents) + if(isnull(item)) + return FALSE + to_chat(cast_on, SPAN_WARNING("Your [storage_item.name] feels lighter...")) + to_chat(user, SPAN_NOTICE("With a blink, you pull [item] out of [cast_on][p_s()] [storage_item.name].")) + user.put_in_active_hand(item) diff --git a/code/modules/antagonists/heretic/magic/caretaker.dm b/code/modules/antagonists/heretic/magic/caretaker.dm new file mode 100644 index 00000000000..6a79c5c1f6e --- /dev/null +++ b/code/modules/antagonists/heretic/magic/caretaker.dm @@ -0,0 +1,59 @@ +/datum/spell/caretaker + name = "Caretaker’s Last Refuge" + desc = "Shifts you into the Caretaker's Refuge, rendering you translucent and intangible. \ + While in the Refuge your movement is unrestricted, but you cannot use your hands or cast any spells. \ + You cannot enter the Refuge while near other sentient beings, \ + and you can be removed from it upon contact with antimagical artifacts." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "caretaker" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/effects/curse/curse2.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 3 MINUTES + +/datum/spell/caretaker/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/caretaker/valid_target(target, user) + if(!sentience_check(user)) + return FALSE + return TRUE + +/datum/spell/caretaker/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/carbon_user = user + if(carbon_user.has_status_effect(/datum/status_effect/caretaker_refuge)) + carbon_user.remove_status_effect(/datum/status_effect/caretaker_refuge) + else + if(!do_after_once(user, 1.5 SECONDS, FALSE, user, TRUE, FALSE)) + cooldown_handler.revert_cast() + return FALSE + if(!sentience_check(user)) + cooldown_handler.revert_cast() + return FALSE + carbon_user.apply_status_effect(/datum/status_effect/caretaker_refuge) + addtimer(CALLBACK(src, PROC_REF(early_warning), carbon_user), base_cooldown - (20 SECONDS)) + addtimer(CALLBACK(src, PROC_REF(remove_refuge), carbon_user), base_cooldown) // using base_cooldown makes it impossible to cast again bfore this effect is done + cooldown_handler.start_recharge(cooldown_handler.recharge_duration * 0.1) //Cooldown activates primarly when you leave + return TRUE + +/datum/spell/caretaker/proc/sentience_check(mob/user) + for(var/mob/living/alive in oview(7, user)) + if(alive.stat != DEAD && alive.client) + to_chat(user, SPAN_WARNING("There are sentient beings blocking you from shifting!")) + return FALSE + return TRUE + +/datum/spell/caretaker/proc/early_warning(mob/living/carbon/carbon_user) + if(carbon_user.has_status_effect(/datum/status_effect/caretaker_refuge)) + to_chat(carbon_user, SPAN_DANGER("The caretaker will not allow us to remain in refuge for much longer!")) + +/datum/spell/caretaker/proc/remove_refuge(mob/living/carbon/carbon_user) + if(carbon_user.has_status_effect(/datum/status_effect/caretaker_refuge)) + carbon_user.remove_status_effect(/datum/status_effect/caretaker_refuge) + cooldown_handler.start_recharge(cooldown_handler.recharge_duration) diff --git a/code/modules/antagonists/heretic/magic/cosmic_expansion.dm b/code/modules/antagonists/heretic/magic/cosmic_expansion.dm new file mode 100644 index 00000000000..d32f83c145b --- /dev/null +++ b/code/modules/antagonists/heretic/magic/cosmic_expansion.dm @@ -0,0 +1,48 @@ +/datum/spell/aoe/conjure/cosmic_expansion + name = "Cosmic Expansion" + desc = "This spell generates a 3x3 domain of cosmic fields. \ + Creatures up to 7 tiles away will also receive a star mark." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "cosmic_domain" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/magic/cosmic_expansion.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "C'SM'S 'XP'ND" + invocation_type = INVOCATION_SHOUT + + summon_amt = 9 + summon_type = list(/obj/effect/forcefield/cosmic_field) + summon_ignore_density = TRUE + summon_ignore_prev_spawn_points = TRUE + aoe_range = 1 + /// The range at which people will get marked with a star mark. + var/star_mark_range = 7 + /// Effect for when the spell triggers + var/obj/effect/expansion_effect = /obj/effect/temp_visual/cosmic_domain + /// If the heretic is ascended or not + var/ascended = FALSE + +/datum/spell/aoe/conjure/cosmic_expansion/cast(list/targets, mob/user) + new expansion_effect(get_turf(user)) + for(var/mob/living/nearby_mob in range(star_mark_range, user)) + if(user == nearby_mob || user.buckled == nearby_mob) + continue + nearby_mob.apply_status_effect(/datum/status_effect/star_mark, user) + if(ascended) + for(var/turf/cast_turf as anything in RANGE_TURFS(7, user)) + new /obj/effect/forcefield/cosmic_field(cast_turf) + return ..() + +/datum/spell/aoe/conjure/cosmic_expansion/proc/get_turfs(turf/target_turf) + var/list/target_turfs = list() + for(var/direction as anything in GLOB.cardinal) + target_turfs += get_ranged_target_turf(target_turf, direction, 2) + target_turfs += get_ranged_target_turf(target_turf, direction, 3) + return target_turfs diff --git a/code/modules/antagonists/heretic/magic/cosmic_runes.dm b/code/modules/antagonists/heretic/magic/cosmic_runes.dm new file mode 100644 index 00000000000..d5327c7ecbd --- /dev/null +++ b/code/modules/antagonists/heretic/magic/cosmic_runes.dm @@ -0,0 +1,173 @@ +/datum/spell/cosmic_rune + name = "Cosmic Rune" + desc = "Creates a cosmic rune at your position, only two can exist at a time. Invoking one rune transports you to the other. \ + Anyone with a star mark gets transported along with you." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "cosmic_rune" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/magic/forcewall.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 15 SECONDS + + invocation = "ST'R R'N'" + invocation_type = INVOCATION_WHISPER + + /// Storage for the first rune. + var/first_rune + /// Storage for the second rune. + var/second_rune + /// Rune removal effect. + var/obj/effect/rune_remove_effect = /obj/effect/temp_visual/cosmic_rune_fade + +/datum/spell/cosmic_rune/create_new_targeting() + var/datum/spell_targeting/aoe/turf/targeting = new() + targeting.range = 0 + return targeting + +/datum/spell/cosmic_rune/can_cast(mob/user, charge_check, show_message) + var/area/area = get_area(user) + if(!is_teleport_allowed(user.z) || istype(area, /area/shuttle)) // no runes on shuttles or centcomm + to_chat(user, SPAN_HIEROPHANT("An unusual force prevents us from forming a rune here!")) + return FALSE + return ..() + +/datum/spell/cosmic_rune/cast(list/targets, mob/user) + . = ..() + var/obj/effect/cosmic_rune/first_rune_resolved = locateUID(first_rune) + var/obj/effect/cosmic_rune/second_rune_resolved = locateUID(second_rune) + if(first_rune_resolved && second_rune_resolved) + var/obj/effect/cosmic_rune/new_rune = new /obj/effect/cosmic_rune(get_turf(user)) + new rune_remove_effect(get_turf(first_rune_resolved)) + QDEL_NULL(first_rune_resolved) + first_rune = second_rune_resolved.UID() + second_rune = new_rune.UID() + second_rune_resolved.link_rune(new_rune) + new_rune.link_rune(second_rune_resolved) + return + if(!first_rune_resolved) + first_rune = make_new_rune(get_turf(user), second_rune_resolved) + return + if(!second_rune_resolved) + second_rune = make_new_rune(get_turf(user), first_rune_resolved) + +/// Returns a weak reference to a new rune, linked to an existing rune if provided +/datum/spell/cosmic_rune/proc/make_new_rune(turf/target_turf, obj/effect/cosmic_rune/other_rune) + var/obj/effect/cosmic_rune/new_rune = new /obj/effect/cosmic_rune(target_turf) + if(other_rune) + other_rune.link_rune(new_rune) + new_rune.link_rune(other_rune) + return new_rune.UID() + +/// A rune that allows you to teleport to the location of a linked rune. +/obj/effect/cosmic_rune + name = "cosmic rune" + desc = "A strange rune, that can instantly transport people to another location." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "cosmic_rune" + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + plane = FLOOR_PLANE + layer = SIGIL_LAYER + /// The other rune this rune is linked with + var/linked_rune + /// Effect for when someone teleports + var/obj/effect/rune_effect = /obj/effect/temp_visual/rune_light + +/obj/effect/cosmic_rune/Initialize(mapload) + . = ..() + var/image/silicon_image = image(icon = 'icons/effects/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("cosmic_rune", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/cosmic_rune/attack_animal(mob/living/simple_animal/M) + return attack_hand(M) + +/obj/effect/cosmic_rune/attack_hand(mob/living/user, list/modifiers) + . = ..() + if(.) + return + if(!linked_rune) + to_chat(user, SPAN_WARNING("There is no linked rune!")) + fail_invoke() + return + if(!(user in get_turf(src))) + to_chat(user, SPAN_WARNING("You must be on the rune to teleport!")) + fail_invoke() + return + if(user.has_status_effect(/datum/status_effect/star_mark)) + to_chat(user, SPAN_WARNING("The mark blocks you from using the rune!")) + fail_invoke() + return + invoke(user) + +/// For invoking the rune +/obj/effect/cosmic_rune/proc/invoke(mob/living/user) + var/obj/effect/cosmic_rune/linked_rune_resolved = locateUID(linked_rune) + new rune_effect(get_turf(src)) + if(!is_teleport_allowed(linked_rune_resolved.z) || !is_teleport_allowed(user.z)) + to_chat(user, SPAN_HIEROPHANT("An unusual force prevents us from using our runes here!")) + return + if(!(SEND_SIGNAL(user, COMSIG_MOVABLE_TELEPORTING, get_turf(linked_rune_resolved)) & COMPONENT_BLOCK_TELEPORT)) + user.forceMove(get_turf(linked_rune_resolved)) + for(var/mob/living/person_on_rune in get_turf(src)) + if(person_on_rune.has_status_effect(/datum/status_effect/star_mark)) + if(SEND_SIGNAL(person_on_rune, COMSIG_MOVABLE_TELEPORTING, get_turf(linked_rune_resolved)) & COMPONENT_BLOCK_TELEPORT) + continue + person_on_rune.forceMove(get_turf(linked_rune_resolved)) + playsound(src, 'sound/magic/cosmic_energy.ogg', 100, TRUE) + playsound(user, 'sound/magic/cosmic_energy.ogg', 100, TRUE) + new rune_effect(get_turf(linked_rune_resolved)) + +/// For if someone failed to invoke the rune +/obj/effect/cosmic_rune/proc/fail_invoke() + visible_message(SPAN_WARNING("The rune pulses with a small flash of purple light, then returns to normal.")) + var/oldcolor = rgb(255, 255, 255) + color = rgb(150, 50, 200) + animate(src, color = oldcolor, time = 5) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 0.5 SECONDS) + +/// For linking a new rune +/obj/effect/cosmic_rune/proc/link_rune(obj/effect/cosmic_rune/new_rune) + linked_rune = new_rune.UID() + +/obj/effect/cosmic_rune/Destroy() + var/obj/effect/cosmic_rune/linked_rune_resolved = locateUID(linked_rune) + if(linked_rune_resolved) + linked_rune_resolved.unlink_rune() + return ..() + +/// Used for unlinking the other rune if this rune gets destroyed +/obj/effect/cosmic_rune/proc/unlink_rune() + linked_rune = null + +/obj/effect/temp_visual/cosmic_rune_fade + name = "cosmic rune" + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "cosmic_rune_fade" + plane = FLOOR_PLANE + layer = SIGIL_LAYER + duration = 5 + +/obj/effect/temp_visual/cosmic_rune_fade/Initialize(mapload) + . = ..() + var/image/silicon_image = image(icon = 'icons/obj/antags/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("cosmic", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/temp_visual/rune_light + name = "cosmic rune" + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "cosmic_rune_light" + plane = FLOOR_PLANE + layer = SIGIL_LAYER + duration = 5 + +/obj/effect/temp_visual/rune_light/Initialize(mapload) + . = ..() + var/image/silicon_image = image(icon = 'icons/obj/antags/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("cosmic", silicon_image, GLOB.silicon_mob_list) diff --git a/code/modules/antagonists/heretic/magic/eldritch_blind.dm b/code/modules/antagonists/heretic/magic/eldritch_blind.dm new file mode 100644 index 00000000000..a84a0be6baf --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_blind.dm @@ -0,0 +1,8 @@ +// Given to heretic monsters. +/datum/spell/blind/eldritch + name = "Eldritch Blind" + + + + is_a_heretic_spell = TRUE + invocation = "E'E'S" diff --git a/code/modules/antagonists/heretic/magic/eldritch_emplosion.dm b/code/modules/antagonists/heretic/magic/eldritch_emplosion.dm new file mode 100644 index 00000000000..67eb8dc6ae6 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_emplosion.dm @@ -0,0 +1,16 @@ +// Given to heretic monsters. +/datum/spell/emplosion/heretic + name = "Energetic Pulse" + desc = "A spell that causes a large EMP around you, disabling electronics." + + + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "E'P" + invocation_type = INVOCATION_WHISPER + + emp_heavy = 6 + emp_light = 10 diff --git a/code/modules/antagonists/heretic/magic/eldritch_shapeshift.dm b/code/modules/antagonists/heretic/magic/eldritch_shapeshift.dm new file mode 100644 index 00000000000..ba34dc17fc5 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_shapeshift.dm @@ -0,0 +1,19 @@ +// Given to heretic monsters. +/datum/spell/shapeshift/eldritch + desc = "A spell that allows you to take on the form of another creature, gaining their abilities. \ + After making your choice, you will be unable to change to another." + + + + is_a_heretic_spell = TRUE + invocation = "SH'PE" + invocation_type = INVOCATION_WHISPER + + possible_shapes = list( + /mob/living/basic/carp, + /mob/living/basic/mouse, + /mob/living/simple_animal/pet/cat, + /mob/living/simple_animal/pet/dog/corgi, + /mob/living/simple_animal/pet/dog/fox, + /mob/living/simple_animal/bot/secbot, + ) diff --git a/code/modules/antagonists/heretic/magic/eldritch_telepathy.dm b/code/modules/antagonists/heretic/magic/eldritch_telepathy.dm new file mode 100644 index 00000000000..ac69acdfee0 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_telepathy.dm @@ -0,0 +1,6 @@ +// Given to heretic monsters. +/datum/spell/remotetalk/eldritch + name = "Eldritch Telepathy" + is_a_heretic_spell = TRUE + + antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND diff --git a/code/modules/antagonists/heretic/magic/fire_blast.dm b/code/modules/antagonists/heretic/magic/fire_blast.dm new file mode 100644 index 00000000000..4de90fcaef2 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/fire_blast.dm @@ -0,0 +1,156 @@ +/datum/spell/charge_up/bounce/fire_blast + name = "Volcano Blast" + desc = "Charge up a blast of fire that chains between nearby targets, setting them ablaze. \ + Targets already on fire will take priority. If the target fails to catch ablaze, or \ + extinguishes themselves before it bounces, the chain will stop." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "flames" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/fireball.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "V'LC'N!" + invocation_type = INVOCATION_SHOUT + max_charge_time = 5 SECONDS + charge_sound = new /sound('sound/magic/fireball.ogg', channel = 7) + var/max_beam_bounces = 4 + + /// How long the beam visual lasts, also used to determine time between jumps + bounce_time = 2 SECONDS + +/datum/spell/charge_up/bounce/fire_blast/cast(list/targets, mob/user) + if(isliving(user)) + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/fire_blasted, bounce_time, -2) + return ..() + +/datum/spell/charge_up/bounce/fire_blast/bounce(mob/origin, mob/living/target, energy, bounces, mob/user) + + // Send a beam from the origin to the hit mob + origin.Beam(target, icon_state = "solar_beam", time = bounce_time, beam_type = /obj/effect/ebeam/fire) + + // If they block the magic, the chain wont necessarily stop, + // but likely will (due to them not catching on fire) + if(target.can_block_magic(antimagic_flags)) + target.visible_message( + SPAN_WARNING("[target] absorbs the spell, remaining unharmed!"), + SPAN_USERDANGER("You absorb the spell, remaining unharmed!"), + ) + // Apply status effect but with no overlay + target.apply_status_effect(/datum/status_effect/fire_blasted) + + // Otherwise, if unblocked apply the damage and set them up + else + target.apply_damage(20, BURN) + target.adjust_fire_stacks(3) + target.IgniteMob() + // Apply the fire blast status effect to show they got blasted + target.apply_status_effect(/datum/status_effect/fire_blasted, bounce_time * 0.5) + + // We can keep bouncing, try to continue the chain + if(bounces >= 1) + playsound(target, sound, 50, vary = TRUE, extrarange = -1) + // Chain continues shortly after. If they extinguish themselves in this time, the chain will stop anyways. + addtimer(CALLBACK(src, PROC_REF(continue_beam), target, bounces, user), bounce_time * 0.5) + + else + playsound(target, sound, 50, vary = TRUE, frequency = 12000) + // We hit the maximum chain length, apply a bonus for managing it + new /obj/effect/temp_visual/fire_blast_bonus(target.loc) + for(var/mob/living/nearby_living in range(1, target)) + if(IS_HERETIC_OR_MONSTER(nearby_living) || nearby_living == user) + continue + nearby_living.KnockDown(0.8 SECONDS) + nearby_living.apply_damage(15, BURN) + nearby_living.adjust_fire_stacks(2) + nearby_living.IgniteMob() + +/// Timer callback to continue the chain, calling send_fire_bream recursively. +/datum/spell/charge_up/bounce/fire_blast/proc/continue_beam(mob/living/carbon/beamed, bounces, mob/user) + // We will only continue the chain if we exist, are still on fire, and still have the status effect + if(QDELETED(beamed) || !beamed.on_fire || !beamed.has_status_effect(/datum/status_effect/fire_blasted)) + return + // We fulfilled the conditions, get the next target + var/mob/living/carbon/to_beam_next = get_target(beamed) + if(isnull(to_beam_next)) // No target = no chain + return + + // Chain again! Recursively + bounce(beamed, to_beam_next, 1, bounces - 1, user) + +/datum/spell/charge_up/bounce/fire_blast/get_bounce_amount() + return max_beam_bounces + +/// Pick a carbon mob in a radius around us that we can reach. +/// Mobs on fire will have priority and be targeted over others. +/// Returns null or a carbon mob. +/datum/spell/charge_up/bounce/fire_blast/get_target(mob/origin, mob/user) + var/list/possibles = list() + var/list/priority_possibles = list() + for(var/mob/living/carbon/to_check in view(5, origin)) + if(to_check == origin || to_check == user) + continue + if(to_check.has_status_effect(/datum/status_effect/fire_blasted)) // Already blasted + continue + if(IS_HERETIC_OR_MONSTER(to_check)) + continue + if(!length(get_path_to(origin, to_check, max_distance = 5, simulated_only = FALSE))) + continue + + possibles += to_check + if(to_check.on_fire && to_check.stat != DEAD) + priority_possibles += to_check + + if(!length(possibles)) + return null + + return length(priority_possibles) ? pick(priority_possibles) : pick(possibles) + +/** + * Status effect applied when someone's hit by the fire blast. + * + * Applies an overlay, then causes a damage over time (or heal over time) + */ +/datum/status_effect/fire_blasted + id = "fire_blasted" + alert_type = null + duration = 5 SECONDS + tick_interval = 0.5 SECONDS + /// How much fire / stam to do per tick (stamina damage is doubled this) + var/tick_damage = 1 + /// How long does the animation of the appearance last? If 0 or negative, we make no overlay + var/animate_duration = 0.75 SECONDS + ///This overlay is applied to the owner for the duration of the effect. + var/mutable_appearance/mob_overlay + +/datum/status_effect/fire_blasted/on_creation(mob/living/new_owner, animate_duration = -1, tick_damage = 1) + src.animate_duration = animate_duration + src.tick_damage = tick_damage + return ..() + +/datum/status_effect/fire_blasted/on_apply() + if(owner.on_fire && animate_duration > 0 SECONDS) + mob_overlay = mutable_appearance('icons/effects/effects.dmi', "blessed", BELOW_MOB_LAYER) + mob_overlay.alpha = 50 + owner.add_overlay(mob_overlay) + + return TRUE + +/datum/status_effect/fire_blasted/on_remove() + owner.cut_overlay(mob_overlay) + + +/datum/status_effect/fire_blasted/tick() + owner.adjustFireLoss(tick_damage) + owner.adjustStaminaLoss(2 * tick_damage) + +// Visual effect played when we hit the max bounces +/obj/effect/temp_visual/fire_blast_bonus + name = "fire blast" + icon_state = "explosion" diff --git a/code/modules/antagonists/heretic/magic/flesh_ascension.dm b/code/modules/antagonists/heretic/magic/flesh_ascension.dm new file mode 100644 index 00000000000..439fcba1560 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/flesh_ascension.dm @@ -0,0 +1,77 @@ +/datum/spell/shapeshift/shed_human_form + name = "Shed form" + desc = "Shed your fragile form, become one with the arms, become one with the emperor. \ + Causes heavy amounts of brain damage to nearby mortals." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "worm_ascend" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + + invocation = "REALITY UNCOIL!" + shapeshift_type = /mob/living/basic/heretic_summon/armsy/prime + current_shapes = list(/mob/living/basic/heretic_summon/armsy/prime) + current_casters = list() + possible_shapes = list(/mob/living/basic/heretic_summon/armsy/prime) + /// The length of our new wormy when we shed. + var/segment_length = 10 + /// The radius around us that we cause brain damage to. + var/scare_radius = 9 + +/datum/spell/shapeshift/shed_human_form/Shapeshift(mob/living/caster) + // When we transform into the worm, everyone nearby gets freaked out + for(var/mob/living/carbon/human/nearby_human in view(scare_radius, caster)) + if(IS_HERETIC_OR_MONSTER(nearby_human) || nearby_human == caster) + continue + + nearby_human.adjustBrainLoss(30) + + for(var/mob/living/M in caster) + if(M.status_flags & GODMODE) + to_chat(caster, SPAN_WARNING("You're already shapeshifted!")) + return + // We overide the spell vs call parent as we need to setup segments. + + var/mob/living/shape = new shapeshift_type(get_turf(caster), TRUE, segment_length) + caster.forceMove(shape) + caster.status_flags |= GODMODE + + current_shapes |= shape + current_casters |= caster + clothes_req = FALSE + human_req = FALSE + + caster.mind.transfer_to(shape) + +/datum/spell/shapeshift/shed_human_form/Restore(mob/living/basic/heretic_summon/armsy/caster) + if(istype(caster)) + segment_length = caster.get_length() - 1 // Don't count the head + return ..() + + +/datum/spell/worm_contract + name = "Force Contract" + desc = "Forces your body to contract onto a single tile." + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "worm_contract" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + base_cooldown = 30 SECONDS + + spell_requirements = NONE + clothes_req = FALSE + + +/datum/spell/worm_contract/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/worm_contract/valid_target(target, user) + return istype(user, /mob/living/basic/heretic_summon/armsy) + +/datum/spell/worm_contract/cast(list/targets, mob/living/basic/heretic_summon/armsy/user) + . = ..() + user.contract_next_chain_into_single_tile() diff --git a/code/modules/antagonists/heretic/magic/flesh_surgery.dm b/code/modules/antagonists/heretic/magic/flesh_surgery.dm new file mode 100644 index 00000000000..e005ec16539 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/flesh_surgery.dm @@ -0,0 +1,181 @@ +/datum/spell/touch/flesh_surgery + name = "Knit Flesh" + desc = "A touch spell that allows you to either harvest or restore flesh of target. \ + Left-clicking will extract the organs of a victim without needing to complete surgery or disembowel. \ + If cast on summons or minions, will restore health. Can also be used to heal damaged organs." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "mad_touch" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = null + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 20 SECONDS + invocation = "CL'M M'N!" // "CLAIM MINE", but also almost "KALI MA" + invocation_type = INVOCATION_SHOUT + + hand_path = /obj/item/melee/touch_attack/flesh_surgery + +/obj/item/melee/touch_attack/flesh_surgery/after_attack(atom/target, mob/living/user, proximity_flag, click_parameters) + . = ..() + if(!proximity_flag || blocked_by_antimagic || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //There are better ways to get a good nights sleep in a bed. + return + if(is_organ(target)) + heal_organ(src, target, user) + handle_delete(user) + return + if(!isliving(target)) + return + var/mob/living/living_target = target + if(IS_HERETIC_MONSTER(living_target)) + heal_heretic_monster(src, living_target, user) + handle_delete(user) + return + if(iscarbon(living_target)) + steal_organ_from_mob(src, living_target, user) + handle_delete(user) + return + +/// If cast on an organ, we'll restore its health and even un-fail it. +/obj/item/melee/touch_attack/flesh_surgery/proc/heal_organ(obj/item/melee/touch_attack/hand, obj/item/organ/to_heal, mob/living/carbon/caster) + if(to_heal.damage == 0 && to_heal.germ_level >= 100) + to_chat(caster, SPAN_NOTICE("The organ is already in good condition!")) + return FALSE + to_chat(caster, SPAN_NOTICE("You begin to heal the organ...")) + if(!do_after(caster, 1 SECONDS, to_heal, extra_checks = list(CALLBACK(src, PROC_REF(heal_checks), hand, to_heal, caster)))) + to_chat(caster, SPAN_WARNING("You were interupted!")) + return FALSE + to_heal.germ_level = 0 + var/organ_hp_to_heal = to_heal.max_damage * organ_percent_healing + to_heal.damage = (max(0 , to_heal.damage - organ_hp_to_heal)) + to_heal.surgeryize() + if(to_heal.is_robotic()) //Robotic organs stay robotic. + to_heal.status = ORGAN_ROBOT + else + to_heal.status = 0 + to_chat(caster, SPAN_NOTICE("The organ is has been healed.")) + playsound(to_heal, 'sound/magic/staff_healing.ogg', 30) + new /obj/effect/temp_visual/cult/sparks(get_turf(to_heal)) + var/condition = (to_heal.damage > 0) ? "better" : "perfect" + caster.visible_message( + SPAN_WARNING("[caster]'s hand glows a brilliant red as [caster.p_they()] restore \the [to_heal] to [condition] condition!"), + SPAN_NOTICE("Your hand glows a brilliant red as you restore \the [to_heal] to [condition] condition!"), + ) + + return TRUE + +/// If cast on a heretic monster who's not dead we'll heal it a bit. +/obj/item/melee/touch_attack/flesh_surgery/proc/heal_heretic_monster(obj/item/melee/touch_attack/hand, mob/living/to_heal, mob/living/carbon/caster) + var/what_are_we = ishuman(to_heal) ? "minion" : "summon" + to_chat(caster, SPAN_NOTICE("You begin to heal your [what_are_we]...")) + if(!do_after(caster, 1 SECONDS, to_heal, extra_checks = list(CALLBACK(src, PROC_REF(heal_checks), hand, to_heal, caster)))) + to_chat(caster, SPAN_WARNING("You were interupted!")) + return FALSE + + // Keep in mind that, for simplemobs(summons), this will just flat heal the combined value of both brute and burn healing, + // while for human minions(ghouls), this will heal brute and burn like normal. So be careful adjusting to bigger numbers + to_heal.heal_overall_damage(monster_brute_healing, monster_burn_healing) + playsound(to_heal, 'sound/magic/staff_healing.ogg', 30) + new /obj/effect/temp_visual/cult/sparks(get_turf(to_heal)) + caster.visible_message( + SPAN_WARNING("[caster]'s hand glows a brilliant red as [caster.p_they()] restore[caster.p_s()] [to_heal] to good condition!"), + SPAN_NOTICE("Your hand glows a brilliant red as you restore [to_heal] to good condition!"), + ) + return TRUE + +/// If cast on a carbon, we'll try to steal one of their organs directly from their person. +/obj/item/melee/touch_attack/flesh_surgery/proc/steal_organ_from_mob(obj/item/melee/touch_attack/hand, mob/living/victim, mob/living/carbon/caster) + var/mob/living/carbon/carbon_victim = victim + if(!istype(carbon_victim) || !length(carbon_victim.internal_organs)) + to_chat(caster, SPAN_WARNING("[victim] has no organs!")) + return FALSE + + + var/list/organs_we_can_remove = list() + for(var/obj/item/organ/internal/free_snack in carbon_victim.internal_organs) + if(free_snack.vital) + continue + organs_we_can_remove += free_snack + + var/obj/item/organ/chosen_organ = tgui_input_list(caster, "Please select an organ for removal", "Organ Selection", organs_we_can_remove) + + // Don't let people stam crit into steal heart true combo + var/time_it_takes = carbon_victim.stat == DEAD ? 3 SECONDS : 15 SECONDS + + // Sure you can remove your own organs, fun party trick + if(carbon_victim == caster) + var/are_you_sure = tgui_alert(caster, "Are you sure you want to remove your own [chosen_organ]?", "Are you sure?", list("Yes", "No")) + if(are_you_sure != "Yes" || extraction_checks(chosen_organ, hand, victim, caster)) + return FALSE + + time_it_takes = 6 SECONDS + caster.visible_message( + SPAN_DANGER("[caster]'s hand glows a brilliant red as [caster.p_they()] reach[caster.p_es()] directly into [caster.p_their()] own [chosen_organ.parent_organ]!"), + SPAN_USERDANGER("Your hand glows a brilliant red as you reach directly into your own [chosen_organ.parent_organ]!"), + ) + + else + carbon_victim.visible_message( + SPAN_DANGER("[caster]'s hand glows a brilliant red as [caster.p_they()] reach[caster.p_es()] directly into [carbon_victim]'s [chosen_organ.parent_organ]!"), + SPAN_USERDANGER("[caster]'s hand glows a brilliant red as [caster.p_they()] reach[caster.p_es()] directly into your [chosen_organ.parent_organ]!"), + ) + + to_chat(caster, SPAN_NOTICE("You begin to extract [chosen_organ]...")) + playsound(victim, 'sound/weapons/bladeslice.ogg', 50, TRUE) + carbon_victim.add_atom_colour(COLOR_RED, TEMPORARY_COLOUR_PRIORITY) + if(!do_after(caster, time_it_takes, target = carbon_victim, extra_checks = list(CALLBACK(src, PROC_REF(extraction_checks), chosen_organ, hand, victim, caster)))) + to_chat(caster, SPAN_WARNING("You were interupted!")) + carbon_victim.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, COLOR_RED) + return FALSE + + // Visible message done before Remove() + // Mainly so it gets across if you're taking the eyes of someone who's conscious + if(carbon_victim == caster) + caster.visible_message( + SPAN_BOLDDANGER("[caster] pulls [caster.p_their()] own [chosen_organ.name] out of [caster.p_their()] [chosen_organ.parent_organ]!!"), + SPAN_USERDANGER("You pull your own [chosen_organ.name] out of your [chosen_organ.parent_organ]!!"), + ) + + else + carbon_victim.visible_message( + SPAN_BOLDDANGER("[caster] pulls [carbon_victim]'s [chosen_organ.name] out of [carbon_victim.p_their()] [chosen_organ.parent_organ]!!"), + SPAN_USERDANGER("[caster] pulls your [chosen_organ.name] out of your [chosen_organ.parent_organ]!!"), + ) + + chosen_organ.remove(carbon_victim) + carbon_victim.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, COLOR_RED) + if(carbon_victim.stat == CONSCIOUS) + carbon_victim.HereticSlur(15 SECONDS) + carbon_victim.emote("scream") + + // We need to wait for the spell to actually finish casting to put the organ in their hands, hence, 1 ms timer. + addtimer(CALLBACK(caster, TYPE_PROC_REF(/mob, put_in_hands), chosen_organ), 0.1 SECONDS) + return TRUE + +/// Extra checks ran while we're extracting an organ to make sure we can continue to do. +/obj/item/melee/touch_attack/flesh_surgery/proc/extraction_checks(obj/item/organ/picked_organ, obj/item/melee/touch_attack/hand, mob/living/carbon/victim, mob/living/carbon/caster) + if(QDELETED(src) || QDELETED(hand) || QDELETED(picked_organ) || QDELETED(victim)) + return TRUE + + return FALSE + +/// Extra checks ran while we're healing something (organ, mob). +/obj/item/melee/touch_attack/flesh_surgery/proc/heal_checks(obj/item/melee/touch_attack/hand, atom/healing, mob/living/carbon/caster) + if(QDELETED(src) || QDELETED(hand) || QDELETED(healing)) + return TRUE + + return FALSE + +/obj/item/melee/touch_attack/flesh_surgery + name = "\improper knit flesh" + desc = "Let's go practice medicine." + catchphrase = null + /// If used on an organ, how much percent of the organ's HP do we restore + var/organ_percent_healing = 0.5 + /// If used on a heretic mob, how much brute do we heal + var/monster_brute_healing = 10 + /// If used on a heretic mob, how much burn do we heal + var/monster_burn_healing = 5 diff --git a/code/modules/antagonists/heretic/magic/furious_steel.dm b/code/modules/antagonists/heretic/magic/furious_steel.dm new file mode 100644 index 00000000000..0b3227c6d4a --- /dev/null +++ b/code/modules/antagonists/heretic/magic/furious_steel.dm @@ -0,0 +1,160 @@ +/datum/spell/fireball/furious_steel + name = "Furious Steel" + desc = "Summon three silver blades which orbit you. \ + While orbiting you, these blades will protect you from from attacks, but will be consumed on use. \ + Additionally, you can click to fire the blades at a target, dealing damage and causing bleeding." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "furious_steel" + what_icon_state = "furious_steel" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/weapons/guillotine.ogg' + + is_a_heretic_spell = TRUE + base_cooldown = 60 SECONDS + invocation = "F'LSH'NG S'LV'R!" + + selection_activated_message = "You summon forth three blades of furious silver." + selection_deactivated_message = "You conceal the blades of furious silver." + fireball_type = /obj/projectile/magic/floating_blade + projectile_amount = 3 + cares_about_turf = FALSE + + ///Effect of the projectile that surrounds us while the spell is active + var/projectile_effect = /obj/effect/floating_blade + /// A ref to the status effect surrounding our heretic on activation. + var/datum/status_effect/protective_blades/blade_effect + +/datum/spell/fireball/furious_steel/InterceptClickOn(mob/user, params, atom/A) + // Let the caster prioritize using items like guns over blade casts + if(user.get_active_hand()) + return FALSE + // Let the caster prioritize melee attacks like punches and shoves over blade casts + if(get_dist(user, A) <= 1) + return FALSE + + return ..() + +/datum/spell/fireball/furious_steel/add_ranged_ability(mob/user, msg) + . = ..() + + if(!isliving(user)) + return + // Delete existing + if(blade_effect) + stack_trace("[type] had an existing blade effect in on_activation. This might be an exploit, and should be investigated.") + UnregisterSignal(blade_effect, COMSIG_PARENT_QDELETING) + QDEL_NULL(blade_effect) + + var/mob/living/living_user = user + blade_effect = living_user.apply_status_effect(/datum/status_effect/protective_blades, null, projectile_amount, 25, 0.66 SECONDS, projectile_effect) + RegisterSignal(blade_effect, COMSIG_PARENT_QDELETING, PROC_REF(on_status_effect_deleted)) + +/datum/spell/fireball/furious_steel/remove_ranged_ability(mob/user, msg) + . = ..() + if(isnull(blade_effect)) + cooldown_handler.start_recharge() + else if(length(blade_effect.blades) != projectile_amount) + cooldown_handler.start_recharge() //No free magic + current_amount = 0 + QDEL_NULL(blade_effect) + +/datum/spell/fireball/furious_steel/cast(list/targets, mob/living/user) + if(isnull(blade_effect) || !length(blade_effect.blades)) + current_amount = 0 + cooldown_handler.start_recharge() + return FALSE + . = ..() + if(!isnull(blade_effect) && length(blade_effect.blades)) + qdel(blade_effect.blades[1]) + + +/datum/spell/fireball/furious_steel/proc/on_status_effect_deleted(datum/status_effect/protective_blades/source) + SIGNAL_HANDLER + + blade_effect = null + remove_ranged_ability(action.owner) //there has to be a better way to get this + + +/obj/projectile/magic/floating_blade + name = "blade" + icon = 'icons/effects/eldritch.dmi' + icon_state = "dio_knife" + speed = 2 + damage = 25 + damage_type = BRUTE + nodamage = FALSE + /// Color applied as an outline filter on init + var/outline_color = "#f8f8ff" + +/obj/projectile/magic/floating_blade/Initialize(mapload) + . = ..() + add_filter("dio_knife", 2, list("type" = "outline", "color" = outline_color, "size" = 1)) + +/obj/projectile/magic/floating_blade/prehit(atom/target) + if(isliving(target) && isliving(firer)) + var/mob/living/caster = firer + var/mob/living/victim = target + if(caster == victim) + damage = 0 + nodamage = TRUE + return FALSE + + if(caster.mind) + var/datum/antagonist/mindslave/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/mindslave/heretic_monster) + if(monster?.master == caster.mind) + visible_message(SPAN_WARNING("[src] fizzles on contact with [victim]!")) + damage = 0 + nodamage = TRUE + return FALSE + + return ..() + + +/obj/projectile/magic/floating_blade/on_hit(atom/target, blocked, hit_zone) + if(isliving(target) && isliving(firer)) + var/mob/living/caster = firer + var/mob/living/victim = target + if(caster == victim) + return FALSE + + if(caster.mind) + var/datum/antagonist/mindslave/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/mindslave/heretic_monster) + if(monster?.master == caster.mind) + visible_message(SPAN_WARNING("[src] fizzles on contact with [victim]!")) + return FALSE + + return ..() + +/obj/projectile/magic/floating_blade/haunted + name = "ritual blade" + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "render" + damage = 35 + outline_color = "#D7CBCA" + +/datum/spell/fireball/furious_steel/solo + name = "Lesser Furious Steel" + base_cooldown = 20 SECONDS + projectile_amount = 1 + selection_activated_message = "You summon forth a blade of furious silver." + selection_deactivated_message = "You conceal the blade of furious silver." + +/datum/spell/fireball/furious_steel/haunted + name = "Cursed Steel" + desc = "Summon two cursed blades which orbit you. \ + While orbiting you, these blades will protect you from attacks, but will be consumed on use. \ + Additionally, you can click to fire the blades at a target, dealing damage and causing bleeding." + action_icon_state = "cursed_steel" + what_icon_state = "cursed_steel" + + base_cooldown = 40 SECONDS + invocation = "IA!" + + selection_activated_message = "You summon forth two cursed blades." + selection_deactivated_message = "You conceal the cursed blades." + projectile_amount = 2 + fireball_type = /obj/projectile/magic/floating_blade/haunted + projectile_effect = /obj/effect/floating_blade/haunted diff --git a/code/modules/antagonists/heretic/magic/mansus_grasp.dm b/code/modules/antagonists/heretic/magic/mansus_grasp.dm new file mode 100644 index 00000000000..4c4b8c167f2 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/mansus_grasp.dm @@ -0,0 +1,113 @@ +/datum/spell/touch/mansus_grasp + name = "Mansus Grasp" + desc = "A touch spell that lets you channel the power of the Old Gods through your grip." + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "mansus_grasp" + sound = 'sound/items/welder.ogg' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + clothes_req = FALSE + + invocation = "R'CH T'H TR'TH!" + invocation_type = INVOCATION_SHOUT + + hand_path = /obj/item/melee/touch_attack/mansus_fist + +/obj/item/melee/touch_attack/mansus_fist + name = "Mansus Grasp" + desc = "A sinister looking aura that distorts the flow of reality around it. \ + Causes knockdown, minor bruises, and major stamina damage. \ + It gains additional beneficial effects as you expand your knowledge of the Mansus." + icon_state = "mansus" + inhand_icon_state = "mansus" + catchphrase = null + +/obj/item/melee/touch_attack/mansus_fist/Initialize(mapload) + . = ..() + AddComponent(/datum/component/effect_remover, \ + success_feedback = "You remove %THEEFFECT.", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ + effects_we_clear = list(/obj/effect/heretic_rune), \ + time_to_remove = 0.4 SECONDS) + addtimer(CALLBACK(src, PROC_REF(setup_signal)), 0.1 SECONDS) + +/obj/item/melee/touch_attack/mansus_fist/proc/setup_signal() + RegisterSignal(loc, COMSIG_MOB_ALTCLICKON, PROC_REF(on_special_click)) + +/obj/item/melee/touch_attack/mansus_fist/Destroy() + UnregisterSignal(loc, COMSIG_MOB_ALTCLICKON) + return ..() + + +/* + * Callback for effect_remover component. + */ +/obj/item/melee/touch_attack/mansus_fist/proc/after_clear_rune(obj/effect/target, mob/living/user) + if(istype(target, /obj/effect/heretic_rune)) + var/obj/effect/heretic_rune/our_target = target + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target.loc, our_target.greyscale_colours) + qdel(src) + +/obj/item/melee/touch_attack/mansus_fist/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + if(user == target || blocked_by_antimagic) + return + if(!isliving(target)) + return + else + if(SEND_SIGNAL(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, target) & COMPONENT_BLOCK_HAND_USE) + handle_delete(user) + return + + var/mob/living/living_hit = target + living_hit.apply_damage(10, BRUTE) + if(!iscarbon(target)) + handle_delete(user) + return + + var/mob/living/carbon/carbon_hit = target + + // Cultists are momentarily disoriented by the stunning aura. Enough for both parties to go 'oh shit' but only a mild combat ability. + // Cultists have an identical effect on their stun hand. The heretic's faster spell charge time is made up for by their lack of teammates. + if(IS_CULTIST(carbon_hit)) + carbon_hit.Stun(0.5 SECONDS) + carbon_hit.AdjustConfused(3 SECONDS) + carbon_hit.AdjustDizzy(3 SECONDS) + carbon_hit.HereticSlur(30 SECONDS) // This prevents a cultist from calling for help on their mindspeak for 30 seconds. You are on your own. + + var/old_color = carbon_hit.color + carbon_hit.color = COLOR_CULT_RED + animate(carbon_hit, color = old_color, time = 4 SECONDS, easing = EASE_IN) + playsound(carbon_hit, 'sound/effects/curse.ogg', 50, TRUE) + + to_chat(user, SPAN_WARNING("An unholy force intervenes as you grasp [carbon_hit], absorbing most of the effects!")) + to_chat(carbon_hit, SPAN_WARNING("As [user] grasps you with eldritch forces, your blood magic absorbs most of the effects!")) + handle_delete(user) + return + + //This doesn't mute for very long (by default), but does block AI tracking! + ADD_TRAIT(carbon_hit, TRAIT_AI_UNTRACKABLE, "mansus_grasp") + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(callback_remove_trait), carbon_hit, TRAIT_AI_UNTRACKABLE, "mansus_grasp"), 15 SECONDS) + carbon_hit.HereticSlur(15 SECONDS) + carbon_hit.Silence(3 SECONDS) + carbon_hit.KnockDown(5 SECONDS) + carbon_hit.apply_damage(80, STAMINA) + handle_delete(user) + return + +/// Called when someone alt clicks with a grasp on something. +/obj/item/melee/touch_attack/mansus_fist/proc/on_special_click(mob/source, atom/target) + SIGNAL_HANDLER + if(source.get_int_organ(/obj/item/organ/internal/cyberimp/chest/bluespace_anchor)) + if(!HAS_TRAIT(source, TRAIT_ALLOW_HERETIC_CASTING)) + to_chat(source, SPAN_WARNING("Some anchoring force interfears with your grasp. Perhaps a focus would stabilize it!")) + return FALSE + if(!source.Adjacent(target)) + return FALSE + if(SEND_SIGNAL(source, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, target) & COMPONENT_USE_HAND) + INVOKE_ASYNC(src, PROC_REF(handle_delete), source) + return COMSIG_MOB_CANCEL_CLICKON + + diff --git a/code/modules/antagonists/heretic/magic/mind_gate.dm b/code/modules/antagonists/heretic/magic/mind_gate.dm new file mode 100644 index 00000000000..7ceaf4cf7c7 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/mind_gate.dm @@ -0,0 +1,39 @@ +/datum/spell/mind_gate + name = "Mind Gate" + desc = "target suffers a hallucination, is left confused for 10 seconds, suffers oxyloss, and is inflicted with insanity." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "mind_gate" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/effects/curse.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 20 SECONDS + + invocation = "Op' 'oY 'Mi'd" + invocation_type = INVOCATION_WHISPER + +/datum/spell/mind_gate/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.allowed_type = /mob/living/carbon/human + return C + +/datum/spell/mind_gate/cast(list/targets, mob/user) + if(!length(targets)) + to_chat(user, SPAN_NOTICE("No target found in range.")) + return + + var/mob/living/target = targets[1] + if(target.can_block_magic(antimagic_flags)) + to_chat(target, SPAN_NOTICE("Your mind feels closed.")) + to_chat(user, SPAN_WARNING("Their mind doesn't swing open, but neither does yours.")) + return FALSE + + target.AdjustConfused(10 SECONDS) + target.adjustOxyLoss(30) + new /obj/effect/hallucination/delusion(get_turf(target), target, 'icons/effects/eldritch.dmi', "heretic") + target.apply_status_effect(/datum/status_effect/stacking/heretic_insanity, 3) diff --git a/code/modules/antagonists/heretic/magic/mirror_walk.dm b/code/modules/antagonists/heretic/magic/mirror_walk.dm new file mode 100644 index 00000000000..11b6b4f14ed --- /dev/null +++ b/code/modules/antagonists/heretic/magic/mirror_walk.dm @@ -0,0 +1,89 @@ +/datum/spell/bloodcrawl/mirror_walk + name = "Mirror Walk" + desc = "Allows you to traverse invisibly and freely across the station within the realm of the mirror. \ + You can only enter and exit the realm of mirrors when nearby reflective surfaces and items, \ + such as windows, mirrors, and reflective walls or equipment." + + base_cooldown = 10 SECONDS // We need this else they'll instantly teleport out + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon = 'icons/mob/actions/actions_minor_antag.dmi' + action_icon_state = "ninja_cloak" + + is_a_heretic_spell = TRUE + + allowed_type = /turf + + /// Static typecache of types that are counted as reflective. + var/static/list/special_reflective_surfaces = typecacheof(list( + /obj/structure/window, + /obj/structure/mirror, + /obj/structure/sink/puddle + )) + + +/datum/spell/bloodcrawl/mirror_walk/valid_target(turf/target, mob/user) + var/turf/phase_turf = get_turf(user) + // It would likely be a bad idea to teleport into an ai monitored area (ai sat) + var/area/phase_area = get_area(phase_turf) + if(istype(phase_area, /area/station/ai_monitored) && user.loc != phase_turf) + to_chat(user, SPAN_WARNING("It's probably not a very wise idea to exit the mirror's realm here.")) + return FALSE + if(is_reflection_nearby(phase_turf)) + return TRUE + to_chat(user, "There are no reflective surfaces nearby to use the mirror's realm here!") + return FALSE + +/datum/spell/bloodcrawl/mirror_walk/rise_message(atom/A) + return + +/datum/spell/bloodcrawl/mirror_walk/rise_animation(turf/tele_loc, mob/living/L, atom/A) + var/atom/nearby_reflection = is_reflection_nearby(tele_loc) + if(!nearby_reflection) // Should only be true if you're forced out somehow, like by having the spell removed + return + L.visible_message( + SPAN_BOLDWARNING("[L] phases into reality before your very eyes!"), + SPAN_NOTICE("You jump out of the reflection coming off of [nearby_reflection], exiting the mirror's realm."), + ) + +/datum/spell/bloodcrawl/mirror_walk/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder) + return + +/datum/spell/bloodcrawl/mirror_walk/sink_animation(atom/A, mob/living/L) + var/atom/nearby_reflection = is_reflection_nearby(L) + L.visible_message( + SPAN_BOLDWARNING("[L] phases out of reality, vanishing before your very eyes!"), + SPAN_NOTICE("You jump into the reflection coming off of [nearby_reflection], entering the mirror's realm."), + ) + +/** + * Goes through all nearby atoms in sight of the + * passed caster and determines if they are "reflective" + * for the purpose of us being able to utilize it to enter or exit. + * + * Returns an object reference to a "reflective" object in view if one was found, + * or null if no object was found that was determined to be "reflective". + */ +/datum/spell/bloodcrawl/mirror_walk/proc/is_reflection_nearby(atom/caster) + for(var/atom/thing as anything in view(2, caster)) + if(isitem(thing)) + var/obj/item/item_thing = thing + if(item_thing.IsReflect()) + return thing + + if(ishuman(thing)) + var/mob/living/carbon/human/human_thing = thing + if(human_thing.check_reflect()) + return thing + + if(isturf(thing)) + var/turf/turf_thing = thing + if(turf_thing.flags & BLESSED_TILE) + continue + if(turf_thing.flags_ricochet & RICOCHET_SHINY) + return thing + + if(is_type_in_typecache(thing, special_reflective_surfaces)) + return thing + + return null diff --git a/code/modules/antagonists/heretic/magic/moon_parade.dm b/code/modules/antagonists/heretic/magic/moon_parade.dm new file mode 100644 index 00000000000..72679be4cd7 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/moon_parade.dm @@ -0,0 +1,116 @@ +/datum/spell/fireball/moon_parade + name = "Lunar parade" + desc = "This unleashes the parade, making everyone in its way join it and suffer hallucinations." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "moon_parade" + what_icon_state = "moon_parade" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/moon_target.dmi' + + sound = 'sound/magic/cosmic_energy.ogg' + is_a_heretic_spell = TRUE + base_cooldown = 30 SECONDS + + invocation = "L'N'R P'RAD" + + selection_activated_message = "You prepare to make them join the parade!" + selection_deactivated_message = "You stop the music and halt the parade... for now." + fireball_type = /obj/projectile/moon_parade + + +/obj/projectile/moon_parade + name = "Lunar parade" + icon_state = "lunar_parade" + damage = 0 + damage_type = BURN + speed = 5 + range = 75 + ricochets_max = 40 + ricochet_chance = 500 + ricochet_incidence_leeway = 0 + always_nonmob_ricochet = TRUE + forcedodge = -1 //Only mobs, not walls or structures + force_no_hit_message_or_sound = TRUE + ///looping sound datum for our projectile. + var/datum/looping_sound/moon_parade/soundloop + // A list of the people we hit + var/list/mobs_hit = list() + /// Have we been disabled by hitting an antimagic person + var/disabled = FALSE + +/obj/projectile/moon_parade/Initialize(mapload) + . = ..() + soundloop = new(list(src), TRUE) + addtimer(CALLBACK(src, GLOBAL_PROC_REF(qdel), src), 12 SECONDS) + + +/obj/projectile/moon_parade/prehit(atom/target) + if(!isliving(firer) || !isliving(target)) + return ..() + var/mob/living/caster = firer + var/mob/living/victim = target + + if(caster == victim) + return + + if(!caster.mind) + return + + var/datum/antagonist/mindslave/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/mindslave/heretic_monster) + if(monster?.master == caster.mind) + return + + // Anti-magic destroys the projectile for consistency and counterplay + if(victim.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND)) + visible_message(SPAN_WARNING("The parade hits [victim] and a sudden wave of clarity comes over you!")) + disabled = TRUE + qdel(src) + return + + return ..() + +/obj/projectile/moon_parade/on_hit(atom/target, blocked = 0, pierce_hit) + . = ..() + if(!isliving(target)) + qdel(src) + return + if(disabled) + return + + var/mob/living/victim = target + var/mob/living/caster = firer + if(caster) + if(caster == victim) + return + + if(!caster.mind) + return + + var/datum/antagonist/mindslave/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/mindslave/heretic_monster) + if(monster?.master == caster.mind) + return + if(!(victim in mobs_hit)) + RegisterSignal(victim, COMSIG_PARENT_QDELETING, PROC_REF(clear_mob)) + victim.AddComponent(/datum/component/leash, src, distance = 1) + to_chat(victim, SPAN_WARNING("You feel unable to move away from the parade!")) + mobs_hit += victim + new /obj/effect/hallucination/delusion(get_turf(victim), victim, 'icons/effects/eldritch.dmi', "heretic") + victim.apply_status_effect(/datum/status_effect/stacking/heretic_insanity) + log_override = TRUE + +/obj/projectile/moon_parade/Destroy() + for(var/mob/living/leftover_mob as anything in mobs_hit) + clear_mob(leftover_mob) + mobs_hit.Cut() // You never know + soundloop.stop() + return ..() + + +/obj/projectile/moon_parade/proc/clear_mob(datum/source) + SIGNAL_HANDLER + UnregisterSignal(source, COMSIG_PARENT_QDELETING) + mobs_hit -= source + diff --git a/code/modules/antagonists/heretic/magic/moon_ringleader.dm b/code/modules/antagonists/heretic/magic/moon_ringleader.dm new file mode 100644 index 00000000000..006caaab61f --- /dev/null +++ b/code/modules/antagonists/heretic/magic/moon_ringleader.dm @@ -0,0 +1,65 @@ +/datum/spell/aoe/moon_ringleader + name = "Ringleaders Rise" + desc = "Big AoE spell that inflicts insanity and causes hallucinations to everyone in the AoE. \ + The worse their sanity, the stronger this spell becomes. \ + If their sanity is low enough, they even snap and go insane, and the spell then further halves their sanity." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "moon_ringleader" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/effects/moon_parade.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 1 MINUTES + antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND + invocation = "R''S 'E" + invocation_type = INVOCATION_SHOUT + + aoe_range = 5 + /// Effect for when the spell triggers + var/obj/effect/moon_effect = /obj/effect/temp_visual/moon_ringleader + +/datum/spell/aoe/moon_ringleader/create_new_targeting() + var/datum/spell_targeting/aoe/targeting = new() + targeting.range = aoe_range + return targeting + +/datum/spell/aoe/moon_ringleader/cast(list/targets, mob/user) + new moon_effect(get_turf(user)) + for(var/mob/living/carbon/human/human_target in targets) + if(human_target.stat == DEAD) + continue + if(IS_HERETIC_OR_MONSTER(human_target)) + continue + if(human_target.can_block_magic(antimagic_flags)) + continue + var/datum/status_effect/stacking/heretic_insanity/insanity = human_target.has_status_effect(/datum/status_effect/stacking/heretic_insanity) + var/power + if(insanity) + power = insanity.stacks + else + power = 1 + human_target.Hallucinate(max((power *= 5) SECONDS, 40 SECONDS)) + human_target.AdjustConfused(10 SECONDS) + if(power >= 16) + human_target.apply_status_effect(/datum/status_effect/moon_converted) + add_attack_logs(user, human_target, "[human_target] was driven insane by [user]([src])") + log_game("[human_target] was driven insane by [user]") + else + human_target.apply_status_effect(/datum/status_effect/stacking/heretic_insanity, 2) + + return ..() + + +/obj/effect/temp_visual/moon_ringleader + icon = 'icons/effects/eldritch.dmi' + icon_state = "ring_leader_effect" + alpha = 180 + duration = 6 + +/obj/effect/temp_visual/moon_ringleader/ringleader/Initialize(mapload) + . = ..() + transform = transform.Scale(10) diff --git a/code/modules/antagonists/heretic/magic/moon_smile.dm b/code/modules/antagonists/heretic/magic/moon_smile.dm new file mode 100644 index 00000000000..35161e908de --- /dev/null +++ b/code/modules/antagonists/heretic/magic/moon_smile.dm @@ -0,0 +1,63 @@ +/datum/spell/pointed/moon_smile + name = "Smile of the moon" + desc = "Lets you turn the gaze of the moon on someone \ + temporarily blinding, muting, deafening and knocking down a single target if their sanity is low enough." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "moon_smile" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/moon_target.dmi' + + sound = 'sound/magic/blind.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 20 SECONDS + antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND + invocation = "Mo'N S'M'LE" + invocation_type = INVOCATION_SHOUT + cast_range = 6 + + //active_msg = "You prepare to let them see the true face..." + + +/datum/spell/pointed/moon_smile/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.use_turf_of_user = TRUE + C.allowed_type = /mob/living/carbon/human + C.range = cast_range + C.try_auto_target = FALSE + return C + +/datum/spell/pointed/moon_smile/cast(list/targets, mob/user) + . = ..() + var/mob/living/cast_on = targets[1] + /// The duration of these effects are based on sanity, mainly for flavor but also to make it a weaker alpha strike + var/maximum_duration = 15 SECONDS + cast_on.apply_status_effect(/datum/status_effect/stacking/heretic_insanity) + var/datum/status_effect/stacking/heretic_insanity/insanity = cast_on.has_status_effect(/datum/status_effect/stacking/heretic_insanity) + var/moon_smile_duration + if(!insanity) + moon_smile_duration = 1 SECONDS + else + moon_smile_duration = max((insanity.stacks / insanity.max_stacks) * maximum_duration, 1) + if(cast_on.can_block_magic(antimagic_flags)) + to_chat(cast_on, SPAN_NOTICE("The moon turns, its smile no longer set on you.")) + to_chat(user, SPAN_WARNING("The moon does not smile upon them.")) + return FALSE + + playsound(cast_on, 'sound/hallucinations/i_see_you1.ogg', 50, 1) + to_chat(cast_on, SPAN_WARNING("Your eyes cry out in pain, your ears bleed and your lips seal! THE MOON SMILES UPON YOU!")) + cast_on.EyeBlind(max(moon_smile_duration / 2 + (1 SECONDS), 2 SECONDS)) + cast_on.EyeBlurry(max(moon_smile_duration + (2 SECONDS), 4 SECONDS)) + + cast_on.Deaf(max(moon_smile_duration + (2 SECONDS), 4 SECONDS)) + + cast_on.Silence(max(moon_smile_duration + (4 SECONDS), 6 SECONDS)) + + // Only knocksdown if the target has a low enough sanity + if(insanity && insanity.stacks >= 8) + cast_on.KnockDown(2 SECONDS) + return TRUE diff --git a/code/modules/antagonists/heretic/magic/nightwatcher_rebirth.dm b/code/modules/antagonists/heretic/magic/nightwatcher_rebirth.dm new file mode 100644 index 00000000000..7f620135544 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/nightwatcher_rebirth.dm @@ -0,0 +1,60 @@ +/datum/spell/aoe/fiery_rebirth + name = "Nightwatcher's Rebirth" + desc = "A spell that extinguishes you and drains nearby heathens engulfed in flames of their life force, \ + healing you for each victim drained. Those in critical condition \ + will have the last of their vitality drained, killing them." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "smoke" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 1 MINUTES + + invocation = "GL'RY T' TH' N'GHT'W'TCH'ER" + invocation_type = INVOCATION_WHISPER + +/datum/spell/aoe/fiery_rebirth/create_new_targeting() + var/datum/spell_targeting/aoe/A = new() + A.include_user = FALSE + A.range = 7 + A.allowed_type = /mob/living/carbon + return A + +/datum/spell/aoe/fiery_rebirth/cast(list/targets, mob/living/carbon/user) + user.ExtinguishMob() + for(var/mob/living/carbon/nearby_mob in targets) + if(nearby_mob == user) + continue + if(!nearby_mob.mind || !nearby_mob.client) + continue + if(IS_HERETIC_OR_MONSTER(nearby_mob)) + continue + if(nearby_mob.stat == DEAD || !nearby_mob.on_fire) + continue + + + new /obj/effect/temp_visual/eldritch_smoke(get_turf(nearby_mob)) + nearby_mob.Beam(user, icon_state = "r_beam", time = 2 SECONDS) + + //This is essentially a death mark, use this to finish your opponent quicker. + if(nearby_mob.health <= 0) + nearby_mob.death() + nearby_mob.apply_damage(20, BURN) + + // Heal the caster for every victim damaged + var/need_mob_update = FALSE + need_mob_update += user.adjustBruteLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustFireLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustToxLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustOxyLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustStaminaLoss(-10) + if(need_mob_update) + user.updatehealth() + +/obj/effect/temp_visual/eldritch_smoke + icon = 'icons/effects/eldritch.dmi' + icon_state = "smoke" diff --git a/code/modules/antagonists/heretic/magic/realignment.dm b/code/modules/antagonists/heretic/magic/realignment.dm new file mode 100644 index 00000000000..1647cbd6928 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/realignment.dm @@ -0,0 +1,120 @@ +// Realignment. It's like Fleshmend but solely for stamina damage and stuns. Sec meta +/datum/spell/realignment + name = "Realignment" + desc = "Realign yourself, rapidly regenerating stamina and reducing any stuns or knockdowns. \ + You cannot attack while realigning. Can be casted multiple times in short succession, but each cast lengthens the cooldown." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "adrenal" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 6 SECONDS + var/cooldown_reduction_per_rank = -6 SECONDS // we're not a wizard spell but we use the levelling mechanic + level_max = 10 // we can get up to / over a minute duration cd time + + invocation = "R'S'T." + invocation_type = INVOCATION_SHOUT + +/datum/spell/realignment/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/realignment/cast(list/targets, mob/user) + . = ..() + if(!isliving(user)) + return + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/realignment) + to_chat(user, SPAN_NOTICE("We begin to realign ourselves.")) + +/datum/spell/realignment/after_cast(atom/cast_on) + . = ..() + // With every cast, our spell level increases for a short time, which goes back down after a period + // and with every spell level, the cooldown duration of the spell goes up + if(level_spell()) + var/reduction_timer = max(base_cooldown * level_max * 0.5, 1.5 MINUTES) + addtimer(CALLBACK(src, PROC_REF(delevel_spell)), reduction_timer) + +/datum/spell/realignment/proc/level_spell(bypass_cap = FALSE) + // Spell cannot be levelled + if(level_max <= 1) + return FALSE + + // Spell is at cap, and we will not bypass it + if(spell_level >= level_max) + return FALSE + + spell_level++ + cooldown_handler.recharge_duration = max(cooldown_handler.recharge_duration - cooldown_reduction_per_rank, 0.25 SECONDS) // 0 second CD starts to break things. + name = "[get_spell_title()][initial(name)]" + return TRUE + +/datum/spell/realignment/proc/delevel_spell() + // Spell cannot be levelled + if(level_max <= 1) + return FALSE + + if(spell_level <= 1) + return FALSE + + spell_level-- + if(cooldown_reduction_per_rank > 0 SECONDS) + cooldown_handler.recharge_duration = min(cooldown_handler.recharge_duration + cooldown_reduction_per_rank, initial(cooldown_handler.recharge_duration)) + else + cooldown_handler.recharge_duration = max(cooldown_handler.recharge_duration + cooldown_reduction_per_rank, initial(cooldown_handler.recharge_duration)) + + name = "[get_spell_title()][initial(name)]" + return TRUE + +/datum/spell/realignment/proc/get_spell_title() + switch(spell_level) + if(1, 2) + return "Hasty " // Hasty Realignment + if(3, 4) + return "" // Realignment + if(5, 6, 7) + return "Slowed " // Slowed Realignment + if(8, 9, 10) + return "Laborious " // Laborious Realignment (don't reach here) + + return "" + +/datum/status_effect/realignment + id = "realigment" + status_type = STATUS_EFFECT_REFRESH + duration = 8 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/realignment + tick_interval = 0.5 SECONDS + show_duration = TRUE + ///Traits to add/remove + var/list/realignment_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_PACIFISM) + +/datum/status_effect/realignment/on_apply() + ADD_TRAIT(owner, TRAIT_BATON_RESISTANCE, "[id]") + ADD_TRAIT(owner, TRAIT_PACIFISM, "[id]") + owner.add_filter(id, 2, list("type" = "outline", "color" = "#d6e3e7", "size" = 2)) + var/filter = owner.get_filter(id) + animate(filter, alpha = 127, time = 1 SECONDS, loop = -1) + animate(alpha = 63, time = 2 SECONDS) + SEND_SIGNAL(owner, COMSIG_LIVING_CLEAR_STUNS) + return TRUE + +/datum/status_effect/realignment/on_remove() + REMOVE_TRAIT(owner, TRAIT_BATON_RESISTANCE, "[id]") + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "[id]") + owner.remove_filter(id) + +/datum/status_effect/realignment/tick(seconds_between_ticks) + owner.adjustStaminaLoss(-10) + owner.AdjustParalysis(-1 SECONDS) + owner.AdjustStunned(-1 SECONDS) + owner.AdjustWeakened(-1 SECONDS) + owner.AdjustKnockDown(-1 SECONDS) + +/atom/movable/screen/alert/status_effect/realignment + name = "Realignment" + desc = "You're realigning yourself. You cannot attack, but are rapidly regenerating stamina." + icon_state = "realignment" diff --git a/code/modules/antagonists/heretic/magic/rust_construction.dm b/code/modules/antagonists/heretic/magic/rust_construction.dm new file mode 100644 index 00000000000..19c3388756e --- /dev/null +++ b/code/modules/antagonists/heretic/magic/rust_construction.dm @@ -0,0 +1,123 @@ +/datum/spell/pointed/rust_construction + name = "Rust Formation" + desc = "Transforms a rusted floor into a full wall of rust. Creating a wall underneath a mob will harm it." + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "shield" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + + is_a_heretic_spell = TRUE + base_cooldown = 8 SECONDS + clothes_req = FALSE + cast_range = 4 + + /// How long does the filter last on walls we make? + var/filter_duration = 2 MINUTES + +/datum/spell/pointed/rust_construction/create_new_targeting() + var/datum/spell_targeting/click/T = new + T.click_radius = 0 + T.range = cast_range + T.allowed_type = /turf/simulated + T.use_turf_of_user = TRUE + return T + +/datum/spell/pointed/rust_construction/valid_target(target, user) + if(!isliving(user)) + return + + var/mob/living/living_owner = user + var/turf/cast_on = target + if(!isturf(cast_on)) + to_chat(living_owner, SPAN_WARNING("That is not a wall or a floor!")) + return FALSE + + if(!HAS_TRAIT(cast_on, TRAIT_RUSTY)) + if(living_owner) + to_chat(living_owner, SPAN_WARNING("The target is not rusted!")) + return + living_owner.visible_message(SPAN_DANGER("[living_owner] drags [living_owner.p_their()] hand upwards as a wall of rust rises out of [cast_on]!"), + SPAN_NOTICE("You drag a hand upwards as a wall of rust rises out of [cast_on].")) + return TRUE + +/datum/spell/pointed/rust_construction/cast(list/targets, mob/user) + . = ..() + var/turf/cast_on = targets[1] + var/rises_message = "rises out of [cast_on]" + + // If we casted at a wall we'll try to rust it. In the case of an enchanted wall it'll deconstruct it + if(iswallturf(cast_on)) + cast_on.visible_message(SPAN_WARNING("\The [cast_on] quakes as the rust causes it to crumble!")) + var/mob/living/living_owner = user + living_owner?.do_rust_heretic_act(cast_on) + // ref transfers to floor + cast_on.Shake(duration = 0.5 SECONDS) + // which we need to re-rust + living_owner?.do_rust_heretic_act(cast_on) + playsound(cast_on, 'sound/effects/bang.ogg', 50, vary = TRUE) + return TRUE + + var/turf/simulated/wall/new_wall = cast_on.ChangeTurf(/turf/simulated/wall) + if(!istype(new_wall)) + return TRUE + + playsound(new_wall, 'sound/effects/constructform.ogg', 50, TRUE) + new_wall.rust_heretic_act() + new_wall.name = "\improper enchanted [new_wall.name]" + new_wall.hardness = 60 + new_wall.sheet_amount = 0 + new_wall.girder_type = null + + // I wanted to do a cool animation of a wall raising from the ground + // but I guess a fading filter will have to do for now as walls have 0 depth (currently) + new_wall.add_filter("rust_wall", 2, list("type" = "outline", "color" = "#85be299c", "size" = 2)) + addtimer(CALLBACK(src, PROC_REF(fade_wall_filter), new_wall), filter_duration * 0.5) + addtimer(CALLBACK(src, PROC_REF(remove_wall_filter), new_wall), filter_duration) + + var/message_shown = FALSE + for(var/mob/living/living_mob in cast_on) + message_shown = TRUE + if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == user) + living_mob.visible_message( + SPAN_WARNING("\A [new_wall] [rises_message] and pushes along [living_mob]!"), + SPAN_NOTICE("\A [new_wall] [rises_message] beneath your feet and pushes you along!"), + ) + else + living_mob.visible_message( + SPAN_WARNING("\A [new_wall] [rises_message] and slams into [living_mob]!"), + SPAN_USERDANGER("\A [new_wall] [rises_message] beneath your feet and slams into you!"), + ) + living_mob.apply_damage(10, BRUTE) + living_mob.KnockDown(5 SECONDS) + living_mob.SpinAnimation(5, 1) + + // If we're not throw them to a nearby (open) turf + var/list/turfs_by_us = get_adjacent_open_turfs(cast_on) + // If there is no side by us, hardstun them + if(!length(turfs_by_us)) + living_mob.Weaken(3 SECONDS) + continue + + // If there's an open turf throw them to the side + living_mob.throw_at(pick(turfs_by_us), 1, 3, spin = FALSE) + + if(!message_shown) + new_wall.visible_message(SPAN_WARNING("\A [new_wall] [rises_message]!")) + +/datum/spell/pointed/rust_construction/proc/fade_wall_filter(turf/simulated/wall) + if(QDELETED(wall)) + return + + var/rust_filter = wall.get_filter("rust_wall") + if(!rust_filter) + return + + animate(rust_filter, alpha = 0, time = filter_duration * (9/20)) + +/datum/spell/pointed/rust_construction/proc/remove_wall_filter(turf/simulated/wall) + if(QDELETED(wall)) + return + + wall.remove_filter("rust_wall") diff --git a/code/modules/antagonists/heretic/magic/rust_wave.dm b/code/modules/antagonists/heretic/magic/rust_wave.dm new file mode 100644 index 00000000000..0aacbd73617 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/rust_wave.dm @@ -0,0 +1,130 @@ +// Shoots out in a wave-like, what rust heretics themselves get +/datum/spell/cone/staggered/entropic_plume + name = "Entropic Plume" + desc = "Spews forth a disorienting plume that causes enemies to strike each other, \ + briefly blinds them (increasing with range) and poisons them (decreasing with range). \ + Also spreads rust in the path of the plume." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "entropic_plume" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/forcewall.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "'NTR'P'C PL'M'" + invocation_type = INVOCATION_WHISPER + cone_levels = 5 + +/datum/spell/cone/staggered/entropic_plume/create_new_targeting() + var/datum/spell_targeting/cone/entropic/E = new() + E.cone_levels = cone_levels + E.respect_density = respect_density + return E + +/datum/spell_targeting/cone/entropic + +/datum/spell_targeting/cone/entropic/calculate_cone_shape(current_level) + // At the first level (that isn't level 1) we will be small + if(current_level == 2) + return 3 + // At the max level, we turn small again + if(current_level == cone_levels) + return 3 + // Otherwise, all levels in between will be wider + return 5 + +/datum/spell/cone/staggered/entropic_plume/cast(list/targets, mob/user) + . = ..() + new /obj/effect/temp_visual/dir_setting/entropic(get_step(user, user.dir), user.dir) + +/datum/spell/cone/staggered/entropic_plume/do_turf_cone_effect(turf/target_turf, mob/living/caster, level) + if(ismob(caster)) + caster.do_rust_heretic_act(target_turf) + else + target_turf.rust_heretic_act() + +/datum/spell/cone/staggered/entropic_plume/do_mob_cone_effect(mob/living/victim, atom/caster, level) + if(victim.can_block_magic(antimagic_flags) || IS_HERETIC_OR_MONSTER(victim) || victim == caster) + return + victim.apply_status_effect(/datum/status_effect/amok) + victim.apply_status_effect(/datum/status_effect/cloudstruck, level * 1 SECONDS) + victim.adjust_disgust(20 SECONDS) + victim.AdjustConfused(10 SECONDS) + + +/obj/effect/temp_visual/dir_setting/entropic + icon = 'icons/effects/160x160.dmi' + icon_state = "entropic_plume" + duration = 3 SECONDS + +/obj/effect/temp_visual/dir_setting/entropic/setDir(dir) + . = ..() + switch(dir) + if(NORTH) + pixel_x = -64 + if(SOUTH) + pixel_x = -64 + pixel_y = -128 + if(EAST) + pixel_y = -64 + if(WEST) + pixel_y = -64 + pixel_x = -128 + +// Shoots a straight line of rusty stuff ahead of the caster, what rust monsters get +/datum/spell/fireball/rust_wave + name = "Patron's Reach" + desc = "Channels energy into your hands to release a wave of rust." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "rust_wave" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + base_cooldown = 35 SECONDS + + invocation = "SPR'D TH' WO'D" + invocation_type = INVOCATION_WHISPER + + fireball_type = /obj/projectile/magic/rust_wave + +/obj/projectile/magic/rust_wave + name = "Patron's Reach" + icon_state = "eldritch_projectile" + alpha = 180 + damage = 30 + damage_type = TOX + hitsound = 'sound/weapons/punch3.ogg' + range = 15 + +/obj/projectile/magic/rust_wave/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) + . = ..() + playsound(src, 'sound/items/welder.ogg', 75, TRUE) + var/list/turflist = list() + var/turf/T1 + turflist += get_turf(src) + T1 = get_step(src,turn(movement_dir,90)) + turflist += T1 + turflist += get_step(T1,turn(movement_dir,90)) + T1 = get_step(src,turn(movement_dir,-90)) + turflist += T1 + turflist += get_step(T1,turn(movement_dir,-90)) + for(var/turf/T as anything in turflist) + if(!T || prob(25)) + continue + T.rust_heretic_act() + +/datum/spell/fireball/rust_wave/short + name = "Lesser Patron's Reach" + fireball_type = /obj/projectile/magic/rust_wave/short + +/obj/projectile/magic/rust_wave/short + range = 7 + speed = 0.5 diff --git a/code/modules/antagonists/heretic/magic/shadow_cloak.dm b/code/modules/antagonists/heretic/magic/shadow_cloak.dm new file mode 100644 index 00000000000..10255a1fd5b --- /dev/null +++ b/code/modules/antagonists/heretic/magic/shadow_cloak.dm @@ -0,0 +1,201 @@ +/datum/spell/shadow_cloak + name = "Cloak of Shadow" + desc = "Completely conceals your identity, but does not make you invisible. Can be activated early to disable it. \ + While cloaked, you move faster, but undergo actions much slower. \ + Taking damage while cloaked may cause it to lift suddenly, causing negative effects. " + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon = 'icons/mob/actions/actions_minor_antag.dmi' + action_icon_state = "ninja_cloak" + sound = 'sound/effects/curse/curse2.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 12 SECONDS + + /// How long before we automatically uncloak? + var/uncloak_time = 3 MINUTES + /// The cloak currently active + var/datum/status_effect/shadow_cloak/active_cloak + COOLDOWN_DECLARE(uncloak_timer) + + +/datum/spell/shadow_cloak/before_cast(mob/living/cast_on) + . = ..() + sound = pick( + 'sound/effects/curse/curse1.ogg', + 'sound/effects/curse/curse2.ogg', + 'sound/effects/curse/curse3.ogg', + 'sound/effects/curse/curse4.ogg', + 'sound/effects/curse/curse5.ogg', + 'sound/effects/curse/curse6.ogg', + ) + +/datum/spell/shadow_cloak/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/shadow_cloak/cast(list/targets, mob/user) + . = ..() + if(active_cloak) + uncloak_mob(user) + cooldown_handler.start_recharge(base_cooldown) + + else + COOLDOWN_START(src,uncloak_timer, 3 MINUTES) + cloak_mob(user) + cooldown_handler.start_recharge(1 SECONDS) + +/datum/spell/shadow_cloak/proc/cloak_mob(mob/living/cast_on) + playsound(cast_on, 'sound/effects/ahaha.ogg', 50, TRUE, -1, extrarange = SILENCED_SOUND_EXTRARANGE, frequency = 0.5) + cast_on.visible_message( + SPAN_WARNING("[cast_on] disappears into the shadows!"), + SPAN_NOTICE("You disappear into the shadows, becoming unidentifiable."), + ) + + active_cloak = cast_on.apply_status_effect(/datum/status_effect/shadow_cloak) + RegisterSignal(active_cloak, COMSIG_PARENT_QDELETING, PROC_REF(on_early_cloak_loss)) + RegisterSignal(cast_on, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING), PROC_REF(on_focus_lost)) + +/datum/spell/shadow_cloak/proc/uncloak_mob(mob/living/cast_on, show_message = TRUE) + if(!QDELETED(active_cloak)) + UnregisterSignal(active_cloak, COMSIG_PARENT_QDELETING) + qdel(active_cloak) + active_cloak = null + + UnregisterSignal(cast_on, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING)) + playsound(cast_on, 'sound/effects/curse/curseattack.ogg', 50) + if(show_message) + cast_on.visible_message( + SPAN_WARNING("[cast_on] appears from the shadows!"), + SPAN_NOTICE("You appear from the shadows, identifiable once more."), + ) + COOLDOWN_START(src, uncloak_timer, 5 SECONDS) + + +/// Signal proc for [COMSIG_PARENT_QDELETING], if our cloak is deleted early, impart negative effects +/datum/spell/shadow_cloak/proc/on_early_cloak_loss(datum/status_effect/source) + SIGNAL_HANDLER + + var/mob/living/removed = source.owner + uncloak_mob(removed, show_message = FALSE) + removed.visible_message( + SPAN_WARNING("[removed] is pulled from the shadows!"), + SPAN_USERDANGER("You are pulled out of the shadows!"), + ) + + removed.KnockDown(0.5 SECONDS) + removed.Slowed(2 MINUTES, 0.5) // jesus + cooldown_handler.start_recharge(uncloak_time * 2/3) + +/// Signal proc for [SIGNAL_REMOVETRAIT] via [TRAIT_ALLOW_HERETIC_CASTING], losing our focus midcast will throw us out. +/datum/spell/shadow_cloak/proc/on_focus_lost(mob/living/source) + SIGNAL_HANDLER + + uncloak_mob(source, show_message = FALSE) + source.visible_message( + SPAN_WARNING("[source] suddenly appears from the shadows!"), + SPAN_USERDANGER("As you lose your focus, you are pulled out of the shadows!"), + ) + cooldown_handler.start_recharge(uncloak_time / 3) + +/// Shadow cloak effect. Conceals the owner in a cloud of purple smoke, making them unidentifiable. +/// Also comes with some other buffs and debuffs - faster movespeed, slower actionspeed, etc. +/datum/status_effect/shadow_cloak + id = "shadow_cloak" + alert_type = null + tick_interval = 0 + /// How much damage we've been hit with + var/damage_sustained = 0 + /// How much damage we can be hit with before it starts rolling reveal chances + var/damage_before_reveal = 25 + /// Method to track plant overlay on mob for later removal + var/mutable_appearance/cloak_image + +/datum/status_effect/shadow_cloak/on_apply() + hide_user(owner) + // Add the relevant traits and modifiers + ADD_TRAIT(owner, TRAIT_GOTTAGONOTSOFAST, id) + ADD_TRAIT(owner, TRAIT_UNKNOWN, id) + ADD_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + // Register signals to cause effects + RegisterSignal(owner, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_dir_change)) + RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_change)) + RegisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_movement)) + return TRUE + +/datum/status_effect/shadow_cloak/on_remove() + // Remove image + QDEL_NULL(cloak_image) + owner.remove_alt_appearance(id) + // Remove traits and modifiers + REMOVE_TRAIT(owner, TRAIT_GOTTAGONOTSOFAST, id) + REMOVE_TRAIT(owner, TRAIT_UNKNOWN, id) + REMOVE_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + // Clear signals + UnregisterSignal(owner, list( + COMSIG_ATOM_DIR_CHANGE, + COMSIG_MOB_STATCHANGE, + COMSIG_MOB_APPLY_DAMAGE, + COMSIG_MOVABLE_MOVED, + )) + +/// Signal proc for [COMSIG_ATOM_DIR_CHANGE], handles turning the effect as we turn +/datum/status_effect/shadow_cloak/proc/on_dir_change(datum/source, old_dir, new_dir) + SIGNAL_HANDLER + + cloak_image.dir = new_dir + +/// Signal proc for [COMSIG_MOB_STATCHANGE], going past soft crit will stop the effect +/datum/status_effect/shadow_cloak/proc/on_stat_change(datum/source, new_stat, old_stat) + SIGNAL_HANDLER + + // Going above unconscious will self-delete + if(new_stat >= UNCONSCIOUS) + qdel(src) + +/// Signal proc for [COMSIG_MOB_APPLY_DAMAGE], being damaged past a threshold will roll a chance to stop the effect +/datum/status_effect/shadow_cloak/proc/on_damaged(datum/source, damage, damagetype, ...) + SIGNAL_HANDLER + + // Stam damage is generally bursty, so we'll half it + if(damagetype == STAMINA) + damage *= 0.5 + + // Add incoming damage to the total damage sustained + damage_sustained += damage + // If we're not past the threshold, return + if(damage_sustained < damage_before_reveal) + return + + // Otherwise, we have a probability based on how much damage sustained to self delete + if(prob(damage_sustained)) + qdel(src) + +/// Signal proc for [COMSIG_MOVABLE_MOVED], leaves a cool looking trail behind us as we walk +/datum/status_effect/shadow_cloak/proc/on_movement(mob/living/carbon/L, atom/old_loc) + SIGNAL_HANDLER + var/obj/effect/temp_visual/dir_setting/cloak_walk/trail = new (old_loc, owner.dir) + if(owner.body_position == LYING_DOWN) + trail.transform = turn(trail.transform, 90) + +/datum/status_effect/shadow_cloak/proc/hide_user(mob/living/carbon/user) + cloak_image = image('icons/effects/effects.dmi', owner, "curse", dir = owner.dir) + cloak_image.dir = owner.dir + cloak_image.override = TRUE + cloak_image.alpha = 0 + animate(cloak_image, alpha = 255, 0.2 SECONDS) + owner.add_alt_appearance(id, cloak_image, GLOB.player_list) + + +// Visual effect for the shadow cloak "trail" +/obj/effect/temp_visual/dir_setting/cloak_walk + duration = 0.75 SECONDS + icon_state = "curse" + +/obj/effect/temp_visual/dir_setting/cloak_walk/Initialize(mapload, set_dir) + . = ..() + animate(src, alpha = 0, time = duration - 1) + + diff --git a/code/modules/antagonists/heretic/magic/space_crawl.dm b/code/modules/antagonists/heretic/magic/space_crawl.dm new file mode 100644 index 00000000000..690ee8a334b --- /dev/null +++ b/code/modules/antagonists/heretic/magic/space_crawl.dm @@ -0,0 +1,50 @@ +#define SPACE_PHASING "space-phasing" + +/** + * ### Space Crawl + * + * Lets the caster enter and exit tiles of space or misc turfs. + */ +/datum/spell/bloodcrawl/space_crawl + name = "Space Phase" + desc = "Allows you to phase in and out of existence while in space or glass tiles." + + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "space_crawl" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + + allowed_type = /turf + +/datum/spell/bloodcrawl/space_crawl/valid_target(turf/target, user) + if(isspaceturf(get_turf(user))) //qwertodo: make this work on basalt / asteroid turf, if we get a planet map + return TRUE + if(istype(get_turf(user), /turf/simulated/floor/transparent)) + return TRUE + to_chat(user, SPAN_WARNING("You must stand on a space or glass turf!")) + return FALSE + +/datum/spell/bloodcrawl/space_crawl/rise_message(atom/A) + return + +/datum/spell/bloodcrawl/space_crawl/rise_animation(turf/tele_loc, mob/living/L, atom/A) + new /obj/effect/temp_visual/space_explosion(tele_loc) + REMOVE_TRAIT(L, TRAIT_RESISTLOWPRESSURE, SPACE_PHASING) + REMOVE_TRAIT(L, TRAIT_RESISTCOLD, SPACE_PHASING) + REMOVE_TRAIT(L, TRAIT_NOBREATH, SPACE_PHASING) + +/datum/spell/bloodcrawl/space_crawl/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder) + return + +/datum/spell/bloodcrawl/space_crawl/sink_animation(atom/A, mob/living/L) + A.visible_message(SPAN_DANGER("[L] sinks into [A]...")) + new /obj/effect/temp_visual/space_explosion(A) + ADD_TRAIT(L, TRAIT_RESISTLOWPRESSURE, SPACE_PHASING) + ADD_TRAIT(L, TRAIT_RESISTCOLD, SPACE_PHASING) + ADD_TRAIT(L, TRAIT_NOBREATH, SPACE_PHASING) + +#undef SPACE_PHASING diff --git a/code/modules/antagonists/heretic/magic/star_blast.dm b/code/modules/antagonists/heretic/magic/star_blast.dm new file mode 100644 index 00000000000..c2c0d012528 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/star_blast.dm @@ -0,0 +1,58 @@ +/datum/spell/fireball/star_blast + name = "Star Blast" + desc = "This spell fires a disk with cosmic energies at a target, spreading the star mark." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "star_blast" + what_icon_state = "star_blast" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/magic/cosmic_energy.ogg' + is_a_heretic_spell = TRUE + base_cooldown = 20 SECONDS + + invocation = "R'T'T' ST'R!" + selection_activated_message = "You prepare to cast your star blast!" + selection_deactivated_message = "You stop swirling cosmic energies from the palm of your hand... for now." + fireball_type = /obj/projectile/magic/star_ball + cares_about_turf = FALSE + +/obj/projectile/magic/star_ball + name = "star ball" + icon_state = "star_ball" + damage = 20 + damage_type = BURN + speed = 5 + range = 100 + knockdown = 4 SECONDS + /// Effect for when the ball hits something + var/obj/effect/explosion_effect = /obj/effect/temp_visual/cosmic_explosion + /// The range at which people will get marked with a star mark. + var/star_mark_range = 3 + +/obj/projectile/magic/star_ball/Initialize(mapload) + . = ..() + AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + +/obj/projectile/magic/star_ball/on_hit(atom/target, blocked = 0, pierce_hit) + . = ..() + var/mob/living/cast_on = firer + var/pins_hit = 0 + for(var/mob/living/nearby_mob in range(star_mark_range, target)) + if(cast_on == nearby_mob) + continue + nearby_mob.apply_status_effect(/datum/status_effect/star_mark, cast_on) + pins_hit++ + if(pins_hit >= 10) + playsound(get_turf(src), 'sound/effects/bowling_strike.ogg', 100, FALSE) + for(var/mob/nearby_mob in range(9, target)) + to_chat(nearby_mob, SPAN_HIEROPHANT_WARNING("STRIKE!")) + +/obj/projectile/magic/star_ball/Destroy() + playsound(get_turf(src), 'sound/magic/cosmic_energy.ogg', 50, FALSE) + for(var/turf/cast_turf in RANGE_TURFS(1, src)) + new /obj/effect/forcefield/cosmic_field(cast_turf) + return ..() + diff --git a/code/modules/antagonists/heretic/magic/star_touch.dm b/code/modules/antagonists/heretic/magic/star_touch.dm new file mode 100644 index 00000000000..ec371f1c5e2 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/star_touch.dm @@ -0,0 +1,201 @@ +/datum/spell/touch/star_touch + name = "Star Touch" + desc = "Manifests cosmic fields on tiles next to you while marking the victim with a star mark \ + or consuming an already present star mark to put them to sleep for 4 seconds. \ + They will then be linked to you with a cosmic ray, burning them for up to a minute, or \ + until they can escape your sight. Star Touch can also remove Cosmic Runes, or teleport you \ + to your Star Gazer when used on yourself." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "star_touch" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/items/welder.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 15 SECONDS + invocation = "ST'R 'N'RG'!" + invocation_type = INVOCATION_SHOUT + + hand_path = /obj/item/melee/touch_attack/star_touch + /// Stores the UID for the Star Gazer after ascending + var/star_gazer + +/obj/item/melee/touch_attack/star_touch/after_attack(atom/target, mob/living/user, proximity_flag, click_parameters) + . = ..() + + if(!proximity_flag || target == user || blocked_by_antimagic || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //There are better ways to get a good nights sleep in a bed. + return + var/mob/living/living_target = target + if(living_target.has_status_effect(/datum/status_effect/star_mark)) + living_target.Paralyse(4 SECONDS) + living_target.remove_status_effect(/datum/status_effect/star_mark) + else + living_target.apply_status_effect(/datum/status_effect/star_mark, user) + for(var/turf/cast_turf as anything in get_turfs(living_target)) + new /obj/effect/forcefield/cosmic_field(cast_turf) + user.apply_status_effect(/datum/status_effect/cosmic_beam, living_target) + handle_delete(user) + +/obj/item/melee/touch_attack/star_touch/proc/get_turfs(mob/living/victim) + var/list/target_turfs = list(get_turf(loc)) + var/range = attached_spell.ascended ? 2 : 1 + var/list/directions = list(turn(loc.dir, 90), turn(loc.dir, 270)) + for(var/direction as anything in directions) + for(var/i in 1 to range) + target_turfs += get_ranged_target_turf(loc, direction, i) + return target_turfs + + +/datum/spell/touch/star_touch/proc/set_star_gazer(mob/living/basic/heretic_summon/star_gazer/star_gazer_mob) + star_gazer = star_gazer_mob.UID() + +// To obtain the star gazer if there is one +/datum/spell/touch/star_touch/proc/get_star_gazer() + var/mob/living/basic/heretic_summon/star_gazer/star_gazer_resolved = locateUID(star_gazer) + if(star_gazer_resolved) + return star_gazer_resolved + return FALSE + +/obj/item/melee/touch_attack/star_touch + name = "Star Touch" + desc = "A sinister looking aura that distorts the flow of reality around it. \ + Causes people with a star mark to sleep for 4 seconds, and causes people without a star mark to get one." + icon_state = "star" + inhand_icon_state = "star" + catchphrase = null + +/obj/item/melee/touch_attack/star_touch/Initialize(mapload) + . = ..() + AddComponent(\ + /datum/component/effect_remover, \ + success_feedback = "You remove %THEEFFECT.", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ + effects_we_clear = list(/obj/effect/cosmic_rune), \ + ) + +/* + * Callback for effect_remover component. + */ +/obj/item/melee/touch_attack/star_touch/proc/after_clear_rune(obj/effect/target, mob/living/user) + new /obj/effect/temp_visual/cosmic_rune_fade(get_turf(target)) + qdel(src) + +/obj/item/melee/touch_attack/star_touch/activate_self(mob/user) + if(..()) + return + var/datum/spell/touch/star_touch/star_touch_spell = attached_spell + var/mob/living/basic/heretic_summon/star_gazer/star_gazer_mob = star_touch_spell?.get_star_gazer() + if(!star_gazer_mob) + to_chat(user, SPAN_HIEROPHANT_WARNING("You have no stargazer linked to this spell")) + return ..() + new /obj/effect/temp_visual/cosmic_explosion(get_turf(user)) + playsound(user, 'sound/magic/cosmic_energy.ogg', 100, TRUE) + playsound(star_gazer_mob, 'sound/magic/cosmic_energy.ogg', 100, TRUE) + user.forceMove(get_turf(star_gazer_mob)) + qdel(src) + +/obj/effect/ebeam/cosmic + name = "cosmic beam" + +/datum/status_effect/cosmic_beam + id = "cosmic_beam" + tick_interval = 0.2 SECONDS + duration = 1 MINUTES + status_type = STATUS_EFFECT_REPLACE + alert_type = null + /// Stores the current beam target + var/mob/living/current_target + /// Checks the time of the last check + var/last_check = 0 + /// The delay of when the beam gets checked + var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though + /// The maximum range of the beam + var/max_range = 8 + /// Wether the beam is active or not + var/active = FALSE + /// The storage for the beam + var/datum/beam/current_beam = null + +/datum/status_effect/cosmic_beam/on_creation(mob/living/new_owner, mob/living/current_target) + src.current_target = current_target + start_beam(current_target, new_owner) + return ..() + +/datum/status_effect/cosmic_beam/be_replaced() + if(active) + qdel(current_beam) + active = FALSE + return ..() + +/datum/status_effect/cosmic_beam/tick(seconds_between_ticks) + if(!current_target) + lose_target() + return + + if(world.time <= last_check+check_delay) + return + + last_check = world.time + + if(!can_see(owner, current_target)) + qdel(current_beam)//this will give the target lost message + return + + if(current_target) + on_beam_tick(current_target) + +/** + * Proc that always is called when we want to end the beam and makes sure things are cleaned up, see beam_died() + */ +/datum/status_effect/cosmic_beam/proc/lose_target() + if(active) + qdel(current_beam) + active = FALSE + if(current_target) + on_beam_release(current_target) + current_target = null + +/** + * Proc that is only called when the beam fails due to something, so not when manually ended. + * manual disconnection = lose_target, so it can silently end + * automatic disconnection = beam_died, so we can give a warning message first + */ +/datum/status_effect/cosmic_beam/proc/beam_died() + SIGNAL_HANDLER + to_chat(owner, SPAN_WARNING("You lose control of the beam!")) + lose_target() + duration = 0 + +/// Used for starting the beam when a target has been acquired +/datum/status_effect/cosmic_beam/proc/start_beam(atom/target, mob/living/user) + + if(current_target) + lose_target() + if(!isliving(target)) + return + + current_target = target + active = TRUE + current_beam = user.Beam(current_target, icon_state="cosmic_beam", time = 1 MINUTES, maxdistance = max_range, beam_type = /obj/effect/ebeam/cosmic) + RegisterSignal(current_beam, COMSIG_PARENT_QDELETING, PROC_REF(beam_died)) + + if(current_target) + on_beam_hit(current_target) + +/// What to add when the beam connects to a target +/datum/status_effect/cosmic_beam/proc/on_beam_hit(mob/living/target) + if(!istype(target, /mob/living/basic/heretic_summon/star_gazer)) + target.AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + +/// What to process when the beam is connected to a target +/datum/status_effect/cosmic_beam/proc/on_beam_tick(mob/living/target) + if(target.adjustFireLoss(3, updating_health = FALSE)) + target.updatehealth() + +/// What to remove when the beam disconnects from a target +/datum/status_effect/cosmic_beam/proc/on_beam_release(mob/living/target) + if(!istype(target, /mob/living/basic/heretic_summon/star_gazer)) + target.RemoveElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) diff --git a/code/modules/antagonists/heretic/magic/void_cold_cone.dm b/code/modules/antagonists/heretic/magic/void_cold_cone.dm new file mode 100644 index 00000000000..a1eee8c5630 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_cold_cone.dm @@ -0,0 +1,95 @@ +/datum/spell/cone/staggered/cone_of_cold + name = "Cone of Cold" + desc = "Shoots out a freezing cone in front of you." + + base_cooldown = 30 SECONDS + cooldown_min = 14 SECONDS + + invocation = "ISAGE!" // What killed the dinosaurs? THE ICE AGE + invocation_type = INVOCATION_SHOUT + + cone_levels = 4 + delay_between_level = 0.05 SECONDS + + /// What flags do we pass to MakeSlippery when affecting turfs? + /// null / NONE / TURF_DRY means the turf is unaffected + var/turf_freeze_type = TURF_WET_PERMAFROST + /// How long do turfs remain slippery / frozen for? + /// 0 seconds means the turf is unaffected, INFINITY means it's made perma-wet + var/unfreeze_turf_duration = 45 SECONDS + + /// What status effect do we apply when affecting mobs? + /// null means no status effect is applied + var/datum/status_effect/frozen_status_effect_path = /datum/status_effect/freon + /// How long do mobs remain frozen for? + /// 0 seconds means no status effect is applied, INFINITY means infinite duration (or default duration of the status effect) + var/unfreeze_mob_duration = 20 SECONDS + /// How much brute do we apply on freeze? + var/on_freeze_brute_damage = 10 + /// How much burn do we apply on freeze? + var/on_freeze_burn_damage = 20 + + /// How long do objects remain frozen for? + /// 0 seconds mean no objects are frozen, INFINITY means infinite duration freeze + var/unfreeze_object_duration = 20 SECONDS + + + +/datum/spell/cone/staggered/cone_of_cold/do_turf_cone_effect(turf/target_turf, atom/caster, level) + if(!turf_freeze_type || unfreeze_turf_duration <= 0 SECONDS) // 0 duration = don't apply the slip + return + if(!isfloorturf(target_turf)) + return + var/turf/simulated/frozen_floor = target_turf + frozen_floor.MakeSlippery(turf_freeze_type, unfreeze_turf_duration) + +/datum/spell/cone/staggered/cone_of_cold/do_mob_cone_effect(mob/living/target_mob, atom/caster, level) + if(target_mob.can_block_magic(antimagic_flags) || target_mob == caster || HAS_TRAIT(target_mob, TRAIT_RESISTCOLD)) + return + + if(ispath(frozen_status_effect_path) && unfreeze_mob_duration > 0 SECONDS) // 0 duration = don't apply the status effect + var/datum/status_effect/freeze = target_mob.apply_status_effect(frozen_status_effect_path) + if(unfreeze_mob_duration != INFINITY) + freeze.duration = world.time + unfreeze_mob_duration + + if(on_freeze_brute_damage || on_freeze_burn_damage) + target_mob.take_overall_damage(on_freeze_brute_damage, on_freeze_burn_damage) + + to_chat(target_mob, SPAN_USERDANGER("You feel a bitter cold!")) + + + +/datum/spell/cone/staggered/cone_of_cold/void + name = "Void Blast" + desc = "Fires a cone of chilling void in front of you, freezing everything in its path. \ + Enemies in the cone of the blast will be damaged slightly, slowed, and chilled overtime. \ + Additionally, objects hit will be frozen and can shatter, and ground hit will be iced over and slippery - \ + though they may thaw shortly if used in room temperature." + + + action_icon_state = "icebeam" + + is_a_heretic_spell = TRUE + clothes_req = FALSE + + invocation = "FR'ZE!" + + //In room temperature, the ice won't last very long + //...but in space / freezing rooms, it will stick around + turf_freeze_type = TURF_WET_ICE + unfreeze_turf_duration = 1 MINUTES + // Applies an "infinite" version of basic void chill + // (This stacks with mansus grasp's void chill) + frozen_status_effect_path = /datum/status_effect/void_chill/lasting + unfreeze_mob_duration = 30 SECONDS + // Does a smidge of damage + on_freeze_brute_damage = 12 + on_freeze_burn_damage = 10 + // Also freezes stuff (Which will likely be unfrozen similarly to turfs) + unfreeze_object_duration = 30 SECONDS + +/datum/spell/cone/staggered/cone_of_cold/void/do_mob_cone_effect(mob/living/target_mob, atom/caster, level) + if(IS_HERETIC_OR_MONSTER(target_mob)) + return + + return ..() diff --git a/code/modules/antagonists/heretic/magic/void_conduit.dm b/code/modules/antagonists/heretic/magic/void_conduit.dm new file mode 100644 index 00000000000..77987f8517c --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_conduit.dm @@ -0,0 +1,175 @@ +/datum/spell/aoe/conjure/void_conduit + name = "Void Conduit" + desc = "Opens a gate to the Void; it releases an intermittent pulse that damages windows and airlocks, \ + while afflicting Heathens with void chill. \ + Affected Heretics instead receive low pressure resistance." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "void_rift" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + base_cooldown = 2 MINUTES + + sound = null + is_a_heretic_spell = TRUE + clothes_req = FALSE + invocation = "MBR'C' TH' V''D!" + invocation_type = INVOCATION_SHOUT + aoe_range = 0 + + summon_type = list(/obj/structure/void_conduit) + +/obj/structure/void_conduit + name = "Void Conduit" + desc = "An open gate which leads to nothingness. Releases pulses which you do not want to get hit by." + icon = 'icons/effects/effects.dmi' + icon_state = "void_conduit" + anchored = TRUE + obj_integrity = 150 + ///Overlay to apply to the tiles in range of the conduit + /// List of possible overlays to apply to the tiles in range of the conduit + var/static/list/overlay_list = list() + ///List of tiles that we added an overlay to, so we can clear them when the conduit is deleted + var/list/overlayed_turfs = list() + ///How many tiles far our effect is + var/effect_range = 8 + ///id of the deletion timer + var/timerid + ///Audio loop for the rift being alive + var/datum/looping_sound/void_conduit/soundloop + +/obj/structure/void_conduit/Initialize(mapload) + . = ..() + soundloop = new(src, start_immediately = TRUE) + timerid = QDEL_IN(src, 1 MINUTES) + START_PROCESSING(SSobj, src) + if(!length(overlay_list)) + overlay_list += image(icon = 'icons/turf/overlays.dmi', icon_state = "voidtile_1", layer = ABOVE_OPEN_TURF_LAYER) + overlay_list += image(icon = 'icons/turf/overlays.dmi', icon_state = "voidtile_2", layer = ABOVE_OPEN_TURF_LAYER) + overlay_list += image(icon = 'icons/turf/overlays.dmi', icon_state = "voidtile_3", layer = ABOVE_OPEN_TURF_LAYER) + build_view_turfs() + +/obj/structure/void_conduit/proc/build_view_turfs() + for(var/turf/affected_turf as anything in overlayed_turfs) + affected_turf.cut_overlay(overlay_list) + + for(var/turf/affected_turf as anything in view(effect_range, src)) + if(!isfloorturf(affected_turf)) + continue + var/image/void_overlay = pick(overlay_list) + void_overlay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + void_overlay.alpha = 180 + + affected_turf.add_overlay(void_overlay) + overlayed_turfs += affected_turf + +/obj/structure/void_conduit/Destroy(force) + QDEL_NULL(soundloop) + deltimer(timerid) + STOP_PROCESSING(SSobj, src) + for(var/turf/affected_turf as anything in overlayed_turfs) // If the portal is moved, the overlays don't stick around + affected_turf.cut_overlay(overlay_list) + var/turf/extra_overlay = get_turf(src) + extra_overlay.cut_overlay(overlay_list) + return ..() + +/obj/structure/void_conduit/process(seconds_per_tick) + build_view_turfs() + do_conduit_pulse() + +///Sends out a pulse +/obj/structure/void_conduit/proc/do_conduit_pulse() + var/list/turfs_to_affect = list() + for(var/turf/affected_turf as anything in view(effect_range, loc)) + var/distance = get_dist(loc, affected_turf) + if(!turfs_to_affect["[distance]"]) + turfs_to_affect["[distance]"] = list() + turfs_to_affect["[distance]"] += affected_turf + + for(var/distance in 0 to effect_range) + if(!turfs_to_affect["[distance]"]) + continue + addtimer(CALLBACK(src, PROC_REF(handle_effects), turfs_to_affect["[distance]"]), (1 SECONDS) * distance) + + new /obj/effect/temp_visual/circle_wave/void_conduit(get_turf(src)) + +///Applies the effects of the pulse "hitting" something. Freezes non-heretic, destroys airlocks/windows +/obj/structure/void_conduit/proc/handle_effects(list/turfs) + for(var/turf/affected_turf as anything in turfs) + for(var/atom/thing_to_affect as anything in affected_turf.contents) + + if(isliving(thing_to_affect)) + var/mob/living/affected_mob = thing_to_affect + if(affected_mob.can_block_magic(MAGIC_RESISTANCE)) + continue + if(IS_HERETIC_OR_MONSTER(affected_mob) || HAS_TRAIT(affected_mob, TRAIT_MANSUS_TOUCHED)) + affected_mob.apply_status_effect(/datum/status_effect/void_conduit) + else + affected_mob.apply_status_effect(/datum/status_effect/void_chill, 1) + continue + + if(istype(thing_to_affect, /obj/structure/window) || istype(thing_to_affect, /obj/machinery/door)) + var/list/list_turfs = get_adjacent_turfs(thing_to_affect) + var/findspace = FALSE + for(var/turf/T in list_turfs) // no breaking space-facing things + if(istype(T, /turf/space)) + findspace = TRUE + if(findspace) + continue + if(istype(thing_to_affect, /obj/machinery/door)) + var/obj/machinery/door/affected_door = thing_to_affect + affected_door.disable_door_sparks() + affected_door.take_damage(rand(15, 30)) + + if(istype(thing_to_affect, /obj/structure/window) || istype(thing_to_affect, /obj/structure/grille) || istype(thing_to_affect, /obj/structure/door_assembly) || istype(thing_to_affect, /obj/structure/firelock_frame)) + var/obj/structure/affected_structure = thing_to_affect + affected_structure.take_damage(rand(10, 20)) + +/datum/looping_sound/void_conduit + mid_sounds = 'sound/ambience/ambiatm1.ogg' + mid_length = 1 SECONDS + extra_range = 10 + volume = 40 + falloff_distance = 5 + falloff_exponent = 20 + +/datum/status_effect/void_conduit + id = "void_conduit" + duration = 15 SECONDS + status_type = STATUS_EFFECT_REPLACE + alert_type = null + +/datum/status_effect/void_conduit/on_apply() + ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, type) + return TRUE + +/datum/status_effect/void_conduit/on_remove() + REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, type) + + +/// Visual effect from tg's bioscrambler anomaly +/obj/effect/temp_visual/circle_wave + icon = 'icons/effects/64x64.dmi' + icon_state = "circle_wave" + pixel_x = -16 + pixel_y = -16 + duration = 0.5 SECONDS + color = COLOR_LIME + var/max_alpha = 255 + ///How far the effect would scale in size + var/amount_to_scale = 2 + +/obj/effect/temp_visual/circle_wave/Initialize(mapload) + transform = matrix().Scale(0.1) + animate(src, transform = matrix().Scale(amount_to_scale), time = duration, flags = ANIMATION_PARALLEL) + animate(src, alpha = max_alpha, time = duration * 0.6, flags = ANIMATION_PARALLEL) + animate(alpha = 0, time = duration * 0.4) + apply_wibbly_filters(src) + return ..() + +/obj/effect/temp_visual/circle_wave/void_conduit + color = COLOR_FULL_TONER_BLACK + duration = 12 SECONDS + amount_to_scale = 12 diff --git a/code/modules/antagonists/heretic/magic/void_phase.dm b/code/modules/antagonists/heretic/magic/void_phase.dm new file mode 100644 index 00000000000..47b32d5d78b --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_phase.dm @@ -0,0 +1,79 @@ +/datum/spell/pointed/void_phase + name = "Void Phase" + desc = "Lets you blink to your pointed destination, causes 3x3 aoe damage bubble \ + around your pointed destination and your current location. \ + It has a minimum range of 3 tiles and a maximum range of 9 tiles." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "voidblink" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 40 SECONDS + + invocation = "RE'L'TY PH'S'E." + invocation_type = INVOCATION_WHISPER + + cast_range = 9 + /// The minimum range to cast the phase. + var/min_cast_range = 3 + /// The radius of damage around the void bubble + var/damage_radius = 1 + +/datum/spell/pointed/void_phase/create_new_targeting() + var/datum/spell_targeting/click/T = new + T.click_radius = 0 + T.allowed_type = /turf/simulated + return T + +/datum/spell/pointed/void_phase/valid_target(target, user) + if(get_dist(target, user) < 3) + var/mob/living/living_owner = user + to_chat(living_owner, SPAN_WARNING("That is too close to teleport to!")) + return FALSE + return TRUE + +/datum/spell/pointed/void_phase/cast(list/targets, mob/user) + . = ..() + var/turf/source_turf = get_turf(user) + var/cast_on = targets[1] + var/turf/targeted_turf = get_turf(cast_on) + if(SEND_SIGNAL(user, COMSIG_MOVABLE_TELEPORTING, targeted_turf) & COMPONENT_BLOCK_TELEPORT) + return FALSE + + cause_aoe(source_turf, /obj/effect/temp_visual/voidin, user) + cause_aoe(targeted_turf, /obj/effect/temp_visual/voidout, user) + + user.forceMove(targeted_turf) + +/// Does the AOE effect of the blinka t the passed turf +/datum/spell/pointed/void_phase/proc/cause_aoe(turf/target_turf, effect_type = /obj/effect/temp_visual/voidin, mob/user) + new effect_type(target_turf) + playsound(target_turf, 'sound/magic/voidblink.ogg', 60, FALSE) + for(var/mob/living/living_mob in range(damage_radius, target_turf)) + if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == user) + continue + if(living_mob.can_block_magic(antimagic_flags)) + continue + living_mob.apply_damage(20, BRUTE) + living_mob.apply_status_effect(/datum/status_effect/void_chill, 1) + +/obj/effect/temp_visual/voidin + icon = 'icons/effects/96x96.dmi' + icon_state = "void_blink_in" + alpha = 150 + duration = 6 + pixel_x = -32 + pixel_y = -32 + +/obj/effect/temp_visual/voidout + icon = 'icons/effects/96x96.dmi' + icon_state = "void_blink_out" + alpha = 150 + duration = 6 + pixel_x = -32 + pixel_y = -32 diff --git a/code/modules/antagonists/heretic/magic/void_prison.dm b/code/modules/antagonists/heretic/magic/void_prison.dm new file mode 100644 index 00000000000..03ab17753cd --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_prison.dm @@ -0,0 +1,112 @@ +/datum/spell/pointed/void_prison + name = "Void Prison" + desc = "Sends a heathen into the void for 10 seconds. \ + They will be unable to perform any actions for the duration. \ + Afterwards, they will be chilled and returned to the mortal plane." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "voidball" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + sound = 'sound/magic/voidblink.ogg' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + base_cooldown = 1 MINUTES + cast_range = 3 + + clothes_req = FALSE + sound = null + is_a_heretic_spell = TRUE + invocation = "V''D PR'S'N!" + invocation_type = INVOCATION_SHOUT + + +/datum/spell/pointed/void_prison/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.use_turf_of_user = TRUE + C.allowed_type = /mob/living + C.range = cast_range + C.try_auto_target = FALSE + return C + +/datum/spell/pointed/void_prison/valid_target(target, user) + if(!ismob(target)) + return FALSE + return TRUE + +/datum/spell/pointed/void_prison/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/human/cast_on = targets[1] + if(cast_on.can_block_magic(antimagic_flags)) + cast_on.visible_message( + SPAN_DANGER("A swirling, cold void wraps around [cast_on], but they burst free in a wave of heat!"), + SPAN_DANGER("A yawning void begins to open before you, but a great wave of heat bursts it apart! You are protected!!") + ) + return + cast_on.apply_status_effect(/datum/status_effect/void_prison, "void_stasis") + +/datum/status_effect/void_prison + id = "void_prison" + duration = 10 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/void_prison + ///The overlay that gets applied to whoever has this status active + var/obj/effect/abstract/voidball/stasis_overlay + +/datum/status_effect/void_prison/on_creation(mob/living/new_owner, set_duration) + . = ..() + stasis_overlay = new /obj/effect/abstract/voidball(new_owner) + RegisterSignal(stasis_overlay, COMSIG_PARENT_QDELETING, PROC_REF(clear_overlay)) + new_owner.vis_contents += stasis_overlay + stasis_overlay.animate_opening() + addtimer(CALLBACK(src, PROC_REF(enter_prison), new_owner), 1 SECONDS) + +/datum/status_effect/void_prison/on_remove() + if(!IS_HERETIC(owner)) + owner.apply_status_effect(/datum/status_effect/void_chill, 3) + if(stasis_overlay) + //Free our prisoner + owner.forceMove(get_turf(stasis_overlay)) + stasis_overlay.forceMove(owner) + owner.vis_contents += stasis_overlay + //Animate closing the ball + stasis_overlay.animate_closing() + stasis_overlay.icon_state = "voidball_closed" + QDEL_IN(stasis_overlay, 1.1 SECONDS) + stasis_overlay = null + return ..() + +///Freezes our prisoner in place +/datum/status_effect/void_prison/proc/enter_prison(mob/living/prisoner) + stasis_overlay.forceMove(prisoner.loc) + prisoner.forceMove(stasis_overlay) + +///Makes sure to clear the ref in case the voidball ever suddenly disappears +/datum/status_effect/void_prison/proc/clear_overlay() + SIGNAL_HANDLER + stasis_overlay = null + +//----Voidball effect +/obj/effect/abstract/voidball + icon = 'icons/mob/actions/actions_ecult.dmi' + icon_state = "voidball_effect" + layer = ABOVE_ALL_MOB_LAYER + vis_flags = VIS_INHERIT_ID + invisibility = 0 + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +///Plays a opening animation +/obj/effect/abstract/voidball/proc/animate_opening() + flick("voidball_opening", src) + +///Plays a closing animation +/obj/effect/abstract/voidball/proc/animate_closing() + flick("voidball_closing", src) + +//---- Screen alert +/atom/movable/screen/alert/status_effect/void_prison + name = "Void Prison" + desc = "A Yawning void encases your mortal coil." //Go straight to jail, do not pass GO, do not collect 200$ + icon = 'icons/mob/actions/actions_ecult.dmi' + icon_state = "voidball_effect" diff --git a/code/modules/antagonists/heretic/magic/void_pull.dm b/code/modules/antagonists/heretic/magic/void_pull.dm new file mode 100644 index 00000000000..3e7e96fb8fb --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_pull.dm @@ -0,0 +1,63 @@ +/datum/spell/aoe/void_pull + name = "Void Pull" + desc = "Calls the void, damaging, knocking down, and stunning people nearby. \ + Distant foes are also pulled closer to you (but not damaged)." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "voidpull" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/voidblink.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "BR'NG F'RTH TH'M T' M'." + invocation_type = INVOCATION_WHISPER + + /// The radius of the actual damage circle done before cast + var/damage_radius = 1 + /// The radius of the stun applied to nearby people on cast + var/stun_radius = 4 + +/datum/spell/aoe/void_pull/create_new_targeting() + var/datum/spell_targeting/aoe/targeting = new() + targeting.range = aoe_range + return targeting + +// Before the cast, we do some small AOE damage around the caster +/datum/spell/aoe/void_pull/cast(list/targets, mob/user) + . = ..() + new /obj/effect/temp_visual/voidin(get_turf(user)) + + // Before we cast the actual effects, deal AOE damage to anyone adjacent to us + for(var/mob/living/nearby_living as anything in get_things_to_cast_on(user, damage_radius)) + nearby_living.apply_damage(30, BRUTE) + nearby_living.apply_status_effect(/datum/status_effect/void_chill, 1) + + // Otherwise, they take a few steps closer + for(var/mob/living/living_target in targets) + if(get_dist(living_target, user) < stun_radius) + living_target.KnockDown(3 SECONDS) + for(var/i in 1 to 3) + living_target.forceMove(get_step_towards(living_target, user)) + return TRUE + +/datum/spell/aoe/void_pull/proc/get_things_to_cast_on(atom/center, radius_override = 1) + var/list/things = list() + for(var/mob/living/nearby_mob in view(radius_override || aoe_range, center)) + if(nearby_mob == center) + continue + // Don't grab people who are tucked away or something + if(!isturf(nearby_mob.loc)) + continue + if(IS_HERETIC_OR_MONSTER(nearby_mob)) + continue + if(nearby_mob.can_block_magic(antimagic_flags)) + continue + + things += nearby_mob + + return things diff --git a/code/modules/antagonists/heretic/magic/wave_of_desperation.dm b/code/modules/antagonists/heretic/magic/wave_of_desperation.dm new file mode 100644 index 00000000000..5d09ad58cc1 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/wave_of_desperation.dm @@ -0,0 +1,79 @@ +/datum/spell/aoe/wave_of_desperation + name = "Wave Of Desperation" + desc = "Removes your restraints, repels and knocks down adjacent people, and applies certain effects of the Mansus Grasp upon everything nearby. \ + Cannot be cast unless you are restrained, and the stress renders you unconscious 12 seconds later!" + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "uncuff" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/swap.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 5 MINUTES + + invocation = "F'K 'FF." + invocation_type = INVOCATION_WHISPER + + aoe_range = 3 + +/datum/spell/aoe/wave_of_desperation/create_new_targeting() + var/datum/spell_targeting/aoe/targeting = new() + targeting.range = aoe_range + return targeting + + +// Before the cast, we do some small AOE damage around the caster +/datum/spell/aoe/wave_of_desperation/valid_target(target, user) + if(!ishuman(user)) + return FALSE + var/mob/living/carbon/human/human_user = user + if(!(human_user.handcuffed || human_user.legcuffed)) + return FALSE + return TRUE + +/datum/spell/aoe/wave_of_desperation/cast(list/targets, mob/user) + var/mob/living/carbon/human/human_user = user + if(human_user.handcuffed) + human_user.visible_message(SPAN_DANGER("[human_user.handcuffed] on [human_user] shatter!")) + QDEL_NULL(human_user.handcuffed) + if(human_user.legcuffed) + user.visible_message(SPAN_DANGER("[human_user.legcuffed] on [human_user] shatters!")) + QDEL_NULL(human_user.legcuffed) + + human_user.apply_status_effect(/datum/status_effect/heretic_lastresort) + new /obj/effect/temp_visual/knockblast(get_turf(human_user)) + + for(var/mob/living/victim in get_things_to_cast_on(human_user)) + victim.KnockDown(3 SECONDS) + victim.AdjustWeakened(0.5 SECONDS) + var/our_turf = get_turf(user) + var/throwtarget = get_edge_target_turf(our_turf, get_dir(our_turf, get_step_away(victim, our_turf))) + victim.throw_at(throwtarget, 3, 1) + SEND_SIGNAL(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, victim) + +/datum/spell/aoe/wave_of_desperation/proc/get_things_to_cast_on(atom/center, radius_override) + . = list() + for(var/atom/nearby in orange(center, radius_override ? radius_override : aoe_range)) + if(nearby == center) + continue + if(!ismob(nearby)) + SEND_SIGNAL(center, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, nearby) + continue + var/mob/living/nearby_mob = nearby + if(!isturf(nearby_mob.loc)) + continue + if(IS_HERETIC_OR_MONSTER(nearby_mob)) + continue + if(nearby_mob.can_block_magic(antimagic_flags)) + continue + + . += nearby_mob + + + +/obj/effect/temp_visual/knockblast + icon_state = "shield-flash" + alpha = 180 diff --git a/code/modules/antagonists/heretic/soultrapped_heretic.dm b/code/modules/antagonists/heretic/soultrapped_heretic.dm new file mode 100644 index 00000000000..00c7f3ef706 --- /dev/null +++ b/code/modules/antagonists/heretic/soultrapped_heretic.dm @@ -0,0 +1,37 @@ +///a heretic that got soultrapped by cultists. does nothing, other than signify they suck +/datum/antagonist/soultrapped_heretic + name = "\improper Soultrapped Heretic" + roundend_category = "Heretics" + job_rank = ROLE_HERETIC + antag_hud_name = "heretic" + + +// always failure obj +/datum/objective/heretic_trapped + +/datum/objective/heretic_trapped/New(text, datum/team/team_to_join, datum/mind/_owner) + name = "soultrapped failure" + explanation_text = "Help the cult. Kill the cult. Help the crew. Kill the crew. Help your wielder. Kill your wielder. Kill everyone. Rattle your chains. Break your bindings." + ..() + +/datum/antagonist/soultrapped_heretic/add_owner_to_gamemode() + return + +/datum/antagonist/soultrapped_heretic/remove_owner_from_gamemode() + return + +/datum/antagonist/soultrapped_heretic/on_gain() + ..() + addtimer(CALLBACK(src, PROC_REF(do_objective)), 2 SECONDS) + +/datum/antagonist/soultrapped_heretic/proc/do_objective() + var/datum/objective/epic_fail = new /datum/objective/heretic_trapped() + epic_fail.completed = FALSE + epic_fail.needs_target = FALSE + add_antag_objective(epic_fail) + + +/datum/antagonist/soultrapped_heretic/greet() + var/list/messages = list(SPAN_WARNING("You are the trapped soul of the Heretic you once were. You may attempt to convince your wielders to unbind you, granting you some degree of freedom, and them access to some of your powers. \ + You were enslaved by the cult, but are not a member of it, and retain what remains of your free will. Besides this, there is little to be done but commentary. Try not to get trapped in a locker.")) + return messages diff --git a/code/modules/antagonists/heretic/status_effects/ghoul.dm b/code/modules/antagonists/heretic/status_effects/ghoul.dm new file mode 100644 index 00000000000..18cfdbe7b82 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/ghoul.dm @@ -0,0 +1,95 @@ +/datum/status_effect/ghoul + id = "ghoul" + alert_type = /atom/movable/screen/alert/status_effect/ghoul + /// The new max health value set for the ghoul, if supplied + var/new_max_health + /// What, if any, stamina modifier we applied to the ghoul mob + var/stamina_mod_applied + /// Reference to the master of the ghoul's mind + var/datum/mind/master_mind + /// An optional callback invoked when a ghoul is made (on_apply) + var/datum/callback/on_made_callback + /// An optional callback invoked when a goul is unghouled (on_removed) + var/datum/callback/on_lost_callback + +/datum/status_effect/ghoul/Destroy() + master_mind = null + on_made_callback = null + on_lost_callback = null + return ..() + +/datum/status_effect/ghoul/on_creation( + mob/living/new_owner, + new_max_health, + datum/mind/master_mind, + datum/callback/on_made_callback, + datum/callback/on_lost_callback, +) + + src.new_max_health = new_max_health + src.master_mind = master_mind + src.on_made_callback = on_made_callback + src.on_lost_callback = on_lost_callback + + . = ..() + +/datum/status_effect/ghoul/on_apply() + if(!ishuman(owner)) + return FALSE + + var/mob/living/carbon/human/human_target = owner + + RegisterSignal(human_target, COMSIG_MOB_DEATH, PROC_REF(remove_ghoul_status)) + human_target.revive() // Have to do an admin heal here, otherwise they'll likely just die due to missing organs or limbs + + if(new_max_health) + if(new_max_health < human_target.maxHealth) + if(isnum(stamina_mod_applied)) + stamina_mod_applied = (new_max_health / human_target.maxHealth) + human_target.physiology.stamina_mod *= stamina_mod_applied + human_target.setMaxHealth(new_max_health) + human_target.health = new_max_health + + on_made_callback?.Invoke(human_target) + ADD_TRAIT(human_target, TRAIT_FAKEDEATH, UID()) + human_target.become_husk(MAGIC_TRAIT) + human_target.faction |= "heretic" + + if(human_target.mind) + human_target.mind.add_antag_datum(new /datum/antagonist/mindslave/heretic_monster(master_mind)) + human_target.mind.remove_antag_datum(/datum/antagonist/cultist) + return TRUE + +/datum/status_effect/ghoul/on_remove() + remove_ghoul_status() + return ..() + +/// Removes the ghoul effects from our owner and returns them to normal. +/datum/status_effect/ghoul/proc/remove_ghoul_status(datum/source) + SIGNAL_HANDLER + + if(!ishuman(owner)) + return + var/mob/living/carbon/human/human_target = owner + + if(new_max_health) + if(isnum(stamina_mod_applied)) + human_target.physiology.stamina_mod /= stamina_mod_applied + human_target.setMaxHealth(initial(human_target.maxHealth)) + + on_lost_callback?.Invoke(human_target) + REMOVE_TRAIT(human_target, TRAIT_FAKEDEATH, UID()) + human_target.cure_husk(MAGIC_TRAIT) + human_target.faction -= "heretic" + human_target.mind?.remove_antag_datum(/datum/antagonist/mindslave/heretic_monster) + var/datum/antagonist/heretic/whoetic = master_mind.has_antag_datum(/datum/antagonist/heretic) + LAZYREMOVE(whoetic.list_of_our_monsters, owner.UID()) + + UnregisterSignal(human_target, COMSIG_MOB_DEATH) + if(!QDELETED(src)) + qdel(src) + +/atom/movable/screen/alert/status_effect/ghoul + name = "Flesh Servant" + desc = "You are a Ghoul!" + icon_state = "mind_control" diff --git a/code/modules/antagonists/heretic/status_effects/heretic_buffs.dm b/code/modules/antagonists/heretic/status_effects/heretic_buffs.dm new file mode 100644 index 00000000000..c3f96457a46 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/heretic_buffs.dm @@ -0,0 +1,285 @@ +// POTIONS + +// DUSK AND DAWN +/datum/status_effect/duskndawn + id = "Blessing of Dusk and Dawn" + status_type = STATUS_EFFECT_REFRESH + duration = 90 SECONDS + show_duration = TRUE + alert_type = /atom/movable/screen/alert/status_effect/duskndawn + +/datum/status_effect/duskndawn/on_apply() + ADD_TRAIT(owner, TRAIT_XRAY_VISION, id) + owner.update_sight() + return TRUE + +/datum/status_effect/duskndawn/on_remove() + REMOVE_TRAIT(owner, TRAIT_XRAY_VISION, id) + owner.update_sight() + +// WOUNDED SOLDIER +/datum/status_effect/marshal + id = "Blessing of Wounded Soldier" + status_type = STATUS_EFFECT_REFRESH + duration = 60 SECONDS + show_duration = TRUE + alert_type = /atom/movable/screen/alert/status_effect/marshal + +/datum/status_effect/marshal/on_apply() + ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, id) + return TRUE + +/datum/status_effect/marshal/on_remove() + REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, id) + if(!iscarbon(owner)) + return + var/mob/living/carbon/human/drinker = owner + for(var/obj/item/organ/external/E in drinker.bodyparts) + E.fix_internal_bleeding() + E.fix_burn_wound() + E.mend_fracture() + playsound(drinker, 'sound/effects/ahaha.ogg', 50, TRUE, -1, extrarange = SILENCED_SOUND_EXTRARANGE, frequency = 0.5) + +/datum/status_effect/marshal/tick() + if(!iscarbon(owner)) + return + var/mob/living/carbon/human/carbie = owner + + carbie.adjustBruteLoss(-0.5,updating_health = FALSE, robotic = TRUE) + carbie.adjustFireLoss(-0.5, updating_health = FALSE, robotic = TRUE) + for(var/obj/item/organ/external/E in carbie.bodyparts) + if(E.status & ORGAN_BROKEN | ORGAN_BURNT | ORGAN_INT_BLEEDING) + carbie.adjustBruteLoss(-0.5,updating_health = FALSE, robotic = TRUE) + carbie.adjustFireLoss(-0.5, updating_health = FALSE, robotic = TRUE) + carbie.updatehealth("marshal status effect") + + +/atom/movable/screen/alert/status_effect/duskndawn + name = "Blessing of Dusk and Dawn" + desc = "Many things hide beyond the horizon. With Owl's help I managed to slip past Sun's guard and Moon's watch." + icon_state = "duskndawn" + +/atom/movable/screen/alert/status_effect/marshal + name = "Blessing of Wounded Soldier" + desc = "Some people seek power through redemption. One thing many people don't know is that battle \ + is the ultimate redemption, and wounds let you bask in eternal glory." + icon_state = "wounded_soldier" + +// BLADES + +/// Summons multiple foating knives around the owner. +/// Each knife will block an attack straight up. +/datum/status_effect/protective_blades + id = "Silver Knives" + alert_type = null + status_type = STATUS_EFFECT_MULTIPLE + tick_interval = 0 + /// The number of blades we summon up to. + var/max_num_blades = 4 + /// The radius of the blade's orbit. + var/blade_orbit_radius = 20 + /// The time between spawning blades. + var/time_between_initial_blades = 0.25 SECONDS + /// If TRUE, we self-delete our status effect after all the blades are deleted. + var/delete_on_blades_gone = TRUE + /// What blade type to create + var/obj/effect/floating_blade/blade_type + /// A list of blade effects orbiting / protecting our owner + var/list/obj/effect/floating_blade/blades = list() + +/datum/status_effect/protective_blades/on_creation( + mob/living/new_owner, + new_duration = -1, + max_num_blades = 4, + blade_orbit_radius = 20, + time_between_initial_blades = 0.25 SECONDS, + blade_type = /obj/effect/floating_blade, +) + + src.duration = new_duration + src.max_num_blades = max_num_blades + src.blade_orbit_radius = blade_orbit_radius + src.time_between_initial_blades = time_between_initial_blades + src.blade_type = blade_type + return ..() + +/datum/status_effect/protective_blades/on_apply() + RegisterSignal(owner, COMSIG_HUMAN_CHECK_SHIELDS, PROC_REF(on_shield_reaction)) + for(var/blade_num in 1 to max_num_blades) + var/time_until_created = (blade_num - 1) * time_between_initial_blades + if(time_until_created <= 0) + create_blade() + else + addtimer(CALLBACK(src, PROC_REF(create_blade)), time_until_created) + + return TRUE + +/datum/status_effect/protective_blades/on_remove() + UnregisterSignal(owner, COMSIG_HUMAN_CHECK_SHIELDS) + QDEL_LIST_CONTENTS(blades) + + return ..() + +/// Creates a floating blade, adds it to our blade list, and makes it orbit our owner. +/datum/status_effect/protective_blades/proc/create_blade() + if(QDELETED(src) || QDELETED(owner)) + return + + var/obj/effect/floating_blade/blade = new blade_type(get_turf(owner)) + blades += blade + blade.orbit(owner, blade_orbit_radius) + RegisterSignal(blade, COMSIG_PARENT_QDELETING, PROC_REF(remove_blade)) + playsound(get_turf(owner), 'sound/items/unsheath.ogg', 33, TRUE) + +/// Signal proc for [COMSIG_LIVING_CHECK_BLOCK]. +/// If we have a blade in our list, consume it and block the incoming attack (shield it) +/datum/status_effect/protective_blades/proc/on_shield_reaction( + mob/living/carbon/human/source, + atom/movable/hitby, + attack_text = "the attack", + final_block_chance = 0, + damage = 0, + attack_type = MELEE_ATTACK, + damage_type = BRUTE +) + SIGNAL_HANDLER + + if(!length(blades)) + return + + if(HAS_TRAIT(source, TRAIT_BEING_BLADE_SHIELDED)) + return SHIELD_BLOCK + + ADD_TRAIT(source, TRAIT_BEING_BLADE_SHIELDED, type) + + var/obj/effect/floating_blade/to_remove = blades[1] + + playsound(get_turf(source), 'sound/weapons/parry.ogg', 100, TRUE) + source.visible_message( + SPAN_WARNING("[to_remove] orbiting [source] snaps in front of [attack_text], blocking it before vanishing!"), + SPAN_WARNING("[to_remove] orbiting you snaps in front of [attack_text], blocking it before vanishing!"), + SPAN_HEAR("You hear a clink."), + ) + + qdel(to_remove) + + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(callback_remove_trait), source, TRAIT_BEING_BLADE_SHIELDED, type), 0.1 SECONDS) + + return SHIELD_BLOCK + +/// Remove deleted blades from our blades list properly. +/datum/status_effect/protective_blades/proc/remove_blade(obj/effect/floating_blade/to_remove) + SIGNAL_HANDLER + + if(!(to_remove in blades)) + CRASH("[type] called remove_blade() with a blade that was not in its blades list.") + + to_remove.stop_orbit(owner.get_orbiters()) + blades -= to_remove + + if(!length(blades) && !QDELETED(src) && delete_on_blades_gone) + qdel(src) + + return SHIELD_BLOCK + +/// A subtype that doesn't self-delete / disappear when all blades are gone +/// It instead regenerates over time back to the max after blades are consumed +/datum/status_effect/protective_blades/recharging + delete_on_blades_gone = FALSE + /// The amount of time it takes for a blade to recharge + var/blade_recharge_time = 1 MINUTES + +/datum/status_effect/protective_blades/recharging/on_creation( + mob/living/new_owner, + new_duration = -1, + max_num_blades = 4, + blade_orbit_radius = 20, + time_between_initial_blades = 0.25 SECONDS, + blade_type = /obj/projectile/magic/floating_blade, + blade_recharge_time = 1 MINUTES, +) + + src.blade_recharge_time = blade_recharge_time + return ..() + +/datum/status_effect/protective_blades/recharging/remove_blade(obj/effect/floating_blade/to_remove) + . = ..() + if(!.) + return + + addtimer(CALLBACK(src, PROC_REF(create_blade)), blade_recharge_time) + + +/datum/status_effect/caretaker_refuge + id = "Caretaker’s Last Refuge" + status_type = STATUS_EFFECT_REFRESH + alert_type = null + +/datum/status_effect/caretaker_refuge/on_apply() + animate(owner, alpha = 45,time = 0.5 SECONDS) + owner.set_density(FALSE) + owner.status_flags |= GODMODE + owner.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + RegisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING), PROC_REF(on_focus_lost)) + RegisterSignal(owner, COMSIG_MOB_BEFORE_SPELL_CAST, PROC_REF(prevent_spell_usage)) + RegisterSignal(owner, COMSIG_ATOM_HOLY_ATTACK, PROC_REF(nullrod_handler)) + + ADD_TRAIT(owner, TRAIT_HANDS_BLOCKED, id) + ADD_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + return TRUE + +/datum/status_effect/caretaker_refuge/on_remove() + owner.alpha = initial(owner.alpha) + owner.density = initial(owner.density) + owner.mouse_opacity = initial(owner.mouse_opacity) + owner.status_flags &= ~GODMODE + UnregisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING)) + UnregisterSignal(owner, COMSIG_MOB_BEFORE_SPELL_CAST) + UnregisterSignal(owner, COMSIG_ATOM_HOLY_ATTACK) + REMOVE_TRAIT(owner, TRAIT_HANDS_BLOCKED, id) + REMOVE_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + owner.visible_message( + SPAN_WARNING("The haze around [owner] disappears, leaving them materialized!"), + SPAN_NOTICE("You exit the refuge."), + ) + +/datum/status_effect/caretaker_refuge/proc/nullrod_handler(datum/source, obj/item/weapon) + SIGNAL_HANDLER + playsound(get_turf(owner), 'sound/effects/curse/curse1.ogg', 80, TRUE) + owner.visible_message(SPAN_WARNING("[weapon] repels the haze around [owner]!")) + owner.remove_status_effect(type) + +/datum/status_effect/caretaker_refuge/proc/on_focus_lost() + SIGNAL_HANDLER + to_chat(owner, SPAN_DANGER("Without a focus, your refuge weakens and dissipates!")) + qdel(src) + +/datum/status_effect/caretaker_refuge/proc/prevent_spell_usage(datum/source, datum/spell) + SIGNAL_HANDLER + if(!istype(spell, /datum/spell/caretaker)) + to_chat(owner, SPAN_DANGER("You can not cast a spell in refuge!")) + return SPELL_CANCEL_CAST + + +// Path Of Moon status effect which hides the identity of the heretic +/datum/status_effect/moon_grasp_hide + id = "Moon Grasp Hide Identity" + status_type = STATUS_EFFECT_REFRESH + duration = 15 SECONDS + show_duration = TRUE + alert_type = /atom/movable/screen/alert/status_effect/moon_grasp_hide + +/datum/status_effect/moon_grasp_hide/on_apply() + ADD_TRAIT(owner, TRAIT_UNKNOWN, id) + ADD_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + return ..() + +/datum/status_effect/moon_grasp_hide/on_remove() + REMOVE_TRAIT(owner, TRAIT_UNKNOWN, id) + REMOVE_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + +/atom/movable/screen/alert/status_effect/moon_grasp_hide + name = "Blessing of The Moon" + desc = "The Moon clouds their vision, as the sun always has yours." + icon_state = "moon_hide" + diff --git a/code/modules/antagonists/heretic/status_effects/heretic_debuffs.dm b/code/modules/antagonists/heretic/status_effects/heretic_debuffs.dm new file mode 100644 index 00000000000..b5a286cc998 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/heretic_debuffs.dm @@ -0,0 +1,362 @@ +// MARK: AMOK +/datum/status_effect/amok + id = "amok" + status_type = STATUS_EFFECT_REPLACE + alert_type = null + duration = 10 SECONDS + +/datum/status_effect/amok/on_apply(mob/living/afflicted) + to_chat(owner, SPAN_BOLDWARNING("You feel filled with a rage that is not your own!")) + return TRUE + +/datum/status_effect/amok/tick(seconds_between_ticks) + var/last_intent = owner.a_intent + owner.a_intent = INTENT_HARM + + // If we're holding a gun, expand the range a bit. + // Otherwise, just look for adjacent targets + var/search_radius = isgun(owner.get_active_hand()) ? 3 : 1 + + var/list/mob/living/targets = list() + for(var/mob/living/potential_target in oview(owner, search_radius)) + if(IS_HERETIC_OR_MONSTER(potential_target)) + continue + targets += potential_target + + if(LAZYLEN(targets)) + var/poor_smuck = pick(targets) + add_attack_logs(owner, poor_smuck, "attacked [poor_smuck] due to the amok debuff.", ATKLOG_FEW) + owner.ClickOn(poor_smuck) + owner.a_intent = last_intent + +// MARK: Cloudstruck +/datum/status_effect/cloudstruck + id = "cloudstruck" + status_type = STATUS_EFFECT_REPLACE + alert_type = null + duration = 3 SECONDS + on_remove_on_mob_delete = TRUE + ///This overlay is applied to the owner for the duration of the effect. + var/static/mutable_appearance/mob_overlay + +/datum/status_effect/cloudstruck/on_creation(mob/living/new_owner, duration = 10 SECONDS) + src.duration = duration + if(!mob_overlay) + mob_overlay = mutable_appearance('icons/effects/eldritch.dmi', "cloud_swirl", ABOVE_MOB_LAYER) + return ..() + +/datum/status_effect/cloudstruck/on_apply() + owner.add_overlay(mob_overlay) + owner.become_blind(id) + return TRUE + +/datum/status_effect/cloudstruck/on_remove() + owner.cure_blind(id) + owner.cut_overlay(mob_overlay) + +// MARK: Starmark +/datum/status_effect/star_mark + id = "star_mark" + alert_type = /atom/movable/screen/alert/status_effect/star_mark + duration = 30 SECONDS + status_type = STATUS_EFFECT_REFRESH + ///overlay used to indicate that someone is marked + var/mutable_appearance/cosmic_overlay + /// icon file for the overlay + var/effect_icon = 'icons/effects/eldritch.dmi' + /// icon state for the overlay + var/effect_icon_state = "cosmic_ring" + /// Storage for the spell caster + var/spell_caster + +/atom/movable/screen/alert/status_effect/star_mark + name = "Star Mark" + desc = "A ring above your head prevents you from entering cosmic fields or teleporting through cosmic runes..." + icon_state = "star_mark" + +/datum/status_effect/star_mark/on_creation(mob/living/new_owner, mob/living/new_spell_caster) + if(new_spell_caster) + spell_caster = new_spell_caster.UID() + return ..() + +/datum/status_effect/star_mark/Destroy() + return ..() + +/datum/status_effect/star_mark/on_apply() + if(istype(owner, /mob/living/basic/heretic_summon/star_gazer)) + return FALSE + var/mob/living/spell_caster_resolved = locateUID(spell_caster) + var/datum/antagonist/mindslave/heretic_monster/monster = owner.mind?.has_antag_datum(/datum/antagonist/mindslave/heretic_monster) + if(spell_caster_resolved && monster) + if(monster.master?.current == spell_caster_resolved) + return FALSE + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_owner_overlay)) + owner.update_appearance(UPDATE_OVERLAYS) + return TRUE + +/// Updates the overlay of the owner +/datum/status_effect/star_mark/proc/update_owner_overlay(atom/source, list/overlays) + SIGNAL_HANDLER + + if(!cosmic_overlay) + cosmic_overlay = mutable_appearance(effect_icon, effect_icon_state, BELOW_MOB_LAYER) + source.add_overlay(cosmic_overlay) + +/datum/status_effect/star_mark/on_remove() + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + owner.cut_overlay(cosmic_overlay) + owner.update_appearance(UPDATE_OVERLAYS) + QDEL_NULL(cosmic_overlay) + return ..() + +/datum/status_effect/star_mark/extended + duration = 3 MINUTES + +// MARK: Last Resort +/datum/status_effect/heretic_lastresort + id = "heretic_lastresort" + alert_type = /atom/movable/screen/alert/status_effect/heretic_lastresort + duration = 12 SECONDS + status_type = STATUS_EFFECT_REPLACE + tick_interval = 0 + +/atom/movable/screen/alert/status_effect/heretic_lastresort + name = "Last Resort" + desc = "Your head spins, heart pumping as fast as it can, losing the fight with the ground. Run to safety!" + icon_state = "lastresort" + +/datum/status_effect/heretic_lastresort/on_apply() + ADD_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + to_chat(owner, SPAN_USERDANGER("You are on the brink of losing consciousness, run!")) + return TRUE + +/datum/status_effect/heretic_lastresort/on_remove() + REMOVE_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + owner.Paralyse(20 SECONDS, TRUE) //Stun immunity will not save you, pay the price of magic + + +// MARK: Moon Conversion +/// Used by moon heretics to make people mad +/datum/status_effect/moon_converted + id = "moon converted" + alert_type = /atom/movable/screen/alert/status_effect/moon_converted + status_type = STATUS_EFFECT_REPLACE + ///used to track damage + var/damage_sustained = 0 + ///overlay used to indicate that someone is marked + var/mutable_appearance/moon_insanity_overlay + /// icon file for the overlay + var/effect_icon = 'icons/effects/eldritch.dmi' + /// icon state for the overlay + var/effect_icon_state = "moon_insanity_overlay" + +/datum/status_effect/moon_converted/on_creation() + moon_insanity_overlay = mutable_appearance(effect_icon, effect_icon_state, ABOVE_MOB_LAYER) + owner.update_appearance(UPDATE_OVERLAYS) + . = ..() + +/datum/status_effect/moon_converted/Destroy() + to_chat(owner, chat_box_notice(SPAN_DANGER("You have been freed from the Moon's influence and regain your senses."))) + return ..() + +/datum/status_effect/moon_converted/on_apply() + RegisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + // Heals them so people who are in crit can have this affect applied on them and still be of some use for the heretic + owner.adjustBruteLoss(-100) + owner.adjustFireLoss(-100) + + var/list/messages = list() + messages.Add(SPAN_USERDANGER("THE MOON SHOWS YOU THE TRUTH AND THE LIARS WISH TO COVER IT, SLAY THEM ALL!!!")) + messages.Add(SPAN_WARNING("Attack everyone you can see (besides your enlightener) without discrimination!")) + to_chat(owner, chat_box_red(messages.Join("
"))) + + owner.Paralyse(5 SECONDS) + ADD_TRAIT(owner, TRAIT_MUTE, src.UID()) + owner.add_overlay(moon_insanity_overlay) + owner.update_appearance(UPDATE_OVERLAYS) + return TRUE + +/datum/status_effect/moon_converted/proc/on_damaged(datum/source, damage, damagetype) + SIGNAL_HANDLER + + // Stamina damage is funky so we will ignore it + if(damagetype == STAMINA) + return + + damage_sustained += damage + + if(damage_sustained < 60) + return + + qdel(src) + +/datum/status_effect/moon_converted/on_remove() + // Span warning to help realize they aren't evil anymore + REMOVE_TRAIT(owner, TRAIT_MUTE, src.UID()) + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + UnregisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + owner.cut_overlay(moon_insanity_overlay) + owner.update_icon() + QDEL_NULL(moon_insanity_overlay) + return ..() + + +/atom/movable/screen/alert/status_effect/moon_converted + name = "Moon Converted" + desc = "They LIE, SLAY ALL OF THE THEM!!! THE LIARS OF THE SUN MUST FALL!!!" + icon_state = "moon_insanity" + +/mob/living/proc/apply_necropolis_curse(set_curse) + var/datum/status_effect/necropolis_curse/C = has_status_effect(/datum/status_effect/necropolis_curse) + if(QDELETED(C)) + apply_status_effect(/datum/status_effect/necropolis_curse, set_curse) + else + C.duration += 3000 //time added by additional curses + return C + +// MARK: Necropolis curse +/datum/status_effect/necropolis_curse + id = "necrocurse" + duration = 10 MINUTES //you're cursed for 10 minutes have fun + tick_interval = 5 SECONDS + alert_type = null + var/curse_flags = NONE + var/effect_last_activation = 0 + var/effect_cooldown = 100 + var/obj/effect/temp_visual/curse/wasting_effect = new + +/datum/status_effect/necropolis_curse/on_creation(mob/living/new_owner, set_curse) + . = ..() + owner.overlay_fullscreen("curse", /atom/movable/screen/fullscreen/stretch/curse, 1) + + +/datum/status_effect/necropolis_curse/on_remove() + owner.clear_fullscreen("curse", 50) + +/datum/status_effect/necropolis_curse/tick(seconds_between_ticks) + if(owner.stat == DEAD) + return + if(effect_last_activation <= world.time) + effect_last_activation = world.time + effect_cooldown + var/grab_dir = turn(owner.dir, pick(-90, 90, 180, 180)) //grab them from a random direction other than the one faced, favoring grabbing from behind + var/turf/spawn_turf = get_ranged_target_turf(owner, grab_dir, 5) + if(spawn_turf) + grasp(spawn_turf) + +/datum/status_effect/necropolis_curse/proc/grasp(turf/spawn_turf) + set waitfor = FALSE + new/obj/effect/temp_visual/dir_setting/curse/grasp_portal(spawn_turf, owner.dir) + playsound(spawn_turf, 'sound/effects/curse/curse2.ogg', 80, TRUE, -1) + var/obj/projectile/curse_hand/C = new (spawn_turf) + C.preparePixelProjectile(owner, spawn_turf) + if(QDELETED(C)) // safety check if above fails - above has a stack trace if it does fail + return + C.fire() + +/obj/effect/temp_visual/curse + icon_state = "curse" + +/obj/effect/temp_visual/curse/Initialize(mapload) + . = ..() + deltimer(timerid) + +// MARK: Broken Blade +/datum/status_effect/broken_blade + id = "broken_blade" + duration = 150 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/broken_blade + status_type = STATUS_EFFECT_REPLACE + show_duration = TRUE + +/datum/status_effect/broken_blade/on_creation(mob/living/new_owner, new_icon_state) + . = ..() + linked_alert.icon_state = new_icon_state + +/atom/movable/screen/alert/status_effect/broken_blade + name = "Broken Blade" + desc = "You have broken one of the blades of the Mansus. They will not loan you another for a while." + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "eldritch_blade" + +// MARK: Insanity +/datum/status_effect/stacking/heretic_insanity + id = "insanity" + on_remove_on_mob_delete = TRUE + status_type = STATUS_EFFECT_REFRESH + tick_interval = 25 SECONDS + consumed_on_threshold = FALSE + stack_threshold = 21 // no threshold + max_stacks = 20 + alert_type = /atom/movable/screen/alert/status_effect/insanity + +/datum/status_effect/stacking/heretic_insanity/on_creation(mob/living/new_owner, stacks_to_apply = 1) + . = ..() + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_stacks_overlay)) + add_stacks(stacks_to_apply) + +/datum/status_effect/stacking/heretic_insanity/Destroy() + animate_fade_colored(owner, 2 SECONDS) + . = ..() + +/datum/status_effect/stacking/heretic_insanity/refresh() + . = ..() + add_stacks(1) + owner.update_icon(UPDATE_OVERLAYS) + +/datum/status_effect/stacking/heretic_insanity/process() + update_shown_stacks() + update_greyscale() + owner.update_icon(UPDATE_OVERLAYS) + return ..() + +/datum/status_effect/stacking/heretic_insanity/proc/update_greyscale() + var/stack_intensity = 1 - (0.66 * (stacks / max_stacks)) + var/inverse_intensity = 0.33 * (stacks / max_stacks) + var/custom_greyscale = list(stack_intensity, inverse_intensity, inverse_intensity,\ + inverse_intensity, stack_intensity, inverse_intensity,\ + inverse_intensity, inverse_intensity, stack_intensity) + animate(owner, color = custom_greyscale, time = 2 SECONDS, easing = SINE_EASING, flags = ANIMATION_PARALLEL) + +/datum/status_effect/stacking/heretic_insanity/proc/update_stacks_overlay(atom/parent_atom, list/overlays) + SIGNAL_HANDLER + + linked_alert?.update_appearance(UPDATE_ICON_STATE|UPDATE_DESC) + +/datum/status_effect/stacking/heretic_insanity/proc/update_shown_stacks() + if(!linked_alert) + return + + linked_alert.maptext = MAPTEXT_TINY_UNICODE("[stacks]") + +//---- Screen alert +/atom/movable/screen/alert/status_effect/insanity + name = "Moon's Light" + desc = "The light is so bright, it dulls your senses and eats at your mind." + icon_state = "insanity_minor" + +/atom/movable/screen/alert/status_effect/insanity/update_icon_state() + . = ..() + if(!istype(attached_effect, /datum/status_effect/stacking/heretic_insanity)) + return + var/datum/status_effect/stacking/heretic_insanity/insanity_effect = attached_effect + if(insanity_effect.stacks < 6) + icon_state = initial(icon_state) + if(insanity_effect.stacks >= 6) + icon_state = "insanity_moderate" + if(insanity_effect.stacks >= 14) + icon_state = "insanity_full" + +/atom/movable/screen/alert/status_effect/insanity/update_desc(updates) + . = ..() + if(!istype(attached_effect, /datum/status_effect/stacking/heretic_insanity)) + return + var/datum/status_effect/stacking/heretic_insanity/insanity_effect = attached_effect + if(insanity_effect.stacks < 6) + desc = initial(desc) + if(insanity_effect.stacks >= 6) + desc = "The light is blindingly white! \ + The moon calls for the true nature of your soul!" + if(insanity_effect.stacks >= 14) + desc = "Light LEAKS through the CRACKS. \ + My mind is BRIGHTER than it EVER was. \ + THE HIGHER I RISE THE MORE I SEE." diff --git a/code/modules/antagonists/heretic/status_effects/mark_effects.dm b/code/modules/antagonists/heretic/status_effects/mark_effects.dm new file mode 100644 index 00000000000..fe11897d0c0 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/mark_effects.dm @@ -0,0 +1,259 @@ +/datum/status_effect/eldritch + id = "heretic_mark" + duration = 15 SECONDS + status_type = STATUS_EFFECT_REPLACE + alert_type = null + on_remove_on_mob_delete = TRUE + ///underlay used to indicate that someone is marked + var/mutable_appearance/marked_underlay + /// icon file for the underlay + var/effect_icon = 'icons/effects/eldritch.dmi' + /// icon state for the underlay + var/effect_icon_state = "" + +/datum/status_effect/eldritch/on_creation(mob/living/new_owner, ...) + marked_underlay = mutable_appearance(effect_icon, effect_icon_state, BELOW_MOB_LAYER) + return ..() + +/datum/status_effect/eldritch/on_apply() + if(owner.mob_size >= MOB_SIZE_HUMAN) + owner.add_overlay(marked_underlay) + owner.update_icon(UPDATE_OVERLAYS) + return TRUE + return FALSE + +/datum/status_effect/eldritch/on_remove() + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + owner.cut_overlay(marked_underlay) + owner.update_icon(UPDATE_OVERLAYS) + QDEL_NULL(marked_underlay) + return ..() + +/** + * Called when the mark is activated by the heretic. + */ +/datum/status_effect/eldritch/proc/on_effect() + SHOULD_CALL_PARENT(TRUE) + + playsound(owner, 'sound/magic/repulse.ogg', 75, TRUE) + qdel(src) //what happens when this is procced. + +//Each mark has different effects when it is destroyed that combine with the mansus grasp effect. + +// MARK OF FLESH + +/datum/status_effect/eldritch/flesh + effect_icon_state = "emark1" + +/datum/status_effect/eldritch/flesh/on_effect() + if(ishuman(owner)) + var/mob/living/carbon/human/human_owner = owner + human_owner.bleed(75) + + return ..() + +// MARK OF ASH + +/datum/status_effect/eldritch/ash + effect_icon_state = "emark2" + /// Dictates how much stamina and burn damage the mark will cause on trigger. + var/repetitions = 1 + +/datum/status_effect/eldritch/ash/on_creation(mob/living/new_owner, repetition = 5) + . = ..() + src.repetitions = max(1, repetition) + +/datum/status_effect/eldritch/ash/on_effect() + if(!iscarbon(owner)) + return ..() + + var/mob/living/carbon/carbon_owner = owner + carbon_owner.apply_damage(6 * repetitions, STAMINA)// first one = 30 stam + carbon_owner.adjustFireLoss(3 * repetitions) // first one = 15 burn + for(var/mob/living/carbon/victim in shuffle(range(1, carbon_owner))) + if(IS_HERETIC(victim) || victim == carbon_owner) + continue + victim.apply_status_effect(type, repetitions - 1) + break + return ..() + +// MARK OF RUST + +/datum/status_effect/eldritch/rust + effect_icon_state = "emark3" + +/datum/status_effect/eldritch/rust/on_effect() + owner.adjust_disgust(10 SECONDS) + owner.AdjustConfused(10 SECONDS) + return ..() + +// MARK OF VOID + +/datum/status_effect/eldritch/void + effect_icon_state = "emark4" + +/datum/status_effect/eldritch/void/on_effect() + owner.apply_status_effect(/datum/status_effect/void_chill, 3) + owner.Silence(10 SECONDS) + return ..() + +// MARK OF BLADES + +/datum/status_effect/eldritch/blade + effect_icon_state = "emark5" + /// If set, the owner of the status effect will not be able to leave this area. + var/area/locked_to + +/datum/status_effect/eldritch/blade/Destroy() + locked_to = null + return ..() + +/datum/status_effect/eldritch/blade/on_apply() + . = ..() + RegisterSignal(owner, COMSIG_MOVABLE_TELEPORTING, PROC_REF(on_teleport)) + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + +/datum/status_effect/eldritch/blade/on_remove() + UnregisterSignal(owner, list( + COMSIG_MOVABLE_TELEPORTING, + COMSIG_MOVABLE_MOVED, + )) + + return ..() + +/// Checks if the movement from moving_from to going_to leaves our [var/locked_to] area. Returns TRUE if so. +/datum/status_effect/eldritch/blade/proc/is_escaping_locked_area(atom/moving_from, atom/going_to) + if(!locked_to) + return FALSE + + // If moving_from isn't in our locked area, it means they've + // somehow completely escaped, so we'll opt not to act on them. + if(get_area(moving_from) != locked_to) + return FALSE + + // If going_to is in our locked area, + // they're just moving within the area like normal. + if(get_area(going_to) == locked_to) + return FALSE + + return TRUE + + +/// Signal proc for [COMSIG_MOVABLE_TELEPORTED] that blocks any teleports from our locked area. +/datum/status_effect/eldritch/blade/proc/on_teleport(mob/living/source, atom/destination, channel) + SIGNAL_HANDLER + + if(!is_escaping_locked_area(source, destination)) + return + + to_chat(source, SPAN_HIEROPHANT_WARNING("An otherworldly force prevents your escape from [get_area_name(locked_to)]!")) + + source.Stun(1 SECONDS) + return COMPONENT_BLOCK_TELEPORT + +/// Signal proc for [COMSIG_MOVABLE_MOVED] that blocks any movement out of our locked area +/datum/status_effect/eldritch/blade/proc/on_move(mob/living/source, turf/old_loc, movement_dir, forced) + SIGNAL_HANDLER + + // Let's not mess with heretics dragging a potential victim. + if(ismob(source.pulledby) && IS_HERETIC(source.pulledby)) + return + + // If the movement's forced, just let it happen regardless. + if(forced || !is_escaping_locked_area(old_loc, source)) + return + + to_chat(source, SPAN_HIEROPHANT_WARNING("An otherworldly force prevents your escape from [get_area_name(locked_to)]!")) + + var/turf/further_behind_old_loc = get_edge_target_turf(old_loc, REVERSE_DIR(movement_dir)) + + source.Stun(1 SECONDS) + source.throw_at(further_behind_old_loc, 3, 1) // Keeping this gentle so they don't smack into the heretic max speed + +/datum/status_effect/eldritch/cosmic + effect_icon_state = "emark6" + /// For storing the location when the mark got applied. + var/obj/effect/cosmic_diamond/cosmic_diamond + /// Effect when triggering mark. + var/obj/effect/teleport_effect = /obj/effect/temp_visual/cosmic_cloud + +/datum/status_effect/eldritch/cosmic/on_creation(mob/living/new_owner) + . = ..() + cosmic_diamond = new(get_turf(owner)) + +/datum/status_effect/eldritch/cosmic/Destroy() + QDEL_NULL(cosmic_diamond) + return ..() + +/datum/status_effect/eldritch/cosmic/on_effect() + new teleport_effect(get_turf(owner)) + new /obj/effect/forcefield/cosmic_field(get_turf(owner)) + owner.forceMove(get_turf(cosmic_diamond)) + new teleport_effect(get_turf(owner)) + owner.Weaken(2 SECONDS) + return ..() + +// MARK OF LOCK + +/datum/status_effect/eldritch/lock + effect_icon_state = "emark7" + duration = 10 SECONDS + +/datum/status_effect/eldritch/lock/on_apply() + . = ..() + RegisterSignal(owner, COMSIG_MOB_TRIED_ACCESS, PROC_REF(attempt_access)) + +/datum/status_effect/eldritch/lock/on_remove() + UnregisterSignal(owner, COMSIG_MOB_TRIED_ACCESS) + return ..() + +/datum/status_effect/eldritch/lock/proc/attempt_access(datum/source, obj/door_attempt) + SIGNAL_HANDLER + return ACCESS_DISALLOWED + +// MARK OF MOON + +/datum/status_effect/eldritch/moon + effect_icon_state = "emark8" + ///Used for checking if the pacifism effect should end early + var/damage_sustained = 0 + +/datum/status_effect/eldritch/moon/on_apply() + . = ..() + if(owner.can_block_magic(MAGIC_RESISTANCE_MIND)) + return FALSE + ADD_TRAIT(owner, TRAIT_PACIFISM, id) + owner.emote(pick("giggle", "laugh")) + to_chat(owner, SPAN_HIEROPHANT_WARNING("You feel unable to hurt a soul!")) + RegisterSignal (owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + return TRUE + +/// Checks for damage so the heretic can't just attack them with another weapon whilst they are unable to fight back +/datum/status_effect/eldritch/moon/proc/on_damaged(datum/source, damage, damagetype) + SIGNAL_HANDLER + + // The grasp itself deals stamina damage so we will ignore it + if(damagetype == STAMINA) + return + + damage_sustained += damage + + if(damage_sustained < 15) + return + + // Removes the trait in here since we don't wanna destroy the mark before its detonated or allow detonation triggers with other weapons + REMOVE_TRAIT(owner, TRAIT_PACIFISM, id) + to_chat(owner, SPAN_HIEROPHANT("You feel your pacifism has left!")) + +/datum/status_effect/eldritch/moon/on_effect() + owner.AdjustConfused(30 SECONDS) + owner.apply_status_effect(/datum/status_effect/stacking/heretic_insanity, 2) + owner.emote(pick("giggle", "laugh")) + return ..() + +/datum/status_effect/eldritch/moon/on_remove() + . = ..() + UnregisterSignal (owner, COMSIG_MOB_APPLY_DAMAGE) + + // In case the trait was not removed earlier + REMOVE_TRAIT(owner, TRAIT_PACIFISM, id) diff --git a/code/modules/antagonists/heretic/status_effects/void_chill.dm b/code/modules/antagonists/heretic/status_effects/void_chill.dm new file mode 100644 index 00000000000..0ccc6a7dec4 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/void_chill.dm @@ -0,0 +1,107 @@ +/*! + * Contains the "Void Chill" status effect. Harmful debuff which freezes and slows down non-heretics + * Cannot affect silicons (How are you gonna freeze a robot?) + */ +/datum/status_effect/void_chill + id = "void_chill" + duration = 30 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/void_chill + status_type = STATUS_EFFECT_REFRESH + on_remove_on_mob_delete = TRUE + ///Current amount of stacks we have + var/stacks + ///Maximum of stacks that we could possibly get + var/stack_limit = 5 + ///icon for the overlay + var/image/stacks_overlay + +/datum/status_effect/void_chill/on_creation(mob/living/new_owner, new_stacks, ...) + . = ..() + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_stacks_overlay)) + set_stacks(new_stacks) + owner.add_atom_colour(COLOR_BLUE_LIGHT, TEMPORARY_COLOUR_PRIORITY) + owner.update_icon(UPDATE_OVERLAYS) + +/datum/status_effect/void_chill/on_apply() + if(issilicon(owner)) + return FALSE + return TRUE + +/datum/status_effect/void_chill/on_remove() + owner.update_icon(UPDATE_OVERLAYS) + owner.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, COLOR_BLUE_LIGHT) + owner.remove_alt_appearance("heretic_status") + REMOVE_TRAIT(owner, TRAIT_HYPOTHERMIC, src.UID()) + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + +/datum/status_effect/void_chill/tick() + owner.adjust_bodytemperature(-6 * stacks) + +/datum/status_effect/void_chill/refresh(mob/living/new_owner, new_stacks, forced = FALSE) + . = ..() + if(forced) + set_stacks(new_stacks) + else + adjust_stacks(new_stacks) + owner.update_icon(UPDATE_OVERLAYS) + +///Updates the overlay that gets applied on our victim +/datum/status_effect/void_chill/proc/update_stacks_overlay(atom/parent_atom, list/overlays) + SIGNAL_HANDLER + + linked_alert?.update_appearance(UPDATE_ICON_STATE|UPDATE_DESC) + owner.remove_alt_appearance("heretic_status") + stacks_overlay = image('icons/effects/effects.dmi', owner, "void_chill_partial") + if(stacks >= 5) + stacks_overlay = image('icons/effects/effects.dmi', owner, "void_chill_oh_fuck") + owner.add_alt_appearance("heretic_status", stacks_overlay, owner) + +/** + * Setter and adjuster procs for stacks + * + * Arguments: + * - new_stacks + * + */ + +/datum/status_effect/void_chill/proc/set_stacks(new_stacks) + stacks = max(0, min(stack_limit, new_stacks)) + update_movespeed(stacks) + +/datum/status_effect/void_chill/proc/adjust_stacks(new_stacks) + stacks = max(0, min(stack_limit, stacks + new_stacks)) + update_movespeed(stacks) + if(stacks >= 5) + ADD_TRAIT(owner, TRAIT_HYPOTHERMIC, src.UID()) + + +///Updates the movespeed of owner based on the amount of stacks of the debuff +/datum/status_effect/void_chill/proc/update_movespeed(stacks) + linked_alert.maptext = MAPTEXT_TINY_UNICODE("[stacks]") + if(stacks >= 5 && (!ishuman(owner) || HAS_TRAIT(owner, TRAIT_RESISTCOLD))) // Everyone will feel the cold. + owner.SetSlowed(30 SECONDS, 1) //Debuff always lasts 30 seconds, and is refreshed when stacks are updated. QED, the slow should always be set to 30 seconds + +/datum/status_effect/void_chill/lasting + id = "lasting_void_chill" + +//---- Screen alert +/atom/movable/screen/alert/status_effect/void_chill + name = "Void Chill" + desc = "There's something freezing you from within and without. You've never felt cold this oppressive before..." + icon_state = "void_chill_minor" + +/atom/movable/screen/alert/status_effect/void_chill/update_icon_state() + . = ..() + if(!istype(attached_effect, /datum/status_effect/void_chill)) + return + var/datum/status_effect/void_chill/chill_effect = attached_effect + if(chill_effect.stacks >= 5) + icon_state = "void_chill_oh_fuck" + +/atom/movable/screen/alert/status_effect/void_chill/update_desc(updates) + . = ..() + if(!istype(attached_effect, /datum/status_effect/void_chill)) + return + var/datum/status_effect/void_chill/chill_effect = attached_effect + if(chill_effect.stacks >= 5) + desc = "You had your chance to run, now it's too late. You may never feel warmth again..." diff --git a/code/modules/antagonists/heretic/structures/carving_knife.dm b/code/modules/antagonists/heretic/structures/carving_knife.dm new file mode 100644 index 00000000000..b081c91a8fb --- /dev/null +++ b/code/modules/antagonists/heretic/structures/carving_knife.dm @@ -0,0 +1,328 @@ +// The rune carver, a heretic knife that can draw rune traps. +/obj/item/melee/rune_carver + name = "carving knife" + desc = "A small knife made of cold steel, pure and perfect. Its sharpness can carve into titanium itself - \ + but only few can evoke the dangers that lurk beneath reality." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "rune_carver" + sharp = TRUE + w_class = WEIGHT_CLASS_SMALL + force = 10 + throwforce = 20 + hitsound = 'sound/weapons/bladeslice.ogg' + attack_verb = list("attacks", "slashes", "slices", "tears", "lacerates", "rips", "dices", "rends") + actions_types = list(/datum/action/item_action/rune_shatter) + throw_speed = 4 + embedded_pain_multiplier = 5 + w_class = WEIGHT_CLASS_SMALL + embed_chance = 75 + embedded_fall_chance = 2 + new_attack_chain = TRUE + + /// Whether we're currently drawing a rune + var/drawing = FALSE + /// Max amount of runes that can be drawn + var/max_rune_amt = 3 + /// A list of uid's to all of ourc urrent runes + var/list/current_runes = list() + + +/obj/item/melee/rune_carver/examine(mob/user) + . = ..() + for(var/rune_ref as anything in current_runes) + if(!locateUID(rune_ref)) + current_runes -= rune_ref + if(!IS_HERETIC_OR_MONSTER(user) && !isobserver(user)) + return + + . += SPAN_NOTICE("[length(current_runes)] / [max_rune_amt] total carvings have been drawn.") + . += SPAN_INFO("The following runes can be carved:") + for(var/obj/structure/trap/eldritch/trap as anything in subtypesof(/obj/structure/trap/eldritch)) + var/potion_string = SPAN_NOTICE("\tThe " + initial(trap.name) + " - " + initial(trap.carver_tip) + "") + . += potion_string + +/obj/item/melee/rune_carver/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(!IS_HERETIC_OR_MONSTER(user)) + return NONE + if(!isfloorturf(interacting_with)) + return NONE + + INVOKE_ASYNC(src, PROC_REF(try_carve_rune), interacting_with, user) + return ITEM_INTERACT_COMPLETE + +/* + * Begin trying to carve a rune. Go through a few checks, then call do_carve_rune if successful. + */ +/obj/item/melee/rune_carver/proc/try_carve_rune(turf/target_turf, mob/user) + if(drawing) + to_chat(user, SPAN_HIEROPHANT_WARNING("You are already carving.")) + return + + if(locate(/obj/structure/trap/eldritch) in range(1, target_turf)) + to_chat(user, SPAN_HIEROPHANT_WARNING("You are too close to another carving!")) + return + + for(var/rune_ref as anything in current_runes) + if(!locateUID(rune_ref)) + current_runes -= rune_ref + + if(length(current_runes) >= max_rune_amt) + to_chat(user, SPAN_HIEROPHANT_WARNING("This knife has too many active carvings!")) + return + + drawing = TRUE + do_carve_rune(target_turf, user) + drawing = FALSE + +/* + * The actual proc that handles selecting the rune to draw and creating it. + */ +/obj/item/melee/rune_carver/proc/do_carve_rune(turf/target_turf, mob/user) + // Assoc list of [name] to [image] for the radial (to show tooltips) + var/static/list/choices = list() + // Assoc list of [name] to [path] for after the radial + var/static/list/names_to_path = list() + if(!choices.len || !names_to_path.len) + for(var/obj/structure/trap/eldritch/trap as anything in subtypesof(/obj/structure/trap/eldritch)) + names_to_path[initial(trap.name)] = trap + choices[initial(trap.name)] = image(icon = initial(trap.icon), icon_state = initial(trap.icon_state)) + + var/picked_choice = show_radial_menu( + user, + user, + choices, + require_near = TRUE, + ) + + if(isnull(picked_choice)) + return + + var/to_make = names_to_path[picked_choice] + if(!ispath(to_make, /obj/structure/trap/eldritch)) + CRASH("[type] attempted to create a rune of incorrect type! (got: [to_make])") + to_chat(user, SPAN_HIEROPHANT("Carving [picked_choice]...")) + user.playsound_local(target_turf, 'sound/weapons/blade_sheath.ogg', 50, TRUE) + if(!do_after(user, 5 SECONDS, target = target_turf)) + return + var/obj/structure/trap/eldritch/new_rune = new to_make(target_turf, user) + current_runes += new_rune.UID() + +/datum/action/item_action/rune_shatter + name = "Rune Break" + desc = "Destroys all runes carved by this blade." + button_icon = 'icons/mob/actions/actions_ecult.dmi' + background_icon = 'icons/mob/actions/actions_ecult.dmi' + button_icon_state = "rune_break" + background_icon_state = "bg_heretic" + +/datum/action/item_action/rune_shatter/New(Target) + . = ..() + if(!istype(Target, /obj/item/melee/rune_carver)) + qdel(src) + return + +/datum/action/item_action/rune_shatter/Grant(mob/granted) + if(!IS_HERETIC_OR_MONSTER(granted)) + return + + return ..() + +/datum/action/item_action/rune_shatter/IsAvailable(show_message = FALSE) + . = ..() + if(!.) + return + if(!IS_HERETIC_OR_MONSTER(owner)) + return FALSE + var/obj/item/melee/rune_carver/target_sword = target + if(!length(target_sword.current_runes)) + return FALSE + +/datum/action/item_action/rune_shatter/Trigger(trigger_flags) + . = ..() + if(!.) + return + + owner.playsound_local(get_turf(owner), 'sound/magic/blind.ogg', 50, TRUE) + var/obj/item/melee/rune_carver/target_sword = target + for(var/rune_ref as anything in target_sword.current_runes) + if(locateUID(rune_ref)) + var/rune_to_kill = locateUID(rune_ref) + qdel(rune_to_kill) + target_sword.current_runes = list() + target_sword.SpinAnimation(5, 1) + return TRUE + +//General trap +/obj/structure/trap + name = "IT'S A TRAP" + desc = "Stepping on me is a guaranteed bad day." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "trap" + anchored = TRUE + alpha = 30 //initially quite hidden when not "recharging" + flags = NO_SCREENTIPS //fuck you + var/flare_message = "The trap flares brightly!" + var/last_trigger = 0 + var/time_between_triggers = 1 MINUTES + var/charges = INFINITY + var/antimagic_flags = MAGIC_RESISTANCE + + var/static/list/ignore_typecache + var/list/mob/immune_minds = list() + + var/sparks = TRUE + var/datum/effect_system/spark_spread/spark_system + +/obj/structure/trap/Initialize(mapload) + . = ..() + flare_message = "[src] flares brightly!" + spark_system = new + spark_system.set_up(4,1,src) + spark_system.attach(src) + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered) + ) + AddElement(/datum/element/connect_loc, loc_connections) + + if(isnull(ignore_typecache)) + ignore_typecache = typecacheof(list( + /obj/effect, + /mob/dead, + )) + +/obj/structure/trap/Destroy() + qdel(spark_system) + spark_system = null + return ..() + +/obj/structure/trap/examine(mob/user) + . = ..() + if(!isliving(user)) + return + if(user.mind && (user.mind in immune_minds)) + return + if(get_dist(user, src) <= 1) + . += SPAN_WARNING("You reveal [src]!") + flare() + +/obj/structure/trap/proc/flare() + // Makes the trap visible, and starts the cooldown until it's + // able to be triggered again. + visible_message(SPAN_WARNING("[flare_message]")) + if(sparks) + spark_system.start() + alpha = 200 + last_trigger = world.time + charges-- + if(charges <= 0) + animate(src, alpha = 0, time = 1 SECONDS) + QDEL_IN(src, 1 SECONDS) + else + animate(src, alpha = initial(alpha), time = time_between_triggers) + +/obj/structure/trap/proc/on_entered(datum/source, atom/movable/victim) + SIGNAL_HANDLER + if(last_trigger + time_between_triggers > world.time) + return + // Don't want the traps triggered by sparks, ghosts or projectiles. + if(is_type_in_typecache(victim, ignore_typecache)) + return + if(ismob(victim)) + var/mob/mob_victim = victim + if(mob_victim.mind in immune_minds) + return + if(mob_victim.can_block_magic(antimagic_flags)) + flare() + return + if(charges <= 0) + return + flare() + if(isliving(victim)) + trap_effect(victim) + +/obj/structure/trap/proc/trap_effect(mob/living/victim) + return + + +// The actual rune traps the knife draws. +/obj/structure/trap/eldritch + name = "elder carving" + desc = "Collection of unknown symbols, they remind you of days long gone..." + max_integrity = 60 + /// A tip displayed to heretics who examine the rune carver. Explains what the rune does. + var/carver_tip + /// UID of trap owner mob + var/owner + +/obj/structure/trap/eldritch/Initialize(mapload, atom/new_owner) + . = ..() + if(new_owner) + owner = new_owner.UID() + +/obj/structure/trap/eldritch/on_entered(datum/source, atom/movable/entering_atom) + if(!isliving(entering_atom)) + return + var/mob/living/living_mob = entering_atom + if(living_mob.UID() == owner) + return + if(IS_HERETIC_OR_MONSTER(living_mob)) + return + return ..() + +/obj/structure/trap/eldritch/attacked_by(obj/item/weapon, mob/living/user) + if(istype(weapon, /obj/item/melee/rune_carver) || istype(weapon, /obj/item/nullrod)) + playsound(src, 'sound/weapons/blade_sheath.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, ignore_walls = FALSE) + qdel(src) + + return ..() + +/obj/structure/trap/eldritch/alert + name = "alert carving" + icon_state = "alert_rune" + alpha = 10 + time_between_triggers = 5 SECONDS + sparks = FALSE + carver_tip = "A nearly invisible rune that, when stepped on, alerts the carver who triggered it and where." + +/obj/structure/trap/eldritch/alert/trap_effect(mob/living/victim) + var/mob/living/real_owner = locateUID(owner) + if(real_owner) + to_chat(real_owner, SPAN_WARNING("[victim.real_name] has stepped foot on the alert rune in [get_area(src)]!")) + real_owner.playsound_local(get_turf(real_owner), 'sound/effects/curse.ogg', 50, TRUE) + +/obj/structure/trap/eldritch/tentacle + name = "grasping carving" + icon_state = "tentacle_rune" + time_between_triggers = 45 SECONDS + charges = 1 + carver_tip = "When stepped on, causes heavy damage leg damage and immobilizes the victim for 5 seconds. Has 1 charge." + +/obj/structure/trap/eldritch/tentacle/trap_effect(mob/living/victim) + if(!iscarbon(victim)) + return + var/mob/living/carbon/carbon_victim = victim + carbon_victim.Immobilize(5 SECONDS) + carbon_victim.apply_damage(20, BRUTE, BODY_ZONE_R_LEG) + carbon_victim.apply_damage(20, BRUTE, BODY_ZONE_L_LEG) + playsound(src, 'sound/misc/demon_attack1.ogg', 75, TRUE) + +/obj/structure/trap/eldritch/mad + name = "mad carving" + icon_state = "madness_rune" + time_between_triggers = 20 SECONDS + charges = 2 + carver_tip = "When stepped on, causes heavy stamina damage, blindness, and a variety of ailments to the victim. Has 2 charges." + +/obj/structure/trap/eldritch/mad/trap_effect(mob/living/victim) + if(!iscarbon(victim)) + return + var/mob/living/carbon/carbon_victim = victim + carbon_victim.apply_damage(80, STAMINA) + carbon_victim.Silence(20 SECONDS) + carbon_victim.HereticSlur(1 MINUTES) + carbon_victim.Confused(5 SECONDS) + carbon_victim.Jitter(20 SECONDS) + carbon_victim.Dizzy(40 SECONDS) + carbon_victim.EyeBlind(4 SECONDS) + playsound(src, 'sound/magic/blind.ogg', 75, TRUE) diff --git a/code/modules/antagonists/heretic/structures/lock_final.dm b/code/modules/antagonists/heretic/structures/lock_final.dm new file mode 100644 index 00000000000..dbf47b8dee7 --- /dev/null +++ b/code/modules/antagonists/heretic/structures/lock_final.dm @@ -0,0 +1,127 @@ +/obj/structure/lock_tear + name = "???" + desc = "It stares back. There's no reason to remain. Run." + max_integrity = INFINITY + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + icon = 'icons/effects/effects.dmi' + icon_state = "bhole3" + color = COLOR_VOID_PURPLE + light_color = COLOR_VOID_PURPLE + light_range = 20 + anchored = TRUE + layer = HIGH_SIGIL_LAYER //0.01 above sigil layer used by heretic runes + move_resist = INFINITY + /// Who is our daddy? + var/datum/mind/ascendee + /// True if we're currently checking for ghost opinions + var/gathering_candidates = TRUE + ///a static list of heretic summons we cam create, automatically populated from heretic monster subtypes + var/static/list/monster_types + /// A static list of heretic summons which we should not create + var/static/list/monster_types_blacklist = list( + /mob/living/basic/heretic_summon/armsy, + /mob/living/basic/heretic_summon/armsy/prime, + /mob/living/basic/heretic_summon/star_gazer, + + ) + /// How many minutes must you wait before respawning so this is actually maybe dealable by crew + var/death_cooldown = 2.5 MINUTES + +/obj/structure/lock_tear/Initialize(mapload, datum/mind/ascendant_mind) + . = ..() + transform *= 3 + if(isnull(monster_types)) + monster_types = subtypesof(/mob/living/basic/heretic_summon) - monster_types_blacklist + if(!isnull(ascendant_mind)) + ascendee = ascendant_mind + RegisterSignals(ascendant_mind.current, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING), PROC_REF(end_madness)) + GLOB.poi_list += src + INVOKE_ASYNC(src, PROC_REF(poll_ghosts)) + +/// Ask ghosts if they want to make some noise +/obj/structure/lock_tear/proc/poll_ghosts() + var/list/candidates = SSghost_spawns.poll_candidates("Would you like to be a random eldritch monster attacking the crew?", ROLE_HERETIC, TRUE, 10 SECONDS, source = src) + while(LAZYLEN(candidates)) + var/mob/dead/observer/candidate = pick_n_take(candidates) + ghost_to_monster(candidate, should_ask = FALSE) + gathering_candidates = FALSE + +/// Destroy the rift if you kill the heretic +/obj/structure/lock_tear/proc/end_madness(datum/former_master) + SIGNAL_HANDLER + var/turf/our_turf = get_turf(src) + playsound(our_turf, 'sound/magic/castsummon.ogg', vol = 100, vary = TRUE) + visible_message(SPAN_BOLDWARNING("The rip in space spasms and disappears!")) + UnregisterSignal(former_master, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING)) // Just in case they die THEN delete + new /obj/effect/temp_visual/destabilising_tear(our_turf) + qdel(src) + +/obj/structure/lock_tear/attack_ghost(mob/user) + . = ..() + if(. || gathering_candidates) + return + ghost_to_monster(user) + +/obj/structure/lock_tear/examine(mob/user) + . = ..() + if(!isobserver(user) || gathering_candidates) + return + . += SPAN_NOTICE("You can use this to enter the world as a foul monster.") + +/// Turn a ghost into an 'orrible beast +/obj/structure/lock_tear/proc/ghost_to_monster(mob/dead/observer/user, should_ask = TRUE) + if(should_ask) + var/deathtime = world.time - user.timeofdeath + var/joinedasobserver = FALSE + if(isobserver(user)) + var/mob/dead/observer/G = user + if(G.ghost_flags & GHOST_START_AS_OBSERVER) + joinedasobserver = TRUE + + var/deathtimeminutes = round(deathtime / 600) + var/pluralcheck = "minute" + if(deathtimeminutes == 0) + pluralcheck = "" + else if(deathtimeminutes == 1) + pluralcheck = " [deathtimeminutes] minute and" + else if(deathtimeminutes > 1) + pluralcheck = " [deathtimeminutes] minutes and" + var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10, 1) + if(deathtime <= death_cooldown && !joinedasobserver) + to_chat(user, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.") + to_chat(user, SPAN_WARNING("You must wait [death_cooldown / 1 MINUTES] minutes to respawn!")) + return TRUE + var/ask = tgui_alert(user, "Become a monster?", "Ascended Rift", list("Yes", "No")) + if(ask != "Yes" || QDELETED(src) || QDELETED(user)) + return FALSE + var/monster_type = pick(monster_types) + var/mob/living/monster = new monster_type(loc) + monster.key = user.key + if(ascendee) + monster.mind.add_antag_datum(new /datum/antagonist/mindslave/heretic_monster(ascendee)) + monster.faction = ascendee.current.faction + +/obj/structure/lock_tear/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) + return FALSE + +/obj/structure/lock_tear/Destroy(force) + if(ascendee) + ascendee = null + return ..() + +/obj/effect/temp_visual/destabilising_tear + name = "destabilised tear" + icon_state = "bhole3" + color = COLOR_VOID_PURPLE + light_color = COLOR_VOID_PURPLE + light_range = 20 + layer = HIGH_SIGIL_LAYER + +/obj/effect/temp_visual/destabilising_tear/Initialize(mapload) + . = ..() + transform *= 3 + animate(src, transform = matrix().Scale(3.2), time = 0.15 SECONDS) + animate(transform = matrix().Scale(0.2), time = 0.75 SECONDS) + animate(transform = matrix().Scale(3, 0), time = 0.1 SECONDS) + animate(src, color = COLOR_WHITE, time = 0.25 SECONDS, flags = ANIMATION_PARALLEL) + animate(color = COLOR_VOID_PURPLE, time = 0.3 SECONDS) diff --git a/code/modules/antagonists/heretic/structures/mawed_crucible.dm b/code/modules/antagonists/heretic/structures/mawed_crucible.dm new file mode 100644 index 00000000000..51e16ecd2ad --- /dev/null +++ b/code/modules/antagonists/heretic/structures/mawed_crucible.dm @@ -0,0 +1,290 @@ +// The mawed crucible, a heretic structure that can create potions from bodyparts and organs. +/obj/structure/eldritch_crucible + name = "mawed crucible" + desc = "A deep basin made of cast iron, immortalized by steel-like teeth holding it in place. \ + Staring at the vile extract within fills your mind with terrible ideas." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "crucible" + base_icon_state = "crucible" + anchored = TRUE + density = TRUE + ///How much mass this currently holds + var/current_mass = 3 + ///Maximum amount of mass + var/max_mass = 3 + ///Cooldown for the crucible to create mass from the eldritch + COOLDOWN_DECLARE(refill_cooldown) + +/obj/structure/eldritch_crucible/Initialize(mapload) + . = ..() + START_PROCESSING(SSobj, src) + +/obj/structure/eldritch_crucible/process(seconds_per_tick) + if(COOLDOWN_TIMELEFT(src, refill_cooldown)) + return + if(current_mass >= max_mass) + return + COOLDOWN_START(src, refill_cooldown, 30 SECONDS) + current_mass++ + playsound(src, 'sound/items/eatfood.ogg', 100, TRUE) + update_appearance(UPDATE_ICON_STATE) + +/obj/structure/eldritch_crucible/obj_destruction() + // Create a spillage if we were destroyed with leftover mass + if(current_mass) + visible_message(SPAN_WARNING("[src] falls apart with a thud, spilling shining extract everywhere!")) + var/turf/our_turf = get_turf(src) + + new /obj/effect/decal/cleanable/greenglow(our_turf) + for(var/turf/nearby_turf as anything in get_adjacent_open_turfs(our_turf)) + if(prob(10 * current_mass)) + new /obj/effect/decal/cleanable/greenglow(nearby_turf) + playsound(our_turf, 'sound/effects/bubbles.ogg', 50, TRUE) + else + visible_message(SPAN_WARNING("[src] falls apart with a thud!")) + playsound(src, 'sound/hallucinations/wail.ogg', 100, TRUE) + + return ..() + +/obj/structure/eldritch_crucible/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user) && !isobserver(user)) + return + + if(current_mass > 0) + . += SPAN_NOTICE("You can refill an eldritch flask with this") + + if(current_mass < max_mass) + var/to_fill = max_mass - current_mass + . += SPAN_NOTICE("[src] requires [to_fill] more organ[to_fill == 1 ? "":"s"] or bodypart[to_fill == 1 ? "":"s"].") + else + . += SPAN_BOLDNOTICE(">[src] is bubbling to the brim with viscous liquid, and is ready to use.") + + . += SPAN_NOTICE("You can [anchored ? "unanchor and move":"anchor in place"] [src] with a Codex Cicatrix or Mansus Grasp.") + . += SPAN_INFO("The following potions can be brewed:") + for(var/obj/item/eldritch_potion/potion as anything in subtypesof(/obj/item/eldritch_potion)) + var/potion_string = SPAN_INFO("\tThe " + initial(potion.name) + " - " + initial(potion.crucible_tip) + "") + . += potion_string + +/obj/structure/eldritch_crucible/examine_status(mob/user) + if(IS_HERETIC_OR_MONSTER(user) || isobserver(user)) + return SPAN_NOTICE("It's at [round(obj_integrity * 100 / max_integrity)]% stability.") + return ..() + +// no breaky herety thingy +/obj/structure/eldritch_crucible/rust_heretic_act() + return + +/obj/structure/eldritch_crucible/attacked_by(obj/item/weapon, mob/living/user) + if(!iscarbon(user)) + return ..() + + if(!IS_HERETIC_OR_MONSTER(user)) + bite_the_hand(user) + return TRUE + + if(is_organ(weapon)) + var/obj/item/organ/consumed = weapon + if(consumed.status & ORGAN_ROBOT) + to_chat(user, SPAN_HIEROPHANT_WARNING("This organ isnot organic!")) + return + if(consumed.vital) // Basically, don't eat organs like brains + to_chat(user, SPAN_HIEROPHANT_WARNING("This organ is invalid!")) + return + + consume_fuel(user, consumed) + return TRUE + + return ..() + +/obj/structure/eldritch_crucible/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(istype(tool, /obj/item/codex_cicatrix) || istype(tool, /obj/item/melee/touch_attack/mansus_fist)) + playsound(src, 'sound/items/deconstruct.ogg', 30, TRUE, ignore_walls = FALSE) + anchored = !anchored + to_chat(user, SPAN_HIEROPHANT("[anchored ? "":"un"]anchored.")) + return ITEM_INTERACT_COMPLETE + if(istype(tool, /obj/item/reagent_containers/drinks/bottle/eldritch)) + if(current_mass < max_mass) + to_chat(user, SPAN_HIEROPHANT_WARNING("We are not full enough!")) + return ITEM_INTERACT_COMPLETE + var/obj/item/reagent_containers/drinks/bottle/eldritch/to_fill = tool + if(to_fill.reagents.total_volume >= to_fill.reagents.maximum_volume) + to_chat(user, SPAN_HIEROPHANT_WARNING("Your flask is full!")) + return ITEM_INTERACT_COMPLETE + to_fill.reagents.add_reagent("eldritch", 50) + do_item_attack_animation(src, used_item = tool) + current_mass-- + to_chat(user, SPAN_HIEROPHANT("Your flask has been refilled.")) + return ITEM_INTERACT_COMPLETE + +/obj/structure/eldritch_crucible/attack_hand(mob/user, list/modifiers) + . = ..() + if(.) + return + + if(!isliving(user)) + return + + if(!IS_HERETIC_OR_MONSTER(user)) + if(iscarbon(user)) + bite_the_hand(user) + return TRUE + + if(in_use) + to_chat(user, SPAN_HIEROPHANT_WARNING("We are in use!")) + return TRUE + + if(current_mass < max_mass) + to_chat(user, SPAN_HIEROPHANT_WARNING("We are not full enough!")) + return TRUE + + INVOKE_ASYNC(src, PROC_REF(show_radial), user) + return TRUE + +/* + * Wrapper for show_radial() to ensure in_use is enabled and disabled correctly. + */ +/obj/structure/eldritch_crucible/proc/show_radial(mob/living/user) + in_use = TRUE + create_potion(user) + in_use = FALSE + +/* + * Shows the user of radial of possible potions, + * and create the potion they chose. + */ +/obj/structure/eldritch_crucible/proc/create_potion(mob/living/user) + + // Assoc list of [name] to [image] for the radial + var/static/list/choices = list() + // Assoc list of [name] to [path] for after the radial, to spawn it + var/static/list/names_to_path = list() + if(!choices.len || !names_to_path.len) + for(var/obj/item/eldritch_potion/potion as anything in subtypesof(/obj/item/eldritch_potion)) + names_to_path[initial(potion.name)] = potion + choices[initial(potion.name)] = image(icon = initial(potion.icon), icon_state = initial(potion.icon_state)) + + var/picked_choice = show_radial_menu( + user, + src, + choices, + require_near = TRUE, + ) + + if(isnull(picked_choice)) + return + + var/spawned_type = names_to_path[picked_choice] + if(!ispath(spawned_type, /obj/item/eldritch_potion)) + CRASH("[type] attempted to create a potion that wasn't an eldritch potion! (got: [spawned_type])") + + var/obj/item/spawned_pot = new spawned_type(drop_location()) + + playsound(src, 'sound/effects/desecration/desecration-02.ogg', 75, TRUE) + visible_message(SPAN_NOTICE("[src]'s shining liquid drains into a flask, creating a [spawned_pot.name]!")) + + current_mass = 0 + update_appearance(UPDATE_ICON_STATE) + +/* + * "Bites the hand that feeds it", except more literally. + * Called when a non-heretic interacts with the crucible, + * causing them to lose their active hand to it. + */ +/obj/structure/eldritch_crucible/proc/bite_the_hand(mob/living/carbon/user) + var/obj/item/organ/external/affecting = user.get_organ("[user.hand ? "l" : "r" ]_hand") + if(QDELETED(affecting)) + return + if(affecting.limb_flags & CANNOT_DISMEMBER) + return + + to_chat(user, SPAN_USERDANGER("[src] grabs your [affecting.name]!")) + affecting.droplimb(FALSE, DROPLIMB_SHARP) + consume_fuel(consumed = affecting) + +/* + * Consumes an organ or bodypart and increases the mass of the crucible. + * If feeder is supplied, gives some feedback. + */ +/obj/structure/eldritch_crucible/proc/consume_fuel(mob/living/feeder, obj/item/consumed) + if(current_mass >= max_mass) + if(feeder) + to_chat(feeder, SPAN_HIEROPHANT_WARNING("We are full.")) + return + + current_mass++ + playsound(src, 'sound/items/eatfood.ogg', 100, TRUE) + visible_message(SPAN_NOTICE("[src] devours [consumed] and fills itself with a little bit of liquid!")) + + if(feeder) + to_chat(feeder, SPAN_HIEROPHANT("We are this filled. ([current_mass] / [max_mass])")) + + qdel(consumed) + update_appearance(UPDATE_ICON_STATE) + +/obj/structure/eldritch_crucible/update_icon_state() + icon_state = "[base_icon_state][(current_mass == max_mass) ? null : "_empty"]" + return ..() + +// Potions created by the mawed crucible. +/obj/item/eldritch_potion + name = "brew of day and night" + desc = "You should never see this" + icon = 'icons/obj/antags/eldritch.dmi' + w_class = WEIGHT_CLASS_SMALL + new_attack_chain = TRUE + layer = ABOVE_OBJ_LAYER + /// When a heretic examines a mawed crucible, shows a list of possible potions by name + includes this tip to explain what it does. + var/crucible_tip = "Doesn't do anything." + /// Typepath to the status effect this applies + var/status_effect + +/obj/item/eldritch_potion/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user) && !isobserver(user)) + return + + . += SPAN_NOTICE("[crucible_tip]") + +/obj/item/eldritch_potion/activate_self(mob/user) + if(..() || !iscarbon(user)) + return + + playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE) + + if(!IS_HERETIC_OR_MONSTER(user)) + to_chat(user, SPAN_DANGER("You down some of the liquid from [src]. The taste causes you to retch, and the glass vanishes.")) + user.reagents?.add_reagent("eldritch", 10) + user.adjust_disgust(60 SECONDS) + qdel(src) + return TRUE + + to_chat(user, SPAN_NOTICE("You drink the viscous liquid from [src], causing the glass to dematerialize.")) + potion_effect(user) + qdel(src) + return TRUE + +/** + * The effect of the potion, if it has any special one. + * In general try not to override this + * and utilize the status_effect var to make custom effects. + */ +/obj/item/eldritch_potion/proc/potion_effect(mob/user) + var/mob/living/carbon/carbon_user = user + carbon_user.apply_status_effect(status_effect) + +/obj/item/eldritch_potion/duskndawn + name = "brew of dusk and dawn" + desc = "A glass bottle contianing a dull yellow liquid. It seems to fade in and out with regularity." + icon_state = "clarity" + status_effect = /datum/status_effect/duskndawn + crucible_tip = "Allows you to see through walls and objects. Lasts 90 seconds." + +/obj/item/eldritch_potion/wounded + name = "brew of the wounded soldier" + desc = "A glass bottle contianing a colorless, dark liquid." + icon_state = "marshal" + status_effect = /datum/status_effect/marshal + crucible_tip = "Causes all wounds you are experiencing to begin to heal you. Fractures, sprains, cuts, and punctures will heal bruises, \ + and flesh damage will heal burns. The more severe the wounds, the stronger the healing. Additionally, prevents slowdown from damage. \ + Lasts 60 seconds. " diff --git a/code/modules/antagonists/heretic/transmutation_rune.dm b/code/modules/antagonists/heretic/transmutation_rune.dm new file mode 100644 index 00000000000..8ae6cbf7f21 --- /dev/null +++ b/code/modules/antagonists/heretic/transmutation_rune.dm @@ -0,0 +1,258 @@ +/// The heretic's rune, which they use to complete transmutation rituals. +/obj/effect/heretic_rune + name = "transmutation rune" + desc = "A flowing circle of shapes and runes is etched into the floor, filled with a thick black tar-like fluid." + icon = 'icons/effects/cult_effects.dmi' + icon_state = "shield-cult" + mouse_opacity = MOUSE_OPACITY_OPAQUE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + plane = FLOOR_PLANE + layer = SIGIL_LAYER + /// What is the colour of the runes visual effects? + var/greyscale_colours = COLOR_LIME + ///Used mainly for summoning ritual to prevent spamming the rune to create millions of monsters. + var/is_in_use = FALSE + +/obj/effect/heretic_rune/Initialize(mapload, path_colour = COLOR_LIME) + . = ..() + var/image/silicon_image = image(icon = 'icons/effects/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("heretic_rune", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/heretic_rune/examine(mob/user) + . = ..() + + . += SPAN_NOTICE("It looks like the ink can be scrubbed off with some soap.") + + if(!IS_HERETIC(user)) + return + + . += SPAN_NOTICE("Allows you to transmute objects by invoking the rune after collecting the prerequisites overhead.") + . += SPAN_NOTICE("You can use your Mansus Grasp on the rune to remove it.") + +/obj/effect/heretic_rune/attack_animal(mob/living/simple_animal/M) + . = ..() + return attack_hand(M) + + +/obj/effect/heretic_rune/attack_hand(mob/living/user) + if(..()) + return + INVOKE_ASYNC(src, PROC_REF(try_rituals), user) + return FINISH_ATTACK + +/** + * Attempt to begin a ritual, giving them an input list to chose from. + * Also ensures is_in_use is enabled and disabled before and after. + */ +/obj/effect/heretic_rune/proc/try_rituals(mob/living/user) + if(!IS_HERETIC(user)) + return FALSE + if(is_in_use) + return FALSE + is_in_use = TRUE + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/list/rituals = heretic_datum.get_rituals() + if(!length(rituals)) + to_chat(user, SPAN_HIEROPHANT_WARNING("You have no rituals avalible?")) + is_in_use = FALSE + return + + var/chosen = tgui_input_list(user, "Choose a ritual to attempt.", "Choose a Ritual", rituals) + if(!chosen || !istype(rituals[chosen], /datum/heretic_knowledge) || QDELETED(src) || QDELETED(user) || QDELETED(heretic_datum)) + is_in_use = FALSE + return + + do_ritual(user, rituals[chosen]) + is_in_use = FALSE + +/** + * Attempt to invoke a ritual from the past list of knowledges. + * + * Arguments + * * user - the heretic / the person who invoked the rune + * * knowledge_list - a non-assoc list of heretic_knowledge datums. + * + * returns TRUE if any rituals passed succeeded, FALSE if they all failed. + */ +/obj/effect/heretic_rune/proc/do_ritual(mob/living/user, datum/heretic_knowledge/ritual) + + // Collect all nearby valid atoms over the rune for processing in rituals. + var/list/atom/movable/atoms_in_range = list() + for(var/atom/close_atom as anything in range(1, src)) + if(!ismovable(close_atom)) + continue + if(isitem(close_atom)) + var/obj/item/close_item = close_atom + if(close_item.flags & ABSTRACT) //woops sacrificed your own head + continue + if(close_atom.invisibility) + continue + if(close_atom == user) + continue + + atoms_in_range += close_atom + + // A copy of our requirements list. + // We decrement the values of to determine if enough of each key is present. + var/list/requirements_list = ritual.required_atoms.Copy() + var/list/banned_atom_types = ritual.banned_atom_types.Copy() + // A list of all atoms we've selected to use in this recipe. + var/list/selected_atoms = list() + + // Do the snowflake check to see if we can continue or not. + // selected_atoms is passed and can be modified by this proc. + if(!ritual.recipe_snowflake_check(user, atoms_in_range, selected_atoms, loc)) + return FALSE + + // Now go through all our nearby atoms and see which are good for our ritual. + for(var/atom/nearby_atom as anything in atoms_in_range) + // Go through all of our required atoms + for(var/req_type in requirements_list) + // We already have enough of this type, skip + if(requirements_list[req_type] <= 0) + continue + // If req_type is a list of types, check all of them for one match. + if(islist(req_type)) + if(!(is_type_in_list(nearby_atom, req_type))) + continue + else if(!istype(nearby_atom, req_type)) + continue + // if list has items, check if the strict type is banned. + if(length(banned_atom_types)) + if(nearby_atom.type in banned_atom_types) + continue + // This item is a valid type. Add it to our selected atoms list. + selected_atoms |= nearby_atom + // If it's a stack, we gotta see if it has more than one inside, + // as our requirements may want more than one item of a stack + if(isstack(nearby_atom)) + var/obj/item/stack/picked_stack = nearby_atom + requirements_list[req_type] -= picked_stack.amount // Can go negative, but doesn't matter. Negative = fulfilled + + // Otherwise, just add the mark down the item as fulfilled x1 + else + requirements_list[req_type]-- + + // All of the atoms have been checked, let's see if the ritual was successful + var/list/what_are_we_missing = list() + for(var/req_type in requirements_list) + var/number_of_things = requirements_list[req_type] + // <= 0 means it's fulfilled, skip + if(number_of_things <= 0) + continue + + // > 0 means it's unfilfilled - the ritual has failed, we should tell them why + // Lets format the thing they're missing and put it into our list + var/formatted_thing = "[number_of_things] " + if(islist(req_type)) + var/list/req_type_list = req_type + var/list/req_text_list = list() + for(var/atom/possible_type as anything in req_type_list) + req_text_list += ritual.parse_required_item(possible_type) + formatted_thing += english_list(req_text_list, and_text = " or ") + + else + formatted_thing = ritual.parse_required_item(req_type) + + what_are_we_missing += formatted_thing + + if(length(what_are_we_missing)) + // Let them know it screwed up + // Then let them know what they're missing + to_chat(user, SPAN_HIEROPHANT_WARNING("You are missing [english_list(what_are_we_missing)] in order to complete the ritual \"[ritual.name]\".")) + return FALSE + + // If we made it here, the ritual had all necessary components, and we can try to cast it. + // This doesn't necessarily mean the ritual will succeed, but it's valid! + // Do the animations and associated feedback. + do_animation(TRUE) + playsound(user, 'sound/magic/castsummon.ogg', 75, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_exponent = 10, ignore_walls = FALSE) + + // - We temporarily make all of our chosen atoms invisible, as some rituals may sleep, + // and we don't want people to be able to run off with ritual items. + // - We make a duplicate list here to ensure that all atoms are correctly un-invisibled by the end. + // Some rituals may remove atoms from the selected_atoms list, and not consume them. + var/list/initial_selected_atoms = selected_atoms.Copy() + for(var/atom/to_disappear as anything in selected_atoms) + to_disappear.invisibility = INVISIBILITY_ABSTRACT + + // All the components have been invisibled, time to actually do the ritual. Call on_finished_recipe + // (Note: on_finished_recipe may sleep in the case of some rituals like summons, which expect ghost candidates.) + // - If the ritual was success (Returned TRUE), proceede to clean up the atoms involved in the ritual. The result has already been spawned by this point. + // - If the ritual failed for some reason (Returned FALSE), likely due to no ghosts taking a role or an error, we shouldn't clean up anything, and reset. + var/ritual_result = ritual.on_finished_recipe(user, selected_atoms, loc) + + if(ritual_result) + ritual.cleanup_atoms(selected_atoms) + + // Clean up done, re-appear anything that hasn't been deleted. + for(var/atom/to_appear as anything in initial_selected_atoms) + if(QDELETED(to_appear)) + continue + to_appear.invisibility = 0 + + // And finally, give some user feedback + // No feedback is given on failure here - + // the ritual itself should handle it (providing specifics as to why it failed) + if(ritual_result) + to_chat(user, SPAN_HIEROPHANT("The ritual was successful.")) + + return ritual_result + +/obj/effect/heretic_rune/proc/do_animation(do_flick = FALSE) + if(do_flick) + flick("[icon_state]_activate_colour", src) + var/mutable_appearance/theme_icon = mutable_appearance('icons/effects/96x96.dmi', "transmutation_rune_activate_white", FLOAT_LAYER - 1, appearance_flags = appearance_flags | RESET_TRANSFORM, color = greyscale_colours) + theme_icon.blend_mode = BLEND_MULTIPLY + add_overlay(theme_icon) + + +/// A 3x3 heretic rune. The kind heretics actually draw in game. +/obj/effect/heretic_rune/big + icon = 'icons/effects/96x96.dmi' + icon_state = "transmutation_rune" + pixel_x = -30 + pixel_y = -30 + +/obj/effect/heretic_rune/big/Initialize(mapload, path_colour) + . = ..() + if(path_colour) + greyscale_colours = path_colour + do_animation() //Needed so the colour applies right the first time it is used. Don't ask + +/obj/effect/temp_visual/drawing_heretic_rune + duration = 30 SECONDS + icon = 'icons/effects/96x96.dmi' + icon_state = null + pixel_x = -30 + pixel_y = 18 + pixel_z = -48 + plane = FLOOR_PLANE + layer = SIGIL_LAYER + /// We only set this state after setting the colour, otherwise the animation doesn't colour correctly + var/animation_state = "transmutation_rune_draw_colour" + /// What the blend state is + var/blend_state = "transmutation_rune_draw_white" + +/obj/effect/temp_visual/drawing_heretic_rune/Initialize(mapload, path_colour = COLOR_LIME) + icon_state = animation_state + var/mutable_appearance/theme_icon = mutable_appearance('icons/effects/96x96.dmi', blend_state, FLOAT_LAYER - 1, appearance_flags = appearance_flags | RESET_TRANSFORM, color = path_colour) + theme_icon.blend_mode = BLEND_MULTIPLY + add_overlay(theme_icon) + var/image/silicon_image = image(icon = 'icons/effects/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("heretic_rune", silicon_image, GLOB.silicon_mob_list) + . = ..() + + +/obj/effect/temp_visual/drawing_heretic_rune/fast + duration = 12 SECONDS + animation_state = "transmutation_rune_fast_colour" + blend_state = "transmutation_rune_fast_white" + +/obj/effect/temp_visual/drawing_heretic_rune/fail + duration = 0.25 SECONDS + animation_state = "transmutation_rune_fail_colour" + blend_state = "transmutation_rune_fail_white" diff --git a/code/modules/arcade/prize_datums.dm b/code/modules/arcade/prize_datums.dm index b257d339b6d..55a0e95f7a9 100644 --- a/code/modules/arcade/prize_datums.dm +++ b/code/modules/arcade/prize_datums.dm @@ -352,6 +352,11 @@ GLOBAL_DATUM_INIT(global_prizes, /datum/prizes, new()) desc = "A plastic replica of an energy blade." typepath = /obj/item/toy/sword cost = 150 +/datum/prize_item/fake_heretic_amulet + name = "Fake religious icon" + desc = "A strange medallion, which makes its wearer look like they're part of some cult." + typepath = /obj/item/clothing/neck/fake_heretic_amulet + cost = 150 /datum/prize_item/fakespace name = "Space Carpet" diff --git a/code/modules/asset_cache/validate_assets.html b/code/modules/asset_cache/validate_assets.html index 9728bb5c285..4254e28b85c 100644 --- a/code/modules/asset_cache/validate_assets.html +++ b/code/modules/asset_cache/validate_assets.html @@ -15,9 +15,9 @@ xhr.open('GET', 'asset_data.json', true); xhr.responseType = 'text'; xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { + if(xhr.readyState === 4) { var status = xhr.status; - if (status >= 200 && status < 400) { + if(status >= 200 && status < 400) { sendbyond('asset_cache_preload_data=' + encodeURIComponent(xhr.responseText)); } } diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 2b6d9ac5256..81214d53a0c 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -467,4 +467,7 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/proc/get_machinery_pipelines() return list() +/obj/machinery/atmospherics/rust_heretic_act() + return FALSE + #undef VENT_SOUND_DELAY diff --git a/code/modules/awaymissions/cordon.dm b/code/modules/awaymissions/cordon.dm index 37c71c8610a..60a0dac0c40 100644 --- a/code/modules/awaymissions/cordon.dm +++ b/code/modules/awaymissions/cordon.dm @@ -12,8 +12,8 @@ blocks_air = TRUE baseturf = /turf/cordon -// /turf/cordon/rust_heretic_act() -// return FALSE +/turf/cordon/rust_heretic_act() + return FALSE /turf/cordon/acid_act(acidpwr, acid_volume, acid_id) return FALSE diff --git a/code/modules/buildmode/bm_mode.dm b/code/modules/buildmode/bm_mode.dm index 49d23ebb158..75dbc5e55c6 100644 --- a/code/modules/buildmode/bm_mode.dm +++ b/code/modules/buildmode/bm_mode.dm @@ -24,7 +24,7 @@ /datum/buildmode_mode/proc/exit_mode(datum/click_intercept/buildmode/BM) return -/datum/buildmode_mode/proc/get_button_iconstate() +/datum/buildmode_mode/proc/get_button_overlay_iconstate() return "buildmode_[key]" /datum/buildmode_mode/proc/show_help(mob/user) diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index 0035bfbb491..0dfe04f9043 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -108,6 +108,7 @@ /datum/click_intercept/buildmode/InterceptClickOn(user, params, atom/object) mode.handle_click(user, params, object) + return TRUE /proc/togglebuildmode(mob/M in GLOB.player_list) set name = "Toggle Build Mode" diff --git a/code/modules/buildmode/buildmode_hud.dm b/code/modules/buildmode/buildmode_hud.dm index 3c26c03be6c..cf8852c5d8e 100644 --- a/code/modules/buildmode/buildmode_hud.dm +++ b/code/modules/buildmode/buildmode_hud.dm @@ -27,7 +27,7 @@ return TRUE /atom/movable/screen/buildmode/mode/update_icon_state() - icon_state = bd.mode.get_button_iconstate() + icon_state = bd.mode.get_button_overlay_iconstate() /atom/movable/screen/buildmode/help icon_state = "buildhelp" diff --git a/code/modules/clothing/suits/hood.dm b/code/modules/clothing/suits/hood.dm index 8031aa373db..ef9a41a866a 100644 --- a/code/modules/clothing/suits/hood.dm +++ b/code/modules/clothing/suits/hood.dm @@ -78,6 +78,7 @@ return RemoveHood() + /obj/item/clothing/head/hooded var/obj/item/clothing/suit/hooded/suit diff --git a/code/modules/clothing/suits/suit_storage.dm b/code/modules/clothing/suits/suit_storage.dm index d758f9cd13b..4b1c4372c4c 100644 --- a/code/modules/clothing/suits/suit_storage.dm +++ b/code/modules/clothing/suits/suit_storage.dm @@ -1,10 +1,10 @@ /obj/item/clothing/suit/storage - var/obj/item/storage/internal/pockets + var/obj/item/storage/internal/pockets = /obj/item/storage/internal w_class = WEIGHT_CLASS_NORMAL //we don't want these to be able to fit in their own pockets. /obj/item/clothing/suit/storage/Initialize(mapload) . = ..() - pockets = new/obj/item/storage/internal(src) + pockets = new pockets(src) pockets.storage_slots = 2 //two slots pockets.max_w_class = WEIGHT_CLASS_SMALL //fit only pocket sized items pockets.max_combined_w_class = 4 diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 2c38feb9af9..5616166679f 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -328,6 +328,9 @@ else if(user.mind.has_antag_datum(/datum/antagonist/vampire)) //Vampires to_chat(user, "Your blood lust distracts you too much to be able to concentrate on the contents of the scroll!") return + else if(IS_HERETIC(user)) + to_chat(user, SPAN_HIEROPHANT_WARNING("You and everyone else are already dreaming. You need to wake up, not sleep more...")) + return var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null) theSleepingCarp.teach(user) @@ -352,6 +355,9 @@ else if(user.mind.has_antag_datum(/datum/antagonist/vampire)) //Vampires to_chat(user, SPAN_WARNING("Your blood lust distracts you from the basics of CQC!")) return + else if(IS_HERETIC(user)) + to_chat(user, SPAN_HIEROPHANT_WARNING("The mansus remembers the basics of CQC. You do not need to.")) + return else if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, SPAN_WARNING("The mere thought of combat, let alone CQC, makes your head spin!")) return diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 5a337b8c4a3..227bc2895f6 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -145,7 +145,8 @@ /obj/machinery/anomalous_crystal/emitter/Initialize(mapload) . = ..() generated_projectile = pick(/obj/projectile/magic/fireball/infernal, - /obj/projectile/bullet/meteorshot, /obj/projectile/beam/xray, /obj/projectile/colossus) + /obj/projectile/bullet/meteorshot, /obj/projectile/beam/xray, /obj/projectile/colossus, + /obj/projectile/moon_parade, /obj/projectile/magic/star_ball, /obj/projectile/magic/rust_wave/short) /obj/machinery/anomalous_crystal/emitter/ActivationReaction(mob/user, method) if(..()) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 1a978d8b48c..aa465ed3c75 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -370,12 +370,15 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ force = 1 throwforce = 2 w_class = WEIGHT_CLASS_TINY + new_attack_chain = TRUE var/string_attached var/list/sideslist = list("heads","tails") var/cmineral = null var/name_by_cmineral = TRUE var/cooldown = 0 var/credits = 10 + var/has_action = FALSE + var/heads_name = "heads" /obj/item/coin/Initialize(mapload) . = ..() @@ -420,10 +423,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(!QDELETED(src) && !P.nodamage && (P.damage_type == BURN)) log_and_set_aflame(P.firer, P) -/obj/item/coin/plasma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(!I.get_heat()) - return ..() - log_and_set_aflame(user, I) +/obj/item/coin/plasma/attack_by(obj/item/attacking, mob/user, params) + if(..() || !attacking.get_heat()) + return FINISH_ATTACK + log_and_set_aflame(user, attacking) /obj/item/coin/plasma/proc/log_and_set_aflame(mob/user, obj/item/I) var/turf/T = get_turf(src) @@ -491,14 +494,17 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ sideslist = list("valid", "salad") credits = 20 name_by_cmineral = FALSE + heads_name = "valid" /obj/item/coin/antagtoken/syndicate name = "syndicate coin" credits = 160 -/obj/item/coin/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/CC = W +/obj/item/coin/attack_by(obj/item/attacking, mob/user, params) + if(..()) + return FINISH_ATTACK + if(istype(attacking, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/CC = attacking if(string_attached) to_chat(user, SPAN_NOTICE("There already is a string attached to this coin.")) return @@ -511,7 +517,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ to_chat(user, SPAN_WARNING("You need one length of cable to attach a string to the coin.")) return - else if(istype(W,/obj/item/wirecutters)) + else if(istype(attacking, /obj/item/wirecutters)) if(!string_attached) ..() return @@ -543,8 +549,13 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ user.put_in_hands(ring) -/obj/item/coin/attack_self__legacy__attackchain(mob/user as mob) +/obj/item/coin/activate_self(mob/user) + if(..()) + return if(cooldown < world.time - 15) + if(string_attached) //does the coin have a wire attached + to_chat(user, "The coin won't flip very well with something attached!" ) + return FALSE//do not flip the coin var/coinflip = pick(sideslist) cooldown = world.time flick("coin_[cmineral]_flip", src) @@ -553,10 +564,80 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(cmineral != "tranquillite") playsound(user.loc, 'sound/items/coinflip.ogg', 50, TRUE) blind_sound = SPAN_NOTICE("You hear the clattering of loose change.") - if(do_after(user, 15, target = src)) + if(do_after(user, 15, target = src, allow_moving = TRUE)) user.visible_message(SPAN_NOTICE("[user] has flipped [src]. It lands on [coinflip]."), \ SPAN_NOTICE("You flip [src]. It lands on [coinflip]."), \ blind_sound) + if(has_action) + if(coinflip == heads_name) + heads_action(user) + else + tails_action(user) + +/obj/item/coin/proc/heads_action(mob/user) + return + +/obj/item/coin/proc/tails_action(mob/user) + return + +/obj/item/coin/eldritch + name = "eldritch coin" + desc = "A surprisingly heavy, ornate coin. Its sides seem to depict a different image each time you look." + icon_state = "coin_heretic_heretic" + cmineral = "heretic" + materials = list(MAT_DIAMOND = 1000, MAT_PLASMA = 1000) + sideslist = list("heretic", "blade") + heads_name = "heretic" + has_action = TRUE + /// The range at which airlocks are effected. + var/airlock_range = 5 + +/obj/item/coin/eldritch/heads_action(mob/user) + var/mob/living/living_user = user + if(!IS_HERETIC(user)) + living_user.adjustBruteLoss(5) + if(prob(90)) + return + for(var/obj/machinery/door/airlock/target_airlock in range(airlock_range, user)) + if(target_airlock.density) + INVOKE_ASYNC(src, PROC_REF(try_open_airlock), target_airlock) + continue + INVOKE_ASYNC(src, PROC_REF(try_close_airlock), target_airlock) + +/obj/item/coin/eldritch/proc/try_open_airlock(obj/machinery/door/airlock/ourlock) + ourlock.open() + +/obj/item/coin/eldritch/proc/try_close_airlock(obj/machinery/door/airlock/ourlock) + if(ourlock.safe) + ourlock.safe = FALSE + ourlock.close() + ourlock.safe = TRUE + +/obj/item/coin/eldritch/tails_action(mob/user) + var/mob/living/living_user = user + if(!IS_HERETIC(user)) + living_user.adjustFireLoss(5) + if(prob(90)) + return + for(var/obj/machinery/door/airlock/target_airlock in range(airlock_range, user)) + if(target_airlock.locked) + target_airlock.unlock() + continue + target_airlock.lock() + +/obj/item/coin/eldritch/interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!istype(target, /obj/machinery/door/airlock)) + return NONE + if(!IS_HERETIC(user)) + user.adjustBruteLoss(5) + user.adjustFireLoss(5) + return ITEM_INTERACT_COMPLETE + var/obj/machinery/door/airlock/target_airlock = target + to_chat(user, SPAN_WARNING("You insert [src] into the airlock.")) + target_airlock.emag_act(user, src) + qdel(src) + return ITEM_INTERACT_COMPLETE + #undef GIBTONITE_QUALITY_LOW #undef GIBTONITE_QUALITY_MEDIUM diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 424df95b6ee..9257368d6ab 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -108,6 +108,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new) - changelings - revolutionaries/headrevs - event + - Heretic (I think?) */ for(var/_A in mind.antag_datums) var/datum/antagonist/A = _A diff --git a/code/modules/mob/inventory_procs.dm b/code/modules/mob/inventory_procs.dm index 8e550c0062e..babe8e6cb19 100644 --- a/code/modules/mob/inventory_procs.dm +++ b/code/modules/mob/inventory_procs.dm @@ -56,6 +56,13 @@ if(istype(r_hand, typepath)) return r_hand +// List version of above proc +// Returns ret_item, which is either the successfully located item or null +/mob/proc/is_holding_item_of_types(list/typepaths) + for(var/typepath in typepaths) + var/ret_item = is_holding_item_of_type(typepath) + return ret_item + //Returns the thing in our inactive hand /mob/proc/get_inactive_hand() if(hand) return r_hand @@ -242,7 +249,7 @@ if((SEND_SIGNAL(target, COMSIG_ITEM_PRE_UNEQUIP, destination, force, silent, drop_inventory, no_move) & COMPONENT_ITEM_BLOCK_UNEQUIP) && !force) return FALSE - + SEND_SIGNAL(src, COMSIG_MOB_UNEQUIPPED_ITEM, target, force, destination) if(target == r_hand) r_hand = null update_inv_r_hand() diff --git a/code/modules/mob/living/basic/hostile/carp.dm b/code/modules/mob/living/basic/hostile/carp.dm index 354fe9510bb..7f2f8cd692d 100644 --- a/code/modules/mob/living/basic/hostile/carp.dm +++ b/code/modules/mob/living/basic/hostile/carp.dm @@ -35,7 +35,7 @@ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minimum_survivable_temperature = 0 maximum_survivable_temperature = 1500 - faction = list("carp", "mining") + faction = list("carp", "heretic") pressure_resistance = 200 gold_core_spawnable = HOSTILE_SPAWN diff --git a/code/modules/mob/living/carbon/alien/alien_base.dm b/code/modules/mob/living/carbon/alien/alien_base.dm index 6effd71c670..3b20517cb52 100644 --- a/code/modules/mob/living/carbon/alien/alien_base.dm +++ b/code/modules/mob/living/carbon/alien/alien_base.dm @@ -69,10 +69,10 @@ return speech_verb -/mob/living/carbon/alien/adjustToxLoss(amount) +/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE) return STATUS_UPDATE_NONE -/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire +/mob/living/carbon/alien/adjustFireLoss(amount, updating_health = TRUE) // Weak to Fire if(amount > 0) return ..(amount * 1.5) else diff --git a/code/modules/mob/living/carbon/carbon_inventory.dm b/code/modules/mob/living/carbon/carbon_inventory.dm new file mode 100644 index 00000000000..7daba211550 --- /dev/null +++ b/code/modules/mob/living/carbon/carbon_inventory.dm @@ -0,0 +1,11 @@ +///Returns a list of all body_zones covered by clothing +/mob/living/carbon/proc/get_covered_body_zones() + RETURN_TYPE(/list) + SHOULD_NOT_OVERRIDE(TRUE) + + var/covered_flags = NONE + var/list/all_worn_items = get_equipped_items() + for(var/obj/item/worn_item in all_worn_items) + covered_flags |= worn_item.body_parts_covered + + return cover_flags2body_zones(covered_flags) diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index 4086c8632ac..8873371b108 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -92,10 +92,10 @@ return FALSE -/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, should_confuse = TRUE, distance = 0, message = 1) +/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, should_confuse = TRUE, distance = 0, message = 1, vomit_type_overide = null) . = TRUE - if(stat == DEAD || ismachineperson(src)) // Dead people and IPCs do not vomit particulates + if(stat == DEAD || (ismachineperson(src) && !locate(/obj/item/organ/internal/appendix/corrupt) in internal_organs)) // Dead people and IPCs do not vomit particulates return FALSE if(should_confuse) @@ -128,7 +128,7 @@ adjustBruteLoss(3) else if(T) - T.add_vomit_floor() + T.add_vomit_floor(type_override = vomit_type_overide) adjust_nutrition(-lost_nutrition) if(should_confuse) adjustToxLoss(-3) diff --git a/code/modules/mob/living/carbon/carbon_status_procs.dm b/code/modules/mob/living/carbon/carbon_status_procs.dm index 0f3b27f3357..6f008d355d5 100644 --- a/code/modules/mob/living/carbon/carbon_status_procs.dm +++ b/code/modules/mob/living/carbon/carbon_status_procs.dm @@ -17,3 +17,11 @@ ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, STAM_CRIT) if(!prev && getStaminaLoss() < 120) // Puts you a little further into the initial stamcrit, makes stamcrit harder to outright counter with chems. adjustStaminaLoss(30, FALSE) + +/mob/living/carbon/adjust_disgust(amount, max = DISGUST_LEVEL_MAXEDOUT) + var/datum/status_effect/transient/disgust/D = has_status_effect(/datum/status_effect/transient/disgust) + if(!D) + D = apply_status_effect(/datum/status_effect/transient/disgust, amount) + if(D) + D.strength += amount + return D diff --git a/code/modules/mob/living/carbon/carbon_update_status.dm b/code/modules/mob/living/carbon/carbon_update_status.dm index f9200fcff3a..ea4517ff819 100644 --- a/code/modules/mob/living/carbon/carbon_update_status.dm +++ b/code/modules/mob/living/carbon/carbon_update_status.dm @@ -7,7 +7,7 @@ death() create_debug_log("died of damage, trigger reason: [reason]") return - if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health < HEALTH_THRESHOLD_KNOCKOUT && check_death_method() || health <= HEALTH_THRESHOLD_DEAD) // In case anyone is wondering where oldcrit is handled, it's here. + if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || (check_death_method() && getOxyLoss() > 50) || ((HAS_TRAIT(src, TRAIT_FAKEDEATH) && !has_status_effect(/datum/status_effect/ghoul))) || health < HEALTH_THRESHOLD_KNOCKOUT && check_death_method() || health <= HEALTH_THRESHOLD_DEAD) // In case anyone is wondering where oldcrit is handled, it's here. if(stat == CONSCIOUS) KnockOut() create_debug_log("fell unconscious, trigger reason: [reason]") diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 278bfd0fa30..369a04e5496 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -86,24 +86,25 @@ /datum/click_intercept/give/InterceptClickOn(mob/user, params, atom/object) . = TRUE if(user == object || !ishuman(object)) - return + return TRUE var/mob/living/carbon/human/receiver = object if(receiver.stat != CONSCIOUS) to_chat(user, SPAN_WARNING("[receiver] can't accept any items because they're not conscious!")) - return + return TRUE var/obj/item/I = user.get_active_hand() if(!user.Adjacent(receiver)) to_chat(user, SPAN_WARNING("You need to be closer to [receiver] to offer them [I].")) - return + return TRUE if(!receiver.client) to_chat(user, SPAN_WARNING("You offer [I] to [receiver], but they don't seem to respond...")) - return + return TRUE // We use UID() here so that the receiver can have more then one give request at one time. // Otherwise, throwing a new "take item" alert would override any current one also named "take item". receiver.throw_alert("take item [I.UID()]", /atom/movable/screen/alert/take_item, alert_args = list(user, receiver, I)) item_offered = TRUE // TRUE so we don't give them the default chat message in Destroy. to_chat(user, SPAN_NOTICE("You offer [I] to [receiver].")) qdel(src) + return TRUE /** diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 67e5a95643e..c5612ce3030 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -185,7 +185,7 @@ unmutateAllBodyparts() // Defined here solely to take species flags into account without having to recast at mob/living level. -/mob/living/carbon/human/adjustOxyLoss(amount) +/mob/living/carbon/human/adjustOxyLoss(amount, updating_health) if(dna.species && amount > 0) amount *= dna.species.oxy_mod . = ..() @@ -195,7 +195,7 @@ amount *= dna.species.oxy_mod . = ..() -/mob/living/carbon/human/adjustToxLoss(amount) +/mob/living/carbon/human/adjustToxLoss(amount, updating_health = TRUE) if(dna.species && amount > 0) amount *= dna.species.tox_mod . = ..() diff --git a/code/modules/mob/living/carbon/human/human_life.dm b/code/modules/mob/living/carbon/human/human_life.dm index 7106ba91384..4946ed27b2a 100644 --- a/code/modules/mob/living/carbon/human/human_life.dm +++ b/code/modules/mob/living/carbon/human/human_life.dm @@ -201,7 +201,7 @@ var/loc_temp = get_temperature(readonly_environment) //Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit. - if(stat != DEAD) + if(stat != DEAD || !HAS_TRAIT(src, TRAIT_HYPOTHERMIC)) stabilize_temperature_from_calories() //After then, it reacts to the surrounding atmosphere based on your thermal protection @@ -211,7 +211,7 @@ var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) bodytemperature += max((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX) - else + else if(!HAS_TRAIT(src, TRAIT_HYPOTHERMIC)) //Place is hotter than we are var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index 3d71a4230f5..b0181479b33 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -281,6 +281,8 @@ /mob/living/carbon/human/ex_act(severity) if((status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_EXPLOSION_PROOF)) return FALSE + if(HAS_TRAIT(src, TRAIT_BOMBIMMUNE)) + return var/brute_loss = 0 var/burn_loss = 0 @@ -1103,6 +1105,40 @@ ..() + +/mob/living/carbon/human/heal_and_revive(heal_to = 75, revive_message) + // We can't heal them if they're missing a heart + if(!get_int_organ_datum(ORGAN_DATUM_HEART) && can_heartattack() && !ismachineperson(src)) + return FALSE + + // We can't heal them if they're missing their lungs + if(!HAS_TRAIT(src, TRAIT_NOBREATH) && !get_int_organ_datum(ORGAN_DATUM_LUNGS) && !ismachineperson(src)) + return FALSE + + if(ismachineperson(src)) + var/ipc_brute_to_heal = heal_to - getBruteLoss() + var/ipc_burn_to_heal = heal_to - getFireLoss() + if(ipc_brute_to_heal < 0) + adjustBruteLoss(ipc_brute_to_heal, updating_health = FALSE, robotic = TRUE) + if(ipc_burn_to_heal < 0) + adjustFireLoss(ipc_burn_to_heal, updating_health = FALSE, robotic = TRUE) + + if(blood_volume < BLOOD_VOLUME_STABLE + 50) + blood_volume = BLOOD_VOLUME_STABLE + 50 + + . = ..() + if(.) // if revived successfully + set_heartattack(FALSE) + SetLoseBreath(0) + + return . + +/mob/living/carbon/can_be_revived() + if(!get_int_organ(/obj/item/organ/internal/brain) && (!IS_CHANGELING(src)) || HAS_TRAIT(src, TRAIT_HUSK)) + return FALSE + return ..() + + /mob/living/carbon/human/proc/is_lung_ruptured() var/datum/organ/lungs/L = get_int_organ_datum(ORGAN_DATUM_LUNGS) if(!L) diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 2996cd00b66..e92b634c4a6 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -624,7 +624,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(w_uniform && istype(w_uniform, /obj/item/clothing/under)) update_hud_uniform(w_uniform) - if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT)) + if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !HAS_TRAIT(w_uniform, TRAIT_NO_WORN_ICON)) var/worn_icon = listgetindex(w_uniform.sprite_sheets, dna.species.sprite_sheet_name) || w_uniform.worn_icon || 'icons/mob/clothing/under/misc.dmi' var/worn_icon_state = w_uniform.worn_icon_state || w_uniform.icon_state var/mutable_appearance/standing = mutable_appearance(worn_icon, "[worn_icon_state]_s", layer = -UNIFORM_LAYER, alpha = w_uniform.alpha, color = w_uniform.color) @@ -696,7 +696,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(gloves) update_hud_gloves(gloves) - if(!wear_suit || !(wear_suit.flags_inv & HIDEGLOVES)) + if(!wear_suit || !(wear_suit.flags_inv & HIDEGLOVES) && !HAS_TRAIT(gloves, TRAIT_NO_WORN_ICON)) var/worn_icon = listgetindex(gloves.sprite_sheets, dna.species.sprite_sheet_name) || gloves.worn_icon || 'icons/mob/clothing/hands.dmi' var/worn_icon_state = gloves.worn_icon_state || gloves.icon_state var/mutable_appearance/standing = mutable_appearance(worn_icon, worn_icon_state, layer = -GLOVES_LAYER) @@ -765,7 +765,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(l_ear) update_hud_l_ear(l_ear) - if((!head || !(head.flags_inv & HIDEEARS)) && (!wear_mask || !(wear_mask.flags_inv & HIDEEARS))) + if((!head || !(head.flags_inv & HIDEEARS)) && (!wear_mask || !(wear_mask.flags_inv & HIDEEARS)) && !HAS_TRAIT(l_ear, TRAIT_NO_WORN_ICON)) var/worn_icon = listgetindex(l_ear.sprite_sheets, dna.species.sprite_sheet_name) || 'icons/mob/clothing/ears.dmi' var/worn_state = l_ear.worn_icon_state || l_ear.icon_state @@ -774,7 +774,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(r_ear) update_hud_r_ear(r_ear) - if((!head || !(head.flags_inv & HIDEEARS)) && (!wear_mask || !(wear_mask.flags_inv & HIDEEARS))) + if((!head || !(head.flags_inv & HIDEEARS)) && (!wear_mask || !(wear_mask.flags_inv & HIDEEARS)) && !HAS_TRAIT(r_ear, TRAIT_NO_WORN_ICON)) var/worn_icon = listgetindex(r_ear.sprite_sheets, dna.species.sprite_sheet_name) || 'icons/mob/clothing/ears.dmi' var/worn_state = r_ear.worn_icon_state || r_ear.icon_state @@ -794,7 +794,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(shoes) update_hud_shoes(shoes) - if(!wear_suit || !(wear_suit.flags_inv & HIDESHOES)) + if(!wear_suit || !(wear_suit.flags_inv & HIDESHOES) && !HAS_TRAIT(shoes, TRAIT_NO_WORN_ICON)) var/worn_icon = shoes.worn_icon || listgetindex(shoes.sprite_sheets, dna.species.sprite_sheet_name) || 'icons/mob/clothing/feet.dmi' var/worn_icon_state = shoes.worn_icon_state || shoes.icon_state var/mutable_appearance/standing = mutable_appearance(worn_icon, worn_icon_state, layer = -SHOES_LAYER, alpha = shoes.alpha, color = shoes.color) @@ -827,10 +827,11 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(s_store) update_hud_s_store(s_store) - var/worn_icon = s_store.worn_icon || 'icons/mob/clothing/belt_mirror.dmi' - var/worn_icon_state = s_store.worn_icon_state || s_store.icon_state + if(!HAS_TRAIT(s_store, TRAIT_NO_WORN_ICON)) + var/worn_icon = s_store.worn_icon || 'icons/mob/clothing/belt_mirror.dmi' + var/worn_icon_state = s_store.worn_icon_state || s_store.icon_state - overlays_standing[SUIT_STORE_LAYER] = mutable_appearance(worn_icon, worn_icon_state, layer = -SUIT_STORE_LAYER) + overlays_standing[SUIT_STORE_LAYER] = mutable_appearance(worn_icon, worn_icon_state, layer = -SUIT_STORE_LAYER) apply_overlay(SUIT_STORE_LAYER) /mob/living/carbon/human/update_inv_head() @@ -842,40 +843,36 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(head) update_hud_head(head) - var/obj/item/organ/external/head/head_organ = get_organ("head") - var/datum/robolimb/robohead = head_organ.is_robotic() ? GLOB.all_robolimbs[head_organ.model] : null - var/obj/item/clothing/head/head_clothes - if(istype(head, /obj/item/clothing/head)) - head_clothes = head + if(!HAS_TRAIT(head, TRAIT_NO_WORN_ICON)) + var/obj/item/organ/external/head/head_organ = get_organ("head") + var/datum/robolimb/robohead = head_organ.is_robotic() ? GLOB.all_robolimbs[head_organ.model] : null + var/obj/item/clothing/head/head_clothes + if(istype(head, /obj/item/clothing/head)) + head_clothes = head - var/worn_icon = (head_clothes && robohead && robohead.is_monitor ? head_clothes.icon_monitor : FALSE) || listgetindex(head.sprite_sheets, dna.species.sprite_sheet_name) || head.worn_icon || 'icons/mob/clothing/head.dmi' - var/worn_icon_state = head.worn_icon_state || head.icon_state - var/mutable_appearance/standing = mutable_appearance(worn_icon, worn_icon_state, layer = -HEAD_LAYER, alpha = head.alpha, color = head.color) + var/worn_icon = (head_clothes && robohead && robohead.is_monitor ? head_clothes.icon_monitor : FALSE) || listgetindex(head.sprite_sheets, dna.species.sprite_sheet_name) || head.worn_icon || 'icons/mob/clothing/head.dmi' + var/worn_icon_state = head.worn_icon_state || head.icon_state + var/mutable_appearance/standing = mutable_appearance(worn_icon, worn_icon_state, layer = -HEAD_LAYER, alpha = head.alpha, color = head.color) - if(istype(head, /obj/item/clothing/head/helmet/space/plasmaman)) - var/obj/item/clothing/head/helmet/space/plasmaman/P = head - if(!P.up) - standing.overlays += P.visor_icon - else if(P.on && P.light_icon) - standing.overlays += P.light_icon + if(istype(head, /obj/item/clothing/head/helmet/space/plasmaman)) + var/obj/item/clothing/head/helmet/space/plasmaman/P = head + if(!P.up) + standing.overlays += P.visor_icon + else if(P.on && P.light_icon) + standing.overlays += P.light_icon - if(istype(head, /obj/item/clothing/head)) - var/obj/item/clothing/head/w_hat = head - for(var/obj/item/clothing/head/hat in w_hat.attached_hats) - var/hat_worn_icon = (robohead && robohead.is_monitor ? hat.icon_monitor : FALSE) || listgetindex(hat.sprite_sheets, dna.species.sprite_sheet_name) || hat.worn_icon || 'icons/mob/clothing/head.dmi' - var/hat_worn_icon_state = hat.worn_icon_state || hat.icon_state - standing.overlays += image(icon = hat_worn_icon, icon_state = hat_worn_icon_state) + if(istype(head, /obj/item/clothing/head)) + var/obj/item/clothing/head/w_hat = head + for(var/obj/item/clothing/head/hat in w_hat.attached_hats) + var/hat_worn_icon = (robohead && robohead.is_monitor ? hat.icon_monitor : FALSE) || listgetindex(hat.sprite_sheets, dna.species.sprite_sheet_name) || hat.worn_icon || 'icons/mob/clothing/head.dmi' + var/hat_worn_icon_state = hat.worn_icon_state || hat.icon_state + standing.overlays += image(icon = hat_worn_icon, icon_state = hat_worn_icon_state) - for(var/obj/item/clothing/mask/mask in w_hat.attached_masks) - var/mask_worn_icon = listgetindex(mask.sprite_sheets, dna.species.sprite_sheet_name) || mask.worn_icon || 'icons/mob/clothing/mask.dmi' - var/mask_worn_icon_state = mask.worn_icon_state || mask.icon_state - standing.overlays += image(icon = mask_worn_icon, icon_state = mask_worn_icon_state) - - if(head.blood_DNA) - var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "helmetblood") - bloodsies.color = head.blood_color - standing.overlays += bloodsies - overlays_standing[HEAD_LAYER] = standing + if(head.blood_DNA) + var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "helmetblood") + bloodsies.color = head.blood_color + standing.overlays += bloodsies + overlays_standing[HEAD_LAYER] = standing apply_overlay(HEAD_LAYER) /mob/living/carbon/human/update_inv_belt() @@ -901,9 +898,10 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) else worn_layer = BELT_LAYER - var/worn_icon = belt.worn_icon || listgetindex(belt.sprite_sheets, dna.species.sprite_sheet_name) || 'icons/mob/clothing/belt.dmi' - var/worn_icon_state = belt.worn_icon_state || belt.icon_state - overlays_standing[worn_layer] = mutable_appearance(worn_icon, worn_icon_state, layer = -worn_layer) + if(!HAS_TRAIT(belt, TRAIT_NO_WORN_ICON)) + var/worn_icon = belt.worn_icon || listgetindex(belt.sprite_sheets, dna.species.sprite_sheet_name) || 'icons/mob/clothing/belt.dmi' + var/worn_icon_state = belt.worn_icon_state || belt.icon_state + overlays_standing[worn_layer] = mutable_appearance(worn_icon, worn_icon_state, layer = -worn_layer) apply_overlay(BELT_LAYER) apply_overlay(SPECIAL_BELT_LAYER) @@ -916,18 +914,23 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(wear_suit && istype(wear_suit, /obj/item/clothing/suit)) update_hud_wear_suit(wear_suit) + if(!HAS_TRAIT(wear_suit, TRAIT_NO_WORN_ICON)) - var/worn_icon = listgetindex(wear_suit.sprite_sheets, dna.species.sprite_sheet_name) || wear_suit.worn_icon || 'icons/mob/clothing/suit.dmi' - var/worn_icon_state = wear_suit.worn_icon_state || wear_suit.icon_state - var/mutable_appearance/standing = mutable_appearance(worn_icon, worn_icon_state, layer = -SUIT_LAYER, alpha = wear_suit.alpha, color = wear_suit.color) + var/worn_icon = listgetindex(wear_suit.sprite_sheets, dna.species.sprite_sheet_name) || wear_suit.worn_icon || 'icons/mob/clothing/suit.dmi' + var/worn_icon_state = wear_suit.worn_icon_state || wear_suit.icon_state + var/mutable_appearance/standing = mutable_appearance(worn_icon, worn_icon_state, layer = -SUIT_LAYER, alpha = wear_suit.alpha, color = wear_suit.color) - if(wear_suit.blood_DNA) - var/obj/item/clothing/suit/S = wear_suit - var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "[S.blood_overlay_type]blood") - bloodsies.color = wear_suit.blood_color - standing.overlays += bloodsies + if(wear_suit.breakouttime) + drop_l_hand() + drop_r_hand() - overlays_standing[SUIT_LAYER] = standing + if(wear_suit.blood_DNA) + var/obj/item/clothing/suit/S = wear_suit + var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "[S.blood_overlay_type]blood") + bloodsies.color = wear_suit.blood_color + standing.overlays += bloodsies + + overlays_standing[SUIT_LAYER] = standing apply_overlay(SUIT_LAYER) update_tail_layer() @@ -976,7 +979,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) inv?.update_icon() if(wear_mask && (istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory))) - if(!(check_obscured_slots() & ITEM_SLOT_MASK)) + update_hud_wear_mask(wear_mask) + if(!(check_obscured_slots() & ITEM_SLOT_MASK) && !HAS_TRAIT(wear_mask, TRAIT_NO_WORN_ICON)) var/obj/item/organ/external/head/head_organ = get_organ("head") if(!istype(head_organ)) return // Nothing to update here diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm index adf03cbff7e..9e061adf04e 100644 --- a/code/modules/mob/living/init_signals.dm +++ b/code/modules/mob/living/init_signals.dm @@ -153,7 +153,9 @@ /// Called when [TRAIT_FAKEDEATH] is added to the mob. /mob/living/proc/on_fakedeath_trait_gain(datum/source) SIGNAL_HANDLER - ADD_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_FAKEDEATH) + if(!has_status_effect(/datum/status_effect/ghoul)) + ADD_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_FAKEDEATH) //Let us not make ghouls sleep forever + apply_status_effect(STATUS_EFFECT_REVIVABLE) /mob/living/carbon/human/on_fakedeath_trait_gain(datum/source) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1fed6a2680c..337d2dbf53c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -619,6 +619,58 @@ stand_up() // wake the fuck up badmin, we've got an "event" to burn return +/** + * Heals up the mob up to [heal_to] of the main damage types. + * EX: If heal_to is 50, and they have 150 brute damage, they will heal 100 brute (up to 50 brute damage) + * + * If the target is dead, also revives them and heals their organs / restores blood. + * If we have a [revive_message], play a visible message if the revive was successful. + * + * Arguments + * * heal_to - the health threshold to heal the mob up to for each of the main damage types. + * * revive_message - if provided, a visible message to show on a successful revive. + * + * Returns TRUE if the mob is alive afterwards, or FALSE if they're still dead (revive failed). + */ +/mob/living/proc/heal_and_revive(heal_to = 50, revive_message) + + // Heal their brute and burn up to the threshold we're looking for + var/brute_to_heal = heal_to - getBruteLoss() + var/burn_to_heal = heal_to - getFireLoss() + var/oxy_to_heal = heal_to - getOxyLoss() + var/tox_to_heal = heal_to - getToxLoss() + if(brute_to_heal < 0) + adjustBruteLoss(brute_to_heal, updating_health = FALSE) + if(burn_to_heal < 0) + adjustFireLoss(burn_to_heal, updating_health = FALSE) + if(oxy_to_heal < 0) + adjustOxyLoss(oxy_to_heal, updating_health = FALSE) + if(tox_to_heal < 0) + adjustToxLoss(tox_to_heal, updating_health = FALSE) + + // Run updatehealth once to set health for the revival check + updatehealth() + + // We've given them a decent heal. + // If they happen to be dead too, try to revive them - if possible. + if(stat == DEAD && can_be_revived()) + // If the revive is successful, show our revival message (if present). + if(update_revive() && revive_message) + visible_message(revive_message) + + // Finally update health again after we're all done + updatehealth() + + return stat != DEAD + + +/// Checks if we are actually able to ressuscitate this mob. +/// (We don't want to revive then to have them instantly die again) +/mob/living/proc/can_be_revived() + if(health <= HEALTH_THRESHOLD_DEAD) + return FALSE + return TRUE + /mob/living/proc/remove_CC() SetWeakened(0) SetKnockDown(0) @@ -885,6 +937,13 @@ step_towards(src,S) /mob/living/narsie_act() + if(IS_HERETIC(src)) + var/datum/antagonist/heretic/are_you_ascended = IS_HERETIC(src) + if(are_you_ascended.ascended && stat != DEAD) + to_chat(src, SPAN_USERDANGER("You feel the crushing presense of [GET_CULT_DATA(entity_name, "Nar'sie")] pushing down on you. You won't last long!)")) + adjustBruteLoss(40) //Note: Heretics take half damage, this is 20 brute. + adjustBrainLoss(5) + return if(client) make_new_construct(/mob/living/simple_animal/hostile/construct/harvester, src, cult_override = TRUE, create_smoke = TRUE) spawn_dust() diff --git a/code/modules/mob/living/living_life.dm b/code/modules/mob/living/living_life.dm index 93aea2d635c..810d0d67dbe 100644 --- a/code/modules/mob/living/living_life.dm +++ b/code/modules/mob/living/living_life.dm @@ -2,6 +2,11 @@ set waitfor = FALSE set invisibility = 0 + var/signal_result = SEND_SIGNAL(src, COMSIG_LIVING_LIFE, seconds, times_fired) + + if(signal_result & COMPONENT_LIVING_CANCEL_LIFE_PROCESSING) // mmm less work + return + if(HAS_TRAIT(src, TRAIT_FLYING) && !floating) //TODO: Better floating float(TRUE) diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index 1be5f3ab6d8..85a6b38f5d1 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -86,6 +86,10 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) S.message = cultslur(S.message) verb = "slurs" + if(AmountHereticSlurring()) + S.message = hereticslur(S.message) + verb = "slurs" + if(!IsVocal() || HAS_TRAIT(src, TRAIT_MUTE)) S.message = "" return list("verb" = verb) diff --git a/code/modules/mob/living/living_status_procs.dm b/code/modules/mob/living/living_status_procs.dm index f6b425669f3..8500ef77eb5 100644 --- a/code/modules/mob/living/living_status_procs.dm +++ b/code/modules/mob/living/living_status_procs.dm @@ -573,6 +573,20 @@ STATUS EFFECTS /mob/living/proc/AdjustCultSlur(amount, bound_lower = 0, bound_upper = 5 MINUTES) SetCultSlur(directional_bounded_sum(AmountCultSlurring(), amount, bound_lower, bound_upper)) +// Hereticslurring +/mob/living/proc/AmountHereticSlurring() + RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HERETIC_SLUR) + +/mob/living/proc/HereticSlur(amount) + SetHereticSlur(max(AmountHereticSlurring(), amount)) + +/mob/living/proc/SetHereticSlur(amount) + SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HERETIC_SLUR, amount) + +/mob/living/proc/AdjustHereticSlur(amount, bound_lower = 0, bound_upper = 5 MINUTES) + SetHereticSlur(directional_bounded_sum(AmountHereticSlurring(), amount, bound_lower, bound_upper)) + + /* STUN */ /mob/living/proc/IsStunned() //If we're stunned return has_status_effect(STATUS_EFFECT_STUN) @@ -910,6 +924,11 @@ STATUS EFFECTS /mob/living/proc/reset_shocked() flags_2 &= ~ SHOCKED_2 +///Adjust the disgust level of a mob +/mob/proc/adjust_disgust(amount) + return + + #undef RETURN_STATUS_EFFECT_STRENGTH #undef SET_STATUS_EFFECT_STRENGTH diff --git a/code/modules/mob/living/silicon/decoy/decoy.dm b/code/modules/mob/living/silicon/decoy/decoy.dm index d037c20a8a9..839db0f9ace 100644 --- a/code/modules/mob/living/silicon/decoy/decoy.dm +++ b/code/modules/mob/living/silicon/decoy/decoy.dm @@ -45,12 +45,12 @@ raise_alert() . = ..(pass) -/mob/living/silicon/decoy/syndicate/depot/adjustBruteLoss(dmg) - . = ..(dmg) +/mob/living/silicon/decoy/syndicate/depot/adjustBruteLoss(amount, updating_health) + . = ..(amount) updatehealth() -/mob/living/silicon/decoy/syndicate/depot/adjustFireLoss(dmg) - . = ..(dmg) +/mob/living/silicon/decoy/syndicate/depot/adjustFireLoss(amount, updating_health) + . = ..(amount) updatehealth() /mob/living/silicon/decoy/syndicate/depot/ex_act(severity) diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index e742b373e3f..2a41d024803 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -1669,7 +1669,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( mind.remove_antag_datum(/datum/antagonist/mindslave/emagged_robot) mind.remove_antag_datum(/datum/antagonist/mindslave/mindflayer_mindslave_robot) -/mob/living/silicon/robot/adjustOxyLoss(amount) +/mob/living/silicon/robot/adjustOxyLoss(amount, updating_health = TRUE) if(suiciding) return ..() else diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index 96dc8167b84..0b96104eabc 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -461,7 +461,7 @@ if("None") to_chat(src, "Sensor augmentations disabled.") -/mob/living/silicon/adjustToxLoss(amount) +/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE) return STATUS_UPDATE_NONE /mob/living/silicon/get_access() @@ -662,3 +662,6 @@ /mob/living/silicon/plushify(plushie_override, curse_time) . = ..(/obj/item/toy/plushie/borgplushie, curse_time) + +/mob/living/silicon/rust_heretic_act() + adjustBruteLoss(75) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 8c5b69ee89d..2e158408433 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -1178,3 +1178,6 @@ Pass a positive integer as an argument to override a bot's default speed. "on" = on, "UID" = UID(), ) + +/mob/living/simple_animal/bot/rust_heretic_act() + adjustBruteLoss(500) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 53025f10d1c..e82d9b1537a 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -318,6 +318,13 @@ Bring those who still cling to this world of illusion back to the master so they may know Truth." +/mob/living/simple_animal/hostile/construct/harvester/Initialize(mapload) + . = ..() + // Don't give the cult overlay to a rusted harvester, and only give it to the narsi harvester + if(construct_type == "harvester" && icon_state == "harvester") + add_overlay("glow_harvester_cult") + + /mob/living/simple_animal/hostile/construct/harvester/Process_Spacemove(movement_dir = 0, continuous_move = FALSE) return TRUE @@ -327,6 +334,65 @@ AIStatus = AI_ON environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP +/mob/living/simple_animal/hostile/construct/harvester/heretic + name = "Rusted Harvester" + real_name = "Rusted Harvester" + maxHealth = 50 + health = 50 + desc = "A long, thin, decrepit construct originally built to herald Nar'Sie's rise, corrupted and rusted by the forces of the Mansus to spread its will instead." + playstyle_string = "You are a Rusted Harvester, built to serve the Sanguine Apostate, twisted to work the will of the Mansus. You are fragile and weak, but you rend cultists (only) apart on each attack. Follow your Master's orders!" + faction = list("heretic") + construct_type = "rusted_harvester" + construct_spells = list( + /datum/spell/aoe/rust_conversion, + /datum/spell/pointed/rust_construction, + ) + +/mob/living/simple_animal/hostile/construct/harvester/heretic/Initialize(mapload) + . = ..() + AddElement(/datum/element/leeching_walk) + ADD_TRAIT(src, TRAIT_MANSUS_TOUCHED, UID()) + add_overlay("glow_rusted_harvester_heretic") + add_filter("rusted_harvester", 3, list("type" = "outline", "color" = COLOR_GREEN, "size" = 2, "alpha" = 40)) + AddComponent(/datum/component/damage_aura,\ + range = 3,\ + brute_damage = 0.3,\ + burn_damage = 0.3,\ + toxin_damage = 0.3,\ + stamina_damage = 1.5,\ + simple_damage = 1.2,\ + immune_factions = list("heretic"),\ + damage_message = "Your body wilts and withers as it comes near [src]'s aura.",\ + message_probability = 7,\ + current_owner = src,\ + ) + + +/mob/living/simple_animal/hostile/construct/harvester/heretic/attack_animal(mob/living/simple_animal/user, list/modifiers) + // They're pretty fragile so this is probably necessary to prevent bullshit deaths. + if(user == src) + return + return ..() + +/mob/living/simple_animal/hostile/construct/harvester/heretic/AttackingTarget() + if(IS_CULTIST(target)) + melee_damage_lower = min(melee_damage_lower + 5, 40) + melee_damage_upper = min(melee_damage_upper + 5, 40) + else + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + + return ..() + + +/mob/living/simple_animal/hostile/construct/harvester/heretic/Life(seconds, times_fired) + . = ..() + var/turf/adjacent = get_step(src, pick(GLOB.alldirs)) + // 90% chance to be directional, otherwise what we're on top of + var/turf/simulated/land = (issimulatedturf(adjacent) && prob(90)) ? adjacent : get_turf(src) + do_rust_heretic_act(land) + + /mob/living/simple_animal/hostile/construct/proteon name = "Proteon" real_name = "Proteon" diff --git a/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm b/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm new file mode 100644 index 00000000000..8aadf56bb2c --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm @@ -0,0 +1,705 @@ +/mob/living/basic/heretic_summon + name = "Eldritch Demon" + real_name = "Eldritch Demon" + desc = "A horror from beyond this realm." + icon = 'icons/mob/eldritch_mobs.dmi' + mob_biotypes = NONE + response_help_continuous = "thinks better of touching" + response_help_continuous = "flails at" + response_harm_continuous = "reaps" + speak_emote = list("screams") + speed = 0 + a_intent = INTENT_HARM + damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) + unsuitable_atmos_damage = 0 + unsuitable_cold_damage = 0 + universal_speak = TRUE + universal_understand = TRUE + deathmessage = "implodes into itself." + ai_controller = /datum/ai_controller/basic_controller/simple/simple_hostile_obstacles + loot = list(/obj/effect/gibspawner/human) + faction = list("heretic") + basic_mob_flags = DEL_ON_DEATH + + /// Innate spells that are added when a beast is created. + var/list/actions_to_add + +/mob/living/basic/heretic_summon/Initialize(mapload) + . = ..() + for(var/spell in actions_to_add) + var/datum/spell/new_spell = new spell(src) + AddSpell(new_spell) + add_numbering() + +/mob/living/basic/heretic_summon/proc/add_numbering() + name += " ([rand(1,999)])" + +/mob/living/basic/heretic_summon/fire_shark + name = "\improper Fire Shark" + real_name = "Fire Shark" + desc = "It is a eldritch dwarf space shark, also known as a fire shark." + icon = 'icons/mob/eldritch_mobs_64x64.dmi' + icon_state = "fire_shark" + icon_living = "fire_shark" + pass_flags = PASSTABLE | PASSMOB + mob_biotypes = MOB_ORGANIC | MOB_BEAST + speed = -0.5 + health = 30 + maxHealth = 30 + melee_damage_lower = 15 + melee_damage_upper = 20 + melee_attack_cooldown_min = 1.5 SECONDS + melee_attack_cooldown_max = 2.5 SECONDS + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + unsuitable_heat_damage = 0 + pressure_resistance = 200 + attack_sound = 'sound/weapons/bite.ogg' + obj_damage = 50 + attack_verb_continuous = "bites" + attack_verb_simple = "bite" + damage_coeff = list(BRUTE = 1, BURN = 0.25, TOX = 0, STAMINA = 0, OXY = 0) + environment_smash = ENVIRONMENT_SMASH_STRUCTURES + faction = list("heretic") + mob_size = MOB_SIZE_TINY + speak_emote = list("screams") + initial_traits = list(TRAIT_FLYING, TRAIT_SHOCKIMMUNE) + /// How much Phlog should we inject per bite? + var/phlog_per_bite = 2 + +/mob/living/basic/heretic_summon/fire_shark/Initialize(mapload) + . = ..() + AddElement(/datum/element/death_gases, list(SPAWN_GAS_PLASMA = 50)) + AddComponent(/datum/component/swarming, 0, 0) + AddComponent(/datum/component/regenerator, outline_colour = COLOR_MAROON) + +/mob/living/basic/heretic_summon/fire_shark/Process_Spacemove(movement_dir = 0, continuous_move = FALSE) + return TRUE + +/mob/living/basic/heretic_summon/fire_shark/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) + if(!no_effect && !visual_effect_icon) + visual_effect_icon = ATTACK_EFFECT_BITE + ..() + +/mob/living/basic/heretic_summon/fire_shark/melee_attack(atom/target, list/modifiers, ignore_cooldown) + . = ..() + if(. && phlog_per_bite > 0 && iscarbon(target) && (!client || a_intent == INTENT_HARM)) + var/mob/living/carbon/C = target + var/inject_target = pick("chest", "head") + if(C.can_inject(null, FALSE, inject_target, TRUE)) + C.reagents.add_reagent("phlogiston", phlog_per_bite) + +/mob/living/basic/heretic_summon/fire_shark/wild + faction = list("carp", "mining") + +/mob/living/basic/heretic_summon/rust_spirit + name = "Rust Walker" + real_name = "Rusty" + desc = "An incomprehensible abomination. Everywhere it steps, it appears to be actively seeping life out of its surroundings." + icon_state = "rust_walker_s" + icon_living = "rust_walker_s" + status_flags = CANPUSH + maxHealth = 75 + health = 75 + melee_damage_lower = 15 + melee_damage_upper = 20 + sight = SEE_TURFS + actions_to_add = list( + /datum/spell/aoe/rust_conversion/construct, + /datum/spell/fireball/rust_wave/short, + ) + +/mob/living/basic/heretic_summon/rust_spirit/Initialize(mapload) + . = ..() + AddElement(/datum/element/leeching_walk) + +/mob/living/basic/heretic_summon/rust_spirit/setDir(newdir) + . = ..() + if(newdir == NORTH) + icon_state = "rust_walker_n" + else if(newdir == SOUTH) + icon_state = "rust_walker_s" + update_appearance(UPDATE_ICON_STATE) + +/mob/living/basic/heretic_summon/rust_spirit/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) + . = ..() + playsound(src, 'sound/effects/footstep/rustystep1.ogg', 100, TRUE) + +/// Converts unconverted terrain, sprays pocket sand around +/datum/ai_controller/basic_controller/rust_walker + blackboard = list( + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, + ) + + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk/rust + planning_subtrees = list( + /datum/ai_planning_subtree/use_mob_ability/rust_walker, + /datum/ai_planning_subtree/simple_find_target, + /datum/ai_planning_subtree/targeted_mob_ability, + /datum/ai_planning_subtree/attack_obstacle_in_path, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + ) + +/// Moves a lot if healthy and on rust (to find more tiles to rust) or unhealthy and not on rust (to find healing rust) +/// Still moving in random directions though we're not really seeking it out +/datum/idle_behavior/idle_random_walk/rust + +/datum/idle_behavior/idle_random_walk/rust/perform_idle_behavior(seconds_per_tick, datum/ai_controller/controller) + var/mob/living/our_mob = controller.pawn + var/turf/our_turf = get_turf(our_mob) + if(HAS_TRAIT(our_turf, TRAIT_RUSTY)) + walk_chance = (our_mob.health < our_mob.maxHealth) ? 10 : 50 + else + walk_chance = (our_mob.health < our_mob.maxHealth) ? 50 : 10 + return ..() + +/// Use if we're not stood on rust right now +/datum/ai_planning_subtree/use_mob_ability/rust_walker + +/datum/ai_planning_subtree/use_mob_ability/rust_walker/select_behaviors(datum/ai_controller/controller, seconds_per_tick) + var/turf/our_turf = get_turf(controller.pawn) + if(HAS_TRAIT(our_turf, TRAIT_RUSTY)) + return + +/mob/living/basic/heretic_summon/ash_spirit + name = "Ash Man" + real_name = "Ashy" + desc = "An incomprehensible abomination. As it moves, a thin trail of ash follows, appearing from seemingly nowhere." + icon_state = "ash_walker" + icon_living = "ash_walker" + status_flags = CANPUSH + maxHealth = 75 + health = 75 + melee_damage_lower = 15 + melee_damage_upper = 20 + sight = SEE_TURFS + actions_to_add = list( + /datum/spell/ethereal_jaunt/ash, + /datum/spell/pointed/cleave, + /datum/spell/fire_sworn, + ) + +/mob/living/basic/heretic_summon/stalker + name = "Flesh Stalker" + real_name = "Flesh Stalker" + desc = "An abomination made from several limbs and organs. Every moment you stare at it, it appears to shift and change unnaturally." + icon_state = "stalker" + icon_living = "stalker" + status_flags = CANPUSH + maxHealth = 150 + health = 150 + melee_damage_lower = 15 + melee_damage_upper = 20 + sight = SEE_MOBS + ai_controller = /datum/ai_controller/basic_controller/stalker + actions_to_add = list( + /datum/spell/ethereal_jaunt/ash, + /datum/spell/emplosion/heretic, + ) + +/// Changes shape and lies in wait when it has no target, uses EMP and attacks once it does +/datum/ai_controller/basic_controller/stalker + blackboard = list( + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, + ) + movement_delay = 5 SECONDS + ai_movement = /datum/ai_movement/jps + idle_behavior = /datum/idle_behavior/idle_random_walk + planning_subtrees = list( + /datum/ai_planning_subtree/simple_find_target, + /datum/ai_planning_subtree/use_mob_ability, + /datum/ai_planning_subtree/attack_obstacle_in_path, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + ) + +/mob/living/basic/heretic_summon/raw_prophet + name = "Raw Prophet" + real_name = "Raw Prophet" + desc = "An abomination stitched together from a few severed arms and one lost eye." + icon_state = "raw_prophet" + icon_living = "raw_prophet" + status_flags = CANPUSH + melee_damage_lower = 5 + melee_damage_upper = 10 + maxHealth = 65 + health = 65 + sight = SEE_MOBS|SEE_OBJS|SEE_TURFS + ai_controller = /datum/ai_controller/basic_controller/raw_prophet + loot = list(/obj/effect/gibspawner/human, /obj/item/organ/external/arm, /obj/item/organ/internal/eyes) + actions_to_add = list( + /datum/spell/ethereal_jaunt/ash/long, + /datum/spell/remotetalk/eldritch, + /datum/spell/blind/eldritch, + ) + /// The UID to the last target we smacked. Hitting targets consecutively does more damage. + var/last_target + +/// Walk and attack people, blind them when we can +/datum/ai_controller/basic_controller/raw_prophet + blackboard = list( + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, + ) + + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk + planning_subtrees = list( + /datum/ai_planning_subtree/simple_find_target, + /datum/ai_planning_subtree/targeted_mob_ability, + /datum/ai_planning_subtree/attack_obstacle_in_path, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + ) + +/mob/living/basic/heretic_summon/raw_prophet/attack_animal(mob/living/simple_animal/user, list/modifiers) + if(user == src) // Easy to hit yourself + very fragile = accidental suicide, prevent that + return + + return ..() + +/mob/living/basic/heretic_summon/raw_prophet/melee_attack(atom/target, list/modifiers, ignore_cooldown) + if(target.UID() == last_target) + melee_damage_lower = min(melee_damage_lower + 5, 30) + melee_damage_upper = min(melee_damage_upper + 5, 35) + else + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + + . = ..() + if(!.) + return + + SpinAnimation(5, 1) + last_target = target.UID() + +/mob/living/basic/heretic_summon/raw_prophet/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) + . = ..() + var/rotation_degree = (360 / 3) + if(movement_dir & WEST || movement_dir & SOUTH) + rotation_degree *= -1 + + var/matrix/to_turn = matrix(transform) + to_turn = turn(transform, rotation_degree) + animate(src, transform = to_turn, time = 0.1 SECONDS) + +// A summon which floats around the station incorporeally, and can appear in any mirror +/mob/living/basic/heretic_summon/maid_in_the_mirror + name = "Maid in the Mirror" + real_name = "Maid in the Mirror" + desc = "A floating and flowing wisp of chilled air. Glancing at it causes it to shimmer slightly." + icon = 'icons/mob/mob.dmi' + icon_state = "stand" + icon_living = "stand" + speak_emote = list("crackles") + status_flags = CANSTUN | CANPUSH + attack_sound = "shatter" + maxHealth = 80 + health = 80 + melee_damage_lower = 24 //Bit buffed from tg because like, you are not making these as much as cult wraiths + melee_damage_upper = 24 + sight = SEE_MOBS | SEE_OBJS | SEE_TURFS + deathmessage = "shatters and vanishes, releasing a gust of cold air." + initial_traits = list(TRAIT_FLYING) + loot = list( + /obj/item/shard, + /obj/effect/decal/cleanable/ash, + /obj/item/clothing/suit/armor/vest, + /obj/item/organ/internal/lungs, + ) + actions_to_add = list(/datum/spell/bloodcrawl/mirror_walk) + + /// Whether we take damage when we're examined + var/weak_on_examine = TRUE + /// The cooldown after being examined that the same mob cannot trigger it again + var/recent_examine_damage_cooldown = 10 SECONDS + /// A list of uids to people who recently examined us + var/list/recent_examiner_refs = list() + +// Examining them will harm them, on a cooldown. +/mob/living/basic/heretic_summon/maid_in_the_mirror/examine(mob/user) + . = ..() + if(!weak_on_examine) + return + + if(!isliving(user) || user.stat == DEAD) + return + + if(IS_HERETIC_OR_MONSTER(user) || user == src) + return + + var/user_ref = user.UID() + if(user_ref in recent_examiner_refs) + return + + // If we have health, we take some damage + if(health > (maxHealth * 0.125)) + visible_message( + SPAN_WARNING("[src] seems to fade in and out slightly."), + SPAN_USERDANGER("[user]'s gaze pierces your every being!"), + ) + + recent_examiner_refs += user_ref + apply_damage(maxHealth * 0.1) // We take 10% of our health as damage upon being examined + playsound(src, 'sound/effects/ghost2.ogg', 40, TRUE) + addtimer(CALLBACK(src, PROC_REF(clear_recent_examiner), user_ref), recent_examine_damage_cooldown) + + // If we're examined on low enough health we die straight up + else + visible_message( + SPAN_DANGER("[src] vanishes from existence!"), + SPAN_USERDANGER("[user]'s gaze shatters your form, destroying you!"), + ) + + death() + +/mob/living/basic/heretic_summon/maid_in_the_mirror/proc/clear_recent_examiner(mob_ref) + if(!(mob_ref in recent_examiner_refs)) + return + + recent_examiner_refs -= mob_ref + heal_overall_damage(5) + + +// What if we took a linked list... But made it a mob? +/// The "Terror of the Night" / Armsy, a large worm made of multiple bodyparts that occupies multiple tiles +/mob/living/basic/heretic_summon/armsy + name = "Terror of the night" + real_name = "Armsy" + desc = "An abomination made from dozens and dozens of severed and malformed limbs piled onto each other." + icon_state = "armsy_start" + icon_living = "armsy_start" + maxHealth = 200 + health = 200 + melee_damage_lower = 10 + melee_damage_upper = 15 + unsuitable_heat_damage = 0 + move_force = MOVE_FORCE_OVERPOWERING + move_resist = MOVE_FORCE_OVERPOWERING + pull_force = MOVE_FORCE_OVERPOWERING + mob_size = MOB_SIZE_LARGE + sentience_type = SENTIENCE_BOSS + environment_smash = ENVIRONMENT_SMASH_RWALLS + mob_biotypes = MOB_ORGANIC|MOB_EPIC + appearance_flags = PIXEL_SCALE|LONG_GLIDE + obj_damage = 200 + actions_to_add = list(/datum/spell/worm_contract) + ///Previous segment in the chain + var/mob/living/basic/heretic_summon/armsy/backsy + ///Next segment in the chain + var/mob/living/basic/heretic_summon/armsy/front + ///Your old location + var/oldloc + ///Allow / disallow pulling + var/allow_pulling = FALSE + ///How many arms do we have to eat to expand? + var/stacks_to_grow = 5 + ///Currently eaten arms + var/current_stacks = 0 + ///Does this follow other pieces? + var/follow = TRUE + +/* + * Arguments + * * spawn_bodyparts - whether we spawn additional armsy bodies until we reach length. + * * worm_length - the length of the worm we're creating. Below 3 doesn't work very well. + */ +/mob/living/basic/heretic_summon/armsy/Initialize(mapload, spawn_bodyparts = TRUE, worm_length = 6) + . = ..() + if(worm_length < 3) + stack_trace("[type] created with invalid len ([worm_length]). Reverting to 3.") + worm_length = 3 //code breaks below 3, let's just not allow it. + + oldloc = loc + RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(update_chain_links)) + if(!spawn_bodyparts) + return + + allow_pulling = TRUE + // Sets the hp of the head to be exactly the (length * hp), so the head is de facto the hardest to destroy. + maxHealth = worm_length * maxHealth + health = maxHealth + + // The previous link in the chain + var/mob/living/basic/heretic_summon/armsy/prev = src + // The current link in the chain + var/mob/living/basic/heretic_summon/armsy/current + + for(var/i in 1 to worm_length) + current = new type(drop_location(), FALSE) + current.icon_state = "armsy_mid" + current.icon_living = "armsy_mid" + current.ai_controller = null + current.front = prev + prev.backsy = current + prev = current + + prev.icon_state = "armsy_end" + prev.icon_living = "armsy_end" + +/mob/living/basic/heretic_summon/armsy/adjustBruteLoss(amount, updating_health, forced, required_bodytype) + if(backsy) + return backsy.adjustBruteLoss(amount, updating_health, forced) + + return ..() + +/mob/living/basic/heretic_summon/armsy/adjustFireLoss(amount, updating_health, forced, required_bodytype) + if(backsy) + return backsy.adjustFireLoss(amount, updating_health, forced) + + return ..() + +// We are literally a vessel of otherworldly destruction, we bring our own gravity unto this plane +/mob/living/basic/heretic_summon/armsy/Process_Spacemove(movement_dir, continuous_move) + return TRUE + + +/mob/living/basic/heretic_summon/armsy/can_be_pulled() + return FALSE + +/// Updates every body in the chain to force move onto a single tile. +/mob/living/basic/heretic_summon/armsy/proc/contract_next_chain_into_single_tile() + if(!backsy) + return + + backsy.forceMove(loc) + backsy.contract_next_chain_into_single_tile() + +/* + * Recursively get the length of our chain. + */ +/mob/living/basic/heretic_summon/armsy/proc/get_length() + . = 1 + if(backsy) + . += backsy.get_length() + +/// Updates the next mob in the chain to move to our last location. Fixes the chain if somehow broken. +/mob/living/basic/heretic_summon/armsy/proc/update_chain_links() + SIGNAL_HANDLER + + if(!follow) + return + + if(backsy && backsy.loc != oldloc) + backsy.Move(oldloc) + + // self fixing properties if somehow broken + if(front && loc != front.oldloc) + forceMove(front.oldloc) + + oldloc = loc + +/mob/living/basic/heretic_summon/armsy/Destroy() + if(front) + front.icon_state = "armsy_end" + front.icon_living = "armsy_end" + front.backsy = null + front = null + if(backsy) + QDEL_NULL(backsy) // chain destruction baby + return ..() + +/* + * Handle healing our chain. + * + * Eating arms off the ground heals us, + * and if we eat enough arms while above + * a certain health threshold, we even gain back parts! + */ +/mob/living/basic/heretic_summon/armsy/proc/heal() + if(backsy) + backsy.heal() + return + + adjustBruteLoss(-maxHealth * 0.5, FALSE) + adjustFireLoss(-maxHealth * 0.5, FALSE) + + if(health < maxHealth * 0.8) + return + + current_stacks++ + if(current_stacks < stacks_to_grow) + return + + var/mob/living/basic/heretic_summon/armsy/prev = new type(drop_location(), FALSE) + icon_state = "armsy_mid" + icon_living = "armsy_mid" + backsy = prev + prev.icon_state = "armsy_end" + prev.icon_living = "armsy_end" + prev.front = src + prev.ai_controller = null + current_stacks = 0 + +/mob/living/basic/heretic_summon/armsy/melee_attack(atom/target, list/modifiers, ignore_cooldown) + if(istype(target, /obj/item/organ/external/arm)) + playsound(src, 'sound/magic/demon_consume.ogg', 50, TRUE) + qdel(target) + heal() + return + if(target == backsy || target == front) + return + if(!Adjacent(target)) + return + do_attack_animation(target) + + if(ishuman(target)) + var/mob/living/carbon/human/carbon_target = target + + var/list/parts_to_remove = list() + for(var/obj/item/organ/external/bodypart in carbon_target.bodyparts) + if(bodypart.body_part == ARM_LEFT || bodypart.body_part == ARM_RIGHT) + if(!(bodypart.limb_flags & CANNOT_DISMEMBER)) + parts_to_remove += bodypart + + if(parts_to_remove.len && prob(10)) + var/obj/item/organ/external/lost_arm = pick(parts_to_remove) + lost_arm.droplimb(FALSE, DROPLIMB_SHARP) + + return ..() + +/mob/living/basic/heretic_summon/armsy/add_numbering() + return + +/mob/living/basic/heretic_summon/armsy/prime + name = "Lord of the Night" + real_name = "Master of Decay" + maxHealth = 400 + health = 400 + melee_damage_lower = 30 + melee_damage_upper = 50 + +/mob/living/basic/heretic_summon/armsy/prime/Initialize(mapload, spawn_bodyparts = TRUE, worm_length = 9) + . = ..() + var/matrix/matrix_transformation = matrix() + matrix_transformation.Scale(1.4, 1.4) + transform = matrix_transformation + +/mob/living/basic/heretic_summon/star_gazer + name = "\improper Star Gazer" + real_name = "\improper Star Gazer" + desc = "A creature that has been tasked to watch over the stars." + icon = 'icons/mob/96x96eldritch_mobs.dmi' + icon_state = "star_gazer" + icon_living = "star_gazer" + pixel_x = -32 + move_force = MOVE_FORCE_OVERPOWERING + move_resist = MOVE_FORCE_OVERPOWERING + pull_force = MOVE_FORCE_OVERPOWERING + mob_size = MOB_SIZE_LARGE + sentience_type = SENTIENCE_BOSS + environment_smash = ENVIRONMENT_SMASH_RWALLS + mob_biotypes = MOB_ORGANIC|MOB_EPIC + appearance_flags = PIXEL_SCALE|LONG_GLIDE + layer = LARGE_MOB_LAYER + maxHealth = 6000 + health = 6000 + initial_traits = list(TRAIT_FLYING) + obj_damage = 400 + unsuitable_heat_damage = 0 + armor_penetration_flat = 20 + melee_damage_lower = 40 + melee_damage_upper = 40 + attack_verb_continuous = "ravages" + ai_controller = /datum/ai_controller/basic_controller/star_gazer + attack_sound = 'sound/weapons/bladeslice.ogg' + speak_emote = list("ripples out the words") + damage_coeff = list(BRUTE = 1, BURN = 0.5, TOX = 0, STAMINA = 0, OXY = 0) + death_sound = 'sound/magic/cosmic_expansion.ogg' + loot = list(/obj/effect/temp_visual/cosmic_domain) + /// The commands our summoner can give us + var/static/list/pet_commands = list( + /datum/pet_command/idle, + /datum/pet_command/move, + /datum/pet_command/protect_owner, + /datum/pet_command/free, + /datum/pet_command/follow, + /datum/pet_command/attack/star_gazer, + ) + +/mob/living/basic/heretic_summon/star_gazer/death(gibbed) + . = ..() + explosion(loc, 3, 6, 12) + +/mob/living/basic/heretic_summon/star_gazer/Initialize(mapload) + . = ..() + AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + AddComponent(/datum/component/obeys_commands, pet_commands) + RegisterSignal(src, COMSIG_MOVABLE_TELEPORTING, PROC_REF(on_teleport)) + set_light(4, l_color = "#dcaa5b") + +/mob/living/basic/heretic_summon/star_gazer/ex_act(severity, target) + switch(severity) + if(1) + adjustBruteLoss(250) + + if(2) + adjustBruteLoss(100) + + if(3) + adjustBruteLoss(50) + +/mob/living/basic/heretic_summon/star_gazer/Process_Spacemove(movement_dir, continuous_move) + return TRUE + +/mob/living/basic/heretic_summon/star_gazer/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) + if(!no_effect && !visual_effect_icon) + visual_effect_icon = ATTACK_EFFECT_CLAW + ..() + +/mob/living/basic/heretic_summon/star_gazer/melee_attack(atom/target, list/modifiers, ignore_cooldown) + . = ..() + if(!. || !isliving(target)) + return + var/mob/living/living_target = target + living_target.apply_status_effect(/datum/status_effect/star_mark) + living_target.apply_damage(damage = 5, damagetype = BURN) + for(var/mob/living/nearby_mob in range(1, src)) + if(living_target == nearby_mob || !IS_HERETIC(living_target)) + continue + nearby_mob.apply_status_effect(/datum/status_effect/star_mark) + nearby_mob.apply_damage(10) + to_chat(nearby_mob, SPAN_USERDANGER("\The [src] [attack_verb_continuous] you!")) + do_attack_animation(nearby_mob, ATTACK_EFFECT_CLAW) + +/mob/living/basic/heretic_summon/star_gazer/proc/on_teleport() // Nope, can't bait it off station + SIGNAL_HANDLER + return COMPONENT_BLOCK_TELEPORT + +/mob/living/basic/heretic_summon/star_gazer/add_numbering() + return + +/datum/ai_controller/basic_controller/star_gazer + blackboard = list( + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, + BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends/attack_everything, + ) + + ai_movement = /datum/ai_movement/jps + idle_behavior = /datum/idle_behavior/idle_random_walk + planning_subtrees = list( + /datum/ai_planning_subtree/attack_obstacle_in_path/pet_target/star_gazer, + /datum/ai_planning_subtree/pet_planning, + /datum/ai_planning_subtree/simple_find_target, + /datum/ai_planning_subtree/attack_obstacle_in_path/star_gazer, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + ) + +/datum/ai_planning_subtree/attack_obstacle_in_path/star_gazer + attack_behaviour = /datum/ai_behavior/attack_obstructions/star_gazer + +/datum/ai_planning_subtree/attack_obstacle_in_path/pet_target/star_gazer + attack_behaviour = /datum/ai_behavior/attack_obstructions/star_gazer + +/datum/ai_behavior/attack_obstructions/star_gazer + action_cooldown = 0.4 SECONDS + can_attack_turfs = TRUE + +/datum/pet_command/attack/star_gazer + speech_commands = list("attack", "sic", "kill", "slash them", "die", "suffer") + command_feedback = "stares!" + pointed_reaction = "stares intensely!" + refuse_reaction = "..." + requires_pointing = FALSE + +/datum/pet_command/idle/star_gazer + command_feedback = "twinkles." + pointed_reaction = "twinkles!" + diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index c309a5cb2d8..a1409ea873d 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -160,12 +160,12 @@ spider_special_action() ..() -/mob/living/simple_animal/hostile/poison/terror_spider/adjustBruteLoss(damage) - . = ..(damage) +/mob/living/simple_animal/hostile/poison/terror_spider/adjustBruteLoss(ammount, updating_health) + . = ..(ammount) Retaliate() -/mob/living/simple_animal/hostile/poison/terror_spider/adjustFireLoss(damage) - . = ..(damage) +/mob/living/simple_animal/hostile/poison/terror_spider/adjustFireLoss(ammount, updating_health) + . = ..(ammount) Retaliate() /mob/living/simple_animal/hostile/poison/terror_spider/proc/Retaliate() diff --git a/code/modules/mob/living/simple_animal/simple_animal_damage.dm b/code/modules/mob/living/simple_animal/simple_animal_damage.dm index bd851f58352..1e44d9ae476 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_damage.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_damage.dm @@ -25,6 +25,6 @@ if(damage_coeff[CLONE]) return adjustHealth(amount * damage_coeff[CLONE], updating_health) -/mob/living/simple_animal/adjustStaminaLoss(amount, updating_health = TRUE) +/mob/living/simple_animal/adjustStaminaLoss(amount, updating = TRUE) if(damage_coeff[STAMINA]) - return ..(amount*damage_coeff[STAMINA], updating_health) + return ..(amount*damage_coeff[STAMINA], updating) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 40af887e57e..7b2bc2be410 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -75,6 +75,7 @@ IMPCHEM_HUD = 'icons/mob/hud/sechud.dmi', IMPTRACK_HUD = 'icons/mob/hud/sechud.dmi', PRESSURE_HUD = 'icons/effects/effects.dmi', + HERETIC_HUD = 'icons/effects/eldritch.dmi', MALF_AI_HUD = 'icons/mob/hud/malfhud.dmi', ANOMALOUS_HUD = 'icons/effects/effects.dmi', ) diff --git a/code/modules/mob/mob_misc_procs.dm b/code/modules/mob/mob_misc_procs.dm index 34109301d4f..dfbb2be1535 100644 --- a/code/modules/mob/mob_misc_procs.dm +++ b/code/modules/mob/mob_misc_procs.dm @@ -122,6 +122,7 @@ SPECIAL_ROLE_HEAD_REV, SPECIAL_ROLE_REV, SPECIAL_ROLE_TRAITOR, + SPECIAL_ROLE_HERETIC, SPECIAL_ROLE_VAMPIRE, SPECIAL_ROLE_VAMPIRE_THRALL, SPECIAL_ROLE_DEATHSQUAD @@ -765,6 +766,47 @@ counter -= 1 return newphrase.Join("") +/proc/hereticslur(phrase) + phrase = html_decode(phrase) + var/leng = length_char(phrase) + var/counter = length_char(phrase) + var/list/newphrase = list() + var/newletter + while(counter >= 1) + newletter = copytext_char(phrase, (leng - counter) + 1, (leng - counter) + 2) + if(prob(50)) + if(lowertext(newletter) == "o") + newletter = "u" + if(lowertext(newletter) == "t") + newletter = "ch" + if(lowertext(newletter) == "a") + newletter = "ah" + if(lowertext(newletter) == "i") + newletter = "ks" + if(lowertext(newletter) == "c") + newletter = "th" + if(lowertext(newletter) == "m") + newletter = "nth" + if(prob(25)) + if(newletter == " ") + newletter = " endless... " + if(newletter == "H") + newletter = " THE HANDS... " + if(newletter == "h") + newletter = " BRIGHT " + if(newletter == "s") + newletter = " LEAK " + if(newletter == "r") + newletter = " CRACK " + + if(prob(33.33)) + newletter = pick("'", "br", "th", "see", "etch") + + newphrase += newletter + counter -= 1 + return newphrase.Join("") + + // Why does this exist? /mob/proc/get_preference(toggleflag) if(!client) diff --git a/code/modules/power/apc/apc.dm b/code/modules/power/apc/apc.dm index a5c7decd05b..5b687a9c867 100644 --- a/code/modules/power/apc/apc.dm +++ b/code/modules/power/apc/apc.dm @@ -1161,6 +1161,9 @@ /obj/machinery/power/apc/unbuilt/Initialize(mapload, direction, building) . = ..(building = TRUE) +/obj/machinery/power/apc/rust_heretic_act() + obj_integrity -= 35 + return MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc, 24, 24) MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc/syndicate, 24, 24) diff --git a/code/modules/power/cables/cable.dm b/code/modules/power/cables/cable.dm index 1d8ad4637e7..0960f5a11e6 100644 --- a/code/modules/power/cables/cable.dm +++ b/code/modules/power/cables/cable.dm @@ -519,6 +519,9 @@ By design, d1 is the smallest direction and d2 is the highest /obj/structure/cable/extra_insulated/attack_ai(mob/user) toggle_connection(user) +/obj/structure/cable/rust_heretic_act() + return FALSE + // // This ASCII art represents my brain after looking at cable // code for too long, half of this was written before I was even diff --git a/code/modules/projectiles/projectile/special_projectiles.dm b/code/modules/projectiles/projectile/special_projectiles.dm index 02ada2d5ffa..9e06d0ac382 100644 --- a/code/modules/projectiles/projectile/special_projectiles.dm +++ b/code/modules/projectiles/projectile/special_projectiles.dm @@ -426,3 +426,107 @@ var/mob/living/basic/mimic/copy/ranged/R = new /mob/living/basic/mimic/copy/ranged(T, G, firer) if(ismob(target)) R.ai_controller.set_blackboard_key(BB_BASIC_MOB_CURRENT_TARGET, target) + +/obj/effect/ebeam/curse_arm + name = "curse arm" + +/obj/projectile/curse_hand + name = "curse hand" + icon_state = "cursehand0" + base_icon_state = "cursehand" + hitsound = 'sound/effects/curse/curse4.ogg' + layer = LARGE_MOB_LAYER + damage = 0 + speed = 1.5 + range = 16 + forcedodge = -1 + var/burn_damage = 10 + var/weaken_damage = 2 SECONDS + var/datum/beam/arm + var/handedness = 0 + +/obj/projectile/curse_hand/Initialize(mapload) + . = ..() + handedness = prob(50) + icon_state = "[base_icon_state][handedness]" + +/obj/projectile/curse_hand/Destroy() + QDEL_NULL(arm) + return ..() + +/obj/projectile/curse_hand/update_icon_state() + icon_state = "[base_icon_state]0[handedness]" + return ..() + +/obj/projectile/curse_hand/fire(setAngle) + if(QDELETED(src)) //I'm going to try returning nothing because if it's being deleted, surely we don't want anything to happen? + return + if(starting) + arm = Beam(starting, icon_state = "curse[handedness]", beam_type=/obj/effect/ebeam/curse_arm, maxdistance = 20) + ..() + +/obj/projectile/curse_hand/on_range() + finale() + return ..() + +/// The visual effect for the hand disappearing +/obj/projectile/curse_hand/proc/finale() + if(arm) + QDEL_NULL(arm) + playsound(src, 'sound/effects/curse/curse3.ogg', 25, TRUE, -1) + var/turf/T = get_turf(src) + var/obj/effect/temp_visual/dir_setting/curse/hand/leftover = new(T, get_dir(starting, T)) + leftover.icon_state = icon_state + for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting) + qdel(G) + if(!T) //T can be in nullspace when src is set to QDEL + return + new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, get_dir(starting, T)) + var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 5 SECONDS, maxdistance = 21, beam_type=/obj/effect/ebeam/curse_arm) + for(var/obj/effect/every in D.elements) + animate(every, alpha = 0, time = 32) + qdel(src) + +/obj/projectile/curse_hand/on_hit(atom/target, blocked, pierce_hit) + . = ..() + if(target == original) + if(isliving(target)) + var/mob/living/out_target = target + out_target.apply_damage(burn_damage, BURN) + out_target.Weaken(weaken_damage) + finale() + +/obj/projectile/curse_hand/hel //Used in helbital's impure reagent + name = "Hel's grasp" + speed = 1 + range = 20 + color = "#ff7e7e"//Tint it slightly + burn_damage = 5 + weaken_damage = 0 //Lets not stun people! + + +/obj/effect/temp_visual/dir_setting/curse + icon_state = "curse" + duration = 32 + var/fades = TRUE + +/obj/effect/temp_visual/dir_setting/curse/Initialize(mapload, set_dir) + . = ..() + if(fades) + animate(src, alpha = 0, time = 32) + + +/obj/effect/temp_visual/dir_setting/curse/grasp_portal + icon = 'icons/effects/64x64.dmi' + layer = ABOVE_ALL_MOB_LAYER + pixel_y = -16 + pixel_x = -16 + fades = FALSE + +/obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading + fades = TRUE + + +/obj/effect/temp_visual/dir_setting/curse/hand + icon_state = "cursehand1" + diff --git a/code/modules/projectiles/projectile_base.dm b/code/modules/projectiles/projectile_base.dm index cbb46655213..f2e81a4ddad 100644 --- a/code/modules/projectiles/projectile_base.dm +++ b/code/modules/projectiles/projectile_base.dm @@ -96,6 +96,9 @@ /// Does this projectile hit living non dense mobs? var/always_hit_living_nondense = FALSE + /// Is this projectile forced to not make hit messages or sound to avoid spam? + var/force_no_hit_message_or_sound = FALSE + //Hitscan var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored. var/list/beam_segments //assoc list of datum/point_precise or datum/point_precise/vector, start = end. Used for hitscan effect generation. @@ -139,6 +142,8 @@ var/ricochet_incidence_leeway = 40 /// Can our ricochet autoaim hit our firer? var/ricochet_shoots_firer = TRUE + /// Do we always bounce off non mobs? + var/always_nonmob_ricochet = FALSE /// determines what type of antimagic can block the spell projectile var/antimagic_flags @@ -240,15 +245,16 @@ var/organ_hit_text = "" if(L.has_limbs) organ_hit_text = " in \the [parse_zone(def_zone)]" - if(suppressed) - playsound(loc, hitsound, 5, TRUE, -1) - to_chat(L, SPAN_USERDANGER("You're shot by \a [src][organ_hit_text]!")) - else - if(hitsound) - var/volume = vol_by_damage() - playsound(loc, hitsound, volume, TRUE, -1) - L.visible_message(SPAN_DANGER("[L] is hit by \a [src][organ_hit_text]!"), \ - SPAN_USERDANGER("[L] is hit by \a [src][organ_hit_text]!")) //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter + if(!force_no_hit_message_or_sound) + if(suppressed) + playsound(loc, hitsound, 5, TRUE, -1) + to_chat(L, SPAN_USERDANGER("You're shot by \a [src][organ_hit_text]!")) + else + if(hitsound) + var/volume = vol_by_damage() + playsound(loc, hitsound, volume, TRUE, -1) + L.visible_message(SPAN_DANGER("[L] is hit by \a [src][organ_hit_text]!"), \ + SPAN_USERDANGER("[L] is hit by \a [src][organ_hit_text]!")) //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter if(immolate) L.adjust_fire_stacks(immolate) L.IgniteMob() @@ -295,6 +301,7 @@ if(hitscan && ricochets_max > 10) ricochets_max = 10 //I do not want a chucklefuck editing this higher, sorry. ricochets++ + ricochet_chance *= ricochet_decay_chance // Note: I should impliment ricohet decay damage. I'm not doing that during heretic as balance scope if(A.handle_ricochet(src)) on_ricochet(A) permutated.Cut() @@ -499,6 +506,7 @@ /obj/projectile/proc/check_ricochet() if(prob(ricochet_chance)) + return TRUE return FALSE @@ -509,6 +517,9 @@ if((flag in list(BOMB, BULLET)) && (A.flags_ricochet & RICOCHET_HARD)) return TRUE + if(!ismob(A) && always_nonmob_ricochet) + return TRUE + return FALSE /obj/projectile/set_angle(new_angle) diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 665b872bd70..b4054043a84 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -30,6 +30,7 @@ /obj/item/stack/sheet/mineral/gold = list("gold" = 20), /obj/item/stack/sheet/saltpetre_crystal = list("saltpetre" = 8), /obj/item/stack/sheet/plastic = list("plastic_dust" = 5), + /obj/item/stack/ore/bluespace_crystal = list("bluespace_dust" = 20), // Blender Stuff /obj/item/food/grown/tomato = list("ketchup" = 0), diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index b12d33e645d..4fab420b4d4 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -224,9 +224,8 @@ var/mouth_covered = victim.is_mouth_covered() var/eyes_covered = victim.is_eyes_covered() - if(!mouth_covered) + if(!mouth_covered && !(victim.flags & GODMODE)) victim.apply_status_effect(STATUS_EFFECT_PEPPERSPRAYED) - if(!eyes_covered) to_chat(victim, SPAN_DANGER("Your eyes burns!")) victim.Stun(0.5 SECONDS) diff --git a/code/modules/reagents/chemistry/reagents/misc_reagents.dm b/code/modules/reagents/chemistry/reagents/misc_reagents.dm index 6fda8d94d33..27adb69c25b 100644 --- a/code/modules/reagents/chemistry/reagents/misc_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/misc_reagents.dm @@ -888,3 +888,25 @@ var/original_volume = volume holder.del_reagent(id) holder.add_reagent("molten_plastic", original_volume, reagtemp = T0C + 120) +/datum/reagent/bluespace + name = "Bluespace Dust" + id = "bluespace_dust" + description = "A dust composed of microscopic bluespace crystals, with minor space-warping properties." + color = "#0000CC" + taste_description = "fizzling blue" + +/datum/reagent/bluespace/reaction_mob(mob/living/M, method, volume, show_message) //Qwertodo after heretic: I wanted to do more with this + . = ..() + if(method == REAGENT_TOUCH) + do_teleport(M, get_turf(M), (volume / 5), sound_in = 'sound/effects/phasein.ogg') //4 tiles per crystal + +/datum/reagent/bluespace/on_mob_life(mob/living/M) + if(current_cycle > 10 && prob(10)) + to_chat(M, "You feel unstable...") + M.Jitter(2 SECONDS) + current_cycle = 1 + addtimer(CALLBACK(M, TYPE_PROC_REF(/mob/living, bluespace_shuffle)), 3 SECONDS) + return ..() + +/mob/living/proc/bluespace_shuffle() + do_teleport(src, get_turf(src), 5, sound_in = 'sound/effects/phasein.ogg') diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 14c88f93e3e..19ad781c571 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -444,6 +444,79 @@ M.AdjustCultSlur(20 SECONDS) //CUASE WHY THE HELL NOT return ..() | update_flags +// unholy water, but for heretics. +// why couldn't they have both just used the same reagent? +// who knows. +// maybe nar'sie is considered to be too "mainstream" of a god to worship in the heretic community. +/datum/reagent/eldritch + name = "Eldritch Essence" + id = "eldritch" + description = "A strange liquid that defies the laws of physics. \ + It re-energizes and heals those who can see beyond this fragile reality, \ + but is incredibly harmful to the closed-minded. It metabolizes very quickly." + taste_description = "Ag'hsj'saje'sh" + process_flags = ORGANIC | SYNTHETIC + color = "#1f8016" + metabolization_rate = 1 + +/datum/reagent/eldritch/on_mob_life(mob/living/M) + var/update_flags = STATUS_UPDATE_NONE + if(IS_HERETIC_OR_MONSTER(M)) + M.AdjustDrowsy(-10 SECONDS) + M.AdjustParalysis(-2 SECONDS) + M.AdjustStunned(-4 SECONDS) + M.AdjustWeakened(-4 SECONDS) + M.AdjustKnockDown(-4 SECONDS) + update_flags |= M.adjustStaminaLoss(-25, FALSE) + update_flags |= M.adjustToxLoss(-1, FALSE) + update_flags |= M.adjustFireLoss(-1, FALSE) + update_flags |= M.adjustOxyLoss(-1, FALSE) + update_flags |= M.adjustBruteLoss(-1, FALSE) + if(M.blood_volume < BLOOD_VOLUME_NORMAL) + M.blood_volume += 3 + else + update_flags |= M.adjustBrainLoss(3, FALSE) + update_flags |= M.adjustToxLoss(1, FALSE) + update_flags |= M.adjustFireLoss(2, FALSE) + update_flags |= M.adjustOxyLoss(2, FALSE) + update_flags |= M.adjustBruteLoss(2, FALSE) + return ..() | update_flags + + +/datum/reagent/helgrasp + name = "Helgrasp" + id = "helgrasp" + description = "This rare and forbidden concoction is thought to bring you closer to the grasp of the Norse goddess Hel." + metabolization_rate = 0.5 + /// How much toxin damage do we do each tick? + var/toxin_damage = 0.25 + //Keeps track of the hand timer so we can cleanup on removal + +//Warns you about the impenting hands +/datum/reagent/helgrasp/on_mob_add(mob/living/affected_mob, amount) + . = ..() + to_chat(affected_mob, SPAN_HIEROPHANT("You hear laughter as malevolent hands apparate before you, eager to drag you down to hell...! Look out!")) + playsound(affected_mob.loc, 'sound/effects/ahaha.ogg', 80, TRUE, -1) //Very obvious tell so people can be ready + +//Sends hands after you for your hubris +/datum/reagent/helgrasp/on_mob_life(mob/living/carbon/affected_mob) + var/update_flags = STATUS_UPDATE_NONE + update_flags |= affected_mob.adjustToxLoss(toxin_damage, FALSE) + spawn_hands(affected_mob) + return ..() | update_flags + +/datum/reagent/helgrasp/proc/spawn_hands(mob/living/carbon/affected_mob) + if(!affected_mob && iscarbon(holder.my_atom))//Catch timer + affected_mob = holder.my_atom + fire_curse_hand(affected_mob) + +/datum/reagent/helgrasp/heretic + name = "Grasp of the Mansus" + id = "mansusgrasp" + process_flags = ORGANIC | SYNTHETIC + description = "The Hand of the Mansus is at your neck." + toxin_damage = 0 + /datum/reagent/hellwater name = "Hell Water" id = "hell_water" diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 06cfbeec16e..f046d9eaa2c 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -264,6 +264,7 @@ return SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src) + SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner) owner.internal_organs -= src diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 814aef0cfd6..8cd464c48cf 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -958,6 +958,7 @@ Note that amputating the affected organ does in fact remove the infection from t return SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src) + SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner) var/mob/living/carbon/human/victim = owner if(status & ORGAN_SPLINTED) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index fb2ea36f40a..1b9f9211501 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -106,6 +106,7 @@ if(owner.stat == DEAD) ADD_TRAIT(src, TRAIT_ORGAN_INSERTED_WHILE_DEAD, "[UID()]") RegisterSignal(owner, COMSIG_LIVING_DEFIBBED, PROC_REF(on_revival)) + SEND_SIGNAL(src, COMSIG_ORGAN_IMPLANTED, owner) // Removes the given organ from its owner. @@ -114,7 +115,8 @@ /obj/item/organ/internal/remove(mob/living/carbon/M, special = 0) if(!owner) stack_trace("\'remove\' called on [src] without an owner! Mob: [M], [atom_loc_line(M)]") - SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN) + SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src) + SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner) REMOVE_TRAIT(src, TRAIT_ORGAN_INSERTED_WHILE_DEAD, "[UID()]") UnregisterSignal(owner, COMSIG_LIVING_DEFIBBED) diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 05f7805a7c8..8a9ba041dc5 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -135,6 +135,8 @@ GLOBAL_LIST_INIT(voice_of_god_commands, init_voice_of_god_commands()) spans = "colossus yell" //reset spans, just in case someone gets deculted or the cords change owner if(IS_CULTIST(owner)) spans += "narsiesmall" + if(IS_HERETIC(owner)) + spans = "hierophant_warning" return "[uppertext(message)]" /obj/item/organ/internal/vocal_cords/colossus/speak_with(message) @@ -177,6 +179,10 @@ GLOBAL_LIST_INIT(voice_of_god_commands, init_voice_of_god_commands()) if(IS_CULTIST(owner)) power_multiplier *= 2 + //Similarly, heretics are used to using the mansus, however they will also give themselfs away! + if(IS_HERETIC(owner)) + power_multiplier *= 2 + //It's magic, they are a wizard. if(iswizard(owner)) power_multiplier *= 2.5 diff --git a/code/modules/tooltip/tooltip.html b/code/modules/tooltip/tooltip.html index d2c6016b1a9..9428ded82f1 100644 --- a/code/modules/tooltip/tooltip.html +++ b/code/modules/tooltip/tooltip.html @@ -103,7 +103,7 @@ window.location = 'byond://winset?id='+tooltip.control+';is-visible=false'; }, updateCallback: function(map) { - if (typeof map === 'undefined' || !map) {return false;} + if(typeof map === 'undefined' || !map) {return false;} //alert(tooltip.params+' | '+tooltip.clientView+' | '+tooltip.text+' | '+tooltip.theme); //DEBUG @@ -140,7 +140,7 @@ } //Sometimes screen-loc is never sent ahaha fuck you byond - if (!parameters["icon-x"] || !parameters["icon-y"] || !parameters["screen-loc"]) { + if(!parameters["icon-x"] || !parameters["icon-y"] || !parameters["screen-loc"]) { return false; } //icon-x @@ -150,10 +150,10 @@ //screen-loc var screenLoc = parameters["screen-loc"]; screenLoc = screenLoc.split(','); - if (screenLoc.length < 2) {return false;} + if(screenLoc.length < 2) {return false;} var left = screenLoc[0]; var top = screenLoc[1]; - if (!left || !top) {return false;} + if(!left || !top) {return false;} screenLoc = left.split(':'); left = parseInt(screenLoc[0]); var enteredX = parseInt(screenLoc[1]); @@ -166,26 +166,26 @@ var oScreenLoc = tooltip.params.screenLoc.split(','); //o for original ok var west = oScreenLoc[0].split(':'); - if (west.length > 1) { //Only if west has a pixel offset + if(west.length > 1) { //Only if west has a pixel offset var westOffset = parseInt(west[1]); - if (westOffset !== 0) { - if ((iconX + westOffset) !== enteredX) { //Cursor entered on the offset tile + if(westOffset !== 0) { + if((iconX + westOffset) !== enteredX) { //Cursor entered on the offset tile left = left + (westOffset < 0 ? 1 : -1); } leftOffset = leftOffset + (westOffset * resizeRatioX); } } - if (oScreenLoc.length > 1) { //If north is given + if(oScreenLoc.length > 1) { //If north is given var north = oScreenLoc[1].split(':'); - if (north.length > 1) { //Only if north has a pixel offset + if(north.length > 1) { //Only if north has a pixel offset var northOffset = parseInt(north[1]); - if (northOffset !== 0) { - if ((iconY + northOffset) === enteredY) { //Cursor entered on the original tile + if(northOffset !== 0) { + if((iconY + northOffset) === enteredY) { //Cursor entered on the original tile top--; topOffset = topOffset - ((tooltip.tileSize + northOffset) * resizeRatioY); } else { //Cursor entered on the offset tile - if (northOffset < 0) { //Offset southwards + if(northOffset < 0) { //Offset southwards topOffset = topOffset - ((tooltip.tileSize + northOffset) * resizeRatioY); } else { //Offset northwards top--; @@ -197,7 +197,7 @@ } //Handle special cases (for fuck sake) - if (tooltip.special !== 'none') { + if(tooltip.special !== 'none') { //Put yo special cases here } @@ -222,14 +222,14 @@ $wrap.width($wrap.width() + 2); //Dumb hack to fix a bizarre sizing bug var pixelRatio = 1; - if (window.devicePixelRatio) { + if(window.devicePixelRatio) { pixelRatio = window.devicePixelRatio; } var docWidth = Math.floor($wrap.outerWidth() * pixelRatio), docHeight = Math.floor($wrap.outerHeight() * pixelRatio); - if (posY + docHeight > map.size.y) { //Is the bottom edge below the window? Snap it up if so + if(posY + docHeight > map.size.y) { //Is the bottom edge below the window? Snap it up if so posY = (posY - docHeight) - realIconSizeY - tooltip.padding; } diff --git a/code/modules/vehicle/tg_vehicles/moon_roller.dm b/code/modules/vehicle/tg_vehicles/moon_roller.dm new file mode 100644 index 00000000000..dc1b7b2366b --- /dev/null +++ b/code/modules/vehicle/tg_vehicles/moon_roller.dm @@ -0,0 +1,218 @@ +#define ROT_LEFT 0 +#define ROT_RIGHT 1 +#define ROT_NONE 2 + +/obj/tgvehicle/moon_ascension + name = "Avatar of the Moon" + desc = "A vessel of pure moonlight that has taken the form of the full moon. It shines with a dizzying radiance. You should probably run." + icon_state = "base" + icon = 'icons/vehicles/moon.dmi' + move_resist = INFINITY + move_force = MOVE_FORCE_OVERPOWERING + layer = ABOVE_ALL_MOB_LAYER + max_integrity = 5000 + armor = list(MELEE = -100, BULLET = 0, LASER = 50, ENERGY = 50, BOMB = 20, RAD = INFINITY, FIRE = INFINITY, ACID = INFINITY) // weak to physical. Resistant to energy. + pixel_x = -16 + pixel_y = 6 + pass_flags = null + /// What direction do we wish to spin + var/rotation_dir = ROT_NONE + /// Hold our old location to know when to stop spinning + var/turf/old_loc + /// Holds our moonrays effect + var/obj/effect/moonray/moonray + /// Who is the moon's owner? + var/mob/living/carbon/owner + /// Holds our armor to apply onto our rider. We want to kill the moon not the rider, with exception (like bombs). + var/datum/armor/moon_resistance_boost + + + +/obj/tgvehicle/moon_ascension/Initialize(mapload) + . = ..() + START_PROCESSING(SSprocessing, src) + AddElement(/datum/element/ridable, /datum/component/riding/vehicle/moon) + set_light(30, 4, "#ff4b4b") + +/obj/tgvehicle/moon_ascension/Destroy(force) + STOP_PROCESSING(SSprocessing, src) + QDEL_NULL(moonray) + . = ..() + +/obj/tgvehicle/moon_ascension/Bump(atom/bumped_atom) + . = ..() + if(iscarbon(bumped_atom)) + var/mob/living/carbon/C = bumped_atom + C.AdjustKnockDown(10 SECONDS) + else if(isliving(bumped_atom)) + var/mob/living/L = bumped_atom + if(L.stat == DEAD) + L.gib() + L.adjustBruteLoss(25) + step(L, dir) + else if(isobj(bumped_atom)) + var/obj/O = bumped_atom + O.take_damage(200, BRUTE, MELEE, 1) + else if(bumped_atom.type == /turf/simulated/wall) + var/turf/simulated/wall/wall = bumped_atom + playsound(wall, 'sound/effects/meteorimpact.ogg', 80, 1) + wall.dismantle_wall(TRUE, FALSE) + +/obj/tgvehicle/moon_ascension/Move(newloc, dir) + . = ..() + for(var/mob/living/victim in loc) + if(is_occupant(victim)) + continue + if(victim.stat == DEAD) + continue + if(HAS_TRAIT(victim, TRAIT_CLOWN_CAR_SQUISHED)) + continue + squish_victim(victim) + +/obj/tgvehicle/moon_ascension/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/user) + if(!istype(user)) + return FINISH_ATTACK + if(user != owner) + to_chat(user, SPAN_HIEROPHANT("GET YOUR FILTHY HANDS OFF MY RADIANT FORM!")) + user.AdjustKnockDown(5 SECONDS) + user.AdjustJitter(30 SECONDS, 30 SECONDS, 2 MINUTES) + user.AdjustConfused(5 SECONDS) + user.adjustFireLoss(10) + return FINISH_ATTACK + return ..() + +/// Damage and flatten our poor victim +/obj/tgvehicle/moon_ascension/proc/squish_victim(mob/living/victim) + if(iscarbon(victim)) + var/mob/living/carbon/C = victim + ADD_TRAIT(victim, TRAIT_CLOWN_CAR_SQUISHED, "moon_roller") + addtimer(CALLBACK(src, PROC_REF(allow_resquish), C), 3 SECONDS) + var/datum/status_effect/stacking/heretic_insanity/insanity = C.has_status_effect(/datum/status_effect/stacking/heretic_insanity) + if(C.mind && insanity && insanity.stacks >= 8 && prob(insanity.stacks * 2.5)) + C.AdjustKnockDown(5 SECONDS) + C.visible_message(SPAN_HIEROPHANT_WARNING("[victim] is dazzled by the brillian lights!")) + victim.apply_status_effect(/datum/status_effect/moon_converted) + add_attack_logs(owner, victim, "[victim] was driven insane by [owner]([src])") + log_game("[victim] was driven insane by [owner]") + C.adjustBruteLoss(-30) + C.adjustBruteLoss(-30) + playsound(victim, 'sound/effects/clowncar/cartoon_splat.ogg', 75) + playsound(victim, 'sound/effects/splat.ogg', 50, TRUE) + else + playsound(victim, 'sound/effects/blobattack.ogg', 40, TRUE) + playsound(victim, 'sound/effects/splat.ogg', 50, TRUE) + C.adjustBruteLoss(30) + handle_squish_carbon(victim, 40, duration = 3 SECONDS) + C.apply_status_effect(/datum/status_effect/stacking/heretic_insanity, 2) + +/obj/tgvehicle/moon_ascension/proc/allow_resquish(mob/living/victim) + REMOVE_TRAIT(victim, TRAIT_CLOWN_CAR_SQUISHED, "moon_roller") + +/obj/tgvehicle/moon_ascension/buckle_mob(mob/living/carbon/M, force, check_loc) + if(M != owner) + to_chat(M, SPAN_HIEROPHANT("YOU THINK YOU ARE WORTHY OF THE MOONS RADIANCE!?")) + M.AdjustKnockDown(5 SECONDS) + M.AdjustJitter(30 SECONDS, 30 SECONDS, 2 MINUTES) + M.AdjustConfused(5 SECONDS) + M.adjustFireLoss(10) + return FALSE + if(!istype(M)) + to_chat(M, SPAN_HIEROPHANT("Only a suitable human may pilot the moon's greatness.")) + return FALSE + return ..() + +/obj/tgvehicle/moon_ascension/post_buckle_mob(mob/living/carbon/human/M, force, check_loc) + . = ..() + M.plane = 20 + moonray = new(M) + M.vis_contents += moonray + moon_resistance_boost = new /datum/armor(INFINITY, INFINITY, INFINITY, INFINITY, 100, 50, 50, 50, 0) + M.physiology.armor = M.physiology.armor.attachArmor(moon_resistance_boost) + M.physiology.stamina_mod *= 0.25 + add_filter("heavenly_glow", 3, list("type" = "outline", "color" = "#ffffffff", "size" = 1)) + +/obj/tgvehicle/moon_ascension/unbuckle_mob(mob/living/carbon/human/buckled_mob, force) + . = ..() + buckled_mob.plane = -1 + buckled_mob.physiology.armor = buckled_mob.physiology.armor.detachArmor(moon_resistance_boost) + buckled_mob.physiology.stamina_mod /= 0.25 + QDEL_NULL(moonray) + handle_rotation(ROT_NONE) + remove_filter("heavenly_glow") + +/obj/tgvehicle/moon_ascension/process() + var/turf/T = get_turf(src) + if(old_loc == T && rotation_dir != ROT_NONE) + handle_rotation(new_rotation = ROT_NONE) + old_loc = T + for(var/mob/living/rider in occupants) + if(rider.stat == DEAD || rider.stat == UNCONSCIOUS) // emergency just in case someone gets stuck. + unbuckle_mob(rider) + +/obj/tgvehicle/moon_ascension/proc/handle_rotation(new_rotation = ROT_NONE) + if(new_rotation == rotation_dir) + return + rotation_dir = new_rotation + switch(new_rotation) + if(ROT_LEFT) + SpinAnimation(speed = 20, loops = -1, clockwise = new_rotation, parallel = FALSE) + if(ROT_RIGHT) + SpinAnimation(speed = 20, loops = -1, clockwise = new_rotation, parallel = FALSE) + if(ROT_NONE) + SpinAnimation(speed = 9999, loops = -1, clockwise = new_rotation, parallel = FALSE) + +/datum/component/riding/vehicle/moon + vehicle_move_delay = 1.8 + override_allow_spacemove = TRUE + ride_check_flags = RIDER_NEEDS_LEGS | UNBUCKLE_DISABLED_RIDER + +/datum/component/riding/vehicle/moon/vehicle_moved(datum/source, oldloc, dir, forced) + . = ..() + var/obj/tgvehicle/moon_ascension/moon = parent + if(dir == WEST || dir == NORTH) + moon.handle_rotation(ROT_LEFT) + else + moon.handle_rotation(ROT_RIGHT) + +/datum/component/riding/vehicle/moon/handle_specials() + . = ..() + set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER) + set_vehicle_dir_layer(NORTH, ABOVE_MOB_LAYER) + set_vehicle_dir_layer(EAST, ABOVE_MOB_LAYER) + set_vehicle_dir_layer(WEST, ABOVE_MOB_LAYER) + + set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 70), TEXT_SOUTH = list(0, 70), TEXT_EAST = list(0, 70), TEXT_WEST = list(0, 70))) + set_vehicle_dir_offsets(NORTH, -16, 6) + set_vehicle_dir_offsets(SOUTH, -16, 6) + set_vehicle_dir_offsets(EAST, -16, 6) + set_vehicle_dir_offsets(WEST, -16, 6) + +/datum/component/riding/vehicle/moon/on_rider_try_pull(mob/living/rider_pulling, atom/movable/target, force) + return + +/obj/effect/moonray + name = "Moonray" + desc = "Dazzling! But you shouldnt be reading this." + icon = null + pixel_y = -45 + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/obj/effect/moonray/Initialize(mapload) + START_PROCESSING(SSprocessing, src) + . = ..() + +/obj/effect/moonray/process() + var/new_filter = isnull(get_filter("ray")) + ray_filter_helper(1, 80, "#ffffffff", 6, 20) + if(new_filter) + animate(get_filter("ray"), alpha = 0, offset = 10, time = 3 SECONDS, loop = -1) + animate(offset = 0, time = 3 SECONDS) + +/obj/effect/moonray/Destroy() + STOP_PROCESSING(SSprocessing, src) + remove_filter("rays") + . = ..() + +#undef ROT_LEFT +#undef ROT_RIGHT +#undef ROT_NONE diff --git a/html/search.js b/html/search.js index 76ff88bce30..427d0aa6fa4 100644 --- a/html/search.js +++ b/html/search.js @@ -1,33 +1,33 @@ -function selectTextField() { - var filter_text = document.getElementById('filter'); - filter_text.focus(); - filter_text.select(); -} -function updateSearch() { - var input_form = document.getElementById('filter'); - var filter = input_form.value.toLowerCase(); - input_form.value = filter; - var table = document.getElementById('searchable'); - var alt_style = 'norm'; - for (var i = 0; i < table.rows.length; i++) { - try { - var row = table.rows[i]; - if (row.className == 'title') continue; - var found = 0; - for (var j = 0; j < row.cells.length; j++) { - var cell = row.cells[j]; - if (cell.innerText.toLowerCase().indexOf(filter) != -1) { - found = 1; - break; - } - } - if (found == 0) row.style.display = 'none'; - else { - row.style.display = 'table-row'; - row.className = alt_style; - if (alt_style == 'alt') alt_style = 'norm'; - else alt_style = 'alt'; - } - } catch (err) {} - } -} +function selectTextField() { + var filter_text = document.getElementById('filter'); + filter_text.focus(); + filter_text.select(); +} +function updateSearch() { + var input_form = document.getElementById('filter'); + var filter = input_form.value.toLowerCase(); + input_form.value = filter; + var table = document.getElementById('searchable'); + var alt_style = 'norm'; + for (var i = 0; i < table.rows.length; i++) { + try { + var row = table.rows[i]; + if (row.className == 'title') continue; + var found = 0; + for (var j = 0; j < row.cells.length; j++) { + var cell = row.cells[j]; + if (cell.innerText.toLowerCase().indexOf(filter) != -1) { + found = 1; + break; + } + } + if (found == 0) row.style.display = 'none'; + else { + row.style.display = 'table-row'; + row.className = alt_style; + if (alt_style == 'alt') alt_style = 'norm'; + else alt_style = 'alt'; + } + } catch (err) {} + } +} diff --git a/icons/effects/160x160.dmi b/icons/effects/160x160.dmi index cf17b54b9bb..639046464da 100644 Binary files a/icons/effects/160x160.dmi and b/icons/effects/160x160.dmi differ diff --git a/icons/effects/64x64.dmi b/icons/effects/64x64.dmi index 4530b11af6a..4dc3276dc5c 100644 Binary files a/icons/effects/64x64.dmi and b/icons/effects/64x64.dmi differ diff --git a/icons/effects/96x96.dmi b/icons/effects/96x96.dmi index d4f3711d6fa..7b543d74146 100644 Binary files a/icons/effects/96x96.dmi and b/icons/effects/96x96.dmi differ diff --git a/icons/effects/beam.dmi b/icons/effects/beam.dmi index ab11d3de653..4d8a64ffaac 100644 Binary files a/icons/effects/beam.dmi and b/icons/effects/beam.dmi differ diff --git a/icons/effects/blood.dmi b/icons/effects/blood.dmi index 6e1fb03f0c7..01dc1a385db 100644 Binary files a/icons/effects/blood.dmi and b/icons/effects/blood.dmi differ diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index 5f4c764211c..ef45d2122cc 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/effects/eldritch.dmi b/icons/effects/eldritch.dmi index 6481aa7591b..34589558515 100644 Binary files a/icons/effects/eldritch.dmi and b/icons/effects/eldritch.dmi differ diff --git a/icons/effects/mouse_pointers/cult_target.dmi b/icons/effects/mouse_pointers/cult_target.dmi new file mode 100644 index 00000000000..650feb33613 Binary files /dev/null and b/icons/effects/mouse_pointers/cult_target.dmi differ diff --git a/icons/effects/mouse_pointers/moon_target.dmi b/icons/effects/mouse_pointers/moon_target.dmi new file mode 100644 index 00000000000..d89cab42aa1 Binary files /dev/null and b/icons/effects/mouse_pointers/moon_target.dmi differ diff --git a/icons/effects/mouse_pointers/throw_target.dmi b/icons/effects/mouse_pointers/throw_target.dmi new file mode 100644 index 00000000000..660eafbf2b1 Binary files /dev/null and b/icons/effects/mouse_pointers/throw_target.dmi differ diff --git a/icons/effects/mouse_pointers/weapon_pointer.dmi b/icons/effects/mouse_pointers/weapon_pointer.dmi new file mode 100644 index 00000000000..0de8a274cb0 Binary files /dev/null and b/icons/effects/mouse_pointers/weapon_pointer.dmi differ diff --git a/icons/effects/weather_effects.dmi b/icons/effects/weather_effects.dmi index 622153b2f2a..42f1b9c4031 100644 Binary files a/icons/effects/weather_effects.dmi and b/icons/effects/weather_effects.dmi differ diff --git a/icons/mob/96x96eldritch_mobs.dmi b/icons/mob/96x96eldritch_mobs.dmi new file mode 100644 index 00000000000..4bbc55c15dd Binary files /dev/null and b/icons/mob/96x96eldritch_mobs.dmi differ diff --git a/icons/mob/Insanity.dmi b/icons/mob/Insanity.dmi new file mode 100644 index 00000000000..0d1c41c3587 Binary files /dev/null and b/icons/mob/Insanity.dmi differ diff --git a/icons/mob/actions/actions.dmi b/icons/mob/actions/actions.dmi index 70e13c93cbb..74602be2cd9 100644 Binary files a/icons/mob/actions/actions.dmi and b/icons/mob/actions/actions.dmi differ diff --git a/icons/mob/actions/actions_animal.dmi b/icons/mob/actions/actions_animal.dmi index 26533a9fac0..5a8ee7da698 100644 Binary files a/icons/mob/actions/actions_animal.dmi and b/icons/mob/actions/actions_animal.dmi differ diff --git a/icons/mob/actions/actions_cult.dmi b/icons/mob/actions/actions_cult.dmi index d7df7a79a5c..6c5f30d241e 100644 Binary files a/icons/mob/actions/actions_cult.dmi and b/icons/mob/actions/actions_cult.dmi differ diff --git a/icons/mob/actions/actions_ecult.dmi b/icons/mob/actions/actions_ecult.dmi new file mode 100644 index 00000000000..cb6bb455ff0 Binary files /dev/null and b/icons/mob/actions/actions_ecult.dmi differ diff --git a/icons/mob/actions/actions_minor_antag.dmi b/icons/mob/actions/actions_minor_antag.dmi new file mode 100644 index 00000000000..0c2728d811b Binary files /dev/null and b/icons/mob/actions/actions_minor_antag.dmi differ diff --git a/icons/mob/carp.dmi b/icons/mob/carp.dmi index 91f21a11b80..089d4a5a20a 100644 Binary files a/icons/mob/carp.dmi and b/icons/mob/carp.dmi differ diff --git a/icons/mob/clothing/back.dmi b/icons/mob/clothing/back.dmi index 4619c3569dd..f3d768fc968 100644 Binary files a/icons/mob/clothing/back.dmi and b/icons/mob/clothing/back.dmi differ diff --git a/icons/mob/clothing/belt.dmi b/icons/mob/clothing/belt.dmi index 5f1695debd6..558509d8b9a 100644 Binary files a/icons/mob/clothing/belt.dmi and b/icons/mob/clothing/belt.dmi differ diff --git a/icons/mob/clothing/belt_mirror.dmi b/icons/mob/clothing/belt_mirror.dmi index 2c1dc3053a9..f192ce441c0 100644 Binary files a/icons/mob/clothing/belt_mirror.dmi and b/icons/mob/clothing/belt_mirror.dmi differ diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index 1425d7b768f..784e1c0447f 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/mask.dmi b/icons/mob/clothing/mask.dmi index 37eb6057244..02efa70efb0 100644 Binary files a/icons/mob/clothing/mask.dmi and b/icons/mob/clothing/mask.dmi differ diff --git a/icons/mob/clothing/neck.dmi b/icons/mob/clothing/neck.dmi index 9e54bb89c26..6e933fb6719 100644 Binary files a/icons/mob/clothing/neck.dmi and b/icons/mob/clothing/neck.dmi differ diff --git a/icons/mob/clothing/species/drask/helmet.dmi b/icons/mob/clothing/species/drask/helmet.dmi index 8222471586b..a139f7e59f0 100644 Binary files a/icons/mob/clothing/species/drask/helmet.dmi and b/icons/mob/clothing/species/drask/helmet.dmi differ diff --git a/icons/mob/clothing/species/drask/mask.dmi b/icons/mob/clothing/species/drask/mask.dmi index d8d34fead52..44a7cad1aa0 100644 Binary files a/icons/mob/clothing/species/drask/mask.dmi and b/icons/mob/clothing/species/drask/mask.dmi differ diff --git a/icons/mob/clothing/species/drask/suit.dmi b/icons/mob/clothing/species/drask/suit.dmi index 61ba4743ac4..2f86d190a27 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/grey/mask.dmi b/icons/mob/clothing/species/grey/mask.dmi index a8725d12c78..a625cb7f24b 100644 Binary files a/icons/mob/clothing/species/grey/mask.dmi and b/icons/mob/clothing/species/grey/mask.dmi differ diff --git a/icons/mob/clothing/species/grey/neck.dmi b/icons/mob/clothing/species/grey/neck.dmi index 3fcf2deaecb..40cb532571d 100644 Binary files a/icons/mob/clothing/species/grey/neck.dmi and b/icons/mob/clothing/species/grey/neck.dmi differ diff --git a/icons/mob/clothing/species/kidan/head.dmi b/icons/mob/clothing/species/kidan/head.dmi index 2bc6cdda438..2430b906651 100644 Binary files a/icons/mob/clothing/species/kidan/head.dmi and b/icons/mob/clothing/species/kidan/head.dmi differ diff --git a/icons/mob/clothing/species/kidan/mask.dmi b/icons/mob/clothing/species/kidan/mask.dmi index 601565d7250..89d446b9b37 100644 Binary files a/icons/mob/clothing/species/kidan/mask.dmi and b/icons/mob/clothing/species/kidan/mask.dmi differ diff --git a/icons/mob/clothing/species/kidan/neck.dmi b/icons/mob/clothing/species/kidan/neck.dmi index 5ac9134e3db..64ff17b0efd 100644 Binary files a/icons/mob/clothing/species/kidan/neck.dmi and b/icons/mob/clothing/species/kidan/neck.dmi differ diff --git a/icons/mob/clothing/species/kidan/suit.dmi b/icons/mob/clothing/species/kidan/suit.dmi index 973e2f224c6..a338f3f5d5e 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/vox/head.dmi b/icons/mob/clothing/species/vox/head.dmi index 156793ccc3c..ef275d4d520 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/mask.dmi b/icons/mob/clothing/species/vox/mask.dmi index b0dccbf6595..26dbe766c39 100644 Binary files a/icons/mob/clothing/species/vox/mask.dmi and b/icons/mob/clothing/species/vox/mask.dmi differ diff --git a/icons/mob/clothing/species/vox/neck.dmi b/icons/mob/clothing/species/vox/neck.dmi index d7c17c401c1..a15c410f72e 100644 Binary files a/icons/mob/clothing/species/vox/neck.dmi and b/icons/mob/clothing/species/vox/neck.dmi differ diff --git a/icons/mob/clothing/species/vox/suit.dmi b/icons/mob/clothing/species/vox/suit.dmi index 9c8f4497da7..b08691f0aa8 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/vulpkanin/mask.dmi b/icons/mob/clothing/species/vulpkanin/mask.dmi index 698d6185510..435b372071a 100644 Binary files a/icons/mob/clothing/species/vulpkanin/mask.dmi and b/icons/mob/clothing/species/vulpkanin/mask.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index 0f52201984c..52bee376dd4 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/mob/cult.dmi b/icons/mob/cult.dmi index da3566c7f74..f94ee708ef4 100644 Binary files a/icons/mob/cult.dmi and b/icons/mob/cult.dmi differ diff --git a/icons/mob/eldritch_mobs.dmi b/icons/mob/eldritch_mobs.dmi new file mode 100644 index 00000000000..5165428fb5b Binary files /dev/null and b/icons/mob/eldritch_mobs.dmi differ diff --git a/icons/mob/eldritch_mobs_64x64.dmi b/icons/mob/eldritch_mobs_64x64.dmi new file mode 100644 index 00000000000..6c653cf96ff Binary files /dev/null and b/icons/mob/eldritch_mobs_64x64.dmi differ diff --git a/icons/mob/hud/antaghud.dmi b/icons/mob/hud/antaghud.dmi index 4d5e979fa32..83e3258def6 100644 Binary files a/icons/mob/hud/antaghud.dmi and b/icons/mob/hud/antaghud.dmi differ diff --git a/icons/mob/inhands/64x64_lefthand.dmi b/icons/mob/inhands/64x64_lefthand.dmi index c4f43e3b770..b2cbd486b2a 100644 Binary files a/icons/mob/inhands/64x64_lefthand.dmi and b/icons/mob/inhands/64x64_lefthand.dmi differ diff --git a/icons/mob/inhands/64x64_righthand.dmi b/icons/mob/inhands/64x64_righthand.dmi index 19f7db93643..42bec8f12cd 100644 Binary files a/icons/mob/inhands/64x64_righthand.dmi and b/icons/mob/inhands/64x64_righthand.dmi differ diff --git a/icons/mob/inhands/guns_lefthand.dmi b/icons/mob/inhands/guns_lefthand.dmi index cc2bb7572b0..61c5575e430 100644 Binary files a/icons/mob/inhands/guns_lefthand.dmi and b/icons/mob/inhands/guns_lefthand.dmi differ diff --git a/icons/mob/inhands/guns_righthand.dmi b/icons/mob/inhands/guns_righthand.dmi index 20add38ed21..b18e637f99a 100644 Binary files a/icons/mob/inhands/guns_righthand.dmi and b/icons/mob/inhands/guns_righthand.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index 60fe9b0d0f8..b4c199debda 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 90246f7e19b..d18662385a2 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index 20147255764..c1381af530b 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ diff --git a/icons/mob/screen_fog.dmi b/icons/mob/screen_fog.dmi index f443820d9fc..910cc57f8ca 100644 Binary files a/icons/mob/screen_fog.dmi and b/icons/mob/screen_fog.dmi differ diff --git a/icons/mouse_icons/cult_target.dmi b/icons/mouse_icons/cult_target.dmi index 40ed6d685f1..650feb33613 100644 Binary files a/icons/mouse_icons/cult_target.dmi and b/icons/mouse_icons/cult_target.dmi differ diff --git a/icons/mouse_icons/moon_target.dmi b/icons/mouse_icons/moon_target.dmi new file mode 100644 index 00000000000..d89cab42aa1 Binary files /dev/null and b/icons/mouse_icons/moon_target.dmi differ diff --git a/icons/mouse_icons/throw_target.dmi b/icons/mouse_icons/throw_target.dmi new file mode 100644 index 00000000000..660eafbf2b1 Binary files /dev/null and b/icons/mouse_icons/throw_target.dmi differ diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index a13f19cc1ff..3bd5d8963a8 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/antags/eldritch.dmi b/icons/obj/antags/eldritch.dmi new file mode 100644 index 00000000000..24eb42d49fc Binary files /dev/null and b/icons/obj/antags/eldritch.dmi differ diff --git a/icons/obj/antags/unsealed_arts.dmi b/icons/obj/antags/unsealed_arts.dmi new file mode 100644 index 00000000000..8cb5767b8eb Binary files /dev/null and b/icons/obj/antags/unsealed_arts.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index 6ccc3175074..9ee6e958eec 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 113939a4beb..7d21aec7b7f 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/masks.dmi b/icons/obj/clothing/masks.dmi index 4dab0780ed2..3b91d89b6ec 100644 Binary files a/icons/obj/clothing/masks.dmi and b/icons/obj/clothing/masks.dmi differ diff --git a/icons/obj/clothing/neck.dmi b/icons/obj/clothing/neck.dmi index bf32b773d45..9ba6d94247e 100644 Binary files a/icons/obj/clothing/neck.dmi and b/icons/obj/clothing/neck.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index ad6aec2baa8..c0f587f592b 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/cult.dmi b/icons/obj/cult.dmi index 2a2fabd845b..3b7ff125139 100644 Binary files a/icons/obj/cult.dmi and b/icons/obj/cult.dmi differ diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi index ca821675008..c0da4d688e3 100644 Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ diff --git a/icons/obj/economy.dmi b/icons/obj/economy.dmi index 4d3fc387181..c81aaaeb571 100644 Binary files a/icons/obj/economy.dmi and b/icons/obj/economy.dmi differ diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi index 9fdfed83f5f..d93c63570a5 100644 Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 21ae65a8526..ef09725bc90 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ diff --git a/icons/obj/weapons/khopesh.dmi b/icons/obj/weapons/khopesh.dmi new file mode 100644 index 00000000000..257ccc800df Binary files /dev/null and b/icons/obj/weapons/khopesh.dmi differ diff --git a/icons/obj/weapons/magical_weapons.dmi b/icons/obj/weapons/magical_weapons.dmi index abced572a9a..442fceb0935 100644 Binary files a/icons/obj/weapons/magical_weapons.dmi and b/icons/obj/weapons/magical_weapons.dmi differ diff --git a/icons/obj/weapons/wide_guns.dmi b/icons/obj/weapons/wide_guns.dmi new file mode 100644 index 00000000000..53167e805bf Binary files /dev/null and b/icons/obj/weapons/wide_guns.dmi differ diff --git a/icons/turf/areas.dmi b/icons/turf/areas.dmi index ffb602b6c0d..ee76217a86f 100755 Binary files a/icons/turf/areas.dmi and b/icons/turf/areas.dmi differ diff --git a/icons/turf/overlays.dmi b/icons/turf/overlays.dmi index 79fddb79b51..5342730385b 100644 Binary files a/icons/turf/overlays.dmi and b/icons/turf/overlays.dmi differ diff --git a/icons/ui_icons/antags/heretic/ascension.dmi b/icons/ui_icons/antags/heretic/ascension.dmi new file mode 100644 index 00000000000..a72b197c6ce Binary files /dev/null and b/icons/ui_icons/antags/heretic/ascension.dmi differ diff --git a/icons/ui_icons/antags/heretic/knowledge.dmi b/icons/ui_icons/antags/heretic/knowledge.dmi new file mode 100644 index 00000000000..d24de1a5f0e Binary files /dev/null and b/icons/ui_icons/antags/heretic/knowledge.dmi differ diff --git a/icons/vehicles/moon.dmi b/icons/vehicles/moon.dmi new file mode 100644 index 00000000000..0394fcb184a Binary files /dev/null and b/icons/vehicles/moon.dmi differ diff --git a/paradise.dme b/paradise.dme index 2bc0fd5bcae..0844aafdd33 100644 --- a/paradise.dme +++ b/paradise.dme @@ -180,7 +180,9 @@ #include "code\__DEFINES\dcs\dept_signals.dm" #include "code\__DEFINES\dcs\disease_signals.dm" #include "code\__DEFINES\dcs\global_signals.dm" +#include "code\__DEFINES\dcs\heretic_signals.dm" #include "code\__DEFINES\dcs\item_signals.dm" +#include "code\__DEFINES\dcs\leash_signals.dm" #include "code\__DEFINES\dcs\machinery_signals.dm" #include "code\__DEFINES\dcs\mob_signals.dm" #include "code\__DEFINES\dcs\movable_signals.dm" @@ -441,6 +443,7 @@ #include "code\datums\http.dm" #include "code\datums\input_data.dm" #include "code\datums\ipintel.dm" +#include "code\datums\lazy_templates.dm" #include "code\datums\log_record.dm" #include "code\datums\log_viewer.dm" #include "code\datums\logging.dm" @@ -506,6 +509,7 @@ #include "code\datums\ai\basic_mobs\basic_subtrees\prowl.dm" #include "code\datums\ai\basic_mobs\basic_subtrees\random_speech.dm" #include "code\datums\ai\basic_mobs\basic_subtrees\ranged_skirmish.dm" +#include "code\datums\ai\basic_mobs\basic_subtrees\shapechange_ambush.dm" #include "code\datums\ai\basic_mobs\basic_subtrees\simple_attack_target.dm" #include "code\datums\ai\basic_mobs\basic_subtrees\simple_find_nearest_target_to_flee.dm" #include "code\datums\ai\basic_mobs\basic_subtrees\simple_find_target.dm" @@ -551,6 +555,7 @@ #include "code\datums\components\ai_has_target_timer.dm" #include "code\datums\components\ai_retaliate_advanced.dm" #include "code\datums\components\anti_magic.dm" +#include "code\datums\components\aura_healing.dm" #include "code\datums\components\basic_mob_aggro_emote.dm" #include "code\datums\components\boomerang.dm" #include "code\datums\components\boss_music.dm" @@ -564,13 +569,16 @@ #include "code\datums\components\corpse_description.dm" #include "code\datums\components\cross_shock_component.dm" #include "code\datums\components\cult_held_body.dm" +#include "code\datums\components\damage_aura.dm" #include "code\datums\components\deadchat_control.dm" +#include "code\datums\components\death_linked.dm" #include "code\datums\components\debris.dm" #include "code\datums\components\defibrillator.dm" #include "code\datums\components\direct_explosive_trap.dm" #include "code\datums\components\drift.dm" #include "code\datums\components\ducttape.dm" #include "code\datums\components\edit_complainer.dm" +#include "code\datums\components\effect_remover.dm" #include "code\datums\components\emissive_blocker.dm" #include "code\datums\components\event_tracker.dm" #include "code\datums\components\footstep.dm" @@ -582,6 +590,7 @@ #include "code\datums\components\jetpack_component.dm" #include "code\datums\components\label.dm" #include "code\datums\components\largeobjecttransparency.dm" +#include "code\datums\components\leash.dm" #include "code\datums\components\material_container.dm" #include "code\datums\components\multitile.dm" #include "code\datums\components\orbiter.dm" @@ -590,6 +599,7 @@ #include "code\datums\components\persistent_overlay.dm" #include "code\datums\components\radioactive.dm" #include "code\datums\components\ranged_attacks.dm" +#include "code\datums\components\regenerator.dm" #include "code\datums\components\scope.dm" #include "code\datums\components\shelved.dm" #include "code\datums\components\shielded.dm" @@ -686,11 +696,16 @@ #include "code\datums\elements\butchers_humans.dm" #include "code\datums\elements\clothing_adjustment.dm" #include "code\datums\elements\connect_loc.dm" +#include "code\datums\elements\corrupt_organ.dm" +#include "code\datums\elements\death_gasses.dm" #include "code\datums\elements\decal_element.dm" #include "code\datums\elements\earhealing.dm" +#include "code\datums\elements\effect_trail.dm" #include "code\datums\elements\high_value_item.dm" #include "code\datums\elements\hostile_machine.dm" +#include "code\datums\elements\leaching_walk.dm" #include "code\datums\elements\light_blocking.dm" +#include "code\datums\elements\noticable_organ.dm" #include "code\datums\elements\pet_bonus.dm" #include "code\datums\elements\rad_insulation.dm" #include "code\datums\elements\relay_attackers.dm" @@ -725,6 +740,7 @@ #include "code\datums\looping_sounds\item_sounds.dm" #include "code\datums\looping_sounds\looping_sound.dm" #include "code\datums\looping_sounds\machinery_sounds.dm" +#include "code\datums\looping_sounds\projectiles_sounds.dm" #include "code\datums\looping_sounds\thermal_drill_sounds.dm" #include "code\datums\looping_sounds\weather_sounds.dm" #include "code\datums\mapping\map_template.dm" @@ -744,6 +760,7 @@ #include "code\datums\proximity\ai_target_tracking.dm" #include "code\datums\proximity\proximity_monitor.dm" #include "code\datums\proximity\singulo_proximity_monitor.dm" +#include "code\datums\proximity\void_storm_proximity.dm" #include "code\datums\spell_cooldown\spell_charges.dm" #include "code\datums\spell_cooldown\spell_cooldown.dm" #include "code\datums\spell_handler\alien_spell_handler.dm" @@ -793,6 +810,7 @@ #include "code\datums\spells\mimic.dm" #include "code\datums\spells\mind_transfer.dm" #include "code\datums\spells\night_vision.dm" +#include "code\datums\spells\pointed.dm" #include "code\datums\spells\projectile_spell.dm" #include "code\datums\spells\rathens.dm" #include "code\datums\spells\rod_form.dm" @@ -842,6 +860,7 @@ #include "code\datums\weather\weather_types\radiation_storm.dm" #include "code\datums\weather\weather_types\snow_storm.dm" #include "code\datums\weather\weather_types\solar_flare.dm" +#include "code\datums\weather\weather_types\void_storm.dm" #include "code\datums\wires\airlock_wires.dm" #include "code\datums\wires\alarm.dm" #include "code\datums\wires\apc_wires.dm" @@ -1750,6 +1769,98 @@ #include "code\modules\antagonists\cult\datum_cultist.dm" #include "code\modules\antagonists\cult\team_cult.dm" #include "code\modules\antagonists\event\datum_eventmisc.dm" +#include "code\modules\antagonists\heretic\cosmic_effect.dm" +#include "code\modules\antagonists\heretic\heretic_antag.dm" +#include "code\modules\antagonists\heretic\heretic_focus.dm" +#include "code\modules\antagonists\heretic\heretic_knowledge.dm" +#include "code\modules\antagonists\heretic\heretic_living_heart.dm" +#include "code\modules\antagonists\heretic\heretic_monster.dm" +#include "code\modules\antagonists\heretic\influences.dm" +#include "code\modules\antagonists\heretic\knife_effect.dm" +#include "code\modules\antagonists\heretic\soultrapped_heretic.dm" +#include "code\modules\antagonists\heretic\transmutation_rune.dm" +#include "code\modules\antagonists\heretic\items\corrupted_organs.dm" +#include "code\modules\antagonists\heretic\items\eldritch_flask.dm" +#include "code\modules\antagonists\heretic\items\forbidden_book.dm" +#include "code\modules\antagonists\heretic\items\heretic_armor.dm" +#include "code\modules\antagonists\heretic\items\heretic_blades.dm" +#include "code\modules\antagonists\heretic\items\heretic_necks.dm" +#include "code\modules\antagonists\heretic\items\hunter_rifle.dm" +#include "code\modules\antagonists\heretic\items\keyring.dm" +#include "code\modules\antagonists\heretic\items\labyrinth_handbook.dm" +#include "code\modules\antagonists\heretic\items\madness_mask.dm" +#include "code\modules\antagonists\heretic\items\unfathomable_curio.dm" +#include "code\modules\antagonists\heretic\items\unsealed_arts.dm" +#include "code\modules\antagonists\heretic\knowledge\_heretic_paths.dm" +#include "code\modules\antagonists\heretic\knowledge\ash_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\blade_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\cosmic_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\flesh_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\general_side.dm" +#include "code\modules\antagonists\heretic\knowledge\lock_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\moon_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\rust_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\side_ash_moon.dm" +#include "code\modules\antagonists\heretic\knowledge\side_blade_rust.dm" +#include "code\modules\antagonists\heretic\knowledge\side_cosmos_ash.dm" +#include "code\modules\antagonists\heretic\knowledge\side_flesh_void.dm" +#include "code\modules\antagonists\heretic\knowledge\side_lock_flesh.dm" +#include "code\modules\antagonists\heretic\knowledge\side_lock_moon.dm" +#include "code\modules\antagonists\heretic\knowledge\side_rust_cosmos.dm" +#include "code\modules\antagonists\heretic\knowledge\side_void_blade.dm" +#include "code\modules\antagonists\heretic\knowledge\starting_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\void_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_buff.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_curse.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_knowledge.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_map.dm" +#include "code\modules\antagonists\heretic\magic\aggressive_spread.dm" +#include "code\modules\antagonists\heretic\magic\apetravulnera.dm" +#include "code\modules\antagonists\heretic\magic\ascended_shapeshift.dm" +#include "code\modules\antagonists\heretic\magic\ash_ascension.dm" +#include "code\modules\antagonists\heretic\magic\ash_jaunt.dm" +#include "code\modules\antagonists\heretic\magic\blood_cleave.dm" +#include "code\modules\antagonists\heretic\magic\blood_siphon.dm" +#include "code\modules\antagonists\heretic\magic\burglar_finesse.dm" +#include "code\modules\antagonists\heretic\magic\caretaker.dm" +#include "code\modules\antagonists\heretic\magic\cosmic_expansion.dm" +#include "code\modules\antagonists\heretic\magic\cosmic_runes.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_blind.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_emplosion.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_shapeshift.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_telepathy.dm" +#include "code\modules\antagonists\heretic\magic\fire_blast.dm" +#include "code\modules\antagonists\heretic\magic\flesh_ascension.dm" +#include "code\modules\antagonists\heretic\magic\flesh_surgery.dm" +#include "code\modules\antagonists\heretic\magic\furious_steel.dm" +#include "code\modules\antagonists\heretic\magic\mansus_grasp.dm" +#include "code\modules\antagonists\heretic\magic\mind_gate.dm" +#include "code\modules\antagonists\heretic\magic\mirror_walk.dm" +#include "code\modules\antagonists\heretic\magic\moon_parade.dm" +#include "code\modules\antagonists\heretic\magic\moon_ringleader.dm" +#include "code\modules\antagonists\heretic\magic\moon_smile.dm" +#include "code\modules\antagonists\heretic\magic\nightwatcher_rebirth.dm" +#include "code\modules\antagonists\heretic\magic\realignment.dm" +#include "code\modules\antagonists\heretic\magic\rust_construction.dm" +#include "code\modules\antagonists\heretic\magic\rust_wave.dm" +#include "code\modules\antagonists\heretic\magic\shadow_cloak.dm" +#include "code\modules\antagonists\heretic\magic\space_crawl.dm" +#include "code\modules\antagonists\heretic\magic\star_blast.dm" +#include "code\modules\antagonists\heretic\magic\star_touch.dm" +#include "code\modules\antagonists\heretic\magic\void_cold_cone.dm" +#include "code\modules\antagonists\heretic\magic\void_conduit.dm" +#include "code\modules\antagonists\heretic\magic\void_phase.dm" +#include "code\modules\antagonists\heretic\magic\void_prison.dm" +#include "code\modules\antagonists\heretic\magic\void_pull.dm" +#include "code\modules\antagonists\heretic\magic\wave_of_desperation.dm" +#include "code\modules\antagonists\heretic\status_effects\ghoul.dm" +#include "code\modules\antagonists\heretic\status_effects\heretic_buffs.dm" +#include "code\modules\antagonists\heretic\status_effects\heretic_debuffs.dm" +#include "code\modules\antagonists\heretic\status_effects\mark_effects.dm" +#include "code\modules\antagonists\heretic\status_effects\void_chill.dm" +#include "code\modules\antagonists\heretic\structures\carving_knife.dm" +#include "code\modules\antagonists\heretic\structures\lock_final.dm" +#include "code\modules\antagonists\heretic\structures\mawed_crucible.dm" #include "code\modules\antagonists\mind_flayer\flayer_datum.dm" #include "code\modules\antagonists\mind_flayer\flayer_power.dm" #include "code\modules\antagonists\mind_flayer\mindflayer_gamemode.dm" @@ -2618,6 +2729,7 @@ #include "code\modules\mob\living\carbon\carbon_defense.dm" #include "code\modules\mob\living\carbon\carbon_defines.dm" #include "code\modules\mob\living\carbon\carbon_emote.dm" +#include "code\modules\mob\living\carbon\carbon_inventory.dm" #include "code\modules\mob\living\carbon\carbon_life.dm" #include "code\modules\mob\living\carbon\carbon_procs.dm" #include "code\modules\mob\living\carbon\carbon_status_procs.dm" @@ -2789,6 +2901,7 @@ #include "code\modules\mob\living\simple_animal\hostile\deathsquid.dm" #include "code\modules\mob\living\simple_animal\hostile\floorcluwne.dm" #include "code\modules\mob\living\simple_animal\hostile\headslug.dm" +#include "code\modules\mob\living\simple_animal\hostile\heretic_monsters.dm" #include "code\modules\mob\living\simple_animal\hostile\hostile.dm" #include "code\modules\mob\living\simple_animal\hostile\illusion.dm" #include "code\modules\mob\living\simple_animal\hostile\mushroom.dm" @@ -3410,6 +3523,7 @@ #include "code\modules\vehicle\speedbike.dm" #include "code\modules\vehicle\sportscar.dm" #include "code\modules\vehicle\vehicle.dm" +#include "code\modules\vehicle\tg_vehicles\moon_roller.dm" #include "code\modules\vehicle\tg_vehicles\scooter.dm" #include "code\modules\vehicle\tg_vehicles\sealed.dm" #include "code\modules\vehicle\tg_vehicles\tg_vehicle_actions.dm" diff --git a/sound/ambience/ambireebe1.ogg b/sound/ambience/ambireebe1.ogg new file mode 100644 index 00000000000..9a98b560de7 Binary files /dev/null and b/sound/ambience/ambireebe1.ogg differ diff --git a/sound/ambience/ambireebe2.ogg b/sound/ambience/ambireebe2.ogg new file mode 100644 index 00000000000..4e6127735ef Binary files /dev/null and b/sound/ambience/ambireebe2.ogg differ diff --git a/sound/ambience/ambireebe3.ogg b/sound/ambience/ambireebe3.ogg new file mode 100644 index 00000000000..dc87f8cd97d Binary files /dev/null and b/sound/ambience/ambireebe3.ogg differ diff --git a/sound/ambience/antag/heretic/VoidsEmbrace.ogg b/sound/ambience/antag/heretic/VoidsEmbrace.ogg new file mode 100644 index 00000000000..66eac7e13e5 Binary files /dev/null and b/sound/ambience/antag/heretic/VoidsEmbrace.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_ash.ogg b/sound/ambience/antag/heretic/ascend_ash.ogg new file mode 100644 index 00000000000..fda3f1ed949 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_ash.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_blade.ogg b/sound/ambience/antag/heretic/ascend_blade.ogg new file mode 100644 index 00000000000..cc645ffb897 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_blade.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_cosmic.ogg b/sound/ambience/antag/heretic/ascend_cosmic.ogg new file mode 100644 index 00000000000..413e7215000 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_cosmic.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_flesh.ogg b/sound/ambience/antag/heretic/ascend_flesh.ogg new file mode 100644 index 00000000000..2088647af5a Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_flesh.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_knock.ogg b/sound/ambience/antag/heretic/ascend_knock.ogg new file mode 100644 index 00000000000..80a79d51a88 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_knock.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_moon.ogg b/sound/ambience/antag/heretic/ascend_moon.ogg new file mode 100644 index 00000000000..f8aa21035c3 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_moon.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_rust.ogg b/sound/ambience/antag/heretic/ascend_rust.ogg new file mode 100644 index 00000000000..fb959ed334e Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_rust.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_void.ogg b/sound/ambience/antag/heretic/ascend_void.ogg new file mode 100644 index 00000000000..0c481268313 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_void.ogg differ diff --git a/sound/ambience/antag/heretic/attribution.txt b/sound/ambience/antag/heretic/attribution.txt new file mode 100644 index 00000000000..cc07b45e171 --- /dev/null +++ b/sound/ambience/antag/heretic/attribution.txt @@ -0,0 +1,5 @@ +heretic_sacrifice.ogg - made by sadboysusss, License: CC-by-SA + +VoidsEmbrace.ogg is Chopin - Waltz in C Sharp Minor (Op. 64 No. 2). It is in public domain. + +Moon Ascention sprite by Grinnch on itch.io https://grinnch.itch.io/pixel-moon-phases under Creative Commons Attribution v4.0 International diff --git a/sound/ambience/antag/heretic/heretic_gain.ogg b/sound/ambience/antag/heretic/heretic_gain.ogg new file mode 100644 index 00000000000..32de62cda16 Binary files /dev/null and b/sound/ambience/antag/heretic/heretic_gain.ogg differ diff --git a/sound/ambience/antag/heretic/heretic_gain_intense.ogg b/sound/ambience/antag/heretic/heretic_gain_intense.ogg new file mode 100644 index 00000000000..203334a4491 Binary files /dev/null and b/sound/ambience/antag/heretic/heretic_gain_intense.ogg differ diff --git a/sound/ambience/antag/heretic/heretic_sacrifice.ogg b/sound/ambience/antag/heretic/heretic_sacrifice.ogg new file mode 100644 index 00000000000..92560235e88 Binary files /dev/null and b/sound/ambience/antag/heretic/heretic_sacrifice.ogg differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-21 21-39-48.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-21 21-39-48.mp4 new file mode 100644 index 00000000000..c95d46990f3 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-21 21-39-48.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-21 22-35-56.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-21 22-35-56.mp4 new file mode 100644 index 00000000000..03220ee886f Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-21 22-35-56.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 12-20-09.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-20-09.mp4 new file mode 100644 index 00000000000..4679b4f7613 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-20-09.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 12-36-29.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-36-29.mp4 new file mode 100644 index 00000000000..e061ae5676f Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-36-29.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 13-37-11.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 13-37-11.mp4 new file mode 100644 index 00000000000..64c4ab5ecde Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 13-37-11.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 14-55-29.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-55-29.mp4 new file mode 100644 index 00000000000..6af64f514dd Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-55-29.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 14-56-33.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-56-33.mp4 new file mode 100644 index 00000000000..d447d846ec3 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-56-33.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 15-02-55.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 15-02-55.mp4 new file mode 100644 index 00000000000..11c7bb634c9 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 15-02-55.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 16-17-51.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-17-51.mp4 new file mode 100644 index 00000000000..ba7a0fc9032 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-17-51.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 16-30-07.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-30-07.mp4 new file mode 100644 index 00000000000..f128f5eeb27 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-30-07.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 16-50-31.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-50-31.mp4 new file mode 100644 index 00000000000..57818538bfb Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-50-31.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-17.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-17.mp4 new file mode 100644 index 00000000000..940c2392df5 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-17.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-44.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-44.mp4 new file mode 100644 index 00000000000..260171145be Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-44.mp4 differ diff --git a/sound/effects/Captures/desktop.ini b/sound/effects/Captures/desktop.ini new file mode 100644 index 00000000000..7f38b404264 --- /dev/null +++ b/sound/effects/Captures/desktop.ini @@ -0,0 +1,2 @@ +[.ShellClassInfo] +LocalizedResourceName=@%SystemRoot%\system32\windows.storage.dll,-21826 diff --git a/sound/effects/ahaha.ogg b/sound/effects/ahaha.ogg new file mode 100644 index 00000000000..dcea90a3c0d Binary files /dev/null and b/sound/effects/ahaha.ogg differ diff --git a/sound/effects/bowling_strike.ogg b/sound/effects/bowling_strike.ogg new file mode 100644 index 00000000000..eb9918fbdd9 Binary files /dev/null and b/sound/effects/bowling_strike.ogg differ diff --git a/sound/effects/constructform.ogg b/sound/effects/constructform.ogg new file mode 100644 index 00000000000..51783d2bb59 Binary files /dev/null and b/sound/effects/constructform.ogg differ diff --git a/sound/effects/curse.ogg b/sound/effects/curse.ogg new file mode 100644 index 00000000000..b9134da2c5a Binary files /dev/null and b/sound/effects/curse.ogg differ diff --git a/sound/effects/curse/curse1.ogg b/sound/effects/curse/curse1.ogg new file mode 100644 index 00000000000..155c23e3e85 Binary files /dev/null and b/sound/effects/curse/curse1.ogg differ diff --git a/sound/effects/curse/curse2.ogg b/sound/effects/curse/curse2.ogg new file mode 100644 index 00000000000..cdfc13e5ceb Binary files /dev/null and b/sound/effects/curse/curse2.ogg differ diff --git a/sound/effects/curse/curse3.ogg b/sound/effects/curse/curse3.ogg new file mode 100644 index 00000000000..5ceb74b5c91 Binary files /dev/null and b/sound/effects/curse/curse3.ogg differ diff --git a/sound/effects/curse/curse4.ogg b/sound/effects/curse/curse4.ogg new file mode 100644 index 00000000000..c720569bd2c Binary files /dev/null and b/sound/effects/curse/curse4.ogg differ diff --git a/sound/effects/curse/curse5.ogg b/sound/effects/curse/curse5.ogg new file mode 100644 index 00000000000..9a2e9db368a Binary files /dev/null and b/sound/effects/curse/curse5.ogg differ diff --git a/sound/effects/curse/curse6.ogg b/sound/effects/curse/curse6.ogg new file mode 100644 index 00000000000..c05568f20c5 Binary files /dev/null and b/sound/effects/curse/curse6.ogg differ diff --git a/sound/effects/curse/curseattack.ogg b/sound/effects/curse/curseattack.ogg new file mode 100644 index 00000000000..552a2a572a3 Binary files /dev/null and b/sound/effects/curse/curseattack.ogg differ diff --git a/sound/effects/desecration/desecration-01.ogg b/sound/effects/desecration/desecration-01.ogg new file mode 100644 index 00000000000..44072ec6068 Binary files /dev/null and b/sound/effects/desecration/desecration-01.ogg differ diff --git a/sound/effects/desecration/desecration-02.ogg b/sound/effects/desecration/desecration-02.ogg new file mode 100644 index 00000000000..3462470247f Binary files /dev/null and b/sound/effects/desecration/desecration-02.ogg differ diff --git a/sound/effects/desecration/desecration-03.ogg b/sound/effects/desecration/desecration-03.ogg new file mode 100644 index 00000000000..237eac0b377 Binary files /dev/null and b/sound/effects/desecration/desecration-03.ogg differ diff --git a/sound/effects/moon_parade.ogg b/sound/effects/moon_parade.ogg new file mode 100644 index 00000000000..6ec9e5544fb Binary files /dev/null and b/sound/effects/moon_parade.ogg differ diff --git a/sound/effects/moon_parade_soundloop.ogg b/sound/effects/moon_parade_soundloop.ogg new file mode 100644 index 00000000000..cd5aa864cbf Binary files /dev/null and b/sound/effects/moon_parade_soundloop.ogg differ diff --git a/sound/magic/cosmic_energy.ogg b/sound/magic/cosmic_energy.ogg new file mode 100644 index 00000000000..c69a41198fc Binary files /dev/null and b/sound/magic/cosmic_energy.ogg differ diff --git a/sound/magic/cosmic_expansion.ogg b/sound/magic/cosmic_expansion.ogg new file mode 100644 index 00000000000..dbc868fa6c1 Binary files /dev/null and b/sound/magic/cosmic_expansion.ogg differ diff --git a/sound/magic/hereticknock.ogg b/sound/magic/hereticknock.ogg new file mode 100644 index 00000000000..470212cf015 Binary files /dev/null and b/sound/magic/hereticknock.ogg differ diff --git a/sound/magic/swap.ogg b/sound/magic/swap.ogg new file mode 100644 index 00000000000..de08a44bf55 Binary files /dev/null and b/sound/magic/swap.ogg differ diff --git a/sound/magic/voidblink.ogg b/sound/magic/voidblink.ogg new file mode 100644 index 00000000000..13913858cde Binary files /dev/null and b/sound/magic/voidblink.ogg differ diff --git a/sound/weapons/guillotine.ogg b/sound/weapons/guillotine.ogg new file mode 100644 index 00000000000..bb097f89aa8 Binary files /dev/null and b/sound/weapons/guillotine.ogg differ diff --git a/strings/heretic_influences.json b/strings/heretic_influences.json new file mode 100644 index 00000000000..ef7d55a101f --- /dev/null +++ b/strings/heretic_influences.json @@ -0,0 +1,67 @@ +{ + "prefix": [ + "aggressive", + "arrogant", + "atomized", + "blissful", + "enlightening", + "fleeting", + "intrusive", + "lowering", + "omniscient", + "peaceful", + "resentful", + "rising", + "subtle", + "threatening", + "thundering", + "towering" + ], + "postfix": [ + "blemish", + "blush", + "breeze", + "cold", + "crack", + "flaw", + "flow", + "grasp", + "heat", + "imperfection", + "memory", + "presence", + "reminder", + "sight", + "thought", + "touch", + "veil", + "whisper" + ], + "drained": [ + "analyzed", + "drained", + "emptied", + "opened", + "researched", + "siphoned" + ], + "drain_message": [ + "A SHIMMER... POTENTIAL... POWER.", + "A WHISPER.", + "COVERED AND FORGOTTEN.", + "CURSED LAND, CURSED MAN, CURSED MIND.", + "GREATER HEIGHTS.", + "I AM BEING WATCHED... FROM WHERE? FROM WHAT?", + "I AM LATE FOR MY DESTINY.", + "LIFE IS FLEETING, BUT WHAT YET STAYS?", + "RAIN OF BLOOD. REIGN OF BLOOD.", + "STRENGTH... UNPARALLELED. UNNATURAL.", + "THE GATES OF THE MANSUS IS HERE, IS OPEN.", + "THE HIGHER I RISE, THE MORE I SEE.", + "THE VEIL IS SHATTERED.", + "THEIR HAND IS AT MY SIDE.", + "THEY WALK THE WORLD. UNNOTICED.", + "TO WALK BETWEEN PLANES." + ] + +} diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss index b70ff46ac41..7cc03b61020 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss @@ -591,7 +591,9 @@ h2.alert { .hierophant_warning { color: #660099; + font-weight: bold; font-style: italic; + font-size: 175%; } // MARK: Languages diff --git a/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx b/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx new file mode 100644 index 00000000000..11c4ff84ea8 --- /dev/null +++ b/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx @@ -0,0 +1,312 @@ +import { useState } from 'react'; +import { BooleanLike } from 'tgui-core/react'; +import { useBackend } from '../backend'; +import { Box, Button, DmIcon, Flex, Section, Tabs } from 'tgui-core/components'; +import { Window } from '../layouts'; + +const hereticRed = { + color: '#e03c3c', +}; + +const hereticBlue = { + fontWeight: 'bold', + color: '#2185d0', +}; + +const hereticPurple = { + fontWeight: 'bold', + color: '#bd54e0', +}; + +const hereticGreen = { + fontWeight: 'bold', + color: '#20b142', +}; + +const hereticYellow = { + fontWeight: 'bold', + color: 'yellow', +}; + +type IconParams = { + icon: string; + state: string; + frame: number; + dir: number; + moving: BooleanLike; +}; + +type Knowledge = { + path: string; + icon_params: IconParams; + name: string; + desc: string; + gainFlavor: string; + cost: number; + bgr: string; + disabled: BooleanLike; + finished: BooleanLike; + ascension: BooleanLike; +}; + +type KnowledgeInfo = { + knowledge_tiers: KnowledgeTier[]; +}; + +type KnowledgeTier = { + nodes: Knowledge[]; +}; + +type Info = { + charges: number; + total_sacrifices: number; + ascended: BooleanLike; + can_change_objective: BooleanLike; +}; + +const IntroductionSection = () => { + const { data } = useBackend(); + const { ascended, can_change_objective } = data; + + return ( + +
+ + + +
+
+ + +
+
+ +
+
+
+ ); +}; + +const FlavorSection = () => { + return ( + + + + Another day at a meaningless job. You feel a  + shimmer +  around you, as a realization of something  + strange +  in the air unfolds. You look inwards and discover something that will change your life. + + + + The Gates of Mansus +  open up to your mind. + + + + + ); +}; + +const GuideSection = () => { + return ( + + + + - Find reality smashing  + influences +  around the station invisible to the normal eye and  + click on them to harvest them for  + knowledge points. Tapping them makes them visible to all after a short time. + + + - Use your  + Living Heart action +  to track down  + sacrifice targets, but be careful: Pulsing it will produce a heartbeat sound + that nearby people may hear. This action is tied to your heart - if you lose it, you must complete a + ritual to regain it. + + + - Draw a  + transmutation rune by using a drawing tool (a pen or crayon) on the floor + while having  + Mansus Grasp +  active in your other hand. This rune allows you to complete rituals and sacrifices. + + + - Follow your Living Heart to find your targets. Bring them back to a  + transmutation rune in critical or worse condition to  + sacrifice them for  + knowledge points. The Mansus ONLY accepts targets pointed to by + the  + Living Heart. + + + - Make yourself a focus to be able to cast various advanced spells to + assist you in acquiring harder and harder sacrifices. + + + - Accomplish all of your objectives to be able to learn the final ritual. + Complete the ritual to become all powerful! + You can only do this ritual with  hijack or if a cult tries to summon. + + + + ); +}; + +const InformationSection = () => { + const { data } = useBackend(); + const { charges, total_sacrifices, ascended } = data; + return ( + + + {!!ascended && ( + + You have + + ASCENDED! + + + )} + + You have {charges || 0}  + knowledge point{charges !== 1 ? 's' : ''}. + + + You have made a total of  + {total_sacrifices || 0}  + sacrifices. + + + + ); +}; + +const KnowledgeTree = () => { + const { data, act } = useBackend(); + const { knowledge_tiers } = data; + + return ( +
+ + DAWN + + + {knowledge_tiers.length === 0 + ? 'None!' + : knowledge_tiers.map((tier, i) => ( + + + {tier.nodes.map((node) => ( + + + {!!node.ascension && ( + + DUSK + + )} + + ))} + +
+
+ ))} +
+
+ ); +}; + +const ResearchInfo = () => { + const { data } = useBackend(); + const { charges } = data; + + return ( + + + You have {charges || 0}  + knowledge point{charges !== 1 ? 's' : ''} to spend. + + + + + + ); +}; + +export const AntagInfoHeretic = () => { + const { data } = useBackend(); + const { ascended } = data; + const [currentTab, setTab] = useState(0); + + return ( + + + + + + setTab(0)}> + Information + + setTab(1)} + > + Research + + + + {currentTab === 0 ? : } + + + + ); +}; diff --git a/tgui/public/tgui-panel.bundle.css b/tgui/public/tgui-panel.bundle.css index 9f4a573a6ce..d65bc4633e0 100644 --- a/tgui/public/tgui-panel.bundle.css +++ b/tgui/public/tgui-panel.bundle.css @@ -1 +1 @@ -:root{--color-base:#262626;--color-section:rgba(0,0,0,.33);--color-secondary:hsl(from var(--color-base)var(--secondary-hue)var(--secondary-saturation)calc(l + var(--secondary-lightness-adjustment)));--secondary-hue:h;--secondary-saturation:s;--secondary-lightness-adjustment:7.5;--base-gradient-spread:2;--color-base-start:hsl(from var(--color-base)h s calc(l + var(--base-gradient-spread)));--color-base-end:hsl(from var(--color-base)h s calc(l - var(--base-gradient-spread)));--color-scrollbar-base:var(--color-section);--color-scrollbar-thumb:hsl(from var(--color-base)h s calc(l + 9.25));--candystripe-odd:rgba(0,0,0,.25);--candystripe-even:transparent;--color-red:#d92626;--color-orange:#f26c0d;--color-yellow:#fcd203;--color-olive:#acc91d;--color-green:#1fad4e;--color-teal:#00b3b3;--color-blue:#2a79c8;--color-violet:#63c;--color-purple:#b333cc;--color-pink:#d9268e;--color-brown:#a96a3c;--color-gold:#f2a60d;--color-black:#000;--color-white:#fff;--color-grey:gray;--color-light-grey:#aaa;--color-gray:var(--color-grey);--color-light-gray:var(--color-light-grey);--color-action:gray;--color-hover:hsl(from var(--color-action)h s l/.25);--color-active:hsl(from var(--color-action)h s l/.3);--color-selected:hsl(from var(--color-action)h s l/.4);--primary-hue:210;--primary-saturation:37.5%;--primary-lightness:45%;--color-primary:hsl(var(--primary-hue),var(--primary-saturation),var(--primary-lightness));--color-good:#5ba626;--color-average:#f2890d;--color-bad:#dc2323;--color-label:hsl(from var(--color-primary)h 17.5 57.5);--color-text:var(--color-white);--color-text-translucent:hsl(from var(--color-text)h s l/.5);--color-text-translucent-light:hsl(from var(--color-text)h s l/.75);--color-text-fixed-white:var(--color-white);--color-text-fixed-black:var(--color-black);--color-hyperlink:#69f;--color-hyperlink-visited:#96f;--color-hyperlink-new:#f66;--color-hyperlink-new-visited:#ff8c66;--color-border:rgba(255,255,255,.1);--color-border-dark:rgba(0,0,0,.33);--border-primary-saturation:100;--border-primary-lightness:75;--border-primary-alpha:.75;--color-border-primary:hsl(from var(--color-primary)h var(--border-primary-saturation)var(--border-primary-lightness)/var(--border-primary-alpha));--color-border-secondary:hsl(from var(--color-border-primary)h s l/1);--font-size:12px;--font-family:Verdana,Geneva,sans-serif;--font-family-mono:Consolas,monospace;--border-thickness-unit:.5em;--border-thickness-tiny:calc(var(--border-thickness-unit)*.5*.34);--border-thickness-small:calc(var(--border-thickness-unit)*.34);--border-thickness-medium:calc(var(--border-thickness-unit)*.5);--border-thickness-large:calc(var(--border-thickness-unit)*.66);--border-thickness-larger:var(--border-thickness-unit);--border-radius-unit:1rem;--border-radius-tiny:calc(var(--border-radius-unit)*.25*.68);--border-radius-small:calc(var(--border-radius-unit)*.25);--border-radius-medium:calc(var(--border-radius-unit)*.33);--border-radius-large:calc(var(--border-radius-unit)*.5);--border-radius-larger:calc(var(--border-radius-unit)*.75);--border-radius-huge:var(--border-radius-unit);--border-radius-giant:calc(var(--border-radius-unit)*2);--border-radius-circular:99999px;--space-unit:1em;--space-xxs:calc(var(--space-unit)*.25*.34);--space-xs:calc(var(--space-unit)*.25*.68);--space-s:calc(var(--space-unit)*.25);--space-sm:calc(var(--space-unit)*.33);--space-m:calc(var(--space-unit)*.5);--space-ml:calc(var(--space-unit)*.66);--space-l:calc(var(--space-unit)*.75);--space-xl:var(--space-unit);--space-xxl:calc(var(--space-unit)*2);--transition-time-unit:1s;--transition-time-fast:calc(var(--transition-time-unit)*.1);--transition-time-medium:calc(var(--transition-time-unit)*.2);--transition-time-slow:calc(var(--transition-time-unit)*.5);--transition-time-slowest:var(--transition-time-unit);--shadow-unit:1rem;--shadow-glow-small:0 0 calc(var(--shadow-unit)*.5);--shadow-glow-medium:0 0 var(--shadow-unit);--shadow-glow-large:0 0 calc(var(--shadow-unit)*2);--blur-small:blur(6px);--blur-medium:blur(12px);--blur-large:blur(24px);--adjust-color:5;--adjust-hover:10;--adjust-active:7.5;--cursor-default:default;--cursor-pointer:pointer;--cursor-disabled:var(--cursor-default);--cursor-n-resize:n-resize;--cursor-s-resize:s-resize;--cursor-se-resize:se-resize;--cursor-e-resize:e-resize;--blockquote-color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)));--blockquote-border:var(--border-thickness-small)solid;--button-height:1.667em;--button-color:var(--color-white);--button-color-transparent:var(--color-text-translucent);--button-background-default:var(--color-primary);--button-background-selected:var(--color-green);--button-background-caution:var(--color-yellow);--button-background-danger:var(--color-red);--button-background-disabled:var(--undefined);--button-disabled-opacity:.5;--button-border-radius:var(--border-radius-tiny);--button-transition:var(--transition-time-medium);--button-transition-timing:ease;--dialog-background:hsl(from var(--color-section)h s l/.5);--dimmer-background-opacity:.75;--dimmer-background:hsl(from var(--color-base)h s 5/var(--dimmer-background-opacity));--divider-color:var(--color-border);--divider-border:var(--border-thickness-small)solid var(--divider-color);--dropdown-transition:var(--transition-time-medium);--dropdown-menu-color:var(--color-text);--dropdown-menu-background:hsl(from var(--color-base)h s calc(l - 5.5)/.85);--dropdown-menu-border:var(--border-thickness-tiny)solid var(--color-border);--dropdown-menu-border-radius:var(--border-radius-large);--dropdown-menu-blur:var(--blur-medium);--dropdown-entry-background-hover:var(--color-hover);--dropdown-entry-background-active:var(--color-active);--dropdown-entry-background-selected:var(--color-selected);--dropdown-entry-border-radius:var(--border-radius-small);--dropdown-entry-transition:var(--transition-time-fast);--floating-transition-time:var(--transition-time-medium);--floating-transition-timing:ease;--tab-background:transparent;--tab-background-hover:hsl(from var(--color-hover)h s calc(l*.75));--tab-background-selected:hsl(from var(--color-selected)h s calc(l*.75));--tab-color:var(--color-text-translucent);--tab-color-selected:hsl(from var(--color-primary)h s 90);--tab-border-radius:var(--border-radius-small);--tab-indicator-size:var(--border-thickness-small);--tab-transition:var(--transition-time-medium);--tabs-container-background:var(--color-section);--imagebutton-transparecy:.25;--input-background-lightness:5;--input-background:hsl(from var(--color-base)h s var(--input-background-lightness));--input-color:var(--color-text);--input-color-placeholder:var(--color-text-translucent);--input-border-color:var(--color-border-primary);--input-border-color-focus:var(--color-border-secondary);--input-border-radius:var(--border-radius-tiny);--input-border-disabled:var(--color-gray);--input-transition:var(--transition-time-medium);--input-font-family:var(--font-family);--input-font-family-mono:var(--font-family-mono);--input-width:9em;--knob-color:hsl(from var(--color-base)h 5 20);--knob-ring-color:var(--input-border-color);--knob-popup-background:var(--tooltip-background);--knob-popup-color:var(--tooltip-color);--knob-popup-border-radius:var(--tooltip-border-radius);--knob-popup-blur:var(--tooltip-blur);--knob-inner-padding:var(--space-xs);--menu-bar-background:var(--color-base);--menu-bar-font-family:var(--font-family);--menu-bar-transition:var(--transition-time-medium);--modal-background:var(--color-base);--modal-padding:var(--space-xl);--notice-box-stripes:rgba(0,0,0,.1);--notice-box-background:#cea257;--notice-box-color:var(--color-text-fixed-white);--number-input-background:var(--input-background);--number-input-color:var(--input-color);--number-input-border-color:var(--input-border-color);--number-input-border-color-active:var(--input-border-color-focus);--number-input-border-radius:var(--input-border-radius);--number-input-transition:var(--input-transition);--progress-bar-fill:var(--color-primary);--progress-bar-background:transparent;--progress-bar-border-radius:var(--border-radius-tiny);--progress-bar-transition:var(--transition-time-slowest);--restricted-input-border-color:var(--color-good);--restricted-input-border-color-focus:hsl(from var(--color-good)h s calc(l + 10));--restricted-input-border-color-invalid:var(--color-bad);--round-gauge-ring-color:var(--input-border-color);--round-gauge-transition:var(--transition-time-medium);--round-gauge-alert-animation:var(--transition-time-slowest);--round-gauge-needle-alert-animation:var(--transition-time-fast);--round-gauge-needle-alert-rotation:2.5deg;--section-title-color:var(--color-text);--section-background:var(--color-section);--section-separator-color:var(--color-primary);--section-separator-thickness:var(--border-thickness-small);--slider-cursor-color:var(--color-text);--slider-popup-background:var(--tooltip-background);--slider-popup-color:var(--tooltip-color);--slider-popup-border-radius:var(--tooltip-border-radius);--slider-popup-blur:var(--tooltip-blur);--tooltip-color:var(--color-text);--tooltip-background-lightness:5;--tooltip-background:hsl(from var(--color-base)h s var(--tooltip-background-lightness)/.85);--tooltip-border-radius:var(--border-radius-medium);--tooltip-blur:var(--blur-medium)}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);position:relative;overflow:auto}.BlockQuote{color:var(--blockquote-color);border-left:var(--blockquote-border);padding-left:var(--space-m);margin-bottom:var(--space-m)}.BlockQuote:last-child{margin-bottom:0}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.ColorBox{text-align:center;width:1em;height:1em;line-height:1em;display:inline-block}.Dialog{background-color:var(--dialog-background);justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.Dialog__content{font-family:var(--font-family-mono);background-color:var(--color-base);flex-direction:column;font-size:1.16667em;display:flex}.Dialog__header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--dialog-background);height:2em;line-height:1.928em;display:flex}.Dialog__title{margin-left:var(--space-xl);margin-right:var(--space-xxl);opacity:.33;flex-grow:1;font-style:italic;display:inline}.Dialog__body{margin:var(--space-xxl)var(--space-xl);flex-grow:1}.Dialog__footer{padding:var(--space-xl);background-color:hsl(from var(--dialog-background)h s l/.25);flex-direction:row;justify-content:flex-end;display:flex}.Dialog__button{margin:0 var(--space-xl);text-align:center;min-width:6rem;height:2rem}.SaveAsDialog__inputs{padding-left:var(--space-xxl);margin-right:var(--space-xl);flex-direction:row;justify-content:flex-end;align-items:center;display:flex}.SaveAsDialog__input{margin-left:var(--space-xl);width:80%}.SaveAsDialog__label{vertical-align:center}.Dialog__FileList{flex-wrap:wrap;flex-grow:1;align-content:flex-start;max-height:20rem;display:flex;position:relative;overflow-x:auto;overflow-y:scroll}.Dialog__FileEntry{text-align:center;margin:var(--space-xl)}.Dialog__FileIcon{cursor:default;text-align:center;width:6vh;height:auto;margin:0 0 var(--space-xl)0;display:inline-block;position:relative}.Dimmer{background-color:var(--dimmer-background);z-index:100;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.Divider--horizontal{margin:var(--space-m)0}.Divider--horizontal:not(.Divider--hidden){border-top:var(--divider-border)}.Divider--vertical{height:100%;margin:0 var(--space-m)}.Divider--vertical:not(.Divider--hidden){border-left:var(--divider-border)}.Button{white-space:nowrap;line-height:var(--button-height);padding:0 var(--space-m);margin-right:var(--space-xs);margin-bottom:var(--space-xs);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;display:inline-block;position:relative}.Button:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Button:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Button:last-child{margin-bottom:0;margin-right:0}.Button__content{align-self:stretch;display:block}.Button__content--ellipsis{align-items:center;display:flex}.Button .Button--icon{text-align:center;min-width:1.333em}.Button.Button--hasIcon{padding-left:0}.Button.Button--hasIcon .Button--icon{margin:0 var(--space-s)}.Button--icon-right.Button--hasIcon{padding-left:var(--space-m);padding-right:var(--space-s)}.Button--icon-right.Button--hasIcon .Button--icon{margin:0 0 0 var(--space-s)}.Button--empty.Button--hasIcon{padding:0}.Button--compact{padding:0 var(--space-s);line-height:1.333em}.Button--compact.Button--hasIcon .Button--icon{margin:0 var(--space-xxs)}.Button--circular{border-radius:var(--border-radius-circular)}.Button--fluid{margin-left:0;margin-right:0;display:block}.Button--ellipsis{text-overflow:ellipsis;margin-right:calc(-1*var(--space-s));display:block;overflow:hidden}.Stack>.Button,.Stack__item>.Button{margin:0}.Button--color--red{--color:var(--color-red)}.Button--color--orange{--color:var(--color-orange)}.Button--color--yellow{--color:var(--color-yellow);--button-color:var(--color-black)}.Button--color--olive{--color:var(--color-olive)}.Button--color--green{--color:var(--color-green)}.Button--color--teal{--color:var(--color-teal)}.Button--color--blue{--color:var(--color-blue)}.Button--color--violet{--color:var(--color-violet)}.Button--color--purple{--color:var(--color-purple)}.Button--color--pink{--color:var(--color-pink)}.Button--color--brown{--color:var(--color-brown)}.Button--color--gold{--color:var(--color-gold)}.Button--color--black{--color:var(--color-black)}.Button--color--white{--color:var(--color-white);--button-color:var(--color-black)}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.Button--color--primary{--color:var(--color-primary)}.Button--color--good{--color:var(--color-good)}.Button--color--average{--color:var(--color-average)}.Button--color--bad{--color:var(--color-bad)}.Button--color--label{--color:var(--color-label)}.Button--color--default{--color:var(--button-background-default)}.Button--color--caution{--color:var(--button-background-caution)}.Button--color--danger{--color:var(--button-background-danger)}.Button--color--transparent{--button-background:hsl(from var(--button-color)h s l/.1);--button-color:var(--button-color-transparent);background-color:transparent}.Button--color--transparent:hover{--button-color:hsl(from var(--button-color-transparent)h s l/1)}.Button--color--transparent:active{opacity:.75}.Button--color--transparent.Button--selected{--button-color:hsl(from var(--color)h s calc(l + var(--adjust-color)))}.Button--color--transparent.Button--disabled{--button-background:hsl(from var(--button-color)h s l/.2);--button-color:var(--color-bad);opacity:1;color:var(--button-color)!important}.Button--disabled{opacity:var(--button-disabled-opacity);cursor:var(--cursor-disabled)!important;background-color:var(--button-background-disabled,var(--button-background))!important}.Button--selected{--color:var(--button-background-selected)!important}.Button--flex{flex-direction:column;display:inline-flex}.Button--flex--fluid{width:100%}.Button--verticalAlignContent--top{justify-content:flex-start}.Button--verticalAlignContent--middle{justify-content:center}.Button--verticalAlignContent--bottom{justify-content:flex-end}.Dropdown{align-items:stretch;gap:var(--space-s);margin-right:var(--space-xs);margin-bottom:var(--space-xs);display:flex}.Dropdown:last-child{margin-bottom:0;margin-right:0}.Dropdown .Button{align-content:center;margin:0}.Dropdown--fluid{flex:1;width:100%}.Dropdown__control{font-family:var(--font-family);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));height:1.83333em;cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex:1;font-size:1em;line-height:1.33333em;display:flex;overflow:hidden}.Dropdown__control:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Dropdown__control:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Dropdown__selected-text{text-overflow:ellipsis;white-space:nowrap;height:100%;padding:var(--space-s)var(--space-m);border-right:var(--border-thickness-tiny)solid var(--color-border-dark);flex:1;align-content:center;display:inline-block;overflow:hidden}.Dropdown__icon{text-align:center;width:1.83333em;height:100%;transition:transform var(--dropdown-transition);align-content:center;display:inline-block}.Dropdown__icon--arrow.open:not(.over),.Dropdown__icon--arrow.over:not(.open){transform:rotate(180deg)}.Dropdown__icon~.Dropdown__selected-text{padding-left:0}.Dropdown__menu{scrollbar-width:thin;scrollbar-color:var(--color-scrollbar-thumb)transparent;max-height:16.6667em;padding:var(--space-sm);overflow-y:auto}.Dropdown__menu--wrapper{background-color:var(--dropdown-menu-background);color:var(--dropdown-menu-color);border:var(--dropdown-menu-border);border-radius:var(--dropdown-menu-border-radius);-webkit-backdrop-filter:var(--dropdown-menu-blur);backdrop-filter:var(--dropdown-menu-blur);overflow:hidden}.Dropdown__menu--entry{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;font-family:var(--font-family);padding:var(--space-xs)var(--space-m);border-radius:var(--dropdown-entry-border-radius);transition:background-color var(--dropdown-entry-transition);font-size:1em;line-height:1.33333em;overflow:hidden}.Dropdown__menu--entry.selected{transition-duration:0s;background-color:var(--dropdown-entry-background-selected)!important}.Dropdown__menu--entry:not(.selected){cursor:var(--cursor-pointer)}.Dropdown__menu--entry:not(.selected):hover{background-color:var(--dropdown-entry-background-hover);transition-duration:0s}.Dropdown__menu--entry:not(.selected):active{background-color:var(--dropdown-entry-background-active);transition-duration:0s}.Dropdown__control--icon-only{justify-content:center;align-items:center;max-width:2rem;display:flex}.Flex{display:flex}.Flex--inline{display:inline-flex}.Flex--iefix{display:block}.Flex--iefix.Flex--inline,.Flex__item--iefix{display:inline-block}.Flex--iefix--column>.Flex__item--iefix{display:block}.Floating{z-index:5}.Floating--animated[data-transition=open]{opacity:1;transform:scale(1)}.Floating--animated[data-transition=close],.Floating--animated[data-transition=initial]{opacity:0;transform:scale(.9)}.Floating--animated[data-transition=open],.Floating--animated[data-transition=close]{transition-duration:var(--floating-transition-time);transition-timing-function:var(--floating-transition-timing);transition-property:opacity,transform}.Floating[data-position=top]{transform-origin:bottom}.Floating[data-position=top-start],.Floating[data-position=right-end]{transform-origin:0 100%}.Floating[data-position=top-end],.Floating[data-position=left-end]{transform-origin:100% 100%}.Floating[data-position=bottom]{transform-origin:top}.Floating[data-position=bottom-start],.Floating[data-position=right-start]{transform-origin:0 0}.Floating[data-position=bottom-end],.Floating[data-position=left-start]{transform-origin:100% 0}.Floating[data-position=right]{transform-origin:0}.Floating[data-position=left]{transform-origin:100%}.IconStack{justify-content:center;align-items:center;display:inline-flex;position:relative}.IconStack .Icon:before{vertical-align:middle}.IconStack .Icon:not(:first-child){position:absolute}.ImageButton{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color)*2)/var(--imagebutton-transparecy));border:var(--border-thickness-tiny)solid hsl(from var(--imagebutton-color)h s calc(l + var(--adjust-color))/var(--imagebutton-transparecy));border-radius:var(--border-radius-medium);transition-property:background-color,border-color,box-shadow;transition-duration:var(--transition-time-medium);border-width:0;margin:.25em;display:inline-flex;position:relative;overflow:hidden}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(.ImageButton--fluid) .ImageButton__content{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-hover)));border-top:var(--border-thickness-tiny)solid var(--imagebutton-color)}.ImageButton__container{border-color:inherit;transition:opacity var(--transition-time-medium);flex-direction:column;display:flex}.ImageButton__image{pointer-events:none;padding:var(--space-s);border:var(--border-thickness-tiny)solid;border-bottom:none;border-color:inherit;border-radius:var(--border-radius-medium)var(--border-radius-medium)0 0;transition:filter var(--transition-time-slow);align-self:center;line-height:0;position:relative;overflow:hidden}.ImageButton__image--fallback{text-align:center;color:var(--color-text-translucent);align-content:center}.ImageButton__image--fallback:before{zoom:.75;width:100%;display:table}.ImageButton__content{white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-fixed-white);z-index:2;padding:.25em .33em;overflow:hidden}.ImageButton__buttons{left:var(--border-thickness-tiny);z-index:1;max-width:100%;display:flex;position:absolute;bottom:1.8em;overflow:hidden}.ImageButton__buttons--alt{pointer-events:none;top:var(--border-thickness-tiny);text-shadow:0px 1px 2px var(--color-base),-1px 0px 2px var(--color-base),1px 0px 2px var(--color-base),0px -1px 2px var(--color-base);flex-direction:column;overflow:visible;bottom:unset!important}.ImageButton__buttons--empty{bottom:0;left:0}.ImageButton__buttons>*{border-radius:0!important;margin:0!important;padding:0!important}.ImageButton--empty{border-width:var(--border-thickness-tiny)}.ImageButton--empty .ImageButton__image{border-radius:var(--border-radius-medium);border:none}.Stack>.ImageButton,.Stack__item>.ImageButton{margin:0}.ImageButton--fluid{border-width:var(--border-thickness-tiny);flex-direction:row;margin:0 0 .33em;display:flex}.ImageButton--fluid:last-child{margin-bottom:0}.ImageButton--fluid .ImageButton__container{flex-direction:row;flex:1}.ImageButton--fluid .ImageButton__image{border:0;margin:0 auto;padding:0}.ImageButton--fluid .ImageButton__content{white-space:normal;color:var(--color-text);flex-direction:column;flex:1;justify-content:center;margin:0 .5em;padding:0;display:flex}.ImageButton--fluid .ImageButton__content--title{padding:.5em;font-weight:700}.ImageButton--fluid .ImageButton__content--divider{border-bottom:var(--border-thickness-small)solid var(--color-border)}.ImageButton--fluid .ImageButton__content--text{padding:.5em}.ImageButton--fluid .ImageButton__buttons{left:inherit;bottom:inherit;background-color:inherit;position:relative}.ImageButton--fluid .ImageButton__buttons--alt{pointer-events:all;top:inherit;text-shadow:none}.ImageButton--fluid .ImageButton__buttons--alt>*{border-top:1px solid rgba(255,255,255,.075)}.ImageButton--fluid .ImageButton__buttons--alt>:first-child{border-top:0}.ImageButton--fluid .ImageButton__buttons>*{text-align:center;white-space:pre-wrap;border-left:var(--border-thickness-tiny)solid var(--color-border);flex-direction:column;justify-content:center;height:100%;line-height:1.15em;display:inline-flex}.ImageButton__color--red{--imagebutton-color:var(--color-red)}.ImageButton__color--orange{--imagebutton-color:var(--color-orange)}.ImageButton__color--yellow{--imagebutton-color:var(--color-yellow);--color-text-fixed-white:var(--color-black)}.ImageButton__color--olive{--imagebutton-color:var(--color-olive)}.ImageButton__color--green{--imagebutton-color:var(--color-green)}.ImageButton__color--teal{--imagebutton-color:var(--color-teal)}.ImageButton__color--blue{--imagebutton-color:var(--color-blue)}.ImageButton__color--violet{--imagebutton-color:var(--color-violet)}.ImageButton__color--purple{--imagebutton-color:var(--color-purple)}.ImageButton__color--pink{--imagebutton-color:var(--color-pink)}.ImageButton__color--brown{--imagebutton-color:var(--color-brown)}.ImageButton__color--gold{--imagebutton-color:var(--color-gold)}.ImageButton__color--black{--imagebutton-color:var(--color-black)}.ImageButton__color--white{--imagebutton-color:var(--color-white);--color-text-fixed-white:var(--color-black)}.ImageButton__color--grey,.ImageButton__color--gray{--imagebutton-color:var(--color-grey)}.ImageButton__color--light-grey,.ImageButton__color--light-gray{--imagebutton-color:var(--color-light-grey)}.ImageButton__color--good{--imagebutton-color:var(--color-good)}.ImageButton__color--average{--imagebutton-color:var(--color-average)}.ImageButton__color--bad{--imagebutton-color:var(--color-bad)}.ImageButton__color--label{--imagebutton-color:var(--color-label)}.ImageButton__color--transparent{--imagebutton-color:var(--color-text-translucent-light);--imagebutton-transparecy:.1;background-color:transparent;border-color:transparent!important}.ImageButton__color--transparent .ImageButton__content{color:var(--color-text-translucent-light);background-color:transparent!important;border-color:transparent!important}.ImageButton__color--transparent.ImageButton--disabled{background-color:hsL(from var(--color-red)h s l/.15)!important}.ImageButton__color--transparent.ImageButton--selected{background-color:hsL(from var(--color-good)h s l/.15)}.ImageButton__color--default{--imagebutton-color:hsl(from var(--color-base)h s 30)}.ImageButton__color--primary{--imagebutton-color:hsl(from var(--color-primary)h s l)}.ImageButton--selected{--imagebutton-color:hsl(from var(--button-background-selected)h s calc(l*1.15));--color-text-fixed-white:var(--color-white)}.ImageButton--disabled .ImageButton__container{cursor:var(--cursor-disabled);opacity:.5}.ImageButton--disabled.ImageButton--fluid{-webkit-filter:contrast(75%);filter:contrast(75%)}.ImageButton--disabled.ImageButton--fluid .ImageButton__buttons{-webkit-filter:contrast(125%);filter:contrast(125%)}.Input{background-color:var(--input-background);border-radius:var(--input-border-radius);border:var(--border-thickness-tiny)solid var(--input-border-color);color:var(--input-color);font-size:1em;font-family:var(--input-font-family);padding:var(--space-xxs)var(--space-sm);width:var(--input-width)}.Input:focus{outline:none}.Input:focus-within{border-color:var(--input-border-color-focus)}.Input::-webkit-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::-ms-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::placeholder{color:var(--input-color-placeholder);font-style:italic}.Input--disabled{border-color:var(--input-border-disabled);color:var(--input-color-placeholder)}.Input--fluid{width:100%}.Input--monospace{font-family:var(--input-font-family-mono)}.Knob{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-n-resize);width:2.6em;height:2.6em;margin:0 auto -.2em;font-size:1rem;position:relative}.Knob:after{content:".";color:transparent;line-height:2.5em}.Knob__circle{inset:var(--knob-inner-padding);background-color:var(--knob-color);background-image:linear-gradient(to bottom,hsl(from var(--knob-color)h s calc(l + 15))0%,var(--knob-color)100%);border-radius:var(--border-radius-circular);box-shadow:var(--shadow-glow-medium)hsl(from var(--knob-color)h s l/.25);margin:.3em;position:absolute}.Knob__cursorBox{position:absolute;top:0;bottom:0;left:0;right:0}.Knob__cursor{background-color:hsl(from var(--knob-color)h s 85);width:.2em;height:.8em;margin:0 auto;position:relative;top:.05em}.Knob__popupValue{white-space:nowrap;text-align:center;padding:var(--space-s)var(--space-m);background-color:var(--knob-popup-background);color:var(--knob-popup-color);border-radius:var(--knob-popup-border-radius);-webkit-backdrop-filter:var(--knob-popup-blur);backdrop-filter:var(--knob-popup-blur);font-size:1rem;position:absolute;top:0;left:50%;transform:translateY(-100%)translate(-50%)}.Knob__ring{padding:var(--knob-inner-padding);position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.Knob__ringTrackPivot{transform:rotate(135deg)}.Knob__ringTrack{fill:transparent;stroke:hsl(from var(--ring-color,var(--knob-ring-color))h s l/.15);stroke-width:8px;stroke-linecap:round;stroke-dasharray:235.62}.Knob__ringFillPivot{transform:rotate(135deg)}.Knob--bipolar .Knob__ringFillPivot{transform:rotate(270deg)}.Knob__ringFill{fill:transparent;stroke:var(--ring-color,var(--knob-ring-color));stroke-width:8px;stroke-linecap:round;stroke-dasharray:314.16;transition:stroke var(--transition-time-medium)ease-out}.Knob--color--red{--ring-color:var(--color-red)}.Knob--color--orange{--ring-color:var(--color-orange)}.Knob--color--yellow{--ring-color:var(--color-yellow)}.Knob--color--olive{--ring-color:var(--color-olive)}.Knob--color--green{--ring-color:var(--color-green)}.Knob--color--teal{--ring-color:var(--color-teal)}.Knob--color--blue{--ring-color:var(--color-blue)}.Knob--color--violet{--ring-color:var(--color-violet)}.Knob--color--purple{--ring-color:var(--color-purple)}.Knob--color--pink{--ring-color:var(--color-pink)}.Knob--color--brown{--ring-color:var(--color-brown)}.Knob--color--gold{--ring-color:var(--color-gold)}.Knob--color--black{--ring-color:var(--color-black)}.Knob--color--white{--ring-color:var(--color-white)}.Knob--color--grey,.Knob--color--gray{--ring-color:var(--color-grey)}.Knob--color--light-grey,.Knob--color--light-gray{--ring-color:var(--color-light-grey)}.Knob--color--primary{--ring-color:var(--color-primary)}.Knob--color--good{--ring-color:var(--color-good)}.Knob--color--average{--ring-color:var(--color-average)}.Knob--color--bad{--ring-color:var(--color-bad)}.Knob--color--label{--ring-color:var(--color-label)}.LabeledList{border-collapse:collapse;border-spacing:0;width:calc(100% + 1em);margin:calc(-1*var(--space-s))calc(-1*var(--space-m))0;padding:0;display:table}.LabeledList__row{display:table-row}.LabeledList__row:last-child .LabeledList__cell{padding-bottom:0}.LabeledList__cell{padding:var(--space-s)var(--space-m);text-align:left;border:0;margin:0;display:table-cell}.LabeledList__label--nowrap{white-space:nowrap;width:1%;min-width:5em}.LabeledList__buttons{white-space:nowrap;text-align:right;width:.1%;padding-top:var(--space-xxs);padding-bottom:0}.LabeledList__breakContents{word-break:break-all;word-wrap:break-word}.MenuBar{display:flex}.MenuBar__font{font-family:var(--menu-bar-font-family);font-size:1em;line-height:1.41667em}.MenuBar__hover:hover{background-color:hsl(from var(--menu-bar-background)h s calc(l + 20));transition:background-color}.MenuBar__MenuBarButton{padding:var(--space-s)var(--space-m)}.MenuBar__menu{background-color:var(--menu-bar-background);padding:var(--space-sm);z-index:5;position:absolute;box-shadow:4px 6px 5px -2px rgba(0,0,0,.5)}.MenuBar__MenuItem{transition:background-color var(--menu-bar-transition)ease-out;background-color:var(--menu-bar-background);white-space:nowrap;padding:var(--space-sm)var(--space-xl)var(--space-sm)calc(var(--space-xxl) + 1rem)}.MenuBar__MenuItemToggle{padding:var(--space-sm)var(--space-xl)var(--space-sm)0}.MenuBar__MenuItemToggle__check{vertical-align:middle;text-align:center;min-width:2.5rem;padding-left:var(--space-sm);display:inline-block}.MenuBar__over{top:auto;bottom:100%}.MenuBar__MenuBarButton-text{text-overflow:clip;white-space:nowrap;height:1.41667em}.MenuBar__Separator{margin:var(--space-sm);border-top:var(--border-thickness-tiny)solid var(--color-border);display:block}.Modal{background-color:var(--modal-background);padding:var(--modal-padding)}.Modal__dimmer .Dimmer__inner{max-width:calc(100vw - var(--space-xxl));max-height:calc(100vh - var(--space-xxl))}.NoticeBox{--noticebox-background:var(--notice-box-background);padding:var(--space-sm)var(--space-m);margin-bottom:var(--space-m);background-color:oklch(from var(--noticebox-background)calc(l*.825)calc(c*.75)h);background-image:repeating-linear-gradient(-45deg,transparent 0 .833333em,var(--notice-box-stripes).833333em 1.66667em);color:var(--notice-box-color);font-style:italic;font-weight:700}.NoticeBox--color--red{--noticebox-background:var(--color-red)}.NoticeBox--color--orange{--noticebox-background:var(--color-orange)}.NoticeBox--color--yellow{--noticebox-background:var(--color-yellow);--notice-box-color:var(--color-black)}.NoticeBox--color--olive{--noticebox-background:var(--color-olive)}.NoticeBox--color--green{--noticebox-background:var(--color-green)}.NoticeBox--color--teal{--noticebox-background:var(--color-teal)}.NoticeBox--color--blue{--noticebox-background:var(--color-blue)}.NoticeBox--color--violet{--noticebox-background:var(--color-violet)}.NoticeBox--color--purple{--noticebox-background:var(--color-purple)}.NoticeBox--color--pink{--noticebox-background:var(--color-pink)}.NoticeBox--color--brown{--noticebox-background:var(--color-brown)}.NoticeBox--color--gold{--noticebox-background:var(--color-gold)}.NoticeBox--color--black{--noticebox-background:var(--color-black);--notice-box-stripes:rgba(255,255,255,.1)}.NoticeBox--color--white{--noticebox-background:var(--color-white);--notice-box-color:var(--color-black)}.NoticeBox--color--grey,.NoticeBox--color--gray{--noticebox-background:var(--color-grey)}.NoticeBox--color--light-grey,.NoticeBox--color--light-gray{--noticebox-background:var(--color-light-grey)}.NoticeBox--color--primary{--noticebox-background:var(--color-primary)}.NoticeBox--color--good{--noticebox-background:var(--color-good)}.NoticeBox--color--average{--noticebox-background:var(--color-average)}.NoticeBox--color--bad{--noticebox-background:var(--color-bad)}.NoticeBox--color--label{--noticebox-background:var(--color-label)}.NoticeBox--type--info{--noticebox-background:var(--color-blue)}.NoticeBox--type--success{--noticebox-background:var(--color-green)}.NoticeBox--type--warning{--noticebox-background:var(--color-orange)}.NoticeBox--type--danger{--noticebox-background:var(--color-red)}.NumberInput{cursor:var(--cursor-n-resize);text-align:right;padding:0 var(--space-sm);margin-right:var(--space-xs);background-color:var(--number-input-background);color:var(--number-input-border-color-active);border:var(--border-thickness-tiny)solid var(--number-input-border-color);border-radius:var(--number-input-border-radius);transition:border-color var(--number-input-transition);line-height:1.41667em;display:inline-block;position:relative;overflow:visible}.NumberInput:active{border-color:var(--number-input-border-color-active)}.NumberInput--fluid{display:block}.NumberInput__content{margin-left:var(--space-m)}.NumberInput__barContainer{top:var(--space-xs);bottom:var(--space-xs);left:var(--space-xs);position:absolute}.NumberInput__bar{box-sizing:border-box;border-bottom:var(--border-thickness-tiny)solid var(--number-input-border-color-active);background-color:var(--number-input-border-color-active);width:.25em;position:absolute;bottom:0;left:0}.NumberInput__input{text-align:right;width:100%;height:1.41667em;padding:0 var(--space-m);font-size:1em;line-height:1.41667em;font-family:var(--font-family);background-color:var(--number-input-background);color:var(--number-input-color);border:0;outline:0;margin:0;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar{width:100%;min-height:var(--button-height);padding:0 var(--space-m);background-color:var(--progress-bar-background);border:var(--border-thickness-tiny)solid var(--progress-bar-color);border-radius:var(--progress-bar-border-radius);transition:border-color var(--progress-bar-transition)ease-out;align-content:center;display:inline-block;position:relative}.ProgressBar__fill{background-color:var(--progress-bar-color);position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar__fill--animated{transition-property:background-color,width;transition-duration:var(--progress-bar-transition)}.ProgressBar__content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:right;width:100%;position:relative}.ProgressBar--color--default{--progress-bar-color:hsl(from var(--progress-bar-fill)h s calc(l - var(--adjust-color)))}.ProgressBar--color--red{--progress-bar-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))}.ProgressBar--color--orange{--progress-bar-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))}.ProgressBar--color--yellow{--progress-bar-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))}.ProgressBar--color--olive{--progress-bar-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))}.ProgressBar--color--green{--progress-bar-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))}.ProgressBar--color--teal{--progress-bar-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))}.ProgressBar--color--blue{--progress-bar-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))}.ProgressBar--color--violet{--progress-bar-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))}.ProgressBar--color--purple{--progress-bar-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))}.ProgressBar--color--pink{--progress-bar-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))}.ProgressBar--color--brown{--progress-bar-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))}.ProgressBar--color--gold{--progress-bar-color:hsl(from var(--color-gold)h s calc(l - var(--adjust-color)))}.ProgressBar--color--black{--progress-bar-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))}.ProgressBar--color--white{--progress-bar-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))}.ProgressBar--color--grey,.ProgressBar--color--gray{--progress-bar-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--light-grey,.ProgressBar--color--light-gray{--progress-bar-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--primary{--progress-bar-color:hsl(from var(--color-primary)h s calc(l - var(--adjust-color)))}.ProgressBar--color--good{--progress-bar-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))}.ProgressBar--color--average{--progress-bar-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))}.ProgressBar--color--bad{--progress-bar-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))}.ProgressBar--color--label{--progress-bar-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))}.RestrictedInput{border-color:var(--restricted-input-border-color);text-align:right}.RestrictedInput:focus-within{border-color:var(--restricted-input-border-color-focus)}.RestrictedInput::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput--invalid{border-color:var(--restricted-input-border-color-invalid)}.RestrictedInput--invalid:focus-within{border-color:var(--restricted-input-border-color-invalid)}@keyframes RoundGauge__alertAnim{0%,to{opacity:.1}50%{opacity:1}}@keyframes RoundGauge__needleAlertAnim{0%{transform:rotate(var(--round-gauge-needle-alert-rotation))}50%{transform:rotate(calc(-1*var(--round-gauge-needle-alert-rotation)))}}.RoundGauge{width:2.6em;height:1.3em;margin:0 auto .2em;font-size:1rem}.RoundGauge__wrapper{text-align:center;display:inline-block}.RoundGauge__ringTrack{fill:transparent;stroke:rgba(255,255,255,.1);stroke-width:10px;stroke-dasharray:157.08;stroke-dashoffset:157.08px}.RoundGauge__ringFill{fill:transparent;stroke:var(--round-gauge-ring-color);stroke-width:10px;stroke-dasharray:314.16;transition:stroke var(--round-gauge-transition)ease-out}.RoundGauge__needle,.RoundGauge__ringFill{transition:transform var(--round-gauge-transition)ease-in-out}.RoundGauge__needleLine,.RoundGauge__needleMiddle{fill:var(--color-red)}.RoundGauge__alert{fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;fill:rgba(255,255,255,.1);transform-origin:top;transform:scale(.9)}.RoundGauge__alert.active{animation:RoundGauge__alertAnim var(--round-gauge-alert-animation)cubic-bezier(.34,1.56,.64,1)infinite}.RoundGauge__alert.active~.RoundGauge__needle .RoundGauge__needleLine{transform-origin:bottom;animation:RoundGauge__needleAlertAnim var(--round-gauge-needle-alert-animation)infinite}.RoundGauge__alert.max{fill:var(--color-bad)}.RoundGauge--color--red.RoundGauge__ringFill{stroke:var(--color-red)}.RoundGauge--color--orange.RoundGauge__ringFill{stroke:var(--color-orange)}.RoundGauge--color--yellow.RoundGauge__ringFill{stroke:var(--color-yellow)}.RoundGauge--color--olive.RoundGauge__ringFill{stroke:var(--color-olive)}.RoundGauge--color--green.RoundGauge__ringFill{stroke:var(--color-green)}.RoundGauge--color--teal.RoundGauge__ringFill{stroke:var(--color-teal)}.RoundGauge--color--blue.RoundGauge__ringFill{stroke:var(--color-blue)}.RoundGauge--color--violet.RoundGauge__ringFill{stroke:var(--color-violet)}.RoundGauge--color--purple.RoundGauge__ringFill{stroke:var(--color-purple)}.RoundGauge--color--pink.RoundGauge__ringFill{stroke:var(--color-pink)}.RoundGauge--color--brown.RoundGauge__ringFill{stroke:var(--color-brown)}.RoundGauge--color--gold.RoundGauge__ringFill{stroke:var(--color-gold)}.RoundGauge--color--black.RoundGauge__ringFill{stroke:var(--color-black)}.RoundGauge--color--white.RoundGauge__ringFill{stroke:var(--color-white)}.RoundGauge--color--grey.RoundGauge__ringFill,.RoundGauge--color--gray.RoundGauge__ringFill{stroke:var(--color-grey)}.RoundGauge--color--light-grey.RoundGauge__ringFill,.RoundGauge--color--light-gray.RoundGauge__ringFill{stroke:var(--color-light-grey)}.RoundGauge--color--primary.RoundGauge__ringFill{stroke:var(--color-primary)}.RoundGauge--color--good.RoundGauge__ringFill{stroke:var(--color-good)}.RoundGauge--color--average.RoundGauge__ringFill{stroke:var(--color-average)}.RoundGauge--color--bad.RoundGauge__ringFill{stroke:var(--color-bad)}.RoundGauge--color--label.RoundGauge__ringFill{stroke:var(--color-label)}.RoundGauge__alert--red{fill:var(--color-red)}.RoundGauge__alert--orange{fill:var(--color-orange)}.RoundGauge__alert--yellow{fill:var(--color-yellow)}.RoundGauge__alert--olive{fill:var(--color-olive)}.RoundGauge__alert--green{fill:var(--color-green)}.RoundGauge__alert--teal{fill:var(--color-teal)}.RoundGauge__alert--blue{fill:var(--color-blue)}.RoundGauge__alert--violet{fill:var(--color-violet)}.RoundGauge__alert--purple{fill:var(--color-purple)}.RoundGauge__alert--pink{fill:var(--color-pink)}.RoundGauge__alert--brown{fill:var(--color-brown)}.RoundGauge__alert--gold{fill:var(--color-gold)}.RoundGauge__alert--black{fill:var(--color-black)}.RoundGauge__alert--white{fill:var(--color-white)}.RoundGauge__alert--grey,.RoundGauge__alert--gray{fill:var(--color-grey)}.RoundGauge__alert--light-grey,.RoundGauge__alert--light-gray{fill:var(--color-light-grey)}.RoundGauge__alert--primary{fill:var(--color-primary)}.RoundGauge__alert--good{fill:var(--color-good)}.RoundGauge__alert--average{fill:var(--color-average)}.RoundGauge__alert--bad{fill:var(--color-bad)}.RoundGauge__alert--label{fill:var(--color-label)}.Section{margin-bottom:var(--space-m);background-color:var(--section-background);box-sizing:border-box;scrollbar-color:var(--color-scrollbar-thumb)transparent;position:relative}.Section:last-child{margin-bottom:0}.Section__title{padding:var(--space-m);border-bottom:var(--section-separator-thickness)solid var(--section-separator-color);position:relative}.Section__titleText{color:var(--section-title-color);font-size:1.16667em;font-weight:700}.Section__buttons{right:var(--space-m);margin-top:calc(-1*var(--space-xxs));display:inline-block;position:absolute}.Section__rest{position:relative}.Section__content{padding:var(--space-ml)var(--space-m)}.Section--fitted>.Section__rest>.Section__content{padding:0}.Section--fill{flex-direction:column;height:100%;display:flex}.Section--fill>.Section__rest{flex-grow:1}.Section--fill>.Section__rest>.Section__content{height:100%}.Section--fill.Section--scrollable>.Section__rest>.Section__content{position:absolute;top:0;bottom:0;left:0;right:0}.Section--scrollable{overflow:hidden}.Section--scrollable>.Section__rest>.Section__content{overflow-x:hidden;overflow-y:auto}.Section--scrollableHorizontal{overflow:hidden}.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-x:auto;overflow-y:hidden}.Section--scrollable.Section--scrollableHorizontal{overflow:hidden}.Section--scrollable.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow:auto}.Section .Section{margin:0 calc(-1*var(--space-m));background-color:transparent}.Section .Section:first-child{margin-top:calc(-1*var(--space-m))}.Section .Section .Section__titleText{font-size:1.08333em}.Section .Section .Section .Section__titleText{font-size:1em}.Section--flex{flex-flow:column;display:flex}.Section--flex .Section__content{flex-grow:1;overflow:auto}.Section__content--noTopPadding{padding-top:0}.Section__content--stretchContents{height:calc(100% - 3rem)}.Slider{cursor:e-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Slider--editing .Slider__cursor:before{display:none}.Slider__cursor{inset:0 calc(-1*var(--space-xxs));left:unset;border-left:var(--border-thickness-small)solid var(--slider-cursor-color);border-radius:var(--border-radius-circular);position:absolute}.Slider__cursorOffset{position:absolute;top:0;bottom:0;left:0;right:0;transition:none!important}.Slider__cursor:before{content:"";aspect-ratio:1;border-left:inherit;transform-origin:50%;position:absolute;bottom:0;right:0;transform:scale(4)translateY(50%)rotate(45deg);-webkit-mask-image:linear-gradient(135deg,#000 50%,transparent 50%);mask-image:linear-gradient(135deg,#000 50%,transparent 50%)}.Slider__popupValue{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;padding:var(--space-s)var(--space-m);background-color:var(--slider-popup-background);color:var(--slider-popup-color);border-radius:var(--slider-popup-border-radius);-webkit-backdrop-filter:var(--slider-popup-blur);backdrop-filter:var(--slider-popup-blur);font-size:1em;position:absolute;top:-2em;right:0;transform:translate(50%)}.Slider .NumberInput__input{width:auto;height:auto;top:2px;bottom:2px;left:2px;right:2px}.Stack{gap:.5em}.Stack--fill{height:100%}.Stack--zebra>.Stack__item:nth-child(odd){background-color:var(--candystripe-odd)}.Stack--horizontal>.Stack__divider:not(.Stack__divider--hidden){border-left:var(--divider-border)}.Stack--vertical>.Stack__divider:not(.Stack__divider--hidden){border-top:var(--divider-border)}.Table{border-collapse:collapse;border-spacing:0;width:100%;margin:0;display:table}.Table--collapsing{width:auto}.Table__row{display:table-row}.Table__cell{padding:0 var(--space-s);display:table-cell}.Table__cell:first-child{padding-left:0}.Table__cell:last-child{padding-right:0}.Table__row--header .Table__cell,.Table__cell--header{padding-bottom:var(--space-m);font-weight:700}.Table__cell--collapsing{white-space:nowrap;width:1%}.Tabs{background-color:var(--tabs-container-background);align-items:stretch;display:flex;position:relative;overflow:hidden}.Tabs--fill{height:100%}.Tabs--vertical{padding:var(--space-s)0 var(--space-s)var(--space-s);flex-direction:column}.Tabs--horizontal{margin-bottom:var(--space-m);padding:var(--space-s)var(--space-s)0}.Tabs--horizontal:last-child{margin-bottom:0}.Tabs__Tab{flex-grow:0}.Tabs--fluid .Tabs__Tab{flex-grow:1}.Tab{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-pointer);background-color:var(--tab-background);color:var(--tab-color);min-width:4em;min-height:2.25em;transition-property:background-color,color;transition-duration:var(--tab-transition);justify-content:space-between;align-items:center;display:flex}.Tab:not(.Tab--selected):hover{background-color:var(--tab-background-hover)}.Tab:not(.Tab--selected):active{color:var(--tab-color-selected)}.Tab--selected{cursor:var(--cursor-default);background-color:var(--tab-background-selected);color:var(--tab-color-selected)}.Tab .Tab__text{margin:0 var(--space-m);flex-grow:1}.Tab__left{text-align:center;min-width:1.5em;margin-left:var(--space-s)}.Tab__right{text-align:center;min-width:1.5em;margin-right:var(--space-s)}.Tabs--horizontal .Tab{border-top-left-radius:var(--tab-border-radius);border-top-right-radius:var(--tab-border-radius);padding-bottom:var(--tab-indicator-size);position:relative}.Tabs--horizontal .Tab:before{content:"";transition:transform var(--tab-transition);width:100%;height:var(--tab-indicator-size);background-color:currentColor;position:absolute;bottom:0;transform:scaleX(0)}.Tabs--horizontal .Tab--selected:before{transform:scaleX(.99999)!important}.Tabs--vertical .Tab{border-top-left-radius:var(--tab-border-radius);border-bottom-left-radius:var(--tab-border-radius);min-height:2em;padding-right:var(--tab-indicator-size);position:relative}.Tabs--vertical .Tab:before{content:"";transition:transform var(--tab-transition);width:var(--tab-indicator-size);background-color:currentColor;height:100%;position:absolute;right:0;transform:scaleY(0)}.Tabs--vertical .Tab--selected:before{transform:scaleY(.99999)!important}.Tabs--scrollable{--mask-width:3.25em;--mask-left:0rem;--mask-right:0rem;padding:0;display:grid}.Tabs--scrollable-content{scrollbar-width:none;overscroll-behavior:none;padding:var(--space-s)var(--space-s)0;-webkit-mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));flex-wrap:nowrap;display:flex;overflow:auto}.Tabs--scrollable-content.scrollable-left.scrollable-right{--mask-left:var(--mask-width);--mask-right:var(--mask-width)}.Tabs--scrollable-content.scrollable-left{--mask-left:var(--mask-width)}.Tabs--scrollable-content.scrollable-right{--mask-right:var(--mask-width)}.Tabs--scrollable .scroll-left,.Tabs--scrollable .scroll-right{z-index:1;border-radius:0;align-content:center;height:100%;margin:0;position:absolute;top:0}.Tabs--scrollable .scroll-left{left:0}.Tabs--scrollable .scroll-right{right:0}.Tabs--scrollable .Tab{flex-shrink:0}.Tab--selected.Tab--color--red{color:hsl(from var(--color-red)h s calc(l + 17.5))}.Tab--selected.Tab--color--orange{color:hsl(from var(--color-orange)h s calc(l + 17.5))}.Tab--selected.Tab--color--yellow{color:hsl(from var(--color-yellow)h s calc(l + 17.5))}.Tab--selected.Tab--color--olive{color:hsl(from var(--color-olive)h s calc(l + 17.5))}.Tab--selected.Tab--color--green{color:hsl(from var(--color-green)h s calc(l + 17.5))}.Tab--selected.Tab--color--teal{color:hsl(from var(--color-teal)h s calc(l + 17.5))}.Tab--selected.Tab--color--blue{color:hsl(from var(--color-blue)h s calc(l + 17.5))}.Tab--selected.Tab--color--violet{color:hsl(from var(--color-violet)h s calc(l + 17.5))}.Tab--selected.Tab--color--purple{color:hsl(from var(--color-purple)h s calc(l + 17.5))}.Tab--selected.Tab--color--pink{color:hsl(from var(--color-pink)h s calc(l + 17.5))}.Tab--selected.Tab--color--brown{color:hsl(from var(--color-brown)h s calc(l + 17.5))}.Tab--selected.Tab--color--gold{color:hsl(from var(--color-gold)h s calc(l + 17.5))}.Tab--selected.Tab--color--black{color:hsl(from var(--color-black)h s calc(l + 17.5))}.Tab--selected.Tab--color--white{color:hsl(from var(--color-white)h s calc(l + 17.5))}.Tab--selected.Tab--color--grey,.Tab--selected.Tab--color--gray{color:hsl(from var(--color-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--light-grey,.Tab--selected.Tab--color--light-gray{color:hsl(from var(--color-light-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--primary{color:hsl(from var(--color-primary)h s calc(l + 17.5))}.Tab--selected.Tab--color--good{color:hsl(from var(--color-good)h s calc(l + 17.5))}.Tab--selected.Tab--color--average{color:hsl(from var(--color-average)h s calc(l + 17.5))}.Tab--selected.Tab--color--bad{color:hsl(from var(--color-bad)h s calc(l + 17.5))}.Tab--selected.Tab--color--label{color:hsl(from var(--color-label)h s calc(l + 17.5))}.Section .Tabs{background-color:transparent}.Section:not(.Section--fitted) .Tabs{margin:0 calc(-1*var(--space-m))var(--space-m)}.Section:not(.Section--fitted) .Tabs:first-child{margin-top:calc(-1*var(--space-m))}.TextArea{resize:none;scrollbar-width:thin;scrollbar-gutter:stable;scrollbar-color:var(--color-scrollbar-thumb)transparent}.Tooltip{-webkit-backdrop-filter:var(--tooltip-blur);backdrop-filter:var(--tooltip-blur);background-color:var(--tooltip-background);border-radius:var(--tooltip-border-radius);color:var(--tooltip-color);max-width:20.8333em;padding:var(--space-m)var(--space-l);pointer-events:none;text-align:left;box-shadow:.1em .1em 1.25em -.1em rgba(0,0,0,.5)}html,body{box-sizing:border-box;height:100%;font-size:var(--font-size,12px);color:var(--color-text,#fff);scrollbar-color:var(--color-scrollbar-thumb)var(--color-scrollbar-base);margin:0}html{cursor:var(--cursor-default,default);overflow:hidden}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);overflow:auto}img{image-rendering:pixelated}*,:before,:after{box-sizing:inherit}h1,h2,h3,h4,h5,h6{padding:var(--space-m,6px)0;padding:var(--space-m,.5rem)0;margin:0;display:block}h1{font-size:1.5rem}h2{font-size:1.333rem}h3{font-size:1.167rem}h4{font-size:1rem}td,th{vertical-align:baseline;text-align:left}:where(.candystripe:nth-child(odd)){background-color:var(--candystripe-odd)}:where(.candystripe:nth-child(2n)){background-color:var(--candystripe-even)}.color-black{color:hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.color-white{color:hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.color-red{color:hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.color-orange{color:hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.color-yellow{color:hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.color-olive{color:hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.color-green{color:hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.color-teal{color:hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.color-blue{color:hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.color-violet{color:hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.color-purple{color:hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.color-pink{color:hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.color-brown{color:hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.color-grey,.color-gray{color:hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.color-light-grey,.color-light-gray{color:hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.color-good{color:hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.color-average{color:hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.color-bad{color:hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.color-label{color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.color-bg-black{background-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))!important}.color-bg-white{background-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))!important}.color-bg-red{background-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))!important}.color-bg-orange{background-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))!important}.color-bg-yellow{background-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))!important}.color-bg-olive{background-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))!important}.color-bg-green{background-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))!important}.color-bg-teal{background-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))!important}.color-bg-blue{background-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))!important}.color-bg-violet{background-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))!important}.color-bg-purple{background-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))!important}.color-bg-pink{background-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))!important}.color-bg-brown{background-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))!important}.color-bg-grey,.color-bg-gray{background-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-light-grey,.color-bg-light-gray{background-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-good{background-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))!important}.color-bg-average{background-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))!important}.color-bg-bad{background-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))!important}.color-bg-label{background-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))!important}.debug-layout,.debug-layout :not(g):not(path){color:rgba(255,255,255,.9)!important;box-shadow:none!important;-webkit-filter:none!important;filter:none!important;background:0 0!important;outline:1px solid rgba(255,255,255,.5)!important}.debug-layout:hover,.debug-layout :not(g):not(path):hover{outline-color:rgba(255,255,255,.8)!important}.outline-dotted{outline-style:dotted!important}.outline-dashed{outline-style:dashed!important}.outline-solid{outline-style:solid!important}.outline-double{outline-style:double!important}.outline-groove{outline-style:groove!important}.outline-ridge{outline-style:ridge!important}.outline-inset{outline-style:inset!important}.outline-outset{outline-style:outset!important}.outline-color-black{outline:var(--border-thickness-small)solid hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.outline-color-white{outline:var(--border-thickness-small)solid hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.outline-color-red{outline:var(--border-thickness-small)solid hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.outline-color-orange{outline:var(--border-thickness-small)solid hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.outline-color-yellow{outline:var(--border-thickness-small)solid hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.outline-color-olive{outline:var(--border-thickness-small)solid hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.outline-color-green{outline:var(--border-thickness-small)solid hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.outline-color-teal{outline:var(--border-thickness-small)solid hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.outline-color-blue{outline:var(--border-thickness-small)solid hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.outline-color-violet{outline:var(--border-thickness-small)solid hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.outline-color-purple{outline:var(--border-thickness-small)solid hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.outline-color-pink{outline:var(--border-thickness-small)solid hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.outline-color-brown{outline:var(--border-thickness-small)solid hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.outline-color-grey,.outline-color-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-light-grey,.outline-color-light-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-good{outline:var(--border-thickness-small)solid hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.outline-color-average{outline:var(--border-thickness-small)solid hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.outline-color-bad{outline:var(--border-thickness-small)solid hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.outline-color-label{outline:var(--border-thickness-small)solid hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-baseline{text-align:baseline}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-pre{white-space:pre}.text-bold{font-weight:700}.text-italic{font-style:italic}.text-underline{text-decoration:underline}.Chat{color:var(--chat-text-color)}.Chat__badge{color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#db143c;border-radius:10px;min-width:.5em;padding:.2em .3em;font-size:.7em;line-height:1;transition:font-size .2s ease-out;display:inline-block}.Chat__badge:before{content:"x"}.Chat__badge--animate{font-size:.9em;transition:font-size}.Chat__scrollButton{position:fixed;bottom:1em;right:2em}.Chat__reconnected{text-align:center;margin:1em 0 2em;font-size:.85em}.Chat__reconnected:before{content:"Reconnected";color:var(--reconnect-text,var(--color-red));background-color:var(--reconnect-background,var(--color-section));border-radius:1em;padding:0 .7em;display:inline-block}.Chat__reconnected:after{content:"";border-bottom:.166667em solid var(--color-red);margin-top:-.75em;display:block}.Chat__highlight{color:var(--color-black)}.Chat__highlight--restricted{color:#fff;background-color:#a00;font-weight:700}.ChatMessage{word-wrap:break-word}.ChatMessage--highlighted{border-left:.166667em solid #ffe045;padding-left:.5em;position:relative}.ChatMessage--highlighted:after{content:"";pointer-events:none;background-color:rgba(255,224,69,.1);position:absolute;top:0;bottom:0;left:0;right:0}.Ping{padding:var(--space-xs)var(--space-sm);border:var(--border-thickness-tiny)solid hsl(from var(--color-border-primary)h 10 50/.33);border-radius:var(--border-radius-medium);text-align:right;min-width:4em;max-width:5em;position:relative}.Ping__indicator{content:"";top:var(--space-m);left:var(--space-m);border-radius:var(--border-radius-medium);background-color:#888;width:.5em;height:.5em;position:absolute}.Notifications{position:absolute;top:1em;left:1em;right:2em}.Notification{color:#fff;background-color:#db143c;margin:1em 0;padding:.5em}.Notification:first-child{margin-top:0}.Notification:last-child{margin-bottom:0}.UnreadCount{pointer-events:none;top:calc(-1*var(--space-s));right:calc(-1*var(--space-s));padding:0 var(--space-s);border-radius:var(--border-radius-small);background-color:var(--color-red);color:var(--color-white);font-size:.65em;line-height:1.25em;position:absolute}.Layout__content{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.Layout__content--scrollable{margin-bottom:0;overflow-y:auto}.Window{color:var(--color-text);background-color:var(--color-base);background-image:linear-gradient(to bottom,var(--color-base-start)0%,var(--color-base-end)100%);position:fixed;top:0;bottom:0;left:0;right:0}.Window__rest{position:fixed;top:2.66667rem;bottom:0;left:0;right:0}.Window__contentPadding{height:calc(100% - 1rem);margin:.5rem}.Window__contentPadding:after{height:0}.Layout__content--scrollable .Window__contentPadding:after{content:"";height:.5rem;display:block}.Window__dimmer{pointer-events:none;background-color:hsl(from var(--color-base)h s calc(l + 15)/.25);position:fixed;top:0;bottom:0;left:0;right:0}.Window__resizeHandle__se{cursor:var(--cursor-se-resize);width:1.66667rem;height:1.66667rem;position:fixed;bottom:0;right:0}.Window__resizeHandle__s{cursor:var(--cursor-s-resize);height:.5rem;position:fixed;bottom:0;left:0;right:0}.Window__resizeHandle__e{cursor:var(--cursor-e-resize);width:.25rem;position:fixed;top:0;bottom:0;right:0}img{margin:0;padding:0;line-height:1}img.icon{vertical-align:bottom;width:auto;min-width:16px;height:1em;min-height:16px}a{color:#397ea5}em{font-style:normal;font-weight:700}h1,h2,h3,h4,h5,h6{color:#a4bad6;font-family:Georgia,Verdana,sans-serif}.emoji{max-width:16px;max-height:16px}.emoji16x16{vertical-align:middle}.italic,.italics,.emote{font-style:italic}.bold{font-weight:700}.bolditalics{font-style:italic;font-weight:700}.center{text-align:center}.big{font-size:150%}.reallybig{font-size:175%}.sans{font-family:Comic Sans MS,cursive,sans-serif}.wingdings{font-family:Wingdings,Webdings}.robot{font-family:OCR-A,monospace;font-size:1.15em;font-weight:700}.robotemote{color:#6685f5;font-family:OCR-A,monospace;font-size:1.15em;font-style:italic;font-weight:700}.hidden{visibility:hidden;display:none}.motd{color:#a4bad6;white-space:normal;font-family:Verdana,sans-serif}.motd h1,.motd h2,.motd h3,.motd h4,.motd h5,.motd h6{color:#a4bad6;text-decoration:underline}.motd a,.motd a:link,.motd a:active,.motd a:hover{color:#a4bad6}.memo{color:#638500;text-align:center}.memoedit{text-align:center;font-size:75%}.ooc{font-weight:700}.looc{color:#69c;font-weight:700}.discordpm{color:#6685f5}.debug{color:#6d2f83}.deadsay{color:#e2c1ff}.darkmblue{color:#6685f5}.prefix,.name,.yell{font-weight:700}.mentorhelp{color:#07b;font-weight:700}.mentor_channel{color:#b4af13;font-weight:700}.mentor_channel_admin{color:#f1ec50;font-weight:700}.admin{color:#386aff;font-weight:700}.adminhelp{color:#a00;font-weight:700}.adminticket{color:#3daf21;font-weight:700}.adminticketalt{color:#ccb847;font-weight:700}.admin_channel{color:#03fc9d;font-weight:700}.all_admin_ping{color:#12a5f4;text-align:center;font-size:120%;font-weight:700}.dev_channel{color:#61b413;font-weight:700}.dev_channel_admin{color:#9ef14f;font-weight:700}.staff_channel{color:#775bff;font-weight:700}.staff_channel_admin{color:#a35cff;font-weight:700}.radio{color:#20b142}.deptradio{color:#939}.comradio{color:#5f5cff}.syndradio{color:#8f4a4b}.dsquadradio{color:#998599}.airadio{color:#ff5ed7}.centradio{color:#2681a5}.secradio{color:#dd3535}.engradio{color:#feac20}.medradio{color:#00b5ad}.sciradio{color:#c68cfa}.supradio{color:#b88646}.srvradio{color:#bbd164}.proradio{color:#b84f92}.alert{color:#d82020}h1.alert,h2.alert{color:#a4bad6}.ghostalert{color:#cc00c6;font-style:italic;font-weight:700}.warning{color:#c51e1e;font-style:italic}.boldwarning{color:#c51e1e;font-style:italic;font-weight:700}.danger{color:#c51e1e;font-weight:700}.biggerdanger{color:red;font-size:150%;font-weight:700}.userdanger{color:#c51e1e;font-size:120%;font-weight:700}.attack{color:red}.disarm{color:#900}.moderate{color:#c00}.notice{color:#6685f5}.boldnotice{color:#6685f5;font-weight:700}.subtle{color:#8a72c5;font-size:85%;font-style:italic}.suicide{color:#ff5050;font-style:italic}.announcement h1,.announcement h2{color:#a4bad6;margin:8pt 0;line-height:1.2}.announcement p{color:#d82020;line-height:1.3}.announcement.minor h1{font-size:180%}.announcement.minor h2{font-size:170%}.announcement.sec h1{color:red;font-family:Verdana,sans-serif;font-size:180%}.boldannounceic,.boldannounceooc,.pr_announce{color:#c51e1e;font-weight:700}.greenannounce{color:#059223;font-weight:700}.alien{color:#c433c4}.noticealien{color:#00c000}.alertalien{color:#00c000;font-weight:700}.terrorspider{color:#cf52fa}.dantalion{color:#8b2c5e}.chaosverygood{color:#19e0c0;font-size:120%;font-weight:700}.chaosgood{color:#19e0c0;font-weight:700}.chaosneutral{color:#479ac0;font-weight:700}.chaosbad{color:#9047c0;font-weight:700}.chaosverybad{color:#9047c0;font-size:120%;font-weight:700}.sinister{color:purple;font-style:italic;font-weight:700}.blob{color:#ee4000;font-style:italic}.revennotice{color:#6685f5}.revenbignotice{color:#6685f5;font-size:120%;font-weight:700}.revenminor{color:#823abb}.revenwarning{color:#760fbb;font-style:italic}.revendanger{color:#760fbb;font-size:120%;font-weight:700}.changeling{color:#00b4de}.abductor{color:purple;font-style:italic}.mind_control{color:#a00d6f;font-size:120%;font-style:italic;font-weight:700}.cult{color:purple;font-style:italic;font-weight:700}.cultspeech{color:#af0000;font-style:italic}.cultitalic{color:#a60000;font-style:italic}.cultlarge{color:#a60000;font-size:120%;font-weight:700}.narsie{color:#a60000;font-size:300%;font-weight:700}.narsiesmall{color:#a60000;font-size:200%;font-weight:700}.his_grace{color:#15d512;font-family:Courier New,cursive,sans-serif;font-style:italic}.zombielarge{color:#7c4848;font-size:120%;font-weight:700}.colossus{color:#7f282a;font-size:175%}.hierophant{color:#609;font-style:italic;font-weight:700}.hierophant_warning{color:#609;font-style:italic}.tajaran{color:#803b56}.skrell{color:#00ced1}.solcom{color:#8282fb}.com_cygni{color:#7c4848}.zombie{color:red}.soghun{color:#228b22}.vox{color:#a0a}.diona{color:#804000;font-weight:700}.trinary{color:#727272}.kidan{color:#c64c05}.slime{color:#07a}.drask{color:#a3d4eb;font-family:Arial Black}.moth{color:#869b29;font-family:Copperplate}.skulk{color:#b178b1}.clown{color:red}.vulpkanin{color:#b97a57}.gutter{color:#7092be;font-family:Trebuchet MS,cursive,sans-serif}.tradeband{font-family:Georgia,Verdana,sans-serif}.rose{color:#ff5050}.interface{color:#9031c4}.greentext{color:#0f0;font-size:150%}.redtext{color:red;font-size:150%}.red{color:red}.green{color:#03bb39}.purple{color:#9031c4}.orange{color:orange}.resonate{color:#298f85}.healthscan_oxy{color:#5cc9ff}.specialnotice{color:#4a6f82;font-size:120%;font-weight:700}.whisper{color:#ccc;font-style:italic}span.body .codephrases{color:#55f}span.body .coderesponses{color:#f33}.oxygen{color:#449dff}.nitrogen{color:#f94541}.carbon_dioxide{color:#ccc}.plasma{color:#eb6b00}.sleeping_agent{color:#f28b89}.agent_b{color:teal}.hydrogen{color:#997379}.water_vapor{color:#483d8b}.boxed_message{text-align:center;background:#17191c;border:.0833333em solid rgba(166,183,217,.25);border-width:.0833333em .416667em;border-radius:.5em;margin:.5em .25em;padding:.5em .75em}.boxed_message.red_border{background:#1f1414;border-color:rgba(255,0,0,.5)}.boxed_message.green_border{background:#141f18;border-color:rgba(0,255,0,.5)}.boxed_message.purple_border{background:#1d1828;border-color:rgba(170,128,255,.5)}.boxed_message.notice_border{background:#14181f;border-color:rgba(85,126,246,.5)}.boxed_message.thick_border{border-width:.5em}.boxed_message.left_align_text{text-align:left}:root{--chat-text-color:#b3cce6;--color-base:#202020;--color-section:hsl(from var(--color-base)h s calc(l - 4.2));--base-gradient-spread:0}.theme-light:root{--chat-text-color:var(--color-black);--color-base:#ededed;--color-section:var(--color-white);--color-text:var(--color-black);--color-label:#545454;--color-action:#e6e6e6;--color-scrollbar-thumb:var(--color-light-gray);--primary-lightness:60%;--primary-saturation:60%;--border-primary-alpha:.66;--button-background-selected:hsl(from var(--color-primary)h 100 l);--button-background-caution:#b85a0a;--button-background-danger:#990;--tab-color-selected:var(--color-black);--input-background:var(--color-base);--tooltip-background-lightness:90}.theme-light:root a,.theme-light:root h1,.theme-light:root h2,.theme-light:root h3,.theme-light:root h4,.theme-light:root h5,.theme-light:root h6{color:#00f}.theme-light:root .motd,.theme-light:root .motd h1,.theme-light:root .motd h2,.theme-light:root .motd h3,.theme-light:root .motd h4,.theme-light:root .motd h5,.theme-light:root .motd h6,.theme-light:root .motd a,.theme-light:root .motd a:link,.theme-light:root .motd a:active,.theme-light:root .motd a:hover{color:#638500}.theme-light:root .looc{color:#69c}.theme-light:root .discordpm{color:#00f}.theme-light:root .debug{color:#6d2f83}.theme-light:root .deadsay{color:#5c00e6}.theme-light:root .darkmblue{color:#00f}.theme-light:root .mentorhelp{color:#07b}.theme-light:root .mentor_channel{color:#5e6812}.theme-light:root .mentor_channel_admin{color:#94a419}.theme-light:root .adminhelp{color:#a00}.theme-light:root .adminticket{color:#3e7336}.theme-light:root .adminticketalt{color:#014c8a}.theme-light:root .admin_channel{color:#9a04d1}.theme-light:root .all_admin_ping{color:#12a5f4}.theme-light:root .dev_channel{color:#126719}.theme-light:root .dev_channel_admin{color:#26a419}.theme-light:root .staff_channel{color:#775bff}.theme-light:root .staff_channel_admin{color:#a35cff}.theme-light:root .radio{color:#408010}.theme-light:root .deptradio{color:#939}.theme-light:root .comradio{color:#204090}.theme-light:root .syndradio{color:#6d3f40}.theme-light:root .dsquadradio{color:#686868}.theme-light:root .airadio{color:#f0f}.theme-light:root .centradio{color:#5c5c7c}.theme-light:root .secradio{color:#a30000}.theme-light:root .engradio{color:#a66300}.theme-light:root .medradio{color:#009190}.theme-light:root .sciradio{color:#939}.theme-light:root .supradio{color:#7f6539}.theme-light:root .srvradio{color:#80a000}.theme-light:root .proradio{color:#e3027a}.theme-light:root .alert{color:red}.theme-light:root h1.alert,.theme-light:root h2.alert{color:#000}.theme-light:root .ghostalert{color:#5c00e6}.theme-light:root .warning,.theme-light:root .boldwarning,.theme-light:root .danger,.theme-light:root .userdanger{color:red}.theme-light:root .notice,.theme-light:root .boldnotice{color:#009}.theme-light:root .subtle{color:#009;font-size:85%;font-style:italic}.theme-light:root .announcement h1,.theme-light:root .announcement h2{color:#000}.theme-light:root .announcement.sec h1,.theme-light:root .boldannounceic,.theme-light:root .boldannounceooc{color:red}.theme-light:root .pr_announce{color:#228b22}.theme-light:root .greenannounce{color:#0f0}.theme-light:root .alien{color:#543354}.theme-light:root .terrorspider{color:#320e32}.theme-light:root .dantalion{color:#6a2148}.theme-light:root .revennotice,.theme-light:root .revenbignotice{color:#1d2953}.theme-light:root .changeling{color:purple}.theme-light:root .cultspeech{color:#7f0000}.theme-light:root .cultitalic,.theme-light:root .cultlarge,.theme-light:root .narsie,.theme-light:root .narsiesmall{color:#960000}.theme-light:root .rose{color:#ff5050}.theme-light:root .interface{color:#303}.theme-light:root .purple{color:#5e2d79}.theme-light:root .orange{color:orange}.theme-light:root .healthscan_oxy{color:#0074bd}.theme-light:root .specialnotice{color:#36525e}.theme-light:root .whisper{color:#333}.theme-light:root span.body .codephrases{color:#00f}.theme-light:root span.body .coderesponses{color:red}.theme-light:root .oxygen{color:#006adb}.theme-light:root .nitrogen{color:#d00a06}.theme-light:root .carbon_dioxide{color:#1f1f1f}.theme-light:root .plasma{color:#853c00}.theme-light:root .sleeping_agent{color:#e82f2c}.theme-light:root .agent_b{color:#004d4d}.theme-light:root .hydrogen{color:#997379}.theme-light:root .water_vapor{color:#004080}.theme-light:root .boxed_message{background:#f2f7ff;border-color:rgba(16,48,112,.5)}.theme-light:root .boxed_message.red_border{background:#fff2f2;border-color:rgba(255,0,0,.5)}.theme-light:root .boxed_message.green_border{background:#f2fff7;border-color:rgba(0,168,0,.5)}.theme-light:root .boxed_message.purple_border{background:#f7f2ff;border-color:rgba(85,0,255,.5)}.theme-light:root .boxed_message.notice_border{background:#f2f7ff;border-color:rgba(0,64,255,.5)}.theme-ntos:root{--color-base:#1b2532;--color-section:#121821;--color-primary:#476385}.theme-ntos:root .boxed_message{background:#1d2330}.theme-ntos:root .boxed_message.red_border{background:#301d1d}.theme-ntos:root .boxed_message.green_border{background:#1d3023}.theme-ntos:root .boxed_message.purple_border{background:#231d30}.theme-ntos:root .boxed_message.notice_border{background:#192234}.theme-syndicate:root{--color-base:#4d0202;--color-section:#2b0101;--color-primary:#3b783b;--color-label:#ad8585;--button-background-selected:#b60a0a;--button-background-caution:#ba5e0d;--button-background-danger:#969900;--notice-box-background:#8d0101;--notice-box-color:var(--color-text-fixed-white);--progress-bar-background:rgba(0,0,0,.5);--tooltip-background-lightness:25}.theme-syndicate:root .adminooc{color:#29ccbe}.theme-syndicate:root .debug{color:#8f39e6}.theme-syndicate:root .boxed_message{background:#360a0a}.theme-syndicate:root .boxed_message.red_border{background:#400000}.theme-syndicate:root .boxed_message.green_border{background:#261a00}.theme-syndicate:root .boxed_message.purple_border{background:#260026}.theme-syndicate:root .boxed_message.notice_border{background:#260016}.theme-paradise:root{--color-base:#8a0f38;--color-section:rgba(0,0,0,.5);--color-base-start:#7e014a;--color-base-end:#8a4d0f;--color-primary:#1f7a7a;--color-label:#ad9685;--reconnect-background:#d92626;--reconnect-text:var(--color-text);--input-border-color:#e85e30;--button-background-selected:#cf6e3d;--button-background-danger:#93f}.theme-paradise:root .adminooc{color:#29ccbe}.theme-paradise:root .debug{color:#8f39e6}.theme-paradise:root .boxed_message{background:rgba(0,0,0,.25);border-color:rgba(223,181,159,.25)}.theme-paradise:root .boxed_message.red_border{background:rgba(22,3,3,.25);border-color:rgba(255,0,0,.5)}.theme-paradise:root .boxed_message.green_border{background:rgba(3,22,10,.25);border-color:rgba(0,255,0,.5)}.theme-paradise:root .boxed_message.purple_border{background:rgba(10,3,22,.25);border-color:rgba(136,77,255,.5)}.theme-paradise:root .boxed_message.notice_border{background:rgba(3,10,22,.25);border-color:rgba(85,126,246,.5)} \ No newline at end of file +:root{--color-base:#262626;--color-section:rgba(0,0,0,.33);--color-secondary:hsl(from var(--color-base)var(--secondary-hue)var(--secondary-saturation)calc(l + var(--secondary-lightness-adjustment)));--secondary-hue:h;--secondary-saturation:s;--secondary-lightness-adjustment:7.5;--base-gradient-spread:2;--color-base-start:hsl(from var(--color-base)h s calc(l + var(--base-gradient-spread)));--color-base-end:hsl(from var(--color-base)h s calc(l - var(--base-gradient-spread)));--color-scrollbar-base:var(--color-section);--color-scrollbar-thumb:hsl(from var(--color-base)h s calc(l + 9.25));--candystripe-odd:rgba(0,0,0,.25);--candystripe-even:transparent;--color-red:#d92626;--color-orange:#f26c0d;--color-yellow:#fcd203;--color-olive:#acc91d;--color-green:#1fad4e;--color-teal:#00b3b3;--color-blue:#2a79c8;--color-violet:#63c;--color-purple:#b333cc;--color-pink:#d9268e;--color-brown:#a96a3c;--color-gold:#f2a60d;--color-black:#000;--color-white:#fff;--color-grey:gray;--color-light-grey:#aaa;--color-gray:var(--color-grey);--color-light-gray:var(--color-light-grey);--color-action:gray;--color-hover:hsl(from var(--color-action)h s l/.25);--color-active:hsl(from var(--color-action)h s l/.3);--color-selected:hsl(from var(--color-action)h s l/.4);--primary-hue:210;--primary-saturation:37.5%;--primary-lightness:45%;--color-primary:hsl(var(--primary-hue),var(--primary-saturation),var(--primary-lightness));--color-good:#5ba626;--color-average:#f2890d;--color-bad:#dc2323;--color-label:hsl(from var(--color-primary)h 17.5 57.5);--color-text:var(--color-white);--color-text-translucent:hsl(from var(--color-text)h s l/.5);--color-text-translucent-light:hsl(from var(--color-text)h s l/.75);--color-text-fixed-white:var(--color-white);--color-text-fixed-black:var(--color-black);--color-hyperlink:#69f;--color-hyperlink-visited:#96f;--color-hyperlink-new:#f66;--color-hyperlink-new-visited:#ff8c66;--color-border:rgba(255,255,255,.1);--color-border-dark:rgba(0,0,0,.33);--border-primary-saturation:100;--border-primary-lightness:75;--border-primary-alpha:.75;--color-border-primary:hsl(from var(--color-primary)h var(--border-primary-saturation)var(--border-primary-lightness)/var(--border-primary-alpha));--color-border-secondary:hsl(from var(--color-border-primary)h s l/1);--font-size:12px;--font-family:Verdana,Geneva,sans-serif;--font-family-mono:Consolas,monospace;--border-thickness-unit:.5em;--border-thickness-tiny:calc(var(--border-thickness-unit)*.5*.34);--border-thickness-small:calc(var(--border-thickness-unit)*.34);--border-thickness-medium:calc(var(--border-thickness-unit)*.5);--border-thickness-large:calc(var(--border-thickness-unit)*.66);--border-thickness-larger:var(--border-thickness-unit);--border-radius-unit:1rem;--border-radius-tiny:calc(var(--border-radius-unit)*.25*.68);--border-radius-small:calc(var(--border-radius-unit)*.25);--border-radius-medium:calc(var(--border-radius-unit)*.33);--border-radius-large:calc(var(--border-radius-unit)*.5);--border-radius-larger:calc(var(--border-radius-unit)*.75);--border-radius-huge:var(--border-radius-unit);--border-radius-giant:calc(var(--border-radius-unit)*2);--border-radius-circular:99999px;--space-unit:1em;--space-xxs:calc(var(--space-unit)*.25*.34);--space-xs:calc(var(--space-unit)*.25*.68);--space-s:calc(var(--space-unit)*.25);--space-sm:calc(var(--space-unit)*.33);--space-m:calc(var(--space-unit)*.5);--space-ml:calc(var(--space-unit)*.66);--space-l:calc(var(--space-unit)*.75);--space-xl:var(--space-unit);--space-xxl:calc(var(--space-unit)*2);--transition-time-unit:1s;--transition-time-fast:calc(var(--transition-time-unit)*.1);--transition-time-medium:calc(var(--transition-time-unit)*.2);--transition-time-slow:calc(var(--transition-time-unit)*.5);--transition-time-slowest:var(--transition-time-unit);--shadow-unit:1rem;--shadow-glow-small:0 0 calc(var(--shadow-unit)*.5);--shadow-glow-medium:0 0 var(--shadow-unit);--shadow-glow-large:0 0 calc(var(--shadow-unit)*2);--blur-small:blur(6px);--blur-medium:blur(12px);--blur-large:blur(24px);--adjust-color:5;--adjust-hover:10;--adjust-active:7.5;--cursor-default:default;--cursor-pointer:pointer;--cursor-disabled:var(--cursor-default);--cursor-n-resize:n-resize;--cursor-s-resize:s-resize;--cursor-se-resize:se-resize;--cursor-e-resize:e-resize;--blockquote-color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)));--blockquote-border:var(--border-thickness-small)solid;--button-height:1.667em;--button-color:var(--color-white);--button-color-transparent:var(--color-text-translucent);--button-background-default:var(--color-primary);--button-background-selected:var(--color-green);--button-background-caution:var(--color-yellow);--button-background-danger:var(--color-red);--button-background-disabled:var(--undefined);--button-disabled-opacity:.5;--button-border-radius:var(--border-radius-tiny);--button-transition:var(--transition-time-medium);--button-transition-timing:ease;--dialog-background:hsl(from var(--color-section)h s l/.5);--dimmer-background-opacity:.75;--dimmer-background:hsl(from var(--color-base)h s 5/var(--dimmer-background-opacity));--divider-color:var(--color-border);--divider-border:var(--border-thickness-small)solid var(--divider-color);--dropdown-transition:var(--transition-time-medium);--dropdown-menu-color:var(--color-text);--dropdown-menu-background:hsl(from var(--color-base)h s calc(l - 5.5)/.85);--dropdown-menu-border:var(--border-thickness-tiny)solid var(--color-border);--dropdown-menu-border-radius:var(--border-radius-large);--dropdown-menu-blur:var(--blur-medium);--dropdown-entry-background-hover:var(--color-hover);--dropdown-entry-background-active:var(--color-active);--dropdown-entry-background-selected:var(--color-selected);--dropdown-entry-border-radius:var(--border-radius-small);--dropdown-entry-transition:var(--transition-time-fast);--floating-transition-time:var(--transition-time-medium);--floating-transition-timing:ease;--tab-background:transparent;--tab-background-hover:hsl(from var(--color-hover)h s calc(l*.75));--tab-background-selected:hsl(from var(--color-selected)h s calc(l*.75));--tab-color:var(--color-text-translucent);--tab-color-selected:hsl(from var(--color-primary)h s 90);--tab-border-radius:var(--border-radius-small);--tab-indicator-size:var(--border-thickness-small);--tab-transition:var(--transition-time-medium);--tabs-container-background:var(--color-section);--imagebutton-transparecy:.25;--input-background-lightness:5;--input-background:hsl(from var(--color-base)h s var(--input-background-lightness));--input-color:var(--color-text);--input-color-placeholder:var(--color-text-translucent);--input-border-color:var(--color-border-primary);--input-border-color-focus:var(--color-border-secondary);--input-border-radius:var(--border-radius-tiny);--input-border-disabled:var(--color-gray);--input-transition:var(--transition-time-medium);--input-font-family:var(--font-family);--input-font-family-mono:var(--font-family-mono);--input-width:9em;--knob-color:hsl(from var(--color-base)h 5 20);--knob-ring-color:var(--input-border-color);--knob-popup-background:var(--tooltip-background);--knob-popup-color:var(--tooltip-color);--knob-popup-border-radius:var(--tooltip-border-radius);--knob-popup-blur:var(--tooltip-blur);--knob-inner-padding:var(--space-xs);--menu-bar-background:var(--color-base);--menu-bar-font-family:var(--font-family);--menu-bar-transition:var(--transition-time-medium);--modal-background:var(--color-base);--modal-padding:var(--space-xl);--notice-box-stripes:rgba(0,0,0,.1);--notice-box-background:#cea257;--notice-box-color:var(--color-text-fixed-white);--number-input-background:var(--input-background);--number-input-color:var(--input-color);--number-input-border-color:var(--input-border-color);--number-input-border-color-active:var(--input-border-color-focus);--number-input-border-radius:var(--input-border-radius);--number-input-transition:var(--input-transition);--progress-bar-fill:var(--color-primary);--progress-bar-background:transparent;--progress-bar-border-radius:var(--border-radius-tiny);--progress-bar-transition:var(--transition-time-slowest);--restricted-input-border-color:var(--color-good);--restricted-input-border-color-focus:hsl(from var(--color-good)h s calc(l + 10));--restricted-input-border-color-invalid:var(--color-bad);--round-gauge-ring-color:var(--input-border-color);--round-gauge-transition:var(--transition-time-medium);--round-gauge-alert-animation:var(--transition-time-slowest);--round-gauge-needle-alert-animation:var(--transition-time-fast);--round-gauge-needle-alert-rotation:2.5deg;--section-title-color:var(--color-text);--section-background:var(--color-section);--section-separator-color:var(--color-primary);--section-separator-thickness:var(--border-thickness-small);--slider-cursor-color:var(--color-text);--slider-popup-background:var(--tooltip-background);--slider-popup-color:var(--tooltip-color);--slider-popup-border-radius:var(--tooltip-border-radius);--slider-popup-blur:var(--tooltip-blur);--tooltip-color:var(--color-text);--tooltip-background-lightness:5;--tooltip-background:hsl(from var(--color-base)h s var(--tooltip-background-lightness)/.85);--tooltip-border-radius:var(--border-radius-medium);--tooltip-blur:var(--blur-medium)}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);position:relative;overflow:auto}.BlockQuote{color:var(--blockquote-color);border-left:var(--blockquote-border);padding-left:var(--space-m);margin-bottom:var(--space-m)}.BlockQuote:last-child{margin-bottom:0}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.ColorBox{text-align:center;width:1em;height:1em;line-height:1em;display:inline-block}.Dialog{background-color:var(--dialog-background);justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.Dialog__content{font-family:var(--font-family-mono);background-color:var(--color-base);flex-direction:column;font-size:1.16667em;display:flex}.Dialog__header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--dialog-background);height:2em;line-height:1.928em;display:flex}.Dialog__title{margin-left:var(--space-xl);margin-right:var(--space-xxl);opacity:.33;flex-grow:1;font-style:italic;display:inline}.Dialog__body{margin:var(--space-xxl)var(--space-xl);flex-grow:1}.Dialog__footer{padding:var(--space-xl);background-color:hsl(from var(--dialog-background)h s l/.25);flex-direction:row;justify-content:flex-end;display:flex}.Dialog__button{margin:0 var(--space-xl);text-align:center;min-width:6rem;height:2rem}.SaveAsDialog__inputs{padding-left:var(--space-xxl);margin-right:var(--space-xl);flex-direction:row;justify-content:flex-end;align-items:center;display:flex}.SaveAsDialog__input{margin-left:var(--space-xl);width:80%}.SaveAsDialog__label{vertical-align:center}.Dialog__FileList{flex-wrap:wrap;flex-grow:1;align-content:flex-start;max-height:20rem;display:flex;position:relative;overflow-x:auto;overflow-y:scroll}.Dialog__FileEntry{text-align:center;margin:var(--space-xl)}.Dialog__FileIcon{cursor:default;text-align:center;width:6vh;height:auto;margin:0 0 var(--space-xl)0;display:inline-block;position:relative}.Dimmer{background-color:var(--dimmer-background);z-index:100;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.Divider--horizontal{margin:var(--space-m)0}.Divider--horizontal:not(.Divider--hidden){border-top:var(--divider-border)}.Divider--vertical{height:100%;margin:0 var(--space-m)}.Divider--vertical:not(.Divider--hidden){border-left:var(--divider-border)}.Button{white-space:nowrap;line-height:var(--button-height);padding:0 var(--space-m);margin-right:var(--space-xs);margin-bottom:var(--space-xs);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;display:inline-block;position:relative}.Button:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Button:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Button:last-child{margin-bottom:0;margin-right:0}.Button__content{align-self:stretch;display:block}.Button__content--ellipsis{align-items:center;display:flex}.Button .Button--icon{text-align:center;min-width:1.333em}.Button.Button--hasIcon{padding-left:0}.Button.Button--hasIcon .Button--icon{margin:0 var(--space-s)}.Button--icon-right.Button--hasIcon{padding-left:var(--space-m);padding-right:var(--space-s)}.Button--icon-right.Button--hasIcon .Button--icon{margin:0 0 0 var(--space-s)}.Button--empty.Button--hasIcon{padding:0}.Button--compact{padding:0 var(--space-s);line-height:1.333em}.Button--compact.Button--hasIcon .Button--icon{margin:0 var(--space-xxs)}.Button--circular{border-radius:var(--border-radius-circular)}.Button--fluid{margin-left:0;margin-right:0;display:block}.Button--ellipsis{text-overflow:ellipsis;margin-right:calc(-1*var(--space-s));display:block;overflow:hidden}.Stack>.Button,.Stack__item>.Button{margin:0}.Button--color--red{--color:var(--color-red)}.Button--color--orange{--color:var(--color-orange)}.Button--color--yellow{--color:var(--color-yellow);--button-color:var(--color-black)}.Button--color--olive{--color:var(--color-olive)}.Button--color--green{--color:var(--color-green)}.Button--color--teal{--color:var(--color-teal)}.Button--color--blue{--color:var(--color-blue)}.Button--color--violet{--color:var(--color-violet)}.Button--color--purple{--color:var(--color-purple)}.Button--color--pink{--color:var(--color-pink)}.Button--color--brown{--color:var(--color-brown)}.Button--color--gold{--color:var(--color-gold)}.Button--color--black{--color:var(--color-black)}.Button--color--white{--color:var(--color-white);--button-color:var(--color-black)}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.Button--color--primary{--color:var(--color-primary)}.Button--color--good{--color:var(--color-good)}.Button--color--average{--color:var(--color-average)}.Button--color--bad{--color:var(--color-bad)}.Button--color--label{--color:var(--color-label)}.Button--color--default{--color:var(--button-background-default)}.Button--color--caution{--color:var(--button-background-caution)}.Button--color--danger{--color:var(--button-background-danger)}.Button--color--transparent{--button-background:hsl(from var(--button-color)h s l/.1);--button-color:var(--button-color-transparent);background-color:transparent}.Button--color--transparent:hover{--button-color:hsl(from var(--button-color-transparent)h s l/1)}.Button--color--transparent:active{opacity:.75}.Button--color--transparent.Button--selected{--button-color:hsl(from var(--color)h s calc(l + var(--adjust-color)))}.Button--color--transparent.Button--disabled{--button-background:hsl(from var(--button-color)h s l/.2);--button-color:var(--color-bad);opacity:1;color:var(--button-color)!important}.Button--disabled{opacity:var(--button-disabled-opacity);cursor:var(--cursor-disabled)!important;background-color:var(--button-background-disabled,var(--button-background))!important}.Button--selected{--color:var(--button-background-selected)!important}.Button--flex{flex-direction:column;display:inline-flex}.Button--flex--fluid{width:100%}.Button--verticalAlignContent--top{justify-content:flex-start}.Button--verticalAlignContent--middle{justify-content:center}.Button--verticalAlignContent--bottom{justify-content:flex-end}.Dropdown{align-items:stretch;gap:var(--space-s);margin-right:var(--space-xs);margin-bottom:var(--space-xs);display:flex}.Dropdown:last-child{margin-bottom:0;margin-right:0}.Dropdown .Button{align-content:center;margin:0}.Dropdown--fluid{flex:1;width:100%}.Dropdown__control{font-family:var(--font-family);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));height:1.83333em;cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex:1;font-size:1em;line-height:1.33333em;display:flex;overflow:hidden}.Dropdown__control:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Dropdown__control:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Dropdown__selected-text{text-overflow:ellipsis;white-space:nowrap;height:100%;padding:var(--space-s)var(--space-m);border-right:var(--border-thickness-tiny)solid var(--color-border-dark);flex:1;align-content:center;display:inline-block;overflow:hidden}.Dropdown__icon{text-align:center;width:1.83333em;height:100%;transition:transform var(--dropdown-transition);align-content:center;display:inline-block}.Dropdown__icon--arrow.open:not(.over),.Dropdown__icon--arrow.over:not(.open){transform:rotate(180deg)}.Dropdown__icon~.Dropdown__selected-text{padding-left:0}.Dropdown__menu{scrollbar-width:thin;scrollbar-color:var(--color-scrollbar-thumb)transparent;max-height:16.6667em;padding:var(--space-sm);overflow-y:auto}.Dropdown__menu--wrapper{background-color:var(--dropdown-menu-background);color:var(--dropdown-menu-color);border:var(--dropdown-menu-border);border-radius:var(--dropdown-menu-border-radius);-webkit-backdrop-filter:var(--dropdown-menu-blur);backdrop-filter:var(--dropdown-menu-blur);overflow:hidden}.Dropdown__menu--entry{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;font-family:var(--font-family);padding:var(--space-xs)var(--space-m);border-radius:var(--dropdown-entry-border-radius);transition:background-color var(--dropdown-entry-transition);font-size:1em;line-height:1.33333em;overflow:hidden}.Dropdown__menu--entry.selected{transition-duration:0s;background-color:var(--dropdown-entry-background-selected)!important}.Dropdown__menu--entry:not(.selected){cursor:var(--cursor-pointer)}.Dropdown__menu--entry:not(.selected):hover{background-color:var(--dropdown-entry-background-hover);transition-duration:0s}.Dropdown__menu--entry:not(.selected):active{background-color:var(--dropdown-entry-background-active);transition-duration:0s}.Dropdown__control--icon-only{justify-content:center;align-items:center;max-width:2rem;display:flex}.Flex{display:flex}.Flex--inline{display:inline-flex}.Flex--iefix{display:block}.Flex--iefix.Flex--inline,.Flex__item--iefix{display:inline-block}.Flex--iefix--column>.Flex__item--iefix{display:block}.Floating{z-index:5}.Floating--animated[data-transition=open]{opacity:1;transform:scale(1)}.Floating--animated[data-transition=close],.Floating--animated[data-transition=initial]{opacity:0;transform:scale(.9)}.Floating--animated[data-transition=open],.Floating--animated[data-transition=close]{transition-duration:var(--floating-transition-time);transition-timing-function:var(--floating-transition-timing);transition-property:opacity,transform}.Floating[data-position=top]{transform-origin:bottom}.Floating[data-position=top-start],.Floating[data-position=right-end]{transform-origin:0 100%}.Floating[data-position=top-end],.Floating[data-position=left-end]{transform-origin:100% 100%}.Floating[data-position=bottom]{transform-origin:top}.Floating[data-position=bottom-start],.Floating[data-position=right-start]{transform-origin:0 0}.Floating[data-position=bottom-end],.Floating[data-position=left-start]{transform-origin:100% 0}.Floating[data-position=right]{transform-origin:0}.Floating[data-position=left]{transform-origin:100%}.IconStack{justify-content:center;align-items:center;display:inline-flex;position:relative}.IconStack .Icon:before{vertical-align:middle}.IconStack .Icon:not(:first-child){position:absolute}.ImageButton{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color)*2)/var(--imagebutton-transparecy));border:var(--border-thickness-tiny)solid hsl(from var(--imagebutton-color)h s calc(l + var(--adjust-color))/var(--imagebutton-transparecy));border-radius:var(--border-radius-medium);transition-property:background-color,border-color,box-shadow;transition-duration:var(--transition-time-medium);border-width:0;margin:.25em;display:inline-flex;position:relative;overflow:hidden}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(.ImageButton--fluid) .ImageButton__content{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-hover)));border-top:var(--border-thickness-tiny)solid var(--imagebutton-color)}.ImageButton__container{border-color:inherit;transition:opacity var(--transition-time-medium);flex-direction:column;display:flex}.ImageButton__image{pointer-events:none;padding:var(--space-s);border:var(--border-thickness-tiny)solid;border-bottom:none;border-color:inherit;border-radius:var(--border-radius-medium)var(--border-radius-medium)0 0;transition:filter var(--transition-time-slow);align-self:center;line-height:0;position:relative;overflow:hidden}.ImageButton__image--fallback{text-align:center;color:var(--color-text-translucent);align-content:center}.ImageButton__image--fallback:before{zoom:.75;width:100%;display:table}.ImageButton__content{white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-fixed-white);z-index:2;padding:.25em .33em;overflow:hidden}.ImageButton__buttons{left:var(--border-thickness-tiny);z-index:1;max-width:100%;display:flex;position:absolute;bottom:1.8em;overflow:hidden}.ImageButton__buttons--alt{pointer-events:none;top:var(--border-thickness-tiny);text-shadow:0px 1px 2px var(--color-base),-1px 0px 2px var(--color-base),1px 0px 2px var(--color-base),0px -1px 2px var(--color-base);flex-direction:column;overflow:visible;bottom:unset!important}.ImageButton__buttons--empty{bottom:0;left:0}.ImageButton__buttons>*{border-radius:0!important;margin:0!important;padding:0!important}.ImageButton--empty{border-width:var(--border-thickness-tiny)}.ImageButton--empty .ImageButton__image{border-radius:var(--border-radius-medium);border:none}.Stack>.ImageButton,.Stack__item>.ImageButton{margin:0}.ImageButton--fluid{border-width:var(--border-thickness-tiny);flex-direction:row;margin:0 0 .33em;display:flex}.ImageButton--fluid:last-child{margin-bottom:0}.ImageButton--fluid .ImageButton__container{flex-direction:row;flex:1}.ImageButton--fluid .ImageButton__image{border:0;margin:0 auto;padding:0}.ImageButton--fluid .ImageButton__content{white-space:normal;color:var(--color-text);flex-direction:column;flex:1;justify-content:center;margin:0 .5em;padding:0;display:flex}.ImageButton--fluid .ImageButton__content--title{padding:.5em;font-weight:700}.ImageButton--fluid .ImageButton__content--divider{border-bottom:var(--border-thickness-small)solid var(--color-border)}.ImageButton--fluid .ImageButton__content--text{padding:.5em}.ImageButton--fluid .ImageButton__buttons{left:inherit;bottom:inherit;background-color:inherit;position:relative}.ImageButton--fluid .ImageButton__buttons--alt{pointer-events:all;top:inherit;text-shadow:none}.ImageButton--fluid .ImageButton__buttons--alt>*{border-top:1px solid rgba(255,255,255,.075)}.ImageButton--fluid .ImageButton__buttons--alt>:first-child{border-top:0}.ImageButton--fluid .ImageButton__buttons>*{text-align:center;white-space:pre-wrap;border-left:var(--border-thickness-tiny)solid var(--color-border);flex-direction:column;justify-content:center;height:100%;line-height:1.15em;display:inline-flex}.ImageButton__color--red{--imagebutton-color:var(--color-red)}.ImageButton__color--orange{--imagebutton-color:var(--color-orange)}.ImageButton__color--yellow{--imagebutton-color:var(--color-yellow);--color-text-fixed-white:var(--color-black)}.ImageButton__color--olive{--imagebutton-color:var(--color-olive)}.ImageButton__color--green{--imagebutton-color:var(--color-green)}.ImageButton__color--teal{--imagebutton-color:var(--color-teal)}.ImageButton__color--blue{--imagebutton-color:var(--color-blue)}.ImageButton__color--violet{--imagebutton-color:var(--color-violet)}.ImageButton__color--purple{--imagebutton-color:var(--color-purple)}.ImageButton__color--pink{--imagebutton-color:var(--color-pink)}.ImageButton__color--brown{--imagebutton-color:var(--color-brown)}.ImageButton__color--gold{--imagebutton-color:var(--color-gold)}.ImageButton__color--black{--imagebutton-color:var(--color-black)}.ImageButton__color--white{--imagebutton-color:var(--color-white);--color-text-fixed-white:var(--color-black)}.ImageButton__color--grey,.ImageButton__color--gray{--imagebutton-color:var(--color-grey)}.ImageButton__color--light-grey,.ImageButton__color--light-gray{--imagebutton-color:var(--color-light-grey)}.ImageButton__color--good{--imagebutton-color:var(--color-good)}.ImageButton__color--average{--imagebutton-color:var(--color-average)}.ImageButton__color--bad{--imagebutton-color:var(--color-bad)}.ImageButton__color--label{--imagebutton-color:var(--color-label)}.ImageButton__color--transparent{--imagebutton-color:var(--color-text-translucent-light);--imagebutton-transparecy:.1;background-color:transparent;border-color:transparent!important}.ImageButton__color--transparent .ImageButton__content{color:var(--color-text-translucent-light);background-color:transparent!important;border-color:transparent!important}.ImageButton__color--transparent.ImageButton--disabled{background-color:hsL(from var(--color-red)h s l/.15)!important}.ImageButton__color--transparent.ImageButton--selected{background-color:hsL(from var(--color-good)h s l/.15)}.ImageButton__color--default{--imagebutton-color:hsl(from var(--color-base)h s 30)}.ImageButton__color--primary{--imagebutton-color:hsl(from var(--color-primary)h s l)}.ImageButton--selected{--imagebutton-color:hsl(from var(--button-background-selected)h s calc(l*1.15));--color-text-fixed-white:var(--color-white)}.ImageButton--disabled .ImageButton__container{cursor:var(--cursor-disabled);opacity:.5}.ImageButton--disabled.ImageButton--fluid{-webkit-filter:contrast(75%);filter:contrast(75%)}.ImageButton--disabled.ImageButton--fluid .ImageButton__buttons{-webkit-filter:contrast(125%);filter:contrast(125%)}.Input{background-color:var(--input-background);border-radius:var(--input-border-radius);border:var(--border-thickness-tiny)solid var(--input-border-color);color:var(--input-color);font-size:1em;font-family:var(--input-font-family);padding:var(--space-xxs)var(--space-sm);width:var(--input-width)}.Input:focus{outline:none}.Input:focus-within{border-color:var(--input-border-color-focus)}.Input::-webkit-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::-ms-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::placeholder{color:var(--input-color-placeholder);font-style:italic}.Input--disabled{border-color:var(--input-border-disabled);color:var(--input-color-placeholder)}.Input--fluid{width:100%}.Input--monospace{font-family:var(--input-font-family-mono)}.Knob{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-n-resize);width:2.6em;height:2.6em;margin:0 auto -.2em;font-size:1rem;position:relative}.Knob:after{content:".";color:transparent;line-height:2.5em}.Knob__circle{inset:var(--knob-inner-padding);background-color:var(--knob-color);background-image:linear-gradient(to bottom,hsl(from var(--knob-color)h s calc(l + 15))0%,var(--knob-color)100%);border-radius:var(--border-radius-circular);box-shadow:var(--shadow-glow-medium)hsl(from var(--knob-color)h s l/.25);margin:.3em;position:absolute}.Knob__cursorBox{position:absolute;top:0;bottom:0;left:0;right:0}.Knob__cursor{background-color:hsl(from var(--knob-color)h s 85);width:.2em;height:.8em;margin:0 auto;position:relative;top:.05em}.Knob__popupValue{white-space:nowrap;text-align:center;padding:var(--space-s)var(--space-m);background-color:var(--knob-popup-background);color:var(--knob-popup-color);border-radius:var(--knob-popup-border-radius);-webkit-backdrop-filter:var(--knob-popup-blur);backdrop-filter:var(--knob-popup-blur);font-size:1rem;position:absolute;top:0;left:50%;transform:translateY(-100%)translate(-50%)}.Knob__ring{padding:var(--knob-inner-padding);position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.Knob__ringTrackPivot{transform:rotate(135deg)}.Knob__ringTrack{fill:transparent;stroke:hsl(from var(--ring-color,var(--knob-ring-color))h s l/.15);stroke-width:8px;stroke-linecap:round;stroke-dasharray:235.62}.Knob__ringFillPivot{transform:rotate(135deg)}.Knob--bipolar .Knob__ringFillPivot{transform:rotate(270deg)}.Knob__ringFill{fill:transparent;stroke:var(--ring-color,var(--knob-ring-color));stroke-width:8px;stroke-linecap:round;stroke-dasharray:314.16;transition:stroke var(--transition-time-medium)ease-out}.Knob--color--red{--ring-color:var(--color-red)}.Knob--color--orange{--ring-color:var(--color-orange)}.Knob--color--yellow{--ring-color:var(--color-yellow)}.Knob--color--olive{--ring-color:var(--color-olive)}.Knob--color--green{--ring-color:var(--color-green)}.Knob--color--teal{--ring-color:var(--color-teal)}.Knob--color--blue{--ring-color:var(--color-blue)}.Knob--color--violet{--ring-color:var(--color-violet)}.Knob--color--purple{--ring-color:var(--color-purple)}.Knob--color--pink{--ring-color:var(--color-pink)}.Knob--color--brown{--ring-color:var(--color-brown)}.Knob--color--gold{--ring-color:var(--color-gold)}.Knob--color--black{--ring-color:var(--color-black)}.Knob--color--white{--ring-color:var(--color-white)}.Knob--color--grey,.Knob--color--gray{--ring-color:var(--color-grey)}.Knob--color--light-grey,.Knob--color--light-gray{--ring-color:var(--color-light-grey)}.Knob--color--primary{--ring-color:var(--color-primary)}.Knob--color--good{--ring-color:var(--color-good)}.Knob--color--average{--ring-color:var(--color-average)}.Knob--color--bad{--ring-color:var(--color-bad)}.Knob--color--label{--ring-color:var(--color-label)}.LabeledList{border-collapse:collapse;border-spacing:0;width:calc(100% + 1em);margin:calc(-1*var(--space-s))calc(-1*var(--space-m))0;padding:0;display:table}.LabeledList__row{display:table-row}.LabeledList__row:last-child .LabeledList__cell{padding-bottom:0}.LabeledList__cell{padding:var(--space-s)var(--space-m);text-align:left;border:0;margin:0;display:table-cell}.LabeledList__label--nowrap{white-space:nowrap;width:1%;min-width:5em}.LabeledList__buttons{white-space:nowrap;text-align:right;width:.1%;padding-top:var(--space-xxs);padding-bottom:0}.LabeledList__breakContents{word-break:break-all;word-wrap:break-word}.MenuBar{display:flex}.MenuBar__font{font-family:var(--menu-bar-font-family);font-size:1em;line-height:1.41667em}.MenuBar__hover:hover{background-color:hsl(from var(--menu-bar-background)h s calc(l + 20));transition:background-color}.MenuBar__MenuBarButton{padding:var(--space-s)var(--space-m)}.MenuBar__menu{background-color:var(--menu-bar-background);padding:var(--space-sm);z-index:5;position:absolute;box-shadow:4px 6px 5px -2px rgba(0,0,0,.5)}.MenuBar__MenuItem{transition:background-color var(--menu-bar-transition)ease-out;background-color:var(--menu-bar-background);white-space:nowrap;padding:var(--space-sm)var(--space-xl)var(--space-sm)calc(var(--space-xxl) + 1rem)}.MenuBar__MenuItemToggle{padding:var(--space-sm)var(--space-xl)var(--space-sm)0}.MenuBar__MenuItemToggle__check{vertical-align:middle;text-align:center;min-width:2.5rem;padding-left:var(--space-sm);display:inline-block}.MenuBar__over{top:auto;bottom:100%}.MenuBar__MenuBarButton-text{text-overflow:clip;white-space:nowrap;height:1.41667em}.MenuBar__Separator{margin:var(--space-sm);border-top:var(--border-thickness-tiny)solid var(--color-border);display:block}.Modal{background-color:var(--modal-background);padding:var(--modal-padding)}.Modal__dimmer .Dimmer__inner{max-width:calc(100vw - var(--space-xxl));max-height:calc(100vh - var(--space-xxl))}.NoticeBox{--noticebox-background:var(--notice-box-background);padding:var(--space-sm)var(--space-m);margin-bottom:var(--space-m);background-color:oklch(from var(--noticebox-background)calc(l*.825)calc(c*.75)h);background-image:repeating-linear-gradient(-45deg,transparent 0 .833333em,var(--notice-box-stripes).833333em 1.66667em);color:var(--notice-box-color);font-style:italic;font-weight:700}.NoticeBox--color--red{--noticebox-background:var(--color-red)}.NoticeBox--color--orange{--noticebox-background:var(--color-orange)}.NoticeBox--color--yellow{--noticebox-background:var(--color-yellow);--notice-box-color:var(--color-black)}.NoticeBox--color--olive{--noticebox-background:var(--color-olive)}.NoticeBox--color--green{--noticebox-background:var(--color-green)}.NoticeBox--color--teal{--noticebox-background:var(--color-teal)}.NoticeBox--color--blue{--noticebox-background:var(--color-blue)}.NoticeBox--color--violet{--noticebox-background:var(--color-violet)}.NoticeBox--color--purple{--noticebox-background:var(--color-purple)}.NoticeBox--color--pink{--noticebox-background:var(--color-pink)}.NoticeBox--color--brown{--noticebox-background:var(--color-brown)}.NoticeBox--color--gold{--noticebox-background:var(--color-gold)}.NoticeBox--color--black{--noticebox-background:var(--color-black);--notice-box-stripes:rgba(255,255,255,.1)}.NoticeBox--color--white{--noticebox-background:var(--color-white);--notice-box-color:var(--color-black)}.NoticeBox--color--grey,.NoticeBox--color--gray{--noticebox-background:var(--color-grey)}.NoticeBox--color--light-grey,.NoticeBox--color--light-gray{--noticebox-background:var(--color-light-grey)}.NoticeBox--color--primary{--noticebox-background:var(--color-primary)}.NoticeBox--color--good{--noticebox-background:var(--color-good)}.NoticeBox--color--average{--noticebox-background:var(--color-average)}.NoticeBox--color--bad{--noticebox-background:var(--color-bad)}.NoticeBox--color--label{--noticebox-background:var(--color-label)}.NoticeBox--type--info{--noticebox-background:var(--color-blue)}.NoticeBox--type--success{--noticebox-background:var(--color-green)}.NoticeBox--type--warning{--noticebox-background:var(--color-orange)}.NoticeBox--type--danger{--noticebox-background:var(--color-red)}.NumberInput{cursor:var(--cursor-n-resize);text-align:right;padding:0 var(--space-sm);margin-right:var(--space-xs);background-color:var(--number-input-background);color:var(--number-input-border-color-active);border:var(--border-thickness-tiny)solid var(--number-input-border-color);border-radius:var(--number-input-border-radius);transition:border-color var(--number-input-transition);line-height:1.41667em;display:inline-block;position:relative;overflow:visible}.NumberInput:active{border-color:var(--number-input-border-color-active)}.NumberInput--fluid{display:block}.NumberInput__content{margin-left:var(--space-m)}.NumberInput__barContainer{top:var(--space-xs);bottom:var(--space-xs);left:var(--space-xs);position:absolute}.NumberInput__bar{box-sizing:border-box;border-bottom:var(--border-thickness-tiny)solid var(--number-input-border-color-active);background-color:var(--number-input-border-color-active);width:.25em;position:absolute;bottom:0;left:0}.NumberInput__input{text-align:right;width:100%;height:1.41667em;padding:0 var(--space-m);font-size:1em;line-height:1.41667em;font-family:var(--font-family);background-color:var(--number-input-background);color:var(--number-input-color);border:0;outline:0;margin:0;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar{width:100%;min-height:var(--button-height);padding:0 var(--space-m);background-color:var(--progress-bar-background);border:var(--border-thickness-tiny)solid var(--progress-bar-color);border-radius:var(--progress-bar-border-radius);transition:border-color var(--progress-bar-transition)ease-out;align-content:center;display:inline-block;position:relative}.ProgressBar__fill{background-color:var(--progress-bar-color);position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar__fill--animated{transition-property:background-color,width;transition-duration:var(--progress-bar-transition)}.ProgressBar__content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:right;width:100%;position:relative}.ProgressBar--color--default{--progress-bar-color:hsl(from var(--progress-bar-fill)h s calc(l - var(--adjust-color)))}.ProgressBar--color--red{--progress-bar-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))}.ProgressBar--color--orange{--progress-bar-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))}.ProgressBar--color--yellow{--progress-bar-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))}.ProgressBar--color--olive{--progress-bar-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))}.ProgressBar--color--green{--progress-bar-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))}.ProgressBar--color--teal{--progress-bar-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))}.ProgressBar--color--blue{--progress-bar-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))}.ProgressBar--color--violet{--progress-bar-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))}.ProgressBar--color--purple{--progress-bar-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))}.ProgressBar--color--pink{--progress-bar-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))}.ProgressBar--color--brown{--progress-bar-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))}.ProgressBar--color--gold{--progress-bar-color:hsl(from var(--color-gold)h s calc(l - var(--adjust-color)))}.ProgressBar--color--black{--progress-bar-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))}.ProgressBar--color--white{--progress-bar-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))}.ProgressBar--color--grey,.ProgressBar--color--gray{--progress-bar-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--light-grey,.ProgressBar--color--light-gray{--progress-bar-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--primary{--progress-bar-color:hsl(from var(--color-primary)h s calc(l - var(--adjust-color)))}.ProgressBar--color--good{--progress-bar-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))}.ProgressBar--color--average{--progress-bar-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))}.ProgressBar--color--bad{--progress-bar-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))}.ProgressBar--color--label{--progress-bar-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))}.RestrictedInput{border-color:var(--restricted-input-border-color);text-align:right}.RestrictedInput:focus-within{border-color:var(--restricted-input-border-color-focus)}.RestrictedInput::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput--invalid{border-color:var(--restricted-input-border-color-invalid)}.RestrictedInput--invalid:focus-within{border-color:var(--restricted-input-border-color-invalid)}@keyframes RoundGauge__alertAnim{0%,to{opacity:.1}50%{opacity:1}}@keyframes RoundGauge__needleAlertAnim{0%{transform:rotate(var(--round-gauge-needle-alert-rotation))}50%{transform:rotate(calc(-1*var(--round-gauge-needle-alert-rotation)))}}.RoundGauge{width:2.6em;height:1.3em;margin:0 auto .2em;font-size:1rem}.RoundGauge__wrapper{text-align:center;display:inline-block}.RoundGauge__ringTrack{fill:transparent;stroke:rgba(255,255,255,.1);stroke-width:10px;stroke-dasharray:157.08;stroke-dashoffset:157.08px}.RoundGauge__ringFill{fill:transparent;stroke:var(--round-gauge-ring-color);stroke-width:10px;stroke-dasharray:314.16;transition:stroke var(--round-gauge-transition)ease-out}.RoundGauge__needle,.RoundGauge__ringFill{transition:transform var(--round-gauge-transition)ease-in-out}.RoundGauge__needleLine,.RoundGauge__needleMiddle{fill:var(--color-red)}.RoundGauge__alert{fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;fill:rgba(255,255,255,.1);transform-origin:top;transform:scale(.9)}.RoundGauge__alert.active{animation:RoundGauge__alertAnim var(--round-gauge-alert-animation)cubic-bezier(.34,1.56,.64,1)infinite}.RoundGauge__alert.active~.RoundGauge__needle .RoundGauge__needleLine{transform-origin:bottom;animation:RoundGauge__needleAlertAnim var(--round-gauge-needle-alert-animation)infinite}.RoundGauge__alert.max{fill:var(--color-bad)}.RoundGauge--color--red.RoundGauge__ringFill{stroke:var(--color-red)}.RoundGauge--color--orange.RoundGauge__ringFill{stroke:var(--color-orange)}.RoundGauge--color--yellow.RoundGauge__ringFill{stroke:var(--color-yellow)}.RoundGauge--color--olive.RoundGauge__ringFill{stroke:var(--color-olive)}.RoundGauge--color--green.RoundGauge__ringFill{stroke:var(--color-green)}.RoundGauge--color--teal.RoundGauge__ringFill{stroke:var(--color-teal)}.RoundGauge--color--blue.RoundGauge__ringFill{stroke:var(--color-blue)}.RoundGauge--color--violet.RoundGauge__ringFill{stroke:var(--color-violet)}.RoundGauge--color--purple.RoundGauge__ringFill{stroke:var(--color-purple)}.RoundGauge--color--pink.RoundGauge__ringFill{stroke:var(--color-pink)}.RoundGauge--color--brown.RoundGauge__ringFill{stroke:var(--color-brown)}.RoundGauge--color--gold.RoundGauge__ringFill{stroke:var(--color-gold)}.RoundGauge--color--black.RoundGauge__ringFill{stroke:var(--color-black)}.RoundGauge--color--white.RoundGauge__ringFill{stroke:var(--color-white)}.RoundGauge--color--grey.RoundGauge__ringFill,.RoundGauge--color--gray.RoundGauge__ringFill{stroke:var(--color-grey)}.RoundGauge--color--light-grey.RoundGauge__ringFill,.RoundGauge--color--light-gray.RoundGauge__ringFill{stroke:var(--color-light-grey)}.RoundGauge--color--primary.RoundGauge__ringFill{stroke:var(--color-primary)}.RoundGauge--color--good.RoundGauge__ringFill{stroke:var(--color-good)}.RoundGauge--color--average.RoundGauge__ringFill{stroke:var(--color-average)}.RoundGauge--color--bad.RoundGauge__ringFill{stroke:var(--color-bad)}.RoundGauge--color--label.RoundGauge__ringFill{stroke:var(--color-label)}.RoundGauge__alert--red{fill:var(--color-red)}.RoundGauge__alert--orange{fill:var(--color-orange)}.RoundGauge__alert--yellow{fill:var(--color-yellow)}.RoundGauge__alert--olive{fill:var(--color-olive)}.RoundGauge__alert--green{fill:var(--color-green)}.RoundGauge__alert--teal{fill:var(--color-teal)}.RoundGauge__alert--blue{fill:var(--color-blue)}.RoundGauge__alert--violet{fill:var(--color-violet)}.RoundGauge__alert--purple{fill:var(--color-purple)}.RoundGauge__alert--pink{fill:var(--color-pink)}.RoundGauge__alert--brown{fill:var(--color-brown)}.RoundGauge__alert--gold{fill:var(--color-gold)}.RoundGauge__alert--black{fill:var(--color-black)}.RoundGauge__alert--white{fill:var(--color-white)}.RoundGauge__alert--grey,.RoundGauge__alert--gray{fill:var(--color-grey)}.RoundGauge__alert--light-grey,.RoundGauge__alert--light-gray{fill:var(--color-light-grey)}.RoundGauge__alert--primary{fill:var(--color-primary)}.RoundGauge__alert--good{fill:var(--color-good)}.RoundGauge__alert--average{fill:var(--color-average)}.RoundGauge__alert--bad{fill:var(--color-bad)}.RoundGauge__alert--label{fill:var(--color-label)}.Section{margin-bottom:var(--space-m);background-color:var(--section-background);box-sizing:border-box;scrollbar-color:var(--color-scrollbar-thumb)transparent;position:relative}.Section:last-child{margin-bottom:0}.Section__title{padding:var(--space-m);border-bottom:var(--section-separator-thickness)solid var(--section-separator-color);position:relative}.Section__titleText{color:var(--section-title-color);font-size:1.16667em;font-weight:700}.Section__buttons{right:var(--space-m);margin-top:calc(-1*var(--space-xxs));display:inline-block;position:absolute}.Section__rest{position:relative}.Section__content{padding:var(--space-ml)var(--space-m)}.Section--fitted>.Section__rest>.Section__content{padding:0}.Section--fill{flex-direction:column;height:100%;display:flex}.Section--fill>.Section__rest{flex-grow:1}.Section--fill>.Section__rest>.Section__content{height:100%}.Section--fill.Section--scrollable>.Section__rest>.Section__content{position:absolute;top:0;bottom:0;left:0;right:0}.Section--scrollable{overflow:hidden}.Section--scrollable>.Section__rest>.Section__content{overflow-x:hidden;overflow-y:auto}.Section--scrollableHorizontal{overflow:hidden}.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-x:auto;overflow-y:hidden}.Section--scrollable.Section--scrollableHorizontal{overflow:hidden}.Section--scrollable.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow:auto}.Section .Section{margin:0 calc(-1*var(--space-m));background-color:transparent}.Section .Section:first-child{margin-top:calc(-1*var(--space-m))}.Section .Section .Section__titleText{font-size:1.08333em}.Section .Section .Section .Section__titleText{font-size:1em}.Section--flex{flex-flow:column;display:flex}.Section--flex .Section__content{flex-grow:1;overflow:auto}.Section__content--noTopPadding{padding-top:0}.Section__content--stretchContents{height:calc(100% - 3rem)}.Slider{cursor:e-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Slider--editing .Slider__cursor:before{display:none}.Slider__cursor{inset:0 calc(-1*var(--space-xxs));left:unset;border-left:var(--border-thickness-small)solid var(--slider-cursor-color);border-radius:var(--border-radius-circular);position:absolute}.Slider__cursorOffset{position:absolute;top:0;bottom:0;left:0;right:0;transition:none!important}.Slider__cursor:before{content:"";aspect-ratio:1;border-left:inherit;transform-origin:50%;position:absolute;bottom:0;right:0;transform:scale(4)translateY(50%)rotate(45deg);-webkit-mask-image:linear-gradient(135deg,#000 50%,transparent 50%);mask-image:linear-gradient(135deg,#000 50%,transparent 50%)}.Slider__popupValue{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;padding:var(--space-s)var(--space-m);background-color:var(--slider-popup-background);color:var(--slider-popup-color);border-radius:var(--slider-popup-border-radius);-webkit-backdrop-filter:var(--slider-popup-blur);backdrop-filter:var(--slider-popup-blur);font-size:1em;position:absolute;top:-2em;right:0;transform:translate(50%)}.Slider .NumberInput__input{width:auto;height:auto;top:2px;bottom:2px;left:2px;right:2px}.Stack{gap:.5em}.Stack--fill{height:100%}.Stack--zebra>.Stack__item:nth-child(odd){background-color:var(--candystripe-odd)}.Stack--horizontal>.Stack__divider:not(.Stack__divider--hidden){border-left:var(--divider-border)}.Stack--vertical>.Stack__divider:not(.Stack__divider--hidden){border-top:var(--divider-border)}.Table{border-collapse:collapse;border-spacing:0;width:100%;margin:0;display:table}.Table--collapsing{width:auto}.Table__row{display:table-row}.Table__cell{padding:0 var(--space-s);display:table-cell}.Table__cell:first-child{padding-left:0}.Table__cell:last-child{padding-right:0}.Table__row--header .Table__cell,.Table__cell--header{padding-bottom:var(--space-m);font-weight:700}.Table__cell--collapsing{white-space:nowrap;width:1%}.Tabs{background-color:var(--tabs-container-background);align-items:stretch;display:flex;position:relative;overflow:hidden}.Tabs--fill{height:100%}.Tabs--vertical{padding:var(--space-s)0 var(--space-s)var(--space-s);flex-direction:column}.Tabs--horizontal{margin-bottom:var(--space-m);padding:var(--space-s)var(--space-s)0}.Tabs--horizontal:last-child{margin-bottom:0}.Tabs__Tab{flex-grow:0}.Tabs--fluid .Tabs__Tab{flex-grow:1}.Tab{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-pointer);background-color:var(--tab-background);color:var(--tab-color);min-width:4em;min-height:2.25em;transition-property:background-color,color;transition-duration:var(--tab-transition);justify-content:space-between;align-items:center;display:flex}.Tab:not(.Tab--selected):hover{background-color:var(--tab-background-hover)}.Tab:not(.Tab--selected):active{color:var(--tab-color-selected)}.Tab--selected{cursor:var(--cursor-default);background-color:var(--tab-background-selected);color:var(--tab-color-selected)}.Tab .Tab__text{margin:0 var(--space-m);flex-grow:1}.Tab__left{text-align:center;min-width:1.5em;margin-left:var(--space-s)}.Tab__right{text-align:center;min-width:1.5em;margin-right:var(--space-s)}.Tabs--horizontal .Tab{border-top-left-radius:var(--tab-border-radius);border-top-right-radius:var(--tab-border-radius);padding-bottom:var(--tab-indicator-size);position:relative}.Tabs--horizontal .Tab:before{content:"";transition:transform var(--tab-transition);width:100%;height:var(--tab-indicator-size);background-color:currentColor;position:absolute;bottom:0;transform:scaleX(0)}.Tabs--horizontal .Tab--selected:before{transform:scaleX(.99999)!important}.Tabs--vertical .Tab{border-top-left-radius:var(--tab-border-radius);border-bottom-left-radius:var(--tab-border-radius);min-height:2em;padding-right:var(--tab-indicator-size);position:relative}.Tabs--vertical .Tab:before{content:"";transition:transform var(--tab-transition);width:var(--tab-indicator-size);background-color:currentColor;height:100%;position:absolute;right:0;transform:scaleY(0)}.Tabs--vertical .Tab--selected:before{transform:scaleY(.99999)!important}.Tabs--scrollable{--mask-width:3.25em;--mask-left:0rem;--mask-right:0rem;padding:0;display:grid}.Tabs--scrollable-content{scrollbar-width:none;overscroll-behavior:none;padding:var(--space-s)var(--space-s)0;-webkit-mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));flex-wrap:nowrap;display:flex;overflow:auto}.Tabs--scrollable-content.scrollable-left.scrollable-right{--mask-left:var(--mask-width);--mask-right:var(--mask-width)}.Tabs--scrollable-content.scrollable-left{--mask-left:var(--mask-width)}.Tabs--scrollable-content.scrollable-right{--mask-right:var(--mask-width)}.Tabs--scrollable .scroll-left,.Tabs--scrollable .scroll-right{z-index:1;border-radius:0;align-content:center;height:100%;margin:0;position:absolute;top:0}.Tabs--scrollable .scroll-left{left:0}.Tabs--scrollable .scroll-right{right:0}.Tabs--scrollable .Tab{flex-shrink:0}.Tab--selected.Tab--color--red{color:hsl(from var(--color-red)h s calc(l + 17.5))}.Tab--selected.Tab--color--orange{color:hsl(from var(--color-orange)h s calc(l + 17.5))}.Tab--selected.Tab--color--yellow{color:hsl(from var(--color-yellow)h s calc(l + 17.5))}.Tab--selected.Tab--color--olive{color:hsl(from var(--color-olive)h s calc(l + 17.5))}.Tab--selected.Tab--color--green{color:hsl(from var(--color-green)h s calc(l + 17.5))}.Tab--selected.Tab--color--teal{color:hsl(from var(--color-teal)h s calc(l + 17.5))}.Tab--selected.Tab--color--blue{color:hsl(from var(--color-blue)h s calc(l + 17.5))}.Tab--selected.Tab--color--violet{color:hsl(from var(--color-violet)h s calc(l + 17.5))}.Tab--selected.Tab--color--purple{color:hsl(from var(--color-purple)h s calc(l + 17.5))}.Tab--selected.Tab--color--pink{color:hsl(from var(--color-pink)h s calc(l + 17.5))}.Tab--selected.Tab--color--brown{color:hsl(from var(--color-brown)h s calc(l + 17.5))}.Tab--selected.Tab--color--gold{color:hsl(from var(--color-gold)h s calc(l + 17.5))}.Tab--selected.Tab--color--black{color:hsl(from var(--color-black)h s calc(l + 17.5))}.Tab--selected.Tab--color--white{color:hsl(from var(--color-white)h s calc(l + 17.5))}.Tab--selected.Tab--color--grey,.Tab--selected.Tab--color--gray{color:hsl(from var(--color-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--light-grey,.Tab--selected.Tab--color--light-gray{color:hsl(from var(--color-light-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--primary{color:hsl(from var(--color-primary)h s calc(l + 17.5))}.Tab--selected.Tab--color--good{color:hsl(from var(--color-good)h s calc(l + 17.5))}.Tab--selected.Tab--color--average{color:hsl(from var(--color-average)h s calc(l + 17.5))}.Tab--selected.Tab--color--bad{color:hsl(from var(--color-bad)h s calc(l + 17.5))}.Tab--selected.Tab--color--label{color:hsl(from var(--color-label)h s calc(l + 17.5))}.Section .Tabs{background-color:transparent}.Section:not(.Section--fitted) .Tabs{margin:0 calc(-1*var(--space-m))var(--space-m)}.Section:not(.Section--fitted) .Tabs:first-child{margin-top:calc(-1*var(--space-m))}.TextArea{resize:none;scrollbar-width:thin;scrollbar-gutter:stable;scrollbar-color:var(--color-scrollbar-thumb)transparent}.Tooltip{-webkit-backdrop-filter:var(--tooltip-blur);backdrop-filter:var(--tooltip-blur);background-color:var(--tooltip-background);border-radius:var(--tooltip-border-radius);color:var(--tooltip-color);max-width:20.8333em;padding:var(--space-m)var(--space-l);pointer-events:none;text-align:left;box-shadow:.1em .1em 1.25em -.1em rgba(0,0,0,.5)}html,body{box-sizing:border-box;height:100%;font-size:var(--font-size,12px);color:var(--color-text,#fff);scrollbar-color:var(--color-scrollbar-thumb)var(--color-scrollbar-base);margin:0}html{cursor:var(--cursor-default,default);overflow:hidden}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);overflow:auto}img{image-rendering:pixelated}*,:before,:after{box-sizing:inherit}h1,h2,h3,h4,h5,h6{padding:var(--space-m,6px)0;padding:var(--space-m,.5rem)0;margin:0;display:block}h1{font-size:1.5rem}h2{font-size:1.333rem}h3{font-size:1.167rem}h4{font-size:1rem}td,th{vertical-align:baseline;text-align:left}:where(.candystripe:nth-child(odd)){background-color:var(--candystripe-odd)}:where(.candystripe:nth-child(2n)){background-color:var(--candystripe-even)}.color-black{color:hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.color-white{color:hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.color-red{color:hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.color-orange{color:hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.color-yellow{color:hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.color-olive{color:hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.color-green{color:hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.color-teal{color:hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.color-blue{color:hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.color-violet{color:hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.color-purple{color:hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.color-pink{color:hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.color-brown{color:hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.color-grey,.color-gray{color:hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.color-light-grey,.color-light-gray{color:hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.color-good{color:hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.color-average{color:hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.color-bad{color:hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.color-label{color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.color-bg-black{background-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))!important}.color-bg-white{background-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))!important}.color-bg-red{background-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))!important}.color-bg-orange{background-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))!important}.color-bg-yellow{background-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))!important}.color-bg-olive{background-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))!important}.color-bg-green{background-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))!important}.color-bg-teal{background-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))!important}.color-bg-blue{background-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))!important}.color-bg-violet{background-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))!important}.color-bg-purple{background-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))!important}.color-bg-pink{background-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))!important}.color-bg-brown{background-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))!important}.color-bg-grey,.color-bg-gray{background-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-light-grey,.color-bg-light-gray{background-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-good{background-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))!important}.color-bg-average{background-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))!important}.color-bg-bad{background-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))!important}.color-bg-label{background-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))!important}.debug-layout,.debug-layout :not(g):not(path){color:rgba(255,255,255,.9)!important;box-shadow:none!important;-webkit-filter:none!important;filter:none!important;background:0 0!important;outline:1px solid rgba(255,255,255,.5)!important}.debug-layout:hover,.debug-layout :not(g):not(path):hover{outline-color:rgba(255,255,255,.8)!important}.outline-dotted{outline-style:dotted!important}.outline-dashed{outline-style:dashed!important}.outline-solid{outline-style:solid!important}.outline-double{outline-style:double!important}.outline-groove{outline-style:groove!important}.outline-ridge{outline-style:ridge!important}.outline-inset{outline-style:inset!important}.outline-outset{outline-style:outset!important}.outline-color-black{outline:var(--border-thickness-small)solid hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.outline-color-white{outline:var(--border-thickness-small)solid hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.outline-color-red{outline:var(--border-thickness-small)solid hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.outline-color-orange{outline:var(--border-thickness-small)solid hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.outline-color-yellow{outline:var(--border-thickness-small)solid hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.outline-color-olive{outline:var(--border-thickness-small)solid hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.outline-color-green{outline:var(--border-thickness-small)solid hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.outline-color-teal{outline:var(--border-thickness-small)solid hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.outline-color-blue{outline:var(--border-thickness-small)solid hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.outline-color-violet{outline:var(--border-thickness-small)solid hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.outline-color-purple{outline:var(--border-thickness-small)solid hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.outline-color-pink{outline:var(--border-thickness-small)solid hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.outline-color-brown{outline:var(--border-thickness-small)solid hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.outline-color-grey,.outline-color-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-light-grey,.outline-color-light-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-good{outline:var(--border-thickness-small)solid hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.outline-color-average{outline:var(--border-thickness-small)solid hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.outline-color-bad{outline:var(--border-thickness-small)solid hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.outline-color-label{outline:var(--border-thickness-small)solid hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-baseline{text-align:baseline}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-pre{white-space:pre}.text-bold{font-weight:700}.text-italic{font-style:italic}.text-underline{text-decoration:underline}.Chat{color:var(--chat-text-color)}.Chat__badge{color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#db143c;border-radius:10px;min-width:.5em;padding:.2em .3em;font-size:.7em;line-height:1;transition:font-size .2s ease-out;display:inline-block}.Chat__badge:before{content:"x"}.Chat__badge--animate{font-size:.9em;transition:font-size}.Chat__scrollButton{position:fixed;bottom:1em;right:2em}.Chat__reconnected{text-align:center;margin:1em 0 2em;font-size:.85em}.Chat__reconnected:before{content:"Reconnected";color:var(--reconnect-text,var(--color-red));background-color:var(--reconnect-background,var(--color-section));border-radius:1em;padding:0 .7em;display:inline-block}.Chat__reconnected:after{content:"";border-bottom:.166667em solid var(--color-red);margin-top:-.75em;display:block}.Chat__highlight{color:var(--color-black)}.Chat__highlight--restricted{color:#fff;background-color:#a00;font-weight:700}.ChatMessage{word-wrap:break-word}.ChatMessage--highlighted{border-left:.166667em solid #ffe045;padding-left:.5em;position:relative}.ChatMessage--highlighted:after{content:"";pointer-events:none;background-color:rgba(255,224,69,.1);position:absolute;top:0;bottom:0;left:0;right:0}.Ping{padding:var(--space-xs)var(--space-sm);border:var(--border-thickness-tiny)solid hsl(from var(--color-border-primary)h 10 50/.33);border-radius:var(--border-radius-medium);text-align:right;min-width:4em;max-width:5em;position:relative}.Ping__indicator{content:"";top:var(--space-m);left:var(--space-m);border-radius:var(--border-radius-medium);background-color:#888;width:.5em;height:.5em;position:absolute}.Notifications{position:absolute;top:1em;left:1em;right:2em}.Notification{color:#fff;background-color:#db143c;margin:1em 0;padding:.5em}.Notification:first-child{margin-top:0}.Notification:last-child{margin-bottom:0}.UnreadCount{pointer-events:none;top:calc(-1*var(--space-s));right:calc(-1*var(--space-s));padding:0 var(--space-s);border-radius:var(--border-radius-small);background-color:var(--color-red);color:var(--color-white);font-size:.65em;line-height:1.25em;position:absolute}.Layout__content{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.Layout__content--scrollable{margin-bottom:0;overflow-y:auto}.Window{color:var(--color-text);background-color:var(--color-base);background-image:linear-gradient(to bottom,var(--color-base-start)0%,var(--color-base-end)100%);position:fixed;top:0;bottom:0;left:0;right:0}.Window__rest{position:fixed;top:2.66667rem;bottom:0;left:0;right:0}.Window__contentPadding{height:calc(100% - 1rem);margin:.5rem}.Window__contentPadding:after{height:0}.Layout__content--scrollable .Window__contentPadding:after{content:"";height:.5rem;display:block}.Window__dimmer{pointer-events:none;background-color:hsl(from var(--color-base)h s calc(l + 15)/.25);position:fixed;top:0;bottom:0;left:0;right:0}.Window__resizeHandle__se{cursor:var(--cursor-se-resize);width:1.66667rem;height:1.66667rem;position:fixed;bottom:0;right:0}.Window__resizeHandle__s{cursor:var(--cursor-s-resize);height:.5rem;position:fixed;bottom:0;left:0;right:0}.Window__resizeHandle__e{cursor:var(--cursor-e-resize);width:.25rem;position:fixed;top:0;bottom:0;right:0}img{margin:0;padding:0;line-height:1}img.icon{vertical-align:bottom;width:auto;min-width:16px;height:1em;min-height:16px}a{color:#397ea5}em{font-style:normal;font-weight:700}h1,h2,h3,h4,h5,h6{color:#a4bad6;font-family:Georgia,Verdana,sans-serif}.emoji{max-width:16px;max-height:16px}.emoji16x16{vertical-align:middle}.italic,.italics,.emote{font-style:italic}.bold{font-weight:700}.bolditalics{font-style:italic;font-weight:700}.center{text-align:center}.big{font-size:150%}.reallybig{font-size:175%}.sans{font-family:Comic Sans MS,cursive,sans-serif}.wingdings{font-family:Wingdings,Webdings}.robot{font-family:OCR-A,monospace;font-size:1.15em;font-weight:700}.robotemote{color:#6685f5;font-family:OCR-A,monospace;font-size:1.15em;font-style:italic;font-weight:700}.hidden{visibility:hidden;display:none}.motd{color:#a4bad6;white-space:normal;font-family:Verdana,sans-serif}.motd h1,.motd h2,.motd h3,.motd h4,.motd h5,.motd h6{color:#a4bad6;text-decoration:underline}.motd a,.motd a:link,.motd a:active,.motd a:hover{color:#a4bad6}.memo{color:#638500;text-align:center}.memoedit{text-align:center;font-size:75%}.ooc{font-weight:700}.looc{color:#69c;font-weight:700}.discordpm{color:#6685f5}.debug{color:#6d2f83}.deadsay{color:#e2c1ff}.darkmblue{color:#6685f5}.prefix,.name,.yell{font-weight:700}.mentorhelp{color:#07b;font-weight:700}.mentor_channel{color:#b4af13;font-weight:700}.mentor_channel_admin{color:#f1ec50;font-weight:700}.admin{color:#386aff;font-weight:700}.adminhelp{color:#a00;font-weight:700}.adminticket{color:#3daf21;font-weight:700}.adminticketalt{color:#ccb847;font-weight:700}.admin_channel{color:#03fc9d;font-weight:700}.all_admin_ping{color:#12a5f4;text-align:center;font-size:120%;font-weight:700}.dev_channel{color:#61b413;font-weight:700}.dev_channel_admin{color:#9ef14f;font-weight:700}.staff_channel{color:#775bff;font-weight:700}.staff_channel_admin{color:#a35cff;font-weight:700}.radio{color:#20b142}.deptradio{color:#939}.comradio{color:#5f5cff}.syndradio{color:#8f4a4b}.dsquadradio{color:#998599}.airadio{color:#ff5ed7}.centradio{color:#2681a5}.secradio{color:#dd3535}.engradio{color:#feac20}.medradio{color:#00b5ad}.sciradio{color:#c68cfa}.supradio{color:#b88646}.srvradio{color:#bbd164}.proradio{color:#b84f92}.alert{color:#d82020}h1.alert,h2.alert{color:#a4bad6}.ghostalert{color:#cc00c6;font-style:italic;font-weight:700}.warning{color:#c51e1e;font-style:italic}.boldwarning{color:#c51e1e;font-style:italic;font-weight:700}.danger{color:#c51e1e;font-weight:700}.biggerdanger{color:red;font-size:150%;font-weight:700}.userdanger{color:#c51e1e;font-size:120%;font-weight:700}.attack{color:red}.disarm{color:#900}.moderate{color:#c00}.notice{color:#6685f5}.boldnotice{color:#6685f5;font-weight:700}.subtle{color:#8a72c5;font-size:85%;font-style:italic}.suicide{color:#ff5050;font-style:italic}.announcement h1,.announcement h2{color:#a4bad6;margin:8pt 0;line-height:1.2}.announcement p{color:#d82020;line-height:1.3}.announcement.minor h1{font-size:180%}.announcement.minor h2{font-size:170%}.announcement.sec h1{color:red;font-family:Verdana,sans-serif;font-size:180%}.boldannounceic,.boldannounceooc,.pr_announce{color:#c51e1e;font-weight:700}.greenannounce{color:#059223;font-weight:700}.alien{color:#c433c4}.noticealien{color:#00c000}.alertalien{color:#00c000;font-weight:700}.terrorspider{color:#cf52fa}.dantalion{color:#8b2c5e}.chaosverygood{color:#19e0c0;font-size:120%;font-weight:700}.chaosgood{color:#19e0c0;font-weight:700}.chaosneutral{color:#479ac0;font-weight:700}.chaosbad{color:#9047c0;font-weight:700}.chaosverybad{color:#9047c0;font-size:120%;font-weight:700}.sinister{color:purple;font-style:italic;font-weight:700}.blob{color:#ee4000;font-style:italic}.revennotice{color:#6685f5}.revenbignotice{color:#6685f5;font-size:120%;font-weight:700}.revenminor{color:#823abb}.revenwarning{color:#760fbb;font-style:italic}.revendanger{color:#760fbb;font-size:120%;font-weight:700}.changeling{color:#00b4de}.abductor{color:purple;font-style:italic}.mind_control{color:#a00d6f;font-size:120%;font-style:italic;font-weight:700}.cult{color:purple;font-style:italic;font-weight:700}.cultspeech{color:#af0000;font-style:italic}.cultitalic{color:#a60000;font-style:italic}.cultlarge{color:#a60000;font-size:120%;font-weight:700}.narsie{color:#a60000;font-size:300%;font-weight:700}.narsiesmall{color:#a60000;font-size:200%;font-weight:700}.his_grace{color:#15d512;font-family:Courier New,cursive,sans-serif;font-style:italic}.zombielarge{color:#7c4848;font-size:120%;font-weight:700}.colossus{color:#7f282a;font-size:175%}.hierophant{color:#609;font-style:italic;font-weight:700}.hierophant_warning{color:#609;font-size:175%;font-style:italic;font-weight:700}.tajaran{color:#803b56}.skrell{color:#00ced1}.solcom{color:#8282fb}.com_cygni{color:#7c4848}.zombie{color:red}.soghun{color:#228b22}.vox{color:#a0a}.diona{color:#804000;font-weight:700}.trinary{color:#727272}.kidan{color:#c64c05}.slime{color:#07a}.drask{color:#a3d4eb;font-family:Arial Black}.moth{color:#869b29;font-family:Copperplate}.skulk{color:#b178b1}.clown{color:red}.vulpkanin{color:#b97a57}.gutter{color:#7092be;font-family:Trebuchet MS,cursive,sans-serif}.tradeband{font-family:Georgia,Verdana,sans-serif}.rose{color:#ff5050}.interface{color:#9031c4}.greentext{color:#0f0;font-size:150%}.redtext{color:red;font-size:150%}.red{color:red}.green{color:#03bb39}.purple{color:#9031c4}.orange{color:orange}.resonate{color:#298f85}.healthscan_oxy{color:#5cc9ff}.specialnotice{color:#4a6f82;font-size:120%;font-weight:700}.whisper{color:#ccc;font-style:italic}span.body .codephrases{color:#55f}span.body .coderesponses{color:#f33}.oxygen{color:#449dff}.nitrogen{color:#f94541}.carbon_dioxide{color:#ccc}.plasma{color:#eb6b00}.sleeping_agent{color:#f28b89}.agent_b{color:teal}.hydrogen{color:#997379}.water_vapor{color:#483d8b}.boxed_message{text-align:center;background:#17191c;border:.0833333em solid rgba(166,183,217,.25);border-width:.0833333em .416667em;border-radius:.5em;margin:.5em .25em;padding:.5em .75em}.boxed_message.red_border{background:#1f1414;border-color:rgba(255,0,0,.5)}.boxed_message.green_border{background:#141f18;border-color:rgba(0,255,0,.5)}.boxed_message.purple_border{background:#1d1828;border-color:rgba(170,128,255,.5)}.boxed_message.notice_border{background:#14181f;border-color:rgba(85,126,246,.5)}.boxed_message.thick_border{border-width:.5em}.boxed_message.left_align_text{text-align:left}:root{--chat-text-color:#b3cce6;--color-base:#202020;--color-section:hsl(from var(--color-base)h s calc(l - 4.2));--base-gradient-spread:0}.theme-light:root{--chat-text-color:var(--color-black);--color-base:#ededed;--color-section:var(--color-white);--color-text:var(--color-black);--color-label:#545454;--color-action:#e6e6e6;--color-scrollbar-thumb:var(--color-light-gray);--primary-lightness:60%;--primary-saturation:60%;--border-primary-alpha:.66;--button-background-selected:hsl(from var(--color-primary)h 100 l);--button-background-caution:#b85a0a;--button-background-danger:#990;--tab-color-selected:var(--color-black);--input-background:var(--color-base);--tooltip-background-lightness:90}.theme-light:root a,.theme-light:root h1,.theme-light:root h2,.theme-light:root h3,.theme-light:root h4,.theme-light:root h5,.theme-light:root h6{color:#00f}.theme-light:root .motd,.theme-light:root .motd h1,.theme-light:root .motd h2,.theme-light:root .motd h3,.theme-light:root .motd h4,.theme-light:root .motd h5,.theme-light:root .motd h6,.theme-light:root .motd a,.theme-light:root .motd a:link,.theme-light:root .motd a:active,.theme-light:root .motd a:hover{color:#638500}.theme-light:root .looc{color:#69c}.theme-light:root .discordpm{color:#00f}.theme-light:root .debug{color:#6d2f83}.theme-light:root .deadsay{color:#5c00e6}.theme-light:root .darkmblue{color:#00f}.theme-light:root .mentorhelp{color:#07b}.theme-light:root .mentor_channel{color:#5e6812}.theme-light:root .mentor_channel_admin{color:#94a419}.theme-light:root .adminhelp{color:#a00}.theme-light:root .adminticket{color:#3e7336}.theme-light:root .adminticketalt{color:#014c8a}.theme-light:root .admin_channel{color:#9a04d1}.theme-light:root .all_admin_ping{color:#12a5f4}.theme-light:root .dev_channel{color:#126719}.theme-light:root .dev_channel_admin{color:#26a419}.theme-light:root .staff_channel{color:#775bff}.theme-light:root .staff_channel_admin{color:#a35cff}.theme-light:root .radio{color:#408010}.theme-light:root .deptradio{color:#939}.theme-light:root .comradio{color:#204090}.theme-light:root .syndradio{color:#6d3f40}.theme-light:root .dsquadradio{color:#686868}.theme-light:root .airadio{color:#f0f}.theme-light:root .centradio{color:#5c5c7c}.theme-light:root .secradio{color:#a30000}.theme-light:root .engradio{color:#a66300}.theme-light:root .medradio{color:#009190}.theme-light:root .sciradio{color:#939}.theme-light:root .supradio{color:#7f6539}.theme-light:root .srvradio{color:#80a000}.theme-light:root .proradio{color:#e3027a}.theme-light:root .alert{color:red}.theme-light:root h1.alert,.theme-light:root h2.alert{color:#000}.theme-light:root .ghostalert{color:#5c00e6}.theme-light:root .warning,.theme-light:root .boldwarning,.theme-light:root .danger,.theme-light:root .userdanger{color:red}.theme-light:root .notice,.theme-light:root .boldnotice{color:#009}.theme-light:root .subtle{color:#009;font-size:85%;font-style:italic}.theme-light:root .announcement h1,.theme-light:root .announcement h2{color:#000}.theme-light:root .announcement.sec h1,.theme-light:root .boldannounceic,.theme-light:root .boldannounceooc{color:red}.theme-light:root .pr_announce{color:#228b22}.theme-light:root .greenannounce{color:#0f0}.theme-light:root .alien{color:#543354}.theme-light:root .terrorspider{color:#320e32}.theme-light:root .dantalion{color:#6a2148}.theme-light:root .revennotice,.theme-light:root .revenbignotice{color:#1d2953}.theme-light:root .changeling{color:purple}.theme-light:root .cultspeech{color:#7f0000}.theme-light:root .cultitalic,.theme-light:root .cultlarge,.theme-light:root .narsie,.theme-light:root .narsiesmall{color:#960000}.theme-light:root .rose{color:#ff5050}.theme-light:root .interface{color:#303}.theme-light:root .purple{color:#5e2d79}.theme-light:root .orange{color:orange}.theme-light:root .healthscan_oxy{color:#0074bd}.theme-light:root .specialnotice{color:#36525e}.theme-light:root .whisper{color:#333}.theme-light:root span.body .codephrases{color:#00f}.theme-light:root span.body .coderesponses{color:red}.theme-light:root .oxygen{color:#006adb}.theme-light:root .nitrogen{color:#d00a06}.theme-light:root .carbon_dioxide{color:#1f1f1f}.theme-light:root .plasma{color:#853c00}.theme-light:root .sleeping_agent{color:#e82f2c}.theme-light:root .agent_b{color:#004d4d}.theme-light:root .hydrogen{color:#997379}.theme-light:root .water_vapor{color:#004080}.theme-light:root .boxed_message{background:#f2f7ff;border-color:rgba(16,48,112,.5)}.theme-light:root .boxed_message.red_border{background:#fff2f2;border-color:rgba(255,0,0,.5)}.theme-light:root .boxed_message.green_border{background:#f2fff7;border-color:rgba(0,168,0,.5)}.theme-light:root .boxed_message.purple_border{background:#f7f2ff;border-color:rgba(85,0,255,.5)}.theme-light:root .boxed_message.notice_border{background:#f2f7ff;border-color:rgba(0,64,255,.5)}.theme-ntos:root{--color-base:#1b2532;--color-section:#121821;--color-primary:#476385}.theme-ntos:root .boxed_message{background:#1d2330}.theme-ntos:root .boxed_message.red_border{background:#301d1d}.theme-ntos:root .boxed_message.green_border{background:#1d3023}.theme-ntos:root .boxed_message.purple_border{background:#231d30}.theme-ntos:root .boxed_message.notice_border{background:#192234}.theme-syndicate:root{--color-base:#4d0202;--color-section:#2b0101;--color-primary:#3b783b;--color-label:#ad8585;--button-background-selected:#b60a0a;--button-background-caution:#ba5e0d;--button-background-danger:#969900;--notice-box-background:#8d0101;--notice-box-color:var(--color-text-fixed-white);--progress-bar-background:rgba(0,0,0,.5);--tooltip-background-lightness:25}.theme-syndicate:root .adminooc{color:#29ccbe}.theme-syndicate:root .debug{color:#8f39e6}.theme-syndicate:root .boxed_message{background:#360a0a}.theme-syndicate:root .boxed_message.red_border{background:#400000}.theme-syndicate:root .boxed_message.green_border{background:#261a00}.theme-syndicate:root .boxed_message.purple_border{background:#260026}.theme-syndicate:root .boxed_message.notice_border{background:#260016}.theme-paradise:root{--color-base:#8a0f38;--color-section:rgba(0,0,0,.5);--color-base-start:#7e014a;--color-base-end:#8a4d0f;--color-primary:#1f7a7a;--color-label:#ad9685;--reconnect-background:#d92626;--reconnect-text:var(--color-text);--input-border-color:#e85e30;--button-background-selected:#cf6e3d;--button-background-danger:#93f}.theme-paradise:root .adminooc{color:#29ccbe}.theme-paradise:root .debug{color:#8f39e6}.theme-paradise:root .boxed_message{background:rgba(0,0,0,.25);border-color:rgba(223,181,159,.25)}.theme-paradise:root .boxed_message.red_border{background:rgba(22,3,3,.25);border-color:rgba(255,0,0,.5)}.theme-paradise:root .boxed_message.green_border{background:rgba(3,22,10,.25);border-color:rgba(0,255,0,.5)}.theme-paradise:root .boxed_message.purple_border{background:rgba(10,3,22,.25);border-color:rgba(136,77,255,.5)}.theme-paradise:root .boxed_message.notice_border{background:rgba(3,10,22,.25);border-color:rgba(85,126,246,.5)} \ No newline at end of file diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index b673995b03e..810c0ec7f2b 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -1 +1 @@ -(()=>{var e,n,t={222:function(e,n,t){var r={"./pai_atmosphere.jsx":"2817","./pai_bioscan.jsx":"7716","./pai_directives.jsx":"1091","./pai_doorjack.jsx":"9316","./pai_main_menu.jsx":"5042","./pai_manifest.jsx":"702","./pai_medrecords.jsx":"9513","./pai_messenger.jsx":"984","./pai_radio.jsx":"9028","./pai_secrecords.jsx":"6838","./pai_signaler.jsx":"4244"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=222},2721:function(e,n,t){var r={"./pda_atmos_scan.jsx":"8539","./pda_cookbook.jsx":"5246","./pda_games.jsx":"2336","./pda_janitor.jsx":"3606","./pda_main_menu.jsx":"2526","./pda_manifest.jsx":"4642","./pda_medical.jsx":"1212","./pda_messenger.jsx":"3260","./pda_minesweeper.jsx":"3067","./pda_mule.jsx":"5030","./pda_nanobank.jsx":"9749","./pda_notes.jsx":"3194","./pda_power.jsx":"4702","./pda_secbot.jsx":"6651","./pda_security.jsx":"7155","./pda_signaler.jsx":"7024","./pda_status_display.jsx":"7148","./pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=2721},4808:function(e,n,t){var r={"./AICard":"9609","./AICard.jsx":"9609","./AIControllerDebugger":"1664","./AIControllerDebugger.tsx":"1664","./AIFixer":"8679","./AIFixer.jsx":"8679","./AIProgramPicker":"5233","./AIProgramPicker.jsx":"5233","./AIResourceManagementConsole":"9991","./AIResourceManagementConsole.jsx":"9991","./APC":"731","./APC.jsx":"731","./ATM":"6181","./ATM.jsx":"6181","./AccountsUplinkTerminal":"4558","./AccountsUplinkTerminal.jsx":"4558","./AdminAntagMenu":"3840","./AdminAntagMenu.jsx":"3840","./AgentCard":"2794","./AgentCard.tsx":"2794","./AiAirlock":"8706","./AiAirlock.jsx":"8706","./AirAlarm":"5486","./AirAlarm.jsx":"5486","./AirlockAccessController":"6962","./AirlockAccessController.jsx":"6962","./AirlockElectronics":"9281","./AirlockElectronics.tsx":"9281","./AlertModal":"934","./AlertModal.tsx":"934","./AppearanceChanger":"6473","./AppearanceChanger.jsx":"6473","./ArcadeBattle":"6085","./ArcadeBattle.tsx":"6085","./AtmosAlertConsole":"3438","./AtmosAlertConsole.jsx":"3438","./AtmosControl":"4788","./AtmosControl.jsx":"4788","./AtmosFilter":"1937","./AtmosFilter.jsx":"1937","./AtmosMixer":"7440","./AtmosMixer.jsx":"7440","./AtmosPump":"7897","./AtmosPump.jsx":"7897","./AtmosTankControl":"1164","./AtmosTankControl.jsx":"1164","./AtmosTemperatureGate":"8340","./AtmosTemperatureGate.jsx":"8340","./AugmentMenu":"6561","./AugmentMenu.jsx":"6561","./Autolathe":"8762","./Autolathe.tsx":"8762","./BioChipPad":"9766","./BioChipPad.jsx":"9766","./Biogenerator":"9968","./Biogenerator.jsx":"9968","./BloomEdit":"3764","./BloomEdit.jsx":"3764","./BlueSpaceArtilleryControl":"7166","./BlueSpaceArtilleryControl.jsx":"7166","./BluespaceTap":"8128","./BluespaceTap.jsx":"8128","./BodyScanner":"6807","./BodyScanner.jsx":"6807","./BookBinder":"2790","./BookBinder.jsx":"2790","./BotCall":"1326","./BotCall.jsx":"1326","./BotClean":"9091","./BotClean.jsx":"9091","./BotFloor":"3578","./BotFloor.jsx":"3578","./BotHonk":"5144","./BotHonk.jsx":"5144","./BotMed":"2078","./BotMed.jsx":"2078","./BotMule":"881","./BotMule.jsx":"881","./BotSecurity":"752","./BotSecurity.jsx":"752","./BrigCells":"2850","./BrigCells.jsx":"2850","./BrigTimer":"9478","./BrigTimer.jsx":"9478","./BugReportForm":"6993","./BugReportForm.tsx":"6993","./CameraConsole":"9835","./CameraConsole.tsx":"9835","./Canister":"2094","./Canister.jsx":"2094","./CardComputer":"991","./CardComputer/":"991","./CardComputer/auth_block":"1487","./CardComputer/auth_block.tsx":"1487","./CardComputer/card_details":"7542","./CardComputer/card_details.tsx":"7542","./CardComputer/index":"991","./CardComputer/index.tsx":"991","./CardComputer/job_priority":"4287","./CardComputer/job_priority.tsx":"4287","./CardComputer/job_transfer":"6530","./CardComputer/job_transfer.tsx":"6530","./CardComputer/records_log":"9490","./CardComputer/records_log.tsx":"9490","./CardComputer/types":"1488","./CardComputer/types.tsx":"1488","./CargoConsole":"6466","./CargoConsole.jsx":"6466","./Chameleon":"6205","./Chameleon.tsx":"6205","./ChangelogView":"9072","./ChangelogView.jsx":"9072","./CheckboxListInputModal":"6707","./CheckboxListInputModal.tsx":"6707","./ChemDispenser":"8573","./ChemDispenser.jsx":"8573","./ChemHeater":"6277","./ChemHeater.jsx":"6277","./ChemMaster":"9306","./ChemMaster.tsx":"9306","./CloningConsole":"2636","./CloningConsole.jsx":"2636","./CloningPod":"1558","./CloningPod.jsx":"1558","./CoinMint":"1276","./CoinMint.tsx":"1276","./ColorPickerModal":"1572","./ColorPickerModal.tsx":"1572","./ColourMatrixTester":"6851","./ColourMatrixTester.jsx":"6851","./CommunicationsComputer":"5325","./CommunicationsComputer.jsx":"5325","./CompostBin":"6185","./CompostBin.jsx":"6185","./Contractor":"4868","./Contractor.jsx":"4868","./ConveyorSwitch":"3510","./ConveyorSwitch.jsx":"3510","./CrewMonitor":"6714","./CrewMonitor.jsx":"6714","./Cryo":"2306","./Cryo.jsx":"2306","./CryopodConsole":"2394","./CryopodConsole.jsx":"2394","./DNAModifier":"3372","./DNAModifier.tsx":"3372","./DanceMachine":"4283","./DanceMachine.tsx":"4283","./DecalPainter":"5391","./DecalPainter.tsx":"5391","./DestinationTagger":"3883","./DestinationTagger.jsx":"3883","./DisposalBin":"6381","./DisposalBin.jsx":"6381","./DnaVault":"2908","./DnaVault.jsx":"2908","./DroneConsole":"2480","./DroneConsole.jsx":"2480","./EFTPOS":"1654","./EFTPOS.jsx":"1654","./ERTManager":"3991","./ERTManager.tsx":"3991","./EconomyManager":"9644","./EconomyManager.jsx":"9644","./Electropack":"6426","./Electropack.jsx":"6426","./Emojipedia":"9480","./Emojipedia.tsx":"9480","./EvolutionMenu":"9219","./EvolutionMenu.jsx":"9219","./ExosuitFabricator":"6251","./ExosuitFabricator.jsx":"6251","./ExperimentConsole":"9621","./ExperimentConsole.jsx":"9621","./ExternalAirlockController":"5091","./ExternalAirlockController.jsx":"5091","./FaxMachine":"6325","./FaxMachine.jsx":"6325","./FilingCabinet":"9788","./FilingCabinet.jsx":"9788","./FloorPainter":"26","./FloorPainter.jsx":"26","./GPS":"1561","./GPS.jsx":"1561","./GeneModder":"1259","./GeneModder.jsx":"1259","./GenericCrewManifest":"6954","./GenericCrewManifest.jsx":"6954","./GhostHudPanel":"9031","./GhostHudPanel.jsx":"9031","./GlandDispenser":"3396","./GlandDispenser.jsx":"3396","./GravityGen":"1009","./GravityGen.jsx":"1009","./GuestPass":"6294","./GuestPass.jsx":"6294","./HandheldChemDispenser":"9511","./HandheldChemDispenser.jsx":"9511","./HealthSensor":"3365","./HealthSensor.jsx":"3365","./Holodeck":"5880","./Holodeck.tsx":"5880","./IdCardModifier":"9721","./IdCardModifier.tsx":"9721","./Instrument":"6126","./Instrument.jsx":"6126","./KeyComboModal":"1783","./KeyComboModal.tsx":"1783","./KeycardAuth":"3928","./KeycardAuth.jsx":"3928","./KitchenMachine":"6706","./KitchenMachine.jsx":"6706","./LawManager":"9846","./LawManager.tsx":"9846","./LibraryComputer":"3023","./LibraryComputer.jsx":"3023","./LibraryManager":"183","./LibraryManager.jsx":"183","./ListInputModal":"1536","./ListInputModal.tsx":"1536","./Loadout":"7239","./Loadout.tsx":"7239","./LoreConsole":"5766","./LoreConsole.tsx":"5766","./MODsuit":"5531","./MODsuit.tsx":"5531","./MagnetController":"5247","./MagnetController.jsx":"5247","./MaterialContainer":"9587","./MaterialContainer.tsx":"9587","./MechBayConsole":"2433","./MechBayConsole.jsx":"2433","./MechaControlConsole":"3763","./MechaControlConsole.jsx":"3763","./MedicalRecords":"9548","./MedicalRecords.jsx":"9548","./MerchVendor":"2666","./MerchVendor.jsx":"2666","./MiningVendor":"6231","./MiningVendor.jsx":"6231","./NTRecruiter":"1972","./NTRecruiter.jsx":"1972","./Newscaster":"452","./Newscaster.jsx":"452","./Noticeboard":"6563","./Noticeboard.tsx":"6563","./NuclearBomb":"5867","./NuclearBomb.jsx":"5867","./NuclearRodFabricator":"7579","./NuclearRodFabricator.jsx":"7579","./NumberInputModal":"8007","./NumberInputModal.tsx":"8007","./ObjAccessModifier":"4965","./ObjAccessModifier.tsx":"4965","./OperatingComputer":"6499","./OperatingComputer.jsx":"6499","./Orbit":"7701","./Orbit.jsx":"7701","./OreRedemption":"5802","./OreRedemption.jsx":"5802","./PAI":"4235","./PAI.jsx":"4235","./PDA":"2740","./PDA.jsx":"2740","./Pacman":"377","./Pacman.jsx":"377","./PanDEMIC":"9454","./PanDEMIC.tsx":"9454","./ParticleAccelerator":"3566","./ParticleAccelerator.jsx":"3566","./PdaPainter":"3371","./PdaPainter.jsx":"3371","./PersonalCrafting":"6144","./PersonalCrafting.jsx":"6144","./Photocopier":"2327","./Photocopier.jsx":"2327","./PoolController":"7331","./PoolController.jsx":"7331","./PortablePump":"5562","./PortablePump.jsx":"5562","./PortableScrubber":"7920","./PortableScrubber.jsx":"7920","./PortableTurret":"2854","./PortableTurret.jsx":"2854","./PowerMonitor":"1784","./PowerMonitor.tsx":"1784","./PrisonerImplantManager":"8011","./PrisonerImplantManager.jsx":"8011","./PrisonerShuttleConsole":"2479","./PrisonerShuttleConsole.jsx":"2479","./PrizeCounter":"9083","./PrizeCounter.tsx":"9083","./QuirkMenu":"7692","./QuirkMenu.tsx":"7692","./RCD":"7076","./RCD.tsx":"7076","./RPD":"1703","./RPD.jsx":"1703","./Radio":"8930","./Radio.tsx":"8930","./RankedListInputModal":"4097","./RankedListInputModal.tsx":"4097","./ReactorMonitor":"4087","./ReactorMonitor.tsx":"4087","./ReagentGrinder":"1876","./ReagentGrinder.jsx":"1876","./ReagentsEditor":"1569","./ReagentsEditor.tsx":"1569","./RemoteSignaler":"9510","./RemoteSignaler.jsx":"9510","./RequestConsole":"5297","./RequestConsole.tsx":"5297","./RndBackupConsole":"4384","./RndBackupConsole.jsx":"4384","./RndConsole":"2247","./RndConsole/":"2247","./RndConsole/AnalyzerMenu":"4080","./RndConsole/AnalyzerMenu.jsx":"4080","./RndConsole/DataDiskMenu":"9529","./RndConsole/DataDiskMenu.jsx":"9529","./RndConsole/LatheCategory":"1465","./RndConsole/LatheCategory.jsx":"1465","./RndConsole/LatheChemicalStorage":"4154","./RndConsole/LatheChemicalStorage.jsx":"4154","./RndConsole/LatheMainMenu":"8563","./RndConsole/LatheMainMenu.jsx":"8563","./RndConsole/LatheMaterialStorage":"7635","./RndConsole/LatheMaterialStorage.jsx":"7635","./RndConsole/LatheMaterials":"5887","./RndConsole/LatheMaterials.jsx":"5887","./RndConsole/LatheMenu":"9760","./RndConsole/LatheMenu.jsx":"9760","./RndConsole/LatheSearch":"6013","./RndConsole/LatheSearch.jsx":"6013","./RndConsole/LinkMenu":"7726","./RndConsole/LinkMenu.jsx":"7726","./RndConsole/SettingsMenu":"3321","./RndConsole/SettingsMenu.jsx":"3321","./RndConsole/index":"2247","./RndConsole/index.jsx":"2247","./RndNetController":"7280","./RndNetController.jsx":"7280","./RndServer":"5156","./RndServer.jsx":"5156","./RobotSelfDiagnosis":"7868","./RobotSelfDiagnosis.jsx":"7868","./RoboticsControlConsole":"1696","./RoboticsControlConsole.jsx":"1696","./Safe":"5826","./Safe.jsx":"5826","./SatelliteControl":"1892","./SatelliteControl.jsx":"1892","./SecureStorage":"7943","./SecureStorage.jsx":"7943","./SecurityRecords":"8589","./SecurityRecords.jsx":"8589","./SeedExtractor":"6906","./SeedExtractor.tsx":"6906","./ShuttleConsole":"631","./ShuttleConsole.jsx":"631","./ShuttleManipulator":"5060","./ShuttleManipulator.jsx":"5060","./SingularityMonitor":"6448","./SingularityMonitor.jsx":"6448","./Sleeper":"1495","./Sleeper.tsx":"1495","./SlotMachine":"6526","./SlotMachine.jsx":"6526","./Smartfridge":"1645","./Smartfridge.jsx":"1645","./Smes":"1399","./Smes.tsx":"1399","./SolarControl":"1343","./SolarControl.jsx":"1343","./SpawnersMenu":"4263","./SpawnersMenu.jsx":"4263","./SpecMenu":"8729","./SpecMenu.jsx":"8729","./StackCraft":"9469","./StackCraft.tsx":"9469","./StationAlertConsole":"5592","./StationAlertConsole.jsx":"5592","./StationTraitsPanel":"5651","./StationTraitsPanel.tsx":"5651","./StripMenu":"5724","./StripMenu.tsx":"5724","./SuitStorage":"2975","./SuitStorage.jsx":"2975","./SupermatterMonitor":"4835","./SupermatterMonitor.tsx":"4835","./SyndicateComputerSimple":"2266","./SyndicateComputerSimple.jsx":"2266","./TEG":"8073","./TEG.jsx":"8073","./TachyonArray":"5808","./TachyonArray.jsx":"5808","./Tank":"5125","./Tank.jsx":"5125","./TankDispenser":"7112","./TankDispenser.jsx":"7112","./TcommsCore":"3283","./TcommsCore.jsx":"3283","./TcommsRelay":"431","./TcommsRelay.jsx":"431","./Teleporter":"5605","./Teleporter.jsx":"5605","./TelescienceConsole":"8336","./TelescienceConsole.jsx":"8336","./TempGun":"1745","./TempGun.jsx":"1745","./TextInputModal":"4273","./TextInputModal.tsx":"4273","./ThermoMachine":"9449","./ThermoMachine.jsx":"9449","./TransferValve":"1760","./TransferValve.jsx":"1760","./TurbineComputer":"6971","./TurbineComputer.jsx":"6971","./Uplink":"8380","./Uplink.tsx":"8380","./Vending":"1638","./Vending.jsx":"1638","./VolumeMixer":"2144","./VolumeMixer.jsx":"2144","./VotePanel":"7063","./VotePanel.jsx":"7063","./Wires":"7983","./Wires.jsx":"7983","./WizardApprenticeContract":"8167","./WizardApprenticeContract.jsx":"8167","./ZLevelManager":"234","./ZLevelManager.tsx":"234","./common/AccessList":"2723","./common/AccessList.tsx":"2723","./common/AtmosScan":"7276","./common/AtmosScan.tsx":"7276","./common/BeakerContents":"3013","./common/BeakerContents.tsx":"3013","./common/BotStatus":"9226","./common/BotStatus.jsx":"9226","./common/ComplexModal":"4744","./common/ComplexModal.jsx":"4744","./common/CrewManifest":"2639","./common/CrewManifest.jsx":"2639","./common/InputButtons":"1942","./common/InputButtons.tsx":"1942","./common/InterfaceLockNoticeBox":"1992","./common/InterfaceLockNoticeBox.jsx":"1992","./common/Loader":"9472","./common/Loader.tsx":"9472","./common/LoginInfo":"7352","./common/LoginInfo.jsx":"7352","./common/LoginScreen":"736","./common/LoginScreen.jsx":"736","./common/Operating":"6696","./common/Operating.tsx":"6696","./common/SearchableTableContext":"6888","./common/SearchableTableContext.tsx":"6888","./common/Signaler":"9298","./common/Signaler.jsx":"9298","./common/SimpleRecords":"4455","./common/SimpleRecords.jsx":"4455","./common/SortableTableContext":"2264","./common/SortableTableContext.tsx":"2264","./common/TabsContext":"4900","./common/TabsContext.tsx":"4900","./common/TemporaryNotice":"7482","./common/TemporaryNotice.jsx":"7482","./goonstation_PTL":"162","./goonstation_PTL/":"162","./goonstation_PTL/index":"162","./goonstation_PTL/index.jsx":"162","./pai/pai_atmosphere":"2817","./pai/pai_atmosphere.jsx":"2817","./pai/pai_bioscan":"7716","./pai/pai_bioscan.jsx":"7716","./pai/pai_directives":"1091","./pai/pai_directives.jsx":"1091","./pai/pai_doorjack":"9316","./pai/pai_doorjack.jsx":"9316","./pai/pai_main_menu":"5042","./pai/pai_main_menu.jsx":"5042","./pai/pai_manifest":"702","./pai/pai_manifest.jsx":"702","./pai/pai_medrecords":"9513","./pai/pai_medrecords.jsx":"9513","./pai/pai_messenger":"984","./pai/pai_messenger.jsx":"984","./pai/pai_radio":"9028","./pai/pai_radio.jsx":"9028","./pai/pai_secrecords":"6838","./pai/pai_secrecords.jsx":"6838","./pai/pai_signaler":"4244","./pai/pai_signaler.jsx":"4244","./pda/pda_atmos_scan":"8539","./pda/pda_atmos_scan.jsx":"8539","./pda/pda_cookbook":"5246","./pda/pda_cookbook.jsx":"5246","./pda/pda_games":"2336","./pda/pda_games.jsx":"2336","./pda/pda_janitor":"3606","./pda/pda_janitor.jsx":"3606","./pda/pda_main_menu":"2526","./pda/pda_main_menu.jsx":"2526","./pda/pda_manifest":"4642","./pda/pda_manifest.jsx":"4642","./pda/pda_medical":"1212","./pda/pda_medical.jsx":"1212","./pda/pda_messenger":"3260","./pda/pda_messenger.jsx":"3260","./pda/pda_minesweeper":"3067","./pda/pda_minesweeper.jsx":"3067","./pda/pda_mule":"5030","./pda/pda_mule.jsx":"5030","./pda/pda_nanobank":"9749","./pda/pda_nanobank.jsx":"9749","./pda/pda_notes":"3194","./pda/pda_notes.jsx":"3194","./pda/pda_power":"4702","./pda/pda_power.jsx":"4702","./pda/pda_secbot":"6651","./pda/pda_secbot.jsx":"6651","./pda/pda_security":"7155","./pda/pda_security.jsx":"7155","./pda/pda_signaler":"7024","./pda/pda_signaler.jsx":"7024","./pda/pda_status_display":"7148","./pda/pda_status_display.jsx":"7148","./pda/pda_supplyrecords":"7632","./pda/pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=4808},937:function(e,n,t){var r={"./ByondUi.stories.js":"7997","./Storage.stories.js":"6498","./Themes.stories.js":"9615"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=937},7912:function(e,n,t){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i,o=t(8014),l=t(4530),a=t(6634);function c(e){var n="https://react.dev/errors/"+e;if(1$||(e.current=R[$],R[$]=null,$--)}function L(e,n){R[++$]=e.current,e.current=n}var K=D(null),J=D(null),X=D(null),U=D(null);function F(e,n){switch(L(X,n),L(J,e),L(K,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?sj(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)e=sb(n=sj(n),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(K),L(K,e)}function V(){M(K),M(J),M(X)}function H(e){null!==e.memoizedState&&L(U,e);var n=K.current,t=sb(n,e.type);n!==t&&(L(J,e),L(K,t))}function W(e){J.current===e&&(M(K),M(J)),U.current===e&&(M(U),un._currentValue=N)}function q(e){if(void 0===n$)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);n$=n&&n[1]||"",nD=-1)":-1o||s[i]!==u[o]){var d="\n"+s[i].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=i&&0<=o);break}}}finally{G=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?q(t):""}function Y(e){try{var n="",t=null;do n+=function(e,n){switch(e.tag){case 26:case 27:case 5:return q(e.type);case 16:return q("Lazy");case 13:return e.child!==n&&null!==n?q("Suspense Fallback"):q("Suspense");case 19:return q("SuspenseList");case 0:case 15:return Q(e.type,!1);case 11:return Q(e.type.render,!1);case 1:return Q(e.type,!0);case 31:return q("Activity");default:return""}}(e,t),t=e,e=e.return;while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Z=Object.prototype.hasOwnProperty,ee=o.unstable_scheduleCallback,en=o.unstable_cancelCallback,et=o.unstable_shouldYield,er=o.unstable_requestPaint,ei=o.unstable_now,eo=o.unstable_getCurrentPriorityLevel,el=o.unstable_ImmediatePriority,ea=o.unstable_UserBlockingPriority,ec=o.unstable_NormalPriority,es=o.unstable_LowPriority,eu=o.unstable_IdlePriority,ed=o.log,ef=o.unstable_setDisableYieldValue,eh=null,em=null;function ep(e){if("function"==typeof ed&&ef(e),em&&"function"==typeof em.setStrictMode)try{em.setStrictMode(eh,e)}catch(e){}}var ex=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eg(e)/ej|0)|0},eg=Math.log,ej=Math.LN2,eb=256,ey=262144,ev=4194304;function ew(e){var n=42&e;if(0!==n)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ek(e,n,t){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var a=0x7ffffff&r;return 0!==a?0!=(r=a&~o)?i=ew(r):0!=(l&=a)?i=ew(l):t||0!=(t=a&~e)&&(i=ew(t)):0!=(a=r&~o)?i=ew(a):0!==l?i=ew(l):t||0!=(t=r&~e)&&(i=ew(t)),0===i?0:0!==n&&n!==i&&0==(n&o)&&((o=i&-i)>=(t=n&-n)||32===o&&0!=(4194048&t))?n:i}function e_(e,n){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function eC(){var e=ev;return 0==(0x3c00000&(ev<<=1))&&(ev=4194304),e}function eI(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function eS(e,n){e.pendingLanes|=n,0x10000000!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eO(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-ex(n);e.entangledLanes|=n,e.entanglements[r]=0x40000000|e.entanglements[r]|261930&t}function eA(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-ex(t),i=1<=tt),to=!1;function tl(e,n){switch(e){case"keyup":return -1!==te.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(e){return"object"===(void 0===(e=e.detail)?"undefined":r(e))&&"data"in e?e.data:null}var tc=!1,ts={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!ts[e.type]:"textarea"===n}function td(e,n,t,r){ny?nv?nv.push(r):nv=[r]:ny=r,0<(n=si(n,"onChange")).length&&(t=new nX("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var tf=null,th=null;function tm(e){c4(e,0)}function tp(e){if(e9(eH(e)))return e}function tx(e,n){if("change"===e)return n}var tg=!1;if(nI){if(nI){var tj="oninput"in document;if(!tj){var tb=document.createElement("div");tb.setAttribute("oninput","return;"),tj="function"==typeof tb.oninput}i=tj}else i=!1;tg=i&&(!document.documentMode||9=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tO(r)}}function tP(e){var n,t;e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var r=ne(e.document);n=r,null!=(t=e.HTMLIFrameElement)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t;){try{var i="string"==typeof r.contentWindow.location.href}catch(e){i=!1}if(i)e=r.contentWindow;else break;r=ne(e.document)}return r}function tE(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var tB=nI&&"documentMode"in document&&11>=document.documentMode,tz=null,tT=null,tN=null,tR=!1;function t$(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;tR||null==tz||tz!==ne(r)||(r="selectionStart"in(r=tz)&&tE(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},tN&&tS(tN,r)||(tN=r,0<(r=si(tT,"onSelect")).length&&(n=new nX("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=tz)))}function tD(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var tM={animationend:tD("Animation","AnimationEnd"),animationiteration:tD("Animation","AnimationIteration"),animationstart:tD("Animation","AnimationStart"),transitionrun:tD("Transition","TransitionRun"),transitionstart:tD("Transition","TransitionStart"),transitioncancel:tD("Transition","TransitionCancel"),transitionend:tD("Transition","TransitionEnd")},tL={},tK={};function tJ(e){if(tL[e])return tL[e];if(!tM[e])return e;var n,t=tM[e];for(n in t)if(t.hasOwnProperty(n)&&n in tK)return tL[e]=t[n];return e}nI&&(tK=document.createElement("div").style,"AnimationEvent"in window||(delete tM.animationend.animation,delete tM.animationiteration.animation,delete tM.animationstart.animation),"TransitionEvent"in window||delete tM.transitionend.transition);var tX=tJ("animationend"),tU=tJ("animationiteration"),tF=tJ("animationstart"),tV=tJ("transitionrun"),tH=tJ("transitionstart"),tW=tJ("transitioncancel"),tq=tJ("transitionend"),tG=new Map,tQ="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tY(e,n){tG.set(e,n),eY(n,[e])}tQ.push("scrollEnd");var tZ="function"==typeof reportError?reportError:function(e){if("object"===("undefined"==typeof window?"undefined":r(window))&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===(void 0===e?"undefined":r(e))&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if("object"===("undefined"==typeof process?"undefined":r(process))&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},t0=[],t1=0,t2=0;function t8(){for(var e=t1,n=t2=t1=0;n>=l,i-=l,rb=1<<32-ex(n)+i|t<f?(p=d,d=null):p=d.sibling;var x=m(r,d,a[f],c);if(null===x){null===d&&(d=p);break}e&&d&&null===x.alternate&&n(r,d),o=l(x,o,f),null===u?s=x:u.sibling=x,u=x,d=p}if(f===a.length)return t(r,d),rO&&rv(r,f),s;if(null===d){for(;fp?(x=f,f=null):x=f.sibling;var b=m(r,f,g.value,s);if(null===b){null===f&&(f=x);break}e&&f&&null===b.alternate&&n(r,f),o=l(b,o,p),null===d?u=b:d.sibling=b,d=b,f=x}if(g.done)return t(r,f),rO&&rv(r,p),u;if(null===f){for(;!g.done;p++,g=a.next())null!==(g=h(r,g.value,s))&&(o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return rO&&rv(r,p),u}for(f=i(f);!g.done;p++,g=a.next())null!==(g=j(f,r,p,g.value,s))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return e&&f.forEach(function(e){return n(r,e)}),rO&&rv(r,p),u}(u,d,f=y.call(f),b)}if("function"==typeof f.then)return s(u,d,ij(f),b);if(f.$$typeof===v)return s(u,d,rG(u,f),b);iy(u,f)}return"string"==typeof f&&""!==f||"number"==typeof f||"bigint"===(void 0===f?"undefined":r(f))?(f=""+f,null!==d&&6===d.tag?(t(u,d.sibling),(b=o(d,f)).return=u):(t(u,d),(b=ra(f,u.mode,b)).return=u),a(u=b)):t(u,d)}(s,u,d,f);return ix=null,b}catch(e){if(e===io||e===ia)throw e;var y=rn(29,e,null,s.mode);return y.lanes=f,y.return=s,y}finally{}}}var iw=iv(!0),ik=iv(!1),i_=!1;function iC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iI(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function iS(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function iO(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&a$)){var i=r.pending;return null===i?n.next=n:(n.next=i.next,i.next=n),r.pending=n,n=t7(e),t6(e,null,t),n}return t3(e,r,n,t),t7(e)}function iA(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194048&t))){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,eA(e,t)}}function iP(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var i=null,o=null;if(null!==(t=t.firstBaseUpdate)){do{var l={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};null===o?i=o=l:o=o.next=l,t=t.next}while(null!==t);null===o?i=o=n:o=o.next=n}else i=o=n;t={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=t;return}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}var iE=!1;function iB(){if(iE){var e=r6;if(null!==e)throw e}}function iz(e,n,t,r){iE=!1;var i=e.updateQueue;i_=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,s=c.next;c.next=null,null===l?o=s:l.next=s,l=c;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==l&&(null===a?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=c)}if(null!==o){var d=i.baseState;for(l=0,u=s=c=null,a=o;;){var f=-0x20000001&a.lane,m=f!==a.lane;if(m?(aL&f)===f:(r&f)===f){0!==f&&f===r4&&(iE=!0),null!==u&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=e,x=a;switch(f=n,x.tag){case 1:if("function"==typeof(p=x.payload)){d=p.call(t,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=x.payload)?p.call(t,d,f):p))break e;d=h({},d,f);break e;case 2:i_=!0}}null!==(f=a.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=i.callbacks)?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(s=u=m,c=d):u=u.next=m,l|=f;if(null===(a=a.next))if(null===(a=i.shared.pending))break;else a=(m=a).next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=s,i.lastBaseUpdate=u,null===o&&(i.shared.lanes=0),aW|=l,e.lanes=l,e.memoizedState=d}}function iT(e,n){if("function"!=typeof e)throw Error(c(191,e));e.call(n)}function iN(e,n){var t=e.callbacks;if(null!==t)for(e.callbacks=null,e=0;el?l:8;var a=z.T,c={};z.T=c,le(e,!1,n,t);try{var s=o(),u=z.S;if(null!==u&&u(c,s),null!==s&&"object"===(void 0===s?"undefined":r(s))&&"function"==typeof s.then){var d,f,h=(d=[],f={status:"pending",value:null,reason:null,then:function(e){d.push(e)}},s.then(function(){f.status="fulfilled",f.value=i;for(var e=0;e title"))),sh(o,r,t),o[eR]=e,eq(o),r=o;break e;case"link":var l=s8("link","href",i).get(r+(t.href||""));if(l){for(var a=0;aa)break;var u=c.transferSize,d=c.initiatorType;u&&sm(d)&&(l+=u*((c=c.responseEnd)s4?50:800)+p);return m.unsuspend=e,function(){m.unsuspend=null,clearTimeout(n),clearTimeout(t)}}:null)){ce=o,e.cancelPendingCommit=x(cI.bind(null,e,n,o,t,r,i,l,a,c,u,d,null,f,h)),cd(e,o,l,!s);return}}cI(e,n,o,t,r,i,l,a,c)}function cd(e,n,t,r){n&=~aG,n&=~aq,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var i=n;0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(i,{is:r.is}):l.createElement(i)}}o[eR]=n,o[e$]=r;e:for(l=n.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===n)break;for(;null===l.sibling;){if(null===l.return||l.return===n)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(n.stateNode=o,sh(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&lG(n)}}return l1(n),lQ(n,n.type,null===e?null:e.memoizedProps,n.pendingProps,t),null;case 6:if(e&&null!=n.stateNode)e.memoizedProps!==r&&lG(n);else{if("string"!=typeof r&&null===n.stateNode)throw Error(c(166));if(e=X.current,rN(n)){if(e=n.stateNode,t=n.memoizedProps,r=null,null!==(i=rI))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[eR]=n,(e=!!(e.nodeValue===t||null!==r&&!0===r.suppressHydrationWarning||su(e.nodeValue,t)))||rB(n,!0)}else(e=sg(e).createTextNode(r))[eR]=n,n.stateNode=e}return l1(n),null;case 31:if(t=n.memoizedState,null===e||null!==e.memoizedState){if(r=rN(n),null!==t){if(null===e){if(!r)throw Error(c(318));if(!(e=null!==(e=n.memoizedState)?e.dehydrated:null))throw Error(c(557));e[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),e=!1}else t=r$(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e){if(256&n.flags)return iH(n),n;return iH(n),null}if(0!=(128&n.flags))throw Error(c(558))}return l1(n),null;case 13:if(r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=rN(n),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(c(318));if(!(i=null!==(i=n.memoizedState)?i.dehydrated:null))throw Error(c(317));i[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),i=!1}else i=r$(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i){if(256&n.flags)return iH(n),n;return iH(n),null}}if(iH(n),0!=(128&n.flags))return n.lanes=t,n;return t=null!==r,e=null!==e&&null!==e.memoizedState,t&&(r=n.child,i=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),t!==e&&t&&(n.child.flags|=8192),lZ(n,n.updateQueue),l1(n),null;case 4:return V(),null===e&&se(n.stateNode.containerInfo),l1(n),null;case 10:return rX(n.type),l1(n),null;case 19:if(M(iW),null===(r=n.memoizedState))return l1(n),null;if(i=0!=(128&n.flags),null===(o=r.rendering))if(i)l0(r,!1);else{if(0!==aH||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(o=iq(e))){for(n.flags|=128,l0(r,!1),n.updateQueue=e=o.updateQueue,lZ(n,e),n.subtreeFlags=0,e=t,t=n.child;null!==t;)ri(t,e),t=t.sibling;return L(iW,1&iW.current|2),rO&&rv(n,r.treeForkCount),n.child}e=e.sibling}null!==r.tail&&ei()>a3&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304)}else{if(!i)if(null!==(e=iq(o))){if(n.flags|=128,i=!0,n.updateQueue=e=e.updateQueue,lZ(n,e),l0(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!rO)return l1(n),null}else 2*ei()-r.renderingStartTime>a3&&0x20000000!==t&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304);r.isBackwards?(o.sibling=n.child,n.child=o):(null!==(e=r.last)?e.sibling=o:n.child=o,r.last=o)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ei(),e.sibling=null,t=iW.current,L(iW,i?1&t|2:1&t),rO&&rv(n,r.treeForkCount),e;return l1(n),null;case 22:case 23:return iH(n),iL(),r=null!==n.memoizedState,null!==e?null!==e.memoizedState!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?0!=(0x20000000&t)&&0==(128&n.flags)&&(l1(n),6&n.subtreeFlags&&(n.flags|=8192)):l1(n),null!==(t=n.updateQueue)&&lZ(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),r=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(r=n.memoizedState.cachePool.pool),r!==t&&(n.flags|=2048),null!==e&&M(ie),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),rX(r1),l1(n),null;case 25:case 30:return null}throw Error(c(156,n.tag))}(n.alternate,n,aV);if(null!==t){aM=t;return}if(null!==(n=n.sibling)){aM=n;return}aM=n=e}while(null!==n);0===aH&&(aH=5)}function cC(e,n){do{var t=function(e,n){switch(r_(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return rX(r1),V(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return W(n),null;case 31:if(null!==n.memoizedState){if(iH(n),null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 13:if(iH(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return M(iW),null;case 4:return V(),null;case 10:return rX(n.type),null;case 22:case 23:return iH(n),iL(),null!==e&&M(ie),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return rX(r1),null;default:return null}}(e.alternate,e);if(null!==t){t.flags&=32767,aM=t;return}if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling)){aM=e;return}aM=e=t}while(null!==e);aH=6,aM=null}function cI(e,n,t,r,i,o,l,a,s){e.cancelPendingCommit=null;do cE();while(0!==a6);if(0!=(6&a$))throw Error(c(327));if(null!==n){if(n===e.current)throw Error(c(177));if(!function(e,n,t,r,i,o){var l=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var a=e.entanglements,c=e.expirationTimes,s=e.hiddenUpdates;for(t=l&~t;0x&&(l=x,x=p,p=l);var g=tA(a,p),j=tA(a,x);if(g&&j&&(1!==h.rangeCount||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==j.node||h.focusOffset!==j.offset)){var b=d.createRange();b.setStart(g.node,g.offset),h.removeAllRanges(),p>x?(h.addRange(b),h.extend(j.node,j.offset)):(b.setEnd(j.node,j.offset),h.addRange(b))}}}}for(d=[],h=a;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof a.focus&&a.focus(),a=0;at?32:t,z.T=null,t=ct,ct=null;var o=a7,l=ce;if(a6=0,a9=a7=null,ce=0,0!=(6&a$))throw Error(c(331));var a=a$;if(a$|=4,az(o.current),aI(o,o.current,l,t),a$=a,cH(0,!1),em&&"function"==typeof em.onPostCommitFiberRoot)try{em.onPostCommitFiberRoot(eh,o)}catch(e){}return!0}finally{T.p=i,z.T=r,cP(e,n)}}function cz(e,n,t){n=rd(t,n),n=lj(e.stateNode,n,2),null!==(e=iO(e,n,2))&&(eS(e,2),cV(e))}function cT(e,n,t){if(3===e.tag)cz(e,e,t);else for(;null!==n;){if(3===n.tag){cz(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===a4||!a4.has(r))){e=rd(t,e),null!==(r=iO(n,t=lb(2),2))&&(ly(t,r,n,e),eS(r,2),cV(r));break}}n=n.return}}function cN(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new aR;var i=new Set;r.set(n,i)}else void 0===(i=r.get(n))&&(i=new Set,r.set(n,i));i.has(t)||(aF=!0,i.add(t),e=cR.bind(null,e,n,t),n.then(e,e))}function cR(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,aD===e&&(aL&t)===t&&(4===aH||3===aH&&(0x3c00000&aL)===aL&&300>ei()-a2?0==(2&a$)&&cm(e,0):aG|=t,aY===aL&&(aY=0)),cV(e)}function c$(e,n){0===n&&(n=eC()),null!==(e=t4(e,n))&&(eS(e,n),cV(e))}function cD(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),c$(e,t)}function cM(e,n){var t=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(t=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(c(314))}null!==r&&r.delete(n),c$(e,t)}var cL=null,cK=null,cJ=!1,cX=!1,cU=!1,cF=0;function cV(e){e!==cK&&null===e.next&&(null===cK?cL=cK=e:cK=cK.next=e),cX=!0,cJ||(cJ=!0,sC(function(){0!=(6&a$)?ee(el,cW):cq()}))}function cH(e,n){if(!cU&&cX){cU=!0;do for(var t=!1,r=cL;null!==r;){if(!n)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var l=r.suspendedLanes,a=r.pingedLanes;o=0xc000095&(o=(1<<31-ex(42|e)+1)-1&(i&~(l&~a)))?0xc000095&o|1:o?2|o:0}0!==o&&(t=!0,cY(r,o))}else o=aL,0==(3&(o=ek(r,r===aD?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||e_(r,o)||(t=!0,cY(r,o));r=r.next}while(t);cU=!1}}function cW(){cq()}function cq(){cX=cJ=!1;var e,n=0;0===cF||((e=window.event)&&"popstate"===e.type?e===sv||(sv=e,0):(sv=null,1))||(n=cF);for(var t=ei(),r=null,i=cL;null!==i;){var o=i.next,l=cG(i,t);0===l?(i.next=null,null===r?cL=o:r.next=o,null===o&&(cK=r)):(r=i,(0!==n||0!=(3&l))&&(cX=!0)),i=o}0!==a6&&5!==a6||cH(n,!1),0!==cF&&(cF=0)}function cG(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-0x3c00001&e.pendingLanes;0 title"):null)}function s5(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var s4=0;function s6(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)s9(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var s7=null;function s9(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,s7=new Map,n.forEach(ue,e),s7=null,s6.call(e))}function ue(e,n){if(!(4&n.state.loading)){var t=s7.get(e);if(t)var r=t.get(null);else{t=new Map,s7.set(e,t);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oe.length)&&(n=e.length);for(var t=0,r=Array(n);ti})},2316:function(e,n,t){"use strict";t.d(n,{KA:()=>r,KS:()=>o,NE:()=>l,bz:()=>i});var r=2,i=1,o=0,l=["average","bad","black","blue","brown","good","green","grey","label","olive","orange","pink","purple","red","teal","transparent","violet","white","yellow"]},1128:function(e,n,t){"use strict";t.d(n,{Nh:()=>u,WK:()=>w,tk:()=>v,y4:()=>f});var r,i=t(7686);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};d=!!e.ignoreWindowFocus},h=!0;function m(e,n){if(d){h=!0;return}if(r&&(clearTimeout(r),r=null),n){r=setTimeout(function(){return m(e)});return}h!==e&&(h=e,u.emit(e?"window-focus":"window-blur"),u.emit("window-focus-change",e))}var p=null;function x(e){var n=String(e.tagName).toLowerCase();return"input"===n||"textarea"===n}function g(){p&&(p.removeEventListener("blur",g),p=null,u.emit("input-blur"))}var j=null,b=null,y=[];function v(e){y.push(e)}function w(e){var n=y.indexOf(e);n>=0&&y.splice(n,1)}window.addEventListener("mousemove",function(e){var n=e.target;n!==b&&(b=n,function(e){if(!p&&h)for(var n=document.body;e&&e!==n;){if(y.includes(e)){if(e.contains(j))return;j=e,e.focus();return}e=e.parentElement}}(n))}),document.addEventListener("focus",function(e){var n,t,r;if(t=e.target,null!=(r=Element)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](t):!(t instanceof r)){b=null,j=null;return}b=null,j=e.target,x(e.target)&&(n=e.target,g(),(p=n).addEventListener("blur",g),u.emit("input-focus"))},!0),document.addEventListener("blur",function(){b=null},!0),window.addEventListener("focus",function(){m(!0)}),window.addEventListener("blur",function(){b=null,m(!1,!0)}),window.addEventListener("close",function(){m(!1)});var k={},_=function(){function e(n,t,r){l(this,e),s(this,"event",void 0),s(this,"type",void 0),s(this,"code",void 0),s(this,"ctrl",void 0),s(this,"shift",void 0),s(this,"alt",void 0),s(this,"repeat",void 0),s(this,"_str",void 0),this.event=n,this.type=t,this.code=n.keyCode,this.ctrl=n.ctrlKey,this.shift=n.shiftKey,this.alt=n.altKey,this.repeat=!!r}return c(e,[{key:"hasModifierKeys",value:function(){return this.ctrl||this.alt||this.shift}},{key:"isModifierKey",value:function(){return this.code===i.Ss||this.code===i.re||this.code===i.cH}},{key:"isDown",value:function(){return"keydown"===this.type}},{key:"isUp",value:function(){return"keyup"===this.type}},{key:"toString",value:function(){return this._str||(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=i.sV&&this.code<=i.Yw?this._str+="F".concat(this.code-111):this._str+="[".concat(this.code,"]")),this._str}}]),e}();document.addEventListener("keydown",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keydown",k[n]);u.emit("keydown",t),u.emit("key",t),k[n]=!0}}),document.addEventListener("keyup",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keyup");u.emit("keyup",t),u.emit("key",t),k[n]=!1}})},9582:function(e,n,t){"use strict";t.d(n,{QL:()=>o,d5:()=>l,fU:()=>c,up:()=>a});var r=["f","p","n","μ","m"," ","k","M","G","T","P","E","Z","Y","R","Q","F","N","H"],i=r.indexOf(" ");function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-i,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Number.isFinite(e))return e.toString();var o=Math.floor(Math.max(3*n,Math.floor(Math.log10(Math.abs(e))))/3),l=r[Math.min(o+i,r.length-1)],a=(e/Math.pow(1e3,o)).toFixed(2);return a.endsWith(".00")?a=a.slice(0,-3):a.endsWith(".0")&&(a=a.slice(0,-2)),"".concat(a," ").concat(l.trim()).concat(t).trim()}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e,n,"W")}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Number.isFinite(e))return String(e);var t=Number(e.toFixed(n)),r=Math.abs(t).toString().split(".");r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");var i=r.join(".");return t<0?"-".concat(i):i}function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",t=Math.floor(e/10),r=Math.floor(t/3600),i=Math.floor(t%3600/60),o=t%60;if("short"===n)return"".concat(r>0?"".concat(r,"h"):"").concat(i>0?"".concat(i,"m"):"").concat(o>0?"".concat(o,"s"):"");var l=String(r).padStart(2,"0"),a=String(i).padStart(2,"0"),c=String(o).padStart(2,"0");return"".concat(l,":").concat(a,":").concat(c)}},1874:function(e,n,t){"use strict";t.d(n,{Bm:()=>d,ao:()=>f,sc:()=>h,zr:()=>s});var r=t(1128),i=t(7686),o={},l=[i.s6,i.Ri,i.iy,i.aW,i.Ss,i.re,i.gf,i.R,i.iU,i.zh,i.sP],a={},c=[];function s(){for(var e in a)a[e]&&(a[e]=!1,Byond.command(u.verbParamsFn(u.keyUpVerb,e)))}var u={keyDownVerb:"KeyDown",keyUpVerb:"KeyUp",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}};function d(e){e&&(u=e),Byond.winget("default.*").then(function(e){var n=function(e){return e.substring(1,e.length-1).replace(c,'"')},t={};for(var r in e){var i=r.split("."),l=i[1],a=i[2];l&&a&&(t[l]||(t[l]={}),t[l][a]=e[r])}var c=/\\"/g;for(var s in t){var u=t[s];o[n(u.name)]=n(u.command)}}),r.Nh.on("window-blur",function(){s()}),r.Nh.on("input-focus",function(){s()}),f()}function f(){r.Nh.on("key",m)}function h(){r.Nh.off("key",m)}function m(e){var n=!0,t=!1,r=void 0;try{for(var i,s=c[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)(0,i.value)(e)}catch(e){t=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(t)throw r}}!function(e){var n,t=String(e);if("Ctrl+F5"===t||"Ctrl+R"===t)return location.reload();if(!("Ctrl+F"===t||e.event.defaultPrevented||e.isModifierKey()||l.includes(e.code))){var r=16===(n=e.code)?"Shift":17===n?"Ctrl":18===n?"Alt":33===n?"Northeast":34===n?"Southeast":35===n?"Southwest":36===n?"Northwest":37===n?"West":38===n?"North":39===n?"East":40===n?"South":45===n?"Insert":46===n?"Delete":n>=48&&n<=57||n>=65&&n<=90?String.fromCharCode(n):n>=96&&n<=105?"Numpad".concat(n-96):n>=112&&n<=123?"F".concat(n-111):188===n?",":189===n?"-":190===n?".":void 0;if(r){var i=o[r];if(i)return Byond.command(i);if(e.isDown()&&!a[r]){a[r]=!0;var c=u.verbParamsFn(u.keyDownVerb,r);return Byond.command(c)}if(e.isUp()&&a[r]){a[r]=!1;var s=u.verbParamsFn(u.keyUpVerb,r);Byond.command(s)}}}}(e)}},7686:function(e,n,t){"use strict";t.d(n,{C:()=>y,Pm:()=>p,R:()=>m,Ri:()=>o,Ss:()=>a,W8:()=>g,Wy:()=>x,Yw:()=>k,aW:()=>i,bh:()=>j,cH:()=>c,gf:()=>f,hr:()=>b,iU:()=>d,iy:()=>u,re:()=>l,s6:()=>s,sP:()=>w,sV:()=>v,ye:()=>r,zh:()=>h});var r=8,i=9,o=13,l=16,a=17,c=18,s=27,u=32,d=37,f=38,h=39,m=40,p=48,x=57,g=65,j=90,b=96,y=105,v=112,w=116,k=123},925:function(e,n,t){"use strict";t.d(n,{KL:()=>o,_:()=>i});var r,i=((r={}).A="a",r.Alt="Alt",r.Backspace="Backspace",r.Control="Control",r.D="d",r.Delete="Delete",r.Down="ArrowDown",r.E="e",r.End="End",r.Enter="Enter",r.Esc="Esc",r.Escape="Escape",r.Home="Home",r.Insert="Insert",r.Left="ArrowLeft",r.Minus="-",r.N="n",r.PageDown="PageDown",r.PageUp="PageUp",r.Plus="+",r.Right="ArrowRight",r.S="s",r.Shift="Shift",r.Space=" ",r.Tab="Tab",r.Up="ArrowUp",r.W="w",r.Z="z",r);function o(e){return"Esc"===e||"Escape"===e}},6859:function(e,n,t){"use strict";function r(e,n,t){return et?t:e}function i(e){return e<0?0:e>1?1:e}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return(e-n)/(t-n)}function l(e,n){return Number.parseFloat((Math.round(e*Math.pow(10,n)+1e-4*(e>=0?1:-1))/Math.pow(10,n)).toFixed(n))}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e).toFixed(Math.max(n,0))}function c(e,n){var t=!0,r=!1,i=void 0;try{for(var o,l=Object.keys(n)[Symbol.iterator]();!(t=(o=l.next()).done);t=!0){var a,c=o.value;if((a=n[c])&&e>=a[0]&&e<=a[1])return c}}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}}function s(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)}function u(e){return 180/Math.PI*e}t.d(n,{J$:()=>i,KJ:()=>u,LI:()=>l,Lz:()=>s,Mg:()=>a,TG:()=>c,hs:()=>o,qE:()=>r})},5490:function(e,n,t){"use strict";function r(e){for(var n="",t=0;tr,b5:()=>i})},3268:function(e,n,t){"use strict";function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return JSON.stringify(e)},t=e.toLowerCase().trim();return function(e){if(!t)return!0;var r=n(e);return!!r&&r.toLowerCase().includes(t)}}function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}t.d(n,{Sn:()=>a,XZ:()=>r,ZH:()=>i,jT:()=>u});var o=["Id","Tv"],l=["A","An","And","As","At","But","By","For","For","From","In","Into","Near","Nor","Of","On","Onto","Or","The","To","With"];function a(e){if(!e)return e;var n=e.replace(/([^\W_]+[^\s-]*) */g,function(e){return i(e)}),t=!0,r=!1,a=void 0;try{for(var c,s=l[Symbol.iterator]();!(t=(c=s.next()).done);t=!0){var u=c.value,d=RegExp("\\s".concat(u,"\\s"),"g");n=n.replace(d,function(e){return e.toLowerCase()})}}catch(e){r=!0,a=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw a}}var f=!0,h=!1,m=void 0;try{for(var p,x=o[Symbol.iterator]();!(f=(p=x.next()).done);f=!0){var g=p.value,j=RegExp("\\b".concat(g,"\\b"),"g");n=n.replace(j,function(e){return e.toLowerCase()})}}catch(e){h=!0,m=e}finally{try{f||null==x.return||x.return()}finally{if(h)throw m}}return n}var c=/&(nbsp|amp|quot|lt|gt|apos|trade|copy);/g,s={amp:"&",apos:"'",cops:"\xa9",gt:">",lt:"<",nbsp:" ",quot:'"',trade:"™"};function u(e){return e?e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(c,function(e,n){return s[n]}).replace(/&#?([0-9]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,10))}).replace(/&#x?([0-9a-f]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,16))}):e}},3375:function(e,n,t){"use strict";t.d(n,{Fl:()=>x,WP:()=>g,lO:()=>j,zA:()=>l});var r=t(2316),i=t(5490);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ttJ,z2:()=>tM,wn:()=>rr,Z8:()=>x,y5:()=>m,Rr:()=>tp,aF:()=>t1,IC:()=>t2,XI:()=>ra,zv:()=>h,ms:()=>tI,_V:()=>tj,Y0:()=>v,$n:()=>n6,cG:()=>tx,m_:()=>nY,t1:()=>td,Nt:()=>th,so:()=>tB,Q7:()=>t6,SM:()=>rn,Ap:()=>ri,Ki:()=>tY,pd:()=>tF,N6:()=>tH,tU:()=>rh,Wx:()=>tQ,fs:()=>rg,D1:()=>ti,In:()=>I,c_:()=>tT,Hg:()=>tb,az:()=>y,BK:()=>tm,qT:()=>rv});var r,i,o,l,a=t(8138),c=t(6859),s=t(4530),u=t.t(s,2);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["as","className","children","tw"]),c=i?"".concat(i," ").concat((0,j.WP)(a)):(0,j.WP)(a);return(0,s.createElement)(void 0===r?"div":r,(n=b({},(0,j.Fl)(b({},a,(0,j.lO)(l)))),t=t={className:c},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n),o)}function v(e){var n=e.className,t=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className"]);return(0,a.jsx)(y,function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var C=/-o$/;function I(e){var n=e.name,t=void 0===n?"":n,r=e.size,i=e.spin,o=e.className,l=e.rotation,c=_(e,["name","size","spin","className","rotation"]),s=c.style||{};r&&(s.fontSize="".concat(100*r,"%")),l&&(s.transform="rotate(".concat(l,"deg)")),c.style=s;var u=(0,j.Fl)(c),d="";if(t.startsWith("tg-"))d=t;else{var f=C.test(t),h=t.replace(C,""),m=!h.startsWith("fa-");d=f?"far ":"fas ",m&&(d+="fa-"),d+=h,i&&(d+=" fa-spin")}return(0,a.jsx)("i",k({className:(0,g.Ly)(["Icon",d,o,(0,j.WP)(c)])},u))}function S(){return"undefined"!=typeof window}function O(e){return E(e)?(e.nodeName||"").toLowerCase():"#document"}function A(e){var n;return(null==e||null==(n=e.ownerDocument)?void 0:n.defaultView)||window}function P(e){var n;return null==(n=(E(e)?e.ownerDocument:e.document)||window.document)?void 0:n.documentElement}function E(e){return!!S()&&(e instanceof Node||e instanceof A(e).Node)}function B(e){return!!S()&&(e instanceof Element||e instanceof A(e).Element)}function z(e){return!!S()&&(e instanceof HTMLElement||e instanceof A(e).HTMLElement)}function T(e){return!!S()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof A(e).ShadowRoot)}(I||(I={})).Stack=function(e){var n,t,r=e.className,i=e.children,o=e.size,l=_(e,["className","children","size"]),c=l.style||{};return o&&(c.fontSize="".concat(100*o,"%")),l.style=c,(0,a.jsx)("span",(n=k({className:(0,g.Ly)(["IconStack",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};let N=new Set(["inline","contents"]);function R(e){let{overflow:n,overflowX:t,overflowY:r,display:i}=H(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+t)&&!N.has(i)}let $=new Set(["table","td","th"]),D=[":popover-open",":modal"];function M(e){return D.some(n=>{try{return e.matches(n)}catch(e){return!1}})}let L=["transform","translate","scale","rotate","perspective"],K=["transform","translate","scale","rotate","perspective","filter"],J=["paint","layout","strict","content"];function X(e){let n=U(),t=B(e)?H(e):e;return L.some(e=>!!t[e]&&"none"!==t[e])||!!t.containerType&&"normal"!==t.containerType||!n&&!!t.backdropFilter&&"none"!==t.backdropFilter||!n&&!!t.filter&&"none"!==t.filter||K.some(e=>(t.willChange||"").includes(e))||J.some(e=>(t.contain||"").includes(e))}function U(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let F=new Set(["html","body","#document"]);function V(e){return F.has(O(e))}function H(e){return A(e).getComputedStyle(e)}function W(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===O(e))return e;let n=e.assignedSlot||e.parentNode||T(e)&&e.host||P(e);return T(n)?n.host:n}function G(e,n,t){var r;void 0===n&&(n=[]),void 0===t&&(t=!0);let i=function e(n){let t=q(n);return V(t)?n.ownerDocument?n.ownerDocument.body:n.body:z(t)&&R(t)?t:e(t)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=A(i);if(o){let e=Q(l);return n.concat(l,l.visualViewport||[],R(i)?i:[],e&&t?G(e):[])}return n.concat(i,G(i,[],t))}function Q(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Y='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',Z="undefined"==typeof Element,ee=Z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,en=!Z&&Element.prototype.getRootNode?function(e){var n;return null==e||null==(n=e.getRootNode)?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},et=function e(n,t){void 0===t&&(t=!0);var r,i=null==n||null==(r=n.getAttribute)?void 0:r.call(n,"inert");return""===i||"true"===i||t&&n&&e(n.parentNode)},er=function(e){var n,t=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"contenteditable");return""===t||"true"===t},ei=function(e,n,t){if(et(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Y));return n&&ee.call(e,Y)&&r.unshift(e),r=r.filter(t)},eo=function e(n,t,r){for(var i=[],o=Array.from(n);o.length;){var l=o.shift();if(!et(l,!1))if("SLOT"===l.tagName){var a=l.assignedElements(),c=e(a.length?a:l.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:l,candidates:c})}else{ee.call(l,Y)&&r.filter(l)&&(t||!n.includes(l))&&i.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),u=!et(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&u){var d=e(!0===s?l.children:s.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:l,candidates:d})}else o.unshift.apply(o,l.children)}}return i},el=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ea=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||er(e))&&!el(e)?0:e.tabIndex},ec=function(e,n){var t=ea(e);return t<0&&n&&!el(e)?0:t},es=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},eu=function(e){return"INPUT"===e.tagName},ed=function(e,n){for(var t=0;tsummary:first-of-type")?e.parentElement:e;if(ee.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return ep(e)}else{if("function"==typeof r){for(var o=e;e;){var l=e.parentElement,a=en(e);if(l&&!l.shadowRoot&&!0===r(l))return ep(e);e=e.assignedSlot?e.assignedSlot:l||a===e.ownerDocument?l:a.host}e=o}if(em(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},eg=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;tea(n))&&!!ej(e,n)},ey=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(n)||!!(n>=0)},ev=function e(n){var t=[],r=[];return n.forEach(function(n,i){var o=!!n.scopeParent,l=o?n.scopeParent:n,a=ec(l,o),c=o?e(n.candidates):l;0===a?o?t.push.apply(t,c):t.push(l):r.push({documentOrder:i,tabIndex:a,item:n,isScope:o,content:c})}),r.sort(es).reduce(function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e},[]).concat(t)},ew=function(e,n){return ev((n=n||{}).getShadowRoot?eo([e],n.includeContainer,{filter:eb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ey}):ei(e,n.includeContainer,eb.bind(null,n)))};function ek(e,n){if(!e||!n)return!1;let t=null==n.getRootNode?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&T(t)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}function e_(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eC(e,n){return null!=n&&("composedPath"in e?e.composedPath().includes(n):null!=e.target&&n.contains(e.target))}function eI(e){return(null==e?void 0:e.ownerDocument)||document}function eS(e,n,t){return void 0===t&&(t=!0),e.filter(e=>{var r;return e.parentId===n&&(!t||(null==(r=e.context)?void 0:r.open))}).flatMap(n=>[n,...eS(e,n.id,t)])}function eO(e,n){let t=["mouse","pen"];return n||t.push("",void 0),t.includes(e)}var eA="undefined"!=typeof document?s.useLayoutEffect:function(){};function eP(e){let n=s.useRef(e);return eA(()=>{n.current=e}),n}let eE={...u}.useInsertionEffect||(e=>e());function eB(e){let n=s.useRef(()=>{});return eE(()=>{n.current=e}),s.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eT(e,n){let t=ew(e,ez()),r=t.length;if(0===r)return;let i=function(e){let n=e.activeElement;for(;(null==(t=n)||null==(t=t.shadowRoot)?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}(eI(e)),o=t.indexOf(i);return t[-1===o?1===n?0:r-1:o+n]}function eN(e,n){let t=n||e.currentTarget,r=e.relatedTarget;return!r||!ek(t,r)}function eR(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}var e$=t(6634);let eD=Math.min,eM=Math.max,eL=Math.round,eK=Math.floor,eJ=e=>({x:e,y:e}),eX={left:"right",right:"left",bottom:"top",top:"bottom"},eU={start:"end",end:"start"};function eF(e,n){return"function"==typeof e?e(n):e}function eV(e){return e.split("-")[0]}function eH(e){return e.split("-")[1]}function eW(e){return"x"===e?"y":"x"}function eq(e){return"y"===e?"height":"width"}let eG=new Set(["top","bottom"]);function eQ(e){return eG.has(eV(e))?"y":"x"}function eY(e){return e.replace(/start|end/g,e=>eU[e])}let eZ=["left","right"],e0=["right","left"],e1=["top","bottom"],e2=["bottom","top"];function e8(e){return e.replace(/left|right|bottom|top/g,e=>eX[e])}function e3(e){let{x:n,y:t,width:r,height:i}=e;return{width:r,height:i,top:t,left:n,right:n+r,bottom:t+i,x:n,y:t}}function e5(e,n,t){let r,{reference:i,floating:o}=e,l=eQ(n),a=eW(eQ(n)),c=eq(a),s=eV(n),u="y"===l,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;switch(s){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch(eH(n)){case"start":r[a]-=h*(t&&u?-1:1);break;case"end":r[a]+=h*(t&&u?-1:1)}return r}let e4=async(e,n,t)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=t,a=o.filter(Boolean),c=await (null==l.isRTL?void 0:l.isRTL(n)),s=await l.getElementRects({reference:e,floating:n,strategy:i}),{x:u,y:d}=e5(s,r,c),f=r,h={},m=0;for(let t=0;tB(e)&&"body"!==O(e)),i=null,o="fixed"===H(e).position,l=o?q(e):e;for(;B(l)&&!V(l);){let n=H(l),t=X(l);t||"fixed"!==n.position||(i=null),(o?!t&&!i:!t&&"static"===n.position&&!!i&&nc.has(i.position)||R(l)&&!t&&function e(n,t){let r=q(n);return!(r===t||!B(r)||V(r))&&("fixed"===H(r).position||e(r,t))}(e,l))?r=r.filter(e=>e!==l):i=n,l=q(l)}return n.set(e,r),r}(n,this._c):[].concat(t),r],l=o[0],a=o.reduce((e,t)=>{let r=ns(n,t,i);return e.top=eM(r.top,e.top),e.right=eD(r.right,e.right),e.bottom=eD(r.bottom,e.bottom),e.left=eM(r.left,e.left),e},ns(n,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:nf,getElementRects:nh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:n,height:t}=ne(e);return{width:n,height:t}},getScale:nt,isElement:B,isRTL:function(e){return"rtl"===H(e).direction}};function np(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}var nx="undefined"!=typeof document?s.useLayoutEffect:function(){};function ng(e,n){let t,r,i;if(e===n)return!0;if(typeof e!=typeof n)return!1;if("function"==typeof e&&e.toString()===n.toString())return!0;if(e&&n&&"object"==typeof e){if(Array.isArray(e)){if((t=e.length)!==n.length)return!1;for(r=t;0!=r--;)if(!ng(e[r],n[r]))return!1;return!0}if((t=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=t;0!=r--;)if(!({}).hasOwnProperty.call(n,i[r]))return!1;for(r=t;0!=r--;){let t=i[r];if(("_owner"!==t||!e.$$typeof)&&!ng(e[t],n[t]))return!1}return!0}return e!=e&&n!=n}function nj(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nb(e,n){let t=nj(e);return Math.round(n*t)/t}function ny(e){let n=s.useRef(e);return nx(()=>{n.current=e}),n}let nv="active",nw="selected",nk={...u},n_=!1,nC=0,nI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nC++,nS=nk.useId||function(){let[e,n]=s.useState(()=>n_?nI():void 0);return eA(()=>{null==e&&n(nI())},[]),s.useEffect(()=>{n_=!0},[]),e},nO=s.createContext(null),nA=s.createContext(null),nP=()=>{var e;return(null==(e=s.useContext(nO))?void 0:e.id)||null};function nE(e){return"data-floating-ui-"+e}function nB(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let nz=nE("safe-polygon");function nT(e,n,t){if(t&&!eO(t))return 0;if("number"==typeof e)return e;if("function"==typeof e){let t=e();return"number"==typeof t?t:null==t?void 0:t[n]}return null==e?void 0:e[n]}function nN(e){return"function"==typeof e?e():e}let nR={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},n$=s.forwardRef(function(e,n){let[t,r]=s.useState();eA(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);let i={ref:n,tabIndex:0,role:t,"aria-hidden":!t||void 0,[nE("focus-guard")]:"",style:nR};return(0,a.jsx)("span",{...e,...i})}),nD=s.createContext(null),nM=nE("portal");function nL(e){let{children:n,id:t,root:r,preserveTabOrder:i=!0}=e,o=function(e){void 0===e&&(e={});let{id:n,root:t}=e,r=nS(),i=nK(),[o,l]=s.useState(null),a=s.useRef(null);return eA(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),eA(()=>{if(!r||a.current)return;let e=n?document.getElementById(n):null;if(!e)return;let t=document.createElement("div");t.id=r,t.setAttribute(nM,""),e.appendChild(t),a.current=t,l(t)},[n,r]),eA(()=>{if(null===t||!r||a.current)return;let e=t||(null==i?void 0:i.portalNode);e&&!E(e)&&(e=e.current),e=e||document.body;let o=null;n&&((o=document.createElement("div")).id=n,e.appendChild(o));let c=document.createElement("div");c.id=r,c.setAttribute(nM,""),(e=o||e).appendChild(c),a.current=c,l(c)},[n,t,r,i]),o}({id:t,root:r}),[l,c]=s.useState(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),h=s.useRef(null),m=null==l?void 0:l.modal,p=null==l?void 0:l.open,x=!!l&&!l.modal&&l.open&&i&&!!(r||o);return s.useEffect(()=>{if(o&&i&&!m)return o.addEventListener("focusin",e,!0),o.addEventListener("focusout",e,!0),()=>{o.removeEventListener("focusin",e,!0),o.removeEventListener("focusout",e,!0)};function e(e){o&&eN(e)&&("focusin"===e.type?eR:function(e){ew(e,ez()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(o)}},[o,i,m]),s.useEffect(()=>{!o||p||eR(o)},[p,o]),(0,a.jsxs)(nD.Provider,{value:s.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:h,portalNode:o,setFocusManagerState:c}),[i,o]),children:[x&&o&&(0,a.jsx)(n$,{"data-type":"outside",ref:u,onFocus:e=>{var n,t;if(eN(e,o))null==(n=f.current)||n.focus();else{let e=eT(eI(t=l?l.domReference:null).body,-1)||t;null==e||e.focus()}}}),x&&o&&(0,a.jsx)("span",{"aria-owns":o.id,style:nR}),o&&e$.createPortal(n,o),x&&o&&(0,a.jsx)(n$,{"data-type":"outside",ref:d,onFocus:e=>{var n,t;if(eN(e,o))null==(n=h.current)||n.focus();else{let n=eT(eI(t=l?l.domReference:null).body,1)||t;null==n||n.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let nK=()=>s.useContext(nD);function nJ(e){return z(e.target)&&"BUTTON"===e.target.tagName}function nX(e){return z(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}let nU={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nV=e=>{var n,t;return{escapeKey:"boolean"==typeof e?e:null!=(n=null==e?void 0:e.escapeKey)&&n,outsidePress:"boolean"==typeof e?e:null==(t=null==e?void 0:e.outsidePress)||t}};function nH(e,n,t){let r=new Map,i="item"===t,o=e;if(i&&e){let{[nv]:n,[nw]:t,...r}=e;o=r}return{..."floating"===t&&{tabIndex:-1,"data-floating-ui-focusable":""},...o,...n.map(n=>{let r=n?n[t]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,n)=>(n&&Object.entries(n).forEach(n=>{let[t,o]=n;if(!(i&&[nv,nw].includes(t)))if(0===t.indexOf("on")){if(r.has(t)||r.set(t,[]),"function"==typeof o){var l;null==(l=r.get(t))||l.push(o),e[t]=function(){for(var e,n=arguments.length,i=Array(n),o=0;oe(...i)).find(e=>void 0!==e)}}}else e[t]=o}),e),{})}}function nW(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t{let e;return e=new Map,{emit(n,t){var r;null==(r=e.get(n))||r.forEach(e=>e(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;null==(r=e.get(n))||r.delete(t)}}}),a=null!=nP(),[c,u]=s.useState(r.reference),d=eB((e,n,r)=>{o.current.openEvent=e?n:void 0,l.emit("openchange",{open:e,event:n,reason:r,nested:a}),null==t||t(e,n,r)}),f=s.useMemo(()=>({setPositionReference:u}),[]),h=s.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return s.useMemo(()=>({dataRef:o,open:n,onOpenChange:d,elements:h,events:l,floatingId:i,refs:f}),[n,d,h,l,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,i=r.elements,[o,l]=s.useState(null),[a,c]=s.useState(null),u=(null==i?void 0:i.domReference)||o,d=s.useRef(null),f=s.useContext(nA);eA(()=>{u&&(d.current=u)},[u]);let h=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=s.useState(r);ng(h,r)||m(r);let[p,x]=s.useState(null),[g,j]=s.useState(null),b=s.useCallback(e=>{e!==k.current&&(k.current=e,x(e))},[]),y=s.useCallback(e=>{e!==_.current&&(_.current=e,j(e))},[]),v=o||p,w=l||g,k=s.useRef(null),_=s.useRef(null),C=s.useRef(d),I=null!=c,S=ny(c),O=ny(i),A=ny(u),P=s.useCallback(()=>{var e,r;let i,o,l;if(!k.current||!_.current)return;let a={placement:n,strategy:t,middleware:h};O.current&&(a.platform=O.current),(e=k.current,r=_.current,i=new Map,l={...(o={platform:nm,...a}).platform,_c:i},e4(e,r,{...o,platform:l})).then(e=>{let n={...e,isPositioned:!1!==A.current};E.current&&!ng(C.current,n)&&(C.current=n,e$.flushSync(()=>{f(n)}))})},[h,n,t,O,A]);nx(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let E=s.useRef(!1);nx(()=>(E.current=!0,()=>{E.current=!1}),[]),nx(()=>{if(v&&(k.current=v),w&&(_.current=w),v&&w){if(S.current)return S.current(v,w,P);P()}},[v,w,P,S,I]);let B=s.useMemo(()=>({reference:k,floating:_,setReference:b,setFloating:y}),[b,y]),z=s.useMemo(()=>({reference:v,floating:w}),[v,w]),T=s.useMemo(()=>{let e={position:t,left:0,top:0};if(!z.floating)return e;let n=nb(z.floating,d.x),r=nb(z.floating,d.y);return a?{...e,transform:"translate("+n+"px, "+r+"px)",...nj(z.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:n,top:r}},[t,a,z.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:P,refs:B,elements:z,floatingStyles:T}),[d,P,B,z,T])}({...e,elements:{...i,...a&&{reference:a}}}),m=s.useCallback(e=>{let n=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(n),h.refs.setReference(n)},[h.refs]),p=s.useCallback(e=>{(B(e)||null===e)&&(d.current=e,l(e)),(B(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!B(e))&&h.refs.setReference(e)},[h.refs]),x=s.useMemo(()=>({...h.refs,setReference:p,setPositionReference:m,domReference:d}),[h.refs,p,m]),g=s.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),j=s.useMemo(()=>({...h,...r,refs:x,elements:g,nodeId:n}),[h,x,g,n,r]);return eA(()=>{r.dataRef.current.floatingContext=j;let e=null==f?void 0:f.nodesRef.current.find(e=>e.id===n);e&&(e.context=j)}),s.useMemo(()=>({...h,context:j,refs:x,elements:g}),[h,x,g,j])}({middleware:[{...(void 0===(f=u=void 0===N?6:N)&&(f=0),{name:"offset",options:f,async fn(e){var n,t;let{x:r,y:i,placement:o,middlewareData:l}=e,a=await e9(e,f);return o===(null==(n=l.offset)?void 0:n.placement)&&null!=(t=l.arrow)&&t.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:o}}}}),options:[u,d]},{...{name:"flip",options:p=h={padding:6},async fn(e){var n,t,r,i,o,l,a,c;let s,u,d,{placement:f,middlewareData:h,rects:m,initialPlacement:x,platform:g,elements:j}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:_=!0,...C}=eF(p,e);if(null!=(n=h.arrow)&&n.alignmentOffset)return{};let I=eV(f),S=eQ(x),O=eV(x)===x,A=await (null==g.isRTL?void 0:g.isRTL(j.floating)),P=v||(O||!_?[e8(x)]:(s=e8(x),[eY(x),s,eY(s)])),E="none"!==k;!v&&E&&P.push(...(u=eH(x),d=function(e,n,t){switch(e){case"top":case"bottom":if(t)return n?e0:eZ;return n?eZ:e0;case"left":case"right":return n?e1:e2;default:return[]}}(eV(x),"start"===k,A),u&&(d=d.map(e=>e+"-"+u),_&&(d=d.concat(d.map(eY)))),d));let B=[x,...P],z=await e6(e,C),T=[],N=(null==(t=h.flip)?void 0:t.overflows)||[];if(b&&T.push(z[I]),y){let e,n,t,r,i=(l=f,a=m,void 0===(c=A)&&(c=!1),e=eH(l),t=eq(n=eW(eQ(l))),r="x"===n?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[t]>a.floating[t]&&(r=e8(r)),[r,e8(r)]);T.push(z[i[0]],z[i[1]])}if(N=[...N,{placement:f,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=h.flip)?void 0:r.index)||0)+1,n=B[e];if(n&&("alignment"!==y||S===eQ(n)||N.every(e=>eQ(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:n}};let t=null==(i=N.filter(e=>e.overflows[0]<=0).sort((e,n)=>e.overflows[1]-n.overflows[1])[0])?void 0:i.placement;if(!t)switch(w){case"bestFit":{let e=null==(o=N.filter(e=>{if(E){let n=eQ(e.placement);return n===S||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,n)=>e+n,0)]).sort((e,n)=>e[1]-n[1])[0])?void 0:o[0];e&&(t=e);break}case"initialPlacement":t=x}if(f!==t)return{reset:{placement:t}}}return{}}},options:[h,m]},{...(void 0===(b=x)&&(b={}),{name:"shift",options:b,async fn(e){let{x:n,y:t,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:n,y:t}=e;return{x:n,y:t}}},...a}=eF(b,e),c={x:n,y:t},s=await e6(e,a),u=eQ(eV(r)),d=eW(u),f=c[d],h=c[u];if(i){let e="y"===d?"top":"left",n="y"===d?"bottom":"right",t=f+s[e],r=f-s[n];f=eM(t,eD(f,r))}if(o){let e="y"===u?"top":"left",n="y"===u?"bottom":"right",t=h+s[e],r=h-s[n];h=eM(t,eD(h,r))}let m=l.fn({...e,[d]:f,[u]:h});return{...m,data:{x:m.x-n,y:m.y-t,enabled:{[d]:i,[u]:o}}}}}),options:[x,j]},E&&{...{name:"size",options:w=y={apply:function(e){var n=e.rects;e.elements.floating.style.width="".concat(n.reference.width,"px")}},async fn(e){var n,t;let r,i,{placement:o,rects:l,platform:a,elements:c}=e,{apply:s=()=>{},...u}=eF(w,e),d=await e6(e,u),f=eV(o),h=eH(o),m="y"===eQ(o),{width:p,height:x}=l.floating;"top"===f||"bottom"===f?(r=f,i=h===(await (null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(i=f,r="end"===h?"top":"bottom");let g=x-d.top-d.bottom,j=p-d.left-d.right,b=eD(x-d[r],g),y=eD(p-d[i],j),v=!e.middlewareData.shift,k=b,_=y;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(_=j),null!=(t=e.middlewareData.shift)&&t.enabled.y&&(k=g),v&&!h){let e=eM(d.left,0),n=eM(d.right,0),t=eM(d.top,0),r=eM(d.bottom,0);m?_=p-2*(0!==e||0!==n?e+n:eM(d.left,d.right)):k=x-2*(0!==t||0!==r?t+r:eM(d.top,d.bottom))}await s({...e,availableWidth:_,availableHeight:k});let C=await a.getDimensions(c.floating);return p!==C.width||x!==C.height?{reset:{rects:!0}}:{}}},options:[y,v]}],onOpenChange:function(e){Z(e),null==W||W(e)},open:Y,placement:J||"bottom",transform:!1,whileElementsMounted:function(e,n,t){return void 0!==K&&K(),function(e,n,t,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=nn(e),d=o||l?[...u?G(u):[],...G(n)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",t,{passive:!0}),l&&e.addEventListener("resize",t)});let f=u&&c?function(e,n){let t,r=null,i=P(e);function o(){var e;clearTimeout(t),null==(e=r)||e.disconnect(),r=null}return!function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),o();let s=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=s;if(a||n(),!f||!h)return;let m={rootMargin:-eK(d)+"px "+-eK(i.clientWidth-(u+f))+"px "+-eK(i.clientHeight-(d+h))+"px "+-eK(u)+"px",threshold:eM(0,eD(1,c))||1},p=!0;function x(n){let r=n[0].intersectionRatio;if(r!==c){if(!p)return l();r?l(!1,r):t=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||np(s,e.getBoundingClientRect())||l(),p=!1}try{r=new IntersectionObserver(x,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(x,m)}r.observe(e)}(!0),o}(u,t):null,h=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(n)})),t()}),u&&!s&&m.observe(u),m.observe(n));let p=s?no(e):null;return s&&function n(){let r=no(e);p&&!np(p,r)&&t(),p=r,i=requestAnimationFrame(n)}(),t(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",t),l&&e.removeEventListener("resize",t)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(i)}}(e,n,t,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1})}}),en=ee.refs,et=ee.floatingStyles,er=ee.context,ei=function(e,n){void 0===n&&(n={});let{open:t,elements:{floating:r}}=e,{duration:i=250}=n,o=("number"==typeof i?i:i.close)||0,[l,a]=s.useState("unmounted"),c=function(e,n){let[t,r]=s.useState(e);return e&&!t&&r(!0),s.useEffect(()=>{if(!e&&t){let e=setTimeout(()=>r(!1),n);return()=>clearTimeout(e)}},[e,t,n]),t}(t,o);return c||"close"!==l||a("unmounted"),eA(()=>{if(r){if(t){a("initial");let e=requestAnimationFrame(()=>{e$.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[t,r]),{isMounted:c,status:l}}(er,{duration:I||200}),eo=ei.isMounted,el=ei.status,ea=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:l=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:p}=n,x=s.useContext(nA),g=eB("function"==typeof c?c:()=>!1),j="function"==typeof c?g:c,b=s.useRef(!1),{escapeKey:y,outsidePress:v}=nV(m),{escapeKey:w,outsidePress:k}=nV(p),_=s.useRef(!1),C=eB(e=>{var n;if(!t||!l||!a||"Escape"!==e.key||_.current)return;let i=null==(n=o.current.floatingContext)?void 0:n.nodeId,c=x?eS(x.nodesRef.current,i):[];if(!y&&(e.stopPropagation(),c.length>0)){let e=!0;if(c.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),I=eB(e=>{var n;let t=()=>{var n;C(e),null==(n=e_(e))||n.removeEventListener("keydown",t)};null==(n=e_(e))||n.addEventListener("keydown",t)}),S=eB(e=>{var n;let t=o.current.insideReactTree;o.current.insideReactTree=!1;let l=b.current;if(b.current=!1,"click"===u&&l||t||"function"==typeof j&&!j(e))return;let a=e_(e),c="["+nE("inert")+"]",s=eI(i.floating).querySelectorAll(c),d=B(a)?a:null;for(;d&&!V(d);){let e=q(d);if(V(e)||!B(e))break;d=e}if(s.length&&B(a)&&!a.matches("html,body")&&!ek(a,i.floating)&&Array.from(s).every(e=>!ek(d,e)))return;if(z(a)&&P){let n=V(a),t=H(a),r=/auto|scroll/,i=n||r.test(t.overflowX),o=n||r.test(t.overflowY),l=i&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,c=o&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,s="rtl"===t.direction,u=c&&(s?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),d=l&&e.offsetY>a.clientHeight;if(u||d)return}let f=null==(n=o.current.floatingContext)?void 0:n.nodeId,h=x&&eS(x.nodesRef.current,f).some(n=>{var t;return eC(e,null==(t=n.context)?void 0:t.elements.floating)});if(eC(e,i.floating)||eC(e,i.domReference)||h)return;let m=x?eS(x.nodesRef.current,f):[];if(m.length>0){let e=!0;if(m.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,"outside-press")}),O=eB(e=>{var n;let t=()=>{var n;S(e),null==(n=e_(e))||n.removeEventListener(u,t)};null==(n=e_(e))||n.addEventListener(u,t)});s.useEffect(()=>{if(!t||!l)return;o.current.__escapeKeyBubbles=y,o.current.__outsidePressBubbles=v;let e=-1;function n(e){r(!1,e,"ancestor-scroll")}function c(){window.clearTimeout(e),_.current=!0}function s(){e=window.setTimeout(()=>{_.current=!1},5*!!U())}let d=eI(i.floating);a&&(d.addEventListener("keydown",w?I:C,w),d.addEventListener("compositionstart",c),d.addEventListener("compositionend",s)),j&&d.addEventListener(u,k?O:S,k);let f=[];return h&&(B(i.domReference)&&(f=G(i.domReference)),B(i.floating)&&(f=f.concat(G(i.floating))),!B(i.reference)&&i.reference&&i.reference.contextElement&&(f=f.concat(G(i.reference.contextElement)))),(f=f.filter(e=>{var n;return e!==(null==(n=d.defaultView)?void 0:n.visualViewport)})).forEach(e=>{e.addEventListener("scroll",n,{passive:!0})}),()=>{a&&(d.removeEventListener("keydown",w?I:C,w),d.removeEventListener("compositionstart",c),d.removeEventListener("compositionend",s)),j&&d.removeEventListener(u,k?O:S,k),f.forEach(e=>{e.removeEventListener("scroll",n)}),window.clearTimeout(e)}},[o,i,a,j,u,t,r,h,l,y,v,C,w,I,S,k,O]),s.useEffect(()=>{o.current.insideReactTree=!1},[o,j,u]);let A=s.useMemo(()=>({onKeyDown:C,...d&&{[nU[f]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==f&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[C,r,d,f]),P=s.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[nF[u]]:()=>{o.current.insideReactTree=!0}}),[C,u,o]);return s.useMemo(()=>l?{reference:A,floating:P}:{},[l,A,P])}(er,{ancestorScroll:!0,outsidePress:function(e){var n,t;return!C||(n=e.target,(null!=(t=Element)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t)&&!e.target.closest(C))}}),ec=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:a="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=n,h=s.useRef(),m=s.useRef(!1),p=s.useMemo(()=>({onPointerDown(e){h.current=e.pointerType},onMouseDown(e){let n=h.current;0!==e.button||"click"===a||eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"mousedown"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):(e.preventDefault(),r(!0,e.nativeEvent,"click")))},onClick(e){let n=h.current;if("mousedown"===a&&h.current){h.current=void 0;return}eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"click"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))},onKeyDown(e){h.current=void 0,!(e.defaultPrevented||!d||nJ(e))&&(" "!==e.key||nX(o)||(e.preventDefault(),m.current=!0),z(e.target)&&"A"===e.target.tagName||"Enter"!==e.key||(t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!d||nJ(e)||nX(o))&&" "===e.key&&m.current&&(m.current=!1,t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))}}),[i,o,a,u,d,r,t,f,c]);return s.useMemo(()=>l?{reference:p}:{},[l,p])}(er,{enabled:!$}),es=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:a=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:h=!0}=n,m=s.useContext(nA),p=nP(),x=eP(u),g=eP(c),j=eP(t),b=eP(f),y=s.useRef(),v=s.useRef(-1),w=s.useRef(),k=s.useRef(-1),_=s.useRef(!0),C=s.useRef(!1),I=s.useRef(()=>{}),S=s.useRef(!1),O=eB(()=>{var e;let n=null==(e=i.current.openEvent)?void 0:e.type;return(null==n?void 0:n.includes("mouse"))&&"mousedown"!==n});s.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{open:n}=e;n||(nB(v),nB(k),_.current=!0,S.current=!1)}},[a,o]),s.useEffect(()=>{if(!a||!x.current||!t)return;function e(e){O()&&r(!1,e,"hover")}let n=eI(l.floating).documentElement;return n.addEventListener("mouseleave",e),()=>{n.removeEventListener("mouseleave",e)}},[l.floating,t,r,a,x,O]);let A=s.useCallback(function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t="hover");let i=nT(g.current,"close",y.current);i&&!w.current?(nB(v),v.current=window.setTimeout(()=>r(!1,e,t),i)):n&&(nB(v),r(!1,e,t))},[g,r]),P=eB(()=>{I.current(),w.current=void 0}),E=eB(()=>{if(C.current){let e=eI(l.floating).body;e.style.pointerEvents="",e.removeAttribute(nz),C.current=!1}}),z=eB(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));s.useEffect(()=>{if(a&&B(l.domReference)){let r=l.domReference,i=l.floating;return t&&r.addEventListener("mouseleave",o),h&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",n),i&&(i.addEventListener("mouseleave",o),i.addEventListener("mouseenter",c),i.addEventListener("mouseleave",s)),()=>{t&&r.removeEventListener("mouseleave",o),h&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",n),i&&(i.removeEventListener("mouseleave",o),i.removeEventListener("mouseenter",c),i.removeEventListener("mouseleave",s))}}function e(e){if(nB(v),_.current=!1,d&&!eO(y.current)||nN(b.current)>0&&!nT(g.current,"open"))return;let n=nT(g.current,"open",y.current);n?v.current=window.setTimeout(()=>{j.current||r(!0,e,"hover")},n):t||r(!0,e,"hover")}function n(e){if(z())return void E();I.current();let n=eI(l.floating);if(nB(k),S.current=!1,x.current&&i.current.floatingContext){t||nB(v),w.current=x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){E(),P(),z()||A(e,!0,"safe-polygon")}});let r=w.current;n.addEventListener("mousemove",r),I.current=()=>{n.removeEventListener("mousemove",r)};return}"touch"===y.current&&ek(l.floating,e.relatedTarget)||A(e)}function o(e){z()||i.current.floatingContext&&(null==x.current||x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){E(),P(),z()||A(e)}})(e))}function c(){nB(v)}function s(e){z()||A(e,!1)}},[l,a,e,d,h,A,P,E,r,t,j,m,g,x,i,z,b]),eA(()=>{var e,n;if(a&&t&&null!=(e=x.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&O()){C.current=!0;let e=l.floating;if(B(l.domReference)&&e){let t=eI(l.floating).body;t.setAttribute(nz,"");let r=l.domReference,i=null==m||null==(n=m.nodesRef.current.find(e=>e.id===p))||null==(n=n.context)?void 0:n.elements.floating;return i&&(i.style.pointerEvents=""),t.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{t.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,t,p,l,m,x,O]),eA(()=>{t||(y.current=void 0,S.current=!1,P(),E())},[t,P,E]),s.useEffect(()=>()=>{P(),nB(v),nB(k),E()},[a,l.domReference,P,E]);let T=s.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:n}=e;function i(){_.current||j.current||r(!0,n,"hover")}d&&!eO(y.current)||t||0===nN(b.current)||S.current&&e.movementX**2+e.movementY**2<2||(nB(k),"touch"===y.current?i():(S.current=!0,k.current=window.setTimeout(i,nN(b.current))))}}},[d,r,t,j,b]);return s.useMemo(()=>a?{reference:T}:{},[a,T])}(er,{enabled:!$,restMs:D||200}),eu=void 0!==L,ed=(n=(k=eu?[]:[ea,M?es:ec]).map(e=>null==e?void 0:e.reference),t=k.map(e=>null==e?void 0:e.floating),r=k.map(e=>null==e?void 0:e.item),i=s.useCallback(e=>nH(e,k,"reference"),n),o=s.useCallback(e=>nH(e,k,"floating"),t),l=s.useCallback(e=>nH(e,k,"item"),r),s.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])),ef=ed.getReferenceProps,eh=ed.getFloatingProps,em=ef(nq({ref:en.setReference},F&&{onClick:function(e){return e.stopPropagation()}})),ep=eh({onClick:function(){O&&er.onOpenChange(!1)},ref:en.setFloating});(0,s.useEffect)(function(){eu&&er.onOpenChange(L)},[L]),_=(0,s.isValidElement)(S)?(0,s.cloneElement)(S,em):(0,a.jsx)("div",nG(nq({},em),{children:S}));var ex=(0,a.jsx)("div",nG(nq({className:(0,g.Ly)(["Floating",!I&&"Floating--animated",T]),"data-position":er.placement,"data-transition":el,style:nq({},et,R)},ep),{children:A}));return(0,a.jsxs)(a.Fragment,{children:[_,eo&&!!A&&(X?ex:(0,a.jsx)(nL,{id:"tgui-root",children:ex}))]})}function nY(e){var n=e.content,t=e.children,r=e.position;return(0,a.jsx)(nQ,{content:n,contentClasses:"Tooltip",hoverOpen:!0,placement:r,children:t})}function nZ(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function n5(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return nZ(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nZ(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n4(e,n){var t,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var s=[a,c];if(t)throw TypeError("Generator is already executing.");for(;l&&(l=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]e.length)&&(n=e.length);for(var t=0,r=Array(n);t2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i=arguments.length,o=Array(i),l=0;l=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["params","phonehome"]),i=(0,s.useRef)(null),o=(0,s.useRef)(function(e){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],t=tr.length;tr.push(null);var r=e||"byondui_".concat(t);return{render:function(e){n&&Byond.sendMessage("renderByondUi",{renderByondUi:r}),tr[t]=r,Byond.winset(r,e)},unmount:function(){n&&Byond.sendMessage("unmountByondUi",{renderByondUi:r}),tr[t]=null,Byond.winset(r,{parent:""})}}}(null==n?void 0:n.id,t));function l(){var e=i.current;if(e){var t,r,l,a=(r=null!=(t=window.devicePixelRatio)?t:1,{pos:[(l=e.getBoundingClientRect()).left*r,l.top*r],size:[(l.right-l.left)*r,(l.bottom-l.top)*r]});o.current.render(tt(tn({parent:Byond.windowId},n),{pos:"".concat(a.pos[0],",").concat(a.pos[1]),size:"".concat(a.size[0],"x").concat(a.size[1])}))}}var c=te(function(){l()},100);return(0,s.useEffect)(function(){return window.addEventListener("resize",c),l(),function(){window.removeEventListener("resize",c),o.current.unmount()}},[]),(0,a.jsx)("div",tt(tn({ref:i},(0,j.Fl)(r)),{children:(0,a.jsx)("div",{style:{minHeight:"22px"}})}))}window.addEventListener("beforeunload",function(){for(var e=0;ee.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),h=(0,s.useRef)(null),m=ta((0,s.useState)([600,200]),2),p=m[0],x=m[1],g=function(e,n,t,r){if(0===e.length)return[];var i,o,l=to.y.apply(void 0,tc(e)),a=l.map(function(e){return(i=Math).min.apply(i,tc(e))}),c=l.map(function(e){return(o=Math).max.apply(o,tc(e))});return void 0!==t&&(a[0]=t[0],c[0]=t[1]),void 0!==r&&(a[1]=r[0],c[1]=r[1]),e.map(function(e){return(0,to.y)(e,a,c,n).map(function(e){var n=ta(e,4),t=n[0],r=n[1];return(t-r)/(n[2]-r)*n[3]})})}(void 0===r?[]:r,p,i,o);if(g.length>0){var j=g[0],b=g[g.length-1];g.push([p[0]+d,b[1]]),g.push([p[0]+d,-d]),g.push([-d,-d]),g.push([-d,j[1]])}var v=function(e){for(var n="",t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","child_mt","childStyles","color","title","buttons","icon"]),m=(n=(0,s.useState)(e.open),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tf(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tf(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],x=m[1];return(0,a.jsxs)(y,{mb:1,children:[(0,a.jsxs)("div",{className:"Table",children:[(0,a.jsx)("div",{className:"Table__cell",children:(0,a.jsx)(n6,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["content","children","className"]);return o.color=r?null:"default",o.backgroundColor=e.color||"default",(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children"]);return(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["fixBlur","fixErrors","objectFit","src"]),d=(0,s.useRef)(0),f=(0,s.useRef)(null),h=(0,j.Fl)(u);return n=tg({},h.style),t=t={imageRendering:void 0===r||r?"pixelated":"auto",objectFit:void 0===o?"fill":o},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),h.style=n,(0,s.useEffect)(function(){return function(){f.current&&clearTimeout(f.current)}},[]),(0,a.jsx)("img",tg({alt:"dm icon",onError:function(e){if(!i||d.current>=5){f.current&&clearTimeout(f.current);return}var n=e.currentTarget;f.current=setTimeout(function(){n.src="".concat(c,"?attempt=").concat(d.current),d.current++},1e3)},src:c},h))}function tb(e){var n,t=e.direction,r=e.fallback,i=e.frame,o=e.icon_state,l=e.icon,c=e.movement,s=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["direction","fallback","frame","icon_state","icon","movement"]),u=null==(n=Byond.iconRefMap)?void 0:n[l];return u?(0,a.jsx)(tj,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);tk.length-3?k.length-1:e-2;var t=z.current,r=null==t?void 0:t.children[n];t&&r&&(t.scrollTop=r.offsetTop)}function R(e){if(!(k.length<1)&&!c){var n,t=k.length-1;n=T<0?"next"===e?t:0:"next"===e?T===t?0:T+1:0===T?t:T-1,E&&r&&N(n),null==y||y(tC(k[n]))}}var $=_?"top":"bottom";return m&&($="".concat($,"-start")),(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown",O&&"Dropdown--fluid"]),children:[(0,a.jsx)(nQ,{allowedOutsideClasses:".Dropdown__button",closeAfterInteract:!0,content:(0,a.jsx)("div",{className:"Dropdown__menu",ref:z,children:0===k.length?(0,a.jsx)("div",{className:"Dropdown__menu--entry",children:"No options"}):k.map(function(e){var n=tC(e);return(0,a.jsx)("div",{className:(0,g.Ly)(["Dropdown__menu--entry",S===n&&"selected"]),onClick:function(){null==y||y(n)},onKeyDown:function(e){e.key===w._.Enter&&(null==y||y(n))},children:"string"==typeof e?e:e.displayText},n)})}),contentAutoWidth:!p,contentClasses:"Dropdown__menu--wrapper",contentStyles:{width:p?(0,j.zA)(p):void 0},disabled:c,onMounted:function(){E&&r&&-1!==T&&N(T)},onOpenChange:B,placement:$,children:(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown__control","Button--color--".concat(void 0===l?"default":l),c&&"Button--disabled",m&&"Dropdown__control--icon-only",o]),onClick:function(e){(!c||E)&&(null==b||b(e))},onKeyDown:function(e){e.key!==w._.Enter||c||null==b||b(e)},style:{width:(0,j.zA)(void 0===A?15:A)},children:[d&&(0,a.jsx)(I,{className:"Dropdown__icon",name:d,rotation:f,spin:h}),!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"Dropdown__selected-text",children:u||S&&tC(S)||(void 0===C?"Select...":C)}),!x&&(0,a.jsx)(I,{className:(0,g.Ly)(["Dropdown__icon","Dropdown__icon--arrow",_&&"over",E&&"open"]),name:"chevron-down"})]})]})}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-left",onClick:function(){R("previous")}}),(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-right",onClick:function(){R("next")}})]})]})}function tS(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tP(e){return(0,g.Ly)(["Flex",e.inlineFlex&&"Flex--inline",(0,j.WP)(e)])}function tE(e){var n=e.direction,t=e.wrap,r=e.align,i=e.justify,o=tA(e,["direction","wrap","align","justify"]);return(0,j.Fl)(tS({style:tO(tS({},o.style),{alignItems:r,flexDirection:n,flexWrap:!0===t?"wrap":t,justifyContent:i})},o))}function tB(e){var n=e.className,t=tA(e,["className"]);return(0,a.jsx)("div",tS({className:(0,g.Ly)([n,tP(t)])},tE(t)))}function tz(e){var n,t=e.style,r=e.grow,i=e.order,o=e.shrink,l=e.basis,a=e.align,c=tA(e,["style","grow","order","shrink","basis","align"]),s=null!=(n=null!=l?l:e.width)?n:void 0!==r?0:void 0;return(0,j.Fl)(tS({style:tO(tS({},t),{alignSelf:a,flexBasis:(0,j.zA)(s),flexGrow:void 0!==r&&Number(r),flexShrink:void 0!==o&&Number(o),order:i})},c))}function tT(e){var n,t,r=e.asset,i=e.assetSize,o=e.base64,l=e.buttons,c=e.buttonsAlt,s=e.children,u=e.className,d=e.color,f=e.disabled,h=e.dmFallback,m=e.dmIcon,p=e.dmIconState,x=e.fluid,b=e.fallbackIcon,y=e.imageSize,v=void 0===y?64:y,w=e.imageSrc,k=e.onClick,_=e.onRightClick,C=e.selected,I=e.title,S=e.tooltip,O=e.tooltipPosition,A=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["asset","assetSize","base64","buttons","buttonsAlt","children","className","color","disabled","dmFallback","dmIcon","dmIconState","fluid","fallbackIcon","imageSize","imageSrc","onClick","onRightClick","selected","title","tooltip","tooltipPosition"]),P=(0,a.jsxs)("div",{className:"ImageButton__container",onClick:function(e){!f&&k&&k(e)},onContextMenu:function(e){e.preventDefault(),!f&&_&&_(e)},onKeyDown:function(e){"Enter"===e.key&&!f&&k&&k(e)},style:{width:x?"auto":"calc(".concat(v,"px + 0.5em + 2px)")},tabIndex:f?void 0:0,children:[(0,a.jsx)("div",{className:"ImageButton__image",children:o||w?(0,a.jsx)(tj,{height:"".concat(v,"px"),src:o?"data:image/png;base64,".concat(o):w,width:"".concat(v,"px")}):m&&p?(0,a.jsx)(tb,{fallback:h||(0,a.jsx)(tN,{icon:"spinner",size:v,spin:!0}),height:"".concat(v,"px"),icon:m,icon_state:p,width:"".concat(v,"px")}):r?(0,a.jsx)(tj,{className:(0,g.Ly)(r||[]),height:"".concat(v,"px"),style:{transform:"scale(".concat(v/(void 0===i?32:i),")"),transformOrigin:"top left"},width:"".concat(v,"px")}):(0,a.jsx)(tN,{icon:b||"question",size:v})}),x&&(I||s)?(0,a.jsxs)("div",{className:"ImageButton__content",children:[I&&(0,a.jsx)("span",{className:(0,g.Ly)(["ImageButton__content--title",!!s&&"ImageButton__content--divider"]),children:I}),s&&(0,a.jsx)("span",{className:"ImageButton__content--text",children:s})]}):s&&(0,a.jsx)("span",{className:"ImageButton__content",children:s})]});return S&&(P=(0,a.jsx)(nY,{content:S,position:O,children:P})),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","value","minValue","maxValue","color","ranges","empty","children","fractionDigits"]),h=(0,c.hs)(t,void 0===r?0:r,void 0===i?1:i),m=void 0!==u,p=o||(0,c.TG)(t,void 0===l?{}:l)||"default",x=(0,j.Fl)(f),b=["ProgressBar",n,(0,j.WP)(f)],y={width:"".concat(100*(0,c.J$)(h),"%")};return tR.NE.includes(p)||"default"===p?b.push("ProgressBar--color--".concat(p)):(x.style=tD(t$({},x.style),{borderColor:p}),y.backgroundColor=p),(0,a.jsxs)("div",tD(t$({className:(0,g.Ly)(b)},x),{children:[(0,a.jsx)("div",{className:"ProgressBar__fill ProgressBar__fill--animated",style:y}),(0,a.jsx)("div",{className:"ProgressBar__content",children:m?u:!s&&"".concat((100*h).toFixed(void 0===d?0:d),"%")})]}))}function tL(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tJ(e){var n=e.className,t=e.vertical,r=e.fill,i=e.reverse,o=e.zebra,l=tK(e,["className","vertical","fill","reverse","zebra"]);return(0,a.jsx)("div",tL({className:(0,g.Ly)(["Stack",r&&"Stack--fill",t?"Stack--vertical":"Stack--horizontal",o&&"Stack--zebra",i&&"Stack--reverse".concat(t?"--vertical":""),n,tP(e)])},tE(tL({direction:"".concat(t?"column":"row").concat(i?"-reverse":"")},l))))}function tX(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","value"]),O=(0,s.useRef)(null),A=null!=k?k:O,P=(n=(0,s.useState)(null!=I?I:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tX(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tX(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=P[0],B=P[1];(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=A.current)||e.focus(),o&&(null==(n=A.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){A.current&&document.activeElement!==A.current&&I!==E&&B(null!=I?I:"")},[I]);var z=(0,j.Fl)(S),T=(0,g.Ly)(["Input",c&&"Input--disabled",d&&"Input--fluid",h&&"Input--monospace",(0,j.WP)(S),l]);return(0,a.jsx)("input",(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unclamped","unit","value","bipolar","popupPosition","className","color","fillValue","ranges","size","style"]);return(0,a.jsx)(tk,{dragMatrix:[0,-1],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unclamped:d,unit:f,value:h,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.handleDragStart,d=e.inputElement,f=(0,c.hs)(null!=y?y:l,o,i),v=(0,c.hs)(l,o,i),k=b||(0,c.TG)(null!=y?y:h,w)||"default",S=Math.min((v-.5)*270,225);return(0,a.jsx)(nQ,{content:r,contentClasses:"Knob__popupValue",handleOpen:s,placement:p||"top",preventPortal:!0,children:(0,a.jsxs)("div",(n=tV({className:(0,g.Ly)(["Knob","Knob--color--".concat(k),m&&"Knob--bipolar",x,(0,j.WP)(I)])},(0,j.Fl)(tV({style:tV({fontSize:"".concat(_,"em")},C)},I))),t=t={onMouseDown:u,children:[(0,a.jsx)("div",{className:"Knob__circle",children:(0,a.jsx)("div",{className:"Knob__cursorBox",style:{transform:"rotate(".concat(S,"deg)")},children:(0,a.jsx)("div",{className:"Knob__cursor"})})}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringTrackPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("circle",{className:"Knob__ringTrack",cx:"50",cy:"50",r:"50"}),(0,a.jsx)("title",{children:"track"})]}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringFillPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("title",{children:"fill"}),(0,a.jsx)("circle",{className:"Knob__ringFill",cx:"50",cy:"50",r:"50",style:{strokeDashoffset:Math.max(((m?2.75:2)-1.5*f)*Math.PI*50,0)}})]}),d]},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))})}})}function tW(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tQ(e){var n=e.children,t=e.wrap,r=tG(e,["children","wrap"]);return(0,a.jsx)(tB,tq(tW({align:"stretch",justify:"space-between",mx:-.5,wrap:t},r),{children:n}))}function tY(e){var n=e.children;return(0,a.jsx)("table",{className:"LabeledList",children:(0,a.jsx)("tbody",{children:n})})}function tZ(e){var n,t,r=e.children,i=e.className,o=e.disabled,l=e.display,c=e.onClick,u=e.onMouseOver,d=(e.open,e.openWidth),f=(e.onOutsideClick,function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","className","disabled","display","onClick","onMouseOver","open","openWidth","onOutsideClick"])),h=(0,s.useRef)(null);return(0,a.jsx)(nQ,{allowedOutsideClasses:".Menubar_inner",content:(0,a.jsx)("div",{className:"MenuBar__menu",style:{width:d},children:r}),children:(0,a.jsx)("div",{className:"Menubar_inner",ref:h,children:(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children","onEnter","onEscape"]);return(0,a.jsx)(tp,{className:"Modal__dimmer",onKeyDown:function(e){e.key===w._.Enter&&(null==o||o(e)),(0,w.KL)(e.key)&&(null==l||l(e))},children:(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","color","info","success","danger"]);return(0,a.jsx)(y,function(e){for(var n=1;n=o?(t.currentValue=(0,c.qE)((0,c.LI)(u/o,0)*o,r,i),t.origin=n.screenY):Math.abs(a)>s&&(t.origin=n.screenY)}else Math.abs(a)>4&&(t.dragging=!0);return t})}),t8(e,"handleDragEnd",function(n){var t=e.state,r=t.dragging,i=t.currentValue,o=e.props,l=o.onChange;if(!o.disabled){if(document.body.style["pointer-events"]="auto",clearInterval(e.dragInterval),clearTimeout(e.dragTimeout),e.setState({dragging:!1,editing:!r,previousValue:i}),r)null==l||l(i);else if(e.inputRef){var a=e.inputRef.current;a&&(a.value="".concat(i),setTimeout(function(){a.focus(),a.select()},10))}document.removeEventListener("mousemove",e.handleDragMove),document.removeEventListener("mouseup",e.handleDragEnd)}}),t8(e,"handleBlur",function(n){var t=e.state,r=t.editing,i=t.previousValue,o=e.props,l=o.minValue,a=o.maxValue,s=o.onChange;if(!o.disabled&&r){var u=(0,c.qE)(Number.parseFloat(n.target.value),l,a);if(Number.isNaN(u))return void e.setState({editing:!1});e.setState({currentValue:u,editing:!1,previousValue:u}),i!==u&&(null==s||s(u))}}),t8(e,"handleKeyDown",function(n){var t=e.props,r=t.minValue,i=t.maxValue,o=t.onChange;if(!t.disabled){var l=e.state.previousValue;if(n.key===w._.Enter){var a=(0,c.qE)(Number.parseFloat(n.currentTarget.value),r,i);if(Number.isNaN(a))return void e.setState({editing:!1});e.setState({currentValue:a,editing:!1,previousValue:a}),l!==a&&(null==o||o(a))}else(0,w.KL)(n.key)&&e.setState({editing:!1})}}),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&t5(t,e),n=[{key:"componentDidMount",value:function(){var e=Number.parseFloat(this.props.value.toString());this.setState({currentValue:e,previousValue:e})}},{key:"render",value:function(){var e=this.state,n=e.dragging,t=e.editing,r=e.currentValue,i=this.props,o=i.className,l=i.fluid,s=i.animated,u=i.unit,d=i.value,f=i.minValue,m=i.maxValue,p=i.height,x=i.width,j=i.lineHeight,b=i.fontSize,v=i.format,w=Number.parseFloat(d.toString());n&&(w=r);var k=(0,a.jsxs)("div",{className:"NumberInput__content",children:[s&&!n?(0,a.jsx)(h,{format:v,value:w}):v?v(w):w,u?" ".concat(u):""]});return(0,a.jsxs)(y,{className:(0,g.Ly)(["NumberInput",l&&"NumberInput--fluid",o]),fontSize:b,lineHeight:j,minHeight:p,minWidth:x,onMouseDown:this.handleDragStart,children:[(0,a.jsx)("div",{className:"NumberInput__barContainer",children:(0,a.jsx)("div",{className:"NumberInput__bar",style:{height:"".concat((0,c.qE)((w-f)/(m-f)*100,0,100),"%")}})}),k,(0,a.jsx)("input",{className:"NumberInput__input",onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,ref:this.inputRef,style:{display:t?"inline":"none",fontSize:b,height:p,lineHeight:j}})]})}}],function(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["allowFloats","autoFocus","autoSelect","className","disabled","expensive","fluid","maxValue","minValue","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","onValidationChange","value"]),S=(0,s.useRef)(null),O=t9((0,s.useState)(null!=C?C:m),2),A=O[0],P=O[1],E=t9((0,s.useState)(!0),2),B=E[0],z=E[1];function T(e){b&&(u?re(function(){return b(e)}):b(e))}(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=S.current)||e.focus(),o&&(null==(n=S.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){if(S.current){var e=S.current.validity.valid;B!==e&&(z(e),null==_||_(e))}},[A]),(0,s.useEffect)(function(){S.current&&document.activeElement!==S.current&&C!==A&&P(null!=C?C:m)},[C]);var N=(0,j.Fl)(I),R=(0,g.Ly)(["Input","RestrictedInput",c&&"Input--disabled",d&&"Input--fluid",p&&"Input--monospace",(0,j.WP)(I),l,!B&&"RestrictedInput--invalid"]);return(0,a.jsx)("input",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["buttons","children","className","container_id","fill","fitted","flexGrow","noTopPadding","onScroll","ref","scrollable","scrollableHorizontal","stretchContents","title"]),w=(0,g.b5)(y)||(0,g.b5)(r),k=(0,s.useRef)(null),_=null!=m?m:k;return(0,s.useEffect)(function(){return _.current&&(p||x)&&(0,rt.tk)(_.current),function(){_.current&&(0,rt.WK)(_.current)}},[]),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unit","value","className","fillValue","color","ranges","children"]),w=void 0!==y;return(0,a.jsx)(tk,{dragMatrix:[1,0],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unit:d,value:f,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.editing,d=e.handleDragStart,x=e.inputElement,k=(0,c.J$)((0,c.hs)(null!=m?m:l,o,i)),_=(0,c.J$)((0,c.hs)(l,o,i)),C=p||(0,c.TG)(null!=m?m:f,b)||"default";return(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function ra(e){var n,t,r=e.className,i=e.collapsing,o=e.children,l=rl(e,["className","collapsing","children"]);return(0,a.jsx)("table",(n=ro({className:(0,g.Ly)(["Table",i&&"Table--collapsing",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:(0,a.jsx)("tbody",{children:o})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}function rc(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function rf(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return rc(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rc(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rh(e){var n=e.className,t=e.vertical,r=e.scrollable,i=e.fill,o=e.fluid,l=e.children,c=rd(e,["className","vertical","scrollable","fill","fluid","children"]),u=(0,s.useRef)(!0),d=(0,s.useRef)(null),f=(0,s.useRef)(null),h=rf((0,s.useState)(!1),2),m=h[0],p=h[1],x=rf((0,s.useState)(!1),2),b=x[0],y=x[1];function v(e){if(d.current){var n=d.current,t=.5*n.clientWidth;n.scrollBy({left:"left"===e?-t:t,behavior:"smooth"})}}(0,s.useEffect)(function(){var e=function(){p(i.scrollLeft>0),y(i.scrollLeft+i.clientWidthMath.abs(e.deltaX)&&(i.scrollLeft+=e.deltaY)};if(r&&!t&&d.current){var i=d.current;if(!(i.scrollWidthe.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","dontUseTabForIndent","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","userMarkup","value"]),P=(0,s.useRef)(null),E=null!=_?_:P,B=(n=(0,s.useState)(null!=O?O:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return rp(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rp(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),z=B[0],T=B[1];(0,s.useEffect)(function(){(i||o)&&setTimeout(function(){var e,n;null==(e=E.current)||e.focus(),o&&(null==(n=E.current)||n.select())},1)},[]),(0,s.useEffect)(function(){E.current&&document.activeElement!==E.current&&O!==z&&T(null!=O?O:"")},[O]);var N=(0,j.Fl)(A),R=(0,g.Ly)(["Input","TextArea",f&&"Input--fluid",m&&"Input--monospace",c&&"Input--disabled",(0,j.WP)(A),l]);return(0,a.jsx)("textarea",(t=function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/g,U=RegExp(J.source),F=RegExp(X.source),V=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y=/[\\^$.*+?()[\]{}|]/g,Z=RegExp(Y.source),ee=/^\s+/,en=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,er=/\{\n\/\* \[wrapped with (.+)\] \*/,ei=/,? & /,eo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,el=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,ec=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ed=/^0b[01]+$/i,ef=/^\[object .+?Constructor\]$/,eh=/^0o[0-7]+$/i,em=/^(?:0|[1-9]\d*)$/,ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ex=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ej="\ud800-\udfff",eb="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ey="\\u2700-\\u27bf",ev="a-z\\xdf-\\xf6\\xf8-\\xff",ew="A-Z\\xc0-\\xd6\\xd8-\\xde",ek="\\ufe0e\\ufe0f",e_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eC="['’]",eI="["+e_+"]",eS="["+eb+"]",eO="["+ev+"]",eA="[^"+ej+e_+"\\d+"+ey+ev+ew+"]",eP="\ud83c[\udffb-\udfff]",eE="[^"+ej+"]",eB="(?:\ud83c[\udde6-\uddff]){2}",ez="[\ud800-\udbff][\udc00-\udfff]",eT="["+ew+"]",eN="\\u200d",eR="(?:"+eO+"|"+eA+")",e$="(?:"+eT+"|"+eA+")",eD="(?:"+eC+"(?:d|ll|m|re|s|t|ve))?",eM="(?:"+eC+"(?:D|LL|M|RE|S|T|VE))?",eL="(?:"+eS+"|"+eP+")?",eK="["+ek+"]?",eJ="(?:"+eN+"(?:"+[eE,eB,ez].join("|")+")"+eK+eL+")*",eX=eK+eL+eJ,eU="(?:"+["["+ey+"]",eB,ez].join("|")+")"+eX,eF="(?:"+[eE+eS+"?",eS,eB,ez,"["+ej+"]"].join("|")+")",eV=RegExp(eC,"g"),eH=RegExp(eS,"g"),eW=RegExp(eP+"(?="+eP+")|"+eF+eX,"g"),eq=RegExp([eT+"?"+eO+"+"+eD+"(?="+[eI,eT,"$"].join("|")+")",e$+"+"+eM+"(?="+[eI,eT+eR,"$"].join("|")+")",eT+"?"+eR+"+"+eD,eT+"+"+eM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eU].join("|"),"g"),eG=RegExp("["+eN+ej+eb+ek+"]"),eQ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eZ=-1,e0={};e0[P]=e0[E]=e0[B]=e0[z]=e0[T]=e0[N]=e0[R]=e0[$]=e0[D]=!0,e0[f]=e0[h]=e0[O]=e0[m]=e0[A]=e0[p]=e0[x]=e0[g]=e0[b]=e0[y]=e0[v]=e0[k]=e0[_]=e0[C]=e0[S]=!1;var e1={};e1[f]=e1[h]=e1[O]=e1[A]=e1[m]=e1[p]=e1[P]=e1[E]=e1[B]=e1[z]=e1[T]=e1[b]=e1[y]=e1[v]=e1[k]=e1[_]=e1[C]=e1[I]=e1[N]=e1[R]=e1[$]=e1[D]=!0,e1[x]=e1[g]=e1[S]=!1;var e2={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e8=parseFloat,e3=parseInt,e5=(void 0===t.g?"undefined":i(t.g))=="object"&&t.g&&t.g.Object===Object&&t.g,e4=("undefined"==typeof self?"undefined":i(self))=="object"&&self&&self.Object===Object&&self,e6=e5||e4||Function("return this")(),e7="object"==i(n)&&n&&!n.nodeType&&n,e9=e7&&"object"==i(e)&&e&&!e.nodeType&&e,ne=e9&&e9.exports===e7,nn=ne&&e5.process,nt=function(){try{var e=e9&&e9.require&&e9.require("util").types;if(e)return e;return nn&&nn.binding&&nn.binding("util")}catch(e){}}(),nr=nt&&nt.isArrayBuffer,ni=nt&&nt.isDate,no=nt&&nt.isMap,nl=nt&&nt.isRegExp,na=nt&&nt.isSet,nc=nt&&nt.isTypedArray;function ns(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}function nu(e,n,t,r){for(var i=-1,o=null==e?0:e.length;++i-1}function np(e,n,t){for(var r=-1,i=null==e?0:e.length;++r-1;);return t}function nD(e,n){for(var t=e.length;t--&&n_(n,e[t],0)>-1;);return t}var nM=nA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nL=nA({"&":"&","<":"<",">":">",'"':""","'":"'"});function nK(e){return"\\"+e2[e]}function nJ(e){return eG.test(e)}function nX(e){var n=-1,t=Array(e.size);return e.forEach(function(e,r){t[++n]=[r,e]}),t}function nU(e,n){return function(t){return e(n(t))}}function nF(e,n){for(var t=-1,r=e.length,i=0,o=[];++t",""":'"',"'":"'"}),nQ=function e(n){var t,en,ej,eb,ey=(n=null==n?e6:nQ.defaults(e6.Object(),n,nQ.pick(e6,eY))).Array,ev=n.Date,ew=n.Error,ek=n.Function,e_=n.Math,eC=n.Object,eI=n.RegExp,eS=n.String,eO=n.TypeError,eA=ey.prototype,eP=ek.prototype,eE=eC.prototype,eB=n["__core-js_shared__"],ez=eP.toString,eT=eE.hasOwnProperty,eN=0,eR=(t=/[^.]+$/.exec(eB&&eB.keys&&eB.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",e$=eE.toString,eD=ez.call(eC),eM=e6._,eL=eI("^"+ez.call(eT).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eK=ne?n.Buffer:o,eJ=n.Symbol,eX=n.Uint8Array,eU=eK?eK.allocUnsafe:o,eF=nU(eC.getPrototypeOf,eC),eW=eC.create,eG=eE.propertyIsEnumerable,e2=eA.splice,e5=eJ?eJ.isConcatSpreadable:o,e4=eJ?eJ.iterator:o,e7=eJ?eJ.toStringTag:o,e9=function(){try{var e=ix(eC,"defineProperty");return e({},"",{}),e}catch(e){}}(),nn=n.clearTimeout!==e6.clearTimeout&&n.clearTimeout,nt=ev&&ev.now!==e6.Date.now&&ev.now,nv=n.setTimeout!==e6.setTimeout&&n.setTimeout,nA=e_.ceil,nY=e_.floor,nZ=eC.getOwnPropertySymbols,n0=eK?eK.isBuffer:o,n1=n.isFinite,n2=eA.join,n8=nU(eC.keys,eC),n3=e_.max,n5=e_.min,n4=ev.now,n6=n.parseInt,n7=e_.random,n9=eA.reverse,te=ix(n,"DataView"),tn=ix(n,"Map"),tt=ix(n,"Promise"),tr=ix(n,"Set"),ti=ix(n,"WeakMap"),to=ix(eC,"create"),tl=ti&&new ti,ta={},tc=iK(te),ts=iK(tn),tu=iK(tt),td=iK(tr),tf=iK(ti),th=eJ?eJ.prototype:o,tm=th?th.valueOf:o,tp=th?th.toString:o;function tx(e){if(oG(e)&&!oM(e)&&!r(e,ty)){if(r(e,tb))return e;if(eT.call(e,"__wrapped__"))return iJ(e)}return new tb(e)}var tg=function(){function e(){}return function(n){if(!oq(n))return{};if(eW)return eW(n);e.prototype=n;var t=new e;return e.prototype=o,t}}();function tj(){}function tb(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}function ty(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function tv(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1},tw.prototype.set=function(e,n){var t=this.__data__,r=tP(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this},tk.prototype.clear=function(){this.size=0,this.__data__={hash:new tv,map:new(tn||tw),string:new tv}},tk.prototype.delete=function(e){var n=im(this,e).delete(e);return this.size-=!!n,n},tk.prototype.get=function(e){return im(this,e).get(e)},tk.prototype.has=function(e){return im(this,e).has(e)},tk.prototype.set=function(e,n){var t=im(this,e),r=t.size;return t.set(e,n),this.size+=+(t.size!=r),this},t_.prototype.add=t_.prototype.push=function(e){return this.__data__.set(e,a),this},t_.prototype.has=function(e){return this.__data__.has(e)};function tO(e,n,t){(o===t||oN(e[n],t))&&(o!==t||n in e)||tz(e,n,t)}function tA(e,n,t){var r=e[n];eT.call(e,n)&&oN(r,t)&&(o!==t||n in e)||tz(e,n,t)}function tP(e,n){for(var t=e.length;t--;)if(oN(e[t][0],n))return t;return -1}function tE(e,n,t,r){return tL(e,function(e,i,o){n(r,e,t(e),o)}),r}function tB(e,n){return e&&rX(n,lx(n),e)}function tz(e,n,t){"__proto__"==n&&e9?e9(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t}function tT(e,n){for(var t=-1,r=n.length,i=ey(r),l=null==e;++t=n?e:n)),e}function tR(e,n,t,r,i,l){var a,c=1&n,s=2&n,u=4&n;if(t&&(a=i?t(e,r,i,l):t(e)),o!==a)return a;if(!oq(e))return e;var d=oM(e);if(d){if(x=(h=e).length,w=new h.constructor(x),x&&"string"==typeof h[0]&&eT.call(h,"index")&&(w.index=h.index,w.input=h.input),a=w,!c)return rJ(e,a)}else{var h,x,w,S,M,L,K,J,X=ib(e),U=X==g||X==j;if(oX(e))return rR(e,c);if(X==v||X==f||U&&!i){if(a=s||U?{}:iv(e),!c){return s?(S=e,M=(J=a)&&rX(e,lg(e),J),rX(S,ij(S),M)):(L=e,K=tB(a,e),rX(L,ig(L),K))}}else{if(!e1[X])return i?e:{};a=function(e,n,t){var r,i,o=e.constructor;switch(n){case O:return r$(e);case m:case p:return new o(+e);case A:return r=t?r$(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case P:case E:case B:case z:case T:case N:case R:case $:case D:return rD(e,t);case b:return new o;case y:case C:return new o(e);case k:return(i=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,i;case _:return new o;case I:return tm?eC(tm.call(e)):{}}}(e,X,c)}}l||(l=new tC);var F=l.get(e);if(F)return F;l.set(e,a),o1(e)?e.forEach(function(r){a.add(tR(r,n,t,r,e,l))}):oQ(e)&&e.forEach(function(r,i){a.set(i,tR(r,n,t,i,e,l))});var V=u?s?ic:ia:s?lg:lx,H=d?o:V(e);return nd(H||e,function(r,i){H&&(r=e[i=r]),tA(a,i,tR(r,n,t,i,e,l))}),a}function t$(e,n,t){var r=t.length;if(null==e)return!r;for(e=eC(e);r--;){var i=t[r],l=n[i],a=e[i];if(o===a&&!(i in e)||!l(a))return!1}return!0}function tD(e,n,t){if("function"!=typeof e)throw new eO(l);return iT(function(){e.apply(o,t)},n)}function tM(e,n,t,r){var i=-1,o=nm,l=!0,a=e.length,c=[],s=n.length;if(!a)return c;t&&(n=nx(n,nT(t))),r?(o=np,l=!1):n.length>=200&&(o=nR,l=!1,n=new t_(n));t:for(;++i0&&t(a)?n>1?tF(a,n-1,t,r,i):ng(i,a):r||(i[i.length]=a)}return i}var tV=rH(),tH=rH(!0);function tW(e,n){return e&&tV(e,n,lx)}function tq(e,n){return e&&tH(e,n,lx)}function tG(e,n){return nh(n,function(n){return oV(e[n])})}function tQ(e,n){n=rz(n,e);for(var t=0,r=n.length;null!=e&&tn}function t1(e,n){return null!=e&&eT.call(e,n)}function t2(e,n){return null!=e&&n in eC(e)}function t8(e,n,t){for(var r=t?np:nm,i=e[0].length,l=e.length,a=l,c=ey(l),s=1/0,u=[];a--;){var d=e[a];a&&n&&(d=nx(d,nT(n))),s=n5(d.length,s),c[a]=!t&&(n||i>=120&&d.length>=120)?new t_(a&&d):o}d=e[0];var f=-1,h=c[0];t:for(;++f=a)return c;return c*("desc"==t[r]?-1:1)}}return e.index-n.index}(e,n,t)});o--;)i[o]=i[o].value;return i}function rc(e,n,t){for(var r=-1,i=n.length,o={};++r-1;)a!==e&&e2.call(a,c,1),e2.call(e,c,1);return e}function ru(e,n){for(var t=e?n.length:0,r=t-1;t--;){var i=n[t];if(t==r||i!==o){var o=i;ik(i)?e2.call(e,i,1):rC(e,i)}}return e}function rd(e,n){return e+nY(n7()*(n-e+1))}function rf(e,n){var t="";if(!e||n<1||n>0x1fffffffffffff)return t;do n%2&&(t+=e),(n=nY(n/2))&&(e+=e);while(n);return t}function rh(e,n){return iN(iP(e,n,lJ),e+"")}function rm(e,n,t,r){if(!oq(e))return e;n=rz(n,e);for(var i=-1,l=n.length,a=l-1,c=e;null!=c&&++ii?0:i+n),(t=t>i?i:t)<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var o=ey(i);++r>>1,l=e[o];null!==l&&!o8(l)&&(t?l<=n:l=200){var s=n?null:r7(e);if(s)return nV(s);l=!1,i=nR,c=new t_}else c=n?[]:a;t:for(;++r=r?e:rg(e,n,t)}var rN=nn||function(e){return e6.clearTimeout(e)};function rR(e,n){if(n)return e.slice();var t=e.length,r=eU?eU(t):new e.constructor(t);return e.copy(r),r}function r$(e){var n=new e.constructor(e.byteLength);return new eX(n).set(new eX(e)),n}function rD(e,n){var t=n?r$(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function rM(e,n){if(e!==n){var t=o!==e,r=null===e,i=e==e,l=o8(e),a=o!==n,c=null===n,s=n==n,u=o8(n);if(!c&&!u&&!l&&e>n||l&&a&&s&&!c&&!u||r&&a&&s||!t&&s||!i)return 1;if(!r&&!l&&!u&&e1?t[i-1]:o,a=i>2?t[2]:o;for(l=e.length>3&&"function"==typeof l?(i--,l):o,a&&i_(t[0],t[1],a)&&(l=i<3?o:l,i=1),n=eC(n);++r-1?i[l?n[a]:a]:o}}function rY(e){return il(function(n){var t=n.length,r=t,i=tb.prototype.thru;for(e&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new eO(l);if(i&&!c&&"wrapper"==iu(a))var c=new tb([],!0)}for(r=c?r:t;++r1&&y.reverse(),f&&uc))return!1;var u=l.get(e),d=l.get(n);if(u&&d)return u==n&&d==e;var f=-1,h=!0,m=2&t?new t_:o;for(l.set(e,n),l.set(n,e);++f-1&&e%1==0&&e1?"& ":"")+n[r],n=n.join(t>2?", ":" "),e.replace(et,"{\n/* [wrapped with "+n+"] */\n")}(l,(r=(o=l.match(er))?o[1].split(ei):[],i=t,nd(d,function(e){var n="_."+e[0];i&e[1]&&!nm(r,n)&&r.push(n)}),r.sort())))}function i$(e){var n=0,t=0;return function(){var r=n4(),i=16-(r-t);if(t=r,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(o,arguments)}}function iD(e,n){var t=-1,r=e.length,i=r-1;for(n=o===n?r:n;++t1?e[n-1]:o;return t="function"==typeof t?(e.pop(),t):o,i7(e,t)});function oo(e){var n=tx(e);return n.__chain__=!0,n}function ol(e,n){return n(e)}var oa=il(function(e){var n=e.length,t=n?e[0]:0,i=this.__wrapped__,l=function(n){return tT(n,e)};return n>1||this.__actions__.length||!r(i,ty)||!ik(t)?this.thru(l):((i=i.slice(t,+t+ +!!n)).__actions__.push({func:ol,args:[l],thisArg:o}),new tb(i,this.__chain__).thru(function(e){return n&&!e.length&&e.push(o),e}))}),oc=rU(function(e,n,t){eT.call(e,t)?++e[t]:tz(e,t,1)}),os=rQ(iV),ou=rQ(iH);function od(e,n){return(oM(e)?nd:tL)(e,ih(n,3))}function of(e,n){return(oM(e)?function(e,n){for(var t=null==e?0:e.length;t--&&!1!==n(e[t],t,e););return e}:tK)(e,ih(n,3))}var oh=rU(function(e,n,t){eT.call(e,t)?e[t].push(n):tz(e,t,[n])}),om=rh(function(e,n,t){var r=-1,i="function"==typeof n,o=oK(e)?ey(e.length):[];return tL(e,function(e){o[++r]=i?ns(n,e,t):t3(e,n,t)}),o}),op=rU(function(e,n,t){tz(e,t,n)});function ox(e,n){return(oM(e)?nx:rt)(e,ih(n,3))}var og=rU(function(e,n,t){e[+!t].push(n)},function(){return[[],[]]}),oj=rh(function(e,n){if(null==e)return[];var t=n.length;return t>1&&i_(e,n[0],n[1])?n=[]:t>2&&i_(n[0],n[1],n[2])&&(n=[n[0]]),ra(e,tF(n,1),[])}),ob=nt||function(){return e6.Date.now()};function oy(e,n,t){return n=t?o:n,n=e&&null==n?e.length:n,ie(e,128,o,o,o,o,n)}function ov(e,n){var t;if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=o),t}}var ow=rh(function(e,n,t){var r=1;if(t.length){var i=nF(t,id(ow));r|=32}return ie(e,r,n,t,i)}),ok=rh(function(e,n,t){var r=3;if(t.length){var i=nF(t,id(ok));r|=32}return ie(n,r,e,t,i)});function o_(e,n,t){n=t?o:n;var r=ie(e,8,o,o,o,o,o,n);return r.placeholder=o_.placeholder,r}function oC(e,n,t){n=t?o:n;var r=ie(e,16,o,o,o,o,o,n);return r.placeholder=oC.placeholder,r}function oI(e,n,t){var r,i,a,c,s,u,d=0,f=!1,h=!1,m=!0;if("function"!=typeof e)throw new eO(l);function p(n){var t=r,l=i;return r=i=o,d=n,c=e.apply(l,t)}function x(e){var t=e-u,r=e-d;return o===u||t>=n||t<0||h&&r>=a}function g(){var e,t,r,i=ob();if(x(i))return j(i);s=iT(g,(e=i-u,t=i-d,r=n-e,h?n5(r,a-t):r))}function j(e){return(s=o,m&&r)?p(e):(r=i=o,c)}function b(){var e,t=ob(),l=x(t);if(r=arguments,i=this,u=t,l){if(o===s)return d=e=u,s=iT(g,n),f?p(e):c;if(h)return rN(s),s=iT(g,n),p(u)}return o===s&&(s=iT(g,n)),c}return n=ln(n)||0,oq(t)&&(f=!!t.leading,a=(h="maxWait"in t)?n3(ln(t.maxWait)||0,n):a,m="trailing"in t?!!t.trailing:m),b.cancel=function(){o!==s&&rN(s),d=0,r=u=i=s=o},b.flush=function(){return o===s?c:j(ob())},b}var oS=rh(function(e,n){return tD(e,1,n)}),oO=rh(function(e,n,t){return tD(e,ln(n)||0,t)});function oA(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new eO(l);var t=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return t.cache=o.set(i,l)||o,l};return t.cache=new(oA.Cache||tk),t}function oP(e){if("function"!=typeof e)throw new eO(l);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}oA.Cache=tk;var oE=rh(function(e,n){var t=(n=1==n.length&&oM(n[0])?nx(n[0],nT(ih())):nx(tF(n,1),nT(ih()))).length;return rh(function(r){for(var i=-1,o=n5(r.length,t);++i=n}),oD=t5(function(){return arguments}())?t5:function(e){return oG(e)&&eT.call(e,"callee")&&!eG.call(e,"callee")},oM=ey.isArray,oL=nr?nT(nr):function(e){return oG(e)&&tZ(e)==O};function oK(e){return null!=e&&oW(e.length)&&!oV(e)}function oJ(e){return oG(e)&&oK(e)}var oX=n0||l1,oU=ni?nT(ni):function(e){return oG(e)&&tZ(e)==p};function oF(e){if(!oG(e))return!1;var n=tZ(e);return n==x||"[object DOMException]"==n||"string"==typeof e.message&&"string"==typeof e.name&&!oZ(e)}function oV(e){if(!oq(e))return!1;var n=tZ(e);return n==g||n==j||"[object AsyncFunction]"==n||"[object Proxy]"==n}function oH(e){return"number"==typeof e&&e==o9(e)}function oW(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function oq(e){var n=void 0===e?"undefined":i(e);return null!=e&&("object"==n||"function"==n)}function oG(e){return null!=e&&(void 0===e?"undefined":i(e))=="object"}var oQ=no?nT(no):function(e){return oG(e)&&ib(e)==b};function oY(e){return"number"==typeof e||oG(e)&&tZ(e)==y}function oZ(e){if(!oG(e)||tZ(e)!=v)return!1;var n=eF(e);if(null===n)return!0;var t=eT.call(n,"constructor")&&n.constructor;return"function"==typeof t&&r(t,t)&&ez.call(t)==eD}var o0=nl?nT(nl):function(e){return oG(e)&&tZ(e)==k},o1=na?nT(na):function(e){return oG(e)&&ib(e)==_};function o2(e){return"string"==typeof e||!oM(e)&&oG(e)&&tZ(e)==C}function o8(e){return(void 0===e?"undefined":i(e))=="symbol"||oG(e)&&tZ(e)==I}var o3=nc?nT(nc):function(e){return oG(e)&&oW(e.length)&&!!e0[tZ(e)]},o5=r5(rn),o4=r5(function(e,n){return e<=n});function o6(e){if(!e)return[];if(oK(e))return o2(e)?nW(e):rJ(e);if(e4&&e[e4]){for(var n,t=e[e4](),r=[];!(n=t.next()).done;)r.push(n.value);return r}var i=ib(e);return(i==b?nX:i==_?nV:lC)(e)}function o7(e){return e?(e=ln(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function o9(e){var n=o7(e),t=n%1;return n==n?t?n-t:n:0}function le(e){return e?tN(o9(e),0,0xffffffff):0}function ln(e){if("number"==typeof e)return e;if(o8(e))return u;if(oq(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=oq(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=nz(e);var t=ed.test(e);return t||eh.test(e)?e3(e.slice(2),t?2:8):eu.test(e)?u:+e}function lt(e){return rX(e,lg(e))}function lr(e){return null==e?"":rk(e)}var li=rF(function(e,n){if(iO(n)||oK(n))return void rX(n,lx(n),e);for(var t in n)eT.call(n,t)&&tA(e,t,n[t])}),lo=rF(function(e,n){rX(n,lg(n),e)}),ll=rF(function(e,n,t,r){rX(n,lg(n),e,r)}),la=rF(function(e,n,t,r){rX(n,lx(n),e,r)}),lc=il(tT),ls=rh(function(e,n){e=eC(e);var t=-1,r=n.length,i=r>2?n[2]:o;for(i&&i_(n[0],n[1],i)&&(r=1);++t1),n}),rX(e,ic(e),t),r&&(t=tR(t,7,ii));for(var i=n.length;i--;)rC(t,n[i]);return t}),lv=il(function(e,n){return null==e?{}:rc(e,n,function(n,t){return lf(e,t)})});function lw(e,n){if(null==e)return{};var t=nx(ic(e),function(e){return[e]});return n=ih(n),rc(e,t,function(e,t){return n(e,t[0])})}var lk=r9(lx),l_=r9(lg);function lC(e){return null==e?[]:nN(e,lx(e))}var lI=rq(function(e,n,t){return n=n.toLowerCase(),e+(t?lS(n):n)});function lS(e){return lN(lr(e).toLowerCase())}function lO(e){return(e=lr(e))&&e.replace(ep,nM).replace(eH,"")}var lA=rq(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),lP=rq(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),lE=rW("toLowerCase"),lB=rq(function(e,n,t){return e+(t?"_":"")+n.toLowerCase()}),lz=rq(function(e,n,t){return e+(t?" ":"")+lN(n)}),lT=rq(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),lN=rW("toUpperCase");function lR(e,n,t){if(e=lr(e),n=t?o:n,o===n){var r;return(r=e,eQ.test(r))?e.match(eq)||[]:e.match(eo)||[]}return e.match(n)||[]}var l$=rh(function(e,n){try{return ns(e,o,n)}catch(e){return oF(e)?e:new ew(e)}}),lD=il(function(e,n){return nd(n,function(n){tz(e,n=iL(n),ow(e[n],e))}),e});function lM(e){return function(){return e}}var lL=rY(),lK=rY(!0);function lJ(e){return e}function lX(e){return t9("function"==typeof e?e:tR(e,1))}var lU=rh(function(e,n){return function(t){return t3(t,e,n)}}),lF=rh(function(e,n){return function(t){return t3(e,t,n)}});function lV(e,n,t){var r=lx(n),i=tG(n,r);null!=t||oq(n)&&(i.length||!r.length)||(t=n,n=e,e=this,i=tG(n,lx(n)));var o=!(oq(t)&&"chain"in t)||!!t.chain,l=oV(e);return nd(i,function(t){var r=n[t];e[t]=r,l&&(e.prototype[t]=function(){var n=this.__chain__;if(o||n){var t=e(this.__wrapped__);return(t.__actions__=rJ(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t}return r.apply(e,ng([this.value()],arguments))})}),e}function lH(){}var lW=r2(nx),lq=r2(nf),lG=r2(ny);function lQ(e){return iC(e)?nO(iL(e)):function(n){return tQ(n,e)}}var lY=r3(),lZ=r3(!0);function l0(){return[]}function l1(){return!1}var l2=r1(function(e,n){return e+n},0),l8=r6("ceil"),l3=r1(function(e,n){return e/n},1),l5=r6("floor"),l4=r1(function(e,n){return e*n},1),l6=r6("round"),l7=r1(function(e,n){return e-n},0);return tx.after=function(e,n){if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){if(--e<1)return n.apply(this,arguments)}},tx.ary=oy,tx.assign=li,tx.assignIn=lo,tx.assignInWith=ll,tx.assignWith=la,tx.at=lc,tx.before=ov,tx.bind=ow,tx.bindAll=lD,tx.bindKey=ok,tx.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oM(e)?e:[e]},tx.chain=oo,tx.chunk=function(e,n,t){n=(t?i_(e,n,t):o===n)?1:n3(o9(n),0);var r=null==e?0:e.length;if(!r||n<1)return[];for(var i=0,l=0,a=ey(nA(r/n));ic?0:c+l),(a=o===a||a>c?c:o9(a))<0&&(a+=c),a=l>a?0:le(a);l>>0)?(e=lr(e))&&("string"==typeof n||null!=n&&!o0(n))&&!(n=rk(n))&&nJ(e)?rT(nW(e),0,t):e.split(n,t):[]},tx.spread=function(e,n){if("function"!=typeof e)throw new eO(l);return n=null==n?0:n3(o9(n),0),rh(function(t){var r=t[n],i=rT(t,0,n);return r&&ng(i,r),ns(e,this,i)})},tx.tail=function(e){var n=null==e?0:e.length;return n?rg(e,1,n):[]},tx.take=function(e,n,t){return e&&e.length?rg(e,0,(n=t||o===n?1:o9(n))<0?0:n):[]},tx.takeRight=function(e,n,t){var r=null==e?0:e.length;return r?rg(e,(n=r-(n=t||o===n?1:o9(n)))<0?0:n,r):[]},tx.takeRightWhile=function(e,n){return e&&e.length?rS(e,ih(n,3),!1,!0):[]},tx.takeWhile=function(e,n){return e&&e.length?rS(e,ih(n,3)):[]},tx.tap=function(e,n){return n(e),e},tx.throttle=function(e,n,t){var r=!0,i=!0;if("function"!=typeof e)throw new eO(l);return oq(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),oI(e,n,{leading:r,maxWait:n,trailing:i})},tx.thru=ol,tx.toArray=o6,tx.toPairs=lk,tx.toPairsIn=l_,tx.toPath=function(e){return oM(e)?nx(e,iL):o8(e)?[e]:rJ(iM(lr(e)))},tx.toPlainObject=lt,tx.transform=function(e,n,t){var r=oM(e),i=r||oX(e)||o3(e);if(n=ih(n,4),null==t){var o=e&&e.constructor;t=i?r?new o:[]:oq(e)&&oV(o)?tg(eF(e)):{}}return(i?nd:tW)(e,function(e,r,i){return n(t,e,r,i)}),t},tx.unary=function(e){return oy(e,1)},tx.union=i3,tx.unionBy=i5,tx.unionWith=i4,tx.uniq=function(e){return e&&e.length?r_(e):[]},tx.uniqBy=function(e,n){return e&&e.length?r_(e,ih(n,2)):[]},tx.uniqWith=function(e,n){return n="function"==typeof n?n:o,e&&e.length?r_(e,o,n):[]},tx.unset=function(e,n){return null==e||rC(e,n)},tx.unzip=i6,tx.unzipWith=i7,tx.update=function(e,n,t){return null==e?e:rI(e,n,rB(t))},tx.updateWith=function(e,n,t,r){return r="function"==typeof r?r:o,null==e?e:rI(e,n,rB(t),r)},tx.values=lC,tx.valuesIn=function(e){return null==e?[]:nN(e,lg(e))},tx.without=i9,tx.words=lR,tx.wrap=function(e,n){return oB(rB(n),e)},tx.xor=oe,tx.xorBy=on,tx.xorWith=ot,tx.zip=or,tx.zipObject=function(e,n){return rP(e||[],n||[],tA)},tx.zipObjectDeep=function(e,n){return rP(e||[],n||[],rm)},tx.zipWith=oi,tx.entries=lk,tx.entriesIn=l_,tx.extend=lo,tx.extendWith=ll,lV(tx,tx),tx.add=l2,tx.attempt=l$,tx.camelCase=lI,tx.capitalize=lS,tx.ceil=l8,tx.clamp=function(e,n,t){return o===t&&(t=n,n=o),o!==t&&(t=(t=ln(t))==t?t:0),o!==n&&(n=(n=ln(n))==n?n:0),tN(ln(e),n,t)},tx.clone=function(e){return tR(e,4)},tx.cloneDeep=function(e){return tR(e,5)},tx.cloneDeepWith=function(e,n){return tR(e,5,n="function"==typeof n?n:o)},tx.cloneWith=function(e,n){return tR(e,4,n="function"==typeof n?n:o)},tx.conformsTo=function(e,n){return null==n||t$(e,n,lx(n))},tx.deburr=lO,tx.defaultTo=function(e,n){return null==e||e!=e?n:e},tx.divide=l3,tx.endsWith=function(e,n,t){e=lr(e),n=rk(n);var r=e.length,i=t=o===t?r:tN(o9(t),0,r);return(t-=n.length)>=0&&e.slice(t,i)==n},tx.eq=oN,tx.escape=function(e){return(e=lr(e))&&F.test(e)?e.replace(X,nL):e},tx.escapeRegExp=function(e){return(e=lr(e))&&Z.test(e)?e.replace(Y,"\\$&"):e},tx.every=function(e,n,t){var r=oM(e)?nf:tJ;return t&&i_(e,n,t)&&(n=o),r(e,ih(n,3))},tx.find=os,tx.findIndex=iV,tx.findKey=function(e,n){return nw(e,ih(n,3),tW)},tx.findLast=ou,tx.findLastIndex=iH,tx.findLastKey=function(e,n){return nw(e,ih(n,3),tq)},tx.floor=l5,tx.forEach=od,tx.forEachRight=of,tx.forIn=function(e,n){return null==e?e:tV(e,ih(n,3),lg)},tx.forInRight=function(e,n){return null==e?e:tH(e,ih(n,3),lg)},tx.forOwn=function(e,n){return e&&tW(e,ih(n,3))},tx.forOwnRight=function(e,n){return e&&tq(e,ih(n,3))},tx.get=ld,tx.gt=oR,tx.gte=o$,tx.has=function(e,n){return null!=e&&iy(e,n,t1)},tx.hasIn=lf,tx.head=iq,tx.identity=lJ,tx.includes=function(e,n,t,r){e=oK(e)?e:lC(e),t=t&&!r?o9(t):0;var i=e.length;return t<0&&(t=n3(i+t,0)),o2(e)?t<=i&&e.indexOf(n,t)>-1:!!i&&n_(e,n,t)>-1},tx.indexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=null==t?0:o9(t);return i<0&&(i=n3(r+i,0)),n_(e,n,i)},tx.inRange=function(e,n,t){var r,i,l;return n=o7(n),o===t?(t=n,n=0):t=o7(t),(r=e=ln(e))>=n5(i=n,l=t)&&r=-0x1fffffffffffff&&e<=0x1fffffffffffff},tx.isSet=o1,tx.isString=o2,tx.isSymbol=o8,tx.isTypedArray=o3,tx.isUndefined=function(e){return o===e},tx.isWeakMap=function(e){return oG(e)&&ib(e)==S},tx.isWeakSet=function(e){return oG(e)&&"[object WeakSet]"==tZ(e)},tx.join=function(e,n){return null==e?"":n2.call(e,n)},tx.kebabCase=lA,tx.last=iZ,tx.lastIndexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=r;return o!==t&&(i=(i=o9(t))<0?n3(r+i,0):n5(i,r-1)),n==n?function(e,n,t){for(var r=t+1;r--&&e[r]!==n;);return r}(e,n,i):nk(e,nI,i,!0)},tx.lowerCase=lP,tx.lowerFirst=lE,tx.lt=o5,tx.lte=o4,tx.max=function(e){return e&&e.length?tX(e,lJ,t0):o},tx.maxBy=function(e,n){return e&&e.length?tX(e,ih(n,2),t0):o},tx.mean=function(e){return nS(e,lJ)},tx.meanBy=function(e,n){return nS(e,ih(n,2))},tx.min=function(e){return e&&e.length?tX(e,lJ,rn):o},tx.minBy=function(e,n){return e&&e.length?tX(e,ih(n,2),rn):o},tx.stubArray=l0,tx.stubFalse=l1,tx.stubObject=function(){return{}},tx.stubString=function(){return""},tx.stubTrue=function(){return!0},tx.multiply=l4,tx.nth=function(e,n){return e&&e.length?rl(e,o9(n)):o},tx.noConflict=function(){return e6._===this&&(e6._=eM),this},tx.noop=lH,tx.now=ob,tx.pad=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;if(!n||r>=n)return e;var i=(n-r)/2;return r8(nY(i),t)+e+r8(nA(i),t)},tx.padEnd=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;return n&&rn){var r=e;e=n,n=r}if(t||e%1||n%1){var i=n7();return n5(e+i*(n-e+e8("1e-"+((i+"").length-1))),n)}return rd(e,n)},tx.reduce=function(e,n,t){var r=oM(e)?nj:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tL)},tx.reduceRight=function(e,n,t){var r=oM(e)?nb:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tK)},tx.repeat=function(e,n,t){return n=(t?i_(e,n,t):o===n)?1:o9(n),rf(lr(e),n)},tx.replace=function(){var e=arguments,n=lr(e[0]);return e.length<3?n:n.replace(e[1],e[2])},tx.result=function(e,n,t){n=rz(n,e);var r=-1,i=n.length;for(i||(i=1,e=o);++r0x1fffffffffffff)return[];var t=0xffffffff,r=n5(e,0xffffffff);n=ih(n),e-=0xffffffff;for(var i=nB(r,n);++t=l)return e;var c=t-nH(r);if(c<1)return r;var s=a?rT(a,0,c).join(""):e.slice(0,c);if(o===i)return s+r;if(a&&(c+=s.length-c),o0(i)){if(e.slice(c).search(i)){var u,d=s;for(i.global||(i=eI(i.source,lr(es.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;s=s.slice(0,o===f?c:f)}}else if(e.indexOf(rk(i),c)!=c){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},tx.unescape=function(e){return(e=lr(e))&&U.test(e)?e.replace(J,nG):e},tx.uniqueId=function(e){var n=++eN;return lr(e)+n},tx.upperCase=lT,tx.upperFirst=lN,tx.each=od,tx.eachRight=of,tx.first=iq,lV(tx,(eb={},tW(tx,function(e,n){eT.call(tx.prototype,n)||(eb[n]=e)}),eb),{chain:!1}),tx.VERSION="4.17.21",nd(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){tx[e].placeholder=tx}),nd(["drop","take"],function(e,n){ty.prototype[e]=function(t){t=o===t?1:n3(o9(t),0);var r=this.__filtered__&&!n?new ty(this):this.clone();return r.__filtered__?r.__takeCount__=n5(t,r.__takeCount__):r.__views__.push({size:n5(t,0xffffffff),type:e+(r.__dir__<0?"Right":"")}),r},ty.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),nd(["filter","map","takeWhile"],function(e,n){var t=n+1,r=1==t||3==t;ty.prototype[e]=function(e){var n=this.clone();return n.__iteratees__.push({iteratee:ih(e,3),type:t}),n.__filtered__=n.__filtered__||r,n}}),nd(["head","last"],function(e,n){var t="take"+(n?"Right":"");ty.prototype[e]=function(){return this[t](1).value()[0]}}),nd(["initial","tail"],function(e,n){var t="drop"+(n?"":"Right");ty.prototype[e]=function(){return this.__filtered__?new ty(this):this[t](1)}}),ty.prototype.compact=function(){return this.filter(lJ)},ty.prototype.find=function(e){return this.filter(e).head()},ty.prototype.findLast=function(e){return this.reverse().find(e)},ty.prototype.invokeMap=rh(function(e,n){return"function"==typeof e?new ty(this):this.map(function(t){return t3(t,e,n)})}),ty.prototype.reject=function(e){return this.filter(oP(ih(e)))},ty.prototype.slice=function(e,n){e=o9(e);var t=this;return t.__filtered__&&(e>0||n<0)?new ty(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),o!==n&&(t=(n=o9(n))<0?t.dropRight(-n):t.take(n-e)),t)},ty.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ty.prototype.toArray=function(){return this.take(0xffffffff)},tW(ty.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),l=tx[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);l&&(tx.prototype[n]=function(){var n=this.__wrapped__,c=i?[1]:arguments,s=r(n,ty),u=c[0],d=s||oM(n),f=function(e){var n=l.apply(tx,ng([e],c));return i&&h?n[0]:n};d&&t&&"function"==typeof u&&1!=u.length&&(s=d=!1);var h=this.__chain__,m=!!this.__actions__.length,p=a&&!h,x=s&&!m;if(!a&&d){n=x?n:new ty(this);var g=e.apply(n,c);return g.__actions__.push({func:ol,args:[f],thisArg:o}),new tb(g,h)}return p&&x?e.apply(this,c):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})}),nd(["pop","push","shift","sort","splice","unshift"],function(e){var n=eA[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);tx.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(oM(i)?i:[],e)}return this[t](function(t){return n.apply(oM(t)?t:[],e)})}}),tW(ty.prototype,function(e,n){var t=tx[n];if(t){var r=t.name+"";eT.call(ta,r)||(ta[r]=[]),ta[r].push({name:n,func:t})}}),ta[rZ(o,2).name]=[{name:"wrapper",func:o}],ty.prototype.clone=function(){var e=new ty(this.__wrapped__);return e.__actions__=rJ(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rJ(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rJ(this.__views__),e},ty.prototype.reverse=function(){if(this.__filtered__){var e=new ty(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},ty.prototype.value=function(){var e=this.__wrapped__.value(),n=this.__dir__,t=oM(e),r=n<0,i=t?e.length:0,o=function(e,n,t){for(var r=-1,i=t.length;++r=this.__values__.length,n=e?o:this.__values__[this.__index__++];return{done:e,value:n}},tx.prototype.plant=function(e){for(var n,t=this;r(t,tj);){var i=iJ(t);i.__index__=0,i.__values__=o,n?l.__wrapped__=i:n=i;var l=i;t=t.__wrapped__}return l.__wrapped__=e,n},tx.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,ty)){var n=e;return this.__actions__.length&&(n=new ty(this)),(n=n.reverse()).__actions__.push({func:ol,args:[i8],thisArg:o}),new tb(n,this.__chain__)}return this.thru(i8)},tx.prototype.toJSON=tx.prototype.valueOf=tx.prototype.value=function(){return rO(this.__wrapped__,this.__actions__)},tx.prototype.first=tx.prototype.head,e4&&(tx.prototype[e4]=function(){return this}),tx}();"function"==typeof define&&"object"==i(define.amd)&&define.amd?(e6._=nQ,define(function(){return nQ})):e9?((e9.exports=nQ)._=nQ,e7._=nQ):e6._=nQ}).call(this)},6312:function(e,n){"use strict";var t=Symbol.for("react.transitional.element");function r(e,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return{$$typeof:t,type:e,key:i,ref:void 0!==(n=r.ref)?n:null,props:r}}n.Fragment=Symbol.for("react.fragment"),n.jsx=r,n.jsxs=r},5059:function(e,n){"use strict";function t(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),p=Symbol.iterator,x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,j={};function b(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}function y(){}function v(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}b.prototype.isReactComponent={},b.prototype.setState=function(e,n){if("object"!==(void 0===e?"undefined":t(e))&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,g(w,b.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function _(){}var C={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function S(e,n,t){var i=t.ref;return{$$typeof:r,type:e,key:n,ref:void 0!==i?i:null,props:t}}function O(e){return"object"===(void 0===e?"undefined":t(e))&&null!==e&&e.$$typeof===r}var A=/\/+/g;function P(e,n){var r,i;return"object"===(void 0===e?"undefined":t(e))&&null!==e&&null!=e.key?(r=""+e.key,i={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return i[e]})):n.toString(36)}function E(e,n,o){if(null==e)return e;var l=[],a=0;return!function e(n,o,l,a,c){var s,u,d,f=void 0===n?"undefined":t(n);("undefined"===f||"boolean"===f)&&(n=null);var m=!1;if(null===n)m=!0;else switch(f){case"bigint":case"string":case"number":m=!0;break;case"object":switch(n.$$typeof){case r:case i:m=!0;break;case h:return e((m=n._init)(n._payload),o,l,a,c)}}if(m)return c=c(n),m=""===a?"."+P(n,0):a,k(c)?(l="",null!=m&&(l=m.replace(A,"$&/")+"/"),e(c,o,l,"",function(e){return e})):null!=c&&(O(c)&&(s=c,u=l+(null==c.key||n&&n.key===c.key?"":(""+c.key).replace(A,"$&/")+"/")+m,c=S(s.type,u,s.props)),o.push(c)),1;m=0;var x=""===a?".":a+":";if(k(n))for(var g=0;g>>1,i=e[r];if(0>>1;rl(c,t))sl(u,c)?(e[r]=u,e[s]=t,r=s):(e[r]=c,e[a]=t,r=a);else if(sl(u,t))e[r]=u,e[s]=t,r=s;else break}}return n}function l(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if(n.unstable_now=void 0,"object"===("undefined"==typeof performance?"undefined":t(performance))&&"function"==typeof performance.now){var a,c=performance;n.unstable_now=function(){return c.now()}}else{var s=Date,u=s.now();n.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,p=3,x=!1,g=!1,j=!1,b=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var n=i(f);null!==n;){if(null===n.callback)o(f);else if(n.startTime<=e)o(f),n.sortIndex=n.expirationTime,r(d,n);else break;n=i(f)}}function _(e){if(j=!1,k(e),!g)if(null!==i(d))g=!0,C||(C=!0,a());else{var n=i(f);null!==n&&z(_,n.startTime-e)}}var C=!1,I=-1,S=5,O=-1;function A(){return!!b||!(n.unstable_now()-Oe&&A());){var l=m.callback;if("function"==typeof l){m.callback=null,p=m.priorityLevel;var c=l(m.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof c){m.callback=c,k(e),t=!0;break n}m===i(d)&&o(d),k(e)}else o(d);m=i(d)}if(null!==m)t=!0;else{var s=i(f);null!==s&&z(_,s.startTime-e),t=!1}}break e}finally{m=null,p=r,x=!1}}}finally{t?a():C=!1}}}if("function"==typeof w)a=function(){w(P)};else if("undefined"!=typeof MessageChannel){var E=new MessageChannel,B=E.port2;E.port1.onmessage=P,a=function(){B.postMessage(null)}}else a=function(){y(P,0)};function z(e,t){I=y(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_forceFrameRate=function(e){0>e||125c?(e.sortIndex=l,r(f,e),null===i(d)&&e===i(f)&&(j?(v(I),I=-1):j=!0,z(_,l-c))):(e.sortIndex=s,r(d,e),g||x||(g=!0,C||(C=!0,a()))),e},n.unstable_shouldYield=A,n.unstable_wrapCallback=function(e){var n=p;return function(){var t=p;p=n;try{return e.apply(this,arguments)}finally{p=t}}}},8014:function(e,n,t){"use strict";e.exports=t(2685)},8587:function(e,n,t){"use strict";t.d(n,{TS:()=>s,Tj:()=>o,Ul:()=>a,pb:()=>i,y1:()=>c,yU:()=>u});function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i=function(e,n){if(null==e)return e;if(Array.isArray(e)){for(var t=[],i=0;ia)return 1}return 0},a=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;ri}),null==(r=window.performance)||r.now;var r,i={mark:function(e,n){},measure:function(e,n){}}},5900:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc,Tw:()=>a,VP:()=>s,y$:()=>l});var l=function(e,n){if(n)return n(l)(e);var t,r=[],i=function(n){t=e(t,n);for(var i=0;i1?a-1:0),s=1;s1?n-1:0),r=1;r1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=i({},t),l=!1,a=!0,c=!1,s=void 0;try{for(var u,d=n[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var f=u.value,h=e[f],m=t[f],p=h(m,r);m!==p&&(l=!0,o[f]=p)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}return l?o:t}},s=function(e,n){var t=function(){for(var t=arguments.length,r=Array(t),l=0;l0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]m});var u,d=(u=function(){return window.hubStorage&&!!window.hubStorage.getItem},function(){try{return!!u()}catch(e){return!1}}),f=function(){function e(){o(this,e),c(this,"store",void 0),c(this,"impl",void 0),this.impl=0,this.store={}}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){return[2,this.store[e]]})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return this.store[e]=n,[2]})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return this.store[e]=void 0,[2]})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return this.store={},[2]})}).call(this)}}]),e}(),h=function(){function e(){o(this,e),c(this,"impl",void 0),this.impl=1}return a(e,[{key:"get",value:function(e){return i(function(){var n;return s(this,function(t){switch(t.label){case 0:return[4,window.hubStorage.getItem("paradise-"+e)];case 1:if("string"==typeof(n=t.sent()))return[2,JSON.parse(n)];return[2,void 0]}})})()}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return window.hubStorage.setItem("paradise-"+e,JSON.stringify(n)),[2]})})()}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return window.hubStorage.removeItem("paradise-"+e),[2]})})()}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return window.hubStorage.clear(),[2]})})()}}]),e}(),m=new(function(){function e(){o(this,e),c(this,"backendPromise",void 0),c(this,"impl",0),this.backendPromise=i(function(){return s(this,function(e){return d()?[2,new h]:(console.warn("No supported storage backend found. Using in-memory storage."),[2,new f])})})()}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().get(e)]}})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().set(e,n)]}})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().remove(e)]}})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){switch(e.label){case 0:return[4,this.backendPromise];case 1:return[2,e.sent().clear()]}})}).call(this)}}]),e}())},6183:function(e,n,t){"use strict";t.d(n,{CO:()=>s,Xd:()=>f,Z4:()=>u,tk:()=>d});var r=t(8587);function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,l:()=>o});var r=[/v4shim/i],i={},o=function(e){return i[e]||e},l=function(e){return function(e){return function(n){var t=n.type,o=n.payload;if("asset/stylesheet"===t)return void Byond.loadCss(o);if("asset/mappings"===t){var l=!0,a=!1,c=void 0;try{for(var s,u=Object.keys(o)[Symbol.iterator]();!(l=(s=u.next()).done);l=!0)!function(){var e=s.value;if(!r.some(function(n){return n.test(e)})){var n=o[e],t=e.split(".").pop();i[e]=n,"css"===t&&Byond.loadCss(n),"js"===t&&Byond.loadJs(n)}}()}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return}e(n)}}}},2864:function(e,n,t){"use strict";t.d(n,{H$:()=>w,J3:()=>r,JV:()=>C,Oc:()=>$,QY:()=>M,Ul:()=>D,d4:()=>L,jB:()=>E,pX:()=>B});var r,i=t(9227),o=t(5900),l=t(1874),a=t(6400),c=t(1604),s=t(2533),u=t(2901);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function j(e){var n=function(e,n){if("object"!==b(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==b(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===b(n)?n:String(n)}function b(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function y(e,n){if(e){if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,n)}}var v=(0,s.h)("backend"),w=function(e){r=e},k=(0,o.VP)("backend/update"),_=(0,o.VP)("backend/setSharedState"),C=(0,o.VP)("backend/suspendStart"),I=(0,o.VP)("backend/createPayloadQueue"),S=(0,o.VP)("backend/dequeuePayloadQueue"),O=(0,o.VP)("backend/removePayloadQueue"),A=(0,o.VP)("nextPayloadChunk"),P={config:{},data:{},shared:{},outgoingPayloadQueues:{},suspended:Date.now(),suspending:!1},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,n=arguments.length>1?arguments[1]:void 0,t=n.type,r=n.payload;if("backend/update"===t){var i=p({},e.config,r.config),o=p({},e.data,r.static_data,r.data),l=p({},e.shared);if(r.shared){var a=!0,c=!1,s=void 0;try{for(var u,d=Object.keys(r.shared)[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var b=u.value,v=r.shared[b];""===v?l[b]=void 0:l[b]=JSON.parse(v)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}}return x(p({},e),{config:i,data:o,shared:l,suspended:!1})}if("backend/setSharedState"===t){var w=r.key,k=r.nextState;return x(p({},e),{shared:x(p({},e.shared),h({},w,k))})}if("backend/suspendStart"===t)return x(p({},e),{suspending:!0});if("backend/suspendSuccess"===t){var _=r.timestamp;return x(p({},e),{data:{},shared:{},config:x(p({},e.config),{title:"",status:1}),suspending:!1,suspended:_})}if("backend/createPayloadQueue"===t){var C=r.id,I=r.chunks,S=e.outgoingPayloadQueues;return x(p({},e),{outgoingPayloadQueues:x(p({},S),h({},C,I))})}if("backend/dequeuePayloadQueue"===t){var O=r.id,A=e.outgoingPayloadQueues,E=A[O],B=g(A,[O].map(j)),z=f(E)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||y(E)||m(),T=(z[0],z.slice(1));return x(p({},e),{outgoingPayloadQueues:T.length?x(p({},B),h({},O,T)):B})}if("backend/removePayloadQueue"===t){var N=r.id,R=e.outgoingPayloadQueues;R[N];var $=g(R,[N].map(j));return x(p({},e),{outgoingPayloadQueues:$})}return e},B=function(e){var n,t;return function(r){return function(o){var s=R(e.getState()),d=s.suspended,f=s.outgoingPayloadQueues,h=o.type,m=o.payload;if("update"===h)return void e.dispatch(k(m));if("suspend"===h)return void e.dispatch({type:"backend/suspendSuccess",payload:{timestamp:Date.now()}});if("ping"===h)return void Byond.sendMessage("ping/reply");if("backend/suspendStart"===h&&!t){v.log("suspending (".concat(Byond.windowId,")"));var p=function(){return Byond.sendMessage("suspend")};p(),t=setInterval(p,2e3)}if("backend/suspendSuccess"===h&&((0,u.Su)(),clearInterval(t),t=void 0,Byond.winset(Byond.windowId,{"is-visible":!1}),(0,l.sc)(),(0,l.zr)(),setTimeout(function(){return(0,c.$)()})),"backend/update"===h){var x,g,j=null==(g=m.config)||null==(x=g.window)?void 0:x.fancy;void 0===n?n=j:n!==j&&(v.log("changing fancy mode to",j),n=j,Byond.winset(Byond.windowId,{titlebar:!j,"can-resize":!j}))}if("backend/update"===h&&d&&(v.log("backend/update",m),(0,u.P7)(),(0,l.ao)(),(0,a.MN)(),setTimeout(function(){i.k.mark("resume/start"),R(e.getState()).suspended||(Byond.winset(Byond.windowId,{"is-visible":!0}),Byond.sendMessage("visible"),i.k.mark("resume/finish"))})),"oversizePayloadResponse"===h&&(m.allow?e.dispatch(A(m)):e.dispatch(O(m))),"acknowlegePayloadChunk"===h&&(e.dispatch(S(m)),e.dispatch(A(m))),"nextPayloadChunk"===h){var b=m.id,y=f[b][0];Byond.sendMessage("payloadChunk",{id:b,chunk:y})}return r(o)}}},z=function(e,n){for(var t=e.length-1,r=0,i=0;r1024){var c=i+z(l,1024);r.push(n.slice(i,c1&&void 0!==arguments[1]?arguments[1]:{};if(!((void 0===n?"undefined":b(n))==="object"&&null!==n&&!Array.isArray(n)))return void v.error("Payload for act() must be an object, got this:",n);var t=JSON.stringify(n);if(Object.entries({type:"act/"+e,payload:t,tgui:1,windowId:Byond.windowId}).reduce(function(e,n,t){var r=f(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||y(n,2)||m(),i=r[0],o=r[1];return e+"".concat(t>0?"&":"?").concat(encodeURIComponent(i),"=").concat(encodeURIComponent(o))},"").length>2048){var i=t.split(T),o="".concat(Date.now());null==r||r.dispatch(I({id:o,chunks:i})),Byond.sendMessage("oversizedPayloadRequest",{type:"act/"+e,id:o,chunkCount:i.length});return}Byond.sendMessage("act/"+e,n)},R=function(e){return e.backend||{}},$=function(){var e;return x(p({},null==r||null==(e=r.getState())?void 0:e.backend),{act:N})},D=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){r.dispatch(_({key:e,nextState:"function"==typeof n?n(a):n}))}]},M=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){Byond.sendMessage({type:"setSharedState",key:e,value:JSON.stringify("function"==typeof n?n(a):n)||""})}]},L=function(e){return e(null==r?void 0:r.getState())}},8095:function(e,n,t){"use strict";t.d(n,{H:()=>u});var r=t(8138),i=t(4530),o=t(6859);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["onMove","onKey","style"]),m=(0,i.useRef)(null),p=a(u),x=a(d),g=(n=(0,i.useMemo)(function(){var e=function(e){e.preventDefault(),e.buttons>0&&m.current?p(s(m.current,e)):t(!1)},n=function(){return t(!1)},t=function(t){var r=c(m.current),i=t?r.addEventListener:r.removeEventListener;i("mousemove",e),i("mouseup",n)};return[function(e){var n=e.nativeEvent,r=m.current;r&&(n.preventDefault(),r.focus(),p(s(r,n)),t(!0))},function(e){var n=e.which||e.keyCode;n<37||n>40||(e.preventDefault(),x({left:39===n?.05:37===n?-.05:0,top:40===n?.05:38===n?-.05:0}))},t]},[x,p]),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),3!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,3)||function(e,n){if(e){if("string"==typeof e)return l(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,3)}}(n,3)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=g[0],b=g[1],y=g[2];return(0,i.useEffect)(function(){return y},[y]),(0,r.jsx)("div",(t=function(e){for(var n=1;nu,gm:()=>C,tx:()=>v,Gi:()=>a});var r=t(8138),i=t(4530),o=t(7790);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","progressBar","timeStart","timeEnd","format"]),m=Math.max((u?d-u:d)*100,0),p=(n=(0,i.useState)(m),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=p[0],g=p[1],j=(0,i.useRef)(null);function b(){g(function(e){var n=Math.max(e-1e3,0);return n<=0&&clearInterval(j.current),n})}(0,i.useEffect)(function(){return j.current||(j.current=setInterval(b,1e3)),function(){return clearInterval(j.current)}},[]);var y=new Date(x).toISOString().slice(11,19),v=(0,r.jsx)(o.az,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var u=function(e){var n,t,i=e.children,l=s(e,["children"]);return(0,r.jsx)(o.XI,(n=c({},l),t=t={children:(0,r.jsx)(o.XI.Row,{children:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};u.Column=function(e){var n=e.size,t=e.style,i=s(e,["size","style"]);return(0,r.jsx)(o.XI.Cell,c({style:c({width:(void 0===n?1:n)+"%"},t)},i))},t(8095);var d=t(8595),f=t(2864);function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function g(e,n){return(g=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}var b=(0,i.createContext)({zoom:1}),y=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},v=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i,o,l,a;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return l=t,a=[e],l=h(l),n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(l,a||[],h(this).constructor):l.apply(this,a)),window.innerWidth,window.innerHeight,n.state={offsetX:null!=(r=e.offsetX)?r:0,offsetY:null!=(i=e.offsetY)?i:0,dragging:!1,originX:null,originY:null,zoom:null!=(o=e.zoom)?o: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),y(e)},n.handleDragMove=function(e){n.setState(function(n){var t=m({},n),r=e.screenX-t.originX,i=e.screenY-t.originY;return n.dragging?(t.offsetX+=r/t.zoom,t.offsetY+=i/t.zoom,t.originX=e.screenX,t.originY=e.screenY):t.dragging=!0,t}),y(e)},n.handleDragEnd=function(t){var r;n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),null==(r=e.onOffsetChange)||r.call(e,t,n.state),y(t)},n.handleZoom=function(t,r){n.setState(function(n){return n.zoom=Math.min(Math.max(r,1),8),e.onZoom&&e.onZoom(n.zoom),n})},n.handleReset=function(t){n.setState(function(r){var i;r.offsetX=0,r.offsetY=0,r.zoom=1,n.handleZoom(t,1),null==(i=e.onOffsetChange)||i.call(e,t,r)})},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e),n=[{key:"render",value:function(){var e=(0,f.Oc)().config,n=this.state,t=n.dragging,i=n.offsetX,l=n.offsetY,a=n.zoom,c=void 0===a?1:a,s=this.props.children,u=e.map+"_nanomap_z1.png",h=510*c+"px";return(0,r.jsx)(b.Provider,{value:{zoom:c},children:(0,r.jsxs)(o.az,{className:"NanoMap__container",children:[(0,r.jsxs)(o.az,{style:{width:h,height:h,marginTop:l*c+"px",marginLeft:i*c+"px",overflow:"hidden",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundSize:"cover",backgroundRepeat:"no-repeat",textAlign:"center",cursor:t?"move":"auto"},onMouseDown:this.handleDragStart,children:[(0,r.jsx)("img",{src:(0,d.l)(u),style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",imageRendering:"pixelated"}}),(0,r.jsx)(o.az,{children:s})]}),(0,r.jsx)(k,{zoom:c,onZoom:this.handleZoom,onReset:this.handleReset})]})})}}],function(e,n){for(var t=0;ti,b_:()=>a,fF:()=>c,lm:()=>r,wM:()=>l});var r={department:{command:"#526aff",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}},i=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}],o=[{id:"o2",name:"Oxygen",label:"O₂",color:"blue"},{id:"n2",name:"Nitrogen",label:"N₂",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO₂",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H₂O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N₂O",color:"red"},{id:"no2",name:"Nitryl",label:"NO₂",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H₂",color:"#997379"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}],l=function(e,n){var t=String(e).toLowerCase(),r=o.find(function(e){return e.id===t||e.name.toLowerCase()===t});return r&&r.label||n||e},a=function(e){var n=String(e).toLowerCase(),t=o.find(function(e){return e.id===n||e.name.toLowerCase()===n});return t&&t.color},c=function(e,n){if(e>n)return"in the future";var t=(n/=10)-(e/=10);if(t>3600){var r=Math.round(t/3600);return r+" hour"+(1===r?"":"s")+" ago"}if(t>60){var i=Math.round(t/60);return i+" minute"+(1===i?"":"s")+" ago"}var o=Math.round(t);return o+" second"+(1===o?"":"s")+" ago"}},4981:function(e,n,t){"use strict";t(8138),t(7218),t(4530),t(7790),t(3384),t(937)},7218:function(e,n,t){"use strict";t.d(n,{D:()=>r});var r=(0,t(4530).createContext)(["",function(e){}])},3123:function(e,n,t){"use strict";var r=t(5900);(0,r.VP)("debug/toggleKitchenSink"),(0,r.VP)("debug/toggleDebugLayout"),(0,r.VP)("debug/openExternalBrowser")},9216:function(e,n,t){"use strict";t.d(n,{L:()=>o});var r=t(2864),i=t(8318);function o(){return(0,r.d4)(i.m)}},1956:function(e,n,t){"use strict";t.d(n,{A$:()=>i.A,Lo:()=>r.L});var r=t(9216);t(4981),t(2550);var i=t(8408)},2550:function(e,n,t){"use strict";t(1128),t(1874),t(3123)},8408:function(e,n,t){"use strict";function r(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=n.type;return"debug/toggleKitchenSink"===t?i(r({},e),{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===t?i(r({},e),{debugLayout:!e.debugLayout}):e}t.d(n,{A:()=>o})},8318:function(e,n,t){"use strict";function r(e){return e.debug}t.d(n,{m:()=>r})},6400:function(e,n,t){"use strict";t.d(n,{BF:()=>z,C8:()=>P,MN:()=>E,nZ:()=>R,y9:()=>w});var r,i,o,l,a,c,s=t(1699),u=t(6183);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]2&&void 0!==arguments[2]?arguments[2]:50,i=[n],o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return h(function(){var n,t,r,o,l;return p(this,function(a){switch(a.label){case 0:if(!(t=e.fancy))return[3,2];return[4,s.IG.get(j)];case 1:t=a.sent(),a.label=2;case 2:return(n=t)&&x.log("recalled geometry:",n),r=(null==n?void 0:n.pos)||e.pos,o=e.size,e.scale&&o&&(o=[o[0]*g,o[1]*g]),e.scale?(document.body.style.zoom="",document.documentElement.style.setProperty("--scaling-amount",null)):(document.body.style.zoom="".concat(100/window.devicePixelRatio,"%"),document.documentElement.style.setProperty("--scaling-amount",window.devicePixelRatio.toString())),[4,i];case 3:return a.sent(),l=S(),o&&I(o=[Math.min(l[0],o[0]),Math.min(l[1],o[1])]),r?(o&&e.locked&&(r=B(r,o)[1]),C(r)):o&&C(r=(0,u.CO)((0,u.Xd)(l,.5),(0,u.Xd)(o,-.5),(0,u.Xd)(v,-1))),[2]}})})()},E=function(){return h(function(){var e;return p(this,function(n){switch(n.label){case 0:return e=k(),[4,i=Byond.winget(Byond.windowId,"pos").then(function(n){return[n.x-e[0],n.y-e[1]]})];case 1:return v=n.sent(),x.debug("screen offset",v),[2]}})})()},B=function(e,n){for(var t=[0-v[0],0-v[1]],r=S(),i=[e[0],e[1]],o=!1,l=0;l<2;l++){var a=t[l],c=t[l]+r[l];e[l]c&&(i[l]=c-n[l],o=!0)}return[o,i]},z=function(e){var n;x.log("drag start"),b=!0,o=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),null==(n=e.target)||n.focus(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",T),N(e)},T=function(e){x.log("drag end"),N(e),document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",T),b=!1,A()},N=function(e){b&&(e.preventDefault(),C((0,u.Z4)([e.screenX*g,e.screenY*g],o)))},R=function(e,n){return function(t){var r;l=[e,n],x.log("resize start",l),y=!0,o=(0,u.Z4)([t.screenX*g,t.screenY*g],k()),a=_(),null==(r=t.target)||r.focus(),document.addEventListener("mousemove",D),document.addEventListener("mouseup",$),D(t)}},$=function(e){x.log("resize end",c),D(e),document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",$),y=!1,A()},D=function(e){if(y){e.preventDefault();var n=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),t=(0,u.Z4)(n,o);(c=(0,u.CO)(a,(0,u.tk)(l,t),[1,1]))[0]=Math.max(c[0],150*g),c[1]=Math.max(c[1],50*g),I(c)}}},1604:function(e,n,t){"use strict";t.d(n,{$:()=>r});var r=function(){Byond.winset("paramapwindow.map",{focus:!0})}},9609:function(e,n,t){"use strict";t.r(n),t.d(n,{AICard:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(0===a.has_ai)return(0,r.jsx)(l.p8,{width:250,height:120,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Stored AI",children:(0,r.jsx)(i.az,{children:(0,r.jsx)("h3",{children:"No AI detected."})})})})});var c=null;return c=a.integrity>=75?"green":a.integrity>=25?"yellow":"red",(0,r.jsx)(l.p8,{width:600,height:420,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:a.name,children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:c,value:a.integrity/100})})}),(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h2",{children:1===a.flushing?"Wipe of AI in progress...":""})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{width:10,icon:a.wireless?"check":"times",content:a.wireless?"Enabled":"Disabled",color:a.wireless?"green":"red",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{width:10,icon:a.radio?"check":"times",content:a.radio?"Enabled":"Disabled",color:a.radio?"green":"red",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Wipe",children:(0,r.jsx)(i.$n.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:a.flushing||0===a.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return t("wipe")}})})]})})})]})})})}},1664:function(e,n,t){"use strict";t.r(n),t.d(n,{AIControllerDebugger:()=>u,CopyableValue:()=>c,ObjectReference:()=>s});var r=t(8138),i=t(9623),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=e.text;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{icon:"clipboard-list",onClick:function(){return navigator.clipboard.writeText(n)}}),(0,r.jsx)("span",{style:{fontFamily:"monospace"},children:n})]})},s=function(e){var n=(0,l.Oc)().act,t=e.obj_ref;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return n("vv",{uid:t.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return n("flw",{uid:t.uid})},children:"FLW"}),"\xa0",t.name]})},u=function(e){var n=(0,l.Oc)(),t=n.data,u=n.act,d=t.controller;return(0,r.jsx)(a.p8,{width:675,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.wn,{title:"Basic Info",children:(0,r.jsxs)(o.XI,{children:[d.pawn&&(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Pawn"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.pawn})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Status"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.ai_status})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Type"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.type})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Idle Behavior"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.idle_behavior})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Delay"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_delay})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Able to Plan"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.able_to_plan?"Yes":"No"})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"On Failed Planning Timeout"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.on_failed_planning_timeout?"Yes":"No"})})]}),d.movement_target&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Target"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.movement_target})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Target Source"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_target.source})})]})]})]})}),(0,r.jsx)(o.wn,{title:"Blackboard",children:(0,r.jsx)(o.XI,{className:"AIControllerDebugger__Blackboard",children:d.blackboard.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name.length>30?(0,r.jsx)(o.m_,{content:e.name,children:(0,r.jsx)(o.az,{children:(0,i.truncate)(e.name)})}):e.name}),(0,r.jsxs)(o.XI.Cell,{className:"bb_value",children:[e.uid&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return u("vv",{uid:e.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return u("flw",{uid:e.uid})},children:"FLW"}),"\xa0"]}),e.value||"null"]})]},e.name)})})}),(0,r.jsx)(o.wn,{title:"Current Behaviors",children:(0,r.jsx)(o.XI,{children:d.current_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})}),(0,r.jsx)(o.wn,{title:"Planned Behaviors",children:(0,r.jsx)(o.XI,{children:d.planned_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})})]})})})}},8679:function(e,n,t){"use strict";t.r(n),t.d(n,{AIFixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(null===a.occupant)return(0,r.jsx)(l.p8,{width:550,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stored AI",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"robot",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),(0,r.jsx)("h3",{children:"No Artificial Intelligence detected."})]})})})})});var c=!0;(2===a.stat||null===a.stat)&&(c=!1);var s=null;s=a.integrity>=75?"green":a.integrity>=25?"yellow":"red";var u=!0;return a.integrity>=100&&2!==a.stat&&(u=!1),(0,r.jsx)(l.p8,{children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:a.occupant,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:s,value:a.integrity/100})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{inline:!0,children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Actions",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{icon:a.wireless?"times":"check",content:a.wireless?"Disabled":"Enabled",color:a.wireless?"red":"green",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{icon:a.radio?"times":"check",content:a.radio?"Disabled":"Enabled",color:a.radio?"red":"green",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Start Repairs",children:(0,r.jsx)(i.$n,{icon:"wrench",disabled:!u||a.active,content:!u||a.active?"Already Repaired":"Repair",onClick:function(){return t("fix")}})})]}),(0,r.jsx)(i.az,{color:"green",lineHeight:2,children:a.active?"Reconstruction in progress.":""})]})})]})})})}},5233:function(e,n,t){"use strict";t.r(n),t.d(n,{AIProgramPicker:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.program_list,s=a.ai_info;return(0,r.jsx)(l.p8,{width:450,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Select Program",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory Available",children:s.memory}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth Available",children:s.bandwidth})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(i.$n,{icon:"file",onClick:function(){return t("select",{uid:e.UID})},children:1===e.installed?"Update":"Install"}),children:(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.BJ.Item,{mb:2,children:(0,r.jsx)(i.Ki.Item,{label:"Description",children:e.description})}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:1===e.installed?"Bandwidth Cost":"Memory Cost",children:e.memory_cost}),(0,r.jsx)(i.Ki.Item,{label:"Upgrade Level",children:e.upgrade_level})]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:"Installed",children:1===e.installed?"True":"False"}),(0,r.jsx)(i.Ki.Item,{label:"Passive",children:1===e.is_passive?"True":"False"})]})]})]})})},e)})})]})})})}},9991:function(e,n,t){"use strict";t.r(n),t.d(n,{AIResourceManagementConsole:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n,t=(0,l.Oc)().data.screen;return 0===t?n=(0,r.jsx)(u,{}):1===t&&(n=(0,r.jsx)(d,{})),n},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data;o.auth,o.ai_list,o.nodes_list;var s=o.screen;return(0,r.jsx)(a.p8,{width:350,height:425,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:0===s,icon:"list",onClick:function(){return t("menu",{screen:0})},children:"Allocated Resources"}),(0,r.jsx)(i.tU.Tab,{selected:1===s,icon:"circle-nodes",onClick:function(){return t("menu",{screen:1})},children:"Online Nodes"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{})})})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.screen;var o=t.ai_list;return t.nodes_list,(0,r.jsxs)(i.az,{children:[(!o||0===o.length)&&(0,r.jsx)(i.IC,{children:"No AI detected."}),!!o&&o.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory",children:e.memory}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Memory",children:e.memory_max}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth",children:e.bandwidth}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Bandwidth",children:e.bandwidth_max})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data;a.screen,a.ai_list;var c=a.nodes_list;return(0,r.jsxs)(i.az,{children:[(!c||0===c.length)&&(0,r.jsx)(i.IC,{children:"No nodes detected."}),!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),buttons:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"circle-nodes",onClick:function(){return t("reassign",{uid:e.uid})},children:"Reassign"})}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Assigned AI",children:e.assigned_ai}),(0,r.jsx)(i.Ki.Item,{label:"Resource",children:(0,o.ZH)(e.resource)}),(0,r.jsx)(i.Ki.Item,{label:"Amount",children:e.amount})]})},e)})]})}},731:function(e,n,t){"use strict";t.r(n),t.d(n,{APC:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(1992),c=function(e){return(0,r.jsx)(l.p8,{width:510,height:435,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(d,{})})})},s={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"}},u={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"}},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.locked&&!l.siliconUser;l.normallyLocked;var d=s[l.externalPower]||s[0],f=s[l.chargingStatus]||s[0],h=l.powerChannels||[],m=u[l.malfStatus]||u[0],p=l.powerCellStatus/100;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.InterfaceLockNoticeBox,{}),(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main Breaker",color:d.color,buttons:(0,r.jsx)(i.$n,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!c,color:l.isOperating?"":"bad",disabled:c,onClick:function(){return t("breaker")}}),children:["[ ",d.externalPowerText," ]"]}),(0,r.jsx)(i.Ki.Item,{label:"Power Cell",children:(0,r.jsx)(i.z2,{color:"good",value:p})}),(0,r.jsxs)(i.Ki.Item,{label:"Charge Mode",color:f.color,buttons:(0,r.jsx)(i.$n,{icon:l.chargeMode?"sync":"times",content:l.chargeMode?"Auto":"Off",selected:l.chargeMode,disabled:c,onClick:function(){return t("charge")}}),children:["[ ",f.chargingText," ]"]})]})}),(0,r.jsx)(i.wn,{title:"Power Channels",children:(0,r.jsxs)(i.Ki,{children:[h.map(function(e){var n=e.topicParams;return(0,r.jsxs)(i.Ki.Item,{label:e.title,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:!c&&(1===e.status||3===e.status),disabled:c,onClick:function(){return t("channel",n.auto)}}),(0,r.jsx)(i.$n,{icon:"power-off",content:"On",selected:!c&&2===e.status,disabled:c,onClick:function(){return t("channel",n.on)}}),(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:!c&&0===e.status,disabled:c,onClick:function(){return t("channel",n.off)}})]}),children:[e.powerLoad," W"]},e.title)}),(0,r.jsx)(i.Ki.Item,{label:"Total Load",children:(0,r.jsxs)("b",{children:[l.totalLoad," W"]})})]})}),(0,r.jsx)(i.wn,{title:"Misc",buttons:!!l.siliconUser&&(0,r.jsxs)(r.Fragment,{children:[!!l.malfStatus&&(0,r.jsx)(i.$n,{icon:m.icon,content:m.content,color:"bad",onClick:function(){return t(m.action)}}),(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:"Overload",onClick:function(){return t("overload")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cover Lock",buttons:(0,r.jsx)(i.$n,{mb:.4,icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",disabled:c,onClick:function(){return t("cover")}})}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Lighting",buttons:(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:l.emergencyLights?"Enabled":"Disabled",disabled:c,onClick:function(){return t("emergency_lighting")}})}),(0,r.jsx)(i.Ki.Item,{label:"Night Shift Lighting",buttons:(0,r.jsx)(i.$n,{mt:.4,icon:"lightbulb-o",content:l.nightshiftLights?"Enabled":"Disabled",onClick:function(){return t("toggle_nightshift")}})})]})})]})}},6181:function(e,n,t){"use strict";t.r(n),t.d(n,{ATM:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(g)if(s)switch(c){case 1:n=(0,r.jsx)(f,{});break;case 2:n=(0,r.jsx)(h,{});break;case 3:n=(0,r.jsx)(x,{});break;default:n=(0,r.jsx)(m,{})}else n=(0,r.jsx)(p,{});else n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,r.jsx)(a.p8,{width:550,height:650,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(o.wn,{children:n})]})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data;i.machine_id;var a=i.held_card_name;return(0,r.jsxs)(o.wn,{title:"Nanotrasen Automatic Teller Machine",children:[(0,r.jsx)(o.az,{children:"For all your monetary needs!"}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Card",children:(0,r.jsx)(o.$n,{content:a,icon:"eject",onClick:function(){return t("insert_card")}})})})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.security_level;return(0,r.jsxs)(o.wn,{title:"Select a new security level for this account",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return t("change_security_level",{new_security_level:1})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return t("change_security_level",{new_security_level:2})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},h=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=s((0,i.useState)(0),2),h=f[0],m=f[1],p=s((0,i.useState)(0),2),x=p[0],j=p[1],b=a.money;return(0,r.jsxs)(o.wn,{title:"Transfer Fund",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",b]}),(0,r.jsx)(o.Ki.Item,{label:"Target Account Number",children:(0,r.jsx)(o.pd,{placeholder:"7 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Funds to Transfer",children:(0,r.jsx)(o.pd,{onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Transaction Purpose",children:(0,r.jsx)(o.pd,{fluid:!0,onChange:function(e){return j(e)}})})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return t("transfer",{target_acc_number:u,funds_amount:h,purpose:x})}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=a.owner_name,h=a.money;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Welcome, "+f,buttons:(0,r.jsx)(o.$n,{content:"Logout",icon:"sign-out-alt",onClick:function(){return t("logout")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",h]}),(0,r.jsx)(o.Ki.Item,{label:"Withdrawal Amount",children:(0,r.jsx)(o.pd,{onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return t("withdrawal",{funds_amount:u})}})})]})}),(0,r.jsxs)(o.wn,{title:"Menu",children:[(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Change account security level",icon:"lock",onClick:function(){return t("view_screen",{view_screen:1})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return t("view_screen",{view_screen:2})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"View transaction log",icon:"list",onClick:function(){return t("view_screen",{view_screen:3})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Print balance statement",icon:"print",onClick:function(){return t("balance_statement")}})})]})]})},p=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(null),2),u=c[0],d=c[1],f=s((0,i.useState)(null),2),h=f[0],m=f[1];return a.machine_id,a.held_card_name,(0,r.jsx)(o.wn,{title:"Insert card or enter ID and pin to login",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Account ID",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Pin",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Login",icon:"sign-in-alt",onClick:function(){return t("attempt_auth",{account_num:u,account_pin:h})}})})]})})},x=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).transaction_log;return(0,r.jsxs)(o.wn,{title:"Transactions",children:[(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Timestamp"}),(0,r.jsx)(o.XI.Cell,{children:"Reason"}),(0,r.jsx)(o.XI.Cell,{children:"Value"}),(0,r.jsx)(o.XI.Cell,{children:"Terminal"})]}),t.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.time}),(0,r.jsx)(o.XI.Cell,{children:e.purpose}),(0,r.jsxs)(o.XI.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,r.jsx)(o.XI.Cell,{children:e.target_name})]},e)})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,l.Oc)(),t=n.act;return n.data,(0,r.jsx)(o.$n,{content:"Back",icon:"sign-out-alt",onClick:function(){return t("view_screen",{view_screen:0})}})}},4558:function(e,n,t){"use strict";t.r(n),t.d(n,{AccountsUplinkTerminal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(7352),u=t(736),d=t(6888),f=t(2264),h=t(4900);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(6888),u=t(2264),d=t(4900),f=function(e){switch(e){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";case 4:return"Advanced Disease Carriers";default:return"Something went wrong with this menu, make an issue report please!"}},h=function(e){switch(e){case 0:return(0,r.jsx)(j,{});case 1:return(0,r.jsx)(y,{});case 2:return(0,r.jsx)(w,{});case 3:return(0,r.jsx)(_,{});case 4:return(0,r.jsx)(I,{});default:return"Something went wrong with this menu, make an issue report please!"}},m=function(e){return(0,r.jsx)(c.p8,{width:800,height:600,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.IC,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,r.jsxs)(d.default.Default,{tabIndex:0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(p,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(x,{})})]})]})})})},p=function(){var e=(0,i.useContext)(d.default),n=e.tabIndex,t=e.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:0===n,onClick:function(){t(0)},icon:"user",children:"Antagonists"},"Antagonists"),(0,r.jsx)(o.tU.Tab,{selected:1===n,onClick:function(){t(1)},icon:"people-robbery",children:"Objectives"},"Objectives"),(0,r.jsx)(o.tU.Tab,{selected:2===n,onClick:function(){t(2)},icon:"handcuffs",children:"Security"},"Security"),(0,r.jsx)(o.tU.Tab,{selected:3===n,onClick:function(){t(3)},icon:"lock",children:"High Value Items"},"HighValueItems"),(0,r.jsx)(o.tU.Tab,{selected:4===n,onClick:function(){t(4)},icon:"virus",children:"Advanced Disease Carriers"},"AdvancedDiseaseCarriers")]})},x=function(){return(0,r.jsx)(s.default.Default,{children:(0,r.jsx)(g,{})})},g=function(){var e=(0,a.Oc)().act,n=(0,i.useContext)(d.default).tabIndex,t=(0,i.useContext)(s.default).setSearchText;return(0,r.jsx)(o.wn,{title:f(n),fill:!0,scrollable:!0,buttons:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.pd,{width:"300px",placeholder:"Search...",onChange:function(e){return t(e)}}),(0,r.jsx)(o.$n,{icon:"sync",onClick:function(){return e("refresh")},children:"Refresh"})]}),children:h(n)})},j=function(){return(0,r.jsx)(u.default.Default,{sortId:"antag_name",children:(0,r.jsx)(b,{})})},b=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.antagonists,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{id:"name",children:"Mob Name"}),(0,r.jsx)(O,{id:"",children:"Buttons"}),(0,r.jsx)(O,{id:"antag_name",children:"Antagonist Type"}),(0,r.jsx)(O,{id:"status",children:"Status"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.status+"|"+e.antag_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.body_destroyed?e.name:(0,r.jsx)(o.$n,{color:e.is_hijacker||!e.name?"red":"",tooltip:e.is_hijacker?"Hijacker":"",onClick:function(){return t("show_player_panel",{mind_uid:e.antag_mind_uid})},children:e.name?e.name:"??? (NO NAME)"})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.antag_mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.antag_mind_uid})},children:"OBS"}),(0,r.jsx)(o.$n,{onClick:function(){t("tp",{mind_uid:e.antag_mind_uid})},children:"TP"})]}),(0,r.jsx)(o.XI.Cell,{children:e.antag_name}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"red":"grey",children:e.status?e.status:"Alive"})})]},n)})]}):"No Antagonists!"},y=function(){return(0,r.jsx)(u.default.Default,{sortId:"target_name",children:(0,r.jsx)(v,{})})},v=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.objectives,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),c.filter((0,l.XZ)(d,function(e){return e.obj_name+"|"+e.target_name+"|"+(e.status?"success":"incompleted")+"|"+e.owner_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]||"target_name"===h&&e.no_target?t:void 0===n[h]||null===n[h]||"target_name"===h&&n.no_target?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.obj_uid})},children:e.obj_name})}),(0,r.jsx)(o.XI.Cell,{children:e.no_target?"":e.track.length?e.track.map(function(n,i){return(0,r.jsxs)(o.$n,{onClick:function(){return t("follow",{datum_uid:n})},children:[e.target_name," ",e.track.length>1?"("+(parseInt(i,10)+1)+")":""]},i)}):"No "+e.target_name+" Found"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"green":"grey",children:e.status?"Success":"Incomplete"})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("obj_owner",{owner_uid:e.owner_uid})},children:e.owner_name})})]},n)})]}):"No Objectives!"},w=function(){return(0,r.jsx)(u.default.Default,{sortId:"health",children:(0,r.jsx)(k,{})})},k=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.security,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder,p=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":e.broken_bone&&e.internal_bleeding?"Broken Bone, IB":e.broken_bone?"Broken Bone":e.internal_bleeding?"IB":"Alive"};return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId3",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"role",children:"Role"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"health",children:"Health"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.role+"|"+p(e)+"|"+e.antag})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.role}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:p(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.antag?(0,r.jsx)(o.$n,{textColor:"red",onClick:function(){t("tp",{mind_uid:e.mind_uid})},children:e.antag}):""}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{my:.5,minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Security!"},_=function(){return(0,r.jsx)(u.default.Default,{sortId:"person",children:(0,r.jsx)(C,{})})},C=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.high_value_items,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.loc})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.person})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.loc})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:"grey",children:e.admin_z?"On Admin Z-level":""})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.uid})},children:"FLW"})})]},n)})]}):"No High Value Items!"},I=function(){return(0,r.jsx)(u.default.Default,{sortId:"strain",children:(0,r.jsx)(S,{})})},S=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data,d=c.disease_carriers,f=c.virus_data,h=(0,i.useContext)(s.default).searchText,m=(0,i.useContext)(u.default),p=m.sortId,x=m.sortOrder,g=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":"Alive"};return d.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"virus_name",children:"Virus Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"strain",children:"Strain"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"progress",children:"Progress"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"health",children:"Health"})]}),d.filter((0,l.XZ)(h,function(e){return e.name+"||"+g(e)+"|"+e.strain+"|"+e.virus_name})).sort(function(e,n){var t=x?1:-1;return void 0===e[p]||null===e[p]?t:void 0===n[p]||null===n[p]?-1*t:"number"==typeof e[p]?(e[p]-n[p])*t:e[p].localeCompare(n[p])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{color:e.patient_zero?"red":"",onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:g(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.virus_name}),(0,r.jsx)(o.m_,{position:"right",content:"Symptoms: "+f[e.strain],children:(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.strain})},n),(0,r.jsx)(o.XI.Cell,{children:e.patient_zero?"Patient Zero":(0,r.jsx)(o.z2,{minValue:0,value:e.progress/100,maxValue:1,ranges:{good:[0,20],average:[20,60],bad:[60,100]},children:e.progress})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Disease Carriers!"},O=function(e){var n=e.id,t=(e.sort_group,e.default_sort,e.children),l=(0,i.useContext)(u.default),a=l.sortId,c=l.setSortId,s=l.sortOrder,d=l.setSortOrder;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:a!==n&&"transparent",width:"100%",onClick:function(){a===n?d(!s):(c(n),d(!0))},children:[t,a===n&&(0,r.jsx)(o.In,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},2794:function(e,n,t){"use strict";t.r(n),t.d(n,{AgentCard:()=>m,AgentCardAppearances:()=>x,AgentCardInfo:()=>p});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=a[c.power.main]||a[0],u=a[c.power.backup]||a[0],d=a[c.shock]||a[0];return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main",color:s.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){return t("disrupt-main")}}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"[".concat(c.power.main_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Backup",color:u.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){return t("disrupt-backup")}}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"[".concat(c.power.backup_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Electrify",color:d.color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&2!==c.shock),content:"Restore",onClick:function(){return t("shock-restore")}}),(0,r.jsx)(i.$n,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){return t("shock-temp")}}),(0,r.jsx)(i.$n,{icon:"bolt",disabled:!c.wires.shock||0===c.shock,content:"Permanent",onClick:function(){return t("shock-perm")}})]}),children:[2===c.shock?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"[".concat(c.shock_timeleft,"s]")||-1===c.shock_timeleft&&"[Permanent]"]})]})}),(0,r.jsx)(i.wn,{title:"Access and Door Control",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Scan",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){return t("idscan-toggle")}}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Access",buttons:(0,r.jsx)(i.$n,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){return t("emergency-toggle")}})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolts",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){return t("bolt-toggle")}}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){return t("light-toggle")}}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){return t("safe-toggle")}}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){return t("speed-toggle")}}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Control",color:"bad",buttons:(0,r.jsx)(i.$n,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){return t("open-close")}}),children:!!(c.locked||c.welded)&&(0,r.jsxs)("span",{children:["[Door is ",c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"","!]"]})})]})})]})})}},5486:function(e,n,t){"use strict";t.r(n),t.d(n,{AirAlarm:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1992),s=t(4900),u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).locked;return(0,r.jsx)(a.p8,{width:570,height:t?310:755,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(c.InterfaceLockNoticeBox,{}),(0,r.jsx)(f,{}),!t&&(0,r.jsxs)(s.default.Default,{tabIndex:0,children:[(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})]})})},d=function(e){return 0===e?"green":1===e?"orange":"red"},f=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.air,s=a.mode,u=a.atmos_alarm,f=a.locked,h=a.alarmActivated,m=a.rcon,p=a.target_temp;return n=0===c.danger.overall?0===u?"Optimal":"Caution: Atmos alert in area":1===c.danger.overall?"Caution":"DANGER: Internals Required",(0,r.jsx)(o.wn,{title:"Air Status",children:c?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Pressure",children:(0,r.jsxs)(o.az,{color:d(c.danger.pressure),children:[(0,r.jsx)(o.zv,{value:c.pressure})," kPa",!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{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})}})]})]})}),(0,r.jsx)(o.Ki.Item,{label:"Oxygen",children:(0,r.jsx)(o.z2,{value:c.contents.oxygen/100,fractionDigits:"1",color:d(c.danger.oxygen)})}),(0,r.jsx)(o.Ki.Item,{label:"Nitrogen",children:(0,r.jsx)(o.z2,{value:c.contents.nitrogen/100,fractionDigits:"1",color:d(c.danger.nitrogen)})}),(0,r.jsx)(o.Ki.Item,{label:"Carbon Dioxide",children:(0,r.jsx)(o.z2,{value:c.contents.co2/100,fractionDigits:"1",color:d(c.danger.co2)})}),(0,r.jsx)(o.Ki.Item,{label:"Toxins",children:(0,r.jsx)(o.z2,{value:c.contents.plasma/100,fractionDigits:"1",color:d(c.danger.plasma)})}),c.contents.n2o>.1&&(0,r.jsx)(o.Ki.Item,{label:"Nitrous Oxide",children:(0,r.jsx)(o.z2,{value:c.contents.n2o/100,fractionDigits:"1",color:d(c.danger.n2o)})}),c.contents.h2>.1&&(0,r.jsx)(o.Ki.Item,{label:"Hydrogen",children:(0,r.jsx)(o.z2,{value:c.contents.h2/100,fractionDigits:"1",color:d(c.danger.h2)})}),c.contents.water_vapor>.1&&(0,r.jsx)(o.Ki.Item,{label:"Water Vapor",children:(0,r.jsx)(o.z2,{value:c.contents.water_vapor/100,fractionDigits:"1",color:d(c.danger.water_vapor)})}),c.contents.other>.1&&(0,r.jsx)(o.Ki.Item,{label:"Other",children:(0,r.jsx)(o.z2,{value:c.contents.other/100,fractionDigits:"1",color:d(c.danger.other)})}),(0,r.jsx)(o.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(o.az,{color:d(c.danger.temperature),children:[(0,r.jsx)(o.zv,{value:c.temperature})," K / ",(0,r.jsx)(o.zv,{value:c.temperature_c})," C\xa0",(0,r.jsx)(o.$n,{icon:"thermometer-full",content:p+" C",onClick:function(){return i("temperature")}}),(0,r.jsx)(o.$n,{content:c.thermostat_state?"On":"Off",selected:c.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,r.jsx)(o.Ki.Item,{label:"Local Status",children:(0,r.jsxs)(o.az,{color:d(c.danger.overall),children:[n,!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})]})]})}),(0,r.jsxs)(o.Ki.Item,{label:"Remote Control Settings",children:[(0,r.jsx)(o.$n,{content:"Off",selected:1===m,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,r.jsx)(o.$n,{content:"Auto",selected:2===m,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,r.jsx)(o.$n,{content:"On",selected:3===m,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,r.jsx)(o.az,{children:"Unable to acquire air sample!"})})},h=function(e){var n=(0,i.useContext)(s.default),t=n.tabIndex,l=n.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsxs)(o.tU.Tab,{selected:0===t,onClick:function(){return l(0)},children:[(0,r.jsx)(o.In,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,r.jsxs)(o.tU.Tab,{selected:1===t,onClick:function(){return l(1)},children:[(0,r.jsx)(o.In,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,r.jsxs)(o.tU.Tab,{selected:2===t,onClick:function(){return l(2)},children:[(0,r.jsx)(o.In,{name:"cog"})," Mode"]},"Mode"),(0,r.jsxs)(o.tU.Tab,{selected:3===t,onClick:function(){return l(3)},children:[(0,r.jsx)(o.In,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},m=function(e){switch((0,i.useContext)(s.default).tabIndex){case 0:return(0,r.jsx)(p,{});case 1:return(0,r.jsx)(x,{});case 2:return(0,r.jsx)(g,{});case 3:return(0,r.jsx)(j,{});default:return"WE SHOULDN'T BE HERE!"}},p=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.vents.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.direction?"Blowing":"Siphoning",icon:e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return t("command",{cmd:"direction",val:!e.direction,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(o.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"External Pressure Target",children:[(0,r.jsx)(o.zv,{value:e.external})," kPa\xa0",(0,r.jsx)(o.$n,{content:"Set",icon:"cog",onClick:function(){return t("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Reset",icon:"redo-alt",onClick:function(){return t("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)})},x=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubbers.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",val:!e.scrubbing,id_tag:e.id_tag})}})]}),(0,r.jsx)(o.Ki.Item,{label:"Range",children:(0,r.jsx)(o.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",val:!e.widenet,id_tag:e.id_tag})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(o.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",val:!e.filter_co2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",val:!e.filter_toxins,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",val:!e.filter_n2o,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",val:!e.filter_o2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",val:!e.filter_n2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",val:!e.filter_h2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",val:!e.filter_h2o,id_tag:e.id_tag})}})]})]})},e.name)})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.modes,c=i.presets,s=i.emagged,u=i.mode,d=i.preset;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"System Mode",children:Object.keys(a).map(function(e){var n=a[e];if(!n.emagonly||s)return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:n.name,icon:"cog",selected:n.id===u,onClick:function(){return t("mode",{mode:n.id})}})}),(0,r.jsx)(o.XI.Cell,{children:n.desc})]},n.name)})}),(0,r.jsxs)(o.wn,{title:"System Presets",children:[(0,r.jsx)(o.az,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,r.jsx)(o.XI,{mt:1,children:c.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:e.name,icon:"cog",selected:e.id===d,onClick:function(){return t("preset",{preset:e.id})}})}),(0,r.jsx)(o.XI.Cell,{children:e.desc})]},e.name)})})]})]})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.thresholds;return(0,r.jsx)(o.wn,{title:"Alarm Thresholds",children:(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{width:"20%",children:"Value"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),e.settings.map(function(e){return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:-1===e.selected?"Off":e.selected,onClick:function(){return t("command",{cmd:"set_threshold",env:e.env,var:e.val})}})},e.val)})]},e.name)})]})})}},6962:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockAccessController:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.exterior_status,d=s.interior_status,f=s.processing;return n="open"===u?(0,r.jsx)(i.$n,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:f,onClick:function(){return c("force_ext")}}):(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:f,onClick:function(){return c("cycle_ext_door")}}),t="open"===d?(0,r.jsx)(i.$n,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:f,color:"open"===d?"red":f?"yellow":null,onClick:function(){return c("force_int")}}):(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:f,onClick:function(){return c("cycle_int_door")}}),(0,r.jsx)(l.p8,{width:330,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Door Status",children:"closed"===u?"Locked":"Open"}),(0,r.jsx)(i.Ki.Item,{label:"Internal Door Status",children:"closed"===d?"Locked":"Open"})]})}),(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.az,{children:[n,t]})})]})})}},9281:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockElectronics:()=>c,ChooseAccess:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){return(0,r.jsx)(l.p8,{width:500,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.unrestricted_dir;return(0,r.jsx)(i.wn,{title:"Access Control",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&l,onClick:function(){return t("unrestricted_access",{unres_dir:4})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&l,onClick:function(){return t("unrestricted_access",{unres_dir:2})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&l,onClick:function(){return t("unrestricted_access",{unres_dir:8})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&l,onClick:function(){return t("unrestricted_access",{unres_dir:1})}})})]})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.selected_accesses,s=l.one_access,u=l.regions;return(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(r.Fragment,{}),grantableList:[],usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return t("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,content:"All",onClick:function(){return t("set_one_access",{access:"all"})}})]}),accesses:u,selectedList:c,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}},934:function(e,n,t){"use strict";t.r(n),t.d(n,{AlertModal:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t30?Math.ceil(b.length/4):0)+(b.length&&g?5:0),I=325+100*(x.length>2),S=function(e){0===k&&-1===e?_(x.length-1):k===x.length-1&&1===e?_(0):_(k+e)};return(0,r.jsxs)(c.p8,{title:v,height:C,width:I,children:[!!y&&(0,r.jsx)(s.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.iy||n===l.Ri?d("choose",{choice:x[k]}):n===l.s6?d("cancel"):n===l.iU?(e.preventDefault(),S(-1)):(n===l.aW||n===l.zh)&&(e.preventDefault(),S(1))},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,m:1,children:(0,r.jsx)(o.az,{color:"label",overflow:"hidden",children:b})}),(0,r.jsxs)(o.BJ.Item,{children:[!!m&&(0,r.jsx)(o.y5,{}),(0,r.jsx)(f,{selected:k})]})]})})})]})},f=function(e){var n=(0,a.Oc)().data,t=n.buttons,i=void 0===t?[]:t,l=n.large_buttons,c=n.swapped_buttons,s=e.selected;return(0,r.jsx)(o.so,{fill:!0,align:"center",direction:c?"row":"row-reverse",justify:"space-around",wrap:!0,children:null==i?void 0:i.map(function(e,n){return l&&i.length<3?(0,r.jsx)(o.so.Item,{grow:!0,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n):(0,r.jsx)(o.so.Item,{grow:+!!l,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n)})})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.large_buttons,l=e.button,c=e.selected,s=l.length>7?"100%":7;return(0,r.jsx)(o.$n,{mx:+!!i,pt:.33*!!i,content:l,fluid:!!i,onClick:function(){return t("choose",{choice:l})},selected:c,textAlign:"center",height:!!i&&2,width:!i&&s})}},6473:function(e,n,t){"use strict";t.r(n),t.d(n,{AppearanceChanger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.change_race,u=a.species,d=a.specimen,f=a.change_gender,h=a.gender,m=a.change_eye_color,p=a.change_skin_tone,x=a.change_skin_color,g=a.change_runechat_color,j=a.change_head_accessory_color,b=a.change_hair_color,y=a.change_secondary_hair_color,v=a.change_facial_hair_color,w=a.change_secondary_facial_hair_color,k=a.change_head_marking_color,_=a.change_body_marking_color,C=a.change_tail_marking_color,I=a.change_head_accessory,S=a.head_accessory_styles,O=a.head_accessory_style,A=a.change_hair,P=a.hair_styles,E=a.hair_style,B=a.change_hair_gradient,z=a.change_facial_hair,T=a.facial_hair_styles,N=a.facial_hair_style,R=a.change_head_markings,$=a.head_marking_styles,D=a.head_marking_style,M=a.change_body_markings,L=a.body_marking_styles,K=a.body_marking_style,J=a.change_tail_markings,X=a.tail_marking_styles,U=a.tail_marking_style,F=a.change_body_accessory,V=a.body_accessory_styles,H=a.body_accessory_style,W=a.change_alt_head,q=a.alt_head_styles,G=a.alt_head_style,Q=!1;return(m||p||x||j||g||b||y||v||w||k||_||C)&&(Q=!0),(0,r.jsx)(l.p8,{width:800,height:450,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[!!s&&(0,r.jsx)(i.Ki.Item,{label:"Species",children:u.map(function(e){return(0,r.jsx)(i.$n,{content:e.specimen,selected:e.specimen===d,onClick:function(){return t("race",{race:e.specimen})}},e.specimen)})}),!!f&&(0,r.jsxs)(i.Ki.Item,{label:"Gender",children:[(0,r.jsx)(i.$n,{content:"Male",selected:"male"===h,onClick:function(){return t("gender",{gender:"male"})}}),(0,r.jsx)(i.$n,{content:"Female",selected:"female"===h,onClick:function(){return t("gender",{gender:"female"})}}),(0,r.jsx)(i.$n,{content:"Genderless",selected:"plural"===h,onClick:function(){return t("gender",{gender:"plural"})}})]}),!!Q&&(0,r.jsx)(c,{}),!!I&&(0,r.jsx)(i.Ki.Item,{label:"Head accessory",children:S.map(function(e){return(0,r.jsx)(i.$n,{content:e.headaccessorystyle,selected:e.headaccessorystyle===O,onClick:function(){return t("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)})}),!!A&&(0,r.jsx)(i.Ki.Item,{label:"Hair",children:P.map(function(e){return(0,r.jsx)(i.$n,{content:e.hairstyle,selected:e.hairstyle===E,onClick:function(){return t("hair",{hair:e.hairstyle})}},e.hairstyle)})}),!!B&&(0,r.jsxs)(i.Ki.Item,{label:"Hair Gradient",children:[(0,r.jsx)(i.$n,{content:"Change Style",onClick:function(){return t("hair_gradient")}}),(0,r.jsx)(i.$n,{content:"Change Offset",onClick:function(){return t("hair_gradient_offset")}}),(0,r.jsx)(i.$n,{content:"Change Color",onClick:function(){return t("hair_gradient_colour")}}),(0,r.jsx)(i.$n,{content:"Change Alpha",onClick:function(){return t("hair_gradient_alpha")}})]}),!!z&&(0,r.jsx)(i.Ki.Item,{label:"Facial hair",children:T.map(function(e){return(0,r.jsx)(i.$n,{content:e.facialhairstyle,selected:e.facialhairstyle===N,onClick:function(){return t("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)})}),!!R&&(0,r.jsx)(i.Ki.Item,{label:"Head markings",children:$.map(function(e){return(0,r.jsx)(i.$n,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return t("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)})}),!!M&&(0,r.jsx)(i.Ki.Item,{label:"Body markings",children:L.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===K,onClick:function(){return t("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)})}),!!J&&(0,r.jsx)(i.Ki.Item,{label:"Tail markings",children:X.map(function(e){return(0,r.jsx)(i.$n,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===U,onClick:function(){return t("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)})}),!!F&&(0,r.jsx)(i.Ki.Item,{label:"Body accessory",children:V.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===H,onClick:function(){return t("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)})}),!!W&&(0,r.jsx)(i.Ki.Item,{label:"Alternate head",children:q.map(function(e){return(0,r.jsx)(i.$n,{content:e.altheadstyle,selected:e.altheadstyle===G,onClick:function(){return t("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.Ki.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_runechat_color",text:"Change runechat color",action:"runechat_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!!l[e.key]&&(0,r.jsx)(i.$n,{content:e.text,onClick:function(){return t(e.action)}},e.key)})})}},6085:function(e,n,t){"use strict";t.r(n),t.d(n,{ArcadeBattle:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e,n){var t=(0,o.Oc)(),a=t.act,c=t.data,s=c.enemyName,u=c.playerHP,d=c.playerMaxHP,f=c.playerMP,h=c.playerMaxMP,m=c.enemyHP,p=c.enemyMaxHP,x=c.onCooldown,g=c.gameOver,j=c.previousEvent;return g?(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,align:"center",title:m<1?"Rejoyce!":"Game Over!",children:(0,r.jsxs)(i.BJ,{justify:"space-between",vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:j})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(i.$n,{bold:!0,fluid:!0,height:"100%",fontSize:"min(8vw, 15vh)",textAlign:"center",verticalAlignContent:"middle",onClick:function(){return a("newgame")},children:"New Game"})})]})})})}):(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:s,children:(0,r.jsxs)(i.z2,{maxValue:p,minValue:0,value:m,ranges:{red:[-10,10],orange:[10,20],green:[20,p]},children:["Their Health: ",m]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Fight!",children:j})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"You",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:d,minValue:0,value:u,ranges:{red:[-10,10],orange:[10,20],green:[20,d]},children:["Your Health: ",u]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:h,minValue:0,value:f,ranges:{red:[-10,h/4],orange:[h/4,h/2],green:[h/2,h]},children:["Your Magic: ",f]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{bold:!0,align:"center",children:"What will you do?"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"burst",lineHeight:3,onClick:function(){return a("attack")},disabled:x,children:"Attack"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"plus",lineHeight:3,onClick:function(){return a("heal")},disabled:x,children:"Heal"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"star",lineHeight:3,onClick:function(){return a("charge")},disabled:x,children:"Recharge"})})]})})]})})})]})})})}},3438:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosAlertConsole:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.pressure,u=a.max_pressure,d=a.filter_type,f=a.filter_type_list;return(0,r.jsx)(l.p8,{width:380,height:160,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:s,tickWhileDragging:!0,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Filter",children:f.map(function(e){return(0,r.jsx)(i.$n,{selected:e.gas_type===d,content:e.label,onClick:function(){return t("set_filter",{filter:e.gas_type})}},e.label)})})]})})})})}},7440:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosMixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.on,u=a.pressure,d=a.max_pressure,f=a.node1_concentration,h=a.node2_concentration;return(0,r.jsx)(l.p8,{width:330,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:u,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:u===d,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(c,{node_name:"Node 1",node_ref:f}),(0,r.jsx)(c,{node_name:"Node 2",node_ref:h})]})})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.node_name,a=e.node_ref;return(0,r.jsxs)(i.Ki.Item,{label:l,children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a-10)/100})}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,step:1,stepPixelSize:10,minValue:0,maxValue:100,value:a,onChange:function(e){return t("set_node",{node_name:l,concentration:e/100})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a+10)/100})}})]})}},7897:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosPump:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.rate,u=a.max_rate,d=a.gas_unit,f=a.step;return(0,r.jsx)(l.p8,{width:330,height:110,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_rate")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_rate",{rate:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_rate")}})]})]})})})})}},1164:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTankControl:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.sensors||{};return(0,r.jsx)(c.p8,{width:400,height:435,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[Object.keys(d).map(function(e){return(0,r.jsx)(i.wn,{title:e,children:(0,r.jsxs)(i.Ki,{children:[Object.keys(d[e]).indexOf("pressure")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[d[e].pressure," kpa"]}):"",Object.keys(d[e]).indexOf("temperature")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[d[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o","h2"].map(function(n){return Object.keys(d[e]).indexOf(n)>-1?(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(n),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(n),value:d[e][n],minValue:0,maxValue:100,children:(0,o.Mg)(d[e][n],2)+"%"})},(0,a.wM)(n)):""})]})},e)}),(0,r.jsx)(i.wn,{title:"Inlets",children:s.inlets&&Object.keys(s.inlets).length>0?s.inlets.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_inlet_active",{dev:e.uid})}})}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:e.rate,onChange:function(n){return t("set_inlet_volume_rate",{dev:e.uid,val:n})}})})]})},e)}):""}),(0,r.jsxs)(i.wn,{title:"Outlets",children:[s.vent_outlets&&Object.keys(s.vent_outlets).length>0?s.vent_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_outlet_active",{dev:e.uid})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(i.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:1})}}),(0,r.jsx)(i.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:2})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:e.rate,onChange:function(n){return t("set_outlet_pressure",{dev:e.uid,val:n})}})})]})},e)}):"",s.scrubber_outlets&&Object.keys(s.scrubber_outlets).length>0?(0,r.jsx)(u,{}):""]})]})})},u=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubber_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[(0,r.jsx)(i.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",id_tag:e.id_tag})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Range",children:(0,r.jsx)(i.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",id_tag:e.id_tag})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(i.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",id_tag:e.id_tag})}})]})]})},e.name)})}},8340:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTemperatureGate:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.temperature,u=a.max_temp,d=a.temp_unit,f=a.step,h=a.inverted;return(0,r.jsx)(l.p8,{width:330,height:130,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inverted",children:(0,r.jsx)(i.$n,{icon:h?"arrow-up":"arrow-down",content:h?"Yes":"No",color:h?null:"red",selected:h,onClick:function(){return t("inverted")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_temp")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_temperature",{temperature:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_temp")}})]})]})})})})}},6561:function(e,n,t){"use strict";t.r(n),t.d(n,{AugmentMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"".concat(t.current_level," / ").concat(t.max_level):"0 / ".concat(e.max_level);return(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.BJ,{vertical:!1,children:[(0,r.jsx)(o.$n,{height:"20px",width:"35px",mb:1,textAlign:"center",content:i,disabled:i>c||t&&t.current_level===t.max_level,tooltip:"Purchase this ability?",onClick:function(){n("purchase",{ability_path:e.ability_path}),p(m)}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.desc||"Description not available"}),(0,r.jsxs)(o.BJ.Item,{children:["Level: ",(0,r.jsx)("span",{style:{color:"green"},children:l}),v&&e.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",e.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})]})},h=function(e){var n=e.act,t=e.abilityTabs,i=e.knownAbilities,l=e.usableSwarms,a=i.filter(function(e){return e.current_levell,tooltip:"Upgrade this ability?",onClick:function(){return n("purchase",{ability_path:e.ability_path})}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.upgrade_text}),(0,r.jsxs)(o.BJ.Item,{children:["Level:"," ",(0,r.jsx)("span",{style:{color:"green"},children:"".concat(e.current_level," / ").concat(e.max_level)}),i&&i.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",i.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})}},8762:function(e,n,t){"use strict";t.r(n),t.d(n,{Autolathe:()=>f});var r=t(8138),i=t(8587),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn)&&!(e.requirements.glass*r>t)},f=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,f=s.total_amount,h=(s.max_amount,s.metal_amount),m=s.glass_amount,p=s.busyname,x=s.busyamt,g=s.showhacked,j=s.buildQueue,b=s.buildQueueLen,y=s.recipes,v=s.categories,w=s.fill_percent,k=u((0,a.QY)("category","Tools"),2),_=k[0],C=k[1],I=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),S=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),O=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),A=u((0,a.QY)("searchText",""),2),P=A[0],E=A[1],B=[];b>0&&(B=j.map(function(e,n){return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{fluid:!0,icon:"times",color:"transparent",content:e[0],onClick:function(){return t("remove_from_queue",{remove_from_queue:n+1})}},n)},n)}));var z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return(e.category.indexOf(_)>-1||!!n)&&(!!g||!e.hacked)});if(n){var r=(0,l.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name.toLowerCase()})}(y,P),T="Build";return P?T="Results for: '"+P+"':":_&&(T="Build ("+_+")"),(0,r.jsx)(c.p8,{width:750,height:525,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{width:"70%",children:(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:T,buttons:(0,r.jsx)(o.ms,{width:"150px",options:v,selected:_,onSelected:function(e){return C(e)}}),children:[(0,r.jsx)(o.pd,{fluid:!0,mb:1,placeholder:"Search for...",onChange:function(e){return E(e)},value:P}),z.map(function(e){return(0,r.jsxs)(o.BJ.Item,{grow:!0,children:[(0,r.jsx)("img",{src:"data:image /jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&1===x,disabled:!d(e,h,m,1),onClick:function(){return t("make",{make:e.uid,multiplier:1})},children:e.name}),e.max_multiplier>=10&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&10===x,disabled:!d(e,h,m,10),onClick:function(){return t("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&25===x,disabled:!d(e,h,m,25),onClick:function(){return t("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,r.jsxs)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&x===e.max_multiplier,disabled:!d(e,h,m,e.max_multiplier),onClick:function(){return t("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]}),e.requirements&&Object.keys(e.requirements).map(function(n){return(0,l.Sn)(n)+": "+e.requirements[n]}).join(", ")||(0,r.jsx)(o.az,{children:"No resources required."})]},e.uid)})]})}),(0,r.jsxs)(o.BJ.Item,{width:"30%",children:[(0,r.jsx)(o.wn,{title:"Materials",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Metal",children:I}),(0,r.jsx)(o.Ki.Item,{label:"Glass",children:S}),(0,r.jsx)(o.Ki.Item,{label:"Total",children:O}),(0,r.jsxs)(o.Ki.Item,{label:"Storage",children:[w,"% Full"]})]})}),(0,r.jsx)(o.wn,{title:"Building",children:(0,r.jsx)(o.az,{color:p?"green":"",children:p||"Nothing"})}),(0,r.jsxs)(o.wn,{title:"Build Queue",height:23.7,children:[B,(0,r.jsx)(o.$n,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!b,onClick:function(){return t("clear_queue")}})]})]})]})})})}},9766:function(e,n,t){"use strict";t.r(n),t.d(n,{BioChipPad:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.glow_brightness_base,s=a.glow_brightness_power,u=a.glow_contrast_base,d=a.glow_contrast_power,f=a.exposure_brightness_base,h=a.exposure_brightness_power,m=a.exposure_contrast_base,p=a.exposure_contrast_power;return(0,r.jsx)(l.p8,{title:"BloomEdit",width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Bloom Edit",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:c,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:s,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:u,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:d,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:f,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:h,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:m,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:p,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_power",{value:e})}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{children:[(0,r.jsx)(i.$n,{content:"Reload Lamps with New Parameters",onClick:function(){return t("update_lamps")}}),(0,r.jsx)(i.$n,{content:"Reset to Default",onClick:function(){return t("default")}})]})]})})})})}},7166:function(e,n,t){"use strict";t.r(n),t.d(n,{BlueSpaceArtilleryControl:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.ready?(0,r.jsx)(i.Ki.Item,{label:"Status",color:"green",children:"Ready"}):c.reloadtime_text?(0,r.jsx)(i.Ki.Item,{label:"Reloading In",color:"red",children:c.reloadtime_text}):(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:"No cannon connected!"}),(0,r.jsx)(l.p8,{width:400,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[c.notice&&(0,r.jsx)(i.Ki.Item,{label:"Alert",color:"red",children:c.notice}),n,(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.$n,{icon:"crosshairs",content:c.target?c.target:"None",onClick:function(){return a("recalibrate")}})}),1===c.ready&&!!c.target&&(0,r.jsx)(i.Ki.Item,{label:"Firing",children:(0,r.jsx)(i.$n,{icon:"skull",content:"FIRE!",color:"red",onClick:function(){return a("fire")}})}),!c.connected&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance",children:(0,r.jsx)(i.$n,{icon:"wrench",content:"Complete Deployment",onClick:function(){return a("build")}})})]})})})})})})}},8128:function(e,n,t){"use strict";t.r(n),t.d(n,{Alerts:()=>u,BluespaceTap:()=>s,Incursion:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){if((0,l.Oc)().data.portaling)return(0,r.jsx)(i.Rr,{fontsize:"256px",backgroundColor:"rgba(35,0,0,0.85)",children:(0,r.jsx)(i.Z8,{fontsize:"256px",interval:Math.random()>.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"skull",size:14,mb:"64px"}),(0,r.jsx)("br",{}),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})},s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.product||[],f=s.desiredMiningPower,h=s.miningPower,m=s.points,p=s.totalPoints,x=s.powerUse,g=s.availablePower,j=s.emagged,b=s.dirty,y=s.autoShutown,v=s.stabilizers,w=s.stabilizerPower,k=s.stabilizerPriority;return(0,r.jsx)(a.p8,{width:650,height:450,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(u,{}),(0,r.jsx)(i.Nt,{title:"Input Management",children:(0,r.jsxs)(i.wn,{fill:!0,title:"Input",children:[(0,r.jsx)(i.$n,{icon:y&&!j?"toggle-on":"toggle-off",content:"Auto shutdown",color:y&&!j?"green":"red",disabled:!!j,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){return t("auto_shutdown")}}),(0,r.jsx)(i.$n,{icon:v&&!j?"toggle-on":"toggle-off",content:"Stabilizers",color:v&&!j?"green":"red",disabled:!!j,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){return t("stabilizers")}}),(0,r.jsx)(i.$n,{icon:k&&!j?"toggle-on":"toggle-off",content:"Stabilizer priority",color:k&&!j?"green":"red",disabled:!!j,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){return t("stabilizer_priority")}}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Desired Mining Power",children:(0,o.d5)(f)}),(0,r.jsx)(i.Ki.Item,{verticalAlign:"top",label:"Set Desired Mining Power",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"step-backward",disabled:0===f||j,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:0})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:0===f||j,onClick:function(){return t("set",{set_power:f-1e7})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===f||j,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f-1e6})}})]}),(0,r.jsx)(i.BJ.Item,{mx:1,children:(0,r.jsx)(i.Q7,{disabled:j,minValue:0,value:f,maxValue:1/0,step:1,onChange:function(e){return t("set",{set_power:e})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:j,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e6})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:j,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e7})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Total Power Use",children:(0,o.d5)(x)}),(0,r.jsx)(i.Ki.Item,{label:"Mining Power Use",children:(0,o.d5)(h)}),(0,r.jsx)(i.Ki.Item,{label:"Stabilizer Power Use",children:(0,o.d5)(w)}),(0,r.jsx)(i.Ki.Item,{label:"Surplus Power",children:(0,o.d5)(g)})]})]})}),(0,r.jsxs)(i.wn,{fill:!0,title:"Output",children:[b?(0,r.jsx)(i.Rr,{backgroundColor:"rgba(63, 39, 18, 0.85)",children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"brown",fontsize:"256px",textAlign:"center",children:["Blockage Detected",(0,r.jsx)("br",{}),"Cleanup Required"]})})}):"",(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available Points",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Total Points",children:p})]})})}),(0,r.jsx)(i.BJ.Item,{align:"end",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.Ki,{children:d.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:(0,r.jsx)(i.$n,{disabled:e.price>=m,onClick:function(){return t("vend",{target:e.key})},content:e.price})},e.key)})})})})]})]})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.product;var o=t.miningPower,a=t.stabilizerPower,c=t.emagged,s=(t.safeLevels,t.autoShutown),u=t.stabilizers;return t.overhead,(0,r.jsxs)(r.Fragment,{children:[!s&&!c&&(0,r.jsx)(i.IC,{danger:1,children:"Auto shutdown disabled"}),c?(0,r.jsx)(i.IC,{danger:1,children:"All safeties disabled"}):o<=15e6?"":u?o>a+15e6?(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,r.jsx)(i.IC,{children:"High Power, engaging stabilizers"}):(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers disabled, Instability likely"})]})}},6807:function(e,n,t){"use strict";t.r(n),t.d(n,{BodyScanner:()=>p});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."],["paraplegic","bad","Lumbar nerves damaged."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],d={average:[.25,.5],bad:[.5,1/0]},f=function(e,n){for(var t=[],r=0;r0?e.filter(function(e){return!!e}).reduce(function(e,n){return(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)(i.az,{children:n},n)]})},null):null},m=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""},p=function(e){var n=(0,l.Oc)().data,t=n.occupied,i=n.occupant,o=t?(0,r.jsx)(x,{occupant:void 0===i?{}:i}):(0,r.jsx)(k,{});return(0,r.jsx)(a.p8,{width:700,height:600,title:"Body Scanner",children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:o})})},x=function(e){var n=e.occupant;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(g,{occupant:n}),(0,r.jsx)(j,{occupant:n}),(0,r.jsx)(b,{occupant:n}),(0,r.jsx)(v,{organs:n.extOrgan}),(0,r.jsx)(w,{organs:n.intOrgan})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"print",onClick:function(){return t("print_p")},children:"Print Report"}),(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectify")},children:"Eject"})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:o.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:o.maxHealth,value:o.health/o.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[o.stat][0],children:c[o.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempC)}),"\xb0C,\xa0",(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempF)}),"\xb0F"]}),(0,r.jsx)(i.Ki.Item,{label:"Implants",children:o.implant_len?(0,r.jsx)(i.az,{children:o.implant.map(function(e){return e.name}).join(", ")}):(0,r.jsx)(i.az,{color:"label",children:"None"})})]})})},j=function(e){var n=e.occupant;return n.hasBorer||n.blind||n.colourblind||n.nearsighted||n.hasVirus||n.paraplegic?(0,r.jsx)(i.wn,{title:"Abnormalities",children:s.map(function(e,t){if(n[e[0]])return(0,r.jsx)(i.az,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])})}):(0,r.jsx)(i.wn,{title:"Abnormalities",children:(0,r.jsx)(i.az,{color:"label",children:"No abnormalities found."})})},b=function(e){var n=e.occupant;return(0,r.jsx)(i.wn,{title:"Damage",children:(0,r.jsx)(i.XI,{children:f(u,function(e,t,o){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.XI.Row,{color:"label",children:[(0,r.jsxs)(i.XI.Cell,{children:[e[0],":"]}),(0,r.jsx)(i.XI.Cell,{children:!!t&&t[0]+":"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(y,{value:n[e[1]],marginBottom:o100)&&"average"||!!e.status.robotic&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{m:-.5,min:"0",max:e.maxHealth,mt:n>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:d,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.m_,{content:"Total damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"heartbeat",mr:.5}),Math.round(e.totalLoss)]})}),!!e.bruteLoss&&(0,r.jsx)(i.m_,{content:"Brute damage",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(0,r.jsx)(i.In,{name:"bone",mr:.5}),Math.round(e.bruteLoss)]})}),!!e.fireLoss&&(0,r.jsx)(i.m_,{content:"Burn damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"fire",mr:.5}),Math.round(e.fireLoss)]})})]})})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,m(e.germ_level),!!e.open&&"Open incision"])}),(0,r.jsxs)(i.az,{inline:!0,children:[h([!!e.status.splinted&&(0,r.jsx)(i.az,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})]),h(e.shrapnel.map(function(e){return e.known?e.name:"Unknown object"}))]})]})]},n)})]})})},w=function(e){return 0===e.organs.length?(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsx)(i.az,{color:"label",children:"N/A"})}):(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:"Damage"}),(0,r.jsx)(i.XI.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{color:!!e.dead&&"bad"||e.germ_level>100&&"average"||e.robotic>0&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:n>0&&"0.5rem",ranges:d,children:Math.round(e.damage)})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([m(e.germ_level)])}),(0,r.jsx)(i.az,{inline:!0,children:h([1===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),2===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Assisted"}),!!e.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})])})]})]},n)})]})})},k=function(){return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},2790:function(e,n,t){"use strict";t.r(n),t.d(n,{BookBinder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.selectedbook,u=c.book_categories,d=[];return u.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(l.p8,{width:600,height:400,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,title:"Book Binder",buttons:(0,r.jsx)(i.$n,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return t("print_book")}}),children:[(0,r.jsxs)(i.az,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Title",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,a.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(i.Ki.Item,{label:"Author",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,a.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(i.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.ms,{width:"190px",options:u.map(function(e){return e.description}),onSelected:function(e){return t("toggle_binder_category",{category_id:d[e]})}})})}),(0,r.jsx)(i.Ki.Item,{label:"Summary",children:(0,r.jsx)(i.$n,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,a.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(i.Ki.Item,{children:s.summary})]}),(0,r.jsx)("br",{}),u.filter(function(e){return s.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(i.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_binder_category",{category_id:e.category_id})}},e.category_id)})]})})]})})})]})}},1326:function(e,n,t){"use strict";t.r(n),t.d(n,{BotCall:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.cleanblood,f=c.area;return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsx)(i.wn,{title:"Cleaning Settings",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Clean Blood",disabled:s,onClick:function(){return t("blood")}})}),(0,r.jsxs)(i.wn,{title:"Misc Settings",children:[(0,r.jsx)(i.$n,{fluid:!0,content:f?"Reset Area Selection":"Restrict to Current Area",onClick:function(){return t("area")}}),null!==f&&(0,r.jsx)(i.az,{mb:1,children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Locked Area",children:f})})})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},3578:function(e,n,t){"use strict";t.r(n),t.d(n,{BotFloor:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.hullplating,f=c.replace,h=c.eat,m=c.make,p=c.fixfloor,x=c.nag_empty,g=c.magnet,j=c.tiles_amount;return(0,r.jsx)(l.p8,{width:500,height:510,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Floor Settings",children:[(0,r.jsx)(i.az,{mb:"5px",children:(0,r.jsx)(i.Ki.Item,{label:"Tiles Left",children:j})}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:s,onClick:function(){return t("autotile")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:s,onClick:function(){return t("replacetiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Repair damaged tiles and platings",disabled:s,onClick:function(){return t("fixfloors")}})]}),(0,r.jsxs)(i.wn,{title:"Miscellaneous",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:s,onClick:function(){return t("eattiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Make pieces of metal into tiles when empty",disabled:s,onClick:function(){return t("maketiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:x,content:"Transmit notice when empty",disabled:s,onClick:function(){return t("nagonempty")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:g,content:"Traction Magnets",disabled:s,onClick:function(){return t("anchored")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},5144:function(e,n,t){"use strict";t.r(n),t.d(n,{BotHonk:()=>a});var r=t(8138),i=t(2864),o=t(3384),l=t(9226),a=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.p8,{width:500,height:220,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(l.BotStatus,{})})})}},2078:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMed:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.shut_up,f=c.declare_crit,h=c.stationary_mode,m=c.heal_threshold,p=c.injection_amount,x=c.use_beaker,g=c.treat_virus,j=c.reagent_glass;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Communication Settings",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Speaker",checked:!d,disabled:s,onClick:function(){return t("toggle_speaker")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:f,disabled:s,onClick:function(){return t("toggle_critical_alerts")}})]}),(0,r.jsxs)(i.wn,{fill:!0,title:"Treatment Settings",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Healing Threshold",children:(0,r.jsx)(i.Ap,{value:m.value,minValue:m.min,maxValue:m.max,step:5,disabled:s,onChange:function(e,n){return t("set_heal_threshold",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Injection Level",children:(0,r.jsx)(i.Ap,{value:p.value,minValue:p.min,maxValue:p.max,step:5,format:function(e){return"".concat(e,"u")},disabled:s,onChange:function(e,n){return t("set_injection_amount",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reagent Source",children:(0,r.jsx)(i.$n,{content:x?"Beaker":"Internal Synthesizer",icon:x?"flask":"cogs",disabled:s,onClick:function(){return t("toggle_use_beaker")}})}),j&&(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsxs)(i.BJ,{inline:!0,width:"100%",children:[(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsxs)(i.z2,{value:j.amount,minValue:0,maxValue:j.max_amount,children:[j.amount," / ",j.max_amount]})}),(0,r.jsx)(i.BJ.Item,{ml:1,children:(0,r.jsx)(i.$n,{content:"Eject",disabled:s,onClick:function(){return t("eject_reagent_glass")}})})]})})]}),(0,r.jsx)(i.$n.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:g,disabled:s,onClick:function(){return t("toggle_treat_viral")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:s,onClick:function(){return t("toggle_stationary_mode")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})})}},881:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMule:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.check_id,f=c.check_weapons,h=c.check_warrant,m=c.arrest_mode,p=c.arrest_declare;return(0,r.jsx)(l.p8,{width:500,height:445,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Who To Arrest",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:s,onClick:function(){return t("authid")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:s,onClick:function(){return t("authwarrant")}})]}),(0,r.jsxs)(i.wn,{title:"Arrest Procedure",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Detain Targets Indefinitely",disabled:s,onClick:function(){return t("arrtype")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Announce Arrests On Radio",disabled:s,onClick:function(){return t("arrdeclare")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},2850:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigCells:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=e.cell,t=(0,o.Oc)().act,l=n.cell_id,a=n.occupant,c=n.crimes,s=n.brigged_by,u=n.time_left_seconds,d=n.time_set_seconds,f=n.ref,h="";return u>0&&(h+=" BrigCells__listRow--active"),(0,r.jsxs)(i.XI.Row,{className:h,children:[(0,r.jsx)(i.XI.Cell,{children:l}),(0,r.jsx)(i.XI.Cell,{children:a}),(0,r.jsx)(i.XI.Cell,{children:c}),(0,r.jsx)(i.XI.Cell,{children:s}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:d})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:u})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{type:"button",onClick:function(){t("release",{ref:f})},children:"Release"})})]})},c=function(e){var n=e.cells;return(0,r.jsxs)(i.XI,{className:"BrigCells__list",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{header:!0,children:"Cell"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Occupant"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Crimes"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Brigged By"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Brigged For"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Left"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Release"})]}),n.map(function(e){return(0,r.jsx)(a,{cell:e},e.ref)})]})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).cells;return(0,r.jsx)(l.p8,{theme:"security",width:800,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{cells:t})})})})})}},9478:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigTimer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;a.nameText=a.occupant,a.timing&&(a.prisoner_hasrec?a.nameText=(0,r.jsx)(i.az,{color:"green",children:a.occupant}):a.nameText=(0,r.jsx)(i.az,{color:"red",children:a.occupant}));var c="pencil-alt";a.prisoner_name&&!a.prisoner_hasrec&&(c="exclamation-triangle");var s=[],u=0;for(u=0;ud});var r=t(8138),i=t(4530),o=t(2864),l=t(3384),a=t(7790);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tp,CameraConsoleContent:()=>x});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(5490),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te?this.substring(0,e)+"...":this};var h=function(e,n){if(!n)return[];var t,r,i=e.findIndex(function(e){return e.name===n.name});return[null==(t=e[i-1])?void 0:t.name,null==(r=e[i+1])?void 0:r.name]},m=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,c.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name})},p=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,o=i.mapRef,c=i.activeCamera,d=f(h(m(i.cameras),c),2),p=d[0],g=d[1];return(0,r.jsxs)(u.p8,{width:870,height:708,children:[(0,r.jsx)("div",{className:"CameraConsole__left",children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(l.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(x,{})})})}),(0,r.jsxs)("div",{className:"CameraConsole__right",children:[(0,r.jsxs)("div",{className:"CameraConsole__toolbar",children:[(0,r.jsx)("b",{children:"Camera: "}),c&&c.name||"—"]}),(0,r.jsxs)("div",{className:(0,a.Ly)(["CameraConsole__toolbar","CameraConsole__toolbar--right"]),children:[(0,r.jsx)(l.$n,{icon:"chevron-left",disabled:!p,onClick:function(){return t("switch_camera",{name:p})}}),(0,r.jsx)(l.$n,{icon:"chevron-right",disabled:!g,onClick:function(){return t("switch_camera",{name:g})}})]}),(0,r.jsx)(l.D1,{className:"CameraConsole__map",params:{id:o,type:"map"}})]})]})},x=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,c=f((0,o.useState)(""),2),u=c[0],d=c[1],h=i.activeCamera,p=m(i.cameras,u);return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search for a camera",onChange:function(e){return d(e)}})}),(0,r.jsx)(l.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:p.map(function(e){return(0,r.jsx)("div",{title:e.name,className:(0,a.Ly)(["Button","Button--fluid",h&&e.name===h.name?"Button--selected":"Button--color--transparent"]),onClick:function(){return t("switch_camera",{name:e.name})},children:e.name.trimLongStr(23)},e.name)})})})]})}},2094:function(e,n,t){"use strict";t.r(n),t.d(n,{Canister:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=s.portConnected,d=s.tankPressure,f=s.releasePressure,h=s.defaultReleasePressure,m=s.minReleasePressure,p=s.maxReleasePressure,x=s.valveOpen,g=s.name,j=s.canLabel,b=s.colorContainer,y=s.color_index,v=s.hasHoldingTank,w=s.holdingTank,k="";y.prim&&(k=b.prim.options[y.prim].name);var _="";y.sec&&(_=b.sec.options[y.sec].name);var C="";y.ter&&(C=b.ter.options[y.ter].name);var I="";y.quart&&(I=b.quart.options[y.quart].name);var S=[],O=[],A=[],P=[],E=0;for(E=0;El});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.scanned_card,l=e.modifying_card;return(0,r.jsx)(i.wn,{title:"Authentication",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Login/Logout",children:t?(0,r.jsx)(i.$n,{icon:"sign-out-alt",selected:!0,onClick:function(){return n("interact_scanned")},children:"Log Out: ".concat(t.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_scanned")},children:"-----"})}),(0,r.jsx)(i.Ki.Item,{label:"Card To Modify",children:l?(0,r.jsx)(i.$n,{icon:"eject",selected:!0,onClick:function(){return n("interact_modify")},children:"Remove Card: ".concat(l.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_modify")},children:"-----"})})]})})}},7542:function(e,n,t){"use strict";t.r(n),t.d(n,{CardInformation:()=>l,CardSkins:()=>a,DropdownCardSkins:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.card;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Registered Name",children:(0,r.jsx)(i.$n,{icon:t&&"Unknown"!==t.registered_name?"pencil-alt":"exclamation-triangle",selected:!!t,onClick:function(){return n("reg")},children:null==t?void 0:t.registered_name})}),(0,r.jsx)(i.Ki.Item,{label:"Account Number",children:(0,r.jsx)(i.$n,{icon:(null==t?void 0:t.associated_account_number)?"pencil-alt":"exclamation-triangle",selected:!!(null==t?void 0:t.associated_account_number),onClick:function(){return n("set_card_account_number")},children:(null==t?void 0:t.associated_account_number)?null==t?void 0:t.associated_account_number:"None"})})]})},a=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[t.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)}),!!a&&(0,r.jsx)(i.az,{children:Array.isArray(c)&&c.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,color:"purple",onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)})})]})},c=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins,s=t.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}),u=Array.isArray(c)?c.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}):[],d=s.filter(function(e){return e.value===(null==l?void 0:l.current_skin)}).length>0;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[(0,r.jsx)(i.Ki.Item,{label:"Department Skins",children:(0,r.jsx)(i.ms,{options:s,selected:d?null==l?void 0:l.current_skin_name:null,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})}),!!a&&(0,r.jsx)(i.Ki.Item,{label:"Centcom Skins",children:(0,r.jsx)(i.ms,{options:u,selected:d?null:null==l?void 0:l.current_skin_name,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})})]})}},991:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputer:()=>x,SlashedIcon:()=>f});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(1487),s=t(4287),u=t(6530),d=t(9490),f=function(e){var n=e.title,t=e.name,o=e.text;return(0,r.jsx)(i.wn,{fill:!0,title:n,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:t,size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),o]})})})},h=function(){return(0,r.jsx)(f,{title:"Warning",name:"user",text:"Not logged in"})},m=function(){return(0,r.jsx)(f,{title:"Records",name:"scroll",text:"No records"})},p=function(){return(0,r.jsx)(f,{title:"Card Missing",name:"id-card",text:"No card to modify"})},x=function(){var e,n=(0,o.Oc)(),t=n.act,f=n.data,x=f.all_centcom_skins,g=f.auth_or_ghost,j=f.authenticated,b=f.can_terminate,y=f.card_skins,v=f.cooldown_time,w=f.is_centcom,k=f.job_slots,_=f.job_formats,C=f.jobs_dept,I=f.jobs,S=f.mode,O=f.modifying_card,A=f.people_dept,P=f.priority_jobs,E=f.records,B=f.regions,z=f.scanned_card,T=f.selectedAccess,N=f.target_dept,R=(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:0===S,onClick:function(){return t("mode",{mode:0})},children:"Job Transfers"}),!N&&(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:2===S,onClick:function(){return t("mode",{mode:2})},children:"Access Modification"}),(0,r.jsx)(i.tU.Tab,{icon:"folder-open",selected:1===S,onClick:function(){return t("mode",{mode:1})},children:"Job Management"}),(0,r.jsx)(i.tU.Tab,{icon:"scroll",selected:3===S,onClick:function(){return t("mode",{mode:3})},children:"Records"}),(0,r.jsx)(i.tU.Tab,{icon:"users",selected:4===S,onClick:function(){return t("mode",{mode:4})},children:"Department"})]});switch(S){case 0:e=j&&z?O?(0,r.jsx)(u.CardComputerJobTransfer,{target_dept:N,card:O,can_terminate:b,is_centcom:w,jobs:I,job_colors:_,jobs_dept:C,card_skins:y,all_centcom_skins:x}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 1:e=g?(0,r.jsx)(s.CardComputerJobPriority,{cooldown_time:v,target_dept:N,priority_jobs:P,job_slots:k}):(0,r.jsx)(h,{});break;case 2:e=j&&z?O?(0,r.jsx)(a.AccessList,{accesses:B,selectedList:T,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 3:e=j?E.length?(0,r.jsx)(d.CardComputerRecordsLog,{authenticated:j,records:E,target_dept:N,is_centcom:w}):(0,r.jsx)(m,{}):(0,r.jsx)(h,{});break;case 4:e=j&&z?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Your Team",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Name"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Sec Status"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Actions"})]}),A.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.name}),(0,r.jsx)(i.XI.Cell,{children:e.title}),(0,r.jsx)(i.XI.Cell,{children:e.crimstat}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{disabled:!e.demotable,onClick:function(){return t("remote_demote",{remote_demote:e.name})},children:e.buttontext})})]},e.title)})]})}):(0,r.jsx)(h,{});break;default:e=(0,r.jsx)(i.wn,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,r.jsx)(l.p8,{width:760,height:800,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(c.AuthBlock,{scanned_card:z,modifying_card:O})}),(0,r.jsx)(i.BJ.Item,{children:R}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:e})]})})})}},4287:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobPriority:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.cooldown_time,l=e.job_slots,a=e.target_dept,c=e.priority_jobs;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{color:t?"red":"",children:["Next Change Available:",t||"Now"]}),(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Job Slots",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Title"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Used Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Total Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Free Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Close Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Open Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Priority"})]}),l&&l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,className:"candystripe",children:[(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.az,{color:e.is_priority?"green":"",children:e.title})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.current_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions>e.current_positions&&(0,r.jsx)(i.az,{color:"green",children:e.total_positions-e.current_positions})||(0,r.jsx)(i.az,{color:"red",children:"0"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_close,onClick:function(){return n("make_job_unavailable",{job:e.title})},children:"-"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_open,onClick:function(){return n("make_job_available",{job:e.title})},children:"+"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:a&&(0,r.jsx)(i.az,{color:"green",children:c.indexOf(e.title)>-1?"Yes":""})||(0,r.jsx)(i.$n,{selected:e.is_priority,disabled:!!t||!e.can_prioritize,onClick:function(){return n("prioritize_job",{job:e.title})},children:e.is_priority?"Yes":"No"})})]},e.title)})]})})]})}},6530:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobTransfer:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(421),a=t(7542),c=l.lm.department,s=function(e){var n=(0,o.Oc)().act,t=e.job_colors,l=e.dept_name,a=e.job_names,c=e.dept_color,s=e.default_job_color,u=void 0===s?"":s,d=e.card;return(0,r.jsx)(i.Ki.Item,{label:l,labelColor:c,children:a.map(function(e){return(0,r.jsx)(i.$n,{selected:(null==d?void 0:d.rank)===e,color:t[e]?t[e]:u,onClick:function(){return n("assign",{assign_target:e})},children:e},e)})})},u=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.target_dept,u=e.card,d=e.can_terminate,f=e.is_centcom,h=e.jobs,m=e.jobs_dept,p=e.job_colors,x=e.all_centcom_skins,g=h&&[{name:"Special",jobs:h.top},{name:"Engineering",color:c.engineering,jobs:h.engineering},{name:"Medical",color:c.medical,jobs:h.medical},{name:"Science",color:c.science,jobs:h.science},{name:"Security",color:c.security,jobs:h.security},{name:"Service",color:c.service,jobs:h.service},{name:"Supply",color:c.supply,jobs:h.supply},{name:"Retirement",jobs:h.assistant}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{title:"Card Information",children:[!l&&(0,r.jsx)(a.CardInformation,{card:u}),(0,r.jsx)(i.Ki.Item,{label:"Latest Transfer",children:(null==u?void 0:u.lastlog)||"---"})]}),(0,r.jsx)(i.wn,{title:l?"Department Job Transfer":"Job Transfer",children:(0,r.jsxs)(i.Ki,{children:[l?(0,r.jsx)(s,{dept_name:"Department",job_colors:p,job_names:void 0===m?[]:m,card:u}):(0,r.jsx)(r.Fragment,{children:g.map(function(e){return(0,r.jsx)(s,{dept_name:e.name,dept_color:e.color,job_names:e.jobs,job_colors:p,card:u})})}),!!f&&(0,r.jsx)(s,{dept_name:"Centcom",dept_color:c.centcom,job_colors:p,job_names:h.centcom,default_job_color:"purple",card:u}),(0,r.jsx)(i.Ki.Item,{label:"Demotion",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Demoted"||(null==u?void 0:u.assignment)==="Terminated",tooltip:"Assistant access, 'demoted' title.",color:"red",icon:"times",onClick:function(){return n("demote")},children:"Demoted"},"Demoted")}),!!d&&(0,r.jsx)(i.Ki.Item,{label:"Non-Crew",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Terminated",tooltip:"Zero access. Not crew.",color:"red",icon:"eraser",onClick:function(){return n("terminate")},children:"Terminated"},"Terminate")})]})}),!l&&(0,r.jsx)(a.CardSkins,{card:u,card_skins:t,is_centcom:f,all_centcom_skins:x})]})}},9490:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerRecordsLog:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.authenticated,l=e.records,a=e.target_dept,c=e.is_centcom;return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Records",buttons:(0,r.jsx)(i.$n,{icon:"times",disabled:!t||0===l.length||a,onClick:function(){return n("wipe_all_logs")},children:"Delete All Records"}),children:[(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Crewman"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Old Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"New Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Authorized By"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Time"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Reason"}),!!c&&(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Deleted By"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.transferee}),(0,r.jsx)(i.XI.Cell,{children:e.oldvalue}),(0,r.jsx)(i.XI.Cell,{children:e.newvalue}),(0,r.jsx)(i.XI.Cell,{children:e.whodidit}),(0,r.jsx)(i.XI.Cell,{children:e.timestamp}),(0,r.jsx)(i.XI.Cell,{children:e.reason}),!!c&&(0,r.jsx)(i.XI.Cell,{children:e.deletedby})]},e.timestamp)})]}),!!c&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"pencil-alt",color:"purple",disabled:!t||0===l.length,onClick:function(){return n("wipe_my_logs")},children:"Delete MY Records"})})]})}},1488:function(e,n,t){"use strict";t.r(n)},6466:function(e,n,t){"use strict";t.r(n),t.d(n,{CargoConsole:()=>f});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,ChameleonAppearances:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,l.XZ)(n,function(e){return e.name});return e.filter(t)},f=function(e){var n,t=(0,a.Oc)(),l=t.act,c=t.data,u=(n=(0,i.useState)(""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return s(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=u[0],h=u[1],m=d(c.chameleon_skins,f),p=c.selected_appearance;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for an appearance",onChange:function(e){return h(e)}})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Item Appearance",children:m.map(function(e){var n=e.name+"_"+e.icon_state;return(0,r.jsx)(o.c_,{dmIcon:e.icon,dmIconState:e.icon_state,imageSize:64,m:.5,selected:n===p,tooltip:e.name,style:{opacity:n===p&&"1"||"0.5"},onClick:function(){l("change_appearance",{new_appearance:n})}},n)})})})]})}},9072:function(e,n,t){"use strict";t.r(n),t.d(n,{ChangelogView:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=[1,5,10,20,30,50,75],s=[1,5,10],u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).chemicals;return(0,r.jsx)(l.p8,{width:420,height:400+24*Math.ceil(t.length/3),children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.amount,s=l.energy,u=l.maxEnergy;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Dispense",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:c.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:a===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})})]})})})},f=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=[],u=0;u<(c.length+1)%3;u++)s.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:l.glass?"Drink Dispenser":"Chemical Dispenser",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",content:e.title,style:{marginLeft:"2px",textOverflow:"ellipsis"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%"},n)})]})})},h=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.isBeakerLoaded,u=l.beakerCurrentVolume,d=l.beakerMaxVolume,f=l.beakerContents;return(0,r.jsx)(i.BJ.Item,{height:16,children:(0,r.jsx)(i.wn,{title:l.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsxs)(i.az,{children:[!!c&&(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[u," / ",d," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!c,onClick:function(){return t("ejectBeaker")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:void 0===f?[]:f,buttons:function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return t("remove",{reagent:e.id,amount:-1})}}),s.map(function(n,o){return(0,r.jsx)(i.$n,{content:n,onClick:function(){return t("remove",{reagent:e.id,amount:n})}},o)}),(0,r.jsx)(i.$n,{content:"ALL",onClick:function(){return t("remove",{reagent:e.id,amount:e.volume})}})]})}})})})}},6277:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemHeater:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(3013),s=function(e){return(0,r.jsx)(a.p8,{width:350,height:275,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.targetTemp,s=a.targetTempReached,u=a.autoEject,d=a.isActive,f=a.currentTemp,h=a.isBeakerLoaded;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Settings",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Auto-eject",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){return t("toggle_autoeject")}}),(0,r.jsx)(i.$n,{content:d?"On":"Off",icon:"power-off",selected:d,disabled:!h,onClick:function(){return t("toggle_on")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.Q7,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,o.LI)(c,0),minValue:0,maxValue:1e3,onChange:function(e){return t("adjust_temperature",{target:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reading",color:s?"good":"average",children:h&&(0,r.jsx)(i.zv,{value:f,format:function(e){return(0,o.Mg)(e)+" K"}})||"—"})]})})})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.isBeakerLoaded,s=o.beakerCurrentVolume,u=o.beakerMaxVolume,d=o.beakerContents;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!a&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",onClick:function(){return t("eject_beaker")}})]}),children:(0,r.jsx)(c.BeakerContents,{beakerLoaded:a,beakerContents:d})})})}},9306:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemMaster:()=>x});var r=t(8138),i=t(7790),o=t(5490),l=t(3375),a=t(2864),c=t(3384),s=t(3013),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=[1,5,10,25,75],x=function(e){return(0,r.jsxs)(c.p8,{width:575,height:650,children:[(0,r.jsx)(u.ComplexModal,{}),(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(g,{}),(0,r.jsx)(j,{}),(0,r.jsx)(b,{}),(0,r.jsx)(C,{})]})})]})},g=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.beaker,c=o.beaker_reagents;return o.buffer_reagents.length,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!l,content:"Eject",onClick:function(){return t("eject")}}),children:l?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0&&(n=s.map(function(e){var n=e.id,i=e.sprite;return(0,r.jsx)(k,{icon:i,selected:c===n,onClick:function(){return t("set_sprite_style",{production_mode:l,style:n})}},n)})),(0,r.jsx)(w,{productionData:e.productionData,children:n&&(0,r.jsx)(i.Ki.Item,{label:"Style",children:n})})},C=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.loaded_pill_bottle_style,c=o.containerstyles,s=o.loaded_pill_bottle,u="20px",d="20px",f=c.map(function(e){var n=e.color,o=e.name,a=l===n;return(0,r.jsxs)(i.$n,{style:{position:"relative",width:u,height:d},onClick:function(){return t("set_container_style",{style:n})},icon:a?"check":"",tooltip:o,tooltipPosition:"top",children:[!a&&(0,r.jsx)("div",{style:{display:"inline-block"}}),(0,r.jsx)("span",{className:"Button",style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:u,height:d,backgroundColor:n,opacity:.6,filter:"alpha(opacity=60)"}})]},n)});return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Container Customization",buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!s,content:"Eject Container",onClick:function(){return t("ejectp")}}),children:s?(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Style",children:[(0,r.jsx)(i.$n,{style:{width:u,height:d},icon:"tint-slash",onClick:function(){return t("clear_container_style")},selected:!l,tooltip:"Default",tooltipPosition:"top"}),f]})}):(0,r.jsx)(i.az,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,u.modalRegisterBodyOverride)("analyze",function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=e.args.analysis;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:o.condi?"Condiment Analysis":"Reagent Analysis",children:(0,r.jsx)(i.az,{mx:"0.5rem",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:l.name}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:(l.desc||"").length>0?l.desc:"N/A"}),l.blood_type&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood type",children:l.blood_type}),(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})]}),!o.condi&&(0,r.jsx)(i.$n,{icon:o.printing?"spinner":"print",disabled:o.printing,iconSpin:!!o.printing,ml:"0.5rem",content:"Print",onClick:function(){return t("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})})})},2636:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningConsole:()=>c});var r=t(8138),i=t(7790),o=t(8595),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,c=o.tab,u=o.has_scanner,d=o.pod_amount;return(0,r.jsx)(a.p8,{width:640,height:520,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Cloning Console",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected scanner",children:u?"Online":"Missing"}),(0,r.jsx)(i.Ki.Item,{label:"Connected pods",children:d})]})}),(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:1===c,icon:"home",onClick:function(){return t("menu",{tab:1})},children:"Main Menu"}),(0,r.jsx)(i.tU.Tab,{selected:2===c,icon:"user",onClick:function(){return t("menu",{tab:2})},children:"Damage Configuration"})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(s,{})})]})})},s=function(e){var n,t=(0,l.Oc)().data.tab;return 1===t?n=(0,r.jsx)(u,{}):2===t&&(n=(0,r.jsx)(d,{})),n},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.pods,s=a.pod_amount,u=a.selected_pod_UID;return(0,r.jsxs)(i.az,{children:[!s&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No pods connected."}),!!s&&c.map(function(e,n){return(0,r.jsx)(i.wn,{layer:2,title:"Pod "+(n+1),children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsxs)(i.BJ.Item,{basis:"96px",shrink:0,children:[(0,r.jsx)("img",{src:(0,o.l)("pod_"+(e.cloning?"cloning":"idle")+".gif"),style:{width:"100%",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{selected:u===e.uid,onClick:function(){return t("select_pod",{uid:e.uid})},children:"Select"})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Progress",children:[!e.cloning&&(0,r.jsx)(i.az,{color:"average",children:"Pod is inactive."}),!!e.cloning&&(0,r.jsx)(i.z2,{value:e.clone_progress,maxValue:100,color:"good"})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Biomass",children:(0,r.jsxs)(i.z2,{value:e.biomass,ranges:{good:[2*e.biomass_storage_capacity/3,e.biomass_storage_capacity],average:[e.biomass_storage_capacity/3,2*e.biomass_storage_capacity/3],bad:[0,e.biomass_storage_capacity/3]},minValue:0,maxValue:e.biomass_storage_capacity,children:[e.biomass,"/",e.biomass_storage_capacity+" ("+100*e.biomass/e.biomass_storage_capacity+"%)"]})}),(0,r.jsx)(i.Ki.Item,{label:"Sanguine Reagent",children:e.sanguine_reagent}),(0,r.jsx)(i.Ki.Item,{label:"Osseous Reagent",children:e.osseous_reagent})]})})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.selected_pod_data,c=o.has_scanned,s=o.scanner_has_patient,u=o.feedback,d=o.scan_successful,m=o.cloning_cost,p=o.has_scanner,x=o.currently_scanning;return(0,r.jsxs)(i.az,{children:[!p&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No scanner connected."}),!!p&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.wn,{layer:2,title:"Scanner Info",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{icon:"hourglass-half",onClick:function(){return t("scan")},disabled:!s||x,children:"Scan"}),(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("eject")},disabled:!s||x,children:"Eject Patient"})]}),children:[!c&&!x&&(0,r.jsx)(i.az,{color:"average",children:s?"No scan detected for current patient.":"No patient is in the scanner."}),(!!c||!!x)&&(0,r.jsx)(i.az,{color:u.color,children:u.text})]}),(0,r.jsx)(i.wn,{layer:2,title:"Damages Breakdown",children:(0,r.jsxs)(i.az,{children:[(!d||!c)&&(0,r.jsx)(i.az,{color:"average",children:"No valid scan detected."}),!!d&&!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{onClick:function(){return t("fix_all")},children:"Repair All Damages"}),(0,r.jsx)(i.$n,{onClick:function(){return t("fix_none")},children:"Repair No Damages"})]}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{onClick:function(){return t("clone")},children:"Clone"})})]}),(0,r.jsxs)(i.BJ,{height:"25px",children:[(0,r.jsx)(i.BJ.Item,{width:"40%",children:(0,r.jsxs)(i.z2,{value:m[0],maxValue:a.biomass_storage_capacity,ranges:{bad:[2*a.biomass_storage_capacity/3,a.biomass_storage_capacity],average:[a.biomass_storage_capacity/3,2*a.biomass_storage_capacity/3],good:[0,a.biomass_storage_capacity/3]},color:m[0]>a.biomass?"bad":null,children:["Biomass: ",m[0],"/",a.biomass,"/",a.biomass_storage_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[1],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[1]>a.sanguine_reagent?"bad":"good",children:["Sanguine: ",m[1],"/",a.sanguine_reagent,"/",a.max_reagent_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[2],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[2]>a.osseous_reagent?"bad":"good",children:["Osseous: ",m[2],"/",a.osseous_reagent,"/",a.max_reagent_capacity]})})]}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})]})})]})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_limb_data,c=o.limb_list,s=o.desired_limb_data;return(0,r.jsx)(i.Nt,{title:"Limbs",children:c.map(function(e,n){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"15%",height:"20px",children:[a[e][4],":"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1}),0===a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{value:s[e][0]+s[e][1],maxValue:a[e][5],ranges:{good:[0,a[e][5]/3],average:[a[e][5]/3,2*a[e][5]/3],bad:[2*a[e][5]/3,a[e][5]]},children:["Post-Cloning Damage: ",(0,r.jsx)(i.In,{name:"bone"})," "+s[e][0]+" / ",(0,r.jsx)(i.In,{name:"fire"})," "+s[e][1]]})}),0!==a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][4]," is missing!"]})})]}),(0,r.jsxs)(i.BJ,{children:[!!a[e][3]&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][3],onClick:function(){return t("toggle_limb_repair",{limb:e,type:"replace"})},children:"Replace Limb"})}),!a[e][3]&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n.Checkbox,{disabled:!(a[e][0]||a[e][1]),checked:!(s[e][0]||s[e][1]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"damage"})},children:"Repair Damages"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(1&a[e][2]),checked:!(1&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"bone"})},children:"Mend Bone"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(32&a[e][2]),checked:!(32&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"ib"})},children:"Mend IB"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(128&a[e][2]),checked:!(128&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"critburn"})},children:"Mend Critical Burn"})]})]})]},e)})})},h=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_organ_data,c=o.organ_list,s=o.desired_organ_data;return(0,r.jsx)(i.Nt,{title:"Organs",children:c.map(function(e,n){return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"20%",height:"20px",children:[a[e][3],":"," "]}),"heart"!==a[e][5]&&(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ.Item,{children:[!!a[e][2]&&(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][2]&&!s[e][1],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"replace"})},children:"Replace Organ"}),!a[e][2]&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n.Checkbox,{disabled:!a[e][0],checked:!s[e][0],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"damage"})},children:"Repair Damages"})})]})}),"heart"===a[e][5]&&(0,r.jsx)(i.az,{color:"average",children:"Heart replacement is required for cloning."}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsxs)(i.BJ.Item,{width:"35%",children:[!!a[e][2]&&(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][3]," is missing!"]}),!a[e][2]&&(0,r.jsx)(i.z2,{value:s[e][0],maxValue:a[e][4],ranges:{good:[0,a[e][4]/3],average:[a[e][4]/3,2*a[e][4]/3],bad:[2*a[e][4]/3,a[e][4]]},children:"Post-Cloning Damage: "+s[e][0]})]})]})},e)})})}},1558:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningPod:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.biomass,s=a.biomass_storage_capacity,u=a.sanguine_reagent,d=a.osseous_reagent,f=a.organs,h=a.currently_cloning;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Liquid Storage",children:[(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsx)(i.z2,{value:c,ranges:{good:[2*s/3,s],average:[s/3,2*s/3],bad:[0,s/3]},minValue:0,maxValue:s})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:u+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"sanguine_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"sanguine_reagent"})}})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:d+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:d,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"osseous_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"osseous_reagent"})}})})]})]}),(0,r.jsxs)(i.wn,{title:"Organ Storage",children:[!h&&(0,r.jsxs)(i.az,{children:[!f&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No organs loaded."}),!!f&&f.map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:e.name}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Eject",onClick:function(){return t("eject_organ",{organ_ref:e.ref})}})})]},e)})]}),!!h&&(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:"5",mb:3}),(0,r.jsx)("br",{}),"Unable to access organ storage while cloning."]})})]})]})})}},1276:function(e,n,t){"use strict";t.r(n),t.d(n,{CoinMint:()=>c});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.materials,u=c.moneyBag,d=c.moneyBagContent,f=c.moneyBagMaxContent,h=(u?210:138)+64*Math.ceil(s.length/4);return(0,r.jsx)(a.p8,{width:210,height:h,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.IC,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Coin Type",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:c.active&&"bad",tooltip:!u&&"Need a money bag",disabled:!u,onClick:function(){return t("activate")}}),children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.z2,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eject",tooltip:"Eject selected material",onClick:function(){return t("ejectMat")}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:s.map(function(e){return(0,r.jsx)(i.$n,{bold:!0,inline:!0,m:.2,textAlign:"center",selected:e.id===c.chosenMaterial,tooltip:e.name,content:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",e.id])}),(0,r.jsx)(i.BJ.Item,{children:e.amount})]}),onClick:function(){return t("selectMaterial",{material:e.id})}},e.id)})})]})})}),!!u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Money Bag",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){return t("ejectBag")}}),children:(0,r.jsxs)(i.z2,{width:"100%",minValue:0,maxValue:f,value:d,children:[d," / ",f]})})})]})})})}},1572:function(e,n,t){"use strict";t.r(n),t.d(n,{HexColorInput:()=>B,ColorSelector:()=>A,ColorPickerModal:()=>O,ColorInput:()=>z});var r=t(8138),i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,n);return Math.round(t*e)/t},o=function(e){return h(l(e))},l=function(e){return("#"===e[0]&&(e=e.substring(1)),e.length<6)?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?i(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?i(parseInt(e.substring(6,8),16)/255,2):1}},a=function(e){return f(u(e))},c=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=(200-t)*r/100;return{h:i(n),s:i(l>0&&l<200?t*r/100/(l<=100?l:200-l)*100:0),l:i(l/2),a:i(o,2)}},s=function(e){var n=c(e),t=n.h,r=n.s,i=n.l;return"hsl(".concat(t,", ").concat(r,"%, ").concat(i,"%)")},u=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=Math.floor(n=n/360*6),a=(r/=100)*(1-(t/=100)),c=r*(1-(n-l)*t),s=r*(1-(1-n+l)*t),u=l%6;return{r:255*[r,c,a,a,s,r][u],g:255*[s,r,r,c,a,a][u],b:255*[a,a,s,r,r,c][u],a:i(o,2)}},d=function(e){var n=e.toString(16);return n.length<2?"0"+n:n},f=function(e){var n=e.r,t=e.g,r=e.b,o=e.a,l=o<1?d(i(255*o)):"";return"#"+d(i(n))+d(i(t))+d(i(r))+l},h=function(e){var n=e.r,t=e.g,r=e.b,i=e.a,o=Math.max(n,t,r),l=o-Math.min(n,t,r),a=l?o===n?(t-r)/l:o===t?2+(r-n)/l:4+(n-t)/l:0;return{h:60*(a<0?a+6:a),s:o?l/o*100:0,v:o/255*100,a:i}},m=/^#?([0-9A-F]{3,8})$/i,p=function(e,n){var t=m.exec(e),r=t?t[1].length:0;return 3===r||6===r||!!n&&4===r||!!n&&8===r},x=t(4530),g=t(7790),j=t(6859),b=t(5490),y=t(2864),v=t(7946),w=t(8095),k=t(3384),_=t(1942),C=t(9472);function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["prefixed","alpha","color","fluid","onChange"]);return(0,r.jsx)(z,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.colour_data;return(0,r.jsx)(l.p8,{width:360,height:190,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,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,r.jsx)(i.BJ,{textAlign:"center",textColor:"label",children:e.map(function(e){return(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:1,children:[e.name,":\xa0",(0,r.jsx)(i.Q7,{width:4,value:a[e.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(n){return t("setvalue",{idx:e.idx+1,value:n})}})]},e.name)})},e)})})})})})}},5325:function(e,n,t){"use strict";t.r(n),t.d(n,{CommunicationsComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(x+=" ("+a+"s)");var g=c?"Message [UNKNOWN]":"Message CentComm",b="Request Authentication Codes";return s>0&&(g+=" ("+s+"s)",b+=" ("+s+"s)"),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Captain-Only Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Alert",color:u,children:d}),(0,r.jsx)(o.Ki.Item,{label:"Change Alert",children:(0,r.jsx)(j,{levels:f,required_access:h})}),(0,r.jsx)(o.Ki.Item,{label:"Announcement",children:(0,r.jsx)(o.$n,{icon:"bullhorn",content:x,disabled:!h||a>0,onClick:function(){return t("announce")}})}),!!c&&(0,r.jsxs)(o.Ki.Item,{label:"Transmit",children:[(0,r.jsx)(o.$n,{icon:"broadcast-tower",color:"red",content:g,disabled:!h||s>0,onClick:function(){return t("MessageSyndicate")}}),(0,r.jsx)(o.$n,{icon:"sync-alt",content:"Reset Relays",disabled:!h,onClick:function(){return t("RestoreBackup")}})]})||(0,r.jsx)(o.Ki.Item,{label:"Transmit",children:(0,r.jsx)(o.$n,{icon:"broadcast-tower",content:g,disabled:!h||s>0,onClick:function(){return t("MessageCentcomm")}})}),(0,r.jsx)(o.Ki.Item,{label:"Nuclear Device",children:(0,r.jsx)(o.$n,{icon:"bomb",content:b,disabled:!h||s>0,onClick:function(){return t("nukerequest")}})})]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{fill:!0,title:"Command Staff Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Displays",children:(0,r.jsx)(o.$n,{icon:"tv",content:"Change Status Displays",disabled:!m,onClick:function(){return t("status")}})}),(0,r.jsx)(o.Ki.Item,{label:"Incoming Messages",children:(0,r.jsx)(o.$n,{icon:"folder-open",content:"View ("+p.length+")",disabled:!m,onClick:function(){return t("messagelist")}})})]})})})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.stat_display,c=i.authhead;i.current_message_title;var s=a.presets.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.name===a.type,disabled:!c,onClick:function(){return t("setstat",{statdisp:e.name})}},e.name)}),u=a.alerts.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.alert===a.icon,disabled:!c,onClick:function(){return t("setstat",{statdisp:3,alert:e.alert})}},e.alert)});return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Modify Status Screens",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Presets",children:s}),(0,r.jsx)(o.Ki.Item,{label:"Alerts",children:u}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 1",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_1,disabled:!c,onClick:function(){return t("setmsg1")}})}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 2",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_2,disabled:!c,onClick:function(){return t("setmsg2")}})})]})})})},g=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.authhead,s=a.current_message_title,u=a.current_message,d=a.messages;if(a.security_level,s)n=(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:s,buttons:(0,r.jsx)(o.$n,{icon:"times",content:"Return To Message List",disabled:!c,onClick:function(){return i("messagelist")}}),children:(0,r.jsx)(o.az,{children:u})})});else{var f=d.map(function(e){return(0,r.jsxs)(o.Ki.Item,{label:e.title,children:[(0,r.jsx)(o.$n,{icon:"eye",content:"View",disabled:!c||s===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,r.jsx)(o.$n.Confirm,{icon:"times",content:"Delete",disabled:!c,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)});n=(0,r.jsx)(o.wn,{title:"Messages Received",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,r.jsx)(o.Ki,{children:f})})}return(0,r.jsx)(o.az,{children:n})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.levels,c=e.required_access,s=e.use_confirm,u=i.security_level;return s?a.map(function(e){return(0,r.jsx)(o.$n.Confirm,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)}):a.map(function(e){return(0,r.jsx)(o.$n,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)})},b=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.is_admin,u=a.possible_cc_sounds;if(!c)return t("main");var d=s((0,i.useState)(""),2),f=d[0],h=d[1],m=s((0,i.useState)(""),2),p=m[0],x=m[1],g=s((0,i.useState)(0),2),j=g[0],b=g[1],y=s((0,i.useState)("Beep"),2),v=y[0],w=y[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Central Command Report",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Enter Subtitle here.",value:f,onChange:function(e){return h(e)}}),(0,r.jsx)(o.fs,{fluid:!0,height:"100%",rows:10,placeholder:"Enter Announcement here. Multiline input is accepted.",value:p,onChange:x}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"paper-plane",textAlign:"center",onClick:function(){t("make_cc_announcement",{subtitle:f,text:p,classified:j,beepsound:v}),x(""),h("")},children:"Send Announcement"}),(0,r.jsxs)(o.BJ,{align:"center",children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.ms,{options:u,selected:v,onSelected:function(e){return w(e)},disabled:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"volume-up",disabled:j,tooltip:"Test sound",onClick:function(){return t("test_sound",{sound:v})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n.Checkbox,{fluid:!0,checked:j,tooltip:j?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!j)},children:"Classified"})})]})]})})})}},6185:function(e,n,t){"use strict";t.r(n),t.d(n,{CompostBin:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(7946),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0,p=e.setViewingPhoto,g=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["setViewingPhoto"]);return(0,r.jsx)(o.wn,h(f({title:"Available Contracts",overflow:"auto",buttons:(0,r.jsxs)(o.$n,{disabled:!u||m,icon:"parachute-box",onClick:function(){return t("extract")},children:["Call Extraction"," ",m&&(0,r.jsx)(c.Gi,{timeEnd:d.time_left,format:function(e,n){return n.substr(3)}})]})},g),{children:l.slice().sort(function(e,n){return 1===e.status?-1:1===n.status?1:e.status-n.status}).map(function(e){var n;return(0,r.jsx)(o.wn,{title:(0,r.jsxs)(o.so,{children:[(0,r.jsx)(o.so.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,r.jsx)(o.so.Item,{basis:"content",children:e.has_photo&&(0,r.jsx)(o.$n,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return p("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,r.jsxs)(o.az,{width:"100%",children:[!!x[e.status]&&(0,r.jsx)(o.az,{color:x[e.status][1],inline:!0,mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:x[e.status][0]}),1===e.status&&(0,r.jsx)(o.$n.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return t("abort")}})]}),children:(0,r.jsxs)(o.so,{children:[(0,r.jsxs)(o.so.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,r.jsxs)(o.az,{color:"good",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,r.jsxs)(o.az,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,r.jsxs)(o.az,{color:"bad",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,r.jsxs)(o.so.Item,{flexBasis:"100%",children:[(0,r.jsxs)(o.so,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",w(e)]}),null==(n=e.difficulties)?void 0:n.map(function(n,i){return(0,r.jsx)(o.$n.Confirm,{disabled:!!s,content:n.name+" ("+n.reward+" TC)",onClick:function(){return t("activate",{uid:e.uid,difficulty:i+1})}},i)}),!!e.objective&&(0,r.jsxs)(o.az,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,r.jsx)("br",{}),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)})}))},w=function(e){if(e.objective&&!(e.status>1)){var n=e.objective.locs.user_area_id,t=e.objective.locs.user_coords,i=e.objective.locs.target_area_id,a=e.objective.locs.target_coords,c=n===i;return(0,r.jsx)(o.so.Item,{children:(0,r.jsx)(o.In,{name:c?"dot-circle-o":"arrow-alt-circle-right-o",color:c?"green":"yellow",rotation:c?null:-(0,l.KJ)(Math.atan2(a[1]-t[1],a[0]-t[0])),lineHeight:c?null:"0.85",size:"1.5"})})}},k=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.rep,c=i.buyables;return(0,r.jsx)(o.wn,h(f({title:"Available Purchases",overflow:"auto"},e),{children:c.map(function(e){return(0,r.jsxs)(o.wn,{title:e.name,children:[e.description,(0,r.jsx)("br",{}),(0,r.jsx)(o.$n.Confirm,{disabled:l-1&&(0,r.jsxs)(o.az,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)})}))},_=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return r=t,i=[e],r=d(r),(n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(r,i||[],d(this).constructor):r.apply(this,i))).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e),n=[{key:"tick",value:function(){var e=this.props,n=this.state;n.currentIndex<=e.allMessages.length?(this.setState(function(e){return{currentIndex:e.currentIndex+1}}),n.currentDisplay.push(e.allMessages[n.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))}},{key:"componentDidMount",value:function(){var e=this,n=this.props.linesPerSecond;this.timer=setInterval(function(){return e.tick()},1e3/(void 0===n?2.5:n))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){return(0,r.jsx)(o.az,{m:1,children:this.state.currentDisplay.map(function(e){return(0,r.jsxs)(i.Fragment,{children:[e,(0,r.jsx)("br",{})]},e)})})}}],function(e,n){for(var t=0;ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.slowFactor,s=a.oneWay,u=a.position;return(0,r.jsx)(l.p8,{width:350,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,r.jsx)(i.Ki.Item,{label:"Allow reverse",children:(0,r.jsx)(i.$n.Checkbox,{checked:!s,onClick:function(){return t("toggleOneWay")}})}),(0,r.jsx)(i.Ki.Item,{label:"Slowdown factor",children:(0,r.jsxs)(i.so,{children:[(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-left",onClick:function(){return t("slowFactor",{value:c-5})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-left",onClick:function(){return t("slowFactor",{value:c-1})}})," "]}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.Ap,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,n){return t("slowFactor",{value:n})}})}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-right",onClick:function(){return t("slowFactor",{value:c+1})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-right",onClick:function(){return t("slowFactor",{value:c+5})}})," "]})]})})]})})})})}},6714:function(e,n,t){"use strict";t.r(n),t.d(n,{CrewMonitor:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(7946),u=t(421),d=t(3384);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=2||s.ignoreSensors?(0,r.jsxs)(l.az,{inline:!0,ml:1,children:["(",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.oxy,children:e.oxy}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.toxin,children:e.tox}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.burn,children:e.fire}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.brute,children:e.brute}),")"]}):null]}),(0,r.jsx)(l.XI.Cell,{children:3===e.sensor_type||s.ignoreSensors?s.isAI||s.isObserver?(0,r.jsx)(l.$n,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return t("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,r.jsx)(l.az,{inline:!0,color:"grey",children:"Not Available"})})]},n)})]})]})},g=function(e){var n,t,i=e.color,o=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["color"]);return(0,r.jsx)(s.tx.Marker,(n=function(e){for(var n=1;ns});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],c=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],s=function(e){return(0,r.jsx)(l.p8,{width:520,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(u,{})})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,s=l.isOperating,u=l.hasOccupant,f=l.occupant,h=void 0===f?[]:f,m=l.cellTemperature,p=l.cellTemperatureStatus,x=l.isBeakerLoaded,g=l.cooldownProgress,j=l.auto_eject_healthy,b=l.auto_eject_dead;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectOccupant")},disabled:!u,children:"Eject"}),children:u?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,r.jsx)(i.zv,{value:Math.round(h.health)})})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[h.stat][0],children:c[h.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(h.bodyTemperature)})," K"]}),(0,r.jsx)(i.Ki.Divider,{}),a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.label,children:(0,r.jsx)(i.z2,{value:h[e.type]/100,ranges:{bad:[.01,1/0]},children:(0,r.jsx)(i.zv,{value:Math.round(h[e.type])})})},e.id)})]}):(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Cell",buttons:(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("ejectBeaker")},disabled:!x,children:"Eject Beaker"}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",onClick:function(){return t(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",color:p,children:[(0,r.jsx)(i.zv,{value:m})," K"]}),(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.Ki.Item,{label:"Dosage interval",children:(0,r.jsx)(i.z2,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!x&&"average",value:g,minValue:0,maxValue:100})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject healthy occupants",children:(0,r.jsx)(i.$n,{icon:j?"toggle-on":"toggle-off",selected:j,onClick:function(){return t(j?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:j?"On":"Off"})}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject dead occupants",children:(0,r.jsx)(i.$n,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return t(b?"auto_eject_dead_off":"auto_eject_dead_on")},children:b?"On":"Off"})})]})})})]})},d=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.isBeakerLoaded,a=t.beakerLabel,c=t.beakerVolume;return l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{inline:!0,color:!a&&"average",children:[a||"No label",":"]}),(0,r.jsx)(i.az,{inline:!0,color:!c&&"bad",ml:1,children:c?(0,r.jsx)(i.zv,{value:c,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})]}):(0,r.jsx)(i.az,{inline:!0,color:"bad",children:"No beaker loaded"})}},2394:function(e,n,t){"use strict";t.r(n),t.d(n,{CryopodConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.account_name,o=n.allow_items;return(0,r.jsx)(a.p8,{title:"Cryopod Console",width:400,height:480,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Hello, ".concat(t||"[REDACTED]","!"),children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,r.jsx)(s,{}),!!o&&(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)().data.frozen_crew;return(0,r.jsx)(i.Nt,{title:"Stored Crew",children:n.length?(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:n.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:e.rank},n)})})}):(0,r.jsx)(i.IC,{children:"No stored crew!"})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.frozen_items,c=function(e){var n=e.toString();return n.startsWith("the ")&&(n=n.slice(4,n.length)),(0,o.Sn)(n)};return(0,r.jsx)(i.Nt,{title:"Stored Items",children:a.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:c(e.name),buttons:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return t("one_item",{item:e.uid})}})},e)})})}),(0,r.jsx)(i.$n,{content:"Drop All Items",color:"red",onClick:function(){return t("all_items")}})]}):(0,r.jsx)(i.IC,{children:"No stored items!"})})}},3372:function(e,n,t){"use strict";t.r(n),t.d(n,{DNAModifier:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50],d=function(){var e,n=(0,o.Oc)(),t=(n.act,n.data),c=t.irradiating,s=t.dnaBlockSize,u=t.occupant,d=!u.isViableSubject||!u.uniqueIdentity||!u.structuralEnzymes;return c&&(e=(0,r.jsx)(v,{duration:c})),(0,r.jsxs)(l.p8,{width:660,height:800,children:[(0,r.jsx)(a.ComplexModal,{}),e,(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(f,{isDNAInvalid:d})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(h,{dnaBlockSize:s,isDNAInvalid:d})})]})})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,s=l.hasOccupant,u=l.occupant,d=e.isDNAInvalid;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,r.jsx)(i.$n,{disabled:!s,selected:a,icon:a?"toggle-on":"toggle-off",content:a?"Engaged":"Disengaged",onClick:function(){return t("toggleLock")}}),(0,r.jsx)(i.$n,{disabled:!s||a,icon:"user-slash",content:"Eject",onClick:function(){return t("ejectOccupant")}})]}),children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:u.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:u.minHealth,maxValue:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[u.stat][0],children:c[u.stat][1]}),(0,r.jsx)(i.Ki.Divider,{})]})}),d?(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Radiation",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:u.radiationLevel/100,color:"average"})}),(0,r.jsx)(i.Ki.Item,{label:"Unique Enzymes",children:l.occupant.uniqueEnzymes?l.occupant.uniqueEnzymes:(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})]}):(0,r.jsx)(i.az,{color:"label",children:"Cell unoccupied."})})},h=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.selectedMenuKey,u=a.hasOccupant,d=e.dnaBlockSize,f=e.isDNAInvalid;return u?f?(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No operation possible on this subject."]})})}):("ui"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"se"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"buffer"===c?n=(0,r.jsx)(g,{}):"rejuvenators"===c&&(n=(0,r.jsx)(y,{})),(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.tU,{children:s.map(function(e,n){return(0,r.jsx)(i.tU.Tab,{icon:e[2],selected:c===e[0],onClick:function(){return l("selectMenuKey",{key:e[0]})},children:e[1]},n)})}),n]})):(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant in DNA modifier."]})})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedUIBlock,c=l.selectedUISubBlock,s=l.selectedUITarget,u=l.occupant,d=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Unique Identifier",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:u.uniqueIdentity,selectedBlock:a,selectedSubblock:c,blockSize:d,action:"selectUIBlock"})})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:15,stepPixelSize:20,value:s,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,n){return t("changeUITarget",{value:n})}})})}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return t("pulseUIRadiation")}})]})]})})},p=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedSEBlock,c=l.selectedSESubBlock,s=l.occupant,u=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Structural Enzymes",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:s.structuralEnzymes,selectedBlock:a,selectedSubblock:c,blockSize:u,action:"selectSEBlock"})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",onClick:function(){return t("pulseSERadiation")}})})]})})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.radiationIntensity,a=t.radiationDuration;return(0,r.jsxs)(i.wn,{title:"Radiation Emitter",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Intensity",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:10,stepPixelSize:20,value:l,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationIntensity",{value:t})}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:a,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationDuration",{value:t})}})})]}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){return n("pulseRadiation")}})]})},g=function(){var e=(0,o.Oc)().data.buffers.map(function(e,n){return(0,r.jsx)(j,{id:n+1,name:"Buffer "+(n+1),buffer:e},n)});return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:"75%",mt:1,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Buffers",children:e})}),(0,r.jsx)(i.BJ.Item,{height:"25%",children:(0,r.jsx)(b,{})})]})},j=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.id,c=e.name,s=e.buffer,u=l.isInjectorReady,d=c+(s.data?" - "+s.label:"");return(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsxs)(i.wn,{title:d,mx:"0",lineHeight:"18px",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!s.data,icon:"trash",content:"Clear",onClick:function(){return t("bufferOption",{option:"clear",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data,icon:"pen",content:"Rename",onClick:function(){return t("bufferOption",{option:"changeLabel",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data||!l.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){return t("bufferOption",{option:"saveDisk",id:a})}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Write",children:[(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUI",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUIAndUE",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveSE",id:a})}}),(0,r.jsx)(i.$n,{disabled:!l.hasDisk||!l.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return t("bufferOption",{option:"loadDisk",id:a})}})]}),!!s.data&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Subject",children:s.owner||(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]}),(0,r.jsxs)(i.Ki.Item,{label:"Transfer to",children:[(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a})}}),(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Block Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a,block:1})}}),(0,r.jsx)(i.$n,{icon:"user",content:"Subject",mb:"0",onClick:function(){return t("bufferOption",{option:"transfer",id:a})}})]})]})]}),!s.data&&(0,r.jsx)(i.az,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.hasDisk,a=t.disk;return(0,r.jsx)(i.wn,{title:"Data Disk",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!l||!a.data,icon:"trash",content:"Wipe",onClick:function(){return n("wipeDisk")}}),(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectDisk")}})]}),children:l?a.data?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Label",children:a.label?a.label:"No label"}),(0,r.jsx)(i.Ki.Item,{label:"Subject",children:a.owner?a.owner:(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===a.type?"Unique Identifiers":"Structural Enzymes",!!a.ue&&" and Unique Enzymes"]})]}):(0,r.jsx)(i.az,{color:"label",children:"Disk is blank."}):(0,r.jsxs)(i.az,{color:"label",textAlign:"center",my:"1rem",children:[(0,r.jsx)(i.In,{name:"save-o",size:4}),(0,r.jsx)("br",{}),"No disk inserted."]})})},y=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.isBeakerLoaded,a=t.beakerVolume,c=t.beakerLabel;return(0,r.jsx)(i.wn,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectBeaker")}}),children:l?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Inject",children:[u.map(function(e,t){return(0,r.jsx)(i.$n,{disabled:e>a,icon:"syringe",content:e,onClick:function(){return n("injectRejuvenators",{amount:e})}},t)}),(0,r.jsx)(i.$n,{disabled:a<=0,icon:"syringe",content:"All",onClick:function(){return n("injectRejuvenators",{amount:a})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Beaker",children:[(0,r.jsx)(i.az,{mb:"0.5rem",children:c||"No label"}),a?(0,r.jsxs)(i.az,{color:"good",children:[a," unit",1===a?"":"s"," remaining"]}):(0,r.jsx)(i.az,{color:"bad",children:"Empty"})]})]}):(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,align:"center",justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"flask",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]})}),(0,r.jsx)(i.BJ.Item,{bold:!0,color:"label",mb:"2rem",children:(0,r.jsx)("h3",{children:"No Beaker Loaded"})})]})})},v=function(e){var n=e.duration;return(0,r.jsxs)(i.Rr,{textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",size:5,spin:!0}),(0,r.jsx)("br",{}),(0,r.jsx)(i.az,{color:"average",children:(0,r.jsxs)("h1",{children:[(0,r.jsx)(i.In,{name:"radiation"}),"\xa0Irradiating occupant\xa0",(0,r.jsx)(i.In,{name:"radiation"})]})}),(0,r.jsx)(i.az,{color:"label",children:(0,r.jsxs)("h3",{children:["For ",n," second",1===n?"":"s"]})})]})},w=function(e){for(var n=function(e){for(var n=e/s+1,o=[],l=0;ls});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(5490),c=t(4530),s=(0,c.createContext)({categoryStyles:[],removalMode:null}),u=function(e){var n=e.decal_typepath,t=e.direction,o=e.isSelected,l=e.onSelect,c="".concat(n.replace(/\//g,"_"),"_").concat(t);return(0,r.jsx)(i.az,{m:"2px",className:(0,a.Ly)(["decal_painter32x32",c]),onClick:l,style:{outlineStyle:o&&"solid"||"none",outlineWidth:"2px",outlineColor:"orange"}})},d=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedCategory,a=t.categories;return(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{selected:e==l,onClick:function(){return n("set_category",{category:e})},children:e})})})})})},f=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.removalMode,d=(0,c.useContext)(s).categoryStyles;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.so,{wrap:"wrap",children:d.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(u,{decal_typepath:e.typepath,direction:2,isSelected:l===e.typepath&&!a,onSelect:function(){return n("set_decal_type",{decal_type:e.typepath})}})},e.typepath)})})})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.selectedDir,c=t.removalMode;return(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,0,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:0===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(u,{decal_typepath:l,direction:e,isSelected:e===a&&!c,onSelect:function(){return n("set_direction",{direction:e})}})},e)})},e)})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,a=t.availableStyles,c=t.removalMode,u=a[t.selectedCategory];return(0,r.jsx)(l.p8,{width:650,height:565,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(s.Provider,{value:{categoryStyles:u,removalMode:c},children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Preview",children:[(0,r.jsx)(h,{}),(0,r.jsx)(i.$n,{icon:"eraser",color:c?"green":"transparent",onClick:function(){return n("toggle_removal_mode")},children:"Remove decals"})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Decals",children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{})]})})]})})})})}},3883:function(e,n,t){"use strict";t.r(n),t.d(n,{DestinationTagger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.destinations,u=c.selected_destination_id,d=s[u-1];return(0,r.jsx)(l.p8,{width:355,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,textAlign:"center",title:"TagMaster 3.1",children:[(0,r.jsxs)(i.az,{width:"100%",textAlign:"center",children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Selected:"})," ",null!=(n=d.name)?n:"None"]}),(0,r.jsx)(i.az,{mt:1.5,children:(0,r.jsx)(i.BJ,{overflowY:"auto",wrap:"wrap",align:"center",justify:"space-evenly",direction:"row",children:s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{m:"2px",children:(0,r.jsx)(i.$n,{color:"transparent",width:"105px",textAlign:"center",content:e.name,selected:e.id===u,onClick:function(){return a("select_destination",{destination:e.id})}})},n)})})})]})})})})}},6381:function(e,n,t){"use strict";t.r(n),t.d(n,{DisposalBin:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data;return 2===s.mode?(n="good",t="Ready"):s.mode<=0?(n="bad",t="N/A"):1===s.mode?(n="average",t="Pressurizing"):(n="average",t="Idle"),(0,r.jsx)(l.p8,{width:300,height:260,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"State",color:n,children:t}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{ranges:{bad:[-1/0,0],average:[0,99],good:[99,1/0]},value:s.pressure,minValue:0,maxValue:100})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Handle",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:s.isAI||s.panel_open,content:"Disengaged",selected:!s.flushing,onClick:function(){return c("disengageHandle")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:s.isAI||s.panel_open,content:"Engaged",selected:s.flushing,onClick:function(){return c("engageHandle")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:-1===s.mode,content:"Off",selected:!s.mode,onClick:function(){return c("pumpOff")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:-1===s.mode,content:"On",selected:s.mode,onClick:function(){return c("pumpOn")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Eject",children:(0,r.jsx)(i.$n,{icon:"sign-out-alt",disabled:s.isAI,content:"Eject Contents",onClick:function(){return c("eject")}})})]})})]})})}},2908:function(e,n,t){"use strict";t.r(n),t.d(n,{DnaVault:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).completed;return(0,r.jsx)(a.p8,{width:350,height:270,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),!!t&&(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.dna,a=t.dna_max,c=t.plants,s=t.plants_max,u=t.animals,d=t.animals_max;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"DNA Vault Database",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Human DNA",children:(0,r.jsx)(i.z2,{value:l/a,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:l+" / "+a+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Plant DNA",children:(0,r.jsx)(i.z2,{value:c/s,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:c+" / "+s+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Animal DNA",children:(0,r.jsx)(i.z2,{value:u/d,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:u+" / "+d+" Samples"})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.choiceA,s=a.choiceB,u=a.used;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{fill:!0,title:"Personal Gene Therapy",children:[(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Applicable Gene Therapy Treatments"}),!u&&(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:c,textAlign:"center",onClick:function(){return t("gene",{choice:c})}})}),(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:s,textAlign:"center",onClick:function(){return t("gene",{choice:s})}})})]})||(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Users DNA deemed unstable. Unable to provide more upgrades."})]})})}},2480:function(e,n,t){"use strict";t.r(n),t.d(n,{DroneConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){return(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.drone_fab,c=o.fab_power,s=o.drone_prod,u=o.drone_progress;return(0,r.jsx)(i.wn,{title:"Drone Fabricator",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"Online":"Offline",color:s?"green":"red",onClick:function(){return t("toggle_fab")}}),children:a?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Power",children:(0,r.jsxs)(i.az,{color:c?"good":"bad",children:["[ ",c?"Online":"Offline"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Drone Production",children:(0,r.jsx)(i.z2,{value:u/100,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})})]}):(0,r.jsx)(i.IC,{textAlign:"center",danger:1,children:(0,r.jsxs)(i.so,{inline:1,direction:"column",children:[(0,r.jsx)(i.so.Item,{children:"FABRICATOR NOT DETECTED."}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{icon:"search",content:"Search",onClick:function(){return t("find_fab")}})})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.drones,s=a.area_list,u=a.selected_area,d=a.ping_cd,f=function(e,n){var t,o;return 2===e?(t="bad",o="Disabled"):1!==e&&n?(t="good",o="Active"):(t="average",o="Inactive"),(0,r.jsx)(i.az,{color:t,children:o})};return(0,r.jsxs)(i.wn,{title:"Maintenance Units",children:[(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{children:"Request Drone presence in area:\xa0"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"125px",onSelected:function(e){return t("set_area",{area:e})}})})]}),(0,r.jsx)(i.$n,{content:"Send Ping",icon:"broadcast-tower",disabled:d||!c.length,title:c.length?null:"No active drones!",fluid:!0,textAlign:"center",py:.4,mt:.6,onClick:function(){return t("ping")}}),(0,r.jsx)(function(){if(c.length)return(0,r.jsx)(i.az,{py:.2,children:(0,r.jsx)(i.cG,{})})},{}),c.map(function(e){return(0,r.jsx)(i.wn,{title:(0,o.Sn)(e.name),buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sync",content:"Resync",disabled:2===e.stat||e.sync_cd,onClick:function(){return t("resync",{uid:e.uid})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Confirm,{icon:"power-off",content:"Recall",disabled:2===e.stat||e.pathfinding,tooltip:e.pathfinding?"This drone is currently pathfinding, please wait.":null,tooltipPosition:"left",color:"bad",onClick:function(){return t("recall",{uid:e.uid})}})})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:f(e.stat,e.client)}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:e.health,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Charge",children:(0,r.jsx)(i.z2,{value:e.charge,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location})]})},e.name)})]})}},1654:function(e,n,t){"use strict";t.r(n),t.d(n,{EFTPOS:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf,ERTOverview:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj?"red":"green",children:[g," total, versus ",j," spawnpoints"]})}),(0,r.jsx)(o.Ki.Item,{label:"Dispatch",children:(0,r.jsx)(o.$n,{width:10.5,textAlign:"center",icon:"ambulance",onClick:function(){return n("dispatch_ert",{silent:v})},children:"Send ERT"})})]})})})},p=function(){var e=(0,a.Oc)(),n=e.act,t=e.data.ert_request_messages;return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:t&&t.length?t.map(function(e){return(0,r.jsx)(o.wn,{title:e.time,buttons:(0,r.jsx)(o.$n,{onClick:function(){return n("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel",children:e.sender_real_name}),children:e.message},(0,l.jT)(e.time))}):(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsxs)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(o.In.Stack,{children:[(0,r.jsx)(o.In,{name:"broadcast-tower",size:5,color:"gray"}),(0,r.jsx)(o.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No ERT requests."]})})})})},x=function(){var e=(0,a.Oc)().act,n=u((0,i.useState)(""),2),t=n[0],l=n[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.fs,{placeholder:"Enter ERT denial reason here. Shift-Enter to add a new line.",fluid:!0,height:24,value:t,onChange:function(e){return l(e)}}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"times",mt:2,textAlign:"center",onClick:function(){return e("deny_ert",{reason:t})},children:"Deny ERT"})]})})}},9644:function(e,n,t){"use strict";t.r(n),t.d(n,{EconomyManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:325,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.next_payroll_time;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{label:"Pay Bonuses and Deductions",children:[(0,r.jsx)(i.Ki.Item,{label:"Global",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"global"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Members",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department_members"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Single Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)(i.az,{mb:.5,children:["Next Payroll in: ",l," Minutes"]}),(0,r.jsx)(i.$n,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return t("delay_payroll")}}),(0,r.jsx)(i.$n,{width:"auto",content:"Set Payroll Time",onClick:function(){return t("set_payroll")}}),(0,r.jsx)(i.$n,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return t("accelerate_payroll")}})]}),(0,r.jsxs)(i.IC,{children:[(0,r.jsx)("b",{children:"WARNING:"})," You take full responsibility for unbalancing the economy with these buttons!"]})]})}},6426:function(e,n,t){"use strict";t.r(n),t.d(n,{Electropack:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.power,u=c.code,d=c.frequency,f=c.minFrequency,h=c.maxFrequency;return(0,r.jsx)(a.p8,{width:360,height:135,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Frequency",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"freq"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:f/10,maxValue:h/10,value:d/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"code"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(e){return t("code",{code:e})}})})]})})})})}},9480:function(e,n,t){"use strict";t.r(n),t.d(n,{Emojipedia:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";return e&&0!==e.length?(e=(0,i.pb)(e,function(e){return!!(null==e?void 0:e.name)}),n&&(e=(0,i.pb)(e,(0,a.XZ)(n,function(e){return e.name+"|"+e.description}))),(0,i.Ul)(e,function(e){return null==e?void 0:e.name})):[]},C=function(e){if(y(e),""===e)return k(x.abilities);k(_(f.map(function(e){return e.abilities}).flat(),e))},I=function(e){g(e),k(e.abilities),y("")};return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.pd,{width:"200px",placeholder:"Search Abilities",onChange:function(e){C(e)},value:b}),(0,r.jsx)(l.$n,{icon:m?"square-o":"check-square-o",selected:!m,content:"Compact",onClick:function(){return t("set_view_mode",{mode:0})}}),(0,r.jsx)(l.$n,{icon:m?"check-square-o":"square-o",selected:m,content:"Expanded",onClick:function(){return t("set_view_mode",{mode:1})}})]}),children:[(0,r.jsx)(l.tU,{children:f.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===b&&x===e,onClick:function(){I(e)},children:e.category},e)})}),w.map(function(e,n){return(0,r.jsxs)(l.az,{p:.5,mx:-1,className:"candystripe",children:[(0,r.jsxs)(l.BJ,{align:"center",children:[(0,r.jsx)(l.BJ.Item,{ml:.5,color:"#dedede",children:e.name}),h.includes(e.power_path)&&(0,r.jsx)(l.BJ.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,r.jsxs)(l.BJ.Item,{mr:3,textAlign:"right",grow:1,children:[(0,r.jsxs)(l.az,{as:"span",color:"label",children:["Cost:"," "]}),(0,r.jsx)(l.az,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,r.jsx)(l.BJ.Item,{textAlign:"right",children:(0,r.jsx)(l.$n,{mr:.5,disabled:e.cost>u||h.includes(e.power_path),content:"Evolve",onClick:function(){return t("purchase",{power_path:e.power_path})}})})]}),!!m&&(0,r.jsx)(l.BJ,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},n)})]})})}},6251:function(e,n,t){"use strict";t.r(n),t.d(n,{ExosuitFabricator:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(7946),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(0,r.jsx)(o.$n,{icon:"arrow-up",onClick:function(){return t("queueswap",{from:n+1,to:n})}}),n0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--time",children:[(0,r.jsx)(o.cG,{}),"Processing time:",(0,r.jsx)(o.In,{name:"clock",mx:"0.5rem"}),(0,r.jsx)(o.az,{inline:!0,bold:!0,children:new Date(u/10*1e3).toISOString().substr(14,5)})]}),Object.keys(s).length>0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,r.jsx)(o.cG,{}),"Lacking materials to complete:",s.map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])})]})]})})})},j=function(e){var n,t,i=(0,c.Oc)(),a=(i.act,i.data),s=e.id,u=e.amount,d=e.lineDisplay,f=e.onClick,h=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["id","amount","lineDisplay","onClick"]),m=a.materials[s]||0,p=u||m;if(!(p<=0)||"metal"===s||"glass"===s)return(0,r.jsx)(o.BJ,(n=function(e){for(var n=1;nm&&"bad",ml:0,mr:1,children:p.toLocaleString("en-US")})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{basis:"content",children:(0,r.jsx)(o.$n,{width:"85%",color:"transparent",onClick:f,children:(0,r.jsx)(o.az,{mt:1,className:(0,l.Ly)(["materials32x32",s])})})}),(0,r.jsxs)(o.BJ.Item,{grow:"1",children:[(0,r.jsx)(o.az,{className:"Exofab__material--name",children:s}),(0,r.jsxs)(o.az,{className:"Exofab__material--amount",children:[p.toLocaleString("en-US")," cm\xb3 (",Math.round(p/2e3*10)/10," ","sheets)"]})]})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,l=e.design;return(0,r.jsxs)(o.az,{className:"Exofab__design",children:[(0,r.jsx)(o.$n,{disabled:l.notEnough||i.building,icon:"cog",content:l.name,onClick:function(){return t("build",{id:l.id})}}),(0,r.jsx)(o.$n,{icon:"plus-circle",onClick:function(){return t("queue",{id:l.id})}}),(0,r.jsx)(o.az,{className:"Exofab__design--cost",children:Object.entries(l.cost).map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])})}),(0,r.jsx)(o.BJ,{className:"Exofab__design--time",children:(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.In,{name:"clock"}),l.time>0?(0,r.jsxs)(r.Fragment,{children:[l.time/10," seconds"]}):"Instant"]})})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data.controllers;return(0,r.jsx)(u.p8,{children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(o.wn,{title:"Setup Linkage",children:(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Network Address"}),(0,r.jsx)(o.XI.Cell,{children:"Network ID"}),(0,r.jsx)(o.XI.Cell,{children:"Link"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.addr}),(0,r.jsx)(o.XI.Cell,{children:e.net_id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})},v=function(e){var n=(0,c.Oc)(),t=(n.act,n.data).tech_levels,i=e.showLevelsModal,l=e.setShowLevelsModal;return i?(0,r.jsx)(o.aF,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:(0,r.jsx)(o.wn,{title:"Current tech levels",buttons:(0,r.jsx)(o.$n,{content:"Close",onClick:function(){l(!1)}}),children:(0,r.jsx)(o.Ki,{children:t.map(function(e){var n=e.name,t=e.level;return(0,r.jsx)(o.Ki.Item,{label:n,children:t},n)})})})}):null}},9621:function(e,n,t){"use strict";t.r(n),t.d(n,{ExperimentConsole:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),c=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),s=function(e){var n=(0,o.Oc)(),t=n.act,s=n.data,u=s.open,d=s.feedback,f=s.occupant,h=s.occupant_name,m=s.occupant_status,p=function(){if(!f)return(0,r.jsx)(i.IC,{children:"No specimen detected."});var e=a.get(m);return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:h}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:e.color,children:e.text}),(0,r.jsx)(i.Ki.Item,{label:"Experiments",children:[0,1,2].map(function(e){return(0,r.jsx)(i.$n,{icon:c.get(e).icon,content:c.get(e).label,onClick:function(){return t("experiment",{experiment_type:e})}},e)})})]})}();return(0,r.jsx)(l.p8,{theme:"abductor",width:350,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Status",children:d})})}),(0,r.jsx)(i.wn,{title:"Scanner",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return t("door")}}),children:p})]})})}},5091:function(e,n,t){"use strict";t.r(n),t.d(n,{ExternalAirlockController:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n="good";return e<80?n="bad":e<95||e>110?n="average":e>120&&(n="bad"),n},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.chamber_pressure,u=(c.exterior_status,c.interior_status),d=c.processing;return(0,r.jsx)(l.p8,{width:330,height:205,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Chamber Pressure",children:(0,r.jsxs)(i.z2,{color:a(s),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,r.jsxs)(i.wn,{title:"Actions",buttons:(0,r.jsx)(i.$n,{content:"Abort",icon:"ban",color:"red",disabled:!d,onClick:function(){return t("abort")}}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:d,onClick:function(){return t("cycle_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:d,onClick:function(){return t("cycle_int")}})]}),(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_int")}})]})]})]})})}},6325:function(e,n,t){"use strict";t.r(n),t.d(n,{FaxMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:540,height:295,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:a.scan_name?"eject":"id-card",selected:a.scan_name,content:a.scan_name?a.scan_name:"-----",tooltip:a.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})}),(0,r.jsx)(i.Ki.Item,{label:"Authorize",children:(0,r.jsx)(i.$n,{icon:a.authenticated?"sign-out-alt":"id-card",selected:a.authenticated,disabled:a.nologin,content:a.realauth?"Log Out":"Log In",onClick:function(){return t("auth")}})})]})}),(0,r.jsx)(i.wn,{title:"Fax Menu",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Network",children:a.network}),(0,r.jsxs)(i.Ki.Item,{label:"Document",children:[(0,r.jsx)(i.$n,{icon:a.paper?"eject":"paperclip",disabled:!a.authenticated&&!a.paper,content:a.paper?a.paper:"-----",onClick:function(){return t("paper")}}),!!a.paper&&(0,r.jsx)(i.$n,{icon:"pencil-alt",content:"Rename",onClick:function(){return t("rename")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Sending To",children:(0,r.jsx)(i.$n,{icon:"print",content:a.destination?a.destination:"-----",disabled:!a.authenticated,onClick:function(){return t("dept")}})}),(0,r.jsx)(i.Ki.Item,{label:"Action",children:(0,r.jsx)(i.$n,{icon:"envelope",content:a.sendError?a.sendError:"Send",disabled:!a.paper||!a.destination||!a.authenticated||a.sendError,onClick:function(){return t("send")}})})]})})]})})}},9788:function(e,n,t){"use strict";t.r(n),t.d(n,{FilingCabinet:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=n.config,s=a.contents,u=c.title;return(0,r.jsx)(l.p8,{width:400,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Contents",children:[!s&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"folder-open",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"The ",u," is empty."]})}),!!s&&s.slice().map(function(e){return(0,r.jsxs)(i.BJ,{mt:.5,className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"80%",children:e.display_name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Retrieve",onClick:function(){return t("retrieve",{index:e.index})}})})]},e)})]})})})})}},26:function(e,n,t){"use strict";t.r(n),t.d(n,{FloorPainter:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=e.icon_state,a=e.direction,c=e.isSelected,s=e.onSelect;return(0,r.jsx)(i.Hg,{icon:t.icon,icon_state:l,direction:a,onClick:s,style:{borderStyle:c&&"solid"||"none",borderWidth:"2px",borderColor:"orange",padding:c&&"0px"||"2px"}})},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.availableStyles,u=c.selectedStyle,d=c.selectedDir,f=c.wideMode;return(0,r.jsx)(l.p8,{width:405,height:475,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.wn,{title:"Floor setup",children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-left",onClick:function(){return t("cycle_style",{offset:-1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(e){return t("select_style",{style:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-right",onClick:function(){return t("cycle_style",{offset:1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eraser",color:f?"green":"transparent",onClick:function(){return t("wide_mode")},children:"Wide mode"})})]}),(0,r.jsx)(i.az,{mt:"5px",mb:"5px",children:(0,r.jsx)(i.so,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:s.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(a,{icon_state:e,isSelected:u===e,onSelect:function(){return t("select_style",{style:e})}})},e)})})}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Direction",children:(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,null,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:null===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(a,{icon_state:u,direction:e,isSelected:e===d,onSelect:function(){return t("select_direction",{direction:e})}})},e)})},e)})})})})]})})})}},1561:function(e,n,t){"use strict";t.r(n),t.d(n,{GPS:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]}),void 0!==e.due&&(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.In,{name:"arrow-up",rotation:e.due}),"\xa0--"]})]}),(0,r.jsx)(o.XI.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:d(e.position)})]},n)})})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}},1259:function(e,n,t){"use strict";t.r(n),t.d(n,{GeneModder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)().data.has_seed;return(0,r.jsxs)(l.p8,{width:950,height:650,children:[(0,r.jsx)("div",{className:"GeneModder__left",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(x,{scrollable:!0})})}),(0,r.jsx)("div",{className:"GeneModder__right",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(a.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,r.jsx)(u,{}):(0,r.jsx)(s,{})]})})})]})},s=function(e){var n=(0,o.Oc)();return(n.act,n.data).disk,(0,r.jsxs)(i.wn,{title:"Genes",fill:!0,scrollable:!0,children:[(0,r.jsx)(f,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})},u=function(e){return(0,r.jsx)(i.wn,{fill:!0,height:"85%",children:(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,r.jsx)(i.In,{name:"leaf",size:5,mb:"10px"}),(0,r.jsx)("br",{}),"The plant DNA manipulator is missing a seed."]})})})},d=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.has_seed,u=c.seed,d=c.has_disk,f=c.disk;return n=s?(0,r.jsxs)(i.BJ.Item,{mb:"-6px",mt:"-4px",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(u.image),style:{verticalAlign:"middle",width:"32px",margin:"-1px",marginLeft:"-11px"}}),(0,r.jsx)(i.$n,{content:u.name,onClick:function(){return a("eject_seed")}}),(0,r.jsx)(i.$n,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return a("variant_name")}})]}):(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:"None",onClick:function(){return a("eject_seed")}})}),t=d?f.name:"None",(0,r.jsx)(i.wn,{title:"Storage",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Plant Sample",children:n}),(0,r.jsx)(i.Ki.Item,{label:"Data Disk",children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:t,tooltip:"Select Empty Disk",onClick:function(){return a("select_empty_disk")}})})})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.disk,c=l.core_genes;return(0,r.jsxs)(i.Nt,{title:"Core Genes",open:!0,children:[c.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("extract",{id:e.id})}})})]},e)})," ",(0,r.jsx)(i.BJ,{children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract All",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("bulk_extract_core")}})})})]},"Core Genes")},h=function(e){var n=(0,o.Oc)().data,t=n.reagent_genes,i=n.has_reagent;return(0,r.jsx)(p,{title:"Reagent Genes",gene_set:t,do_we_show:i})},m=function(e){var n=(0,o.Oc)().data,t=n.trait_genes,i=n.has_trait;return(0,r.jsx)(p,{title:"Trait Genes",gene_set:t,do_we_show:i})},p=function(e){var n=e.title,t=e.gene_set,l=e.do_we_show,a=(0,o.Oc)(),c=a.act,s=a.data.disk;return(0,r.jsx)(i.Nt,{title:n,open:!0,children:l?t.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==s?void 0:s.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove",icon:"times",onClick:function(){return c("remove",{id:e.id})}})})]},e)}):(0,r.jsx)(i.BJ.Item,{children:"No Genes Detected"})},n)},x=function(e){e.title,e.gene_set,e.do_we_show;var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_seed,c=l.empty_disks,s=l.stat_disks,u=l.trait_disks,d=l.reagent_disks;return(0,r.jsxs)(i.wn,{title:"Disks",children:[(0,r.jsx)("br",{}),"Empty Disks: ",c,(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){return t("eject_empty_disk")}}),(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stats",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[s.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:["All"===e.stat?(0,r.jsx)(i.$n,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(null==e?void 0:e.ready)||!a,icon:"arrow-circle-down",onClick:function(){return t("bulk_replace_core",{index:e.index})}}):(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!e||!a,content:"Replace",onClick:function(){return t("replace",{index:e.index,stat:e.stat})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Traits",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[u.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Reagents",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})})]})]})}},6954:function(e,n,t){"use strict";t.r(n),t.d(n,{GenericCrewManifest:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(2639),a=function(e){return(0,r.jsx)(o.p8,{theme:"nologo",width:588,height:510,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{noTopPadding:!0,children:(0,r.jsx)(l.CrewManifest,{})})})})}},9031:function(e,n,t){"use strict";t.r(n),t.d(n,{GhostHudPanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data,t=n.security,a=n.medical,s=n.diagnostic,u=n.pressure,d=n.radioactivity,f=n.ahud;return(0,r.jsx)(l.p8,{width:250,height:217,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(c,{label:"Medical",type:"medical",is_active:a}),(0,r.jsx)(c,{label:"Security",type:"security",is_active:t}),(0,r.jsx)(c,{label:"Diagnostic",type:"diagnostic",is_active:s}),(0,r.jsx)(c,{label:"Pressure",type:"pressure",is_active:u}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"toggle_rad",act_off:"toggle_rad"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Antag HUD",is_active:f,act_on:"ahud_on",act_off:"ahud_off"})]})})})},c=function(e){var n=(0,o.Oc)().act,t=e.label,l=e.type,a=void 0===l?null:l,c=e.is_active,s=e.act_on,u=void 0===s?"hud_on":s,d=e.act_off,f=void 0===d?"hud_off":d;return(0,r.jsxs)(i.so,{pt:.3,color:"label",children:[(0,r.jsx)(i.so.Item,{pl:.5,align:"center",width:"80%",children:t}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{mr:.6,content:c?"On":"Off",icon:c?"toggle-on":"toggle-off",selected:c,onClick:function(){return n(c?f:u,{hud_type:a})}})})]})}},3396:function(e,n,t){"use strict";t.r(n),t.d(n,{GlandDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.glands;return(0,r.jsx)(l.p8,{width:300,height:338,theme:"abductor",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(void 0===a?[]:a).map(function(e){return(0,r.jsx)(i.$n,{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 t("dispense",{gland_id:e.id})}},e.id)})})})})}},1009:function(e,n,t){"use strict";t.r(n),t.d(n,{GravityGen:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.charging_state,s=a.charge_count,u=a.breaker,d=a.ext_power;return(0,r.jsx)(l.p8,{width:350,height:170,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[function(e){if(e>0)return(0,r.jsxs)(i.IC,{danger:!0,p:1.5,children:[(0,r.jsx)("b",{children:"WARNING:"})," Radiation Detected!"]})}(c),(0,r.jsx)(i.wn,{fill:!0,title:"Generator Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"Online":"Offline",color:u?"green":"red",px:1.5,onClick:function(){return t("breaker")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power Status",color:d?"good":"bad",children:c>0?(0,r.jsxs)(i.az,{inline:!0,color:"average",children:["[ ",1===c?"Charging":"Discharging"," ]"]}):(0,r.jsxs)(i.az,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Gravity Charge",children:(0,r.jsx)(i.z2,{value:s/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}},6294:function(e,n,t){"use strict";t.r(n),t.d(n,{GuestPass:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(l.p8,{width:500,height:690,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){return t("mode",{mode:0})},children:"Issue Pass"}),(0,r.jsxs)(i.tU.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){return t("mode",{mode:1})},children:["Records (",c.issue_log.length,")"]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})})})})}),(0,r.jsx)(i.BJ.Item,{children:!c.showlogs&&(0,r.jsx)(i.wn,{title:"Issue Guest Pass",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Issue To",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){return t("giv_name")}})}),(0,r.jsx)(i.Ki.Item,{label:"Reason",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){return t("reason")}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){return t("duration")}})})]})})}),!c.showlogs&&(c.scan_name?(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){return t("issue")}}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(e){return t("access",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}):(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"id-card",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,r.jsx)(i.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){return t("print")}}),children:!!c.issue_log.length&&(0,r.jsx)(i.Ki,{children:c.issue_log.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{children:e},n)})})||(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"scroll",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No logs"]})})})})]})})})}},9511:function(e,n,t){"use strict";t.r(n),t.d(n,{HandheldChemDispenser:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[1,5,10,20,30,50],c=function(e){return(0,r.jsx)(l.p8,{width:390,height:430,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.amount,s=l.energy,u=l.maxEnergy,d=l.mode;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Amount",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:a.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:c===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})}),(0,r.jsx)(i.Ki.Item,{label:"Mode",verticalAlign:"middle",children:(0,r.jsxs)(i.BJ,{justify:"space-between",children:[(0,r.jsx)(i.$n,{icon:"cog",selected:"dispense"===d,content:"Dispense",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"dispense"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"remove"===d,content:"Remove",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"remove"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"isolate"===d,content:"Isolate",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"isolate"})}})]})})]})})})},u=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=l.current_reagent,u=[],d=0;d<(c.length+1)%3;d++)u.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"18%",children:(0,r.jsxs)(i.wn,{fill:!0,title:l.glass?"Drink Selector":"Chemical Selector",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:s===e.id,content:e.title,style:{marginLeft:"2px"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),u.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:"1",basis:"25%"},n)})]})})}},3365:function(e,n,t){"use strict";t.r(n),t.d(n,{HealthSensor:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,u=c.on,d=c.user_health,f=c.minHealth,h=c.maxHealth,m=c.alarm_health;return(0,r.jsx)(a.p8,{width:300,height:125,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scanning",children:(0,r.jsx)(i.$n,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return t("scan_toggle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health activation",children:(0,r.jsx)(i.Q7,{animate:!0,step:2,stepPixelSize:6,minValue:f,maxValue:h,value:m,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("alarm_health",{alarm_health:e})}})}),null!==d&&(0,r.jsx)(i.Ki.Item,{label:"User health",children:(0,r.jsx)(i.az,{color:s(d),bold:d>=100,children:(0,r.jsx)(i.zv,{value:d})})})]})})})})},s=function(e){return e>50?"green":e>0?"orange":"red"}},5880:function(e,n,t){"use strict";t.r(n),t.d(n,{Holodeck:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(3384),l=t(2864),a=t(7542),c=t(2723),s=function(){var e=(0,l.Oc)(),n=e.act,t=e.data,s=t.card,u=t.card_skins,d=t.all_centcom_skins,f=t.regions;return(0,r.jsx)(o.p8,{width:600,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Basic Information",children:[(0,r.jsx)(a.CardInformation,{card:s}),(0,r.jsx)(i.Ki.Item,{label:"Job Name",children:(0,r.jsx)(i.$n,{icon:s&&"Unknown"!==s.rank?"pencil-alt":"exclamation-triangle",selected:!!s,onClick:function(){return n("set_job_name")},children:null==s?void 0:s.rank})})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(a.DropdownCardSkins,{is_centcom:!0,card:s,card_skins:u,all_centcom_skins:d})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(c.AccessList,{accesses:f,selectedList:s.access,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})}})})]})})})}},6126:function(e,n,t){"use strict";t.r(n),t.d(n,{Instrument:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)();return n.act,n.data,(0,r.jsxs)(l.p8,{width:600,height:505,children:[(0,r.jsx)(c,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(d,{})]})})]})},c=function(e){var n=(0,o.Oc)(),t=n.act;if(n.data.help)return(0,r.jsx)(i.aF,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,r.jsx)(i.wn,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,r.jsxs)(i.az,{px:"0.5rem",mt:"-0.5rem",children:[(0,r.jsx)("h1",{children:"Making a Song"}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsx)("h1",{children:"Instrument Advanced Settings"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Type:"}),"\xa0Whether the instrument is legacy or synthesized.",(0,r.jsx)("br",{}),"Legacy instruments have a collection of sounds that are selectively used depending on the note to play.",(0,r.jsx)("br",{}),"Synthesized instruments use a base sound and change its pitch to match the note to play."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Current:"}),"\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),"\xa0The pitch to apply to all notes of the song."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain Mode:"}),"\xa0How a played note fades out.",(0,r.jsx)("br",{}),"Linear sustain means a note will fade out at a constant rate.",(0,r.jsx)("br",{}),"Exponential sustain means a note will fade out at an exponential rate, sounding smoother."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),"\xa0The volume threshold at which a note is fully stopped."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),"\xa0Whether the last note should be sustained indefinitely."]})]}),(0,r.jsx)(i.$n,{color:"grey",content:"Close",onClick:function(){return t("help")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.lines,c=l.playing,s=l.repeat,d=l.maxRepeats,f=l.tempo,h=l.minTempo,m=l.maxTempo,p=l.tickLag,x=l.volume,g=l.minVolume,j=l.maxVolume,b=l.ready;return(0,r.jsxs)(i.wn,{m:0,title:"Instrument",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"info",content:"Help",onClick:function(){return t("help")}}),(0,r.jsx)(i.$n,{icon:"file",content:"New",onClick:function(){return t("newsong")}}),(0,r.jsx)(i.$n,{icon:"upload",content:"Import",onClick:function(){return t("import")}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Playback",children:[(0,r.jsx)(i.$n,{selected:c,disabled:0===a.length||s<0,icon:"play",content:"Play",onClick:function(){return t("play")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"stop",content:"Stop",onClick:function(){return t("stop")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Repeat",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:0,maxValue:d,value:s,stepPixelSize:59,onChange:function(e,n){return t("repeat",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Tempo",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{disabled:f>=m,content:"-",as:"span",mr:"0.5rem",onClick:function(){return t("tempo",{new:f+p})}}),Math.round(600/f)," BPM",(0,r.jsx)(i.$n,{disabled:f<=h,content:"+",as:"span",ml:"0.5rem",onClick:function(){return t("tempo",{new:f-p})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Volume",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:g,maxValue:j,value:x,stepPixelSize:6,tickWhileDragging:!0,onChange:function(e,n){return t("setvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:b?(0,r.jsx)(i.az,{color:"good",children:"Ready"}):(0,r.jsx)(i.az,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,r.jsx)(u,{})]})},u=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.allowedInstrumentNames,u=c.instrumentLoaded,d=c.instrument,f=c.canNoteShift,h=c.noteShift,m=c.noteShiftMin,p=c.noteShiftMax,x=c.sustainMode,g=c.sustainLinearDuration,j=c.sustainExponentialDropoff,b=c.legacy,y=c.sustainDropoffVolume,v=c.sustainHeldNote;return 1===x?(n="Linear",t=(0,r.jsx)(i.Ap,{minValue:.1,maxValue:5,value:g,step:.5,stepPixelSize:85,format:function(e){return Math.round(100*e)/100+" seconds"},onChange:function(e,n){return a("setlinearfalloff",{new:n/10})}})):2===x&&(n="Exponential",t=(0,r.jsx)(i.Ap,{minValue:1.025,maxValue:10,value:j,step:.01,format:function(e){return Math.round(1e3*e)/1e3+"% per decisecond"},onChange:function(e,n){return a("setexpfalloff",{new:n})}})),s.sort(),(0,r.jsx)(i.az,{my:-1,children:(0,r.jsx)(i.Nt,{mt:"1rem",mb:"0",title:"Advanced",children:(0,r.jsxs)(i.wn,{mt:-1,children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:b?"Legacy":"Synthesized"}),(0,r.jsx)(i.Ki.Item,{label:"Current",children:u?(0,r.jsx)(i.ms,{options:s,selected:d,width:"50%",onSelected:function(e){return a("switchinstrument",{name:e})}}):(0,r.jsx)(i.az,{color:"bad",children:"None!"})}),!!(!b&&f)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Note Shift/Note Transpose",children:(0,r.jsx)(i.Ap,{minValue:m,maxValue:p,value:h,stepPixelSize:2,format:function(e){return e+" keys / "+Math.round(e/12*100)/100+" octaves"},onChange:function(e,n){return a("setnoteshift",{new:n})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Sustain Mode",children:[(0,r.jsx)(i.ms,{options:["Linear","Exponential"],selected:n,mb:"0.4rem",onSelected:function(e){return a("setsustainmode",{new:e})}}),t]}),(0,r.jsx)(i.Ki.Item,{label:"Volume Dropoff Threshold",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:.01,maxValue:100,value:y,stepPixelSize:6,onChange:function(e,n){return a("setdropoffvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Sustain indefinitely last held note",children:(0,r.jsx)(i.$n,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"Yes":"No",onClick:function(){return a("togglesustainhold")}})})]})]}),(0,r.jsx)(i.$n,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return a("reset")}})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.playing,c=l.lines,s=l.editing;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!s||a,icon:"plus",content:"Add Line",onClick:function(){return t("newline",{line:c.length+1})}}),(0,r.jsx)(i.$n,{selected:!s,icon:s?"chevron-up":"chevron-down",onClick:function(){return t("edit")}})]}),children:!!s&&(c.length>0?(0,r.jsx)(i.Ki,{children:c.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:n+1,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:a,icon:"pen",onClick:function(){return t("modifyline",{line:n+1})}}),(0,r.jsx)(i.$n,{disabled:a,icon:"trash",onClick:function(){return t("deleteline",{line:n+1})}})]}),children:e},n)})}):(0,r.jsx)(i.az,{color:"label",children:"Song is empty."}))})}},1783:function(e,n,t){"use strict";t.r(n),t.d(n,{KeyComboModal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=48&&e.keyCode<=57)&&(n+="Shift"),3===e.location&&(n+="Numpad"),h(e))if(e.shiftKey&&e.keyCode>=48&&e.keyCode<=57)n+="Shift"+(e.keyCode-48);else{var t=e.key.toUpperCase();n+=m[t]||t}return n},x=function(e){var n=(0,a.Oc)(),t=n.act,d=n.data,m=d.init_value,x=d.large_buttons,g=d.message,j=void 0===g?"":g,b=d.title,y=d.timeout,v=f((0,i.useState)(m),2),w=v[0],k=v[1],_=f((0,i.useState)(!0),2),C=_[0],I=_[1],S=function(e){if(!C){e.key===l._.Enter&&t("submit",{entry:w}),(0,l.KL)(e.key)&&t("cancel");return}if(e.preventDefault(),h(e)){O(p(e)),I(!1);return}if(e.key===l._.Escape){O(m),I(!1);return}},O=function(e){e!==w&&k(e)},A=130+(j.length>30?Math.ceil(j.length/3):0)+(j.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:b,width:240,height:A,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){S(e)},children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.y5,{}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:C,content:C&&null!==C?"Awaiting input...":""+w,width:"100%",textAlign:"center",onClick:function(){O(m),I(!0)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})]})})]})}},3928:function(e,n,t){"use strict";t.r(n),t.d(n,{KeycardAuth:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=(0,r.jsx)(i.wn,{title:"Keycard Authentication Device",children:(0,r.jsx)(i.az,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!a.swiping&&!a.busy)return(0,r.jsx)(l.p8,{width:540,height:280,children:(0,r.jsxs)(l.p8.Content,{children:[c,(0,r.jsx)(i.wn,{title:"Choose Action",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Red Alert",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",disabled:!a.redAvailable,onClick:function(){return t("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,r.jsx)(i.Ki.Item,{label:"ERT",children:(0,r.jsx)(i.$n,{icon:"broadcast-tower",onClick:function(){return t("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Maint Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Station-Wide Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})});var s=(0,r.jsx)(i.az,{color:"red",children:"Waiting for YOU to swipe your ID..."});return a.hasSwiped||a.ertreason||"Emergency Response Team"!==a.event?a.hasConfirm?s=(0,r.jsx)(i.az,{color:"green",children:"Request Confirmed!"}):a.isRemote?s=(0,r.jsx)(i.az,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):a.hasSwiped&&(s=(0,r.jsx)(i.az,{color:"orange",children:"Waiting for second person to confirm..."})):s=(0,r.jsx)(i.az,{color:"red",children:"Fill out the reason for your ERT request."}),(0,r.jsx)(l.p8,{width:540,height:265,children:(0,r.jsxs)(l.p8.Content,{children:[c,"Emergency Response Team"===a.event&&(0,r.jsx)(i.wn,{title:"Reason for ERT Call",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{color:a.ertreason?"":"red",icon:a.ertreason?"check":"pencil-alt",content:a.ertreason?a.ertreason:"-----",disabled:a.busy,onClick:function(){return t("ert")}})})}),(0,r.jsx)(i.wn,{title:a.event,buttons:(0,r.jsx)(i.$n,{icon:"arrow-circle-left",content:"Back",disabled:a.busy||a.hasConfirm,onClick:function(){return t("reset")}}),children:s})]})})}},6706:function(e,n,t){"use strict";t.r(n),t.d(n,{KitchenMachine:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.config,u=t.ingredients,d=t.operating,f=c.title;return(0,r.jsx)(l.p8,{width:400,height:320,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.Operating,{operating:d,name:f}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(s,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:u.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.inactive,c=l.tooltip;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"power-off",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return t("cook")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return t("eject")}})})]})})}},9846:function(e,n,t){"use strict";t.r(n),t.d(n,{LawManager:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.isAdmin,d=a.isSlaved,f=a.isMalf,h=a.isAIMalf,m=a.view;return(0,r.jsx)(l.p8,{width:800,height:f?620:365,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!(u&&d)&&(0,r.jsxs)(i.IC,{children:["This unit is slaved to ",d,"."]}),!!(f||h)&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:"Law Management",selected:0===m,onClick:function(){return t("set_view",{set_view:0})}}),(0,r.jsx)(i.$n,{content:"Lawsets",selected:1===m,onClick:function(){return t("set_view",{set_view:1})}})]}),0===m&&(0,r.jsx)(c,{}),1===m&&(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_zeroth_laws,c=l.zeroth_laws,s=l.has_ion_laws,d=l.ion_laws,f=l.ion_law_nr,h=l.has_inherent_laws,m=l.inherent_laws,p=l.has_supplied_laws,x=l.supplied_laws,g=l.channels,j=l.channel,b=l.isMalf,y=l.isAdmin,v=l.zeroth_law,w=l.ion_law,k=l.inherent_law,_=l.supplied_law,C=l.supplied_law_position;return(0,r.jsxs)(r.Fragment,{children:[!!a&&(0,r.jsx)(u,{title:"ERR_NULL_VALUE",laws:c,isMalf:b}),!!s&&(0,r.jsx)(u,{title:"".concat(f),laws:d,isMalf:b}),!!h&&(0,r.jsx)(u,{title:"Inherent",laws:m,isMalf:b}),!!p&&(0,r.jsx)(u,{title:"Supplied",laws:x,isMalf:b}),(0,r.jsx)(i.wn,{title:"Statement Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Statement Channel",children:g.map(function(e){return(0,r.jsx)(i.$n,{content:e.channel,selected:e.channel===j,onClick:function(){return t("law_channel",{law_channel:e.channel})}},e.channel)})}),(0,r.jsx)(i.Ki.Item,{label:"State Laws",children:(0,r.jsx)(i.$n,{content:"State Laws",onClick:function(){return t("state_laws")}})}),(0,r.jsx)(i.Ki.Item,{label:"Law Notification",children:(0,r.jsx)(i.$n,{content:"Notify",onClick:function(){return t("notify_laws")}})})]})}),!!b&&(0,r.jsx)(i.wn,{title:"Add Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Type"}),(0,r.jsx)(i.XI.Cell,{width:"60%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"20%",children:"Actions"})]}),!!(y&&!a)&&(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Zero"}),(0,r.jsx)(i.XI.Cell,{children:v}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_zeroth_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_zeroth_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Ion"}),(0,r.jsx)(i.XI.Cell,{children:w}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_ion_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_ion_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Inherent"}),(0,r.jsx)(i.XI.Cell,{children:k}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_inherent_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_inherent_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Supplied"}),(0,r.jsx)(i.XI.Cell,{children:_}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:C,onClick:function(){return t("change_supplied_law_position")}})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_supplied_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_supplied_law")}})]})]})]})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.law_sets;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsx)(i.wn,{title:e.name+" - "+e.header,buttons:(0,r.jsx)(i.$n,{content:"Load Laws",icon:"download",onClick:function(){return t("transfer_laws",{transfer_laws:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)})]})},e.name)})})},u=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.isMalf,a=e.laws,c=e.title;return(0,r.jsx)(i.wn,{title:c+" Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"69%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"21%",children:"State?"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.index}),(0,r.jsx)(i.XI.Cell,{children:e.law}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return t("state_law",{ref:e.ref,state_law:+!e.state})}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("edit_law",{edit_law:e.ref})}}),(0,r.jsx)(i.$n,{content:"Delete",icon:"trash",color:"red",onClick:function(){return t("delete_law",{delete_law:e.ref})}})]})]})]},e.law)})]})})}},3023:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e?"caution":"default",onClick:function(){return i("set_rating",{rating_value:e})}})},n)}),(0,r.jsxs)(o.BJ.Item,{bold:!0,ml:2,fontSize:"150%",children:[a+"/10",(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},h=function(e){var n=(0,l.Oc)().data,t=e.tabIndex,i=e.setTabIndex,a=n.login_state;return(0,r.jsx)(o.BJ.Item,{mb:1,children:(0,r.jsxs)(o.tU,{fluid:!0,textAlign:"center",children:[(0,r.jsx)(o.tU.Tab,{selected:0===t,onClick:function(){return i(0)},children:"Book Archives"}),(0,r.jsx)(o.tU.Tab,{selected:1===t,onClick:function(){return i(1)},children:"Corporate Literature"}),(0,r.jsx)(o.tU.Tab,{selected:2===t,onClick:function(){return i(2)},children:"Upload Book"}),1===a&&(0,r.jsx)(o.tU.Tab,{selected:3===t,onClick:function(){return i(3)},children:"Patron Manager"}),(0,r.jsx)(o.tU.Tab,{selected:4===t,onClick:function(){return i(4)},children:"Inventory"})]})})},m=function(e){switch(e.tabIndex){case 0:return(0,r.jsx)(x,{});case 1:return(0,r.jsx)(g,{});case 2:return(0,r.jsx)(j,{});case 3:return(0,r.jsx)(b,{});case 4:return(0,r.jsx)(y,{});default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},p=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.searchcontent,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{width:"35%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.title||"Input Title",onClick:function(){return(0,c.modalOpen)("edit_search_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.author||"Input Author",onClick:function(){return(0,c.modalOpen)("edit_search_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Ratings",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{mr:1,width:"min-content",content:a.ratingmin,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmin")}})}),(0,r.jsx)(o.BJ.Item,{children:"To"}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{ml:1,width:"min-content",content:a.ratingmax,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmax")}})})]})})]})]}),(0,r.jsxs)(o.BJ.Item,{width:"40%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{mt:2,children:(0,r.jsx)(o.ms,{mt:.6,width:"190px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_search_category",{category_id:d[e]})}})})})}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_search_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,r.jsx)(o.$n,{content:"Clear Search",icon:"eraser",onClick:function(){return t("clear_search")}}),a.ckey?(0,r.jsx)(o.$n,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return t("clear_ckey_search")}}):(0,r.jsx)(o.$n,{content:"Find My Books",icon:"search",onClick:function(){return t("find_users_books",{user_ckey:u})}})]})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.external_booklist,s=i.archive_pagenumber,u=i.num_pages,d=i.login_state;return(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.$n,{icon:"angle-double-left",disabled:1===s,onClick:function(){return t("deincrementpagemax")}}),(0,r.jsx)(o.$n,{icon:"chevron-left",disabled:1===s,onClick:function(){return t("deincrementpage")}}),(0,r.jsx)(o.$n,{bold:!0,content:s,onClick:function(){return(0,c.modalOpen)("setpagenumber")}}),(0,r.jsx)(o.$n,{icon:"chevron-right",disabled:s===u,onClick:function(){return t("incrementpage")}}),(0,r.jsx)(o.$n,{icon:"angle-double-right",disabled:s===u,onClick:function(){return t("incrementpagemax")}})]}),children:[(0,r.jsx)(p,{}),(0,r.jsx)("hr",{}),(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Ratings"}),(0,r.jsx)(o.XI.Cell,{children:"Category"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,r.jsxs)(o.XI.Cell,{children:[e.rating,(0,r.jsx)(o.In,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,r.jsx)(o.XI.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===d&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_external_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},e.id)})]})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.programmatic_booklist,s=i.login_state;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:2}),e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===s&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_programmatic_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},n)})]})})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.selectedbook,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,r.jsx)(o.$n.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:a.copyright,content:"Upload Book",onClick:function(){return t("uploadbook",{user_ckey:u})}}),children:[a.copyright?(0,r.jsx)(o.IC,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,r.jsx)("br",{}),(0,r.jsxs)(o.az,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.title,onClick:function(){return(0,c.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.author,onClick:function(){return(0,c.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{children:(0,r.jsx)(o.ms,{width:"240px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_upload_category",{category_id:d[e]})}})})})]}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,disabled:a.copyright,selected:!0,icon:"unlink",onClick:function(){return t("toggle_upload_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsx)(o.BJ.Item,{mr:75,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Summary",children:(0,r.jsx)(o.$n,{icon:"pen",width:"auto",disabled:a.copyright,content:"Edit Summary",onClick:function(){return(0,c.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(o.Ki.Item,{children:a.summary})]})})]})]})},b=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.checkout_data;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Patron"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Time Left"}),(0,r.jsx)(o.XI.Cell,{children:"Actions"})]}),i.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.In,{name:"user-tag"}),e.patron_name]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.title}),(0,r.jsx)(o.XI.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:(0,r.jsx)(o.$n,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return t("reportlost",{libraryid:e.libraryid})}})})]},n)})]})})},y=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).inventory_list;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"LIB ID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Status"})]}),t.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.libraryid}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book"})," ",e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},n)})]})})};(0,c.modalRegisterBodyOverride)("expand_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,s=i.user_ckey;return(0,r.jsxs)(o.wn,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsx)(o.Ki.Item,{label:"Summary",children:a.summary}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.rating,(0,r.jsx)(o.In,{name:"star",color:"yellow",verticalAlign:"top"})]}),!a.isProgrammatic&&(0,r.jsx)(o.Ki.Item,{label:"Categories",children:a.categories.join(", ")})]}),(0,r.jsx)("br",{}),s===a.ckey&&(0,r.jsx)(o.$n,{content:"Delete Book",icon:"trash",color:"red",disabled:a.isProgrammatic,onClick:function(){return t("delete_book",{bookid:a.id,user_ckey:s})}}),(0,r.jsx)(o.$n,{content:"Report Book",icon:"flag",color:"red",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("report_book",{bookid:a.id})}}),(0,r.jsx)(o.$n,{content:"Rate Book",icon:"star",color:"caution",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("rate_info",{bookid:a.id})}})]})}),(0,c.modalRegisterBodyOverride)("report_book",function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=e.args,s=a.selected_report,u=a.report_categories,d=a.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:c.title}),(0,r.jsx)(o.Ki.Item,{label:"Reasons",children:(0,r.jsx)(o.az,{children:u.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.$n,{content:e.description,selected:e.category_id===s,onClick:function(){return t("set_report",{report_type:e.category_id})}}),(0,r.jsx)("br",{})]},n)})})})]}),(0,r.jsx)(o.$n.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return t("submit_report",{bookid:c.id,user_ckey:d})}})]})}),(0,c.modalRegisterBodyOverride)("rate_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,c=i.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.current_rating?a.current_rating:0,(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,r.jsx)(o.Ki.Item,{label:"Total Ratings",children:a.total_ratings?a.total_ratings:0})]}),(0,r.jsx)(f,{}),(0,r.jsx)(o.$n.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return t("rate_book",{bookid:a.id,user_ckey:c})}})]})})},183:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:600,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)();switch((n.act,n.data).pagestate){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(f,{});case 3:return(0,r.jsx)(d,{});default:return"WE SHOULDN'T BE HERE!"}},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data,(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,a.modalOpen)("specify_ssid_delete")}}),(0,r.jsx)(i.$n,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_delete")}}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_search")}}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return t("view_reported_books")}})]})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.reports;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"All Reported Books",(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Uploader CKEY"}),(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{children:"Report Type"}),(0,r.jsx)(i.XI.Cell,{children:"Reporter Ckey"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.uploader_ckey}),(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.report_description}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.reporter_ckey}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return t("unflag_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.ckey,c=l.booklist;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"Books uploaded by ",a,(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),c.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})}},1536:function(e,n,t){"use strict";t.r(n),t.d(n,{ListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t10),2),I=C[0],S=C[1],O=f((0,i.useState)(""),2),A=O[0],P=O[1],E=function(e){var n,t,r,i,o=T.length-1;e===l.R?null===k||k===o?(_(0),null==(n=document.getElementById("0"))||n.scrollIntoView()):(_(k+1),null==(t=document.getElementById((k+1).toString()))||t.scrollIntoView()):e===l.gf&&(null===k||0===k?(_(o),null==(r=document.getElementById(o.toString()))||r.scrollIntoView()):(_(k-1),null==(i=document.getElementById((k-1).toString()))||i.scrollIntoView()))},B=function(e){var n=String.fromCharCode(e),t=x.find(function(e){return null==e?void 0:e.toLowerCase().startsWith(null==n?void 0:n.toLowerCase())});if(t){var r,i=x.indexOf(t);_(i),null==(r=document.getElementById(i.toString()))||r.scrollIntoView()}},z=function(){S(!I),P("")},T=x.filter(function(e){return null==e?void 0:e.toLowerCase().includes(A.toLowerCase())}),N=350+Math.ceil(j.length/3);return I||setTimeout(function(){var e;return null==(e=document.getElementById(k.toString()))?void 0:e.focus()},1),(0,r.jsxs)(c.p8,{title:v,width:325,height:N,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;(n===l.R||n===l.gf)&&(e.preventDefault(),E(n)),n===l.Ri&&(e.preventDefault(),t("submit",{entry:T[k]})),!I&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),B(n)),n===l.s6&&(e.preventDefault(),t("cancel"))},children:(0,r.jsx)(o.wn,{buttons:(0,r.jsx)(o.$n,{compact:!0,icon:I?"search":"font",selected:!0,tooltip:I?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){return z()}}),className:"ListInput__Section",fill:!0,title:j,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(m,{filteredItems:T,onClick:function(e){e!==k&&_(e)},onFocusSearch:function(){S(!1),S(!0)},searchBarVisible:I,selected:k})}),(0,r.jsx)(o.BJ.Item,{m:0,children:I&&(0,r.jsx)(p,{filteredItems:T,onSearch:function(e){var n;e!==A&&(P(e),_(0),null==(n=document.getElementById("0"))||n.scrollIntoView())},searchQuery:A,selected:k})}),(0,r.jsx)(o.BJ.Item,{mt:.5,children:(0,r.jsx)(s.InputButtons,{input:T[k]})})]})})})]})},m=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onClick,c=e.onFocusSearch,s=e.searchBarVisible,u=e.selected;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:t.map(function(e,a){return(0,r.jsx)(o.$n,{fluid:!0,color:"transparent",id:a,onClick:function(){return i(a)},onMouseDown:function(e){2===e.detail&&(e.preventDefault(),n("submit",{entry:t[u]}))},onKeyDown:function(e){var n=window.event?e.which:e.keyCode;s&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),c())},selected:a===u,style:{animation:"none",transition:"none"},children:e.replace(/^\w/,function(e){return e.toUpperCase()})},a)})})},p=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onSearch,l=e.searchQuery,c=e.selected;return(0,r.jsx)(o.pd,{width:"100%",autoFocus:!0,autoSelect:!0,placeholder:"Search...",value:l,onChange:function(e){return i(e)},onEnter:function(){n("submit",{entry:t[c]})}})}},7239:function(e,n,t){"use strict";t.r(n),t.d(n,{Loadout:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t2?Object.entries(s.gears).reduce(function(e,n){var t=u(n,2),r=(t[0],t[1]);return e.concat(Object.entries(r).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}}))},[]).filter(function(e){return I(e.gear)}):Object.entries(s.gears[p]).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}})).sort(d[v]),_&&(n=n.reverse()),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:p,buttons:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.ms,{height:1.66,selected:v,options:Object.keys(d),onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:_?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:_?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){return C(!_)}})}),x&&(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{width:20,placeholder:"Search...",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"magnifying-glass",selected:x,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){g(!x),b("")}})})]}),children:n.map(function(e){var n=e.key,t=e.gear,i=Object.keys(s.selected_gears).includes(n),l=1===t.cost?"".concat(t.cost," Point"):"".concat(t.cost," Points"),a=(0,r.jsxs)(o.az,{children:[t.name.length>12&&(0,r.jsx)(o.az,{children:t.name}),t.gear_tier>f&&(0,r.jsx)(o.az,{mt:t.name.length>12&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),d=(0,r.jsxs)(r.Fragment,{children:[t.allowed_roles&&(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"user",tooltip:(0,r.jsx)(o.wn,{m:-1,title:"Allowed Roles",children:t.allowed_roles.map(function(e){return(0,r.jsx)(o.az,{children:e},e)})}),tooltipPosition:"left"}),Object.entries(t.tweaks).map(function(e){var n=u(e,2),t=n[0];return n[1].map(function(e){return(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:e.icon,tooltip:e.tooltip,tooltipPosition:"top"},t)})}),(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"info",tooltip:t.desc,tooltipPosition:"top"})]}),p=(0,r.jsxs)(o.az,{className:"Loadout-InfoBox",children:[(0,r.jsx)(o.az,{style:{flexGrow:1},fontSize:1,color:"gold",opacity:.75,children:t.gear_tier>0&&"Tier ".concat(t.gear_tier)}),(0,r.jsx)(o.az,{fontSize:.75,opacity:.66,children:l})]});return(0,r.jsx)(o.c_,{m:.5,imageSize:84,dmIcon:t.icon,dmIconState:t.icon_state,tooltip:(t.name.length>12||t.gear_tier>0)&&a,tooltipPosition:"bottom",selected:i,disabled:t.gear_tier>f||h+t.cost>m&&!i,buttons:d,buttonsAlt:p,onClick:function(){return c("toggle_gear",{gear:n})},children:t.name},n)})})},p=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.setTweakedGear,c=Object.entries(i.gears).reduce(function(e,n){var t=u(n,2),r=Object.entries((t[0],t[1])).filter(function(e){var n=u(e,1)[0];return Object.keys(i.selected_gears).includes(n)}).map(function(e){var n=u(e,2);return function(e){for(var n=1;n0&&(0,r.jsx)(o.$n,{icon:"gears",iconColor:"gray",width:"33px",onClick:function(){return l(e)}}),(0,r.jsx)(o.$n,{icon:"times",iconColor:"red",width:"32px",onClick:function(){return t("toggle_gear",{gear:e.key})}})]}),children:e.name},e.key)})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{children:(0,r.jsx)(o.z2,{value:i.gear_slots,maxValue:i.max_gear_slots,ranges:{bad:[i.max_gear_slots,1/0],average:[.66*i.max_gear_slots,i.max_gear_slots],good:[0,.66*i.max_gear_slots]},children:(0,r.jsxs)(o.az,{textAlign:"center",children:["Used points ",i.gear_slots,"/",i.max_gear_slots]})})})})]})},x=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.tweakedGear,c=e.setTweakedGear;return(0,r.jsx)(o.Rr,{children:(0,r.jsx)(o.az,{className:"Loadout-Modal__background",children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,width:20,height:20,title:l.name,buttons:(0,r.jsx)(o.$n,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){return c("")}}),children:(0,r.jsx)(o.Ki,{children:Object.entries(l.tweaks).map(function(e){var n=u(e,2),a=n[0];return n[1].map(function(e){var n=i.selected_gears[l.key][a];return(0,r.jsxs)(o.Ki.Item,{label:e.name,color:n?"":"gray",buttons:(0,r.jsx)(o.$n,{color:"transparent",icon:"pen",onClick:function(){return t("set_tweak",{gear:l.key,tweak:a})}}),children:[n||"Default",(0,r.jsx)(o.az,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{backgroundColor:"".concat(n)}})]},a)})})})})})})}},5766:function(e,n,t){"use strict";t.r(n),t.d(n,{LoreConsole:()=>e2});var r,i=t(8138),o=t(2864),l=t(4530),a=t(7790),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/,b=RegExp(j.source,"g"),y=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,v=RegExp(y.source,"g"),w={"&":"&","<":"<",">":">",'"':""","'":"'"},k=function(e){return w[e]};function _(e,n){if(n){if(j.test(e))return e.replace(b,k)}else if(y.test(e))return e.replace(v,k);return e}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function I(e){return e.replace(C,function(e,n){return"colon"===(n=n.toLowerCase())?":":"#"===n.charAt(0)?"x"===n.charAt(1)?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""})}var S=/(^|[^\[])\^/g;function O(e,n){e="string"==typeof e?e:e.source,n=n||"";var t={replace:function(n,r){return r=(r=r.source||r).replace(S,"$1"),e=e.replace(n,r),t},getRegex:function(){return new RegExp(e,n)}};return t}var A=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(e,n,t){var r,i,o,l;if(e){try{r=decodeURIComponent(I(t)).replace(A,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}n&&!P.test(t)&&(i=n,o=t,B[" "+i]||(z.test(i)?B[" "+i]=i+"/":B[" "+i]=D(i,"/",!0)),l=-1===(i=B[" "+i]).indexOf(":"),t="//"===o.substring(0,2)?l?o:i.replace(T,"$1")+o:"/"!==o.charAt(0)?i+o:l?o:i.replace(N,"$1")+o);try{t=encodeURI(t).replace(/%25/g,"%")}catch(e){return null}return t}var B={},z=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,N=/^([^:]+:\/*[^/]*)[\s\S]*$/,R={exec:function(){}};function $(e,n){var t=e.replace(/\|/g,function(e,n,t){for(var r=!1,i=n;--i>=0&&"\\"===t[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),t.length>n)t.splice(n);else for(;t.length1;)1&n&&(t+=e),n>>=1,e+=e;return t+e}function L(e,n,t,r){var i=n.href,o=n.title?_(n.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:t,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:o,text:_(l)}}var K=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"space",value:function(e){var n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}},{key:"code",value:function(e){var n=this.rules.block.code.exec(e);if(n){var t=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?t:D(t,"\n")}}}},{key:"fences",value:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map(function(e){var n=e.match(/^\s+/);return null===n?e:(function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),1!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,1)||function(e,n){if(e){if("string"==typeof e)return s(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,1)}}(n,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].length>=r.length?e.slice(r.length):e}).join("\n")}(t,n[3]||"");return{type:"code",raw:t,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}},{key:"heading",value:function(e){var n=this.rules.block.heading.exec(e);if(n){var t=n[2].trim();if(/#$/.test(t)){var r=D(t,"#");this.options.pedantic?t=r.trim():(!r||/ $/.test(r))&&(t=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:t,tokens:this.lexer.inline(t)}}}},{key:"hr",value:function(e){var n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}},{key:"blockquote",value:function(e){var n=this.rules.block.blockquote.exec(e);if(n){var t=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;var i=this.lexer.blockTokens(t);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:t}}}},{key:"list",value:function(e){var n=this.rules.block.list.exec(e);if(n){var t,r,i,o,l,a,c,s,u,d,f,h,m=n[1].trim(),p=m.length>1,x={type:"list",raw:"",ordered:p,start:p?+m.slice(0,-1):"",loose:!1,items:[]};m=p?"\\d{1,9}\\".concat(m.slice(-1)):"\\".concat(m),this.options.pedantic&&(m=p?m:"[*+-]");for(var g=new RegExp("^( {0,3}".concat(m,")((?:[ ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,!(!(n=g.exec(e))||this.rules.block.hr.test(e)));){if(t=n[0],e=e.substring(t.length),s=n[2].split("\n",1)[0].replace(/^\t+/,function(e){return" ".repeat(3*e.length)}),u=e.split("\n",1)[0],this.options.pedantic?(o=2,f=s.trimLeft()):(o=(o=n[2].search(/[^ ]/))>4?1:o,f=s.slice(o),o+=n[1].length),a=!1,!s&&/^ *$/.test(u)&&(t+=u+"\n",e=e.substring(u.length+1),h=!0),!h)for(var j=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),y=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),v=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(u=d=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(y.test(u)||v.test(u)||j.test(u)||b.test(e)));){if(u.search(/[^ ]/)>=o||!u.trim())f+="\n"+u.slice(o);else{if(a||s.search(/[^ ]/)>=4||y.test(s)||v.test(s)||b.test(s))break;f+="\n"+u}a||u.trim()||(a=!0),t+=d+"\n",e=e.substring(d.length+1),s=u.slice(o)}!x.loose&&(c?x.loose=!0:/\n *\n *$/.test(t)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(i="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),x.items.push({type:"list_item",raw:t,task:!!r,checked:i,loose:!1,text:f}),x.raw+=t}x.items[x.items.length-1].raw=t.trimRight(),x.items[x.items.length-1].text=f.trimRight(),x.raw=x.raw.trimRight();var w=x.items.length;for(l=0;l0&&k.some(function(e){return/\n.*\n/.test(e.raw)})}if(x.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:t,raw:n[0],href:r,title:i}}}},{key:"table",value:function(e){var n=this.rules.block.table.exec(e);if(n){var t={type:"table",header:$(n[1]).map(function(e){return{text:e}}),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=n[0];var r,i,o,l,a=t.align.length;for(r=0;r/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):_(n[0]):n[0]}}},{key:"link",value:function(e){var n=this.rules.inline.link.exec(e);if(n){var t=n[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;var r=D(t.slice(0,-1),"\\");if((t.length-r.length)%2==0)return}else{var i=function(e,n){if(-1===e.indexOf(")"))return -1;for(var t=e.length,r=0,i=0;i-1){var o=(0===n[0].indexOf("!")?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,o).trim(),n[3]=""}}var l=n[2],a="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);c&&(l=c[1],a=c[3])}else a=n[3]?n[3].slice(1,-1):"";return l=l.trim(),/^$/.test(t)?l.slice(1):l.slice(1,-1)),L(n,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},n[0],this.lexer)}}},{key:"reflink",value:function(e,n){var t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){var r=(t[2]||t[1]).replace(/\s+/g," ");if(!(r=n[r.toLowerCase()])){var i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return L(t,r,t[0],this.lexer)}}},{key:"emStrong",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&!(r[3]&&t.match(RegExp("[\\p{L}\\p{N}]","u")))){var i=r[1]||r[2]||"";if(!i||i&&(""===t||this.rules.inline.punctuation.exec(t))){var o,l,a=r[0].length-1,c=a,s=0,u="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,n=n.slice(-1*e.length+a);null!=(r=u.exec(n));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]){if(l=o.length,r[3]||r[4]){c+=l;continue}if((r[5]||r[6])&&a%3&&!((a+l)%3)){s+=l;continue}if(!((c-=l)>0)){l=Math.min(l,l+c+s);var d=e.slice(0,a+r.index+(r[0].length-o.length)+l);if(Math.min(a,l)%2){var f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}}}}},{key:"codespan",value:function(e){var n=this.rules.inline.code.exec(e);if(n){var t=n[2].replace(/\n/g," "),r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=_(t,!0),{type:"codespan",raw:n[0],text:t}}}},{key:"br",value:function(e){var n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}},{key:"del",value:function(e){var n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}},{key:"autolink",value:function(e,n){var t,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(t=_(this.options.mangle?n(i[1]):i[1])):t=_(i[1]),{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e,n){var t,r,i,o;if(t=this.rules.inline.url.exec(e)){if("@"===t[2])i="mailto:"+(r=_(this.options.mangle?n(t[0]):t[0]));else{do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0];while(o!==t[0]);r=_(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,n){var t,r=this.rules.inline.text.exec(e);if(r)return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):_(r[0]):r[0]:_(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:t}}}]),e}(),J={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:R,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};J._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,J._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,J.def=O(J.def).replace("label",J._label).replace("title",J._title).getRegex(),J.bullet=/(?:[*+-]|\d{1,9}[.)])/,J.listItemStart=O(/^( *)(bull) */).replace("bull",J.bullet).getRegex(),J.list=O(J.list).replace(/bull/g,J.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+J.def.source+")").getRegex(),J._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",J._comment=/|$)/,J.html=O(J.html,"i").replace("comment",J._comment).replace("tag",J._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),J.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.blockquote=O(J.blockquote).replace("paragraph",J.paragraph).getRegex(),J.normal=m({},J),J.gfm=p(m({},J.normal),{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),J.gfm.table=O(J.gfm.table).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.gfm.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",J.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.pedantic=p(m({},J.normal),{html:O("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",J._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(J.normal._paragraph).replace("hr",J.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",J.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(t="x"+t.toString(16)),r+="&#"+t+";";return r}X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=O(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,X.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,X._comment=O(J._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),X.emStrong.lDelim=O(X.emStrong.lDelim).replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimAst=O(X.emStrong.rDelimAst,"g").replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimUnd=O(X.emStrong.rDelimUnd,"g").replace(/punct/g,X._punctuation).getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,X.autolink=O(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=O(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=O(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=O(X.reflink).replace("label",X._label).replace("ref",J._label).getRegex(),X.nolink=O(X.nolink).replace("ref",J._label).getRegex(),X.reflinkSearch=O(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal=m({},X),X.pedantic=p(m({},X.normal),{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()}),X.gfm=p(m({},X.normal),{escape:O(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,function(e,n,t){return n+" ".repeat(t.length)});e&&"break"!==(o=this,function(){if(o.options.extensions&&o.options.extensions.block&&o.options.extensions.block.some(function(t){return!!(n=t.call({lexer:l},e,a))&&(e=e.substring(n.raw.length),a.push(n),!0)}))return"continue";if(n=o.tokenizer.space(e))return e=e.substring(n.raw.length),1===n.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(n),"continue";if(n=o.tokenizer.code(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if((n=o.tokenizer.fences(e))||(n=o.tokenizer.heading(e))||(n=o.tokenizer.hr(e))||(n=o.tokenizer.blockquote(e))||(n=o.tokenizer.list(e))||(n=o.tokenizer.html(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(n=o.tokenizer.def(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.raw,o.inlineQueue[o.inlineQueue.length-1].src=t.text):o.tokens.links[n.tag]||(o.tokens.links[n.tag]={href:n.href,title:n.title}),"continue";if((n=o.tokenizer.table(e))||(n=o.tokenizer.lheading(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(r=e,o.options.extensions&&o.options.extensions.startBlock){var c=1/0,s=e.slice(1),u=void 0;o.options.extensions.startBlock.forEach(function(e){"number"==typeof(u=e.call({lexer:this},s))&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(r=e.substring(0,c+1))}if(o.state.top&&(n=o.tokenizer.paragraph(r)))return t=a[a.length-1],i&&"paragraph"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),i=r.length!==e.length,e=e.substring(n.raw.length),"continue";if(n=o.tokenizer.text(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&"text"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(o.options.silent)return console.error(d),"break";throw Error(d)}}()););return this.state.top=!0,a}},{key:"inline",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:n}),n}},{key:"inlineTokens",value:function(e){var n,t,r,i,o,l,a,c=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=e;if(this.tokens.links){var d=Object.keys(this.tokens.links);if(d.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(u));)d.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,i.index+i[0].length-2)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e&&"break"!==(a=this,function(){if(o||(l=""),o=!1,a.options.extensions&&a.options.extensions.inline&&a.options.extensions.inline.some(function(t){return!!(n=t.call({lexer:c},e,s))&&(e=e.substring(n.raw.length),s.push(n),!0)}))return"continue";if(n=a.tokenizer.escape(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.tag(e))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(n=a.tokenizer.link(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.reflink(e,a.tokens.links))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if((n=a.tokenizer.emStrong(e,u,l))||(n=a.tokenizer.codespan(e))||(n=a.tokenizer.br(e))||(n=a.tokenizer.del(e))||(n=a.tokenizer.autolink(e,F))||!a.state.inLink&&(n=a.tokenizer.url(e,F)))return e=e.substring(n.raw.length),s.push(n),"continue";if(r=e,a.options.extensions&&a.options.extensions.startInline){var i=1/0,d=e.slice(1),f=void 0;a.options.extensions.startInline.forEach(function(e){"number"==typeof(f=e.call({lexer:this},d))&&f>=0&&(i=Math.min(i,f))}),i<1/0&&i>=0&&(r=e.substring(0,i+1))}if(n=a.tokenizer.inlineText(r,U))return e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),o=!0,(t=s[s.length-1])&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(e){var h="Infinite loop on byte: "+e.charCodeAt(0);if(a.options.silent)return console.error(h),"break";throw Error(h)}}()););return s}}],[{key:"rules",get:function(){return{block:J,inline:X}}},{key:"lex",value:function(n,t){return new e(t).lex(n)}},{key:"lexInline",value:function(n,t){return new e(t).inlineTokens(n)}}]),e}(),H=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"code",value:function(e,n,t){var r=(n||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(t=!0,e=i)}return(e=e.replace(/\n$/,"")+"\n",r)?'
'+(t?e:_(e,!0))+"
\n":"
"+(t?e:_(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"
\n".concat(e,"
\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,n,t,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(t);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
\n":"
\n"}},{key:"list",value:function(e,n,t){var r=n?"ol":"ul";return"<"+r+(n&&1!==t?' start="'+t+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,n){return n&&(n="".concat(n,"")),"\n\n"+e+"\n"+n+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,n){var t=n.header?"th":"td";return(n.align?"<".concat(t,' align="').concat(n.align,'">'):"<".concat(t,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,n,t){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return t;var r='"}},{key:"image",value:function(e,n,t){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return t;var r='').concat(t,'":">"}},{key:"text",value:function(e){return e}}]),e}(),W=function(){function e(){u(this,e)}return f(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,n,t){return""+t}},{key:"image",value:function(e,n,t){return""+t}},{key:"br",value:function(){return""}}]),e}(),q=function(){function e(){u(this,e),this.seen={}}return f(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,n){var t=e,r=0;if(this.seen.hasOwnProperty(t)){r=this.seen[e];do t=e+"-"+ ++r;while(this.seen.hasOwnProperty(t))}return n||(this.seen[e]=r,this.seen[t]=0),t}},{key:"slug",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=this.serialize(e);return this.getNextSafeSlug(t,n.dryrun)}}]),e}(),G=function(){function e(n){u(this,e),this.options=n||g,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new W,this.slugger=new q}return f(e,[{key:"parse",value:function(e){var n,t,r,i,o,l,a,c,s,u,d,f,h,m,p,x,g,j,b,y=!(arguments.length>1)||void 0===arguments[1]||arguments[1],v="",w=e.length;for(n=0;n0&&"paragraph"===p.tokens[0].type?(p.tokens[0].text=j+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&"text"===p.tokens[0].tokens[0].type&&(p.tokens[0].tokens[0].text=j+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:j}):m+=j),m+=this.parse(p.tokens,h),s+=this.renderer.listitem(m,g,x);v+=this.renderer.list(s,d,f);continue;case"html":v+=this.renderer.html(u.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(s=u.tokens?this.parseInline(u.tokens):u.text;n+1";return c?Promise.resolve(n):s?void s(null,n):n}if(c)return Promise.reject(e);if(s)return void s(e);throw e});if(null==t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if((u=r)&&u.sanitize&&!u.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),r.hooks&&(r.hooks.options=r),i){var a,c,s,u,d,f=r.highlight;try{r.hooks&&(t=r.hooks.preprocess(t)),d=e(t,r)}catch(e){return l(e)}var h=function(e){var t;if(!e)try{r.walkTokens&&Z.walkTokens(d,r.walkTokens),t=n(d,r),r.hooks&&(t=r.hooks.postprocess(t))}catch(n){e=n}return r.highlight=f,e?l(e):i(null,t)};if(!f||f.length<3||(delete r.highlight,!d.length))return h();var p=0;return Z.walkTokens(d,function(e){"code"===e.type&&(p++,setTimeout(function(){f(e.text,e.lang,function(n,t){if(n)return h(n);null!=t&&t!==e.text&&(e.text=t,e.escaped=!0),0==--p&&h()})},0))}),void(0===p&&h())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(function(n){return e(n,r)}).then(function(e){return r.walkTokens?Promise.all(Z.walkTokens(e,r.walkTokens)).then(function(){return e}):e}).then(function(e){return n(e,r)}).then(function(e){return r.hooks?r.hooks.postprocess(e):e}).catch(l);try{r.hooks&&(t=r.hooks.preprocess(t));var x=e(t,r);r.walkTokens&&Z.walkTokens(x,r.walkTokens);var g=n(x,r);return r.hooks&&(g=r.hooks.postprocess(g)),g}catch(e){return l(e)}}}function Z(e,n,t){return Y(V.lex,G.parse)(e,n,t)}h(Q,"passThroughHooks",new Set(["preprocess","postprocess"])),Z.options=Z.setOptions=function(e){return Z.defaults=m({},Z.defaults,e),g=Z.defaults,Z},Z.getDefaults=x,Z.defaults=g,Z.use=function(){for(var e=arguments.length,n=Array(e),t=0;t2?t-2:0),i=2;i1?n-1:0),r=1;r1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:ep;en&&en(e,null);let r=n.length;for(;r--;){let i=n[r];if("string"==typeof i){let e=t(i);e!==i&&(et(n)||(n[r]=e),i=e)}e[i]=!0}return e}function eI(e){let n=ea(null);for(let[t,r]of ee(e))ev(e,t)&&(Array.isArray(r)?n[t]=function(e){for(let n=0;n/gm),eK=el(/\$\{[\w\W]*/gm),eJ=el(/^data-[\-\w.\u00B7-\uFFFF]+$/),eX=el(/^aria-[\-\w]+$/),eU=el(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eF=el(/^(?:\w+script|data):/i),eV=el(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eH=el(/^html$/i);var eW=Object.freeze({__proto__:null,ARIA_ATTR:eX,ATTR_WHITESPACE:eV,CUSTOM_ELEMENT:el(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:eJ,DOCTYPE_NAME:eH,ERB_EXPR:eL,IS_ALLOWED_URI:eU,IS_SCRIPT_OR_DATA:eF,MUSTACHE_EXPR:eM,TMPLIT_EXPR:eK});let eq=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));let i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},eG=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var eQ=function e(){let n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,r=n=>e(n);if(r.version="3.2.7",r.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return r.isSupported=!1,r;let{document:i}=t,o=i,l=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:s,Element:u,NodeFilter:d,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,x=u.prototype,g=eS(x,"cloneNode"),j=eS(x,"remove"),b=eS(x,"nextSibling"),y=eS(x,"childNodes"),v=eS(x,"parentNode");if("function"==typeof c){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let w="",{implementation:k,createNodeIterator:_,createDocumentFragment:C,getElementsByTagName:I}=i,{importNode:S}=o,O=eG();r.isSupported="function"==typeof ee&&"function"==typeof v&&k&&void 0!==k.createHTMLDocument;let{MUSTACHE_EXPR:A,ERB_EXPR:P,TMPLIT_EXPR:E,DATA_ATTR:B,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:T,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:R}=eW,{IS_ALLOWED_URI:$}=eW,D=null,M=eC({},[...eO,...eA,...eP,...eB,...eT]),L=null,K=eC({},[...eN,...eR,...e$,...eD]),J=Object.seal(ea(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,U=null,F=!0,V=!0,H=!1,W=!0,q=!1,G=!0,Q=!1,Y=!1,Z=!1,en=!1,et=!1,er=!1,ei=!0,el=!1,ec=!0,es=!1,e_={},eM=null,eL=eC({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eK=null,eJ=eC({},["audio","video","img","source","image","track"]),eX=null,eF=eC({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eV="http://www.w3.org/1998/Math/MathML",eQ="http://www.w3.org/2000/svg",eY="http://www.w3.org/1999/xhtml",eZ=eY,e0=!1,e1=null,e2=eC({},[eV,eQ,eY],ex),e8=eC({},["mi","mo","mn","ms","mtext"]),e3=eC({},["annotation-xml"]),e5=eC({},["title","style","font","a","script"]),e4=null,e6=["application/xhtml+xml","text/html"],e7=null,e9=null,ne=i.createElement("form"),nn=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e9||e9!==e){if(e&&"object"==typeof e||(e={}),e=eI(e),e7="application/xhtml+xml"===(e4=-1===e6.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?ex:ep,D=ev(e,"ALLOWED_TAGS")?eC({},e.ALLOWED_TAGS,e7):M,L=ev(e,"ALLOWED_ATTR")?eC({},e.ALLOWED_ATTR,e7):K,e1=ev(e,"ALLOWED_NAMESPACES")?eC({},e.ALLOWED_NAMESPACES,ex):e2,eX=ev(e,"ADD_URI_SAFE_ATTR")?eC(eI(eF),e.ADD_URI_SAFE_ATTR,e7):eF,eK=ev(e,"ADD_DATA_URI_TAGS")?eC(eI(eJ),e.ADD_DATA_URI_TAGS,e7):eJ,eM=ev(e,"FORBID_CONTENTS")?eC({},e.FORBID_CONTENTS,e7):eL,X=ev(e,"FORBID_TAGS")?eC({},e.FORBID_TAGS,e7):eI({}),U=ev(e,"FORBID_ATTR")?eC({},e.FORBID_ATTR,e7):eI({}),e_=!!ev(e,"USE_PROFILES")&&e.USE_PROFILES,F=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,q=e.SAFE_FOR_TEMPLATES||!1,G=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,en=e.RETURN_DOM||!1,et=e.RETURN_DOM_FRAGMENT||!1,er=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,ei=!1!==e.SANITIZE_DOM,el=e.SANITIZE_NAMED_PROPS||!1,ec=!1!==e.KEEP_CONTENT,es=e.IN_PLACE||!1,$=e.ALLOWED_URI_REGEXP||eU,eZ=e.NAMESPACE||eY,e8=e.MATHML_TEXT_INTEGRATION_POINTS||e8,e3=e.HTML_INTEGRATION_POINTS||e3,J=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&nn(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(J.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&nn(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(J.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(J.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(V=!1),et&&(en=!0),e_&&(D=eC({},eT),L=[],!0===e_.html&&(eC(D,eO),eC(L,eN)),!0===e_.svg&&(eC(D,eA),eC(L,eR),eC(L,eD)),!0===e_.svgFilters&&(eC(D,eP),eC(L,eR),eC(L,eD)),!0===e_.mathMl&&(eC(D,eB),eC(L,e$),eC(L,eD))),e.ADD_TAGS&&(D===M&&(D=eI(D)),eC(D,e.ADD_TAGS,e7)),e.ADD_ATTR&&(L===K&&(L=eI(L)),eC(L,e.ADD_ATTR,e7)),e.ADD_URI_SAFE_ATTR&&eC(eX,e.ADD_URI_SAFE_ATTR,e7),e.FORBID_CONTENTS&&(eM===eL&&(eM=eI(eM)),eC(eM,e.FORBID_CONTENTS,e7)),ec&&(D["#text"]=!0),Q&&eC(D,["html","head","body"]),D.table&&(eC(D,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ek('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ek('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=(n=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===n&&(n=eq(p,l)),null!==n&&"string"==typeof w&&(w=n.createHTML(""));eo&&eo(e),e9=e}},nr=eC({},[...eA,...eP,...eE]),ni=eC({},[...eB,...ez]),no=function(e){let n=v(e);n&&n.tagName||(n={namespaceURI:eZ,tagName:"template"});let t=ep(e.tagName),r=ep(n.tagName);return!!e1[e.namespaceURI]&&(e.namespaceURI===eQ?n.namespaceURI===eY?"svg"===t:n.namespaceURI===eV?"svg"===t&&("annotation-xml"===r||e8[r]):!!nr[t]:e.namespaceURI===eV?n.namespaceURI===eY?"math"===t:n.namespaceURI===eQ?"math"===t&&e3[r]:!!ni[t]:e.namespaceURI===eY?(n.namespaceURI!==eQ||!!e3[r])&&(n.namespaceURI!==eV||!!e8[r])&&!ni[t]&&(e5[t]||!nr[t]):"application/xhtml+xml"===e4&&!!e1[e.namespaceURI])},nl=function(e){eh(r.removed,{element:e});try{v(e).removeChild(e)}catch(n){j(e)}},na=function(e,n){try{eh(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){eh(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e)if(en||et)try{nl(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},nc=function(e){let t=null,r=null;if(Z)e=""+e;else{let n=eg(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===e4&&eZ===eY&&(e=''+e+"");let o=n?n.createHTML(e):e;if(eZ===eY)try{t=new m().parseFromString(o,e4)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(eZ,"template",null);try{t.documentElement.innerHTML=e0?w:o}catch(e){}}let l=t.body||t.documentElement;return(e&&r&&l.insertBefore(i.createTextNode(r),l.childNodes[0]||null),eZ===eY)?I.call(t,Q?"html":"body")[0]:Q?t.documentElement:l},ns=function(e){return _.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},nu=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},nd=function(e){return"function"==typeof s&&e instanceof s};function nf(e,n,t){eu(e,e=>{e.call(r,n,t,e9)})}let nh=function(e){let n=null;if(nf(O.beforeSanitizeElements,e,null),nu(e))return nl(e),!0;let t=e7(e.nodeName);if(nf(O.uponSanitizeElement,e,{tagName:t,allowedTags:D}),G&&e.hasChildNodes()&&!nd(e.firstElementChild)&&ew(/<[/\w!]/g,e.innerHTML)&&ew(/<[/\w!]/g,e.textContent)||7===e.nodeType||G&&8===e.nodeType&&ew(/<[/\w]/g,e.data))return nl(e),!0;if(!D[t]||X[t]){if(!X[t]&&np(t)&&(J.tagNameCheck instanceof RegExp&&ew(J.tagNameCheck,t)||J.tagNameCheck instanceof Function&&J.tagNameCheck(t)))return!1;if(ec&&!eM[t]){let n=v(e)||e.parentNode,t=y(e)||e.childNodes;if(t&&n){let r=t.length;for(let i=r-1;i>=0;--i){let r=g(t[i],!0);r.__removalCount=(e.__removalCount||0)+1,n.insertBefore(r,b(e))}}}return nl(e),!0}return e instanceof u&&!no(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&ew(/<\/no(script|embed|frames)/i,e.innerHTML)?(nl(e),!0):(q&&3===e.nodeType&&(n=e.textContent,eu([A,P,E],e=>{n=ej(n,e," ")}),e.textContent!==n&&(eh(r.removed,{element:e.cloneNode()}),e.textContent=n)),nf(O.afterSanitizeElements,e,null),!1)},nm=function(e,n,t){if(ei&&("id"===n||"name"===n)&&(t in i||t in ne))return!1;if(V&&!U[n]&&ew(B,n));else if(F&&ew(z,n));else if(!L[n]||U[n]){if(!(np(e)&&(J.tagNameCheck instanceof RegExp&&ew(J.tagNameCheck,e)||J.tagNameCheck instanceof Function&&J.tagNameCheck(e))&&(J.attributeNameCheck instanceof RegExp&&ew(J.attributeNameCheck,n)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(n,e))||"is"===n&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&ew(J.tagNameCheck,t)||J.tagNameCheck instanceof Function&&J.tagNameCheck(t))))return!1}else if(eX[n]);else if(ew($,ej(t,N,"")));else if(("src"===n||"xlink:href"===n||"href"===n)&&"script"!==e&&0===eb(t,"data:")&&eK[e]);else if(H&&!ew(T,ej(t,N,"")));else if(t)return!1;return!0},np=function(e){return"annotation-xml"!==e&&eg(e,R)},nx=function(e){nf(O.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||nu(e))return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},o=t.length;for(;o--;){let{name:l,namespaceURI:a,value:c}=t[o],s=e7(l),u="value"===l?c:ey(c);if(i.attrName=s,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,nf(O.uponSanitizeAttribute,e,i),u=i.attrValue,el&&("id"===s||"name"===s)&&(na(l,e),u="user-content-"+u),G&&ew(/((--!?|])>)|<\/(style|title|textarea)/i,u)||"attributename"===s&&eg(u,"href")){na(l,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr||!W&&ew(/\/>/i,u)){na(l,e);continue}q&&eu([A,P,E],e=>{u=ej(u,e," ")});let d=e7(e.nodeName);if(!nm(d,s,u)){na(l,e);continue}if(n&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(a);else switch(p.getAttributeType(d,s)){case"TrustedHTML":u=n.createHTML(u);break;case"TrustedScriptURL":u=n.createScriptURL(u)}if(u!==c)try{a?e.setAttributeNS(a,l,u):e.setAttribute(l,u),nu(e)?nl(e):ef(r.removed)}catch(n){na(l,e)}}nf(O.afterSanitizeAttributes,e,null)},ng=function e(n){let t=null,r=ns(n);for(nf(O.beforeSanitizeShadowDOM,n,null);t=r.nextNode();)nf(O.uponSanitizeShadowNode,t,null),nh(t),nx(t),t.content instanceof a&&e(t.content);nf(O.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,l=null,c=null,u=null;if((e0=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!nd(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw ek("dirty is not a string, aborting")}else throw ek("toString is not a function");if(!r.isSupported)return e;if(Y||nt(t),r.removed=[],"string"==typeof e&&(es=!1),es){if(e.nodeName){let n=e7(e.nodeName);if(!D[n]||X[n])throw ek("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)1===(l=(i=nc("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?i=l:i.appendChild(l);else{if(!en&&!q&&!Q&&-1===e.indexOf("<"))return n&&er?n.createHTML(e):e;if(!(i=nc(e)))return en?null:er?w:""}i&&Z&&nl(i.firstChild);let d=ns(es?e:i);for(;c=d.nextNode();)nh(c),nx(c),c.content instanceof a&&ng(c.content);if(es)return e;if(en){if(et)for(u=C.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(L.shadowroot||L.shadowrootmode)&&(u=S.call(o,u,!0)),u}let f=Q?i.outerHTML:i.innerHTML;return Q&&D["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ew(eH,i.ownerDocument.doctype.name)&&(f="\n"+f),q&&eu([A,P,E],e=>{f=ej(f,e," ")}),n&&er?n.createHTML(f):f},r.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};nt(e),Y=!0},r.clearConfig=function(){e9=null,Y=!1},r.isValidAttribute=function(e,n,t){return e9||nt({}),nm(e7(e),e7(n),t)},r.addHook=function(e,n){"function"==typeof n&&eh(O[e],n)},r.removeHook=function(e,n){if(void 0!==n){let t=ed(O[e],n);return -1===t?void 0:em(O[e],t,1)[0]}return ef(O[e])},r.removeHooks=function(e){O[e]=[]},r.removeAllHooks=function(){O=eG()},r}(),eY=["b","blockquote","br","center","code","dd","del","div","dl","dt","em","font","h1","h2","h3","h4","h5","h6","hr","i","ins","li","menu","ol","p","pre","span","strong","table","tbody","td","th","thead","tfoot","tr","u","ul"],eZ=["img"],e0=["class","style","background"];function e1(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&(0,i.jsx)(a.BJ.Item,{children:(0,i.jsx)(a.wn,{fill:!0,title:"Page ".concat(s+1,"/").concat(t.length),textAlign:"center",children:(0,i.jsxs)(a.BJ,{children:[(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Previous",fontSize:"150%",icon:"arrow-left",lineHeight:2,disabled:s<=0,onClick:function(){return u(s-1)}})}),(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Next",fontSize:"150%",icon:"arrow-right",lineHeight:2,disabled:s>=t.length-1,onClick:function(){return u(s+1)}})})]})})}),(0,i.jsxs)(a.BJ.Item,{children:[(0,i.jsx)("h1",{children:d.title&&d.title}),(0,i.jsx)("div",{className:"LoreConsole__entryText",dangerouslySetInnerHTML:{__html:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eY,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:eZ;return n&&(t=t.concat(i)),eQ.sanitize(e,{ALLOWED_TAGS:t,FORBID_ATTR:r})}(Z(d.body,{breaks:!0,smartypants:!0,smartLists:!0,baseUrl:"thisshouldbreakhttp"}))}})]})]})})}},5531:function(e,n,t){"use strict";t.r(n),t.d(n,{MODsuit:()=>_,MODsuitContent:()=>k});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,r.jsxs)(o.XI.Cell,{textAlign:"center",children:[(0,r.jsx)(o.$n,{onClick:function(){return t("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:j(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,r.jsx)(o.$n,{onClick:function(){return h(e.ref)},icon:"cog",selected:f===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===Object.keys(e.configuration_data).length}),(0,r.jsx)(o.$n,{onClick:function(){return t("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,r.jsx)(o.az,{children:e.description})]})})},e.ref)})||(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{textAlign:"center",children:"No Modules Detected"})})})})},k=function(){var e=(0,l.Oc)().data.interface_break;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!e,children:!!e&&(0,r.jsx)(p,{})||(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(b,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(y,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(v,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(w,{})})]})})},_=function(){var e=(0,l.Oc)().data.ui_theme;return(0,r.jsx)(a.p8,{theme:e,width:400,height:620,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(k,{})})})})}},5247:function(e,n,t){"use strict";t.r(n),t.d(n,{MagnetController:()=>d});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Set(["metal","glass"]),c=function(){return(0,r.jsx)(l.p8,{width:300,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s,{})})})},s=function(){return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metals",children:(0,r.jsxs)(i.XI,{className:"materials-table",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{header:!0,pl:"0.5rem",py:"0.5rem",children:"Material"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Sheets"}),(0,r.jsx)(u,{})]}),(0,r.jsx)(d,{})]})})},u=function(){if((0,o.Oc)().data.showPoints)return(0,r.jsx)(i.XI.Cell,{header:!0,children:"Points"})},d=function(){return(0,o.Oc)().data.materials.filter(function(e){return e.amount>=1||a.has(e.id)}).map(function(e){return(0,r.jsx)(f,{material:e},e.id)})},f=function(e){var n=e.material,t=n.id,l=n.amount,a=(0,o.Oc)().data,c=a.icon,s=a.showPoints,u=a.staticMaterials[t],d=u.iconState,f=u.name,h=u.points;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsxs)(i.XI.Cell,{children:[d?(0,r.jsx)(i.Hg,{icon:c,icon_state:d,verticalAlign:"middle"}):(0,r.jsx)(i.In,{name:"sheet-plastic",verticalAlign:"middle"}),null!=f?f:t]}),(0,r.jsx)(i.XI.Cell,{color:l>=1?"good":"gray",children:l}),!!s&&h&&(0,r.jsx)(i.XI.Cell,{children:h})]})}},2433:function(e,n,t){"use strict";t.r(n),t.d(n,{MechBayConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.recharge_port,c=a&&a.mech,s=c&&c.cell,u=c&&c.name;return(0,r.jsx)(l.p8,{width:400,height:155,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Sync",onClick:function(){return t("reconnect")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||(0,r.jsx)(i.z2,{value:c.health/c.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||!s&&(0,r.jsx)(i.IC,{children:"No cell is installed."})||(0,r.jsxs)(i.z2,{value:s.charge/s.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,r.jsx)(i.zv,{value:s.charge})," / "+s.maxcharge]})})]})})})})}},3763:function(e,n,t){"use strict";t.r(n),t.d(n,{MechaControlConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.beacons,u=c.stored_data;return u.length?(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Log",buttons:(0,r.jsx)(i.$n,{icon:"window-close",onClick:function(){return t("clear_log")}}),children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{color:"label",children:["(",e.time,")"]}),(0,r.jsx)(i.az,{children:(0,o.jT)(e.message)})]},e.time)})})})}):(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:s.length&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"comment",onClick:function(){return t("send_message",{mt:e.uid})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"eye",onClick:function(){return t("get_log",{mt:e.uid})},children:"View Log"}),(0,r.jsx)(i.$n.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return t("shock",{mt:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{ranges:{good:[.75*e.maxHealth,1/0],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-1/0,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:e.cell&&(0,r.jsx)(i.z2,{ranges:{good:[.75*e.cellMaxCharge,1/0],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-1/0,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,r.jsx)(i.IC,{children:"No Cell Installed"})}),(0,r.jsxs)(i.Ki.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,r.jsx)(i.Ki.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,o.Sn)(e.location)||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,r.jsx)(i.Ki.Item,{label:"Cargo Space",children:(0,r.jsx)(i.z2,{ranges:{bad:[.75*e.cargoMax,1/0],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-1/0,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)})||(0,r.jsx)(i.IC,{children:"No mecha beacons found."})})})}},9548:function(e,n,t){"use strict";t.r(n),t.d(n,{MedicalRecords:()=>b});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4900),s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.product,c=e.productImage,s=e.productCategory,u=i.user_money;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"32px",margin:"0px"}})}),(0,r.jsx)(o.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(o.$n,{disabled:a.price>u,icon:"shopping-cart",content:a.price,textAlign:"left",onClick:function(){return t("purchase",{name:a.name,category:s})}})})]})},u=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default).tabIndex,a=n.products,u=n.imagelist,d=["apparel","toy","decoration"];return(0,r.jsx)(o.XI,{children:a[d[t]].map(function(e){return(0,r.jsx)(s,{product:e,productImage:u[e.path],productCategory:d[t]},e.name)})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,s=i.user_cash,d=i.inserted_cash;return(0,r.jsx)(a.p8,{title:"Merch Computer",width:450,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:"User",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,r.jsx)("b",{children:d})," credits inserted."]}),(0,r.jsx)(o.$n,{disabled:!d,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return t("change")}})]}),children:(0,r.jsxs)(o.BJ.Item,{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!==s&&(0,r.jsxs)(o.az,{mt:"0.5rem",children:["Your balance is ",(0,r.jsxs)("b",{children:[s||0," credits"]}),"."]})]})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsxs)(c.default.Default,{tabIndex:1,children:[(0,r.jsx)(f,{}),(0,r.jsx)(u,{})]})})})]})})})},f=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default),a=t.tabIndex,s=t.setTabIndex;return n.login_state,(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{icon:"dice",selected:1===a,onClick:function(){return s(1)},children:"Toys"}),(0,r.jsx)(o.tU.Tab,{icon:"flag",selected:2===a,onClick:function(){return s(2)},children:"Decorations"})]})}},6231:function(e,n,t){"use strict";t.r(n),t.d(n,{MiningVendor:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e[1].price,e[1]}).sort(d[h]);if(0!==t.length)return m&&(t=t.reverse()),g=!0,(0,r.jsx)(x,{title:e[0],items:t,gridLayout:u},e[0])});return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:g?j:(0,r.jsx)(o.az,{color:"label",children:"No items matching your criteria was found!"})})})},p=function(e){var n=e.gridLayout,t=e.setGridLayout,i=e.setSearchText,l=e.sortOrder,a=e.setSortOrder,c=e.descending,s=e.setDescending;return(0,r.jsx)(o.az,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{fluid:!0,mt:.2,placeholder:"Search by item name..",onChange:function(e){return i(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:n?"list":"table-cells-large",height:1.75,tooltip:n?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){return t(!n)}})}),(0,r.jsx)(o.BJ.Item,{basis:"30%",children:(0,r.jsx)(o.ms,{selected:l,options:Object.keys(d),width:"100%",onSelected:function(e){return a(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:c?"arrow-down":"arrow-up",height:1.75,tooltip:c?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){return s(!c)}})})]})})},x=function(e){var n,t,i=(0,a.Oc)(),l=i.act,c=i.data,s=e.title,u=e.items,d=e.gridLayout,f=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["title","items","gridLayout"]);return(0,r.jsx)(o.Nt,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.gamestatus,s=a.cand_name,u=a.cand_birth,d=a.cand_age,f=a.cand_species,h=a.cand_planet,m=a.cand_job,p=a.cand_records,x=a.cand_curriculum,g=a.total_curriculums,j=a.reason;return 0===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,r.jsx)(i.BJ.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return t("start_game")}}),(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return t("instructions")}})]})]})})}):1===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,color:"grey",title:"Guide",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss ",(0,r.jsx)("b",{children:g})," candidates, one wrongly made choice leads to a game over."]}),(0,r.jsx)(i.Ki.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,r.jsxs)(i.Ki.Item,{label:"3#",color:"silver",children:[(0,r.jsx)("b",{children:"Unique"})," characters may appear, pay attention to them!"]}),(0,r.jsx)(i.Ki.Item,{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,r.jsxs)(i.Ki.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,r.jsx)("b",{children:"company morals"}),"!"]}),(0,r.jsx)(i.Ki.Item,{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,r.jsxs)(i.Ki.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,r.jsx)("b",{children:"typos"})," and ",(0,r.jsx)("b",{children:"missing words"}),", these do make for bad applications!"]}),(0,r.jsxs)(i.Ki.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for"," ",(0,r.jsx)("b",{children:"jobs"})," that they ",(0,r.jsx)("b",{children:"don't offer"}),"!"]}),(0,r.jsxs)(i.Ki.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,r.jsx)("b",{children:"naming schemes"}),", no company wants a Vox named Joe!"]}),(0,r.jsxs)(i.Ki.Item,{label:"10#",color:"silver",children:["For some unknown reason ",(0,r.jsx)("b",{children:"clowns"})," are never denied by the company, no matter what."]})]})})})})}):2===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,r.jsxs)(i.az,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",x]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",color:"silver",children:(0,r.jsx)("b",{children:s})}),(0,r.jsx)(i.Ki.Item,{label:"Species",color:"silver",children:(0,r.jsx)("b",{children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Age",color:"silver",children:(0,r.jsx)("b",{children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Date of Birth",color:"silver",children:(0,r.jsx)("b",{children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Planet of Origin",color:"silver",children:(0,r.jsx)("b",{children:h})}),(0,r.jsx)(i.Ki.Item,{label:"Requested Job",color:"silver",children:(0,r.jsx)("b",{children:m})}),(0,r.jsx)(i.Ki.Item,{label:"Employment Records",color:"silver",children:(0,r.jsx)("b",{children:p})})]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){return t("dismiss")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return t("hire")}})})]})})})]})})}):3===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{pt:"40%",fill:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,r.jsx)(i.BJ.Item,{fontSize:"15px",color:"label",textAlign:"center",children:j}),(0,r.jsxs)(i.BJ.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",x-1,"/",g]})]})}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}})})]})})}):void 0}},452:function(e,n,t){"use strict";t.r(n),t.d(n,{Newscaster:()=>v});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(421),s=t(3384),u=t(4744),d=t(7482);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||g(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}}var j=["security","engineering","medical","science","service","supply"],b={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"}},y=(0,i.createContext)(null),v=function(e){var n,t=(0,a.Oc)(),c=t.act,f=t.data,h=f.is_security,m=f.is_admin,p=f.is_silent,g=f.is_printing,j=f.screen,b=f.channels,v=f.channel_idx,C=void 0===v?-1:v,I=x((0,i.useState)(!1),2),O=I[0],A=I[1],P=x((0,i.useState)(""),2),E=P[0],B=P[1],z=x((0,i.useState)(!1),2),T=z[0],N=z[1],R=x((0,i.useState)([]),2),$=R[0],D=R[1];0===j||2===j?n=(0,r.jsx)(k,{}):1===j&&(n=(0,r.jsx)(_,{}));var M=b.reduce(function(e,n){return e+n.unread},0);return(0,r.jsxs)(s.p8,{theme:h&&"security",width:800,height:600,children:[(0,r.jsx)(y.Provider,{value:{viewingPhoto:E,setViewingPhoto:B},children:E?(0,r.jsx)(S,{}):(0,r.jsx)(u.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"})}),(0,r.jsx)(s.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.wn,{fill:!0,className:(0,l.Ly)(["Newscaster__menu",O&&"Newscaster__menu--open"]),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(w,{icon:"bars",title:"Toggle Menu",onClick:function(){return A(!O)}}),(0,r.jsx)(w,{icon:"newspaper",title:"Headlines",selected:0===j,onClick:function(){return c("headlines")},children:M>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:M>=10?"9+":M})}),(0,r.jsx)(w,{icon:"briefcase",title:"Job Openings",selected:1===j,onClick:function(){return c("jobs")}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:b.map(function(e){return(0,r.jsx)(w,{icon:e.icon,title:e.name,selected:2===j&&b[C-1]===e,onClick:function(){return c("channel",{uid:e.uid})},children:e.unread>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)})}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.cG,{}),(!!h||!!m)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("wanted_notice")}}),(0,r.jsx)(w,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return N(!T)}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(w,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("create_story")}}),(0,r.jsx)(w,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,u.modalOpen)("create_channel")}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(w,{icon:g?"spinner":"print",iconSpin:g,title:g?"Printing...":"Print Newspaper",onClick:function(){return c("print_newspaper")}}),(0,r.jsx)(w,{icon:p?"volume-mute":"volume-up",title:"Mute: "+(p?"On":"Off"),onClick:function(){return c("toggle_mute")}})]})]})}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,width:"100%",children:[(0,r.jsx)(d.TemporaryNotice,{}),(0,r.jsx)(y.Provider,{value:{viewingPhoto:E,setViewingPhoto:B,censorMode:T,fullStories:$,setFullStories:D},children:n})]})]})})]})},w=function(e){(0,a.Oc)().act;var n=e.icon,t=e.iconSpin,i=e.selected,c=void 0!==i&&i,s=e.security,u=e.onClick,d=e.title,f=e.children,x=p(e,["icon","iconSpin","selected","security","onClick","title","children"]);return(0,r.jsxs)(o.BJ,m(h({align:"center",className:(0,l.Ly)(["Newscaster__menuButton",c&&"Newscaster__menuButton--selected",void 0!==s&&s&&"Newscaster__menuButton--security"]),onClick:u},x),{children:[(0,r.jsxs)(o.BJ.Item,{children:[c&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--selectedBar"}),(0,r.jsx)(o.In,{name:void 0===n?"":n,spin:t,size:"2"})]}),(0,r.jsx)(o.BJ.Item,{className:"Newscaster__menuButton--title",children:d}),f]}))},k=function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.screen,s=l.is_admin,d=l.channel_idx,f=l.channel_can_manage,p=l.channels,x=l.stories,g=l.wanted,j=(0,i.useContext)(y),b=j.fullStories,v=j.censorMode,w=2===c&&d>-1?p[d-1]:null;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!g&&(0,r.jsx)(C,{story:g,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:w?w.icon:"newspaper",mr:"0.5rem"}),w?w.name:"Headlines"]}),children:x.length>0?x.slice().reverse().map(function(e){return!b.includes(e.uid)&&e.body.length+3>128?m(h({},e),{body_short:e.body.substr(0,124)+"..."}):e}).map(function(e,n){return(0,r.jsx)(C,{story:e},n)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no stories at this time."]})}),!!w&&(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,height:"40%",title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"info-circle",mr:"0.5rem"}),"About"]}),buttons:(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)(o.$n,{disabled:!!w.admin&&!s,selected:w.censored,icon:w.censored?"comment-slash":"comment",content:w.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return t("censor_channel",{uid:w.uid})}}),(0,r.jsx)(o.$n,{disabled:!f,icon:"cog",content:"Manage",onClick:function(){return(0,u.modalOpen)("manage_channel",{uid:w.uid})}})]}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:w.description||"N/A"}),(0,r.jsx)(o.Ki.Item,{label:"Owner",children:w.author||"N/A"}),!!s&&(0,r.jsx)(o.Ki.Item,{label:"Ckey",children:w.author_ckey}),(0,r.jsx)(o.Ki.Item,{label:"Public",children:w.public?"Yes":"No"}),(0,r.jsxs)(o.Ki.Item,{label:"Total Views",children:[(0,r.jsx)(o.In,{name:"eye",mr:"0.5rem"}),x.reduce(function(e,n){return e+n.view_count},0).toLocaleString()]})]})})]})},_=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),i=t.jobs,c=t.wanted,s=Object.entries(i).reduce(function(e,n){var t=x(n,2);return e+(t[0],t[1]).length},0);return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(C,{story:c,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,m:0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"briefcase",mr:"0.5rem"}),"Job Openings"]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:s>0?j.map(function(e){return Object.assign({},b[e],{id:e,jobs:i[e]})}).filter(function(e){return!!e&&e.jobs.length>0}).map(function(e){return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map(function(e){return(0,r.jsxs)(o.az,{class:(0,l.Ly)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["• ",e.title]},e.title)})},e.id)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no openings at this time."]})}),(0,r.jsxs)(o.wn,{height:"17%",children:["Interested in serving Nanotrasen?",(0,r.jsx)("br",{}),"Sign up for any of the above position now at the ",(0,r.jsx)("b",{children:"Head of Personnel's Office!"}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{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."})]})]})},C=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=e.story,d=e.wanted,h=void 0!==d&&d,m=s.is_admin,p=(0,i.useContext)(y),x=p.fullStories,j=p.setFullStories,b=p.censorMode;return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__story",h&&"Newscaster__story--wanted"]),title:(0,r.jsxs)(r.Fragment,{children:[h&&(0,r.jsx)(o.In,{name:"exclamation-circle",mr:"0.5rem"}),2&u.censor_flags&&"[REDACTED]"||u.title||"News from "+u.author]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",children:(0,r.jsxs)(o.az,{color:"label",children:[!h&&b&&(0,r.jsx)(o.az,{inline:!0,children:(0,r.jsx)(o.$n,{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 t("censor_story",{uid:u.uid})}})}),(0,r.jsxs)(o.az,{inline:!0,children:[(0,r.jsx)(o.In,{name:"user"})," ",u.author," |\xa0",!!m&&(0,r.jsxs)(r.Fragment,{children:["ckey: ",u.author_ckey," |\xa0"]}),!h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"eye"})," ",u.view_count.toLocaleString()," |\xa0"]}),(0,r.jsx)(o.In,{name:"clock"})," ",(0,c.fF)(u.publish_time,s.world_time)]})]})}),children:(0,r.jsx)(o.az,{children:2&u.censor_flags?"[REDACTED]":(0,r.jsxs)(r.Fragment,{children:[!!u.has_photo&&(0,r.jsx)(I,{name:"story_photo_"+u.uid+".png",style:{float:"right"},ml:"0.5rem"}),(u.body_short||u.body).split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),u.body_short&&(0,r.jsx)(o.$n,{content:"Read more..",mt:"0.5rem",onClick:function(){return j(((function(e){if(Array.isArray(e))return f(e)})(x)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(x)||g(x)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u.uid]))}}),(0,r.jsx)(o.az,{clear:"right"})]})})})},I=function(e){var n=e.name,t=p(e,["name"]),l=(0,i.useContext)(y).setViewingPhoto;return(0,r.jsx)(o.az,h({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},t))},S=function(e){var n=(0,i.useContext)(y),t=n.viewingPhoto,l=n.setViewingPhoto;return(0,r.jsxs)(o.aF,{className:"Newscaster__photoZoom",children:[(0,r.jsx)(o.az,{as:"img",src:t}),(0,r.jsx)(o.$n,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return l("")}})]})},O=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),l=!!e.args.uid&&t.channels.filter(function(n){return n.uid===e.args.uid}).pop();if("manage_channel"===e.id&&!l)return void(0,u.modalClose)();var c="manage_channel"===e.id,s=!!e.args.is_admin,d=e.args.scanned_user,f=x((0,i.useState)((null==l?void 0:l.author)||d||"Unknown"),2),h=f[0],m=f[1],p=x((0,i.useState)((null==l?void 0:l.name)||""),2),g=p[0],j=p[1],b=x((0,i.useState)((null==l?void 0:l.description)||""),2),y=b[0],v=b[1],w=x((0,i.useState)((null==l?void 0:l.icon)||"newspaper"),2),k=w[0],_=w[1],C=x((0,i.useState)(!!c&&!!(null==l?void 0:l.public)),2),I=C[0],S=C[1],O=x((0,i.useState)((null==l?void 0:l.admin)===1),2),A=O[0],P=O[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:c?"Manage "+l.name:"Create New Channel",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Owner",children:(0,r.jsx)(o.pd,{disabled:!s,width:"100%",value:h,onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:g,onChange:function(e){return j(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:y,onChange:function(e){return v(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Icon",children:[(0,r.jsx)(o.pd,{disabled:!s,value:k,width:"35%",mr:"0.5rem",onChange:function(e){return _(e)}}),(0,r.jsx)(o.In,{name:k,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,r.jsx)(o.Ki.Item,{label:"Accept Public Stories?",children:(0,r.jsx)(o.$n,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"Yes":"No",onClick:function(){return S(!I)}})}),s&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:A,icon:A?"lock":"lock-open",content:A?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return P(!A)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===h.trim().length||0===g.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:h,name:g.substr(0,49),description:y.substr(0,128),icon:k,public:+!!I,admin_locked:+!!A})}})]})};(0,u.modalRegisterBodyOverride)("create_channel",O),(0,u.modalRegisterBodyOverride)("manage_channel",O),(0,u.modalRegisterBodyOverride)("create_story",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.channels,d=l.channel_idx,f=void 0===d?-1:d,h=!!e.args.is_admin,m=e.args.scanned_user,p=s.slice().sort(function(e,n){if(f<0)return 0;var t=s[f-1];return t.uid===e.uid?-1:t.uid===n.uid?1:void 0}).filter(function(e){return h||!e.frozen&&(e.author===m||!!e.public)}),g=x((0,i.useState)(m||"Unknown"),2),j=g[0],b=g[1],y=x((0,i.useState)(p.length>0?p[0].name:""),2),v=y[0],w=y[1],k=x((0,i.useState)(""),2),_=k[0],C=k[1],S=x((0,i.useState)(""),2),O=S[0],A=S[1],P=x((0,i.useState)(!1),2),E=P[0],B=P[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.pd,{disabled:!h,width:"100%",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Channel",verticalAlign:"top",children:(0,r.jsx)(o.ms,{selected:v,options:p.map(function(e){return e.name}),mb:"0",width:"100%",onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.Ki.Divider,{}),(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:_,onChange:function(e){return C(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Story Text",verticalAlign:"top",children:(0,r.jsx)(o.pd,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:O,onChange:function(e){return A(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return t(c?"eject_photo":"attach_photo")}})}),(0,r.jsx)(o.Ki.Item,{label:"Preview",verticalAlign:"top",children:(0,r.jsx)(o.wn,{noTopPadding:!0,title:_,maxHeight:"13.5rem",overflow:"auto",children:(0,r.jsxs)(o.az,{mt:"0.5rem",children:[!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}}),O.split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),(0,r.jsx)(o.az,{clear:"right"})]})})}),h&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:E,icon:E?"lock":"lock-open",content:E?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return B(!E)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===j.trim().length||0===v.trim().length||0===_.trim().length||0===O.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)("create_story","",{author:j,channel:v,title:_.substr(0,127),body:O.substr(0,1023),admin_locked:+!!E})}})]})}),(0,u.modalRegisterBodyOverride)("wanted_notice",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.wanted,d=!!e.args.is_admin,f=e.args.scanned_user,h=x((0,i.useState)((null==s?void 0:s.author)||f||"Unknown"),2),m=h[0],p=h[1],g=x((0,i.useState)((null==s?void 0:s.title.substr(8))||""),2),j=g[0],b=g[1],y=x((0,i.useState)((null==s?void 0:s.body)||""),2),v=y[0],w=y[1],k=x((0,i.useState)((null==s?void 0:s.admin_locked)===1),2),_=k[0],C=k[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Authority",children:(0,r.jsx)(o.pd,{disabled:!d,width:"100%",value:m,onChange:function(e){return p(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",value:j,maxLength:"128",onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onChange:function(e){return w(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return t(c?"eject_photo":"attach_photo")}}),!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}})]}),d&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:_,icon:_?"lock":"lock-open",content:_?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return C(!_)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:!s,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){t("clear_wanted_notice"),(0,u.modalClose)()}}),(0,r.jsx)(o.$n.Confirm,{disabled:0===m.trim().length||0===j.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:m,name:j.substr(0,127),description:v.substr(0,511),admin_locked:+!!_})}})]})})},6563:function(e,n,t){"use strict";t.r(n),t.d(n,{Noticeboard:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.papers;return(0,r.jsx)(a.p8,{width:600,height:300,theme:"noticeboard",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,children:c.map(function(e){return(0,r.jsx)(i.BJ.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){return t("interact",{paper:e.ref})},onContextMenu:function(n){n.preventDefault(),t("showFull",{paper:e.ref})},children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,fontSize:.75,title:e.name,children:(0,o.jT)(e.contents)})},e.ref)})})})})}},5867:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearBomb:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return a.extended?(0,r.jsx)(l.p8,{width:350,height:290,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Auth Disk",children:(0,r.jsx)(i.$n,{icon:a.authdisk?"eject":"id-card",selected:a.authdisk,content:a.diskname?a.diskname:"-----",tooltip:a.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return t("auth")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auth Code",children:(0,r.jsx)(i.$n,{icon:"key",disabled:!a.authdisk,selected:a.authcode,content:a.codemsg,onClick:function(){return t("code")}})})]})}),(0,r.jsx)(i.wn,{title:"Arming & Disarming",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Bolted to floor",children:(0,r.jsx)(i.$n,{icon:a.anchored?"check":"times",selected:a.anchored,disabled:!a.authdisk,content:a.anchored?"YES":"NO",onClick:function(){return t("toggle_anchor")}})}),(0,r.jsx)(i.Ki.Item,{label:"Time Left",children:(0,r.jsx)(i.$n,{icon:"stopwatch",content:a.time,disabled:!a.authfull,tooltip:"Set Timer",onClick:function(){return t("set_time")}})}),(0,r.jsx)(i.Ki.Item,{label:"Safety",children:(0,r.jsx)(i.$n,{icon:a.safety?"check":"times",selected:a.safety,disabled:!a.authfull,content:a.safety?"ON":"OFF",tooltip:a.safety?"Disable Safety":"Enable Safety",onClick:function(){return t("toggle_safety")}})}),(0,r.jsx)(i.Ki.Item,{label:"Arm/Disarm",children:(0,r.jsx)(i.$n,{icon:(a.timer,"bomb"),disabled:a.safety||!a.authfull,color:"red",content:a.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return t("toggle_armed")}})})]})})]})}):(0,r.jsx)(l.p8,{width:350,height:115,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Deployment",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return t("deploy")}})})})})}},7579:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearRodFabricator:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:p.neighbor_requirements.map(function(e,n){return(0,r.jsx)(o.az,{children:e},n)})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:"None"})]})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.wn,{title:"Required Materials",children:p.materials&&0!==Object.keys(p.materials).length?(0,r.jsx)(o.XI,{children:Object.entries(p.materials).map(function(e,n){var t=s(e,2),i=t[0],l=t[1],a=Object.entries(f.resources||{}).find(function(e){var n=s(e,2),t=n[0];return n[1],t===i}),c=(a?a[1].amount:0)>=l;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,className:c?null:"color-red",children:i}),(0,r.jsx)(o.XI.Cell,{className:c?null:"color-red",children:l}),(0,r.jsxs)(o.XI.Cell,{className:c?null:"color-red",children:["(",Math.round(l/2e3)," sheets)"]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials required."})}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{icon:"wrench",content:"Fabricate",color:"good",onClick:function(){return h("fabricate_rod",{type_path:p.type_path})}})]})]})})]}),v===d&&(0,r.jsx)(o.wn,{title:"Material Storage",fill:!0,children:f.resources&&0!==Object.keys(f.resources).length?(0,r.jsx)(o.XI,{children:Object.entries(f.resources).map(function(e,n){var t=s(e,2),i=t[0],l=t[1];return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,children:i}),(0,r.jsxs)(o.XI.Cell,{children:[l.amount," units"]}),(0,r.jsxs)(o.XI.Cell,{children:["(",l.sheets," sheets)"]}),(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.$n,{content:"1",onClick:function(){return h("eject_material",{id:l.id,amount:"1"})}}),(0,r.jsx)(o.$n,{content:"C",onClick:function(){return h("eject_material",{id:l.id,amount:"custom"})}}),l.sheets>=5&&(0,r.jsx)(o.$n,{content:"5",onClick:function(){return h("eject_material",{id:l.id,amount:"5"})}}),(0,r.jsx)(o.$n,{content:"All",onClick:function(){return h("eject_material",{id:l.id,amount:l.sheets.toString()})}})]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials loaded."})})]})]})})})}},8007:function(e,n,t){"use strict";t.r(n),t.d(n,{NumberInputModal:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&x?5:0);return(0,r.jsxs)(c.p8,{title:y,width:270,height:_,children:[b&&(0,r.jsx)(u.Loader,{value:b}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.Ri&&f("submit",{entry:w}),n===l.s6&&f("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(h,{input:w,onClick:function(e){e!==w&&k(e)},onChange:function(e){e!==w&&k(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})})})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.min_value,c=i.max_value,s=i.init_value,u=i.round_value,d=e.input,f=e.onClick,h=e.onChange,m=Math.round(d!==l?Math.max(d/2,l):c/2),p=d===l&&l>0||1===d;return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===l,icon:"angle-double-left",onClick:function(){return f(l)},tooltip:d===l?"Min":"Min (".concat(l,")")})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.SM,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!u,minValue:l,maxValue:c,value:d,onChange:h,onEnter:function(e){return t("submit",{entry:e})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===c,icon:"angle-double-right",onClick:function(){return f(c)},tooltip:d===c?"Max":"Max (".concat(c,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:p,icon:"divide",onClick:function(){return f(m)},tooltip:p?"Split":"Split (".concat(m,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===s,icon:"redo",onClick:function(){return f(s)},tooltip:s?"Reset (".concat(s,")"):"Reset"})})]})}},4965:function(e,n,t){"use strict";t.r(n),t.d(n,{ObjAccessModifier:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(9281),a=function(){return(0,r.jsx)(o.p8,{width:500,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(l.ChooseAccess,{})})})})}},6499:function(e,n,t){"use strict";t.r(n),t.d(n,{OperatingComputer:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],c=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,1/0]},u=["bad","average","average","good","average","average","bad"],d=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.hasOccupant,u=c.choice;return n=u?(0,r.jsx)(m,{}):s?(0,r.jsx)(f,{}):(0,r.jsx)(h,{}),(0,r.jsx)(l.p8,{width:650,height:455,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:!u,icon:"user",onClick:function(){return a("choiceOff")},children:"Patient"}),(0,r.jsx)(i.tU.Tab,{selected:!!u,icon:"cog",onClick:function(){return a("choiceOn")},children:"Options"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:n})})]})})})},f=function(e){var n=(0,o.Oc)().data.occupant,t=n.activeSurgeries;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Patient",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:n.name}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:a[n.stat][0],children:a[n.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),c.map(function(e,t){return(0,r.jsx)(i.Ki.Item,{label:e[0]+" Damage",children:(0,r.jsx)(i.z2,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:Math.round(n[e[1]])},t)},t)}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:u[n.temperatureSuitability+3],children:[Math.round(n.btCelsius),"\xb0C, ",Math.round(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",children:[n.pulse," BPM"]})]})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Active surgeries",level:"2",children:n.inSurgery&&t?t.map(function(e,n){return(0,r.jsx)(i.wn,{style:{textTransform:"capitalize"},title:e.name+" ("+e.location+")",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Next Step",children:e.step},n)},n)},n)}):(0,r.jsx)(i.az,{color:"label",children:"No procedure ongoing."})})})]})},h=function(){return(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No patient detected."]})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.verbose,c=l.health,s=l.healthAlarm,u=l.oxy,d=l.oxyAlarm,f=l.crit;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Loudspeaker",children:(0,r.jsx)(i.$n,{selected:a,icon:a?"toggle-on":"toggle-off",content:a?"On":"Off",onClick:function(){return t(a?"verboseOff":"verboseOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer",children:(0,r.jsx)(i.$n,{selected:c,icon:c?"toggle-on":"toggle-off",content:c?"On":"Off",onClick:function(){return t(c?"healthOff":"healthOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:s,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("health_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm",children:(0,r.jsx)(i.$n,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return t(u?"oxyOff":"oxyOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:d,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("oxy_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Critical Alert",children:(0,r.jsx)(i.$n,{selected:f,icon:f?"toggle-on":"toggle-off",content:f?"On":"Off",onClick:function(){return t(f?"critOff":"critOn")}})})]})}},7701:function(e,n,t){"use strict";t.r(n),t.d(n,{Orbit:()=>j});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn},p=function(e,n){var t=e.name,r=n.name;if(!t||!r)return 0;var i=t.match(f),o=r.match(f);return i&&o&&t.replace(f,"")===r.replace(f,"")?parseInt(i[1],10)-parseInt(o[1],10):m(t,r)},x=function(e){var n=e.searchText,t=e.source,i=e.title,l=e.color,a=e.sorted,c=t.filter(h(n));return a&&c.sort(p),t.length>0&&(0,r.jsx)(o.wn,{title:"".concat(i," - (").concat(t.length,")"),children:c.map(function(e){return(0,r.jsx)(g,{thing:e,color:l},e.name)})})},g=function(e){var n=(0,c.Oc)().act,t=e.color,i=e.thing;return(0,r.jsxs)(o.$n,{color:t,tooltip:i.assigned_role?(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.az,{as:"img",mr:"0.5em",className:(0,l.Ly)(["job_icons16x16",i.assigned_role_sprite])})," ",i.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,r.jsxs)(o.az,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,r.jsx)(o.In,{name:"eye"}),")"]})]})},j=function(e){var n=(0,c.Oc)(),t=n.act,l=n.data,a=l.alive,u=l.antagonists,f=l.highlights,j=l.response_teams,b=l.tourist,y=(l.auto_observe,l.dead),v=l.ssd,w=l.ghosts,k=l.misc,_=l.npcs,C=d((0,i.useState)(""),2),I=C[0],S=C[1],O={},A=!0,P=!1,E=void 0;try{for(var B,z=u[Symbol.iterator]();!(A=(B=z.next()).done);A=!0){var T=B.value;void 0===O[T.antag]&&(O[T.antag]=[]),O[T.antag].push(T)}}catch(e){P=!0,E=e}finally{try{A||null==z.return||z.return()}finally{if(P)throw E}}var N=Object.entries(O);N.sort(function(e,n){return m(e[0],n[0])});var R=function(e){for(var n=0,r=[N.map(function(e){var n=d(e,2);return n[0],n[1]}),b,f,a,w,v,y,_,k];n0&&(0,r.jsx)(o.wn,{title:"Antagonists",children:N.map(function(e){var n=d(e,2),t=n[0],i=n[1];return(0,r.jsx)(o.wn,{title:"".concat(t," - (").concat(i.length,")"),level:2,children:i.filter(h(I)).sort(p).map(function(e){return(0,r.jsx)(g,{color:"bad",thing:e},e.name)})},t)})}),f.length>0&&(0,r.jsx)(x,{title:"Highlights",source:f,searchText:I,color:"teal"}),(0,r.jsx)(x,{title:"Response Teams",source:j,searchText:I,color:"purple"}),(0,r.jsx)(x,{title:"Tourists",source:b,searchText:I,color:"violet"}),(0,r.jsx)(x,{title:"Alive",source:a,searchText:I,color:"good"}),(0,r.jsx)(x,{title:"Ghosts",source:w,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"SSD",source:v,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"Dead",source:y,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"NPCs",source:_,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"Misc",source:k,searchText:I,sorted:!1})]})})}},5802:function(e,n,t){"use strict";t.r(n),t.d(n,{OreRedemption:()=>f});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384);function c(){return(c=Object.assign||function(e){for(var n=1;n0?"good":"grey",bold:a>0&&"good",children:a.toLocaleString("en-US")+" pts"})}),(0,r.jsx)(i.cG,{}),f?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Design disk",children:[(0,r.jsx)(i.$n,{selected:!0,bold:!0,icon:"eject",content:f.name,tooltip:"Ejects the design disk.",onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{disabled:!f.design||!f.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return t("download")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Stored design",children:(0,r.jsx)(i.az,{color:f.design&&(f.compatible?"good":"bad"),children:f.design||"N/A"})})]}):(0,r.jsx)(i.az,{color:"label",children:"No design disk inserted."})]}))},m=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).sheets,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"20%",children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(g,{ore:e},e.id)})]}))})},p=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).alloys,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(j,{ore:e},e.id)})]}))})},x=function(e){var n;return(0,r.jsx)(i.az,{className:"OreHeader",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:e.title}),null==(n=e.columns)?void 0:n.map(function(e){return(0,r.jsx)(i.BJ.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)})]})})},g=function(e){var n=(0,l.Oc)().act,t=e.ore;if(!t.value||!(t.amount<=0)||["metal","glass"].indexOf(t.id)>-1)return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"45%",align:"middle",children:(0,r.jsxs)(i.BJ,{align:"center",children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",t.id])}),(0,r.jsx)(i.BJ.Item,{children:t.name})]})}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",children:t.value}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),step:1,stepPixelSize:6,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})},j=function(e){var n=(0,l.Oc)().act,t=e.ore;return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"7%",align:"middle",children:(0,r.jsx)(i.az,{className:(0,o.Ly)(["alloys32x32",t.id])})}),(0,r.jsx)(i.BJ.Item,{basis:"30%",textAlign:"middle",align:"center",children:t.name}),(0,r.jsx)(i.BJ.Item,{basis:"35%",textAlign:"middle",color:t.amount>=1?"good":"gray",align:"center",children:t.description}),(0,r.jsx)(i.BJ.Item,{basis:"10%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),stepPixelSize:6,step:1,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})}},4235:function(e,n,t){"use strict";t.r(n),t.d(n,{PAI:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(222),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.app_template,u=a.app_icon,d=a.app_title,f=s(c);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{p:1,fill:!0,scrollable:!0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:u,mr:1}),d,"pai_main_menu"!==c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){return t("Back")}}),(0,r.jsx)(i.$n,{content:"Home",icon:"arrow-up",onClick:function(){return t("MASTER_back")}})]})]}),children:(0,r.jsx)(f,{})})})})})})}},2740:function(e,n,t){"use strict";t.r(n),t.d(n,{PDA:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(2721),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=t.app;if(!t.owner)return(0,r.jsx)(l.p8,{width:350,height:105,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var c=s(a.template);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:a.icon,mr:1}),a.name]}),children:(0,r.jsx)(c,{})})}),(0,r.jsx)(i.BJ.Item,{mt:7.5,children:(0,r.jsx)(f,{})})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.idInserted,c=l.idLink,s=l.stationTime,u=l.cartridge_name;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{ml:.5,children:(0,r.jsx)(i.$n,{icon:"id-card",color:"transparent",onClick:function(){return t("Authenticate")},content:a?c:"No ID Inserted"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sd-card",color:"transparent",onClick:function(){return t("Eject")},content:u?["Eject "+u]:"No Cartridge Inserted"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:s})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app;return(0,r.jsx)(i.az,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[!!l.has_back&&(0,r.jsx)(i.BJ.Item,{basis:"33%",mr:-.5,children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return t("Back")}})}),(0,r.jsx)(i.BJ.Item,{basis:l.has_back?"33%":"100%",children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.is_home?"disabled":"white",icon:"home",onClick:function(){t("Home")}})})]})})}},377:function(e,n,t){"use strict";t.r(n),t.d(n,{Pacman:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,u=s.active,d=s.anchored,f=s.broken,h=s.emagged,m=s.fuel_type,p=s.fuel_usage,x=s.fuel_stored,g=s.fuel_cap,j=s.is_ai,b=s.tmp_current,y=s.tmp_max,v=s.tmp_overheat,w=s.output_max,k=s.power_gen,_=s.output_set,C=s.has_fuel,I=Math.round(x/p*2),S=Math.round(I/60);return(0,r.jsx)(c.p8,{width:500,height:225,children:(0,r.jsxs)(c.p8.Content,{children:[(f||!d)&&(0,r.jsxs)(i.wn,{title:"Status",children:[!!f&&(0,r.jsx)(i.az,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!d&&(0,r.jsx)(i.az,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!d&&(0,r.jsxs)("div",{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!C,selected:u,onClick:function(){return t("toggle_power")}}),children:(0,r.jsxs)(i.so,{direction:"row",children:[(0,r.jsx)(i.so.Item,{width:"50%",className:"ml-1",children:(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Power setting",children:[(0,r.jsx)(i.Q7,{value:_,minValue:1,maxValue:w*(h?2.5:1),step:1,className:"mt-1",onChange:function(e){return t("change_power",{change_power:e})}}),"(",(0,o.d5)(_*k),")"]})})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{value:b/y,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[b," ℃"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[v>50&&(0,r.jsx)(i.az,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,r.jsx)(i.az,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,r.jsx)(i.az,{color:"orange",children:"Temperature High"}),0===v&&(0,r.jsx)(i.az,{color:"green",children:"Optimal"})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Fuel",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||j||!C,onClick:function(){return t("eject_fuel")}}),children:(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Fuel level",children:(0,r.jsxs)(i.z2,{value:x/g,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(x/1e3)," dm\xb3"]})})]})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fuel usage",children:[p/1e3," dm\xb3/s"]}),(0,r.jsxs)(i.Ki.Item,{label:"Fuel depletion",children:[!!C&&(p?I>120?"".concat(S," minutes"):"".concat(I," seconds"):"N/A"),!C&&(0,r.jsx)(i.az,{color:"red",children:"Out of fuel"})]})]})})]})})]})]})})}},9454:function(e,n,t){"use strict";t.r(n),t.d(n,{PanDEMIC:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)().data,a=t.reporting,u=t.analyzing,d=t.beakerLoaded,h=t.beakerContainsBlood,m=t.beakerContainsVirus,p=t.resistances,g=void 0===p?[]:p;return d?h?h&&!m&&(n=(0,r.jsx)(r.Fragment,{children:"No disease detected in provided blood sample."})):n=(0,r.jsx)(r.Fragment,{children:"No blood sample found in the loaded container."}):n=(0,r.jsx)(r.Fragment,{children:"No container loaded."}),(0,r.jsx)(l.p8,{width:700,height:640,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{operating:u||a,name:"PanD.E.M.I.C"}),n&&!m?(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{fill:!0,vertical:!0}),children:(0,r.jsx)(i.IC,{children:n})}):(0,r.jsx)(f,{}),(null==g?void 0:g.length)>0&&(0,r.jsx)(x,{align:"bottom"})]})})})},c=function(e){var n=e.operating,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.analyzing,s=a.analysisTime,u=a.analysisDuration,d=a.analysisDifficulty,f=a.totalContribution,h=a.analysisContributions,m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(d)}),h.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:Math.floor(e.amount)},n)}),(0,r.jsx)(i.Ki.Item,{label:"Total",children:Math.floor(f)}),(0,r.jsx)(i.Ki.Item,{label:"Analysis Result",children:d-f<0?"Disease Analyzed Successfully":"Analysis Failed"})]});if(n)return c?(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"Analyzing ",Math.floor(100-100*s/u),"%"]})})}):(0,r.jsx)(i.aF,{backgroundColor:"rgba(0, 0, 0, 1)",children:(0,r.jsx)(i.wn,{title:"Analysis Results",backgroundColor:"rgba(0, 0, 0, 1)",bold:!0,children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.Ki,{children:m}),(0,r.jsx)(i.$n,{textAlign:"center",onClick:function(){return l("close_report")},children:"Close"})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.beakerLoaded;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){return t("eject_beaker")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!l,onClick:function(){return t("destroy_eject_beaker")}})]})},u=function(e){var n,t,l,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.analysisDifficulty,d=s.analysisContributions,f=s.beakerContainsVirus,h=s.analyzing,m=s.canAnalyze,p=e.strain,x=p.commonName,g=p.description,j=p.strainID,b=p.sample_stage,y=p.known,v=p.diseaseAgent,w=p.bloodDNA,k=p.bloodType,_=p.possibleCures,C=p.transmissionRoute,I=p.isAdvanced,S=p.RequiredCures,O=p.Stabilized,A=p.StrainTracker,P=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",children:w?(0,r.jsx)("span",{style:{fontFamily:"'Courier New', monospace"},children:w}):"Undetectable"}),(0,r.jsx)(i.Ki.Item,{label:"Blood Type",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:null!=k?k:"Undetectable"}})})]});if(!f)return(0,r.jsx)(i.Ki,{children:P});var E=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(u)}),d.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:(0,r.jsx)(i.z2,{maxValue:Math.min(e.maxAmount,u),minValue:0,value:e.amount,ranges:{good:[.66*Math.min(e.maxAmount,u),1/0],average:[.33*Math.min(e.maxAmount,u),.66*Math.min(e.maxAmount,u)],bad:[-1/0,.33*Math.min(e.maxAmount,u)]},children:e.amount})},n)})]});if(I)return n=null!=x&&"Unknown"!==x?(0,r.jsx)(i.$n,{icon:"print",content:"Print Release Forms",disabled:!y,onClick:function(){return c("print_release_forms",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}):(0,r.jsx)(i.$n,{icon:"pen",content:null!=x&&"Unknown"!==x?"Rename Disease":"Name Disease",disabled:!y,onClick:function(){return c("name_strain",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}),I&&(t=(0,r.jsx)(i.$n,{content:"Analyze",disabled:!m||h,onClick:function(){return c("analyze_strain",{strain_index:e.strainIndex})}}),l=(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Delete Data",confirmContent:"Delete Data",disabled:!e.strain.known,onClick:function(){return c("remove_from_database",{strain_id:e.strain.strainFullID})}})),(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsxs)(i.BJ,{align:"left",children:[n,t,l]}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Common Name",className:"common-name-label",children:null!=x?x:"Unknown"}),g&&(0,r.jsx)(i.Ki.Item,{label:"Description",children:g}),(0,r.jsx)(i.Ki.Item,{label:"Strain ID",children:j}),m?E:"",(0,r.jsx)(i.Ki.Item,{label:"Sample Stage",children:b}),(0,r.jsx)(i.Ki.Item,{label:"Disease Agent",children:v}),P,(0,r.jsx)(i.Ki.Item,{label:"Spread Vector",children:null!=C?C:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Possible Cures",children:null!=_?_:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Required Cures",children:null!=S?S:"None"}),I?(0,r.jsx)(i.Ki.Item,{label:"Stabilized",children:1===O?"Yes":"No"}):"",I?(0,r.jsx)(i.Ki.Item,{label:"Tracked Strain",children:A&&""!==A?A:"None"}):""]})]})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=!!t.data.synthesisCooldown,c=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:a?"spinner":"clone",iconSpin:a,content:"Clone",disabled:a,onClick:function(){return l("clone_strain",{strain_index:e.strainIndex})}}),e.sectionButtons]});return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.wn,{title:null!=(n=e.sectionTitle)?n:"Strain Information",buttons:c,children:(0,r.jsx)(u,{strain:e.strain,strainIndex:e.strainIndex})})})},f=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,u=c.selectedStrainIndex,f=c.strains,h=f[u-1];if(0===f.length)return(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.IC,{children:"No disease detected in provided blood sample."})});if(1===f.length)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{strain:f[0],strainIndex:1,sectionButtons:(0,r.jsx)(s,{})}),(null==(t=f[0].symptoms)?void 0:t.length)>0&&(0,r.jsx)(m,{strain:f[0]})]});var p=(0,r.jsx)(s,{});return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Culture Information",fill:!0,buttons:p,children:[(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.tU,{children:f.map(function(e,n){var t;return(0,r.jsx)(i.tU.Tab,{icon:"virus",selected:u-1===n,onClick:function(){return a("switch_strain",{strain_index:n+1})},children:null!=(t=e.commonName)?t:"Unknown"},n)})})}),(0,r.jsx)(d,{strain:h,strainIndex:u}),(null==(n=h.symptoms)?void 0:n.length)>0&&(0,r.jsx)(m,{className:"remove-section-bottom-padding",strain:h})]})})},h=function(e){return e.reduce(function(e,n){return e+n},0)},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.predictions,c=l.symptom_names,s=l.analyzing,u=l.analysisDuration,d=e.strain,f=d.baseStats,m=d.symptoms,p=d.known;return(0,r.jsx)(i.so.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Infection Symptoms",fill:!0,className:e.className,children:(0,r.jsxs)(i.XI,{className:"symptoms-table",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{children:"Stealth"}),(0,r.jsx)(i.XI.Cell,{children:"Resistance"}),(0,r.jsx)(i.XI.Cell,{children:"Stage Speed"}),(0,r.jsx)(i.XI.Cell,{children:"Transmissibility"})]}),m.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[p||"UNKNOWN"!==e.name?(0,r.jsx)(i.XI.Cell,{children:e.name}):(0,r.jsx)(i.ms,{options:c.sort(function(e,n){return e.localeCompare(n)}),width:"180px",selected:a[n],disabled:s||-2===u,onSelected:function(e){return t("set_prediction",{pred_index:n+1,pred_value:e})}}),(0,r.jsx)(i.XI.Cell,{children:e.stealth}),(0,r.jsx)(i.XI.Cell,{children:e.resistance}),(0,r.jsx)(i.XI.Cell,{children:e.stageSpeed}),(0,r.jsx)(i.XI.Cell,{children:e.transmissibility})]},n)}),(0,r.jsx)(i.XI.Row,{className:"table-spacer"}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Base Stats"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.transmissibility:"UNKNOWN"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Total"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stealth}))+f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.resistance}))+f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stageSpeed}))+f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.transmissibility}))+f.transmissibility:"UNKNOWN"})]})]})})})},p=["flask","vial","eye-dropper"],x=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.synthesisCooldown,c=(l.beakerContainsVirus,l.resistances);return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Antibodies",fill:!0,children:(0,r.jsx)(i.BJ,{wrap:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:p[n%p.length],disabled:!!a,onClick:function(){return t("clone_vaccine",{resistance_index:n+1})},mr:"0.5em"}),e]},n)})})})})}},3566:function(e,n,t){"use strict";t.r(n),t.d(n,{ParticleAccelerator:()=>u});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(7946),c=t(3384),s=function(e){switch(e){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.assembled,u=a.power,h=a.strength,m=a.max_strength,p=(a.icon,a.layout_1,a.layout_2,a.layout_3,a.orientation);return(0,r.jsx)(c.p8,{width:395,height:s?160:"north"===p||"south"===p?540:465,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Control Panel",buttons:(0,r.jsx)(i.$n,{dmIcon:"sync",content:"Connect",onClick:function(){return t("scan")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",mb:"5px",children:(0,r.jsx)(i.az,{color:s?"good":"bad",children:s?"Operational":"Error: Verify Configuration"})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Strength",children:[(0,r.jsx)(i.$n,{icon:"backward",disabled:!s||0===h,onClick:function(){return t("remove_strength")},mr:"4px"}),h,(0,r.jsx)(i.$n,{icon:"forward",disabled:!s||h===m,onClick:function(){return t("add_strength")},ml:"4px"})]})]})}),s?"":(0,r.jsx)(i.wn,{title:p?"EM Acceleration Chamber Orientation: "+(0,o.ZH)(p):"Place EM Acceleration Chamber Next To Console",children:0===p?"":"north"===p||"south"===p?(0,r.jsx)(f,{}):(0,r.jsx)(d,{})})]})})},d=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,a=t.layout_1,c=t.layout_2,u=t.layout_3,d=t.orientation;return(0,r.jsxs)(i.XI,{children:[(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?a:u).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:c.slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?u:a).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})},f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,c=t.layout_1,u=t.layout_2,d=t.layout_3,f=t.orientation;return(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?c:d).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{children:u.slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?d:c).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,tooltip:e.status,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})}},3371:function(e,n,t){"use strict";t.r(n),t.d(n,{PdaPainter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.has_pda;return(0,r.jsx)(l.p8,{width:510,height:505,children:(0,r.jsx)(l.p8.Content,{children:n?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,r.jsx)(i.In,{name:"download",size:5,mb:"10px"}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.pda_colors;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.XI,{className:"PdaPainter__list",children:Object.keys(l).map(function(e){return(0,r.jsxs)(i.XI.Row,{onClick:function(){return t("choose_pda",{selectedPda:e})},children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/png;base64,".concat(l[e][0]),style:{verticalAlign:"middle",width:"32px",margin:"0px",imageRendering:"pixelated"}})}),(0,r.jsx)(i.XI.Cell,{children:e})]},e)})})})})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.current_appearance,c=l.preview_appearance;return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Current PDA",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(a),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return t("eject_pda")}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return t("paint_pda")}})]}),(0,r.jsx)(i.wn,{title:"Preview",children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}})})]})}},6144:function(e,n,t){"use strict";t.r(n),t.d(n,{PersonalCrafting:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.busy,d=a.category,f=a.display_craftable_only,h=a.display_compact,m=a.prev_cat,p=a.next_cat,x=a.subcategory,g=a.prev_subcat,j=a.next_subcat;return(0,r.jsx)(l.p8,{width:700,height:800,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!u&&(0,r.jsxs)(i.Rr,{fontSize:"32px",children:[(0,r.jsx)(i.In,{name:"cog",spin:1})," Crafting..."]}),(0,r.jsxs)(i.wn,{title:d,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Show Craftable Only",icon:f?"check-square-o":"square-o",selected:f,onClick:function(){return t("toggle_recipes")}}),(0,r.jsx)(i.$n,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return t("toggle_compact")}})]}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:m,icon:"arrow-left",onClick:function(){return t("backwardCat")}}),(0,r.jsx)(i.$n,{content:p,icon:"arrow-right",onClick:function(){return t("forwardCat")}})]}),x&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:g,icon:"arrow-left",onClick:function(){return t("backwardSubCat")}}),(0,r.jsx)(i.$n,{content:j,icon:"arrow-right",onClick:function(){return t("forwardSubCat")}})]}),h?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsx)(i.az,{mt:1,children:(0,r.jsxs)(i.Ki,{children:[c.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}),!a&&s.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsxs)(i.az,{mt:1,children:[c.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)}),!a&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)})]})}},2327:function(e,n,t){"use strict";t.r(n),t.d(n,{Photocopier:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:400,height:440,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{title:"Photocopier",color:"silver",children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Copies:"}),(0,r.jsx)(i.BJ.Item,{width:"2em",bold:!0,children:a.copynumber}),(0,r.jsxs)(i.BJ.Item,{style:{float:"right"},children:[(0,r.jsx)(i.$n,{icon:"minus",textAlign:"center",content:"",onClick:function(){return t("minus")}}),(0,r.jsx)(i.$n,{icon:"plus",textAlign:"center",content:"",onClick:function(){return t("add")}})]})]}),(0,r.jsxs)(i.BJ,{mb:2,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Toner:"}),(0,r.jsx)(i.BJ.Item,{bold:!0,children:a.toner})]}),(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Document:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.copyitem&&!a.mob,content:a.copyitem?a.copyitem:a.mob?a.mob+"'s ass!":"document",onClick:function(){return t("removedocument")}})})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Folder:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.folder,content:a.folder?a.folder:"folder",onClick:function(){return t("removefolder")}})})]})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(c,{})}),(0,r.jsx)(s,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.issilicon;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"copy",textAlign:"center",content:"Copy",onClick:function(){return t("copy")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"file-import",textAlign:"center",content:"Scan",onClick:function(){return t("scandocument")}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"file",color:"green",textAlign:"center",content:"Print Text",onClick:function(){return t("ai_text")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"image",color:"green",textAlign:"center",content:"Print Image",onClick:function(){return t("ai_pic")}})]})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Scanned Files",children:l.files.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:l.toner<=0,onClick:function(){return t("filecopy",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return t("deletefile",{uid:e.uid})}})]})},e.name)})})}},7331:function(e,n,t){"use strict";t.r(n),t.d(n,{PoolController:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["tempKey"]),s=c[l];if(!s)return null;var u=(0,o.Oc)(),d=u.data,f=u.act,h=d.currentTemp,m=s.label,p=s.icon;return(0,r.jsxs)(i.$n,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.direction,s=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Pump Direction",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:4,icon:"sign-in-alt",content:"In",selected:!c,onClick:function(){return t("set_direction",{direction:0})}}),(0,r.jsx)(i.$n,{width:4,icon:"sign-out-alt",content:"Out",selected:c,onClick:function(){return t("set_direction",{direction:1})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Port status",children:(0,r.jsx)(i.az,{color:s?"green":"average",bold:1,ml:.5,children:s?"Connected":"Disconnected"})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.target_pressure,s=l.max_target_pressure,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_pressure",{pressure:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_target_pressure,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},7920:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableScrubber:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Port Status:"}),(0,r.jsx)(i.BJ.Item,{color:c?"green":"average",bold:1,ml:6,children:c?"Connected":"Disconnected"})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.rate,s=l.max_rate,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_rate",{rate:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_rate,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},2854:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableTurret:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.locked,u=c.on,d=c.lethal,f=c.lethal_is_configurable,h=c.targetting_is_configurable,m=c.check_weapons,p=c.neutralize_noaccess,x=c.access_is_configurable,g=c.regions,j=c.selectedAccess,b=c.one_access,y=c.neutralize_norecord,v=c.neutralize_criminals,w=c.neutralize_all,k=c.neutralize_unidentified,_=c.neutralize_cyborgs;return(0,r.jsx)(l.p8,{width:475,height:750,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.BJ.Item,{m:0,children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:s,onClick:function(){return t("power")}})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Lethals",children:(0,r.jsx)(i.$n,{icon:d?"exclamation-triangle":"times",content:d?"On":"Off",color:d?"bad":"",disabled:s,onClick:function(){return t("lethal")}})}),!!x&&(0,r.jsx)(i.Ki.Item,{label:"One Access Mode",children:(0,r.jsx)(i.$n,{icon:b?"address-card":"exclamation-triangle",content:b?"On":"Off",selected:b,disabled:s,onClick:function(){return t("one_access")}})})]})})}),!!h&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Humanoid Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:v,content:"Wanted Criminals",disabled:s,onClick:function(){return t("autharrest")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:y,content:"No Sec Record",disabled:s,onClick:function(){return t("authnorecord")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Access",disabled:s,onClick:function(){return t("authaccess")}})]}),(0,r.jsxs)(i.wn,{title:"Other Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:k,content:"Unidentified Lifesigns (Xenos, Animals, Etc)",disabled:s,onClick:function(){return t("authxeno")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:_,content:"Cyborgs",disabled:s,onClick:function(){return t("authborgs")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:w,content:"All Non-Synthetics",disabled:s,onClick:function(){return t("authsynth")}})]})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!x&&(0,r.jsx)(a.AccessList,{accesses:g,selectedList:j,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})})]})})})}},1784:function(e,n,t){"use strict";t.r(n),t.d(n,{PowerMonitor:()=>m,PowerMonitorMainContent:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(6859),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t50?"battery-half":"battery-quarter";break;case"C":i="bolt";break;case"F":i="battery-full";break;case"M":i="slash"}return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.In,{width:"18px",textAlign:"center",name:i,color:"N"===n&&(t>50?"yellow":"red")||"C"===n&&"yellow"||"F"===n&&"green"||"M"===n&&"orange"}),(0,r.jsx)(l.az,{inline:!0,width:"36px",textAlign:"right",children:(0,a.Mg)(t)+"%"})]})},b=function(e){switch(e.status){case"AOn":n=!0,t=!0;break;case"AOff":n=!0,t=!1;break;case"On":n=!1,t=!0;break;case"Off":n=!1,t=!1}var n,t,i=(t?"On":"Off")+" [".concat(n?"auto":"manual","]");return(0,r.jsx)(l.m_,{content:i,children:(0,r.jsx)(l.BK,{color:t?"good":"bad",content:n?void 0:"M"})})}},8011:function(e,n,t){"use strict";t.r(n),t.d(n,{PrisonerImplantManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=t(7352),s=t(736),u=function(e){var n=(0,o.Oc)(),t=n.act,u=n.data,d=u.loginState,f=u.prisonerInfo,h=u.chemicalInfo,m=u.trackingInfo;if(!d.logged_in)return(0,r.jsx)(l.p8,{theme:"security",width:500,height:850,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s.LoginScreen,{})})});var p=[1,5,10];return(0,r.jsxs)(l.p8,{theme:"security",width:500,height:850,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.LoginInfo,{}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:f.name?"eject":"id-card",selected:f.name,content:f.name?f.name:"-----",tooltip:f.name?"Eject ID":"Insert ID",onClick:function(){return t("id_card")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Points",children:[null!==f.points?f.points:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"minus-square",disabled:null===f.points,content:"Reset",onClick:function(){return t("reset_points")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Point Goal",children:[null!==f.goal?f.goal:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"pen",disabled:null===f.goal,content:"Edit",onClick:function(){return(0,a.modalOpen)("set_points")}})]}),(0,r.jsx)(i.Ki.Item,{children:(0,r.jsxs)("box",{hidden:null===f.goal,children:["1 minute of prison time should roughly equate to 150 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Sentences should not exceed 5000 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Permanent prisoners should not be given a point goal.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle."]})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Tracking Implants",children:m.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.subject]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:e.health}),(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){return(0,a.modalOpen)("warn",{uid:e.uid})}})})]})]},e.subject)]}),(0,r.jsx)("br",{})]})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Chemical Implants",children:h.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.name]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Reagents",children:e.volume})}),p.map(function(n){return(0,r.jsx)(i.$n,{mt:2,disabled:e.volumea});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.can_go_home,s=a.emagged,u=a.id_inserted,d=a.id_name,f=a.id_points,h=a.id_goal,m=+!s,p=c?"Completed!":"Insufficient";s&&(p="ERR0R");var x="No ID inserted";return u?x=(0,r.jsx)(i.z2,{value:f/h,ranges:{good:[m,1/0],bad:[-1/0,m]},children:f+" / "+h+" "+p}):s&&(x="ERR0R COMPLETED?!@"),(0,r.jsx)(l.p8,{width:315,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:x}),(0,r.jsx)(i.Ki.Item,{label:"Shuttle controls",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Move shuttle",disabled:!c,onClick:function(){return t("move_shuttle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inserted ID",children:(0,r.jsx)(i.$n,{fluid:!0,content:u?d:"-------------",onClick:function(){return t("handle_id")}})})]})})})}},9083:function(e,n,t){"use strict";t.r(n),t.d(n,{PrizeCounter:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu;return(0,r.jsx)(o.c_,{fluid:!0,title:e.name,dmIcon:e.icon,dmIconState:e.icon_state,buttonsAlt:(0,r.jsxs)(o.$n,{bold:!0,fontSize:1.5,tooltip:n&&"Not enough tickets",disabled:n,onClick:function(){return t("purchase",{purchase:e.itemID})},children:[e.cost,(0,r.jsx)(o.In,{m:0,mt:.25,name:"ticket",color:n?"bad":"good",size:1.6})]}),children:e.desc},e.name)})})})})})})}},7692:function(e,n,t){"use strict";t.r(n),t.d(n,{QuirkMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e.cost},j=function(e){var n=p.has(e.name);if(n){var r=u(h.filter(function(n){return n!==e.name}),d.all_quirks);if(e.cost<0&&r<0)return}else if(e.cost>0&&!g(e))return;m(n?h.filter(function(n){return n!==e.name}):((function(e){if(Array.isArray(e))return c(e)})(h)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(h)||s(h)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e.name])),t(n?"remove_quirk":"add_quirk",{path:e.path})},b=function(e,n,t,i){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{p:.5,mb:1,color:t,style:{border:"1px solid ".concat(t),backgroundColor:"rgba(".concat("green"===t?"0,128,0":"255,0,0",",0.1)")},children:[(0,r.jsx)(o.In,{name:i})," ",n]}),e.map(function(e){var n=p.has(e.name),t=e.cost>0?"-".concat(e.cost):"+".concat(Math.abs(e.cost)),i=e.cost>0?"bad":"good",l=!1,a=n?"Remove":"Select",c=n?"bad":"good";if(n){var s=u(h.filter(function(n){return n!==e.name}),d.all_quirks);e.cost<0&&s<0&&(l=!0,a="Locked (Balance)",c="average")}else e.cost>0&&!g(e)&&(l=!0,a="Locked",c="average");return(0,r.jsx)(o.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(o.$n,{color:c,content:a,disabled:l,onClick:function(){return j(e)},fluid:!0}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:e.desc}),(0,r.jsx)(o.Ki.Item,{label:"Effect",children:(0,r.jsx)(o.az,{color:i,bold:!0,children:t})})]})},e.name)})]})};return(0,r.jsx)(a.p8,{width:750,height:550,theme:"ntos",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,basis:500,children:(0,r.jsx)(o.wn,{title:"Available Quirks",fill:!0,scrollable:!0,children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[b(d.all_quirks.filter(function(e){return e.cost<0}),"Negative Quirks (Add Points)","green","minus-circle"),b(d.all_quirks.filter(function(e){return e.cost>0}),"Positive Quirks (Cost Points)","bad","plus-circle")]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.cG,{vertical:!0})}),(0,r.jsx)(o.BJ.Item,{basis:250,children:(0,r.jsxs)(o.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(o.wn,{title:"Balance",children:(0,r.jsx)(o.az,{bold:!0,color:x>=0?"good":"bad",fontSize:"18px",children:x})}),(0,r.jsx)(o.wn,{title:"Selected Quirks",fill:!0,scrollable:!0,children:h.length?h.map(function(e){var n=d.all_quirks.find(function(n){return n.name===e});if(!n)return null;var t=n.cost>0?"-".concat(n.cost):"+".concat(Math.abs(n.cost)),i=n.cost>0?"var(--color-bad)":"var(--color-good)";return(0,r.jsx)(o.az,{mb:.5,p:.5,style:{borderLeft:"3px solid ".concat(i)},children:(0,r.jsxs)(o.BJ,{justify:"space-between",children:[(0,r.jsx)(o.az,{bold:!0,children:e}),(0,r.jsx)(o.az,{children:t})]})},e)}):(0,r.jsx)(o.az,{italic:!0,children:"No quirks selected."})})]})})]})})})}},7076:function(e,n,t){"use strict";t.r(n),t.d(n,{RCD:()=>s});var r=t(8138);t(4530);var i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(4744),s=function(){return(0,r.jsxs)(l.p8,{width:480,height:670,children:[(0,r.jsx)(c.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})})]})},u=function(){var e=(0,o.Oc)().data,n=e.matter,t=e.max_matter,l=.7*t,a=.25*t;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Matter Storage",children:(0,r.jsx)(i.z2,{ranges:{good:[l,1/0],average:[a,l],bad:[-1/0,a]},value:n,maxValue:t,children:(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:"".concat(n," / ").concat(t," units")})})})})},d=function(){return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Construction Type",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(f,{mode_type:"Floors and Walls"}),(0,r.jsx)(f,{mode_type:"Airlocks"}),(0,r.jsx)(f,{mode_type:"Windows"}),(0,r.jsx)(f,{mode_type:"Deconstruction"})]})})})},f=function(e){var n=e.mode_type,t=(0,o.Oc)(),l=t.act,a=t.data.mode;return(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",content:n,selected:+(a===n),onClick:function(){return l("mode",{mode:n})}})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.door_name,a=t.electrochromic,s=t.airlock_glass;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Airlock Settings",children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,r.jsxs)(r.Fragment,{children:["Rename: ",(0,r.jsx)("b",{children:l})]}),onClick:function(){return(0,c.modalOpen)("renameAirlock")}})}),(0,r.jsx)(i.BJ.Item,{children:1===s&&(0,r.jsx)(i.$n,{fluid:!0,icon:a?"toggle-on":"toggle-off",content:"Electrochromic",selected:a,onClick:function(){return n("electrochromic")}})})]})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.tab,c=t.locked,s=t.one_access,u=t.selected_accesses,d=t.regions;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.tU,{fluid:!0,children:[(0,r.jsx)(i.tU.Tab,{icon:"cog",selected:1===l,onClick:function(){return n("set_tab",{tab:1})},children:"Airlock Types"}),(0,r.jsx)(i.tU.Tab,{selected:2===l,icon:"list",onClick:function(){return n("set_tab",{tab:2})},children:"Airlock Access"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:1===l?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Types",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:0})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:1})})]})}):2===l&&c?(0,r.jsx)(i.wn,{fill:!0,title:"Access",buttons:(0,r.jsx)(i.$n,{icon:"lock-open",content:"Unlock",onClick:function(){return n("set_lock",{new_lock:"unlock"})}}),children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:5,mb:3}),(0,r.jsx)("br",{}),"Airlock access selection is currently locked."]})})}):(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"lock",content:"Lock",onClick:function(){return n("set_lock",{new_lock:"lock"})}}),usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return n("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,width:4,content:"All",onClick:function(){return n("set_one_access",{access:"all"})}})]}),accesses:d,selectedList:u,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})},grantableList:[]})})]})},p=function(e){var n=e.check_number,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.door_types_ui_list,s=a.door_type,u=c.filter(function(e,t){return t%2===n});return(0,r.jsx)(i.BJ.Item,{children:u.map(function(e,n){return(0,r.jsx)(i.BJ,{mb:.5,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,selected:s===e.type,content:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"3px",marginRight:"6px",marginLeft:"-3px"}}),e.name]}),onClick:function(){return l("door_type",{door_type:e.type})}})})},n)})})}},1703:function(e,n,t){"use strict";t.r(n),t.d(n,{RPD:()=>s});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.mainmenu,s=o.mode;return(0,r.jsx)(c.p8,{width:550,height:440,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{icon:e.icon,selected:e.mode===s,onClick:function(){return t("mode",{mode:e.mode})},children:e.category},e.category)})})}),function(e){switch(e){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(d,{});case 3:return(0,r.jsx)(h,{});case 4:return(0,r.jsx)(m,{});case 5:return(0,r.jsx)(p,{});case 6:return(0,r.jsx)(x,{});default:return"WE SHOULDN'T BE HERE!"}}(s)]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.pipemenu,u=c.pipe_category,d=c.pipelist,h=c.whatpipe,m=c.iconrotation;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:s.map(function(e){return(0,r.jsx)(i.tU.Tab,{textAlign:"center",selected:e.pipemode===u,onClick:function(){return t("pipe_category",{pipe_category:e.pipemode})},children:e.category},e.category)})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.pd,{fluid:!0,placeholder:"Enter pipe label",onChange:function(e){return t("set_label",{set_label:e})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:d.filter(function(e){return 1===e.pipe_type}).filter(function(e){return e.pipe_category===u}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===h,onClick:function(){return t("whatpipe",{whatpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),d.filter(function(e){return 1===e.pipe_type&&e.pipe_id===h&&1!==e.orientations}).map(function(e){return(0,r.jsx)(i.az,{children:e.bendy?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})})]}),(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]})},e.pipe_id)})]})})})})]})})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatdpipe,d=c.iconrotation;return c.auto_wrench_toggle,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 2===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatdpipe",{whatdpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 2===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.iconrotation,c=o.auto_wrench_toggle;return(0,r.jsxs)(i.BJ,{mb:1,textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Auto-orientation",selected:0===a,onClick:function(){return t("iconrotation",{iconrotation:0})}})}),(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:c,content:"Auto-anchor",onClick:function(){return t("auto_wrench_toggle")}})})]})},h=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"sync-alt",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to rotate loose pipes..."]})})})})},m=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"arrows-alt-h",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to flip loose pipes..."]})})})})},p=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"recycle",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to eat loose pipes..."]})})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatttube,d=c.iconrotation;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 3===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatttube",{whatttube:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 3===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})}},8930:function(e,n,t){"use strict";t.r(n),t.d(n,{Radio:()=>u});var r=t(8138),i=t(8587),o=t(7790),l=t(6859),a=t(2864),c=t(421),s=t(3384),u=function(e){var n=(0,a.Oc)(),t=n.act,u=n.data,d=u.freqlock,f=u.frequency,h=u.minFrequency,m=u.maxFrequency,p=u.canReset,x=u.listening,g=u.broadcasting,j=u.loudspeaker,b=u.has_loudspeaker,y=u.ichannels,v=u.schannels,w=c.Fo.find(function(e){return e.freq===f}),k=!!w&&!!w.name,_=[];c.Fo.forEach(function(e){_[e.name]=e.color});var C=(0,i.Tj)(v,function(e,n){return{name:n,status:!!e}}),I=(0,i.Tj)(y,function(e,n){return{name:n,freq:e}});return(0,r.jsx)(s.p8,{width:375,height:130+21.2*C.length+11*I.length,children:(0,r.jsx)(s.p8.Content,{scrollable:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Frequency",children:[d&&(0,r.jsx)(o.az,{inline:!0,color:"light-gray",children:(0,l.Mg)(f/10,1)+" kHz"})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q7,{animated:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:h/10,maxValue:m/10,value:f/10,format:function(e){return(0,l.Mg)(e,1)},onChange:function(e){return t("frequency",{adjust:e-f/10})}}),(0,r.jsx)(o.$n,{icon:"undo",content:"",disabled:!p,tooltip:"Reset",onClick:function(){return t("frequency",{tune:"reset"})}})]}),k&&w&&(0,r.jsxs)(o.az,{inline:!0,color:w.color,ml:2,children:["[",w.name,"]"]})]}),(0,r.jsxs)(o.Ki.Item,{label:"Audio",children:[(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:x?"volume-up":"volume-mute",selected:x,color:x?"":"bad",tooltip:x?"Disable Incoming":"Enable Incoming",onClick:function(){return t("listen")}}),(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:g?"microphone":"microphone-slash",selected:g,tooltip:g?"Disable Hotmic":"Enable Hotmic",onClick:function(){return t("broadcast")}}),!!b&&(0,r.jsx)(o.$n,{ml:1,icon:"bullhorn",selected:j,content:"Loudspeaker",tooltip:j?"Disable Loudspeaker":"Enable Loudspeaker",onClick:function(){return t("loudspeaker")}})]}),0!==v.length&&(0,r.jsx)(o.Ki.Item,{label:"Keyed Channels",children:C.map(function(e){return(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.$n,{icon:e.status?"check-square-o":"square-o",selected:e.status,content:"",onClick:function(){return t("channel",{channel:e.name})}}),(0,r.jsx)(o.az,{inline:!0,color:_[e.name],children:e.name})]},e.name)})}),0!==I.length&&(0,r.jsx)(o.Ki.Item,{label:"Standard Channel",children:I.map(function(e){return(0,r.jsx)(o.$n,{icon:"arrow-right",content:e.name,selected:k&&w&&w.name===e.name,onClick:function(){return t("ichannel",{ichannel:e.freq})}},"i_"+e.name)})})]})})})})}},4097:function(e,n,t){"use strict";t.r(n),t.d(n,{RankedListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:null;if(null!==a){var i=function(e){if(Array.isArray(e))return u(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||f(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i.splice(a,1)[0];null===r?i.push(o):i.splice(r,0,o),t(i),c(null),e.stopPropagation()}};return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,onDrop:function(e){return m(e)},onDragOver:h,children:(0,r.jsx)(o.XI,{children:n.map(function(e,n){return(0,r.jsx)(o.XI.Row,{style:{padding:"8px"},draggable:!0,onDragStart:function(){return s(n)},onDragOver:h,onDrop:function(e){return m(e,n)},children:(0,r.jsx)(o.$n,{fluid:!0,py:"0.25rem",color:"transparent",style:{animation:"none",transition:"none",cursor:"move"},icon:"grip-lines",children:e.replace(/^\w/,function(e){return e.toUpperCase()})})},n)})})})}},4087:function(e,n,t){"use strict";t.r(n),t.d(n,{ReactorMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),C=(t=Math).max.apply(t,[1].concat(function(e){if(Array.isArray(e))return s(e)}(n=_.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:500,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power Generation",children:(0,r.jsx)(i.z2,{value:x,minValue:0,maxValue:2e3,ranges:x<=1e4?{good:[400,1/0],average:[200,400],bad:[-1/0,200]}:{good:[-1/0,1/0]},children:(0,o.Mg)(x<1e4?x:x/1e3)+(x<1e4?" KW":" MW")})}),(0,r.jsx)(i.Ki.Item,{label:"Reactivity Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:u(g),minValue:0,maxValue:u(1e4),ranges:{teal:[-1/0,u(80)],good:[u(80),u(373)],average:[u(373),u(1e3)],bad:[u(1e3),1/0]},children:(0,o.Mg)(g)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:u(j),minValue:0,maxValue:u(5e4),ranges:{good:[u(1),u(1e3)],average:[-1/0,u(3e3)],bad:[u(3e3),1/0]},children:(0,o.Mg)(j)+" kPa"})}),(0,r.jsx)(i.Ki.Item,{label:"Control Rod Limiter",children:(0,r.jsx)(i.z2,{value:y,minValue:0,maxValue:100,ranges:{teal:[100,1/0],good:[70,99],average:[30,70],bad:[-1/0,30]},children:(0,o.Mg)(y)+" %"})})]}),(0,r.jsx)(i.wn,{title:"Desired Control Rod Limit",textAlign:"center",children:(0,r.jsx)(i.N6,{size:5,value:v,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:2,onChange:function(e,n){return f("set_throttle",{NGCR_throttle:n})}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:m?"Vent Open":"Vent Closed",selected:m,onClick:function(){return f("toggle_vent")}}),children:(0,r.jsx)(i.Ki,{children:_.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:C,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})})})]})})})}},1876:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentGrinder:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=t(6696),s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=n.config,s=t.operating,h=a.title;return(0,r.jsx)(l.p8,{width:400,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.Operating,{operating:s,name:h}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(f,{})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.inactive;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"mortar-pestle",disabled:l,tooltip:l?"There are no contents":"Grind the contents",tooltipPosition:"bottom",content:"Grind",onClick:function(){return t("grind")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"blender",disabled:l,tooltip:l?"There are no contents":"Juice the contents",tooltipPosition:"bottom",content:"Juice",onClick:function(){return t("juice")}})})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.contents,c=l.limit,s=l.count,u=l.inactive;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Contents",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",c," items"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Contents",onClick:function(){return t("eject")},disabled:u,tooltip:u?"There are no contents":""})]}),children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:a.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.beaker_loaded,s=l.beaker_current_volume,u=l.beaker_max_volume,d=l.beaker_contents;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Beaker",buttons:!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Detach Beaker",onClick:function(){return t("detach")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:d})})}},1569:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentsEditor:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9298),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.on;return(0,r.jsx)(l.p8,{width:300,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Receiver",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("recv_power")}})})}),(0,r.jsx)(a.Signaler,{data:c})]})})})}},5297:function(e,n,t){"use strict";t.r(n),t.d(n,{RequestConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){var e=(0,o.Oc)().data,n=e.screen,t=e.announcementConsole;return(0,r.jsx)(l.p8,{width:450,height:t?430:385,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:function(e){switch(e){case 0:return(0,r.jsx)(u,{});case 1:return(0,r.jsx)(d,{purpose:"ASSISTANCE"});case 2:return(0,r.jsx)(d,{purpose:"SUPPLIES"});case 3:return(0,r.jsx)(d,{purpose:"INFO"});case 4:return(0,r.jsx)(f,{type:"SUCCESS"});case 5:return(0,r.jsx)(f,{type:"FAIL"});case 6:return(0,r.jsx)(h,{type:"MESSAGES"});case 7:return(0,r.jsx)(m,{});case 8:return(0,r.jsx)(p,{});case 9:return(0,r.jsx)(x,{});case 10:return(0,r.jsx)(h,{type:"SHIPPING"});case 11:return(0,r.jsx)(g,{});default:return"WE SHOULDN'T BE HERE!"}}(n)})})})},c=function(e){var n=(0,o.Oc)().act,t=e.text,l=e.icon,a=e.screen;return(0,r.jsx)(i.$n,{fluid:!0,lineHeight:3,icon:l,onClick:function(){return n("setScreen",{setScreen:a})},children:t})},s=function(){var e=(0,o.Oc)().act;return(0,r.jsx)(i.$n,{icon:"arrow-left",onClick:function(){return e("setScreen",{setScreen:0})},children:"Back"})},u=function(){var e,n=(0,o.Oc)(),t=n.act,l=n.data,a=l.newmessagepriority,s=l.announcementConsole,u=l.silent;return e=3===a?(0,r.jsx)(i.Z8,{children:(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"NEW PRIORITY MESSAGES"})}):a>0?(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"There are new messages"}):(0,r.jsx)(i.az,{color:"label",mb:1,children:"There are no new messages"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,r.jsx)(i.$n,{width:9,selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return t("toggleSilent")},children:u?"Speaker Off":"Speaker On"}),children:[e,(0,r.jsx)(i.az,{children:(0,r.jsx)(c,{icon:a>0?"envelope-open-text":"envelope",screen:6,text:"View Messages"})}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"hand-paper",screen:1,text:"Request Assistance"}),(0,r.jsx)(c,{icon:"box",screen:2,text:"Request Supplies"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:11,text:"Request Secondary Goal"}),(0,r.jsx)(c,{icon:"comment",screen:3,text:"Relay Anonymous Information"})]}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"tag",screen:9,text:"Print Shipping Label"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:10,text:"View Shipping Logs"})]}),!!s&&(0,r.jsx)(i.az,{mt:1,children:(0,r.jsx)(c,{icon:"bullhorn",screen:8,text:"Send Station-Wide Announcement"})})]})})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.department,u=a.assist_dept,d=a.supply_dept,f=a.info_dept,h=[];switch(e.purpose){case"ASSISTANCE":h=u,n="Request assistance from another department";break;case"SUPPLIES":h=d,n="Request supplies from another department";break;case"INFO":h=f,n="Relay information to another department"}return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.Ki,{children:h.filter(function(e){return e!==c}).map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:[(0,r.jsx)(i.$n,{icon:"envelope",onClick:function(){return l("writeInput",{write:e,priority:2})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"exclamation-circle",onClick:function(){return l("writeInput",{write:e,priority:3})},children:"High Priority"})]},e)})})})})},f=function(e){var n;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Unable to contact messaging server"}return(0,r.jsx)(i.wn,{fill:!0,title:n,buttons:(0,r.jsx)(s,{})})},h=function(e){var n,t=(0,o.Oc)(),l=(t.act,t.data),a=l.message_log,c=l.shipping_log,u=[];switch(e.type){case"MESSAGES":u=a,n="Message Log";break;case"SHIPPING":u=c,n="Shipping label print log"}return u.reverse(),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:u.map(function(e,n){return(0,r.jsxs)(i.az,{textAlign:"left",children:[e.map(function(e,n){return(0,r.jsx)("div",{children:e},n)}),(0,r.jsx)("hr",{})]},n)})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.recipient,a=t.message,c=t.msgVerified,u=t.msgStamped;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,r.jsx)(s,{}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Recipient",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Message",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",color:"green",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Stamped by",color:"blue",children:u})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"envelope",onClick:function(){return n("department",{department:l})},children:"Send Message"})})})]})},p=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.message,a=t.announceAuth;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(i.$n,{icon:"edit",onClick:function(){return n("writeAnnouncement")},children:"Edit Message"})]}),children:l})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"bullhorn",disabled:!(a&&l),onClick:function(){return n("sendAnnouncement")},children:"Send Announcement"})]})})]})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.shipDest,a=t.msgVerified,c=t.ship_dept;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.wn,{title:"Print Shipping Label",buttons:(0,r.jsx)(s,{}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Destination",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",children:a})]}),(0,r.jsx)(i.$n,{fluid:!0,mt:1,textAlign:"center",icon:"print",disabled:!(l&&a),onClick:function(){return n("printLabel")},children:"Print Label"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Destinations",children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:(0,r.jsx)(i.$n,{selected:l===e,onClick:function(){return n("shipSelect",{shipSelect:e})},children:l===e?"Selected":"Select"})},e)})})})})]})},g=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.secondaryGoalAuth,a=t.secondaryGoalEnabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,r.jsx)(s,{})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?l?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"clipboard-list",disabled:!(l&&a),onClick:function(){return n("requestSecondaryGoal")},children:"Request Secondary Goal"})]})})]})}},4384:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>c,RndBackupConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.network_name,u=a.has_disk,d=a.disk_name,f=a.linked,h=a.techs,m=a.last_timestamp;return(0,r.jsx)(l.p8,{width:900,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Device Info",children:[(0,r.jsx)(i.az,{mb:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Current Network",children:f?(0,r.jsx)(i.$n,{content:s,icon:"unlink",selected:1,onClick:function(){return t("unlink")}}):"None"}),(0,r.jsx)(i.Ki.Item,{label:"Loaded Disk",children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:d+" (Last backup: "+m+")",icon:"save",selected:1,onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Save all",onClick:function(){return t("saveall2disk")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load all",onClick:function(){return t("saveall2network")}})]}):"None"})]})}),!!f||(0,r.jsx)(c,{})]}),(0,r.jsx)(i.az,{mt:2,children:(0,r.jsx)(i.wn,{title:"Tech Info",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Tech Name"}),(0,r.jsx)(i.XI.Cell,{children:"Network Level"}),(0,r.jsx)(i.XI.Cell,{children:"Disk Level"}),(0,r.jsx)(i.XI.Cell,{children:"Actions"})]}),Object.keys(h).map(function(e){return!(h[e].network_level>0||h[e].disk_level>0)||(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:h[e].name}),(0,r.jsx)(i.XI.Cell,{children:h[e].network_level||"None"}),(0,r.jsx)(i.XI.Cell,{children:h[e].disk_level||"None"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Load to network",disabled:!u||!f,onClick:function(){return t("savetech2network",{tech:e})}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load to disk",disabled:!u||!f,onClick:function(){return t("savetech2disk",{tech:e})}})]})]},e)})]})})})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})}},4080:function(e,n,t){"use strict";t.r(n),t.d(n,{AnalyzerMenu:()=>a});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.data,o=n.act,a=t.tech_levels,s=t.loaded_item,u=t.linked_analyzer,d=t.can_discover;return u?s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Object Analysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Deconstruct",icon:"microscope",onClick:function(){o("deconstruct")}}),(0,r.jsx)(i.$n,{content:"Eject",icon:"eject",onClick:function(){o("eject_item")}}),!d||(0,r.jsx)(i.$n,{content:"Discover",icon:"atom",onClick:function(){o("discover")}})]}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name})})}),(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{id:"research-levels",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Research Field"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Current Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Object Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"New Level"})]}),a.map(function(e){return(0,r.jsx)(c,{techLevel:e},e.id)})]})})]}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})},c=function(e){var n=e.techLevel,t=n.name,l=n.desc,a=n.level,c=n.object_level,s=n.ui_icon,u=null!=c,d=u&&c>=a?Math.max(c,a+1):a;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"circle-info",tooltip:l})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.In,{name:s})," ",t]}),(0,r.jsx)(i.XI.Cell,{children:a}),u?(0,r.jsx)(i.XI.Cell,{children:c}):(0,r.jsx)(i.XI.Cell,{className:"research-level-no-effect",children:"-"}),(0,r.jsx)(i.XI.Cell,{className:(0,o.Ly)([d!==a&&"upgraded-level"]),children:d})]})}},9529:function(e,n,t){"use strict";t.r(n),t.d(n,{DataDiskMenu:()=>d});var r=t(8138),i=t(7790),o=t(2864),l="tech",a=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;return a?(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:a.name}),(0,r.jsx)(i.Ki.Item,{label:"Level",children:a.level}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:a.desc})]}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_tech")}})})]}):null},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;if(!a)return null;var c=a.name,s=a.lathe_types,u=a.materials,d=s.join(", ");return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:c}),d?(0,r.jsx)(i.Ki.Item,{label:"Lathe Types",children:d}):null,(0,r.jsx)(i.Ki.Item,{label:"Required Materials"})]}),u.map(function(e){return(0,r.jsxs)(i.az,{children:["- ",(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:e.name})," x ",e.amount]},e.name)}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_design")}})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.disk_data;return(0,r.jsx)(i.wn,function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=function(e){var n=(0,o.Oc)(),t=n.data,a=n.act,c=t.category,s=t.matching_designs,u=4===t.menu?"build":"imprint";return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,height:36,title:c,children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(i.XI,{className:"RndConsole__LatheCategory__MatchingDesigns",children:s.map(function(e){var n=e.id,t=e.name,o=e.can_build,l=e.materials;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"print",content:t,disabled:o<1,onClick:function(){return a(u,{id:n,amount:1})}})}),(0,r.jsx)(i.XI.Cell,{children:o>=5?(0,r.jsx)(i.$n,{content:"x5",onClick:function(){return a(u,{id:n,amount:5})}}):null}),(0,r.jsx)(i.XI.Cell,{children:o>=10?(0,r.jsx)(i.$n,{content:"x10",onClick:function(){return a(u,{id:n,amount:10})}}):null}),(0,r.jsx)(i.XI.Cell,{children:l.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[" | ",(0,r.jsxs)("span",{className:e.is_red?"color-red":null,children:[e.amount," ",e.name]})]})})})]},n)})})]})}},4154:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheChemicalStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_chemicals,c=4===t.menu;return(0,r.jsxs)(i.wn,{title:"Chemical Storage",children:[(0,r.jsx)(i.$n,{content:"Purge All",icon:"trash",onClick:function(){l(c?"disposeallP":"disposeallI")}}),(0,r.jsx)(i.Ki,{children:a.map(function(e){var n=e.volume,t=e.name,o=e.id;return(0,r.jsx)(i.Ki.Item,{label:"* ".concat(n," of ").concat(t),children:(0,r.jsx)(i.$n,{content:"Purge",icon:"trash",onClick:function(){l(c?"disposeP":"disposeI",{id:o})}})},o)})})]})}},8563:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMainMenu:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=t(6013),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.act,s=t.menu,u=t.categories;return(0,r.jsxs)(i.wn,{title:(4===s?"Protolathe":"Circuit Imprinter")+" Menu",children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(a.LatheSearch,{}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(i.so,{wrap:"wrap",children:u.map(function(e){return(0,r.jsx)(i.so,{style:{flexBasis:"50%",marginBottom:"6px"},children:(0,r.jsx)(i.$n,{icon:"arrow-right",content:e,onClick:function(){c("setCategory",{category:e})}})},e)})})]})}},7635:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterialStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_materials;return(0,r.jsx)(i.wn,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,r.jsx)(i.XI,{children:a.map(function(e){var n=e.id,o=e.amount,a=e.name,c=function(e){l(4===t.menu?"lathe_ejectsheet":"imprinter_ejectsheet",{id:n,amount:e})},s=Math.floor(o/2e3),u=o<1;return(0,r.jsxs)(i.XI.Row,{className:u?"color-grey":"color-yellow",children:[(0,r.jsxs)(i.XI.Cell,{minWidth:"210px",children:["* ",o," of ",a]}),(0,r.jsxs)(i.XI.Cell,{minWidth:"110px",children:["(",s," sheet",1===s?"":"s",")"]}),(0,r.jsx)(i.XI.Cell,{children:o>=2e3?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"1x",icon:"eject",onClick:function(){return c(1)}}),(0,r.jsx)(i.$n,{content:"C",icon:"eject",onClick:function(){return c("custom")}}),o>=1e4?(0,r.jsx)(i.$n,{content:"5x",icon:"eject",onClick:function(){return c(5)}}):null,(0,r.jsx)(i.$n,{content:"All",icon:"eject",onClick:function(){return c(50)}})]}):null})]},n)})})})}},5887:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterials:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().data,t=n.total_materials,l=n.max_materials,a=n.max_chemicals,c=n.total_chemicals;return(0,r.jsx)(i.az,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,r.jsxs)(i.XI,{width:"auto",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Material Amount:"}),(0,r.jsx)(i.XI.Cell,{children:t}),l?(0,r.jsx)(i.XI.Cell,{children:" / "+l}):null]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Chemical Amount:"}),(0,r.jsx)(i.XI.Cell,{children:c}),a?(0,r.jsx)(i.XI.Cell,{children:" / "+a}):null]})]})})}},9760:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMenu:()=>p});var r=t(8138),i=t(7790),o=t(2864),l=t(2247),a=t(1465),c=t(4154),s=t(8563),u=t(7635);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.pd,{placeholder:"Search...",onEnter:function(e){return n("search",{to_search:e})}})})}},7726:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.controllers;return(0,r.jsx)(l.p8,{width:800,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})}},3321:function(e,n,t){"use strict";t.r(n),t.d(n,{SettingsMenu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(a,{}),(0,r.jsx)(c,{})]})},a=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;l.sync;var a=l.admin;return(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.so,{direction:"column",align:"flex-start",children:[(0,r.jsx)(i.$n,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){t("unlink")}}),1===a?(0,r.jsx)(i.$n,{icon:"gears",color:"red",content:"[ADMIN] Maximize research levels",onClick:function(){return t("maxresearch")}}):null]})})},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.linked_analyzer,c=t.linked_lathe,s=t.linked_imprinter;return(0,r.jsx)(i.wn,{title:"Linked Devices",buttons:(0,r.jsx)(i.$n,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return l("find_device")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scientific Analyzer",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!a,content:a?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"analyze"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Protolathe",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!c,content:c?"Unlink":"Undetected",onClick:function(){l("disconnect",{item:"lathe"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Circuit Imprinter",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!s,content:s?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"imprinter"})}})})]})})}},2247:function(e,n,t){"use strict";t.r(n),t.d(n,{MENU:()=>h,PRINTER_MENU:()=>m,RndConsole:()=>g});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4080),c=t(9529),s=t(9760),u=t(7726),d=t(3321),f=i.tU.Tab,h={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},m={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},p=function(e){switch(e){case h.MAIN:return(0,r.jsx)(b,{});case h.DISK:return(0,r.jsx)(c.DataDiskMenu,{});case h.ANALYZE:return(0,r.jsx)(a.AnalyzerMenu,{});case h.LATHE:case h.IMPRINTER:return(0,r.jsx)(s.LatheMenu,{});case h.SETTINGS:return(0,r.jsx)(d.SettingsMenu,{});default:return"UNKNOWN MENU"}},x=function(e){var n=(0,o.Oc)(),t=n.act,i=n.data.menu,l=e.menu,a=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nd});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t-1});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Network Configuration",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Network Name",children:(0,r.jsx)(o.$n,{content:h||"Unset",selected:h,icon:"edit",onClick:function(){return t("network_name")}})}),(0,r.jsx)(o.Ki.Item,{label:"Network Password",children:(0,r.jsx)(o.$n,{content:f||"Unset",selected:f,icon:"lock",onClick:function(){return t("network_password")}})})]})}),(0,r.jsxs)(o.wn,{title:"Connected Devices",children:[(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:"ALL"===s,onClick:function(){return d("ALL")},icon:"network-wired",children:"All Devices"},"AllDevices"),(0,r.jsx)(o.tU.Tab,{selected:"SRV"===s,onClick:function(){return d("SRV")},icon:"server",children:"R&D Servers"},"RNDServers"),(0,r.jsx)(o.tU.Tab,{selected:"RDC"===s,onClick:function(){return d("RDC")},icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,r.jsx)(o.tU.Tab,{selected:"MFB"===s,onClick:function(){return d("MFB")},icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,r.jsx)(o.tU.Tab,{selected:"MSC"===s,onClick:function(){return d("MSC")},icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Device Name"}),(0,r.jsx)(o.XI.Cell,{children:"Device ID"}),(0,r.jsx)(o.XI.Cell,{children:"Unlink"})]}),x.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink_device",{dclass:e.dclass,uid:e.id})}})})]},e.id)})]})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.designs,s=u((0,i.useState)(""),2),d=s[0],f=s[1];return(0,r.jsxs)(o.wn,{title:"Design Management",children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for designs",mb:2,onChange:function(e){return f(e)}}),c.filter((0,l.XZ)(d,function(e){return e.name})).map(function(e){return(0,r.jsx)(o.$n.Checkbox,{fluid:!0,content:e.name,checked:!e.blacklisted,onClick:function(){return t(e.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:e.uid})}},e.name)})]})}},5156:function(e,n,t){"use strict";t.r(n),t.d(n,{RndServer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.active,d=a.network_name;return(0,r.jsx)(l.p8,{width:600,height:500,resizable:!0,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Server Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine power",children:(0,r.jsx)(i.$n,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link status",children:null===d?(0,r.jsx)(i.az,{color:"red",children:"Unlinked"}):(0,r.jsx)(i.az,{color:"green",children:"Linked"})})]})}),null===d?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.network_name;return(0,r.jsx)(i.wn,{title:"Network Info",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected network ID",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.netname}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},7868:function(e,n,t){"use strict";t.r(n),t.d(n,{RobotSelfDiagnosis:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e,n){var t=e/n;return t<=.2?"good":t<=.5?"average":"bad"},s=function(e){var n=(0,l.Oc)().data.component_data;return(0,r.jsx)(a.p8,{width:280,height:480,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:n.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),children:e.installed<=0?(0,r.jsx)(i.IC,{m:-.5,height:3.5,color:"red",style:{fontStyle:"normal"},children:(0,r.jsx)(i.so,{height:"100%",children:(0,r.jsx)(i.so.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{width:"72%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",color:c(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",color:c(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,r.jsx)(i.Ki.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},n)})})})}},1696:function(e,n,t){"use strict";t.r(n),t.d(n,{RoboticsControlConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.can_hack,u=a.safety,d=a.show_lock_all,f=a.cyborgs;return(0,r.jsx)(l.p8,{width:500,height:460,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!d&&(0,r.jsxs)(i.wn,{title:"Emergency Lock Down",children:[(0,r.jsx)(i.$n,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){return t("arm",{})}}),(0,r.jsx)(i.$n,{icon:"lock",disabled:u,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return t("masslock",{})}})]}),(0,r.jsx)(c,{cyborgs:void 0===f?[]:f,can_hack:s})]})})},c=function(e){var n=e.cyborgs;e.can_hack;var t=(0,o.Oc)(),l=t.act,a=t.data,c="Detonate";return(a.detonate_cooldown>0&&(c+=" ("+a.detonate_cooldown+"s)"),n.length)?n.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[!!e.hackable&&!e.emagged&&(0,r.jsx)(i.$n,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return l("hackbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!a.auth,onClick:function(){return l("stopbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"bomb",content:c,disabled:!a.auth||a.detonate_cooldown>0,color:"bad",onClick:function(){return l("killbot",{uid:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.az,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,r.jsx)(i.az,{children:e.locstring})}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:(0,r.jsx)(i.z2,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Capacity",children:(0,r.jsx)(i.az,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})]})||(0,r.jsx)(i.Ki.Item,{label:"Cell",children:(0,r.jsx)(i.az,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,r.jsx)(i.Ki.Item,{label:"Safeties",children:(0,r.jsx)(i.az,{color:"bad",children:"DISABLED"})}),(0,r.jsx)(i.Ki.Item,{label:"Module",children:e.module}),(0,r.jsx)(i.Ki.Item,{label:"Master AI",children:(0,r.jsx)(i.az,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)}):(0,r.jsx)(i.IC,{children:"No cyborg units detected within access parameters."})}},5826:function(e,n,t){"use strict";t.r(n),t.d(n,{Safe:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=(n.act,n.data),i=t.dial,c=t.open;return t.locked,t.contents,(0,r.jsx)(a.p8,{theme:"safe",width:600,height:800,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsxs)(o.az,{className:"Safe--engraving",children:[(0,r.jsx)(s,{}),(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"25%"}),(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,r.jsx)(o.In,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,r.jsx)("br",{}),c?(0,r.jsx)(u,{}):(0,r.jsx)(o.az,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*i+"deg)",zIndex:0}})]}),!c&&(0,r.jsx)(d,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.dial,c=i.open,s=i.locked,u=function(e,n){return(0,r.jsx)(o.$n,{disabled:c||n&&!s,icon:"arrow-"+(n?"right":"left"),content:(n?"Right":"Left")+" "+e,iconRight:n,onClick:function(){return t(n?"turnleft":"turnright",{num:e})},style:{zIndex:10}})};return(0,r.jsxs)(o.az,{className:"Safe--dialer",children:[(0,r.jsx)(o.$n,{disabled:s,icon:c?"lock":"lock-open",content:c?"Close":"Open",mb:"0.5rem",onClick:function(){return t("open")}}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{position:"absolute",children:[u(50),u(10),u(1)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[u(1,!0),u(10,!0),u(50,!0)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--number",children:a})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.contents;return(0,r.jsx)(o.az,{className:"Safe--contents",overflow:"auto",children:a.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsxs)(o.$n,{mb:"0.5rem",onClick:function(){return t("retrieve",{index:n+1})},children:[(0,r.jsx)(o.az,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,r.jsx)("br",{})]},e)})})},d=function(e){return(0,r.jsxs)(o.wn,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,r.jsxs)(o.az,{children:["1. Turn the dial left to the first number.",(0,r.jsx)("br",{}),"2. Turn the dial right to the second number.",(0,r.jsx)("br",{}),"3. Continue repeating this process for each number, switching between left and right each time.",(0,r.jsx)("br",{}),"4. Open the safe."]}),(0,r.jsx)(o.az,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},1892:function(e,n,t){"use strict";t.r(n),t.d(n,{SatelliteControl:()=>u,SatelliteControlFooter:()=>h,SatelliteControlMapView:()=>f,SatelliteControlSatellitesList:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=d?"good":"average",value:u,maxValue:100,children:[u,"%"]})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{content:"Check coverage",disabled:f,onClick:function(){return t("begin_test")}})})]})})}),(0,r.jsx)(o.BJ.Item,{color:c,children:a})]})}},7943:function(e,n,t){"use strict";t.r(n),t.d(n,{SecureStorage:()=>s});var r=t(8138),i=t(7790),o=t(7686),l=t(5490),a=t(2864),c=t(3384),s=function(e){return(0,r.jsx)(c.p8,{theme:"securestorage",height:500,width:280,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})})})})})},u=function(e){var n=(0,a.Oc)().act,t=window.event?e.which:e.keyCode;if(t===o.Ri){e.preventDefault(),n("keypad",{digit:"E"});return}if(t===o.s6){e.preventDefault(),n("keypad",{digit:"C"});return}if(t===o.ye){e.preventDefault(),n("backspace");return}if(t>=o.Pm&&t<=o.Wy){e.preventDefault(),n("keypad",{digit:t-o.Pm});return}if(t>=o.hr&&t<=o.C){e.preventDefault(),n("keypad",{digit:t-o.hr});return}},d=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),o=t.locked,c=t.no_passcode,s=t.emagged,d=t.user_entered_code;return(0,r.jsx)(i.wn,{fill:!0,className:"SecureStorage",onKeyDown:function(e){return u(e)},children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:7.3,children:(0,r.jsx)(i.az,{className:(0,l.Ly)(["SecureStorage__displayBox","SecureStorage__displayBox--"+(c?"":o?"bad":"good")]),height:"100%",children:s?"ERROR":d})}),(0,r.jsx)(i.BJ.Item,{align:"center",children:(0,r.jsx)(i.XI,{collapsing:!0,children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map(function(e){return(0,r.jsx)(i.XI.Row,{children:e.map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(f,{number:e})},e)})},e[0])})})})]})})},f=function(e){var n=(0,a.Oc)(),t=n.act;n.data;var o=e.number;return(0,r.jsx)(i.$n,{bold:!0,fluid:!0,textAlign:"center",fontSize:"55px",lineHeight:1.25,width:"80px",className:(0,l.Ly)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+o]),onClick:function(){return t("keypad",{digit:o})},children:o})}},8589:function(e,n,t){"use strict";t.r(n),t.d(n,{SecurityRecords:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=n},r=function(e,n){return e<=n},i=e.split(" "),o=[],l=!0,a=!1,c=void 0;try{for(var s,u=i[Symbol.iterator]();!(l=(s=u.next()).done);l=!0){var d=function(){var e=s.value.split(":");if(0===e.length)return"continue";if(1===e.length)return o.push(function(n){return(n.name+" ("+n.variant+")").toLocaleLowerCase().includes(e[0].toLocaleLowerCase())}),"continue";if(e.length>2)return{v:function(e){return!1}};var i=void 0,l=n;if("-"===e[1][e[1].length-1]?(l=r,i=Number(e[1].substring(0,e[1].length-1))):"+"===e[1][e[1].length-1]?(l=t,i=Number(e[1].substring(0,e[1].length-1))):i=Number(e[1]),isNaN(i))return{v:function(e){return!1}};switch(e[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":o.push(function(e){return l(e.lifespan,i)});break;case"e":case"end":case"endurance":o.push(function(e){return l(e.endurance,i)});break;case"m":case"mat":case"maturation":o.push(function(e){return l(e.maturation,i)});break;case"pr":case"prod":case"production":o.push(function(e){return l(e.production,i)});break;case"y":case"yield":o.push(function(e){return l(e.yield,i)});break;case"po":case"pot":case"potency":o.push(function(e){return l(e.potency,i)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":o.push(function(e){return l(e.amount,i)});break;default:return{v:function(e){return!1}}}}();if("object"==(d&&"undefined"!=typeof Symbol&&d.constructor===Symbol?"symbol":typeof d))return d.v}}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return function(e){var n=!0,t=!1,r=void 0;try{for(var i,l=o[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)if(!(0,i.value)(e))return!1}catch(e){t=!0,r=e}finally{try{n||null==l.return||l.return()}finally{if(t)throw r}}return!0}},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=(0,i.useContext)(d),s=c.searchTextState,f=c.vendAmountState,m=c.sortIdState,x=c.sortOrderState,g=u(s,2),j=g[0];g[1];var b=u(f,2),y=b[0];b[1];var v=u(m,2),w=v[0];v[1];var k=u(x,2),_=k[0];k[1];var C=a.icons,I=a.seeds;return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(o.XI,{className:"SeedExtractor__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(p,{id:"name",children:"Name"}),(0,r.jsx)(p,{id:"lifespan",children:"Lifespan"}),(0,r.jsx)(p,{id:"endurance",children:"Endurance"}),(0,r.jsx)(p,{id:"maturation",children:"Maturation"}),(0,r.jsx)(p,{id:"production",children:"Production"}),(0,r.jsx)(p,{id:"yield",children:"Yield"}),(0,r.jsx)(p,{id:"potency",children:"Potency"}),(0,r.jsx)(p,{id:"amount",children:"Stock"})]}),0===I.length?"No seeds present.":I.filter(h(j)).sort(function(e,n){var t=_?1:-1;return"number"==typeof e[w]?(e[w]-n[w])*t:e[w].localeCompare(n[w])*t}).map(function(e){return(0,r.jsxs)(o.XI.Row,{onClick:function(){return t("vend",{seed_id:e.id,seed_variant:e.variant,vend_amount:y})},children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(C[e.image]),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),e.name]}),(0,r.jsx)(o.XI.Cell,{children:e.lifespan}),(0,r.jsx)(o.XI.Cell,{children:e.endurance}),(0,r.jsx)(o.XI.Cell,{children:e.maturation}),(0,r.jsx)(o.XI.Cell,{children:e.production}),(0,r.jsx)(o.XI.Cell,{children:e.yield}),(0,r.jsx)(o.XI.Cell,{children:e.potency}),(0,r.jsx)(o.XI.Cell,{children:e.amount})]},e.id)})]})})})},p=function(e){var n=(0,i.useContext)(d),t=n.sortIdState,l=n.sortOrderState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1],p=e.id,x=e.children;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:c!==p&&"transparent",fluid:!0,onClick:function(){c===p?m(!h):(s(p),m(!0))},children:[x,c===p&&(0,r.jsx)(o.In,{name:h?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e){var n=(0,i.useContext)(d),t=n.searchTextState,l=n.vendAmountState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1];return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{placeholder:"Search by name, variant, potency:70+, production:3-, ...",fluid:!0,onChange:function(e){return s(e)},value:c})}),(0,r.jsxs)(o.BJ.Item,{children:["Vend amount:",(0,r.jsx)(o.pd,{placeholder:"1",onChange:function(e){return m(Number(e)>=1?Number(e):1)},value:"".concat(h)})]})]})}},631:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:350,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:a.status?a.status:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Missing"})}),!!a.shuttle&&(!!a.docking_ports_len&&(0,r.jsx)(i.Ki.Item,{label:"Send to ",children:a.docking_ports.map(function(e){return(0,r.jsx)(i.$n,{icon:"chevron-right",content:e.name,onClick:function(){return t("move",{move:e.id})}},e.name)})})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Locked"})}),!!a.admin_controlled&&(0,r.jsx)(i.Ki.Item,{label:"Authorization",children:(0,r.jsx)(i.$n,{icon:"exclamation-circle",content:"Request Authorization",disabled:!a.status,onClick:function(){return t("request")}})})]}))]})})})})}},5060:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleManipulator:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)();return 0===(n.act,n.data).active?(0,r.jsx)(s,{}):(0,r.jsx)(u,{})},s=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.singularities;return(0,r.jsx)(a.p8,{width:450,height:185,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Detected Singularities",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Refresh",onClick:function(){return t("refresh")}}),children:(0,r.jsx)(i.XI,{children:(void 0===c?[]:c).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.singularity_id+". "+e.area_name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,width:"120px",children:(0,r.jsx)(i.z2,{value:e.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(e.stage)})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.$n,{content:"Details",onClick:function(){return t("view",{view:e.singularity_id})}})})]},e.singularity_id)})})})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.active;var s=c.singulo_stage,u=c.singulo_potential_stage,d=c.singulo_energy,f=c.singulo_high,h=c.singulo_low,m=c.generators;return(0,r.jsx)(a.p8,{width:550,height:185,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Stage",children:(0,r.jsx)(i.z2,{value:s,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(s)})}),(0,r.jsx)(i.Ki.Item,{label:"Potential Stage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:6,ranges:{good:[1,s+.5],average:[s+.5,s+1.5],bad:[s+1.5,s+2]},children:(0,o.Mg)(u)})}),(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsx)(i.z2,{value:d,minValue:h,maxValue:f,ranges:{good:[.67*f+.33*h,f],average:[.33*f+.67*h,.67*f+.33*h],bad:[h,.33*f+.67*h]},children:(0,o.Mg)(d)+"MJ"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return t("back")}}),children:(0,r.jsx)(i.Ki,{children:(void 0===m?[]:m).map(function(e){return(0,r.jsx)(i.Ki.Item,{label:"Remaining Charge",children:(0,r.jsx)(i.z2,{value:e.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.Mg)(e.charge)})},e.gen_index)})})})})]})})})}},1495:function(e,n,t){"use strict";t.r(n),t.d(n,{Sleeper:()=>f});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,1/0]},d=["bad","average","average","good","average","average","bad"],f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).hasOccupant?(0,r.jsx)(h,{}):(0,r.jsx)(j,{});return(0,r.jsx)(a.p8,{width:550,height:760,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:t}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(x,{})})]})})})},h=function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{}),(0,r.jsx)(p,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.occupant,u=a.auto_eject_dead;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Auto-eject if dead:\xa0"}),(0,r.jsx)(i.$n,{icon:u?"toggle-on":"toggle-off",selected:u,content:u?"On":"Off",onClick:function(){return t("auto_eject_dead_"+(u?"off":"on"))}}),(0,r.jsx)(i.$n,{icon:"user-slash",content:"Eject",onClick:function(){return t("ejectify")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:s.maxHealth,value:s.health,ranges:{good:[.5*s.maxHealth,1/0],average:[0,.5*s.maxHealth],bad:[-1/0,0]},children:(0,o.LI)(s.health,0)})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[s.stat][0],children:c[s.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.maxTemp,value:s.bodyTemperature,color:d[s.temperatureSuitability+3],children:[(0,o.LI)(s.btCelsius,0),"\xb0C, ",(0,o.LI)(s.btFaren,0),"\xb0F"]})}),!!s.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.bloodMax,value:s.bloodLevel,ranges:{bad:[-1/0,.6*s.bloodMax],average:[.6*s.bloodMax,.9*s.bloodMax],good:[.9*s.bloodMax,1/0]},children:[s.bloodPercent,"%, ",s.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",verticalAlign:"middle",children:[s.pulse," BPM"]})]})]})})},p=function(e){var n=(0,l.Oc)().data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant Damage",children:(0,r.jsx)(i.Ki,{children:s.map(function(e,t){var l=n[e[1]],a="number"==typeof l?l:0;return(0,r.jsx)(i.Ki.Item,{label:e[0],children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:a,ranges:u,children:(0,o.LI)(a,0)},t)},t)})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.hasOccupant,c=o.isBeakerLoaded,s=o.beakerMaxSpace,u=o.beakerFreeSpace,d=o.dialysis&&u>0;return(0,r.jsx)(i.wn,{title:"Dialysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!c||u<=0||!a,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Active":"Inactive",onClick:function(){return t("togglefilter")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"eject",content:"Eject",onClick:function(){return t("removebeaker")}})]}),children:c?(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Space",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:u,ranges:{good:[.5*s,1/0],average:[.25*s,.5*s],bad:[-1/0,.25*s]},children:[u,"u"]})})}):(0,r.jsx)(i.az,{color:"label",children:"No beaker loaded."})})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.occupant,c=o.chemicals,s=o.maxchem,u=o.amounts;return(0,r.jsx)(i.wn,{title:"Occupant Chemicals",children:c.map(function(e,n){var o,l="";return e.overdosing?(l="bad",o=(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(l="average",o=(0,r.jsxs)(i.az,{color:"average",children:[(0,r.jsx)(i.In,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsx)(i.wn,{title:e.title,buttons:o,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:e.occ_amount,color:l,mr:"0.5rem",children:[e.pretty_amount,"/",s,"u"]}),u.map(function(n,o){return(0,r.jsx)(i.$n,{disabled:!e.injectable||e.occ_amount+n>s||2===a.stat,icon:"syringe",content:"Inject ".concat(n,"u"),mb:"0",height:"19px",onClick:function(){return t("chemical",{chemid:e.id,amount:n})}},o)})]})})},n)})})},j=function(e){return(0,r.jsx)(i.wn,{fill:!0,textAlign:"center",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},6526:function(e,n,t){"use strict";t.r(n),t.d(n,{SlotMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return null===c.money?(0,r.jsx)(l.p8,{width:350,height:90,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:"Could not scan your card or could not find account!"}),(0,r.jsx)(i.az,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===c.plays?c.plays+" player has tried their luck today!":c.plays+" players have tried their luck today!",(0,r.jsx)(l.p8,{width:300,height:151,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{lineHeight:2,children:n}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Credits Remaining",children:(0,r.jsx)(i.zv,{value:c.money})}),(0,r.jsx)(i.Ki.Item,{label:"10 credits to spin",children:(0,r.jsx)(i.$n,{icon:"coins",disabled:c.working,content:c.working?"Spinning...":"Spin",onClick:function(){return a("spin")}})})]}),(0,r.jsx)(i.az,{bold:!0,lineHeight:2,color:c.resultlvl,children:c.result})]})})}))}},1645:function(e,n,t){"use strict";t.r(n),t.d(n,{Smartfridge:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.secure,s=a.can_dry,u=a.drying,d=a.contents;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(i.IC,{children:"Secure Access: Please have your identification ready."}),(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s?"Drying rack":"Contents",buttons:!!s&&(0,r.jsx)(i.$n,{width:4,icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return t("drying")}}),children:[!d&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"cookie-bite",size:5,color:"brown"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No products loaded."]})}),!!d&&d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:"55%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,r.jsxs)(i.BJ.Item,{width:13,children:[(0,r.jsx)(i.$n,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return t("vend",{index:e.vend,amount:1})}}),(0,r.jsx)(i.Q7,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(n){return t("vend",{index:e.vend,amount:n})}}),(0,r.jsx)(i.$n,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){return t("vend",{index:e.vend,amount:e.quantity})}})]})]},e)})]})]})})})}},1399:function(e,n,t){"use strict";t.r(n),t.d(n,{Smes:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.capacityPercent,u=(c.capacity,c.charge),d=c.inputAttempt,f=c.inputting,h=c.inputLevel,m=c.inputLevelMax,p=c.inputAvailable,x=c.outputPowernet,g=c.outputAttempt,j=c.outputting,b=c.outputLevel,y=c.outputLevelMax,v=c.outputUsed,w=s>=100&&"good"||f&&"average"||"bad";return(0,r.jsx)(a.p8,{width:340,height:360,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stored Energy",children:(0,r.jsx)(i.z2,{value:.01*s,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,r.jsx)(i.wn,{title:"Input",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Charge Mode",buttons:(0,r.jsx)(i.$n,{icon:d?"sync-alt":"times",selected:d,onClick:function(){return t("tryinput")},children:d?"Auto":"Off"}),children:(0,r.jsx)(i.az,{color:w,children:s>=100&&"Fully Charged"||f&&"Charging"||"Not Charging"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Input",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===h,onClick:function(){return t("input",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===h,onClick:function(){return t("input",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:h/1e3,fillValue:p/1e3,minValue:0,maxValue:m/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("input",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:h===m,onClick:function(){return t("input",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:h===m,onClick:function(){return t("input",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Available",children:(0,o.d5)(p)})]})}),(0,r.jsx)(i.wn,{fill:!0,title:"Output",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Output Mode",buttons:(0,r.jsx)(i.$n,{icon:g?"power-off":"times",selected:g,onClick:function(){return t("tryoutput")},children:g?"On":"Off"}),children:(0,r.jsx)(i.az,{color:j&&"good"||u>0&&"average"||"bad",children:x?j?"Sending":u>0?"Not Sending":"No Charge":"Not Connected"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Output",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===b,onClick:function(){return t("output",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===b,onClick:function(){return t("output",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:b/1e3,minValue:0,maxValue:y/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("output",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:b===y,onClick:function(){return t("output",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:b===y,onClick:function(){return t("output",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Outputting",children:(0,o.d5)(v)})]})})]})})})}},1343:function(e,n,t){"use strict";t.r(n),t.d(n,{SolarControl:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.generated,u=c.generated_ratio,d=c.tracking_state,f=c.tracking_rate,h=c.connected_panels,m=c.connected_tracker,p=c.cdir,x=c.direction,g=c.rotating_direction;return(0,r.jsx)(a.p8,{width:490,height:277,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Scan for new hardware",onClick:function(){return t("refresh")}}),children:(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Solar tracker",color:m?"good":"bad",children:m?"OK":"N/A"}),(0,r.jsx)(i.Ki.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(0,r.jsx)(l.xA.Column,{size:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power output",children:(0,r.jsx)(i.z2,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:u,children:s+" W"})}),(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[p,"\xb0 (",x,")"]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[2===d&&(0,r.jsx)(i.az,{children:" Automated "}),1===d&&(0,r.jsxs)(i.az,{children:[" ",f,"\xb0/h (",g,")"," "]}),0===d&&(0,r.jsx)(i.az,{children:" Tracker offline "})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[2!==d&&(0,r.jsx)(i.Q7,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onChange:function(e){return t("cdir",{cdir:e})}}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker status",children:[(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:0===d,onClick:function(){return t("track",{track:0})}}),(0,r.jsx)(i.$n,{icon:"clock-o",content:"Timed",selected:1===d,onClick:function(){return t("track",{track:1})}}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:2===d,disabled:!m,onClick:function(){return t("track",{track:2})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[1===d&&(0,r.jsx)(i.Q7,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:f,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onChange:function(e){return t("tdir",{tdir:e})}}),0===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Tracker offline "}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},4263:function(e,n,t){"use strict";t.r(n),t.d(n,{SpawnersMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.spawners||[];return(0,r.jsx)(l.p8,{width:700,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{children:a.map(function(e){return(0,r.jsxs)(i.wn,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return t("jump",{ID:e.uids})}}),(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return t("spawn",{ID:e.uids})}})]}),children:[(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)})})})})}},8729:function(e,n,t){"use strict";t.r(n),t.d(n,{SpecMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return(0,r.jsx)(l.p8,{width:1100,height:600,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("hemomancer")}}),children:[(0,r.jsx)("h3",{children:"Focuses on blood magic and the manipulation of blood around you."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Vampiric claws"}),": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood Barrier"}),": Unlocked at 250 blood, allows you to select two turfs and create a wall between them."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood tendrils"}),": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Sanguine pool"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Predator senses"}),": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood eruption"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"The blood bringers rite"}),": 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."]})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("umbrae")}}),children:[(0,r.jsx)("h3",{children:"Focuses on darkness, stealth ambushing and mobility."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Cloak of darkness"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow anchor"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow snare"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Dark passage"}),": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Extinguish"}),": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms."]}),(0,r.jsx)("b",{children:"Shadow boxing"}),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Eternal darkness"}),": 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."]}),(0,r.jsx)("p",{children:"In addition, you also gain permanent X-ray vision."})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("gargantua")}}),children:[(0,r.jsx)("h3",{children:"Focuses on tenacity and melee damage."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rejuvenate"}),": Will heal you at an increased rate based on how much damage you have taken."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell"}),": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Seismic stomp"}),": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood rush"}),": Unlocked at 250 blood, gives you a short speed boost when cast."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell II"}),": Unlocked at 400 blood, increases all melee damage by 10."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Overwhelming force"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Demonic grasp"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Charge"}),": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Desecrated Duel"}),": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages."]})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("dantalion")}}),children:[(0,r.jsx)("h3",{children:"Focuses on thralling and illusions."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Enthrall"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall cap"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall commune"}),": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Subspace swap"}),": Unlocked at 250 blood, allows you to swap positions with a target."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Pacify"}),": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Decoy"}),": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rally thralls"}),": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood bond"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Mass Hysteria"}),": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals."]})]})})}},9469:function(e,n,t){"use strict";t.r(n),t.d(n,{StackCraft:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:e*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:e})}}))}()}catch(e){u=!0,d=e}finally{try{s||null==h.return||h.return()}finally{if(u)throw d}}return -1===l.indexOf(i)&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:i*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:i})}})),(0,r.jsx)(r.Fragment,{children:c.map(function(e){return e})})},x=function(e){return Object.entries(e.recipes).map(function(e){var n=u(e,2),t=n[0],i=n[1];return m(i)?(0,r.jsx)(o.Nt,{title:t,child_mt:0,childStyles:{padding:"0.5em",backgroundColor:"rgba(62, 97, 137, 0.15)",border:"1px solid rgba(255, 255, 255, 0.1)",borderTop:"none",borderRadius:"0 0 0.33em 0.33em"},children:(0,r.jsx)(o.az,{p:1,pb:.25,children:(0,r.jsx)(x,{recipes:i})})},t):(0,r.jsx)(g,{title:t,recipe:i},t)})},g=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.amount,l=e.title,c=e.recipe,s=c.result_amount,u=c.required_amount,d=c.max_result_amount,f=c.uid,h=c.icon,m=c.icon_state,x=c.image,g="".concat(s>1?"".concat(s,"x "):"").concat(l),j="".concat(u," sheet").concat(u>1?"s":""),b=c.required_amount>i?0:Math.floor(i/c.required_amount);return(0,r.jsx)(o.c_,{fluid:!0,base64:x,dmIcon:h,dmIconState:m,imageSize:32,disabled:!b,tooltip:j,buttons:d>1&&b>1&&(0,r.jsx)(p,{recipe:c,max_possible_multiplier:b}),onClick:function(){return t("make",{recipe_uid:f,multiplier:1})},children:g})}},5592:function(e,n,t){"use strict";t.r(n),t.d(n,{StationAlertConsole:()=>a,StationAlertConsoleContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){return(0,r.jsx)(l.p8,{width:325,height:500,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().data.alarms||[],t=n.Fire||[],l=n.Atmosphere||[],a=n.Power||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Fire Alarms",children:(0,r.jsxs)("ul",{children:[0===t.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),t.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Atmospherics Alarms",children:(0,r.jsxs)("ul",{children:[0===l.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),l.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Power Alarms",children:(0,r.jsxs)("ul",{children:[0===a.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),a.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})})]})}},5651:function(e,n,t){"use strict";t.r(n),t.d(n,{StationTraitsPanel:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:f.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n,{color:"red",icon:"times",onClick:function(){t("setup_future_traits",{station_traits:(0,i.pb)((0,i.Tj)(f,function(e){return e.path}),function(n){return n!==e.path})})},children:"Delete"})})]})},e.path)})}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No station traits will run next round."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){return t("clear_future_traits")},children:"Run Station Traits Normally"})]}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No future station traits are planned."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){return t("setup_future_traits",{station_traits:[]})},children:"Prevent station traits from running next round"})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data;return i.current_traits.length>0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:i.current_traits.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n.Confirm,{content:"Revert",color:"red",disabled:i.too_late_to_revert||!e.can_revert,tooltip:!e.can_revert&&"This trait is not revertable."||i.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){return t("revert",{ref:e.ref})}})})]})},e.ref)})}):(0,r.jsx)(l.az,{textAlign:"center",children:"There are no active station traits."})},m=function(e){var n,t=u((0,o.useState)(1),2),i=t[0],a=t[1];switch(i){case 0:n=(0,r.jsx)(f,{});break;case 1:n=(0,r.jsx)(h,{});break;default:throw Error("Unhandled case: ".concat(i))}return(0,r.jsx)(c.p8,{title:"Modify Station Traits",height:350,width:350,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.tU,{children:[(0,r.jsx)(l.tU.Tab,{icon:"eye",selected:1===i,onClick:function(){return a(1)},children:"View"}),(0,r.jsx)(l.tU.Tab,{icon:"edit",selected:0===i,onClick:function(){return a(0)},children:"Edit"})]})}),(0,r.jsxs)(l.BJ.Item,{m:0,children:[(0,r.jsx)(l.cG,{}),n]})]})})})}},5724:function(e,n,t){"use strict";t.r(n),t.d(n,{StripMenu:()=>x});var r=t(8138),i=t(8587),o=t(7790),l=t(8595),a=t(2864),c=t(3384),s=function(e){return 0===e?5:9},u="64px",d=function(e){return"".concat(e[0],"/").concat(e[1])},f=function(e){var n=e.align,t=e.children;return(0,r.jsx)(o.az,{style:{position:"absolute",left:"left"===n?"6px":"48px",textAlign:n,textShadow:"2px 2px 2px #000",top:"2px"},children:t})},h={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},m={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,4]),image:"inventory-pda.png"}},p={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,8]),image:"inventory-pda.png"}},x=function(e){var n=(0,a.Oc)(),t=n.act,f=n.data,x=new Map;if(0===f.show_mode){var g=!0,j=!1,b=void 0;try{for(var y,v=Object.keys(f.items)[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var w=y.value;x.set(m[w].gridSpot,w)}}catch(e){j=!0,b=e}finally{try{g||null==v.return||v.return()}finally{if(j)throw b}}}else{var k=!0,_=!1,C=void 0;try{for(var I,S=Object.keys(f.items)[Symbol.iterator]();!(k=(I=S.next()).done);k=!0){var O=I.value;x.set(p[O].gridSpot,O)}}catch(e){_=!0,C=e}finally{try{k||null==S.return||S.return()}finally{if(_)throw C}}}return 0===x.size?(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsx)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:"No slots"})})})}):(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,i.y1)(0,5).map(function(e){return(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,i.y1)(0,s(f.show_mode)).map(function(n){var i,a,c,s=d([e,n]),p=x.get(s);if(!p)return(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u}},s);var g=f.items[p],j=m[p];return null===g?c=j.displayName:"name"in g?(a=(0,r.jsx)(o._V,{src:"data:image/jpeg;base64,".concat(g.icon),height:"100%",width:"100%",style:{imageRendering:"pixelated",verticalAlign:"middle"}}),c=g.name):"obscured"in g&&(a=(0,r.jsx)(o.In,{name:1===g.obscured?"ban":"eye-slash",size:3,ml:0,mt:2.5,color:"white",style:{textAlign:"center",height:"100%",width:"100%"}}),c="obscured ".concat(j.displayName)),null!==g&&"alternates"in g&&null!==g.alternates&&(i=g.alternates),(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u},children:(0,r.jsxs)(o.az,{style:{position:"relative",width:"100%",height:"100%"},children:[(0,r.jsxs)(o.$n,{onClick:function(){t("use",{key:p})},fluid:!0,color:(null==g?void 0:g.interacting)?"average":null,tooltip:c,style:{position:"relative",width:"100%",height:"100%",padding:0,backgroundColor:(null==g?void 0:g.cantstrip)?"transparent":"none"},children:[j.image&&(0,r.jsx)(o._V,{src:(0,l.l)(j.image),opacity:.7,style:{position:"absolute",width:"32px",height:"32px",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%) scale(2)"}}),(0,r.jsx)(o.az,{style:{position:"relative"},children:a}),j.additionalComponent]}),(0,r.jsx)(o.BJ,{direction:"row-reverse",children:void 0!==i&&i.map(function(e,n){var i=1.8*n;return(0,r.jsx)(o.BJ.Item,{width:"100%",children:(0,r.jsx)(o.$n,{onClick:function(){t("alt",{key:p,action_key:e})},tooltip:h[e].text,width:"1.8em",style:{background:"rgba(0, 0, 0, 0.6)",position:"absolute",bottom:0,right:"".concat(i,"em"),zIndex:2+n},children:(0,r.jsx)(o.In,{name:h[e].icon})})},n)})})]})},s)})})},e)})})})})}},2975:function(e,n,t){"use strict";t.r(n),t.d(n,{SuitStorage:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.uv;return(0,r.jsx)(l.p8,{width:400,height:260,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!n&&(0,r.jsx)(i.Rr,{backgroundColor:"black",opacity:.85,children:(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{bold:!0,textAlign:"center",mb:1,children:[(0,r.jsx)(i.In,{name:"spinner",spin:1,size:4,mb:4}),(0,r.jsx)("br",{}),"Disinfection of contents in progress..."]})})}),(0,r.jsx)(c,{}),(0,r.jsx)(u,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.helmet,c=l.suit,u=l.magboots,d=l.mask,f=l.storage,h=l.open,m=l.locked;return(0,r.jsx)(i.wn,{fill:!0,title:"Stored Items",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return t("cook")}}),(0,r.jsx)(i.$n,{content:m?"Unlock":"Lock",icon:m?"unlock":"lock",disabled:h,onClick:function(){return t("toggle_lock")}})]}),children:h&&!m?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(s,{object:a,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,r.jsx)(s,{object:c,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,r.jsx)(s,{object:u,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,r.jsx)(s,{object:d,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,r.jsx)(s,{object:f,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:m?"lock":"exclamation-circle",size:"5",mb:3}),(0,r.jsx)("br",{}),m?"The unit is locked.":"The unit is closed."]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.object,a=e.label,c=e.missingText,s=e.eject;return(0,r.jsx)(i.Ki.Item,{label:a,children:(0,r.jsx)(i.az,{my:.5,children:l?(0,r.jsx)(i.$n,{my:-1,icon:"eject",content:l,onClick:function(){return t(s)}}):(0,r.jsxs)(i.az,{color:"silver",bold:!0,children:["No ",c," found."]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.open,c=l.locked;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,content:a?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:a?"times-circle":"expand",color:a?"red":"green",disabled:c,textAlign:"center",onClick:function(){return t("toggle_open")}})})}},4835:function(e,n,t){"use strict";t.r(n),t.d(n,{SupermatterMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),k=(n=Math).max.apply(n,[1].concat(function(e){if(Array.isArray(e))return s(e)}(e=w.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:270,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:h/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Peak EER",children:(0,r.jsx)(i.z2,{value:p,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(p)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Nominal EER",children:(0,r.jsx)(i.z2,{value:m,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(m)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Gas Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:d(x),minValue:0,maxValue:d(1e4),ranges:{teal:[-1/0,d(80)],good:[d(80),d(373)],average:[d(373),d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(x)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Mole Per Tile",children:(0,r.jsx)(i.z2,{value:j,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.Mg)(j)+" mol"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:d(g),minValue:0,maxValue:d(5e4),ranges:{good:[d(1),d(300)],average:[-1/0,d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(g)+" kPa"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return u("back")}}),children:(0,r.jsx)(i.Ki,{children:w.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:k,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})]})})})}},2266:function(e,n,t){"use strict";t.r(n),t.d(n,{SyndicateComputerSimple:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{theme:"syndicate",width:400,height:400,children:(0,r.jsx)(l.p8.Content,{children:a.rows.map(function(e){return(0,r.jsxs)(i.wn,{title:e.title,buttons:(0,r.jsx)(i.$n,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return t(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,r.jsx)(i.az,{children:e.bullets.map(function(e){return(0,r.jsx)(i.az,{children:e},e)})})]},e.title)})})})}},8073:function(e,n,t){"use strict";t.r(n),t.d(n,{TEG:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return c.error?(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{title:"Error",children:[c.error,(0,r.jsx)(i.$n,{icon:"circle",content:"Recheck",onClick:function(){return t("check")}})]})})}):(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Cold Loop ("+c.cold_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Cold Inlet",children:[a(c.cold_inlet_temp)," K, ",a(c.cold_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Cold Outlet",children:[a(c.cold_outlet_temp)," K, ",a(c.cold_outlet_pressure)," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Hot Loop ("+c.hot_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Hot Inlet",children:[a(c.hot_inlet_temp)," K, ",a(c.hot_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Hot Outlet",children:[a(c.hot_outlet_temp)," K, ",a(c.hot_outlet_pressure)," kPa"]})]})}),(0,r.jsxs)(i.wn,{title:"Power Output",children:[a(c.output_power)," W",!!c.warning_switched&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},5808:function(e,n,t){"use strict";t.r(n),t.d(n,{TachyonArray:()=>a,TachyonArrayContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.records,u=void 0===s?[]:s,d=a.explosion_target,f=a.toxins_tech,h=a.printing;return(0,r.jsx)(l.p8,{width:500,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Shift's Target",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Current Toxins Level",children:f}),(0,r.jsxs)(i.Ki.Item,{label:"Administration",children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print All Logs",disabled:!u.length||h,align:"center",onClick:function(){return t("print_logs")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){return t("delete_logs")}})]})]})}),u.length?(0,r.jsx)(c,{}):(0,r.jsx)(i.IC,{children:"No Records"})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.wn,{title:"Logged Explosions",children:(0,r.jsx)(i.so,{children:(0,r.jsx)(i.so.Item,{children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Time"}),(0,r.jsx)(i.XI.Cell,{children:"Epicenter"}),(0,r.jsx)(i.XI.Cell,{children:"Actual Size"}),(0,r.jsx)(i.XI.Cell,{children:"Theoretical Size"})]}),(void 0===l?[]:l).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.logged_time}),(0,r.jsx)(i.XI.Cell,{children:e.epicenter}),(0,r.jsx)(i.XI.Cell,{children:e.actual_size_message}),(0,r.jsx)(i.XI.Cell,{children:e.theoretical_size_message}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return t("delete_record",{index:e.index})}})})]},e.index)})]})})})})}},5125:function(e,n,t){"use strict";t.r(n),t.d(n,{Tank:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.has_mask?(0,r.jsx)(i.Ki.Item,{label:"Mask",children:(0,r.jsx)(i.$n,{fluid:!0,width:"76%",icon:c.connected?"check":"times",content:c.connected?"Internals On":"Internals Off",selected:c.connected,onClick:function(){return a("internals")}})}):(0,r.jsx)(i.Ki.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,r.jsx)(l.p8,{width:325,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Tank Pressure",children:(0,r.jsx)(i.z2,{value:c.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:c.tankPressure+" kPa"})}),(0,r.jsxs)(i.Ki.Item,{label:"Release Pressure",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.ReleasePressure===c.minReleasePressure,tooltip:"Min",onClick:function(){return a("pressure",{pressure:"min"})}}),(0,r.jsx)(i.Q7,{animated:!0,value:parseFloat(c.releasePressure),width:"65px",unit:"kPa",minValue:c.minReleasePressure,maxValue:c.maxReleasePressure,onChange:function(e){return a("pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.ReleasePressure===c.maxReleasePressure,tooltip:"Max",onClick:function(){return a("pressure",{pressure:"max"})}}),(0,r.jsx)(i.$n,{icon:"undo",content:"",disabled:c.ReleasePressure===c.defaultReleasePressure,tooltip:"Reset",onClick:function(){return a("pressure",{pressure:"reset"})}})]}),n]})})})})}},7112:function(e,n,t){"use strict";t.r(n),t.d(n,{TankDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.o_tanks,s=a.p_tanks;return(0,r.jsx)(l.p8,{width:250,height:105,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:0===c,icon:"arrow-circle-down",onClick:function(){return t("oxygen")}})}),(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+s+")",disabled:0===s,icon:"arrow-circle-down",onClick:function(){return t("plasma")}})})]})})})}},3283:function(e,n,t){"use strict";t.r(n),t.d(n,{TcommsCore:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.linked,d=a.active,f=a.network_id;return(0,r.jsx)(l.p8,{width:600,height:292,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Relay Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine Power",children:(0,r.jsx)(i.$n,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Network ID",children:(0,r.jsx)(i.$n,{content:f||"Unset",selected:f,icon:"server",onClick:function(){return t("network_id")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link Status",children:1===u?(0,r.jsx)(i.az,{color:"green",children:"Linked"}):(0,r.jsx)(i.az,{color:"red",children:"Unlinked"})})]})}),1===u?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.linked_core_id,c=l.linked_core_addr,s=l.hidden_link;return(0,r.jsx)(i.wn,{title:"Link Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Linked Core ID",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Linked Core Address",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Hidden Link",children:(0,r.jsx)(i.$n,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){return t("toggle_hidden_link")}})}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.cores;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Sector"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:e.sector}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},5605:function(e,n,t){"use strict";t.r(n),t.d(n,{Teleporter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.targetsTeleport?a.targetsTeleport:{},s=a.calibrated,u=a.calibrating,d=a.powerstation,f=a.regime,h=a.teleporterhub,m=a.target,p=a.locked,x=a.adv_beacon_allowed,g=a.advanced_beacon_locking;return(0,r.jsx)(l.p8,{width:350,height:325,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(!d||!h)&&(0,r.jsxs)(i.wn,{fill:!0,title:"Error",children:[h,!d&&(0,r.jsx)(i.az,{color:"bad",children:" Powerstation not linked "}),d&&!h&&(0,r.jsx)(i.az,{color:"bad",children:" Teleporter hub not linked "})]}),d&&h&&(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Status",buttons:(0,r.jsx)(r.Fragment,{children:!!x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xa0"}),(0,r.jsx)(i.$n,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"Enabled":"Disabled",onClick:function(){return t("advanced_beacon_locking",{on:+!g})}})]})}),children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,r.jsxs)(i.BJ.Item,{children:[0===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),1===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),2===f&&(0,r.jsx)(i.az,{children:m})]})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Regime:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:1===f?"good":null,onClick:function(){return t("setregime",{regime:1})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:0===f?"good":null,onClick:function(){return t("setregime",{regime:0})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:2===f?"good":null,disabled:!p,onClick:function(){return t("setregime",{regime:2})}})})]}),(0,r.jsxs)(i.BJ,{label:"Calibration",mt:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,r.jsxs)(i.BJ.Item,{children:["None"!==m&&(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:15.8,textAlign:"center",mt:.5,children:u&&(0,r.jsx)(i.az,{color:"average",children:"In Progress"})||s&&(0,r.jsx)(i.az,{color:"good",children:"Optimal"})||(0,r.jsx)(i.az,{color:"bad",children:"Sub-Optimal"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{icon:"sync-alt",tooltip:"Calibrates the hub. \\ Accidents may occur when the \\ calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!s||!!u,onClick:function(){return t("calibrate")}})})]}),"None"===m&&(0,r.jsx)(i.az,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(p&&d&&h&&2===f)&&(0,r.jsx)(i.wn,{title:"GPS",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return t("load")}}),(0,r.jsx)(i.$n,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return t("eject")}})]})})]})})})})}},8336:function(e,n,t){"use strict";t.r(n),t.d(n,{TelescienceConsole:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)||(0,r.jsx)("ul",{children:m.map(function(e){return(0,r.jsx)("li",{children:e},e)})})]})}),(0,r.jsx)(o.wn,{title:"Telepad Status",children:1===f?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Bearing",children:(0,r.jsxs)(o.az,{inline:!0,position:"relative",children:[(0,r.jsx)(o.Q7,{unit:"\xb0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:v,value:j,onChange:function(e){C(e),s("setbear",{bear:e})}}),(0,r.jsx)(o.In,{ml:1,size:1,name:"arrow-up",rotation:_})]})}),(0,r.jsx)(o.Ki.Item,{label:"Current Elevation",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:v,value:b,onChange:function(e){return s("setelev",{elev:e})}})}),(0,r.jsx)(o.Ki.Item,{label:"Power Level",children:p.map(function(e,n){return(0,r.jsx)(o.$n,{content:e,selected:g===e,disabled:n>=x-1||v,onClick:function(){return s("setpwr",{pwr:n+1})}},e)})}),(0,r.jsx)(o.Ki.Item,{label:"Target Sector",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:w,value:y,disabled:v,onChange:function(e){return s("setz",{newz:e})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Telepad Actions",children:[(0,r.jsx)(o.$n,{content:"Send",disabled:v,onClick:function(){return s("pad_send")}}),(0,r.jsx)(o.$n,{content:"Receive",disabled:v,onClick:function(){return s("pad_receive")}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Crystal Maintenance",children:[(0,r.jsx)(o.$n,{content:"Recalibrate Crystals",disabled:v,onClick:function(){return s("recal_crystals")}}),(0,r.jsx)(o.$n,{content:"Eject Crystals",disabled:v,onClick:function(){return s("eject_crystals")}})]})]}):(0,r.jsx)(r.Fragment,{children:"No pad linked to console. Please use a multitool to link a pad."})}),(0,r.jsx)(o.wn,{title:"GPS Actions",children:1===h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Eject GPS",onClick:function(){return s("eject_gps")}}),(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Store Coordinates",onClick:function(){return s("store_to_gps")}})]}):(0,r.jsx)(r.Fragment,{children:"Please insert a GPS to store coordinates to it."})})]})})}},1745:function(e,n,t){"use strict";t.r(n),t.d(n,{TempGun:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,f=c.target_temperature,h=c.temperature,m=c.max_temp,p=c.min_temp;return(0,r.jsx)(a.p8,{width:250,height:121,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.Q7,{animate:!0,step:10,stepPixelSize:6,minValue:p,maxValue:m,value:f,format:function(e){return(0,o.Mg)(e,2)},width:"50px",onChange:function(e){return t("target_temperature",{target_temperature:e})}}),"\xb0C"]}),(0,r.jsx)(i.Ki.Item,{label:"Current Temperature",children:(0,r.jsxs)(i.az,{color:s(h),bold:h>500-273.15,children:[(0,r.jsx)(i.zv,{value:(0,o.LI)(h,2)}),"\xb0C"]})}),(0,r.jsx)(i.Ki.Item,{label:"Power Cost",children:(0,r.jsx)(i.az,{color:d(h),children:u(h)})})]})})})})},s=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},u=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},d=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},4273:function(e,n,t){"use strict";t.r(n),t.d(n,{TextInputModal:()=>m,removeAllSkiplines:()=>h,sanitizeMultiline:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=30,O=135+(b.length>30?Math.ceil(b.length/4):0)+75*!!S+(b.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:k,width:325,height:O,children:[w&&(0,r.jsx)(u.Loader,{value:w}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){e.key!==l._.Enter||S&&e.shiftKey||m("submit",{entry:C}),(0,l.KL)(e.key)&&m("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{color:"label",children:b})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.fs,{autoFocus:!0,autoSelect:!0,fluid:!0,height:y||C.length>=30?"100%":"1.8rem",maxLength:g,onEscape:function(){return m("cancel")},onChange:function(e){e!==C&&I(y?f(e):h(e))},placeholder:"Type something...",value:C})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:C,message:"".concat(C.length,"/").concat(g||"∞")})})]})})})]})}},9449:function(e,n,t){"use strict";t.r(n),t.d(n,{ThermoMachine:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(a.p8,{width:300,height:225,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:c.temperature,format:function(e){return(0,o.Mg)(e,2)}})," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[(0,r.jsx)(i.zv,{value:c.pressure,format:function(e){return(0,o.Mg)(e,2)}})," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Controls",buttons:(0,r.jsx)(i.$n,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Setting",textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){return t("cooling")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){return t("target",{target:c.min})}}),(0,r.jsx)(i.Q7,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onChange:function(e){return t("target",{target:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){return t("target",{target:c.max})}}),(0,r.jsx)(i.$n,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){return t("target",{target:c.initial})}})]})]})})]})})}},1760:function(e,n,t){"use strict";t.r(n),t.d(n,{TransferValve:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.tank_one,s=a.tank_two,u=a.attached_device,d=a.valve;return(0,r.jsx)(l.p8,{width:460,height:285,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Valve Status",children:(0,r.jsx)(i.$n,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!s,onClick:function(){return t("toggle")}})})})}),(0,r.jsx)(i.wn,{title:"Assembly",buttons:(0,r.jsx)(i.$n,{icon:"cog",content:"Configure Assembly",disabled:!u,onClick:function(){return t("device")}}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:u?(0,r.jsx)(i.$n,{icon:"eject",content:u,disabled:!u,onClick:function(){return t("remove_device")}}):(0,r.jsx)(i.az,{color:"average",children:"No Assembly"})})})}),(0,r.jsx)(i.wn,{title:"Attachment One",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:c?(0,r.jsx)(i.$n,{icon:"eject",content:c,disabled:!c,onClick:function(){return t("tankone")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})}),(0,r.jsx)(i.wn,{title:"Attachment Two",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:s?(0,r.jsx)(i.$n,{icon:"eject",content:s,disabled:!s,onClick:function(){return t("tanktwo")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})})]})})}},6971:function(e,n,t){"use strict";t.r(n),t.d(n,{TurbineComputer:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.compressor,s=o.compressor_broken,f=o.turbine,h=o.turbine_broken,m=o.online,p=o.throttle,x=(o.preBurnTemperature,o.bearingDamage),g=!!(l&&!s&&f&&!h);return(0,r.jsx)(c.p8,{width:400,height:415,children:(0,r.jsxs)(c.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:m?"power-off":"times",content:m?"Online":"Offline",selected:m,disabled:!g,onClick:function(){return t("toggle_power")}}),(0,r.jsx)(i.$n,{icon:"times",content:"Disconnect",onClick:function(){return t("disconnect")}})]}),children:g?(0,r.jsx)(d,{}):(0,r.jsx)(u,{})}),x>=100?(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:"Bearings Inoperable, Repair Required"})}):(0,r.jsx)(i.wn,{title:"Throttle",children:g?(0,r.jsx)(i.N6,{size:3,value:p,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,tickWhileDragging:!0,onChange:function(e,n){return t("set_throttle",{throttle:n})}}):""})]})})},u=function(e){var n=(0,a.Oc)().data,t=n.compressor,o=n.compressor_broken,l=n.turbine,c=n.turbine_broken;return n.online,(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Compressor Status",color:!t||o?"bad":"good",children:o?t?"Offline":"Missing":"Online"}),(0,r.jsx)(i.Ki.Item,{label:"Turbine Status",color:!l||c?"bad":"good",children:c?l?"Offline":"Missing":"Online"})]})},d=function(e){var n=(0,a.Oc)().data,t=n.rpm,c=n.temperature,s=n.power,u=n.bearingDamage,d=n.preBurnTemperature,f=n.postBurnTemperature,h=n.thermalEfficiency,m=n.compressionRatio,p=n.gasThroughput;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Turbine Speed",children:[(0,l.Mg)(t,2)," RPM"]}),(0,r.jsxs)(i.Ki.Item,{label:"Effective Compression Ratio",children:[(0,l.Mg)(m,2),":1"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Pre Burn Temp",children:[(0,l.Mg)(d,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Post Burn Temp",children:[(0,l.Mg)(f,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Compressor Temp",children:[(0,l.Mg)(c,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Thermal Efficiency",children:[(0,l.Mg)(100*h,2)," %"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gas Throughput",children:[(0,l.Mg)(p,2)," mol/s"]}),(0,r.jsx)(i.Ki.Item,{label:"Generated Power",children:(0,o.d5)(s)}),(0,r.jsx)(i.Ki.Item,{label:"Bearing Damage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,l.Mg)(u)+"%"})})]})}},8380:function(e,n,t){"use strict";t.r(n),t.d(n,{Uplink:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";if(e=(0,i.pb)(e,function(e){return!!e.name}),n){var t=(0,a.XZ)(n,function(e){var n="".concat(e.name,"|").concat(e.desc,"|").concat(e.cost,"tc");return e.hijack_only&&(n+="|hijack"),n});e=(0,i.pb)(e,function(e){return t(e)})}return(0,i.Ul)(e,function(e){return e.name})},v=function(e){if(b(e),""===e)return p(d[0].items);p(y(d.map(function(e){return e.items}).flat(),e))},w=f((0,o.useState)(1),2),k=w[0],_=w[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ,{vertical:!0,children:(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.wn,{title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:k,onClick:function(){return _(!k)}}),(0,r.jsx)(l.$n,{content:"Random Item",icon:"question",onClick:function(){return t("buyRandom")}}),(0,r.jsx)(l.$n,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return t("refund")}})]}),children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search Equipment",value:g,onChange:function(e){v(e)}})})})}),(0,r.jsxs)(l.BJ,{fill:!0,mt:.3,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.tU,{vertical:!0,children:d.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===g&&e.items===m,onClick:function(){p(e.items),b("")},children:e.cat},e.cat)})})})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.BJ,{vertical:!0,children:m.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:k},(0,a.jT)(e.name))},(0,a.jT)(e.name))})})})})]})]})},x=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,s=i.cart,u=i.crystals,d=i.cart_price,h=f((0,o.useState)(0),2),m=h[0],p=h[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:m,onClick:function(){return p(!m)}}),(0,r.jsx)(l.$n,{content:"Empty Cart",icon:"trash",onClick:function(){return t("empty_cart")},disabled:!s}),(0,r.jsx)(l.$n,{content:"Purchase Cart ("+d+"TC)",icon:"shopping-cart",onClick:function(){return t("purchase_cart")},disabled:!s||d>u})]}),children:(0,r.jsx)(l.BJ,{vertical:!0,children:s?s.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:m,buttons:(0,r.jsx)(y,{i:e})})},(0,a.jT)(e.name))}):(0,r.jsx)(l.az,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=i.cats,a=i.lucky_numbers;return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,r.jsx)(l.$n,{icon:"dice",content:"See more suggestions",onClick:function(){return t("shuffle_lucky_numbers")}}),children:(0,r.jsx)(l.BJ,{wrap:!0,children:a.map(function(e){return o[e.cat].items[e.item]}).filter(function(e){return null!=e}).map(function(e,n){return(0,r.jsx)(l.BJ.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",grow:!0,children:(0,r.jsx)(j,{i:e})},n)})})})})},j=function(e){var n=e.i,t=e.showDecription,i=e.buttons,o=void 0===i?(0,r.jsx)(b,{i:n}):i;return(0,r.jsx)(l.wn,{title:(0,a.jT)(n.name),buttons:o,children:(void 0===t?1:t)?(0,r.jsx)(l.az,{italic:!0,children:(0,a.jT)(n.desc)}):null})},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i,a=i.crystals;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{icon:"shopping-cart",color:1===o.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return t("add_to_cart",{item:o.obj_path})},disabled:o.cost>a}),(0,r.jsx)(l.$n,{content:"Buy ("+o.cost+"TC)"+(o.refundable?" [Refundable]":""),color:1===o.hijack_only&&"red",tooltip:1===o.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return t("buyItem",{item:o.obj_path})},disabled:o.cost>a})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i;return i.exploitable,(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.$n,{icon:"times",content:"("+o.cost*o.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return t("remove_from_cart",{item:o.obj_path})}}),(0,r.jsx)(l.$n,{icon:"minus",tooltip:0===o.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:--o.amount})},disabled:o.amount<=0}),(0,r.jsx)(l.$n.Input,{value:"".concat(o.amount),width:"45px",tooltipPosition:"bottom-end",tooltip:0===o.limit&&"Discount already redeemed!",onCommit:function(e){return t("set_cart_item_quantity",{item:o.obj_path,quantity:e})},disabled:-1!==o.limit&&o.amount>=o.limit&&o.amount<=0}),(0,r.jsx)(l.$n,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:0===o.limit&&"Discount already redeemed!",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:++o.amount})},disabled:-1!==o.limit&&o.amount>=o.limit})]})},v=function(e){var n=(0,c.Oc)(),t=n.act,s=n.data,u=s.exploitable,d=s.selected_record,h=f((0,o.useState)(""),2),m=h[0],p=h[1],x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,a.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,function(e){return r(e)})}return(0,i.Ul)(t,function(e){return e.name})}(u,m);return(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search Crew",onChange:function(e){return p(e)}}),(0,r.jsx)(l.tU,{vertical:!0,children:x&&x.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:e.name===d.name,onClick:function(){return t("view_record",{uid_gen:e.uid_gen})},children:e.name},e.uid_gen)})})]})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:d.name,children:(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Age",children:d.age}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:d.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:d.rank}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:d.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:d.species}),(0,r.jsx)(l.Ki.Item,{label:"NT Relation",children:d.nt_relation})]})}),!!d.has_photos&&d.photos.map(function(e,n){return(0,r.jsxs)(l.BJ.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,r.jsx)("img",{src:e,style:{width:"96px",marginTop:"1rem",marginBottom:"0.5rem",imageRendering:"pixelated"}}),(0,r.jsx)("br",{}),"Photo #",n+1]},n)})]})})})]})}},1638:function(e,n,t){"use strict";t.r(n),t.d(n,{Vending:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);th&&a.price>m;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.Hg,{verticalAlign:"middle",icon:s,icon_state:u,fallback:(0,r.jsx)(i.In,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsxs)(i.az,{color:c<=0&&"bad"||c<=a.max_amount/2&&"average"||"good",children:[c," in stock"]})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,disabled:j,icon:g,content:x,textAlign:"left",onClick:function(){return t("vend",{inum:a.inum})}})})]})},u=function(e){var n,t=(0,o.Oc)(),a=t.act,u=t.data,d=u.user,f=u.usermoney,h=u.inserted_cash,m=u.product_records,p=u.hidden_records,x=u.stock,g=(u.vend_ready,u.inserted_item_name),j=u.panel_open,b=u.speaker,y=u.locked,v=u.bypass_lock;return n=c(void 0===m?[]:m),u.extended_inventory&&(n=c(n).concat(c(void 0===p?[]:p))),n=n.filter(function(e){return!!e}),(0,r.jsx)(l.p8,{title:"Vending Machine",width:450,height:Math.min((!y||v?230:171)+32*n.length,585),children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(!y||!!v)&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Configuration",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Rename Vendor",onClick:function(){return a("rename",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Change Vendor Appearance",onClick:function(){return a("change_appearance",{})}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"User",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:!!g&&(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:g}),onClick:function(){return a("eject_item",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{disabled:!h,icon:"money-bill-wave-alt",content:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("b",{children:h})," credits"]}):"Dispense Change",tooltip:h?"Dispense Change":null,textAlign:"left",onClick:function(){return a("change")}})})]}),children:d&&(0,r.jsxs)(i.az,{children:["Welcome, ",(0,r.jsx)("b",{children:d.name}),", ",(0,r.jsx)("b",{children:d.job||"Unemployed"}),"!",(0,r.jsx)("br",{}),"Your balance is ",(0,r.jsxs)("b",{children:[f," credits"]}),".",(0,r.jsx)("br",{})]})})}),!!j&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Maintenance",children:(0,r.jsx)(i.$n,{icon:b?"check":"volume-mute",selected:b,content:"Speaker",textAlign:"left",onClick:function(){return a("toggle_voice",{})}})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsx)(i.XI,{children:n.map(function(e){return(0,r.jsx)(s,{product:e,productStock:x[e.name],productIcon:e.icon,productIconState:e.icon_state},e.name)})})})})]})})})}},2144:function(e,n,t){"use strict";t.r(n),t.d(n,{VolumeMixer:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.channels;return(0,r.jsx)(a.p8,{width:350,height:Math.min(95+50*c.length,565),children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.az,{fontSize:"1.25rem",color:"label",mt:n>0&&"0.5rem",children:e.name}),(0,r.jsx)(o.az,{mt:"0.5rem",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{mr:.5,children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:0})}})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,mx:"0.5rem",children:(0,r.jsx)(o.Ap,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(n,r){return t("volume",{channel:e.num,volume:r})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:100})}})})})]})})]},e.num)})})})})}},7063:function(e,n,t){"use strict";t.r(n),t.d(n,{VotePanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.remaining,s=a.question,u=a.choices,d=a.user_vote,f=a.counts,h=a.show_counts;return(0,r.jsx)(l.p8,{width:400,height:360,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s,children:[(0,r.jsxs)(i.az,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),u.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mb:1,fluid:!0,lineHeight:3,multiLine:e,content:e+(h?" ("+(f[e]||0)+")":""),onClick:function(){return t("vote",{target:e})},selected:e===d})},e)})]})})})}},7983:function(e,n,t){"use strict";t.r(n),t.d(n,{Wires:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.wires||[],s=a.status||[],u=56+23*c.length+(status?0:15+17*s.length);return(0,r.jsx)(l.p8,{width:350,height:u,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:e.cut?"Mend":"Cut",onClick:function(){return t("cut",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:"Pulse",onClick:function(){return t("pulse",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:e.attached?"Detach":"Attach",onClick:function(){return t("attach",{wire:e.color})}})]}),children:!!e.wire&&(0,r.jsxs)("i",{children:["(",e.wire,")"]})},e.seen_color)})})})}),!!s.length&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:s.map(function(e){return(0,r.jsx)(i.az,{color:"lightgray",children:e},e)})})})]})})})}},8167:function(e,n,t){"use strict";t.r(n),t.d(n,{WizardApprenticeContract:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.used;return(0,r.jsx)(l.p8,{width:500,height:555,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,r.jsx)("p",{children:"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points."}),a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,r.jsx)(i.wn,{title:"Which school of magic is your apprentice studying?",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,r.jsx)("br",{}),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("fire")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,r.jsx)("br",{}),"They know Teleport, Blink and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("translocation")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,r.jsx)("br",{}),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("restoration")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,r.jsx)("br",{}),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("stealth")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,r.jsx)("br",{}),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,r.jsx)("br",{}),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("honk")}})]}),(0,r.jsx)(i.Ki.Divider,{})]})})]})})}},234:function(e,n,t){"use strict";t.r(n),t.d(n,{ZLevelManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4530);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(8587),o=t(4530),l=t(7790);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&!g.includes(e.ref)&&!p.includes(e.ref),checked:p.includes(e.ref),onClick:function(){return j(e.ref)}},e.desc)})]})]})})}},7276:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosScan:()=>l});var r=t(8138),i=t(8587),o=t(7790),l=function(e){var n=e.aircontents;return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.Ki,{children:(0,i.pb)(n,function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}).map(function(e){var n,t,i,l,a;return(0,r.jsxs)(o.Ki.Item,{label:e.entry,color:(n=e.val,t=e.bad_low,i=e.poor_low,l=e.poor_high,a=e.bad_high,nl?"average":n>a?"bad":"good"),children:[e.val,e.units]},e.entry)})})})}},3013:function(e,n,t){"use strict";t.r(n),t.d(n,{BeakerContents:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.beakerLoaded,t=e.beakerContents,o=void 0===t?[]:t,l=e.buttons;return(0,r.jsx)(i.BJ,{vertical:!0,children:n?0===o.length?(0,r.jsx)(i.BJ.Item,{color:"label",children:"Beaker is empty."}):o.map(function(e,n){var t;return(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{color:"label",grow:!0,children:[(t=e.volume)+" unit"+(1===t?"":"s")," of ",e.name]},e.name),!!l&&(0,r.jsx)(i.BJ.Item,{children:l(e,n)})]},e.name)}):(0,r.jsx)(i.BJ.Item,{color:"label",children:"No beaker loaded."})})}},9226:function(e,n,t){"use strict";t.r(n),t.d(n,{BotStatus:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,c=l.noaccess,s=l.maintpanel,u=l.on,d=l.autopatrol,f=l.canhack,h=l.emagged,m=l.remote_disabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",a?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.wn,{title:"General Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:c,onClick:function(){return t("power")}})}),void 0!==d&&(0,r.jsx)(i.Ki.Item,{label:"Patrol",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){return t("autopatrol")}})}),!!s&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance Panel",children:(0,r.jsx)(i.az,{color:"bad",children:"Panel Open!"})}),(0,r.jsx)(i.Ki.Item,{label:"Safety System",children:(0,r.jsx)(i.az,{color:h?"bad":"good",children:h?"DISABLED!":"Enabled"})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Hacking",children:(0,r.jsx)(i.$n,{icon:"terminal",content:h?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){return t("hack")}})}),(0,r.jsx)(i.Ki.Item,{label:"Remote Access",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:!m,content:"AI Remote Control",disabled:c,onClick:function(){return t("disableremote")}})})]})})]})}},4744:function(e,n,t){"use strict";t.r(n),t.d(n,{ComplexModal:()=>h,modalAnswer:()=>d,modalClose:()=>f,modalOpen:()=>s,modalRegisterBodyOverride:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(421).lm.department,c=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],s=function(e){if(-1!==c.indexOf(e))return!0},u=function(e){return e.length>0&&(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,color:"white",children:[(0,r.jsx)(i.XI.Cell,{width:"50%",children:"Name"}),(0,r.jsx)(i.XI.Cell,{width:"35%",children:"Rank"}),(0,r.jsx)(i.XI.Cell,{width:"15%",children:"Active"})]}),e.map(function(e){var n;return(0,r.jsxs)(i.XI.Row,{color:(n=e.rank,-1!==c.indexOf(n)?"green":"orange"),bold:s(e.rank),children:[(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.name)}),(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.rank)}),(0,r.jsx)(i.XI.Cell,{children:e.active})]},e.name+e.rank)})]})},d=function(e){if((0,l.Oc)().act,e.data)n=e.data;else{var n;n=(0,l.Oc)().data}var t=n.manifest,o=t.heads,c=t.sec,s=t.eng,d=t.med,f=t.sci,h=t.ser,m=t.sup,p=t.misc;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.command,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:u(o)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.security,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:u(c)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.engineering,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:u(s)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.medical,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:u(d)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.science,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:u(f)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.service,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:u(h)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.supply,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:u(m)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:u(p)})]})}},1942:function(e,n,t){"use strict";t.r(n),t.d(n,{InputButtons:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.large_buttons,c=l.swapped_buttons,s=e.input,u=e.message,d=e.disabled,f=(0,r.jsx)(i.$n,{color:"good",textAlign:"center",bold:!!a,fluid:!!a,tooltip:!!a&&u,disabled:!!d,width:!a&&6,onClick:function(){return t("submit",{entry:s})},children:"Submit"}),h=(0,r.jsx)(i.$n,{color:"bad",textAlign:"center",bold:!!a,fluid:!!a,width:!a&&6,onClick:function(){return t("cancel")},children:"Cancel"});return(0,r.jsxs)(i.BJ,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[(0,r.jsx)(i.BJ.Item,{grow:a,children:h}),!a&&u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{color:"label",textAlign:"center",children:u})}),(0,r.jsx)(i.BJ.Item,{grow:a,children:f})]})}},1992:function(e,n,t){"use strict";t.r(n),t.d(n,{InterfaceLockNoticeBox:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.siliconUser,c=void 0===a?l.siliconUser:a,s=e.locked,u=void 0===s?l.locked:s,d=e.normallyLocked,f=void 0===d?l.normallyLocked:d,h=e.onLockStatusChange,m=void 0===h?function(){return t("lock")}:h,p=e.accessText;return c?(0,r.jsx)(i.IC,{color:c&&"grey",children:(0,r.jsxs)(i.so,{align:"center",children:[(0,r.jsx)(i.so.Item,{children:"Interface lock status:"}),(0,r.jsx)(i.so.Item,{grow:"1"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{m:"0",color:f?"red":"green",icon:f?"lock":"unlock",content:f?"Locked":"Unlocked",onClick:function(){m&&m(!u)}})})]})}):(0,r.jsxs)(i.IC,{children:["Swipe ",void 0===p?"an ID card":p," to ",u?"unlock":"lock"," this interface."]})}},9472:function(e,n,t){"use strict";t.r(n),t.d(n,{Loader:()=>l});var r=t(8138),i=t(7790),o=t(6859),l=function(e){var n=e.value;return(0,r.jsx)("div",{className:"AlertModal__Loader",children:(0,r.jsx)(i.az,{className:"AlertModal__LoaderProgress",style:{width:100*(0,o.J$)(n)+"%"}})})}},7352:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginInfo:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState;if(l)return(0,r.jsx)(i.IC,{info:!0,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:.5,children:["Logged in as: ",a.name," (",a.rank,")"]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"eject",disabled:!a.id,content:"Eject ID",color:"good",onClick:function(){return t("login_eject")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){return t("login_logout")}})]})]})})}},736:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginScreen:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState,c=l.isAI,s=l.isRobot,u=l.isAdmin;return(0,r.jsx)(i.wn,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,r.jsx)(i.so,{height:"100%",align:"center",justify:"center",children:(0,r.jsxs)(i.so.Item,{textAlign:"center",mt:"-2rem",children:[(0,r.jsxs)(i.az,{fontSize:"1.5rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,r.jsxs)(i.az,{color:"label",my:"1rem",children:["ID:",(0,r.jsx)(i.$n,{icon:"id-card",content:a.id?a.id:"----------",ml:"0.5rem",onClick:function(){return t("login_insert")}})]}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",disabled:!a.id,content:"Login",onClick:function(){return t("login_login",{login_type:1})}}),!!c&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return t("login_login",{login_type:2})}}),!!s&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return t("login_login",{login_type:3})}}),!!u&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){return t("login_login",{login_type:4})}})]})})})}},6696:function(e,n,t){"use strict";t.r(n),t.d(n,{Operating:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.operating,t=e.name;if(n)return(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"The ",t," is processing..."]})})})}},6888:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>a});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)().act,t=e.data,a=t.code,c=t.frequency,s=t.minFrequency,u=t.maxFrequency;return(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Frequency",children:(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:s/10,maxValue:u/10,value:c/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return n("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:a,width:"80px",onChange:function(e){return n("code",{code:e})}})})]}),(0,r.jsx)(i.$n,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},4455:function(e,n,t){"use strict";t.r(n),t.d(n,{SimpleRecords:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(u,function(e){return null==e?void 0:e.Name});return n&&(t=(0,i.pb)(t,(0,a.XZ)(n,function(e){return e.Name}))),(0,i.Ul)(t,function(e){return e.Name})}(u,f);return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search records...",onChange:function(e){return h(e)}}),m.map(function(e){return(0,r.jsx)(l.az,{children:(0,r.jsx)(l.$n,{mb:.5,content:e.Name,icon:"user",onClick:function(){return t("Records",{target:e.uid})}})},e)})]})},f=function(e){(0,c.Oc)().act;var n,t=e.data.records,i=t.general,o=t.medical,a=t.security;switch(e.recordType){case"MED":n=(0,r.jsx)(l.wn,{level:2,title:"Medical Data",children:o?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Blood Type",children:o.blood_type}),(0,r.jsx)(l.Ki.Item,{label:"Minor Disabilities",children:o.mi_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.mi_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Disabilities",children:o.ma_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.ma_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Allergies",children:o.alg}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.alg_d}),(0,r.jsx)(l.Ki.Item,{label:"Current Diseases",children:o.cdi}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.cdi_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:o.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":n=(0,r.jsx)(l.wn,{level:2,title:"Security Data",children:a?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Criminal Status",children:a.criminal}),(0,r.jsx)(l.Ki.Item,{label:"Minor Crimes",children:a.mi_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.mi_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Crimes",children:a.ma_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.ma_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:a.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Security record lost!"})})}return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.wn,{title:"General Data",children:i?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Name",children:i.name}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:i.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:i.species}),(0,r.jsx)(l.Ki.Item,{label:"Age",children:i.age}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:i.rank}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:i.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Physical Status",children:i.p_stat}),(0,r.jsx)(l.Ki.Item,{label:"Mental Status",children:i.m_stat})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"General record lost!"})}),n]})}},2264:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.temp;if(a){var c,s,u=l({},a.style,!0);return(0,r.jsx)(i.IC,(c=function(e){for(var n=1;nc});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.total_earnings,c=n.total_energy;return n.name,(0,r.jsx)(a.p8,{title:"Power Transmission Laser",width:"310",height:"485",children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsxs)(i.IC,{success:!0,children:["Earned Credits : ",t?(0,o.up)(t):0]}),(0,r.jsxs)(i.IC,{success:!0,children:["Energy Sold : ",c?(0,o.QL)(c,0,"J"):"0 J"]})]})})},s=function(e){var n=(0,l.Oc)().data,t=n.max_capacity,a=n.held_power,c=n.input_total,s=n.max_grid_load;return(0,r.jsxs)(i.wn,{title:"Status",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Reserve energy",children:a?(0,o.QL)(a,0,"J"):"0 J"})}),(0,r.jsx)(i.z2,{mt:"0.5em",mb:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:a/t}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Grid Saturation"})}),(0,r.jsx)(i.z2,{mt:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:Math.min(c,t-a)/s})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.input_total,s=a.accepting_power,u=a.sucking_power,d=a.input_number,f=a.power_format;return(0,r.jsxs)(i.wn,{title:"Input Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Input Circuit",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",onClick:function(){return t("toggle_input")},children:s?"Enabled":"Disabled"}),children:(0,r.jsx)(i.az,{color:u&&"good"||s&&"average"||"bad",children:u&&"Online"||s&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Input Level",children:c?(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",animated:!0,size:1.25,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,value:d,onChange:function(e){return t("set_input",{set_input:e})}}),(0,r.jsx)(i.$n,{selected:1===f,onClick:function(){return t("inputW")},children:"W"}),(0,r.jsx)(i.$n,{selected:1e3===f,onClick:function(){return t("inputKW")},children:"KW"}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("inputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("inputGW")},children:"GW"})]})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.output_total,s=a.firing,u=a.accepting_power,d=a.output_number,f=a.output_multiplier,h=a.target,m=a.held_power;return(0,r.jsxs)(i.wn,{title:"Output Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Laser Circuit",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"crosshairs",color:""===h?"green":"red",onClick:function(){return t("target")},children:h}),(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",disabled:!s&&m<1e6,onClick:function(){return t("toggle_output")},children:s?"Enabled":"Disabled"})]}),children:(0,r.jsx)(i.az,{color:s&&"good"||u&&"average"||"bad",children:s&&"Online"||u&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Output Level",children:c?c<0?"-"+(0,o.d5)(Math.abs(c)):(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",size:1.25,animated:!0,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,ranges:{bad:[-1/0,-1]},value:d,onChange:function(e){return t("set_output",{set_output:e})}}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("outputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("outputGW")},children:"GW"})]})]})}},2817:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_atmosphere:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.AtmosScan,{aircontents:t.app_data.aircontents})}},7716:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_bioscan:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).app_data,l=t.holder,a=t.dead,c=t.health,s=t.brute,u=t.oxy,d=t.tox,f=t.burn;return(t.temp,l)?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"Dead"}):(0,r.jsx)(i.az,{bold:!0,color:"green",children:"Alive"})}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:0,max:1,value:c/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Damage",children:(0,r.jsx)(i.az,{color:"blue",children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Toxin Damage",children:(0,r.jsx)(i.az,{color:"green",children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",children:(0,r.jsx)(i.az,{color:"orange",children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",children:(0,r.jsx)(i.az,{color:"red",children:s})})]}):(0,r.jsx)(i.az,{color:"red",children:"Error: No biological host found."})}},1091:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_directives:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.master,c=l.dna,s=l.prime,u=l.supplemental;return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Master",children:a?a+" ("+c+")":"None"}),a&&(0,r.jsx)(i.Ki.Item,{label:"Request DNA",children:(0,r.jsx)(i.$n,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return t("getdna")}})}),(0,r.jsx)(i.Ki.Item,{label:"Prime Directive",children:s}),(0,r.jsx)(i.Ki.Item,{label:"Supplemental Directives",children:u||"None"})]}),(0,r.jsx)(i.az,{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,r.jsx)(i.az,{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."})]})}},9316:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_doorjack:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data.app_data,s=c.cable,u=c.machine,d=c.inprogress,f=c.progress;return c.aborted,n=u?(0,r.jsx)(i.$n,{selected:!0,content:"Connected"}):(0,r.jsx)(i.$n,{content:s?"Extended":"Retracted",color:s?"orange":null,onClick:function(){return a("cable")}}),u&&(t=(0,r.jsxs)(i.Ki.Item,{label:"Hack",children:[(0,r.jsx)(i.z2,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:f,maxValue:100}),d?(0,r.jsx)(i.$n,{mt:1,color:"red",content:"Abort",onClick:function(){return a("cancel")}}):(0,r.jsx)(i.$n,{mt:1,content:"Start",onClick:function(){return a("jack")}})]})),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cable",children:n}),t]})}},5042:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.available_software,c=l.installed_software,s=l.installed_toggles,u=l.available_ram,d=l.emotions,f=l.current_emotion,h=l.speech_verbs,m=l.current_speech_verb,p=l.available_chassises,x=l.current_chassis,g=[];return c.map(function(e){return g[e.key]=e.name}),s.map(function(e){return g[e.key]=e.name}),(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available RAM",children:u}),(0,r.jsxs)(i.Ki.Item,{label:"Available Software",children:[a.filter(function(e){return!g[e.key]}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>u,onClick:function(){return t("purchaseSoftware",{key:e.key})}},e.key)}),0===a.filter(function(e){return!g[e.key]}).length&&"No software available!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Software",children:[c.filter(function(e){return"mainmenu"!==e.key}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,onClick:function(){return t("startSoftware",{software_key:e.key})}},e.key)}),0===c.length&&"No software installed!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Toggles",children:[s.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return t("setToggle",{toggle_key:e.key})}},e.key)}),0===s.length&&"No toggles installed!"]}),(0,r.jsx)(i.Ki.Item,{label:"Select Emotion",children:d.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.id===f,onClick:function(){return t("setEmotion",{emotion:e.id})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Speaking State",children:h.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.name===m,onClick:function(){return t("setSpeechStyle",{speech_state:e.name})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Chassis Type",children:p.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.icon===x,onClick:function(){return t("setChassis",{chassis_to_change:e.icon})}},e.id)})})]})})}},702:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.CrewManifest,{data:t.app_data})}},9513:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_medrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"MED"})}},984:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_messenger:()=>l});var r=t(8138),i=t(2864),o=t(3260),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return t.app_data.active_convo?(0,r.jsx)(o.ActiveConversation,{data:t.app_data}):(0,r.jsx)(o.MessengerList,{data:t.app_data})}},9028:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_radio:()=>a});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.app_data,c=a.minFrequency,s=a.maxFrequency,u=a.frequency,d=a.broadcasting;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Frequency",children:[(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:c/10,maxValue:s/10,value:u/10,format:function(e){return(0,o.Mg)(e,1)},onChange:function(e){return t("freq",{freq:e})}}),(0,r.jsx)(i.$n,{tooltip:"Reset",icon:"undo",onClick:function(){return t("freq",{freq:"145.9"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Broadcast Nearby Speech",children:(0,r.jsx)(i.$n,{onClick:function(){return t("toggleBroadcast")},selected:d,content:d?"Enabled":"Disabled"})})]})}},6838:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_secrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},4244:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t.app_data})}},8539:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_atmos_scan:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.AtmosScan,{aircontents:n.aircontents})}},5246:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_cookbook:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.games;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsxs)(i.$n,{width:"33%",textAlign:"center",color:"transparent",onClick:function(){return t("play",{id:e.id})},children:[(0,r.jsx)(i.In.Stack,{height:"96px",children:"Minesweeper"===e.name?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.In,{ml:"4px",mt:"10px",name:"flag",size:"6",color:"gray",rotation:30}),(0,r.jsx)(i.In,{ml:"20px",mt:"4px",name:"bomb",size:"3",color:"black"})]}):(0,r.jsx)(i.In,{name:"gamepad",size:"6"})}),(0,r.jsx)(i.az,{children:e.name})]},e.name)})})}},3606:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_janitor:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).janitor,l=t.user_loc,a=t.mops,c=t.buckets,s=t.cleanbots,u=t.carts,d=t.janicarts;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Current Location",children:[l.x,",",l.y]}),a&&(0,r.jsx)(i.Ki.Item,{label:"Mop Locations",children:a.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),c&&(0,r.jsx)(i.Ki.Item,{label:"Mop Bucket Locations",children:c.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),s&&(0,r.jsx)(i.Ki.Item,{label:"Cleanbot Locations",children:s.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),u&&(0,r.jsx)(i.Ki.Item,{label:"Janitorial Cart Locations",children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),d&&(0,r.jsx)(i.Ki.Item,{label:"Janicart Locations",children:d.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.direction_from_user,")"]},e)})})]})}},2526:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.owner,c=l.ownjob,s=l.idInserted,u=l.categories,d=l.pai,f=l.notifying;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Owner",color:"average",children:[a,", ",c]}),(0,r.jsx)(i.Ki.Item,{label:"ID",children:(0,r.jsx)(i.$n,{icon:"sync",content:"Update PDA Info",disabled:!s,onClick:function(){return t("UpdateInfo")}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Functions",children:(0,r.jsx)(i.Ki,{children:u.map(function(e){var n=l.apps[e];return n&&n.length?(0,r.jsx)(i.Ki.Item,{label:e,children:n.map(function(e){return(0,r.jsx)(i.$n,{icon:e.uid in f?e.notify_icon:e.icon,iconSpin:e.uid in f,color:e.uid in f?"red":"transparent",content:e.name,onClick:function(){return t("StartProgram",{program:e.uid})}},e.uid)})},e):null})})})}),(0,r.jsx)(i.BJ.Item,{children:!!d&&(0,r.jsxs)(i.wn,{title:"pAI",children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return t("pai",{option:1})}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return t("pai",{option:2})}})]})})]})}},4642:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.CrewManifest,{})}},1212:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_medical:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"MED"})}},3260:function(e,n,t){"use strict";t.r(n),t.d(n,{ActiveConversation:()=>d,MessengerList:()=>f,pda_messenger:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,MineSweeperLeaderboard:()=>d,pda_minesweeper:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(2264);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).mulebot.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.mulebot.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.mulebot,c=a.botstatus,s=a.active,u=c.mode,d=c.loca,f=c.load,h=c.powr,m=c.dest,p=c.home,x=c.retn,g=c.pick;switch(u){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=u}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[h,"%"]}),(0,r.jsx)(i.Ki.Item,{label:"Home",children:p}),(0,r.jsx)(i.Ki.Item,{label:"Destination",children:(0,r.jsx)(i.$n,{content:m?m+" (Set)":"None (Set)",onClick:function(){return l("target")}})}),(0,r.jsx)(i.Ki.Item,{label:"Current Load",children:(0,r.jsx)(i.$n,{content:f?f+" (Unload)":"None",disabled:!f,onClick:function(){return l("unload")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Pickup",children:(0,r.jsx)(i.$n,{content:g?"Yes":"No",selected:g,onClick:function(){return l("set_pickup_type",{autopick:+!g})}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Return",children:(0,r.jsx)(i.$n,{content:x?"Yes":"No",selected:x,onClick:function(){return l("set_auto_return",{autoret:+!x})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Proceed",icon:"play",onClick:function(){return l("start")}}),(0,r.jsx)(i.$n,{content:"Return Home",icon:"home",onClick:function(){return l("home")}})]})]})]})}},9749:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_nanobank:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.note;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{children:l}),(0,r.jsx)(i.$n,{icon:"pen",onClick:function(){return t("Edit")},content:"Edit"})]})}},4702:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_power:()=>l});var r=t(8138),i=t(2864),o=t(1784),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.PowerMonitorMainContent,{})}},6651:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_secbot:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).beepsky.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.beepsky.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.beepsky,c=a.botstatus,s=a.active,u=c.mode,d=c.loca;switch(u){case 0:n="Ready";break;case 1:n="Apprehending target";break;case 2:case 3:n="Arresting target";break;case 4:n="Starting patrol";break;case 5:n="On patrol";break;case 6:n="Responding to summons"}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Go",icon:"play",onClick:function(){return l("go")}}),(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Summon",icon:"arrow-down",onClick:function(){return l("summon")}})]})]})]})}},7155:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_security:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"SEC"})}},7024:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t})}},7148:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_status_display:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Code",children:[(0,r.jsx)(i.$n,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return t("Status",{statdisp:0})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"clock",content:"Evac ETA",onClick:function(){return t("Status",{statdisp:1})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"edit",content:"Message",onClick:function(){return t("Status",{statdisp:2})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"exclamation-triangle",content:"Red Alert",onClick:function(){return t("Status",{statdisp:3,alert:"redalert"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"boxes",content:"NT Logo",onClick:function(){return t("Status",{statdisp:3,alert:"default"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"lock",content:"Lockdown",onClick:function(){return t("Status",{statdisp:3,alert:"lockdown"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"biohazard",content:"Biohazard",onClick:function(){return t("Status",{statdisp:3,alert:"biohazard"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Message line 1",children:(0,r.jsx)(i.$n,{content:l.message1+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:1})}})}),(0,r.jsx)(i.Ki.Item,{label:"Message line 2",children:(0,r.jsx)(i.$n,{content:l.message2+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:2})}})})]})})}},7632:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_supplyrecords:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).supply,l=t.shuttle_loc,a=t.shuttle_time,c=t.shuttle_moving,s=t.approved,u=t.approved_count,d=t.requests,f=t.requests_count;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Shuttle Status",children:c?(0,r.jsxs)(i.az,{children:["In transit ",a]}):(0,r.jsx)(i.az,{children:l})})}),(0,r.jsx)(i.wn,{mt:1,title:"Requested Orders",children:f>0&&d.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)})}),(0,r.jsx)(i.wn,{title:"Approved Orders",children:u>0&&s.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)})})]})}},9136:function(e,n,t){"use strict";t.d(n,{P:()=>d});var r=t(8138),i=t(4530),o=t(1128),l=t(5490),a=t(3375);function c(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){var n=e.className,t=e.theme,i=void 0===t?"nanotrasen":t,o=e.children,d=u(e,["className","theme","children"]);return document.documentElement.className="theme-".concat(i),(0,r.jsx)("div",{className:"theme-"+i,children:(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout",n,(0,a.WP)(d)])},(0,a.Fl)(d)),{children:o}))})}d.Content=function(e){var n=e.className,t=e.scrollable,d=e.children,f=u(e,["className","scrollable","children"]),h=(0,i.useRef)(null);return(0,i.useEffect)(function(){var e=h.current;return e&&t&&(0,o.tk)(e),function(){e&&t&&(0,o.WK)(e)}},[]),(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout__content",t&&"Layout__content--scrollable",n,(0,a.WP)(f)]),ref:h},(0,a.Fl)(f)),{children:d}))}},2372:function(e,n,t){"use strict";t(8138),t(7790),t(5490),t(2864),t(1956),t(9136)},7655:function(e,n,t){"use strict";t.d(n,{c:()=>s});var r=t(8138),i=t(7790),o=t(2316),l=t(5490),a=t(3268),c=t(2864);function s(e){var n=e.className,t=e.title,s=e.status,u=e.canClose,d=e.fancy,f=e.onDragStart,h=e.onClose,m=e.children;c.J3.dispatch;var p="string"==typeof t&&t===t.toLowerCase()&&(0,a.Sn)(t)||t;return(0,r.jsxs)("div",{className:(0,l.Ly)(["TitleBar",n]),children:[(0,r.jsx)("div",{className:"TitleBar__dragZone",onMouseDown:function(e){return d&&f&&f(e)}}),void 0===s?(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",name:"tools",opacity:.5}):(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",color:function(e){switch(e){case o.KA:return"good";case o.bz:return"average";case o.KS:default:return"bad"}}(s),name:s===o.KS?"eye-slash":"eye"}),(0,r.jsx)("div",{className:"TitleBar__title",children:p}),!!m&&(0,r.jsx)("div",{className:"TitleBar__buttons",children:m}),!1,!!(d&&u)&&(0,r.jsx)("div",{className:"TitleBar__close",onClick:h,children:(0,r.jsx)(i.In,{className:"TitleBar__close--icon",name:"times"})})]})}t(3123)},7334:function(e,n,t){"use strict";t.d(n,{p:()=>b});var r=t(8138),i=t(4530),o=t(2316),l=t(5490),a=t(3268),c=t(2864),s=t(1956),u=t(6400),d=t(2533),f=t(9136),h=t(7655);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","fitted","children"]);return(0,r.jsx)(f.P.Content,x(p({className:(0,l.Ly)(["Window__content",n])},o),{children:t&&i||(0,r.jsx)("div",{className:"Window__contentPadding",children:i})}))}},3384:function(e,n,t){"use strict";t.d(n,{p8:()=>r.p}),t(9136),t(2372);var r=t(7334)},2533:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,v:()=>a});var o=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Generic",t=arguments.length,r=Array(t>2?t-2:0),o=2;o=2){var l=[n].concat(i(r)).map(function(e){var n;return"string"==typeof e?e:(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e.stack||String(e):JSON.stringify(e)}).filter(function(e){return e}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",ns:n,message:l})}},l=function(e){return{debug:function(){for(var n=arguments.length,t=Array(n),r=0;rc,Su:()=>s,XX:()=>u});var r,i=t(9227),o=t(1843);(0,t(2533).h)("renderer");var l=!0,a=!1;function c(){l=l||"resumed",a=!1}function s(){a=!0}function u(e){if(i.k.mark("render/start"),!r){var n=document.getElementById("react-root");r=(0,o.createRoot)(n)}r.render(e),i.k.mark("render/finish"),!a&&l&&(l=!1)}},483:function(e,n,t){"use strict";t.d(n,{l:()=>f,z:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(1956),a=t(3384),c=t(4808),s=function(e,n){return function(){return(0,r.jsx)(a.p8,{children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:["notFound"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," was not found."]}),"missingExport"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," is missing an export."]})]})})}};function u(){return(0,r.jsx)(a.p8,{children:(0,r.jsx)(a.p8.Content,{scrollable:!0})})}function d(){return(0,r.jsx)(a.p8,{height:130,title:"Loading",width:150,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{align:"center",fill:!0,justify:"center",vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.In,{color:"blue",name:"toolbox",spin:!0,size:4})}),(0,r.jsx)(i.BJ.Item,{children:"Please wait..."})]})})})}function f(){var e,n=(0,o.Oc)(),t=n.suspended,r=n.config;if((0,l.Lo)().kitchenSink,t)return u;if(null==r?void 0:r.refreshing)return d;for(var i=null==r?void 0:r.interface,a=[function(e){return"./".concat(e,".tsx")},function(e){return"./".concat(e,".jsx")},function(e){return"./".concat(e,"/index.tsx")},function(e){return"./".concat(e,"/index.jsx")}];!e&&a.length>0;){var f=a.shift()(i);try{e=c(f)}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw e}}if(!e)return s("notFound",i);var h=e[i];return h||s("missingExport",i)}},7997:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2533);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(1699),o=t(7790),l=t(9582),a={title:"Storage",render:function(){return(0,r.jsx)(c,{})}},c=function(e){return window.localStorage?(0,r.jsx)(o.wn,{title:"Local Storage",buttons:(0,r.jsx)(o.$n,{icon:"recycle",onClick:function(){localStorage.clear(),i.IG.clear()},children:"Clear"}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Keys in use",children:localStorage.length}),(0,r.jsx)(o.Ki.Item,{label:"Remaining space",children:(0,l.QL)(localStorage.remainingSpace,0,"B")})]})}):(0,r.jsx)(o.IC,{children:"Local storage is not available."})}},9615:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(7218);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,sendMessage:()=>o,setupHotReloading:()=>a,subscribe:()=>i});let r=[];function i(e){r.push(e)}function o(e){}function l(e,n){}function a(){}}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,i.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(t,r){if(1&r&&(t=this(t)),8&r||"object"==typeof t&&t&&(4&r&&t.__esModule||16&r&&"function"==typeof t.then))return t;var o=Object.create(null);i.r(o);var l={};e=e||[null,n({}),n([]),n(n)];for(var a=2&r&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(e=>{l[e]=()=>t[e]});return l.default=()=>t,i.d(o,l),o},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.k=e=>""+e+".css",i.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.p="/",i.rv=()=>"1.5.8",i.ruid="bundler=rspack@1.5.8",(()=>{"use strict";var e,n=i(8138);i(5810),i(8232),i(5153),i(4620),i(9258),i(3001),i(4648),i(5616),i(2186),i(6070),i(8523),i(4372),i(8500),i(9782),i(9770);var t=i(9227),r=i(1128),o=i(1874),l=i(2864),a=i(4530),c=i(8595),s=i(2533);function u(){return(0,a.useEffect)(function(){0===Object.keys(Byond.iconRefMap).length&&(function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return fetch(n,t).catch(function(){return new Promise(function(i){setTimeout(function(){e(n,t,r).then(i)},r)})})})((0,c.l)("icon_ref_map.json")).then(function(e){return e.json()}).then(function(e){return Byond.iconRefMap=e}).catch(function(e){return s.v.log(e)})},[]),null}function d(){return(0,n.jsx)(a.Suspense,{fallback:null,children:(0,n.jsx)(u,{})})}function f(){var e=(0,i(483).l)(l.J3);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,{}),(0,n.jsx)(d,{})]})}var h=function(){document.addEventListener("click",function(e){for(var n=e.target;;){if(!n||n===document.body)return;if("a"===String(n.tagName).toLowerCase())break;n=n.parentElement}var t=n.getAttribute("href")||"";if(!("?"===t.charAt(0)||t.startsWith("byond://"))){e.preventDefault();var r=t;r.toLowerCase().startsWith("www")&&(r="https://"+r),Byond.sendMessage({type:"openLink",url:r})}})},m=i(2901),p=i(5900);function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?t-1:0),i=1;ie.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},t=n.sideEffects,r=n.reducer,i=n.middleware,o=b([(0,p.HY)({debug:y.A$,backend:l.jB}),r]),a=void 0===t||t?w((null==i?void 0:i.pre)||[]).concat([c.h,l.pX],w((null==i?void 0:i.post)||[])):[],s=p.Tw.apply(void 0,w(a)),u=(0,p.y$)(o,s);return window.__store__=u,window.__augmentStack__=(e=u,function(n,t){(t=t||Error(n.split("\n")[0])).stack=t.stack||n,k.log("FatalError:",t);var r,i,o=e.getState(),l=null==o||null==(r=o.backend)?void 0:r.config;return n+"\nUser Agent: "+navigator.userAgent+"\nState: "+JSON.stringify({ckey:null==l||null==(i=l.client)?void 0:i.ckey,interface:null==l?void 0:l.interface,window:null==l?void 0:l.window})}),u}();!function e(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):((0,l.H$)(_),(0,r.y4)(),(0,o.Bm)({keyUpVerb:"Key_Up",keyDownVerb:"Key_Down",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}}),h(),_.subscribe(function(){return(0,m.XX)((0,n.jsx)(f,{}))}),Byond.subscribe(function(e,n){return _.dispatch({type:e,payload:n})}))}()})()})(); \ No newline at end of file +(()=>{var e,n,t={222:function(e,n,t){var r={"./pai_atmosphere.jsx":"2817","./pai_bioscan.jsx":"7716","./pai_directives.jsx":"1091","./pai_doorjack.jsx":"9316","./pai_main_menu.jsx":"5042","./pai_manifest.jsx":"702","./pai_medrecords.jsx":"9513","./pai_messenger.jsx":"984","./pai_radio.jsx":"9028","./pai_secrecords.jsx":"6838","./pai_signaler.jsx":"4244"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=222},2721:function(e,n,t){var r={"./pda_atmos_scan.jsx":"8539","./pda_cookbook.jsx":"5246","./pda_games.jsx":"2336","./pda_janitor.jsx":"3606","./pda_main_menu.jsx":"2526","./pda_manifest.jsx":"4642","./pda_medical.jsx":"1212","./pda_messenger.jsx":"3260","./pda_minesweeper.jsx":"3067","./pda_mule.jsx":"5030","./pda_nanobank.jsx":"9749","./pda_notes.jsx":"3194","./pda_power.jsx":"4702","./pda_secbot.jsx":"6651","./pda_security.jsx":"7155","./pda_signaler.jsx":"7024","./pda_status_display.jsx":"7148","./pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=2721},4808:function(e,n,t){var r={"./AICard":"9609","./AICard.jsx":"9609","./AIControllerDebugger":"1664","./AIControllerDebugger.tsx":"1664","./AIFixer":"8679","./AIFixer.jsx":"8679","./AIProgramPicker":"5233","./AIProgramPicker.jsx":"5233","./AIResourceManagementConsole":"9991","./AIResourceManagementConsole.jsx":"9991","./APC":"731","./APC.jsx":"731","./ATM":"6181","./ATM.jsx":"6181","./AccountsUplinkTerminal":"4558","./AccountsUplinkTerminal.jsx":"4558","./AdminAntagMenu":"3840","./AdminAntagMenu.jsx":"3840","./AgentCard":"2794","./AgentCard.tsx":"2794","./AiAirlock":"8706","./AiAirlock.jsx":"8706","./AirAlarm":"5486","./AirAlarm.jsx":"5486","./AirlockAccessController":"6962","./AirlockAccessController.jsx":"6962","./AirlockElectronics":"9281","./AirlockElectronics.tsx":"9281","./AlertModal":"934","./AlertModal.tsx":"934","./AntagInfoHeretic":"2712","./AntagInfoHeretic.tsx":"2712","./AppearanceChanger":"6473","./AppearanceChanger.jsx":"6473","./ArcadeBattle":"6085","./ArcadeBattle.tsx":"6085","./AtmosAlertConsole":"3438","./AtmosAlertConsole.jsx":"3438","./AtmosControl":"4788","./AtmosControl.jsx":"4788","./AtmosFilter":"1937","./AtmosFilter.jsx":"1937","./AtmosMixer":"7440","./AtmosMixer.jsx":"7440","./AtmosPump":"7897","./AtmosPump.jsx":"7897","./AtmosTankControl":"1164","./AtmosTankControl.jsx":"1164","./AtmosTemperatureGate":"8340","./AtmosTemperatureGate.jsx":"8340","./AugmentMenu":"6561","./AugmentMenu.jsx":"6561","./Autolathe":"8762","./Autolathe.tsx":"8762","./BioChipPad":"9766","./BioChipPad.jsx":"9766","./Biogenerator":"9968","./Biogenerator.jsx":"9968","./BloomEdit":"3764","./BloomEdit.jsx":"3764","./BlueSpaceArtilleryControl":"7166","./BlueSpaceArtilleryControl.jsx":"7166","./BluespaceTap":"8128","./BluespaceTap.jsx":"8128","./BodyScanner":"6807","./BodyScanner.jsx":"6807","./BookBinder":"2790","./BookBinder.jsx":"2790","./BotCall":"1326","./BotCall.jsx":"1326","./BotClean":"9091","./BotClean.jsx":"9091","./BotFloor":"3578","./BotFloor.jsx":"3578","./BotHonk":"5144","./BotHonk.jsx":"5144","./BotMed":"2078","./BotMed.jsx":"2078","./BotMule":"881","./BotMule.jsx":"881","./BotSecurity":"752","./BotSecurity.jsx":"752","./BrigCells":"2850","./BrigCells.jsx":"2850","./BrigTimer":"9478","./BrigTimer.jsx":"9478","./BugReportForm":"6993","./BugReportForm.tsx":"6993","./CameraConsole":"9835","./CameraConsole.tsx":"9835","./Canister":"2094","./Canister.jsx":"2094","./CardComputer":"991","./CardComputer/":"991","./CardComputer/auth_block":"1487","./CardComputer/auth_block.tsx":"1487","./CardComputer/card_details":"7542","./CardComputer/card_details.tsx":"7542","./CardComputer/index":"991","./CardComputer/index.tsx":"991","./CardComputer/job_priority":"4287","./CardComputer/job_priority.tsx":"4287","./CardComputer/job_transfer":"6530","./CardComputer/job_transfer.tsx":"6530","./CardComputer/records_log":"9490","./CardComputer/records_log.tsx":"9490","./CardComputer/types":"1488","./CardComputer/types.tsx":"1488","./CargoConsole":"6466","./CargoConsole.jsx":"6466","./Chameleon":"6205","./Chameleon.tsx":"6205","./ChangelogView":"9072","./ChangelogView.jsx":"9072","./CheckboxListInputModal":"6707","./CheckboxListInputModal.tsx":"6707","./ChemDispenser":"8573","./ChemDispenser.jsx":"8573","./ChemHeater":"6277","./ChemHeater.jsx":"6277","./ChemMaster":"9306","./ChemMaster.tsx":"9306","./CloningConsole":"2636","./CloningConsole.jsx":"2636","./CloningPod":"1558","./CloningPod.jsx":"1558","./CoinMint":"1276","./CoinMint.tsx":"1276","./ColorPickerModal":"1572","./ColorPickerModal.tsx":"1572","./ColourMatrixTester":"6851","./ColourMatrixTester.jsx":"6851","./CommunicationsComputer":"5325","./CommunicationsComputer.jsx":"5325","./CompostBin":"6185","./CompostBin.jsx":"6185","./Contractor":"4868","./Contractor.jsx":"4868","./ConveyorSwitch":"3510","./ConveyorSwitch.jsx":"3510","./CrewMonitor":"6714","./CrewMonitor.jsx":"6714","./Cryo":"2306","./Cryo.jsx":"2306","./CryopodConsole":"2394","./CryopodConsole.jsx":"2394","./DNAModifier":"3372","./DNAModifier.tsx":"3372","./DanceMachine":"4283","./DanceMachine.tsx":"4283","./DecalPainter":"5391","./DecalPainter.tsx":"5391","./DestinationTagger":"3883","./DestinationTagger.jsx":"3883","./DisposalBin":"6381","./DisposalBin.jsx":"6381","./DnaVault":"2908","./DnaVault.jsx":"2908","./DroneConsole":"2480","./DroneConsole.jsx":"2480","./EFTPOS":"1654","./EFTPOS.jsx":"1654","./ERTManager":"3991","./ERTManager.tsx":"3991","./EconomyManager":"9644","./EconomyManager.jsx":"9644","./Electropack":"6426","./Electropack.jsx":"6426","./Emojipedia":"9480","./Emojipedia.tsx":"9480","./EvolutionMenu":"9219","./EvolutionMenu.jsx":"9219","./ExosuitFabricator":"6251","./ExosuitFabricator.jsx":"6251","./ExperimentConsole":"9621","./ExperimentConsole.jsx":"9621","./ExternalAirlockController":"5091","./ExternalAirlockController.jsx":"5091","./FaxMachine":"6325","./FaxMachine.jsx":"6325","./FilingCabinet":"9788","./FilingCabinet.jsx":"9788","./FloorPainter":"26","./FloorPainter.jsx":"26","./GPS":"1561","./GPS.jsx":"1561","./GeneModder":"1259","./GeneModder.jsx":"1259","./GenericCrewManifest":"6954","./GenericCrewManifest.jsx":"6954","./GhostHudPanel":"9031","./GhostHudPanel.jsx":"9031","./GlandDispenser":"3396","./GlandDispenser.jsx":"3396","./GravityGen":"1009","./GravityGen.jsx":"1009","./GuestPass":"6294","./GuestPass.jsx":"6294","./HandheldChemDispenser":"9511","./HandheldChemDispenser.jsx":"9511","./HealthSensor":"3365","./HealthSensor.jsx":"3365","./Holodeck":"5880","./Holodeck.tsx":"5880","./IdCardModifier":"9721","./IdCardModifier.tsx":"9721","./Instrument":"6126","./Instrument.jsx":"6126","./KeyComboModal":"1783","./KeyComboModal.tsx":"1783","./KeycardAuth":"3928","./KeycardAuth.jsx":"3928","./KitchenMachine":"6706","./KitchenMachine.jsx":"6706","./LawManager":"9846","./LawManager.tsx":"9846","./LibraryComputer":"3023","./LibraryComputer.jsx":"3023","./LibraryManager":"183","./LibraryManager.jsx":"183","./ListInputModal":"1536","./ListInputModal.tsx":"1536","./Loadout":"7239","./Loadout.tsx":"7239","./LoreConsole":"5766","./LoreConsole.tsx":"5766","./MODsuit":"5531","./MODsuit.tsx":"5531","./MagnetController":"5247","./MagnetController.jsx":"5247","./MaterialContainer":"9587","./MaterialContainer.tsx":"9587","./MechBayConsole":"2433","./MechBayConsole.jsx":"2433","./MechaControlConsole":"3763","./MechaControlConsole.jsx":"3763","./MedicalRecords":"9548","./MedicalRecords.jsx":"9548","./MerchVendor":"2666","./MerchVendor.jsx":"2666","./MiningVendor":"6231","./MiningVendor.jsx":"6231","./NTRecruiter":"1972","./NTRecruiter.jsx":"1972","./Newscaster":"452","./Newscaster.jsx":"452","./Noticeboard":"6563","./Noticeboard.tsx":"6563","./NuclearBomb":"5867","./NuclearBomb.jsx":"5867","./NuclearRodFabricator":"7579","./NuclearRodFabricator.jsx":"7579","./NumberInputModal":"8007","./NumberInputModal.tsx":"8007","./ObjAccessModifier":"4965","./ObjAccessModifier.tsx":"4965","./OperatingComputer":"6499","./OperatingComputer.jsx":"6499","./Orbit":"7701","./Orbit.jsx":"7701","./OreRedemption":"5802","./OreRedemption.jsx":"5802","./PAI":"4235","./PAI.jsx":"4235","./PDA":"2740","./PDA.jsx":"2740","./Pacman":"377","./Pacman.jsx":"377","./PanDEMIC":"9454","./PanDEMIC.tsx":"9454","./ParticleAccelerator":"3566","./ParticleAccelerator.jsx":"3566","./PdaPainter":"3371","./PdaPainter.jsx":"3371","./PersonalCrafting":"6144","./PersonalCrafting.jsx":"6144","./Photocopier":"2327","./Photocopier.jsx":"2327","./PoolController":"7331","./PoolController.jsx":"7331","./PortablePump":"5562","./PortablePump.jsx":"5562","./PortableScrubber":"7920","./PortableScrubber.jsx":"7920","./PortableTurret":"2854","./PortableTurret.jsx":"2854","./PowerMonitor":"1784","./PowerMonitor.tsx":"1784","./PrisonerImplantManager":"8011","./PrisonerImplantManager.jsx":"8011","./PrisonerShuttleConsole":"2479","./PrisonerShuttleConsole.jsx":"2479","./PrizeCounter":"9083","./PrizeCounter.tsx":"9083","./QuirkMenu":"7692","./QuirkMenu.tsx":"7692","./RCD":"7076","./RCD.tsx":"7076","./RPD":"1703","./RPD.jsx":"1703","./Radio":"8930","./Radio.tsx":"8930","./RankedListInputModal":"4097","./RankedListInputModal.tsx":"4097","./ReactorMonitor":"4087","./ReactorMonitor.tsx":"4087","./ReagentGrinder":"1876","./ReagentGrinder.jsx":"1876","./ReagentsEditor":"1569","./ReagentsEditor.tsx":"1569","./RemoteSignaler":"9510","./RemoteSignaler.jsx":"9510","./RequestConsole":"5297","./RequestConsole.tsx":"5297","./RndBackupConsole":"4384","./RndBackupConsole.jsx":"4384","./RndConsole":"2247","./RndConsole/":"2247","./RndConsole/AnalyzerMenu":"4080","./RndConsole/AnalyzerMenu.jsx":"4080","./RndConsole/DataDiskMenu":"9529","./RndConsole/DataDiskMenu.jsx":"9529","./RndConsole/LatheCategory":"1465","./RndConsole/LatheCategory.jsx":"1465","./RndConsole/LatheChemicalStorage":"4154","./RndConsole/LatheChemicalStorage.jsx":"4154","./RndConsole/LatheMainMenu":"8563","./RndConsole/LatheMainMenu.jsx":"8563","./RndConsole/LatheMaterialStorage":"7635","./RndConsole/LatheMaterialStorage.jsx":"7635","./RndConsole/LatheMaterials":"5887","./RndConsole/LatheMaterials.jsx":"5887","./RndConsole/LatheMenu":"9760","./RndConsole/LatheMenu.jsx":"9760","./RndConsole/LatheSearch":"6013","./RndConsole/LatheSearch.jsx":"6013","./RndConsole/LinkMenu":"7726","./RndConsole/LinkMenu.jsx":"7726","./RndConsole/SettingsMenu":"3321","./RndConsole/SettingsMenu.jsx":"3321","./RndConsole/index":"2247","./RndConsole/index.jsx":"2247","./RndNetController":"7280","./RndNetController.jsx":"7280","./RndServer":"5156","./RndServer.jsx":"5156","./RobotSelfDiagnosis":"7868","./RobotSelfDiagnosis.jsx":"7868","./RoboticsControlConsole":"1696","./RoboticsControlConsole.jsx":"1696","./Safe":"5826","./Safe.jsx":"5826","./SatelliteControl":"1892","./SatelliteControl.jsx":"1892","./SecureStorage":"7943","./SecureStorage.jsx":"7943","./SecurityRecords":"8589","./SecurityRecords.jsx":"8589","./SeedExtractor":"6906","./SeedExtractor.tsx":"6906","./ShuttleConsole":"631","./ShuttleConsole.jsx":"631","./ShuttleManipulator":"5060","./ShuttleManipulator.jsx":"5060","./SingularityMonitor":"6448","./SingularityMonitor.jsx":"6448","./Sleeper":"1495","./Sleeper.tsx":"1495","./SlotMachine":"6526","./SlotMachine.jsx":"6526","./Smartfridge":"1645","./Smartfridge.jsx":"1645","./Smes":"1399","./Smes.tsx":"1399","./SolarControl":"1343","./SolarControl.jsx":"1343","./SpawnersMenu":"4263","./SpawnersMenu.jsx":"4263","./SpecMenu":"8729","./SpecMenu.jsx":"8729","./StackCraft":"9469","./StackCraft.tsx":"9469","./StationAlertConsole":"5592","./StationAlertConsole.jsx":"5592","./StationTraitsPanel":"5651","./StationTraitsPanel.tsx":"5651","./StripMenu":"5724","./StripMenu.tsx":"5724","./SuitStorage":"2975","./SuitStorage.jsx":"2975","./SupermatterMonitor":"4835","./SupermatterMonitor.tsx":"4835","./SyndicateComputerSimple":"2266","./SyndicateComputerSimple.jsx":"2266","./TEG":"8073","./TEG.jsx":"8073","./TachyonArray":"5808","./TachyonArray.jsx":"5808","./Tank":"5125","./Tank.jsx":"5125","./TankDispenser":"7112","./TankDispenser.jsx":"7112","./TcommsCore":"3283","./TcommsCore.jsx":"3283","./TcommsRelay":"431","./TcommsRelay.jsx":"431","./Teleporter":"5605","./Teleporter.jsx":"5605","./TelescienceConsole":"8336","./TelescienceConsole.jsx":"8336","./TempGun":"1745","./TempGun.jsx":"1745","./TextInputModal":"4273","./TextInputModal.tsx":"4273","./ThermoMachine":"9449","./ThermoMachine.jsx":"9449","./TransferValve":"1760","./TransferValve.jsx":"1760","./TurbineComputer":"6971","./TurbineComputer.jsx":"6971","./Uplink":"8380","./Uplink.tsx":"8380","./Vending":"1638","./Vending.jsx":"1638","./VolumeMixer":"2144","./VolumeMixer.jsx":"2144","./VotePanel":"7063","./VotePanel.jsx":"7063","./Wires":"7983","./Wires.jsx":"7983","./WizardApprenticeContract":"8167","./WizardApprenticeContract.jsx":"8167","./ZLevelManager":"234","./ZLevelManager.tsx":"234","./common/AccessList":"2723","./common/AccessList.tsx":"2723","./common/AtmosScan":"7276","./common/AtmosScan.tsx":"7276","./common/BeakerContents":"3013","./common/BeakerContents.tsx":"3013","./common/BotStatus":"9226","./common/BotStatus.jsx":"9226","./common/ComplexModal":"4744","./common/ComplexModal.jsx":"4744","./common/CrewManifest":"2639","./common/CrewManifest.jsx":"2639","./common/InputButtons":"1942","./common/InputButtons.tsx":"1942","./common/InterfaceLockNoticeBox":"1992","./common/InterfaceLockNoticeBox.jsx":"1992","./common/Loader":"9472","./common/Loader.tsx":"9472","./common/LoginInfo":"7352","./common/LoginInfo.jsx":"7352","./common/LoginScreen":"736","./common/LoginScreen.jsx":"736","./common/Operating":"6696","./common/Operating.tsx":"6696","./common/SearchableTableContext":"6888","./common/SearchableTableContext.tsx":"6888","./common/Signaler":"9298","./common/Signaler.jsx":"9298","./common/SimpleRecords":"4455","./common/SimpleRecords.jsx":"4455","./common/SortableTableContext":"2264","./common/SortableTableContext.tsx":"2264","./common/TabsContext":"4900","./common/TabsContext.tsx":"4900","./common/TemporaryNotice":"7482","./common/TemporaryNotice.jsx":"7482","./goonstation_PTL":"162","./goonstation_PTL/":"162","./goonstation_PTL/index":"162","./goonstation_PTL/index.jsx":"162","./pai/pai_atmosphere":"2817","./pai/pai_atmosphere.jsx":"2817","./pai/pai_bioscan":"7716","./pai/pai_bioscan.jsx":"7716","./pai/pai_directives":"1091","./pai/pai_directives.jsx":"1091","./pai/pai_doorjack":"9316","./pai/pai_doorjack.jsx":"9316","./pai/pai_main_menu":"5042","./pai/pai_main_menu.jsx":"5042","./pai/pai_manifest":"702","./pai/pai_manifest.jsx":"702","./pai/pai_medrecords":"9513","./pai/pai_medrecords.jsx":"9513","./pai/pai_messenger":"984","./pai/pai_messenger.jsx":"984","./pai/pai_radio":"9028","./pai/pai_radio.jsx":"9028","./pai/pai_secrecords":"6838","./pai/pai_secrecords.jsx":"6838","./pai/pai_signaler":"4244","./pai/pai_signaler.jsx":"4244","./pda/pda_atmos_scan":"8539","./pda/pda_atmos_scan.jsx":"8539","./pda/pda_cookbook":"5246","./pda/pda_cookbook.jsx":"5246","./pda/pda_games":"2336","./pda/pda_games.jsx":"2336","./pda/pda_janitor":"3606","./pda/pda_janitor.jsx":"3606","./pda/pda_main_menu":"2526","./pda/pda_main_menu.jsx":"2526","./pda/pda_manifest":"4642","./pda/pda_manifest.jsx":"4642","./pda/pda_medical":"1212","./pda/pda_medical.jsx":"1212","./pda/pda_messenger":"3260","./pda/pda_messenger.jsx":"3260","./pda/pda_minesweeper":"3067","./pda/pda_minesweeper.jsx":"3067","./pda/pda_mule":"5030","./pda/pda_mule.jsx":"5030","./pda/pda_nanobank":"9749","./pda/pda_nanobank.jsx":"9749","./pda/pda_notes":"3194","./pda/pda_notes.jsx":"3194","./pda/pda_power":"4702","./pda/pda_power.jsx":"4702","./pda/pda_secbot":"6651","./pda/pda_secbot.jsx":"6651","./pda/pda_security":"7155","./pda/pda_security.jsx":"7155","./pda/pda_signaler":"7024","./pda/pda_signaler.jsx":"7024","./pda/pda_status_display":"7148","./pda/pda_status_display.jsx":"7148","./pda/pda_supplyrecords":"7632","./pda/pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=4808},937:function(e,n,t){var r={"./ByondUi.stories.js":"7997","./Storage.stories.js":"6498","./Themes.stories.js":"9615"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=937},7912:function(e,n,t){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i,o=t(8014),l=t(4530),a=t(6634);function c(e){var n="https://react.dev/errors/"+e;if(1$||(e.current=R[$],R[$]=null,$--)}function L(e,n){R[++$]=e.current,e.current=n}var K=D(null),J=D(null),X=D(null),U=D(null);function F(e,n){switch(L(X,n),L(J,e),L(K,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?sj(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)e=sb(n=sj(n),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(K),L(K,e)}function V(){M(K),M(J),M(X)}function H(e){null!==e.memoizedState&&L(U,e);var n=K.current,t=sb(n,e.type);n!==t&&(L(J,e),L(K,t))}function W(e){J.current===e&&(M(K),M(J)),U.current===e&&(M(U),un._currentValue=N)}function q(e){if(void 0===n$)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);n$=n&&n[1]||"",nD=-1)":-1o||s[i]!==u[o]){var d="\n"+s[i].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=i&&0<=o);break}}}finally{G=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?q(t):""}function Q(e){try{var n="",t=null;do n+=function(e,n){switch(e.tag){case 26:case 27:case 5:return q(e.type);case 16:return q("Lazy");case 13:return e.child!==n&&null!==n?q("Suspense Fallback"):q("Suspense");case 19:return q("SuspenseList");case 0:case 15:return Y(e.type,!1);case 11:return Y(e.type.render,!1);case 1:return Y(e.type,!0);case 31:return q("Activity");default:return""}}(e,t),t=e,e=e.return;while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Z=Object.prototype.hasOwnProperty,ee=o.unstable_scheduleCallback,en=o.unstable_cancelCallback,et=o.unstable_shouldYield,er=o.unstable_requestPaint,ei=o.unstable_now,eo=o.unstable_getCurrentPriorityLevel,el=o.unstable_ImmediatePriority,ea=o.unstable_UserBlockingPriority,ec=o.unstable_NormalPriority,es=o.unstable_LowPriority,eu=o.unstable_IdlePriority,ed=o.log,ef=o.unstable_setDisableYieldValue,eh=null,em=null;function ep(e){if("function"==typeof ed&&ef(e),em&&"function"==typeof em.setStrictMode)try{em.setStrictMode(eh,e)}catch(e){}}var ex=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eg(e)/ej|0)|0},eg=Math.log,ej=Math.LN2,eb=256,ey=262144,ev=4194304;function ew(e){var n=42&e;if(0!==n)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ek(e,n,t){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var a=0x7ffffff&r;return 0!==a?0!=(r=a&~o)?i=ew(r):0!=(l&=a)?i=ew(l):t||0!=(t=a&~e)&&(i=ew(t)):0!=(a=r&~o)?i=ew(a):0!==l?i=ew(l):t||0!=(t=r&~e)&&(i=ew(t)),0===i?0:0!==n&&n!==i&&0==(n&o)&&((o=i&-i)>=(t=n&-n)||32===o&&0!=(4194048&t))?n:i}function e_(e,n){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function eC(){var e=ev;return 0==(0x3c00000&(ev<<=1))&&(ev=4194304),e}function eI(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function eS(e,n){e.pendingLanes|=n,0x10000000!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eO(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-ex(n);e.entangledLanes|=n,e.entanglements[r]=0x40000000|e.entanglements[r]|261930&t}function eA(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-ex(t),i=1<=tt),to=!1;function tl(e,n){switch(e){case"keyup":return -1!==te.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(e){return"object"===(void 0===(e=e.detail)?"undefined":r(e))&&"data"in e?e.data:null}var tc=!1,ts={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!ts[e.type]:"textarea"===n}function td(e,n,t,r){ny?nv?nv.push(r):nv=[r]:ny=r,0<(n=si(n,"onChange")).length&&(t=new nX("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var tf=null,th=null;function tm(e){c4(e,0)}function tp(e){if(e9(eH(e)))return e}function tx(e,n){if("change"===e)return n}var tg=!1;if(nI){if(nI){var tj="oninput"in document;if(!tj){var tb=document.createElement("div");tb.setAttribute("oninput","return;"),tj="function"==typeof tb.oninput}i=tj}else i=!1;tg=i&&(!document.documentMode||9=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tO(r)}}function tP(e){var n,t;e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var r=ne(e.document);n=r,null!=(t=e.HTMLIFrameElement)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t;){try{var i="string"==typeof r.contentWindow.location.href}catch(e){i=!1}if(i)e=r.contentWindow;else break;r=ne(e.document)}return r}function tE(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var tB=nI&&"documentMode"in document&&11>=document.documentMode,tz=null,tT=null,tN=null,tR=!1;function t$(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;tR||null==tz||tz!==ne(r)||(r="selectionStart"in(r=tz)&&tE(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},tN&&tS(tN,r)||(tN=r,0<(r=si(tT,"onSelect")).length&&(n=new nX("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=tz)))}function tD(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var tM={animationend:tD("Animation","AnimationEnd"),animationiteration:tD("Animation","AnimationIteration"),animationstart:tD("Animation","AnimationStart"),transitionrun:tD("Transition","TransitionRun"),transitionstart:tD("Transition","TransitionStart"),transitioncancel:tD("Transition","TransitionCancel"),transitionend:tD("Transition","TransitionEnd")},tL={},tK={};function tJ(e){if(tL[e])return tL[e];if(!tM[e])return e;var n,t=tM[e];for(n in t)if(t.hasOwnProperty(n)&&n in tK)return tL[e]=t[n];return e}nI&&(tK=document.createElement("div").style,"AnimationEvent"in window||(delete tM.animationend.animation,delete tM.animationiteration.animation,delete tM.animationstart.animation),"TransitionEvent"in window||delete tM.transitionend.transition);var tX=tJ("animationend"),tU=tJ("animationiteration"),tF=tJ("animationstart"),tV=tJ("transitionrun"),tH=tJ("transitionstart"),tW=tJ("transitioncancel"),tq=tJ("transitionend"),tG=new Map,tY="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tQ(e,n){tG.set(e,n),eQ(n,[e])}tY.push("scrollEnd");var tZ="function"==typeof reportError?reportError:function(e){if("object"===("undefined"==typeof window?"undefined":r(window))&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===(void 0===e?"undefined":r(e))&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if("object"===("undefined"==typeof process?"undefined":r(process))&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},t0=[],t1=0,t2=0;function t8(){for(var e=t1,n=t2=t1=0;n>=l,i-=l,rb=1<<32-ex(n)+i|t<f?(p=d,d=null):p=d.sibling;var x=m(r,d,a[f],c);if(null===x){null===d&&(d=p);break}e&&d&&null===x.alternate&&n(r,d),o=l(x,o,f),null===u?s=x:u.sibling=x,u=x,d=p}if(f===a.length)return t(r,d),rO&&rv(r,f),s;if(null===d){for(;fp?(x=f,f=null):x=f.sibling;var b=m(r,f,g.value,s);if(null===b){null===f&&(f=x);break}e&&f&&null===b.alternate&&n(r,f),o=l(b,o,p),null===d?u=b:d.sibling=b,d=b,f=x}if(g.done)return t(r,f),rO&&rv(r,p),u;if(null===f){for(;!g.done;p++,g=a.next())null!==(g=h(r,g.value,s))&&(o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return rO&&rv(r,p),u}for(f=i(f);!g.done;p++,g=a.next())null!==(g=j(f,r,p,g.value,s))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return e&&f.forEach(function(e){return n(r,e)}),rO&&rv(r,p),u}(u,d,f=y.call(f),b)}if("function"==typeof f.then)return s(u,d,ij(f),b);if(f.$$typeof===v)return s(u,d,rG(u,f),b);iy(u,f)}return"string"==typeof f&&""!==f||"number"==typeof f||"bigint"===(void 0===f?"undefined":r(f))?(f=""+f,null!==d&&6===d.tag?(t(u,d.sibling),(b=o(d,f)).return=u):(t(u,d),(b=ra(f,u.mode,b)).return=u),a(u=b)):t(u,d)}(s,u,d,f);return ix=null,b}catch(e){if(e===io||e===ia)throw e;var y=rn(29,e,null,s.mode);return y.lanes=f,y.return=s,y}finally{}}}var iw=iv(!0),ik=iv(!1),i_=!1;function iC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iI(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function iS(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function iO(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&a$)){var i=r.pending;return null===i?n.next=n:(n.next=i.next,i.next=n),r.pending=n,n=t7(e),t6(e,null,t),n}return t3(e,r,n,t),t7(e)}function iA(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194048&t))){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,eA(e,t)}}function iP(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var i=null,o=null;if(null!==(t=t.firstBaseUpdate)){do{var l={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};null===o?i=o=l:o=o.next=l,t=t.next}while(null!==t);null===o?i=o=n:o=o.next=n}else i=o=n;t={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=t;return}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}var iE=!1;function iB(){if(iE){var e=r6;if(null!==e)throw e}}function iz(e,n,t,r){iE=!1;var i=e.updateQueue;i_=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,s=c.next;c.next=null,null===l?o=s:l.next=s,l=c;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==l&&(null===a?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=c)}if(null!==o){var d=i.baseState;for(l=0,u=s=c=null,a=o;;){var f=-0x20000001&a.lane,m=f!==a.lane;if(m?(aL&f)===f:(r&f)===f){0!==f&&f===r4&&(iE=!0),null!==u&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=e,x=a;switch(f=n,x.tag){case 1:if("function"==typeof(p=x.payload)){d=p.call(t,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=x.payload)?p.call(t,d,f):p))break e;d=h({},d,f);break e;case 2:i_=!0}}null!==(f=a.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=i.callbacks)?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(s=u=m,c=d):u=u.next=m,l|=f;if(null===(a=a.next))if(null===(a=i.shared.pending))break;else a=(m=a).next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=s,i.lastBaseUpdate=u,null===o&&(i.shared.lanes=0),aW|=l,e.lanes=l,e.memoizedState=d}}function iT(e,n){if("function"!=typeof e)throw Error(c(191,e));e.call(n)}function iN(e,n){var t=e.callbacks;if(null!==t)for(e.callbacks=null,e=0;el?l:8;var a=z.T,c={};z.T=c,le(e,!1,n,t);try{var s=o(),u=z.S;if(null!==u&&u(c,s),null!==s&&"object"===(void 0===s?"undefined":r(s))&&"function"==typeof s.then){var d,f,h=(d=[],f={status:"pending",value:null,reason:null,then:function(e){d.push(e)}},s.then(function(){f.status="fulfilled",f.value=i;for(var e=0;e title"))),sh(o,r,t),o[eR]=e,eq(o),r=o;break e;case"link":var l=s8("link","href",i).get(r+(t.href||""));if(l){for(var a=0;aa)break;var u=c.transferSize,d=c.initiatorType;u&&sm(d)&&(l+=u*((c=c.responseEnd)s4?50:800)+p);return m.unsuspend=e,function(){m.unsuspend=null,clearTimeout(n),clearTimeout(t)}}:null)){ce=o,e.cancelPendingCommit=x(cI.bind(null,e,n,o,t,r,i,l,a,c,u,d,null,f,h)),cd(e,o,l,!s);return}}cI(e,n,o,t,r,i,l,a,c)}function cd(e,n,t,r){n&=~aG,n&=~aq,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var i=n;0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(i,{is:r.is}):l.createElement(i)}}o[eR]=n,o[e$]=r;e:for(l=n.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===n)break;for(;null===l.sibling;){if(null===l.return||l.return===n)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(n.stateNode=o,sh(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&lG(n)}}return l1(n),lY(n,n.type,null===e?null:e.memoizedProps,n.pendingProps,t),null;case 6:if(e&&null!=n.stateNode)e.memoizedProps!==r&&lG(n);else{if("string"!=typeof r&&null===n.stateNode)throw Error(c(166));if(e=X.current,rN(n)){if(e=n.stateNode,t=n.memoizedProps,r=null,null!==(i=rI))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[eR]=n,(e=!!(e.nodeValue===t||null!==r&&!0===r.suppressHydrationWarning||su(e.nodeValue,t)))||rB(n,!0)}else(e=sg(e).createTextNode(r))[eR]=n,n.stateNode=e}return l1(n),null;case 31:if(t=n.memoizedState,null===e||null!==e.memoizedState){if(r=rN(n),null!==t){if(null===e){if(!r)throw Error(c(318));if(!(e=null!==(e=n.memoizedState)?e.dehydrated:null))throw Error(c(557));e[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),e=!1}else t=r$(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e){if(256&n.flags)return iH(n),n;return iH(n),null}if(0!=(128&n.flags))throw Error(c(558))}return l1(n),null;case 13:if(r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=rN(n),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(c(318));if(!(i=null!==(i=n.memoizedState)?i.dehydrated:null))throw Error(c(317));i[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),i=!1}else i=r$(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i){if(256&n.flags)return iH(n),n;return iH(n),null}}if(iH(n),0!=(128&n.flags))return n.lanes=t,n;return t=null!==r,e=null!==e&&null!==e.memoizedState,t&&(r=n.child,i=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),t!==e&&t&&(n.child.flags|=8192),lZ(n,n.updateQueue),l1(n),null;case 4:return V(),null===e&&se(n.stateNode.containerInfo),l1(n),null;case 10:return rX(n.type),l1(n),null;case 19:if(M(iW),null===(r=n.memoizedState))return l1(n),null;if(i=0!=(128&n.flags),null===(o=r.rendering))if(i)l0(r,!1);else{if(0!==aH||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(o=iq(e))){for(n.flags|=128,l0(r,!1),n.updateQueue=e=o.updateQueue,lZ(n,e),n.subtreeFlags=0,e=t,t=n.child;null!==t;)ri(t,e),t=t.sibling;return L(iW,1&iW.current|2),rO&&rv(n,r.treeForkCount),n.child}e=e.sibling}null!==r.tail&&ei()>a3&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304)}else{if(!i)if(null!==(e=iq(o))){if(n.flags|=128,i=!0,n.updateQueue=e=e.updateQueue,lZ(n,e),l0(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!rO)return l1(n),null}else 2*ei()-r.renderingStartTime>a3&&0x20000000!==t&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304);r.isBackwards?(o.sibling=n.child,n.child=o):(null!==(e=r.last)?e.sibling=o:n.child=o,r.last=o)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ei(),e.sibling=null,t=iW.current,L(iW,i?1&t|2:1&t),rO&&rv(n,r.treeForkCount),e;return l1(n),null;case 22:case 23:return iH(n),iL(),r=null!==n.memoizedState,null!==e?null!==e.memoizedState!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?0!=(0x20000000&t)&&0==(128&n.flags)&&(l1(n),6&n.subtreeFlags&&(n.flags|=8192)):l1(n),null!==(t=n.updateQueue)&&lZ(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),r=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(r=n.memoizedState.cachePool.pool),r!==t&&(n.flags|=2048),null!==e&&M(ie),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),rX(r1),l1(n),null;case 25:case 30:return null}throw Error(c(156,n.tag))}(n.alternate,n,aV);if(null!==t){aM=t;return}if(null!==(n=n.sibling)){aM=n;return}aM=n=e}while(null!==n);0===aH&&(aH=5)}function cC(e,n){do{var t=function(e,n){switch(r_(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return rX(r1),V(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return W(n),null;case 31:if(null!==n.memoizedState){if(iH(n),null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 13:if(iH(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return M(iW),null;case 4:return V(),null;case 10:return rX(n.type),null;case 22:case 23:return iH(n),iL(),null!==e&&M(ie),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return rX(r1),null;default:return null}}(e.alternate,e);if(null!==t){t.flags&=32767,aM=t;return}if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling)){aM=e;return}aM=e=t}while(null!==e);aH=6,aM=null}function cI(e,n,t,r,i,o,l,a,s){e.cancelPendingCommit=null;do cE();while(0!==a6);if(0!=(6&a$))throw Error(c(327));if(null!==n){if(n===e.current)throw Error(c(177));if(!function(e,n,t,r,i,o){var l=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var a=e.entanglements,c=e.expirationTimes,s=e.hiddenUpdates;for(t=l&~t;0x&&(l=x,x=p,p=l);var g=tA(a,p),j=tA(a,x);if(g&&j&&(1!==h.rangeCount||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==j.node||h.focusOffset!==j.offset)){var b=d.createRange();b.setStart(g.node,g.offset),h.removeAllRanges(),p>x?(h.addRange(b),h.extend(j.node,j.offset)):(b.setEnd(j.node,j.offset),h.addRange(b))}}}}for(d=[],h=a;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof a.focus&&a.focus(),a=0;at?32:t,z.T=null,t=ct,ct=null;var o=a7,l=ce;if(a6=0,a9=a7=null,ce=0,0!=(6&a$))throw Error(c(331));var a=a$;if(a$|=4,az(o.current),aI(o,o.current,l,t),a$=a,cH(0,!1),em&&"function"==typeof em.onPostCommitFiberRoot)try{em.onPostCommitFiberRoot(eh,o)}catch(e){}return!0}finally{T.p=i,z.T=r,cP(e,n)}}function cz(e,n,t){n=rd(t,n),n=lj(e.stateNode,n,2),null!==(e=iO(e,n,2))&&(eS(e,2),cV(e))}function cT(e,n,t){if(3===e.tag)cz(e,e,t);else for(;null!==n;){if(3===n.tag){cz(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===a4||!a4.has(r))){e=rd(t,e),null!==(r=iO(n,t=lb(2),2))&&(ly(t,r,n,e),eS(r,2),cV(r));break}}n=n.return}}function cN(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new aR;var i=new Set;r.set(n,i)}else void 0===(i=r.get(n))&&(i=new Set,r.set(n,i));i.has(t)||(aF=!0,i.add(t),e=cR.bind(null,e,n,t),n.then(e,e))}function cR(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,aD===e&&(aL&t)===t&&(4===aH||3===aH&&(0x3c00000&aL)===aL&&300>ei()-a2?0==(2&a$)&&cm(e,0):aG|=t,aQ===aL&&(aQ=0)),cV(e)}function c$(e,n){0===n&&(n=eC()),null!==(e=t4(e,n))&&(eS(e,n),cV(e))}function cD(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),c$(e,t)}function cM(e,n){var t=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(t=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(c(314))}null!==r&&r.delete(n),c$(e,t)}var cL=null,cK=null,cJ=!1,cX=!1,cU=!1,cF=0;function cV(e){e!==cK&&null===e.next&&(null===cK?cL=cK=e:cK=cK.next=e),cX=!0,cJ||(cJ=!0,sC(function(){0!=(6&a$)?ee(el,cW):cq()}))}function cH(e,n){if(!cU&&cX){cU=!0;do for(var t=!1,r=cL;null!==r;){if(!n)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var l=r.suspendedLanes,a=r.pingedLanes;o=0xc000095&(o=(1<<31-ex(42|e)+1)-1&(i&~(l&~a)))?0xc000095&o|1:o?2|o:0}0!==o&&(t=!0,cQ(r,o))}else o=aL,0==(3&(o=ek(r,r===aD?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||e_(r,o)||(t=!0,cQ(r,o));r=r.next}while(t);cU=!1}}function cW(){cq()}function cq(){cX=cJ=!1;var e,n=0;0===cF||((e=window.event)&&"popstate"===e.type?e===sv||(sv=e,0):(sv=null,1))||(n=cF);for(var t=ei(),r=null,i=cL;null!==i;){var o=i.next,l=cG(i,t);0===l?(i.next=null,null===r?cL=o:r.next=o,null===o&&(cK=r)):(r=i,(0!==n||0!=(3&l))&&(cX=!0)),i=o}0!==a6&&5!==a6||cH(n,!1),0!==cF&&(cF=0)}function cG(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-0x3c00001&e.pendingLanes;0 title"):null)}function s5(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var s4=0;function s6(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)s9(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var s7=null;function s9(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,s7=new Map,n.forEach(ue,e),s7=null,s6.call(e))}function ue(e,n){if(!(4&n.state.loading)){var t=s7.get(e);if(t)var r=t.get(null);else{t=new Map,s7.set(e,t);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oe.length)&&(n=e.length);for(var t=0,r=Array(n);ti})},2316:function(e,n,t){"use strict";t.d(n,{KA:()=>r,KS:()=>o,NE:()=>l,bz:()=>i});var r=2,i=1,o=0,l=["average","bad","black","blue","brown","good","green","grey","label","olive","orange","pink","purple","red","teal","transparent","violet","white","yellow"]},1128:function(e,n,t){"use strict";t.d(n,{Nh:()=>u,WK:()=>w,tk:()=>v,y4:()=>f});var r,i=t(7686);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};d=!!e.ignoreWindowFocus},h=!0;function m(e,n){if(d){h=!0;return}if(r&&(clearTimeout(r),r=null),n){r=setTimeout(function(){return m(e)});return}h!==e&&(h=e,u.emit(e?"window-focus":"window-blur"),u.emit("window-focus-change",e))}var p=null;function x(e){var n=String(e.tagName).toLowerCase();return"input"===n||"textarea"===n}function g(){p&&(p.removeEventListener("blur",g),p=null,u.emit("input-blur"))}var j=null,b=null,y=[];function v(e){y.push(e)}function w(e){var n=y.indexOf(e);n>=0&&y.splice(n,1)}window.addEventListener("mousemove",function(e){var n=e.target;n!==b&&(b=n,function(e){if(!p&&h)for(var n=document.body;e&&e!==n;){if(y.includes(e)){if(e.contains(j))return;j=e,e.focus();return}e=e.parentElement}}(n))}),document.addEventListener("focus",function(e){var n,t,r;if(t=e.target,null!=(r=Element)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](t):!(t instanceof r)){b=null,j=null;return}b=null,j=e.target,x(e.target)&&(n=e.target,g(),(p=n).addEventListener("blur",g),u.emit("input-focus"))},!0),document.addEventListener("blur",function(){b=null},!0),window.addEventListener("focus",function(){m(!0)}),window.addEventListener("blur",function(){b=null,m(!1,!0)}),window.addEventListener("close",function(){m(!1)});var k={},_=function(){function e(n,t,r){l(this,e),s(this,"event",void 0),s(this,"type",void 0),s(this,"code",void 0),s(this,"ctrl",void 0),s(this,"shift",void 0),s(this,"alt",void 0),s(this,"repeat",void 0),s(this,"_str",void 0),this.event=n,this.type=t,this.code=n.keyCode,this.ctrl=n.ctrlKey,this.shift=n.shiftKey,this.alt=n.altKey,this.repeat=!!r}return c(e,[{key:"hasModifierKeys",value:function(){return this.ctrl||this.alt||this.shift}},{key:"isModifierKey",value:function(){return this.code===i.Ss||this.code===i.re||this.code===i.cH}},{key:"isDown",value:function(){return"keydown"===this.type}},{key:"isUp",value:function(){return"keyup"===this.type}},{key:"toString",value:function(){return this._str||(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=i.sV&&this.code<=i.Yw?this._str+="F".concat(this.code-111):this._str+="[".concat(this.code,"]")),this._str}}]),e}();document.addEventListener("keydown",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keydown",k[n]);u.emit("keydown",t),u.emit("key",t),k[n]=!0}}),document.addEventListener("keyup",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keyup");u.emit("keyup",t),u.emit("key",t),k[n]=!1}})},9582:function(e,n,t){"use strict";t.d(n,{QL:()=>o,d5:()=>l,fU:()=>c,up:()=>a});var r=["f","p","n","μ","m"," ","k","M","G","T","P","E","Z","Y","R","Q","F","N","H"],i=r.indexOf(" ");function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-i,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Number.isFinite(e))return e.toString();var o=Math.floor(Math.max(3*n,Math.floor(Math.log10(Math.abs(e))))/3),l=r[Math.min(o+i,r.length-1)],a=(e/Math.pow(1e3,o)).toFixed(2);return a.endsWith(".00")?a=a.slice(0,-3):a.endsWith(".0")&&(a=a.slice(0,-2)),"".concat(a," ").concat(l.trim()).concat(t).trim()}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e,n,"W")}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Number.isFinite(e))return String(e);var t=Number(e.toFixed(n)),r=Math.abs(t).toString().split(".");r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");var i=r.join(".");return t<0?"-".concat(i):i}function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",t=Math.floor(e/10),r=Math.floor(t/3600),i=Math.floor(t%3600/60),o=t%60;if("short"===n)return"".concat(r>0?"".concat(r,"h"):"").concat(i>0?"".concat(i,"m"):"").concat(o>0?"".concat(o,"s"):"");var l=String(r).padStart(2,"0"),a=String(i).padStart(2,"0"),c=String(o).padStart(2,"0");return"".concat(l,":").concat(a,":").concat(c)}},1874:function(e,n,t){"use strict";t.d(n,{Bm:()=>d,ao:()=>f,sc:()=>h,zr:()=>s});var r=t(1128),i=t(7686),o={},l=[i.s6,i.Ri,i.iy,i.aW,i.Ss,i.re,i.gf,i.R,i.iU,i.zh,i.sP],a={},c=[];function s(){for(var e in a)a[e]&&(a[e]=!1,Byond.command(u.verbParamsFn(u.keyUpVerb,e)))}var u={keyDownVerb:"KeyDown",keyUpVerb:"KeyUp",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}};function d(e){e&&(u=e),Byond.winget("default.*").then(function(e){var n=function(e){return e.substring(1,e.length-1).replace(c,'"')},t={};for(var r in e){var i=r.split("."),l=i[1],a=i[2];l&&a&&(t[l]||(t[l]={}),t[l][a]=e[r])}var c=/\\"/g;for(var s in t){var u=t[s];o[n(u.name)]=n(u.command)}}),r.Nh.on("window-blur",function(){s()}),r.Nh.on("input-focus",function(){s()}),f()}function f(){r.Nh.on("key",m)}function h(){r.Nh.off("key",m)}function m(e){var n=!0,t=!1,r=void 0;try{for(var i,s=c[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)(0,i.value)(e)}catch(e){t=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(t)throw r}}!function(e){var n,t=String(e);if("Ctrl+F5"===t||"Ctrl+R"===t)return location.reload();if(!("Ctrl+F"===t||e.event.defaultPrevented||e.isModifierKey()||l.includes(e.code))){var r=16===(n=e.code)?"Shift":17===n?"Ctrl":18===n?"Alt":33===n?"Northeast":34===n?"Southeast":35===n?"Southwest":36===n?"Northwest":37===n?"West":38===n?"North":39===n?"East":40===n?"South":45===n?"Insert":46===n?"Delete":n>=48&&n<=57||n>=65&&n<=90?String.fromCharCode(n):n>=96&&n<=105?"Numpad".concat(n-96):n>=112&&n<=123?"F".concat(n-111):188===n?",":189===n?"-":190===n?".":void 0;if(r){var i=o[r];if(i)return Byond.command(i);if(e.isDown()&&!a[r]){a[r]=!0;var c=u.verbParamsFn(u.keyDownVerb,r);return Byond.command(c)}if(e.isUp()&&a[r]){a[r]=!1;var s=u.verbParamsFn(u.keyUpVerb,r);Byond.command(s)}}}}(e)}},7686:function(e,n,t){"use strict";t.d(n,{C:()=>y,Pm:()=>p,R:()=>m,Ri:()=>o,Ss:()=>a,W8:()=>g,Wy:()=>x,Yw:()=>k,aW:()=>i,bh:()=>j,cH:()=>c,gf:()=>f,hr:()=>b,iU:()=>d,iy:()=>u,re:()=>l,s6:()=>s,sP:()=>w,sV:()=>v,ye:()=>r,zh:()=>h});var r=8,i=9,o=13,l=16,a=17,c=18,s=27,u=32,d=37,f=38,h=39,m=40,p=48,x=57,g=65,j=90,b=96,y=105,v=112,w=116,k=123},925:function(e,n,t){"use strict";t.d(n,{KL:()=>o,_:()=>i});var r,i=((r={}).A="a",r.Alt="Alt",r.Backspace="Backspace",r.Control="Control",r.D="d",r.Delete="Delete",r.Down="ArrowDown",r.E="e",r.End="End",r.Enter="Enter",r.Esc="Esc",r.Escape="Escape",r.Home="Home",r.Insert="Insert",r.Left="ArrowLeft",r.Minus="-",r.N="n",r.PageDown="PageDown",r.PageUp="PageUp",r.Plus="+",r.Right="ArrowRight",r.S="s",r.Shift="Shift",r.Space=" ",r.Tab="Tab",r.Up="ArrowUp",r.W="w",r.Z="z",r);function o(e){return"Esc"===e||"Escape"===e}},6859:function(e,n,t){"use strict";function r(e,n,t){return et?t:e}function i(e){return e<0?0:e>1?1:e}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return(e-n)/(t-n)}function l(e,n){return Number.parseFloat((Math.round(e*Math.pow(10,n)+1e-4*(e>=0?1:-1))/Math.pow(10,n)).toFixed(n))}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e).toFixed(Math.max(n,0))}function c(e,n){var t=!0,r=!1,i=void 0;try{for(var o,l=Object.keys(n)[Symbol.iterator]();!(t=(o=l.next()).done);t=!0){var a,c=o.value;if((a=n[c])&&e>=a[0]&&e<=a[1])return c}}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}}function s(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)}function u(e){return 180/Math.PI*e}t.d(n,{J$:()=>i,KJ:()=>u,LI:()=>l,Lz:()=>s,Mg:()=>a,TG:()=>c,hs:()=>o,qE:()=>r})},5490:function(e,n,t){"use strict";function r(e){for(var n="",t=0;tr,b5:()=>i})},3268:function(e,n,t){"use strict";function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return JSON.stringify(e)},t=e.toLowerCase().trim();return function(e){if(!t)return!0;var r=n(e);return!!r&&r.toLowerCase().includes(t)}}function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}t.d(n,{Sn:()=>a,XZ:()=>r,ZH:()=>i,jT:()=>u});var o=["Id","Tv"],l=["A","An","And","As","At","But","By","For","For","From","In","Into","Near","Nor","Of","On","Onto","Or","The","To","With"];function a(e){if(!e)return e;var n=e.replace(/([^\W_]+[^\s-]*) */g,function(e){return i(e)}),t=!0,r=!1,a=void 0;try{for(var c,s=l[Symbol.iterator]();!(t=(c=s.next()).done);t=!0){var u=c.value,d=RegExp("\\s".concat(u,"\\s"),"g");n=n.replace(d,function(e){return e.toLowerCase()})}}catch(e){r=!0,a=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw a}}var f=!0,h=!1,m=void 0;try{for(var p,x=o[Symbol.iterator]();!(f=(p=x.next()).done);f=!0){var g=p.value,j=RegExp("\\b".concat(g,"\\b"),"g");n=n.replace(j,function(e){return e.toLowerCase()})}}catch(e){h=!0,m=e}finally{try{f||null==x.return||x.return()}finally{if(h)throw m}}return n}var c=/&(nbsp|amp|quot|lt|gt|apos|trade|copy);/g,s={amp:"&",apos:"'",cops:"\xa9",gt:">",lt:"<",nbsp:" ",quot:'"',trade:"™"};function u(e){return e?e.replace(/
    /gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(c,function(e,n){return s[n]}).replace(/&#?([0-9]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,10))}).replace(/&#x?([0-9a-f]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,16))}):e}},3375:function(e,n,t){"use strict";t.d(n,{Fl:()=>x,WP:()=>g,lO:()=>j,zA:()=>l});var r=t(2316),i=t(5490);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ttJ,z2:()=>tM,wn:()=>rr,Z8:()=>x,y5:()=>m,Rr:()=>tp,aF:()=>t1,IC:()=>t2,XI:()=>ra,zv:()=>h,ms:()=>tI,_V:()=>tj,Y0:()=>v,$n:()=>n6,cG:()=>tx,m_:()=>nQ,t1:()=>td,Nt:()=>th,so:()=>tB,Q7:()=>t6,SM:()=>rn,Ap:()=>ri,Ki:()=>tQ,pd:()=>tF,N6:()=>tH,tU:()=>rh,Wx:()=>tY,fs:()=>rg,D1:()=>ti,In:()=>I,c_:()=>tT,Hg:()=>tb,az:()=>y,BK:()=>tm,qT:()=>rv});var r,i,o,l,a=t(8138),c=t(6859),s=t(4530),u=t.t(s,2);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["as","className","children","tw"]),c=i?"".concat(i," ").concat((0,j.WP)(a)):(0,j.WP)(a);return(0,s.createElement)(void 0===r?"div":r,(n=b({},(0,j.Fl)(b({},a,(0,j.lO)(l)))),t=t={className:c},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n),o)}function v(e){var n=e.className,t=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className"]);return(0,a.jsx)(y,function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var C=/-o$/;function I(e){var n=e.name,t=void 0===n?"":n,r=e.size,i=e.spin,o=e.className,l=e.rotation,c=_(e,["name","size","spin","className","rotation"]),s=c.style||{};r&&(s.fontSize="".concat(100*r,"%")),l&&(s.transform="rotate(".concat(l,"deg)")),c.style=s;var u=(0,j.Fl)(c),d="";if(t.startsWith("tg-"))d=t;else{var f=C.test(t),h=t.replace(C,""),m=!h.startsWith("fa-");d=f?"far ":"fas ",m&&(d+="fa-"),d+=h,i&&(d+=" fa-spin")}return(0,a.jsx)("i",k({className:(0,g.Ly)(["Icon",d,o,(0,j.WP)(c)])},u))}function S(){return"undefined"!=typeof window}function O(e){return E(e)?(e.nodeName||"").toLowerCase():"#document"}function A(e){var n;return(null==e||null==(n=e.ownerDocument)?void 0:n.defaultView)||window}function P(e){var n;return null==(n=(E(e)?e.ownerDocument:e.document)||window.document)?void 0:n.documentElement}function E(e){return!!S()&&(e instanceof Node||e instanceof A(e).Node)}function B(e){return!!S()&&(e instanceof Element||e instanceof A(e).Element)}function z(e){return!!S()&&(e instanceof HTMLElement||e instanceof A(e).HTMLElement)}function T(e){return!!S()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof A(e).ShadowRoot)}(I||(I={})).Stack=function(e){var n,t,r=e.className,i=e.children,o=e.size,l=_(e,["className","children","size"]),c=l.style||{};return o&&(c.fontSize="".concat(100*o,"%")),l.style=c,(0,a.jsx)("span",(n=k({className:(0,g.Ly)(["IconStack",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};let N=new Set(["inline","contents"]);function R(e){let{overflow:n,overflowX:t,overflowY:r,display:i}=H(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+t)&&!N.has(i)}let $=new Set(["table","td","th"]),D=[":popover-open",":modal"];function M(e){return D.some(n=>{try{return e.matches(n)}catch(e){return!1}})}let L=["transform","translate","scale","rotate","perspective"],K=["transform","translate","scale","rotate","perspective","filter"],J=["paint","layout","strict","content"];function X(e){let n=U(),t=B(e)?H(e):e;return L.some(e=>!!t[e]&&"none"!==t[e])||!!t.containerType&&"normal"!==t.containerType||!n&&!!t.backdropFilter&&"none"!==t.backdropFilter||!n&&!!t.filter&&"none"!==t.filter||K.some(e=>(t.willChange||"").includes(e))||J.some(e=>(t.contain||"").includes(e))}function U(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let F=new Set(["html","body","#document"]);function V(e){return F.has(O(e))}function H(e){return A(e).getComputedStyle(e)}function W(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===O(e))return e;let n=e.assignedSlot||e.parentNode||T(e)&&e.host||P(e);return T(n)?n.host:n}function G(e,n,t){var r;void 0===n&&(n=[]),void 0===t&&(t=!0);let i=function e(n){let t=q(n);return V(t)?n.ownerDocument?n.ownerDocument.body:n.body:z(t)&&R(t)?t:e(t)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=A(i);if(o){let e=Y(l);return n.concat(l,l.visualViewport||[],R(i)?i:[],e&&t?G(e):[])}return n.concat(i,G(i,[],t))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Q='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',Z="undefined"==typeof Element,ee=Z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,en=!Z&&Element.prototype.getRootNode?function(e){var n;return null==e||null==(n=e.getRootNode)?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},et=function e(n,t){void 0===t&&(t=!0);var r,i=null==n||null==(r=n.getAttribute)?void 0:r.call(n,"inert");return""===i||"true"===i||t&&n&&e(n.parentNode)},er=function(e){var n,t=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"contenteditable");return""===t||"true"===t},ei=function(e,n,t){if(et(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Q));return n&&ee.call(e,Q)&&r.unshift(e),r=r.filter(t)},eo=function e(n,t,r){for(var i=[],o=Array.from(n);o.length;){var l=o.shift();if(!et(l,!1))if("SLOT"===l.tagName){var a=l.assignedElements(),c=e(a.length?a:l.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:l,candidates:c})}else{ee.call(l,Q)&&r.filter(l)&&(t||!n.includes(l))&&i.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),u=!et(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&u){var d=e(!0===s?l.children:s.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:l,candidates:d})}else o.unshift.apply(o,l.children)}}return i},el=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ea=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||er(e))&&!el(e)?0:e.tabIndex},ec=function(e,n){var t=ea(e);return t<0&&n&&!el(e)?0:t},es=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},eu=function(e){return"INPUT"===e.tagName},ed=function(e,n){for(var t=0;tsummary:first-of-type")?e.parentElement:e;if(ee.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return ep(e)}else{if("function"==typeof r){for(var o=e;e;){var l=e.parentElement,a=en(e);if(l&&!l.shadowRoot&&!0===r(l))return ep(e);e=e.assignedSlot?e.assignedSlot:l||a===e.ownerDocument?l:a.host}e=o}if(em(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},eg=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;tea(n))&&!!ej(e,n)},ey=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(n)||!!(n>=0)},ev=function e(n){var t=[],r=[];return n.forEach(function(n,i){var o=!!n.scopeParent,l=o?n.scopeParent:n,a=ec(l,o),c=o?e(n.candidates):l;0===a?o?t.push.apply(t,c):t.push(l):r.push({documentOrder:i,tabIndex:a,item:n,isScope:o,content:c})}),r.sort(es).reduce(function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e},[]).concat(t)},ew=function(e,n){return ev((n=n||{}).getShadowRoot?eo([e],n.includeContainer,{filter:eb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ey}):ei(e,n.includeContainer,eb.bind(null,n)))};function ek(e,n){if(!e||!n)return!1;let t=null==n.getRootNode?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&T(t)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}function e_(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eC(e,n){return null!=n&&("composedPath"in e?e.composedPath().includes(n):null!=e.target&&n.contains(e.target))}function eI(e){return(null==e?void 0:e.ownerDocument)||document}function eS(e,n,t){return void 0===t&&(t=!0),e.filter(e=>{var r;return e.parentId===n&&(!t||(null==(r=e.context)?void 0:r.open))}).flatMap(n=>[n,...eS(e,n.id,t)])}function eO(e,n){let t=["mouse","pen"];return n||t.push("",void 0),t.includes(e)}var eA="undefined"!=typeof document?s.useLayoutEffect:function(){};function eP(e){let n=s.useRef(e);return eA(()=>{n.current=e}),n}let eE={...u}.useInsertionEffect||(e=>e());function eB(e){let n=s.useRef(()=>{});return eE(()=>{n.current=e}),s.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eT(e,n){let t=ew(e,ez()),r=t.length;if(0===r)return;let i=function(e){let n=e.activeElement;for(;(null==(t=n)||null==(t=t.shadowRoot)?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}(eI(e)),o=t.indexOf(i);return t[-1===o?1===n?0:r-1:o+n]}function eN(e,n){let t=n||e.currentTarget,r=e.relatedTarget;return!r||!ek(t,r)}function eR(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}var e$=t(6634);let eD=Math.min,eM=Math.max,eL=Math.round,eK=Math.floor,eJ=e=>({x:e,y:e}),eX={left:"right",right:"left",bottom:"top",top:"bottom"},eU={start:"end",end:"start"};function eF(e,n){return"function"==typeof e?e(n):e}function eV(e){return e.split("-")[0]}function eH(e){return e.split("-")[1]}function eW(e){return"x"===e?"y":"x"}function eq(e){return"y"===e?"height":"width"}let eG=new Set(["top","bottom"]);function eY(e){return eG.has(eV(e))?"y":"x"}function eQ(e){return e.replace(/start|end/g,e=>eU[e])}let eZ=["left","right"],e0=["right","left"],e1=["top","bottom"],e2=["bottom","top"];function e8(e){return e.replace(/left|right|bottom|top/g,e=>eX[e])}function e3(e){let{x:n,y:t,width:r,height:i}=e;return{width:r,height:i,top:t,left:n,right:n+r,bottom:t+i,x:n,y:t}}function e5(e,n,t){let r,{reference:i,floating:o}=e,l=eY(n),a=eW(eY(n)),c=eq(a),s=eV(n),u="y"===l,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;switch(s){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch(eH(n)){case"start":r[a]-=h*(t&&u?-1:1);break;case"end":r[a]+=h*(t&&u?-1:1)}return r}let e4=async(e,n,t)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=t,a=o.filter(Boolean),c=await (null==l.isRTL?void 0:l.isRTL(n)),s=await l.getElementRects({reference:e,floating:n,strategy:i}),{x:u,y:d}=e5(s,r,c),f=r,h={},m=0;for(let t=0;tB(e)&&"body"!==O(e)),i=null,o="fixed"===H(e).position,l=o?q(e):e;for(;B(l)&&!V(l);){let n=H(l),t=X(l);t||"fixed"!==n.position||(i=null),(o?!t&&!i:!t&&"static"===n.position&&!!i&&nc.has(i.position)||R(l)&&!t&&function e(n,t){let r=q(n);return!(r===t||!B(r)||V(r))&&("fixed"===H(r).position||e(r,t))}(e,l))?r=r.filter(e=>e!==l):i=n,l=q(l)}return n.set(e,r),r}(n,this._c):[].concat(t),r],l=o[0],a=o.reduce((e,t)=>{let r=ns(n,t,i);return e.top=eM(r.top,e.top),e.right=eD(r.right,e.right),e.bottom=eD(r.bottom,e.bottom),e.left=eM(r.left,e.left),e},ns(n,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:nf,getElementRects:nh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:n,height:t}=ne(e);return{width:n,height:t}},getScale:nt,isElement:B,isRTL:function(e){return"rtl"===H(e).direction}};function np(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}var nx="undefined"!=typeof document?s.useLayoutEffect:function(){};function ng(e,n){let t,r,i;if(e===n)return!0;if(typeof e!=typeof n)return!1;if("function"==typeof e&&e.toString()===n.toString())return!0;if(e&&n&&"object"==typeof e){if(Array.isArray(e)){if((t=e.length)!==n.length)return!1;for(r=t;0!=r--;)if(!ng(e[r],n[r]))return!1;return!0}if((t=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=t;0!=r--;)if(!({}).hasOwnProperty.call(n,i[r]))return!1;for(r=t;0!=r--;){let t=i[r];if(("_owner"!==t||!e.$$typeof)&&!ng(e[t],n[t]))return!1}return!0}return e!=e&&n!=n}function nj(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nb(e,n){let t=nj(e);return Math.round(n*t)/t}function ny(e){let n=s.useRef(e);return nx(()=>{n.current=e}),n}let nv="active",nw="selected",nk={...u},n_=!1,nC=0,nI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nC++,nS=nk.useId||function(){let[e,n]=s.useState(()=>n_?nI():void 0);return eA(()=>{null==e&&n(nI())},[]),s.useEffect(()=>{n_=!0},[]),e},nO=s.createContext(null),nA=s.createContext(null),nP=()=>{var e;return(null==(e=s.useContext(nO))?void 0:e.id)||null};function nE(e){return"data-floating-ui-"+e}function nB(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let nz=nE("safe-polygon");function nT(e,n,t){if(t&&!eO(t))return 0;if("number"==typeof e)return e;if("function"==typeof e){let t=e();return"number"==typeof t?t:null==t?void 0:t[n]}return null==e?void 0:e[n]}function nN(e){return"function"==typeof e?e():e}let nR={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},n$=s.forwardRef(function(e,n){let[t,r]=s.useState();eA(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);let i={ref:n,tabIndex:0,role:t,"aria-hidden":!t||void 0,[nE("focus-guard")]:"",style:nR};return(0,a.jsx)("span",{...e,...i})}),nD=s.createContext(null),nM=nE("portal");function nL(e){let{children:n,id:t,root:r,preserveTabOrder:i=!0}=e,o=function(e){void 0===e&&(e={});let{id:n,root:t}=e,r=nS(),i=nK(),[o,l]=s.useState(null),a=s.useRef(null);return eA(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),eA(()=>{if(!r||a.current)return;let e=n?document.getElementById(n):null;if(!e)return;let t=document.createElement("div");t.id=r,t.setAttribute(nM,""),e.appendChild(t),a.current=t,l(t)},[n,r]),eA(()=>{if(null===t||!r||a.current)return;let e=t||(null==i?void 0:i.portalNode);e&&!E(e)&&(e=e.current),e=e||document.body;let o=null;n&&((o=document.createElement("div")).id=n,e.appendChild(o));let c=document.createElement("div");c.id=r,c.setAttribute(nM,""),(e=o||e).appendChild(c),a.current=c,l(c)},[n,t,r,i]),o}({id:t,root:r}),[l,c]=s.useState(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),h=s.useRef(null),m=null==l?void 0:l.modal,p=null==l?void 0:l.open,x=!!l&&!l.modal&&l.open&&i&&!!(r||o);return s.useEffect(()=>{if(o&&i&&!m)return o.addEventListener("focusin",e,!0),o.addEventListener("focusout",e,!0),()=>{o.removeEventListener("focusin",e,!0),o.removeEventListener("focusout",e,!0)};function e(e){o&&eN(e)&&("focusin"===e.type?eR:function(e){ew(e,ez()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(o)}},[o,i,m]),s.useEffect(()=>{!o||p||eR(o)},[p,o]),(0,a.jsxs)(nD.Provider,{value:s.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:h,portalNode:o,setFocusManagerState:c}),[i,o]),children:[x&&o&&(0,a.jsx)(n$,{"data-type":"outside",ref:u,onFocus:e=>{var n,t;if(eN(e,o))null==(n=f.current)||n.focus();else{let e=eT(eI(t=l?l.domReference:null).body,-1)||t;null==e||e.focus()}}}),x&&o&&(0,a.jsx)("span",{"aria-owns":o.id,style:nR}),o&&e$.createPortal(n,o),x&&o&&(0,a.jsx)(n$,{"data-type":"outside",ref:d,onFocus:e=>{var n,t;if(eN(e,o))null==(n=h.current)||n.focus();else{let n=eT(eI(t=l?l.domReference:null).body,1)||t;null==n||n.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let nK=()=>s.useContext(nD);function nJ(e){return z(e.target)&&"BUTTON"===e.target.tagName}function nX(e){return z(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}let nU={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nV=e=>{var n,t;return{escapeKey:"boolean"==typeof e?e:null!=(n=null==e?void 0:e.escapeKey)&&n,outsidePress:"boolean"==typeof e?e:null==(t=null==e?void 0:e.outsidePress)||t}};function nH(e,n,t){let r=new Map,i="item"===t,o=e;if(i&&e){let{[nv]:n,[nw]:t,...r}=e;o=r}return{..."floating"===t&&{tabIndex:-1,"data-floating-ui-focusable":""},...o,...n.map(n=>{let r=n?n[t]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,n)=>(n&&Object.entries(n).forEach(n=>{let[t,o]=n;if(!(i&&[nv,nw].includes(t)))if(0===t.indexOf("on")){if(r.has(t)||r.set(t,[]),"function"==typeof o){var l;null==(l=r.get(t))||l.push(o),e[t]=function(){for(var e,n=arguments.length,i=Array(n),o=0;oe(...i)).find(e=>void 0!==e)}}}else e[t]=o}),e),{})}}function nW(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t{let e;return e=new Map,{emit(n,t){var r;null==(r=e.get(n))||r.forEach(e=>e(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;null==(r=e.get(n))||r.delete(t)}}}),a=null!=nP(),[c,u]=s.useState(r.reference),d=eB((e,n,r)=>{o.current.openEvent=e?n:void 0,l.emit("openchange",{open:e,event:n,reason:r,nested:a}),null==t||t(e,n,r)}),f=s.useMemo(()=>({setPositionReference:u}),[]),h=s.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return s.useMemo(()=>({dataRef:o,open:n,onOpenChange:d,elements:h,events:l,floatingId:i,refs:f}),[n,d,h,l,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,i=r.elements,[o,l]=s.useState(null),[a,c]=s.useState(null),u=(null==i?void 0:i.domReference)||o,d=s.useRef(null),f=s.useContext(nA);eA(()=>{u&&(d.current=u)},[u]);let h=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=s.useState(r);ng(h,r)||m(r);let[p,x]=s.useState(null),[g,j]=s.useState(null),b=s.useCallback(e=>{e!==k.current&&(k.current=e,x(e))},[]),y=s.useCallback(e=>{e!==_.current&&(_.current=e,j(e))},[]),v=o||p,w=l||g,k=s.useRef(null),_=s.useRef(null),C=s.useRef(d),I=null!=c,S=ny(c),O=ny(i),A=ny(u),P=s.useCallback(()=>{var e,r;let i,o,l;if(!k.current||!_.current)return;let a={placement:n,strategy:t,middleware:h};O.current&&(a.platform=O.current),(e=k.current,r=_.current,i=new Map,l={...(o={platform:nm,...a}).platform,_c:i},e4(e,r,{...o,platform:l})).then(e=>{let n={...e,isPositioned:!1!==A.current};E.current&&!ng(C.current,n)&&(C.current=n,e$.flushSync(()=>{f(n)}))})},[h,n,t,O,A]);nx(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let E=s.useRef(!1);nx(()=>(E.current=!0,()=>{E.current=!1}),[]),nx(()=>{if(v&&(k.current=v),w&&(_.current=w),v&&w){if(S.current)return S.current(v,w,P);P()}},[v,w,P,S,I]);let B=s.useMemo(()=>({reference:k,floating:_,setReference:b,setFloating:y}),[b,y]),z=s.useMemo(()=>({reference:v,floating:w}),[v,w]),T=s.useMemo(()=>{let e={position:t,left:0,top:0};if(!z.floating)return e;let n=nb(z.floating,d.x),r=nb(z.floating,d.y);return a?{...e,transform:"translate("+n+"px, "+r+"px)",...nj(z.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:n,top:r}},[t,a,z.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:P,refs:B,elements:z,floatingStyles:T}),[d,P,B,z,T])}({...e,elements:{...i,...a&&{reference:a}}}),m=s.useCallback(e=>{let n=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(n),h.refs.setReference(n)},[h.refs]),p=s.useCallback(e=>{(B(e)||null===e)&&(d.current=e,l(e)),(B(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!B(e))&&h.refs.setReference(e)},[h.refs]),x=s.useMemo(()=>({...h.refs,setReference:p,setPositionReference:m,domReference:d}),[h.refs,p,m]),g=s.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),j=s.useMemo(()=>({...h,...r,refs:x,elements:g,nodeId:n}),[h,x,g,n,r]);return eA(()=>{r.dataRef.current.floatingContext=j;let e=null==f?void 0:f.nodesRef.current.find(e=>e.id===n);e&&(e.context=j)}),s.useMemo(()=>({...h,context:j,refs:x,elements:g}),[h,x,g,j])}({middleware:[{...(void 0===(f=u=void 0===N?6:N)&&(f=0),{name:"offset",options:f,async fn(e){var n,t;let{x:r,y:i,placement:o,middlewareData:l}=e,a=await e9(e,f);return o===(null==(n=l.offset)?void 0:n.placement)&&null!=(t=l.arrow)&&t.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:o}}}}),options:[u,d]},{...{name:"flip",options:p=h={padding:6},async fn(e){var n,t,r,i,o,l,a,c;let s,u,d,{placement:f,middlewareData:h,rects:m,initialPlacement:x,platform:g,elements:j}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:_=!0,...C}=eF(p,e);if(null!=(n=h.arrow)&&n.alignmentOffset)return{};let I=eV(f),S=eY(x),O=eV(x)===x,A=await (null==g.isRTL?void 0:g.isRTL(j.floating)),P=v||(O||!_?[e8(x)]:(s=e8(x),[eQ(x),s,eQ(s)])),E="none"!==k;!v&&E&&P.push(...(u=eH(x),d=function(e,n,t){switch(e){case"top":case"bottom":if(t)return n?e0:eZ;return n?eZ:e0;case"left":case"right":return n?e1:e2;default:return[]}}(eV(x),"start"===k,A),u&&(d=d.map(e=>e+"-"+u),_&&(d=d.concat(d.map(eQ)))),d));let B=[x,...P],z=await e6(e,C),T=[],N=(null==(t=h.flip)?void 0:t.overflows)||[];if(b&&T.push(z[I]),y){let e,n,t,r,i=(l=f,a=m,void 0===(c=A)&&(c=!1),e=eH(l),t=eq(n=eW(eY(l))),r="x"===n?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[t]>a.floating[t]&&(r=e8(r)),[r,e8(r)]);T.push(z[i[0]],z[i[1]])}if(N=[...N,{placement:f,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=h.flip)?void 0:r.index)||0)+1,n=B[e];if(n&&("alignment"!==y||S===eY(n)||N.every(e=>eY(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:n}};let t=null==(i=N.filter(e=>e.overflows[0]<=0).sort((e,n)=>e.overflows[1]-n.overflows[1])[0])?void 0:i.placement;if(!t)switch(w){case"bestFit":{let e=null==(o=N.filter(e=>{if(E){let n=eY(e.placement);return n===S||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,n)=>e+n,0)]).sort((e,n)=>e[1]-n[1])[0])?void 0:o[0];e&&(t=e);break}case"initialPlacement":t=x}if(f!==t)return{reset:{placement:t}}}return{}}},options:[h,m]},{...(void 0===(b=x)&&(b={}),{name:"shift",options:b,async fn(e){let{x:n,y:t,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:n,y:t}=e;return{x:n,y:t}}},...a}=eF(b,e),c={x:n,y:t},s=await e6(e,a),u=eY(eV(r)),d=eW(u),f=c[d],h=c[u];if(i){let e="y"===d?"top":"left",n="y"===d?"bottom":"right",t=f+s[e],r=f-s[n];f=eM(t,eD(f,r))}if(o){let e="y"===u?"top":"left",n="y"===u?"bottom":"right",t=h+s[e],r=h-s[n];h=eM(t,eD(h,r))}let m=l.fn({...e,[d]:f,[u]:h});return{...m,data:{x:m.x-n,y:m.y-t,enabled:{[d]:i,[u]:o}}}}}),options:[x,j]},E&&{...{name:"size",options:w=y={apply:function(e){var n=e.rects;e.elements.floating.style.width="".concat(n.reference.width,"px")}},async fn(e){var n,t;let r,i,{placement:o,rects:l,platform:a,elements:c}=e,{apply:s=()=>{},...u}=eF(w,e),d=await e6(e,u),f=eV(o),h=eH(o),m="y"===eY(o),{width:p,height:x}=l.floating;"top"===f||"bottom"===f?(r=f,i=h===(await (null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(i=f,r="end"===h?"top":"bottom");let g=x-d.top-d.bottom,j=p-d.left-d.right,b=eD(x-d[r],g),y=eD(p-d[i],j),v=!e.middlewareData.shift,k=b,_=y;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(_=j),null!=(t=e.middlewareData.shift)&&t.enabled.y&&(k=g),v&&!h){let e=eM(d.left,0),n=eM(d.right,0),t=eM(d.top,0),r=eM(d.bottom,0);m?_=p-2*(0!==e||0!==n?e+n:eM(d.left,d.right)):k=x-2*(0!==t||0!==r?t+r:eM(d.top,d.bottom))}await s({...e,availableWidth:_,availableHeight:k});let C=await a.getDimensions(c.floating);return p!==C.width||x!==C.height?{reset:{rects:!0}}:{}}},options:[y,v]}],onOpenChange:function(e){Z(e),null==W||W(e)},open:Q,placement:J||"bottom",transform:!1,whileElementsMounted:function(e,n,t){return void 0!==K&&K(),function(e,n,t,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=nn(e),d=o||l?[...u?G(u):[],...G(n)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",t,{passive:!0}),l&&e.addEventListener("resize",t)});let f=u&&c?function(e,n){let t,r=null,i=P(e);function o(){var e;clearTimeout(t),null==(e=r)||e.disconnect(),r=null}return!function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),o();let s=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=s;if(a||n(),!f||!h)return;let m={rootMargin:-eK(d)+"px "+-eK(i.clientWidth-(u+f))+"px "+-eK(i.clientHeight-(d+h))+"px "+-eK(u)+"px",threshold:eM(0,eD(1,c))||1},p=!0;function x(n){let r=n[0].intersectionRatio;if(r!==c){if(!p)return l();r?l(!1,r):t=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||np(s,e.getBoundingClientRect())||l(),p=!1}try{r=new IntersectionObserver(x,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(x,m)}r.observe(e)}(!0),o}(u,t):null,h=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(n)})),t()}),u&&!s&&m.observe(u),m.observe(n));let p=s?no(e):null;return s&&function n(){let r=no(e);p&&!np(p,r)&&t(),p=r,i=requestAnimationFrame(n)}(),t(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",t),l&&e.removeEventListener("resize",t)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(i)}}(e,n,t,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1})}}),en=ee.refs,et=ee.floatingStyles,er=ee.context,ei=function(e,n){void 0===n&&(n={});let{open:t,elements:{floating:r}}=e,{duration:i=250}=n,o=("number"==typeof i?i:i.close)||0,[l,a]=s.useState("unmounted"),c=function(e,n){let[t,r]=s.useState(e);return e&&!t&&r(!0),s.useEffect(()=>{if(!e&&t){let e=setTimeout(()=>r(!1),n);return()=>clearTimeout(e)}},[e,t,n]),t}(t,o);return c||"close"!==l||a("unmounted"),eA(()=>{if(r){if(t){a("initial");let e=requestAnimationFrame(()=>{e$.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[t,r]),{isMounted:c,status:l}}(er,{duration:I||200}),eo=ei.isMounted,el=ei.status,ea=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:l=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:p}=n,x=s.useContext(nA),g=eB("function"==typeof c?c:()=>!1),j="function"==typeof c?g:c,b=s.useRef(!1),{escapeKey:y,outsidePress:v}=nV(m),{escapeKey:w,outsidePress:k}=nV(p),_=s.useRef(!1),C=eB(e=>{var n;if(!t||!l||!a||"Escape"!==e.key||_.current)return;let i=null==(n=o.current.floatingContext)?void 0:n.nodeId,c=x?eS(x.nodesRef.current,i):[];if(!y&&(e.stopPropagation(),c.length>0)){let e=!0;if(c.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),I=eB(e=>{var n;let t=()=>{var n;C(e),null==(n=e_(e))||n.removeEventListener("keydown",t)};null==(n=e_(e))||n.addEventListener("keydown",t)}),S=eB(e=>{var n;let t=o.current.insideReactTree;o.current.insideReactTree=!1;let l=b.current;if(b.current=!1,"click"===u&&l||t||"function"==typeof j&&!j(e))return;let a=e_(e),c="["+nE("inert")+"]",s=eI(i.floating).querySelectorAll(c),d=B(a)?a:null;for(;d&&!V(d);){let e=q(d);if(V(e)||!B(e))break;d=e}if(s.length&&B(a)&&!a.matches("html,body")&&!ek(a,i.floating)&&Array.from(s).every(e=>!ek(d,e)))return;if(z(a)&&P){let n=V(a),t=H(a),r=/auto|scroll/,i=n||r.test(t.overflowX),o=n||r.test(t.overflowY),l=i&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,c=o&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,s="rtl"===t.direction,u=c&&(s?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),d=l&&e.offsetY>a.clientHeight;if(u||d)return}let f=null==(n=o.current.floatingContext)?void 0:n.nodeId,h=x&&eS(x.nodesRef.current,f).some(n=>{var t;return eC(e,null==(t=n.context)?void 0:t.elements.floating)});if(eC(e,i.floating)||eC(e,i.domReference)||h)return;let m=x?eS(x.nodesRef.current,f):[];if(m.length>0){let e=!0;if(m.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,"outside-press")}),O=eB(e=>{var n;let t=()=>{var n;S(e),null==(n=e_(e))||n.removeEventListener(u,t)};null==(n=e_(e))||n.addEventListener(u,t)});s.useEffect(()=>{if(!t||!l)return;o.current.__escapeKeyBubbles=y,o.current.__outsidePressBubbles=v;let e=-1;function n(e){r(!1,e,"ancestor-scroll")}function c(){window.clearTimeout(e),_.current=!0}function s(){e=window.setTimeout(()=>{_.current=!1},5*!!U())}let d=eI(i.floating);a&&(d.addEventListener("keydown",w?I:C,w),d.addEventListener("compositionstart",c),d.addEventListener("compositionend",s)),j&&d.addEventListener(u,k?O:S,k);let f=[];return h&&(B(i.domReference)&&(f=G(i.domReference)),B(i.floating)&&(f=f.concat(G(i.floating))),!B(i.reference)&&i.reference&&i.reference.contextElement&&(f=f.concat(G(i.reference.contextElement)))),(f=f.filter(e=>{var n;return e!==(null==(n=d.defaultView)?void 0:n.visualViewport)})).forEach(e=>{e.addEventListener("scroll",n,{passive:!0})}),()=>{a&&(d.removeEventListener("keydown",w?I:C,w),d.removeEventListener("compositionstart",c),d.removeEventListener("compositionend",s)),j&&d.removeEventListener(u,k?O:S,k),f.forEach(e=>{e.removeEventListener("scroll",n)}),window.clearTimeout(e)}},[o,i,a,j,u,t,r,h,l,y,v,C,w,I,S,k,O]),s.useEffect(()=>{o.current.insideReactTree=!1},[o,j,u]);let A=s.useMemo(()=>({onKeyDown:C,...d&&{[nU[f]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==f&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[C,r,d,f]),P=s.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[nF[u]]:()=>{o.current.insideReactTree=!0}}),[C,u,o]);return s.useMemo(()=>l?{reference:A,floating:P}:{},[l,A,P])}(er,{ancestorScroll:!0,outsidePress:function(e){var n,t;return!C||(n=e.target,(null!=(t=Element)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t)&&!e.target.closest(C))}}),ec=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:a="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=n,h=s.useRef(),m=s.useRef(!1),p=s.useMemo(()=>({onPointerDown(e){h.current=e.pointerType},onMouseDown(e){let n=h.current;0!==e.button||"click"===a||eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"mousedown"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):(e.preventDefault(),r(!0,e.nativeEvent,"click")))},onClick(e){let n=h.current;if("mousedown"===a&&h.current){h.current=void 0;return}eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"click"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))},onKeyDown(e){h.current=void 0,!(e.defaultPrevented||!d||nJ(e))&&(" "!==e.key||nX(o)||(e.preventDefault(),m.current=!0),z(e.target)&&"A"===e.target.tagName||"Enter"!==e.key||(t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!d||nJ(e)||nX(o))&&" "===e.key&&m.current&&(m.current=!1,t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))}}),[i,o,a,u,d,r,t,f,c]);return s.useMemo(()=>l?{reference:p}:{},[l,p])}(er,{enabled:!$}),es=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:a=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:h=!0}=n,m=s.useContext(nA),p=nP(),x=eP(u),g=eP(c),j=eP(t),b=eP(f),y=s.useRef(),v=s.useRef(-1),w=s.useRef(),k=s.useRef(-1),_=s.useRef(!0),C=s.useRef(!1),I=s.useRef(()=>{}),S=s.useRef(!1),O=eB(()=>{var e;let n=null==(e=i.current.openEvent)?void 0:e.type;return(null==n?void 0:n.includes("mouse"))&&"mousedown"!==n});s.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{open:n}=e;n||(nB(v),nB(k),_.current=!0,S.current=!1)}},[a,o]),s.useEffect(()=>{if(!a||!x.current||!t)return;function e(e){O()&&r(!1,e,"hover")}let n=eI(l.floating).documentElement;return n.addEventListener("mouseleave",e),()=>{n.removeEventListener("mouseleave",e)}},[l.floating,t,r,a,x,O]);let A=s.useCallback(function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t="hover");let i=nT(g.current,"close",y.current);i&&!w.current?(nB(v),v.current=window.setTimeout(()=>r(!1,e,t),i)):n&&(nB(v),r(!1,e,t))},[g,r]),P=eB(()=>{I.current(),w.current=void 0}),E=eB(()=>{if(C.current){let e=eI(l.floating).body;e.style.pointerEvents="",e.removeAttribute(nz),C.current=!1}}),z=eB(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));s.useEffect(()=>{if(a&&B(l.domReference)){let r=l.domReference,i=l.floating;return t&&r.addEventListener("mouseleave",o),h&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",n),i&&(i.addEventListener("mouseleave",o),i.addEventListener("mouseenter",c),i.addEventListener("mouseleave",s)),()=>{t&&r.removeEventListener("mouseleave",o),h&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",n),i&&(i.removeEventListener("mouseleave",o),i.removeEventListener("mouseenter",c),i.removeEventListener("mouseleave",s))}}function e(e){if(nB(v),_.current=!1,d&&!eO(y.current)||nN(b.current)>0&&!nT(g.current,"open"))return;let n=nT(g.current,"open",y.current);n?v.current=window.setTimeout(()=>{j.current||r(!0,e,"hover")},n):t||r(!0,e,"hover")}function n(e){if(z())return void E();I.current();let n=eI(l.floating);if(nB(k),S.current=!1,x.current&&i.current.floatingContext){t||nB(v),w.current=x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){E(),P(),z()||A(e,!0,"safe-polygon")}});let r=w.current;n.addEventListener("mousemove",r),I.current=()=>{n.removeEventListener("mousemove",r)};return}"touch"===y.current&&ek(l.floating,e.relatedTarget)||A(e)}function o(e){z()||i.current.floatingContext&&(null==x.current||x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){E(),P(),z()||A(e)}})(e))}function c(){nB(v)}function s(e){z()||A(e,!1)}},[l,a,e,d,h,A,P,E,r,t,j,m,g,x,i,z,b]),eA(()=>{var e,n;if(a&&t&&null!=(e=x.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&O()){C.current=!0;let e=l.floating;if(B(l.domReference)&&e){let t=eI(l.floating).body;t.setAttribute(nz,"");let r=l.domReference,i=null==m||null==(n=m.nodesRef.current.find(e=>e.id===p))||null==(n=n.context)?void 0:n.elements.floating;return i&&(i.style.pointerEvents=""),t.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{t.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,t,p,l,m,x,O]),eA(()=>{t||(y.current=void 0,S.current=!1,P(),E())},[t,P,E]),s.useEffect(()=>()=>{P(),nB(v),nB(k),E()},[a,l.domReference,P,E]);let T=s.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:n}=e;function i(){_.current||j.current||r(!0,n,"hover")}d&&!eO(y.current)||t||0===nN(b.current)||S.current&&e.movementX**2+e.movementY**2<2||(nB(k),"touch"===y.current?i():(S.current=!0,k.current=window.setTimeout(i,nN(b.current))))}}},[d,r,t,j,b]);return s.useMemo(()=>a?{reference:T}:{},[a,T])}(er,{enabled:!$,restMs:D||200}),eu=void 0!==L,ed=(n=(k=eu?[]:[ea,M?es:ec]).map(e=>null==e?void 0:e.reference),t=k.map(e=>null==e?void 0:e.floating),r=k.map(e=>null==e?void 0:e.item),i=s.useCallback(e=>nH(e,k,"reference"),n),o=s.useCallback(e=>nH(e,k,"floating"),t),l=s.useCallback(e=>nH(e,k,"item"),r),s.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])),ef=ed.getReferenceProps,eh=ed.getFloatingProps,em=ef(nq({ref:en.setReference},F&&{onClick:function(e){return e.stopPropagation()}})),ep=eh({onClick:function(){O&&er.onOpenChange(!1)},ref:en.setFloating});(0,s.useEffect)(function(){eu&&er.onOpenChange(L)},[L]),_=(0,s.isValidElement)(S)?(0,s.cloneElement)(S,em):(0,a.jsx)("div",nG(nq({},em),{children:S}));var ex=(0,a.jsx)("div",nG(nq({className:(0,g.Ly)(["Floating",!I&&"Floating--animated",T]),"data-position":er.placement,"data-transition":el,style:nq({},et,R)},ep),{children:A}));return(0,a.jsxs)(a.Fragment,{children:[_,eo&&!!A&&(X?ex:(0,a.jsx)(nL,{id:"tgui-root",children:ex}))]})}function nQ(e){var n=e.content,t=e.children,r=e.position;return(0,a.jsx)(nY,{content:n,contentClasses:"Tooltip",hoverOpen:!0,placement:r,children:t})}function nZ(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function n5(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return nZ(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nZ(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n4(e,n){var t,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var s=[a,c];if(t)throw TypeError("Generator is already executing.");for(;l&&(l=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]e.length)&&(n=e.length);for(var t=0,r=Array(n);t2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i=arguments.length,o=Array(i),l=0;l=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["params","phonehome"]),i=(0,s.useRef)(null),o=(0,s.useRef)(function(e){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],t=tr.length;tr.push(null);var r=e||"byondui_".concat(t);return{render:function(e){n&&Byond.sendMessage("renderByondUi",{renderByondUi:r}),tr[t]=r,Byond.winset(r,e)},unmount:function(){n&&Byond.sendMessage("unmountByondUi",{renderByondUi:r}),tr[t]=null,Byond.winset(r,{parent:""})}}}(null==n?void 0:n.id,t));function l(){var e=i.current;if(e){var t,r,l,a=(r=null!=(t=window.devicePixelRatio)?t:1,{pos:[(l=e.getBoundingClientRect()).left*r,l.top*r],size:[(l.right-l.left)*r,(l.bottom-l.top)*r]});o.current.render(tt(tn({parent:Byond.windowId},n),{pos:"".concat(a.pos[0],",").concat(a.pos[1]),size:"".concat(a.size[0],"x").concat(a.size[1])}))}}var c=te(function(){l()},100);return(0,s.useEffect)(function(){return window.addEventListener("resize",c),l(),function(){window.removeEventListener("resize",c),o.current.unmount()}},[]),(0,a.jsx)("div",tt(tn({ref:i},(0,j.Fl)(r)),{children:(0,a.jsx)("div",{style:{minHeight:"22px"}})}))}window.addEventListener("beforeunload",function(){for(var e=0;ee.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),h=(0,s.useRef)(null),m=ta((0,s.useState)([600,200]),2),p=m[0],x=m[1],g=function(e,n,t,r){if(0===e.length)return[];var i,o,l=to.y.apply(void 0,tc(e)),a=l.map(function(e){return(i=Math).min.apply(i,tc(e))}),c=l.map(function(e){return(o=Math).max.apply(o,tc(e))});return void 0!==t&&(a[0]=t[0],c[0]=t[1]),void 0!==r&&(a[1]=r[0],c[1]=r[1]),e.map(function(e){return(0,to.y)(e,a,c,n).map(function(e){var n=ta(e,4),t=n[0],r=n[1];return(t-r)/(n[2]-r)*n[3]})})}(void 0===r?[]:r,p,i,o);if(g.length>0){var j=g[0],b=g[g.length-1];g.push([p[0]+d,b[1]]),g.push([p[0]+d,-d]),g.push([-d,-d]),g.push([-d,j[1]])}var v=function(e){for(var n="",t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","child_mt","childStyles","color","title","buttons","icon"]),m=(n=(0,s.useState)(e.open),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tf(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tf(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],x=m[1];return(0,a.jsxs)(y,{mb:1,children:[(0,a.jsxs)("div",{className:"Table",children:[(0,a.jsx)("div",{className:"Table__cell",children:(0,a.jsx)(n6,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["content","children","className"]);return o.color=r?null:"default",o.backgroundColor=e.color||"default",(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children"]);return(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["fixBlur","fixErrors","objectFit","src"]),d=(0,s.useRef)(0),f=(0,s.useRef)(null),h=(0,j.Fl)(u);return n=tg({},h.style),t=t={imageRendering:void 0===r||r?"pixelated":"auto",objectFit:void 0===o?"fill":o},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),h.style=n,(0,s.useEffect)(function(){return function(){f.current&&clearTimeout(f.current)}},[]),(0,a.jsx)("img",tg({alt:"dm icon",onError:function(e){if(!i||d.current>=5){f.current&&clearTimeout(f.current);return}var n=e.currentTarget;f.current=setTimeout(function(){n.src="".concat(c,"?attempt=").concat(d.current),d.current++},1e3)},src:c},h))}function tb(e){var n,t=e.direction,r=e.fallback,i=e.frame,o=e.icon_state,l=e.icon,c=e.movement,s=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["direction","fallback","frame","icon_state","icon","movement"]),u=null==(n=Byond.iconRefMap)?void 0:n[l];return u?(0,a.jsx)(tj,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);tk.length-3?k.length-1:e-2;var t=z.current,r=null==t?void 0:t.children[n];t&&r&&(t.scrollTop=r.offsetTop)}function R(e){if(!(k.length<1)&&!c){var n,t=k.length-1;n=T<0?"next"===e?t:0:"next"===e?T===t?0:T+1:0===T?t:T-1,E&&r&&N(n),null==y||y(tC(k[n]))}}var $=_?"top":"bottom";return m&&($="".concat($,"-start")),(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown",O&&"Dropdown--fluid"]),children:[(0,a.jsx)(nY,{allowedOutsideClasses:".Dropdown__button",closeAfterInteract:!0,content:(0,a.jsx)("div",{className:"Dropdown__menu",ref:z,children:0===k.length?(0,a.jsx)("div",{className:"Dropdown__menu--entry",children:"No options"}):k.map(function(e){var n=tC(e);return(0,a.jsx)("div",{className:(0,g.Ly)(["Dropdown__menu--entry",S===n&&"selected"]),onClick:function(){null==y||y(n)},onKeyDown:function(e){e.key===w._.Enter&&(null==y||y(n))},children:"string"==typeof e?e:e.displayText},n)})}),contentAutoWidth:!p,contentClasses:"Dropdown__menu--wrapper",contentStyles:{width:p?(0,j.zA)(p):void 0},disabled:c,onMounted:function(){E&&r&&-1!==T&&N(T)},onOpenChange:B,placement:$,children:(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown__control","Button--color--".concat(void 0===l?"default":l),c&&"Button--disabled",m&&"Dropdown__control--icon-only",o]),onClick:function(e){(!c||E)&&(null==b||b(e))},onKeyDown:function(e){e.key!==w._.Enter||c||null==b||b(e)},style:{width:(0,j.zA)(void 0===A?15:A)},children:[d&&(0,a.jsx)(I,{className:"Dropdown__icon",name:d,rotation:f,spin:h}),!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"Dropdown__selected-text",children:u||S&&tC(S)||(void 0===C?"Select...":C)}),!x&&(0,a.jsx)(I,{className:(0,g.Ly)(["Dropdown__icon","Dropdown__icon--arrow",_&&"over",E&&"open"]),name:"chevron-down"})]})]})}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-left",onClick:function(){R("previous")}}),(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-right",onClick:function(){R("next")}})]})]})}function tS(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tP(e){return(0,g.Ly)(["Flex",e.inlineFlex&&"Flex--inline",(0,j.WP)(e)])}function tE(e){var n=e.direction,t=e.wrap,r=e.align,i=e.justify,o=tA(e,["direction","wrap","align","justify"]);return(0,j.Fl)(tS({style:tO(tS({},o.style),{alignItems:r,flexDirection:n,flexWrap:!0===t?"wrap":t,justifyContent:i})},o))}function tB(e){var n=e.className,t=tA(e,["className"]);return(0,a.jsx)("div",tS({className:(0,g.Ly)([n,tP(t)])},tE(t)))}function tz(e){var n,t=e.style,r=e.grow,i=e.order,o=e.shrink,l=e.basis,a=e.align,c=tA(e,["style","grow","order","shrink","basis","align"]),s=null!=(n=null!=l?l:e.width)?n:void 0!==r?0:void 0;return(0,j.Fl)(tS({style:tO(tS({},t),{alignSelf:a,flexBasis:(0,j.zA)(s),flexGrow:void 0!==r&&Number(r),flexShrink:void 0!==o&&Number(o),order:i})},c))}function tT(e){var n,t,r=e.asset,i=e.assetSize,o=e.base64,l=e.buttons,c=e.buttonsAlt,s=e.children,u=e.className,d=e.color,f=e.disabled,h=e.dmFallback,m=e.dmIcon,p=e.dmIconState,x=e.fluid,b=e.fallbackIcon,y=e.imageSize,v=void 0===y?64:y,w=e.imageSrc,k=e.onClick,_=e.onRightClick,C=e.selected,I=e.title,S=e.tooltip,O=e.tooltipPosition,A=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["asset","assetSize","base64","buttons","buttonsAlt","children","className","color","disabled","dmFallback","dmIcon","dmIconState","fluid","fallbackIcon","imageSize","imageSrc","onClick","onRightClick","selected","title","tooltip","tooltipPosition"]),P=(0,a.jsxs)("div",{className:"ImageButton__container",onClick:function(e){!f&&k&&k(e)},onContextMenu:function(e){e.preventDefault(),!f&&_&&_(e)},onKeyDown:function(e){"Enter"===e.key&&!f&&k&&k(e)},style:{width:x?"auto":"calc(".concat(v,"px + 0.5em + 2px)")},tabIndex:f?void 0:0,children:[(0,a.jsx)("div",{className:"ImageButton__image",children:o||w?(0,a.jsx)(tj,{height:"".concat(v,"px"),src:o?"data:image/png;base64,".concat(o):w,width:"".concat(v,"px")}):m&&p?(0,a.jsx)(tb,{fallback:h||(0,a.jsx)(tN,{icon:"spinner",size:v,spin:!0}),height:"".concat(v,"px"),icon:m,icon_state:p,width:"".concat(v,"px")}):r?(0,a.jsx)(tj,{className:(0,g.Ly)(r||[]),height:"".concat(v,"px"),style:{transform:"scale(".concat(v/(void 0===i?32:i),")"),transformOrigin:"top left"},width:"".concat(v,"px")}):(0,a.jsx)(tN,{icon:b||"question",size:v})}),x&&(I||s)?(0,a.jsxs)("div",{className:"ImageButton__content",children:[I&&(0,a.jsx)("span",{className:(0,g.Ly)(["ImageButton__content--title",!!s&&"ImageButton__content--divider"]),children:I}),s&&(0,a.jsx)("span",{className:"ImageButton__content--text",children:s})]}):s&&(0,a.jsx)("span",{className:"ImageButton__content",children:s})]});return S&&(P=(0,a.jsx)(nQ,{content:S,position:O,children:P})),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","value","minValue","maxValue","color","ranges","empty","children","fractionDigits"]),h=(0,c.hs)(t,void 0===r?0:r,void 0===i?1:i),m=void 0!==u,p=o||(0,c.TG)(t,void 0===l?{}:l)||"default",x=(0,j.Fl)(f),b=["ProgressBar",n,(0,j.WP)(f)],y={width:"".concat(100*(0,c.J$)(h),"%")};return tR.NE.includes(p)||"default"===p?b.push("ProgressBar--color--".concat(p)):(x.style=tD(t$({},x.style),{borderColor:p}),y.backgroundColor=p),(0,a.jsxs)("div",tD(t$({className:(0,g.Ly)(b)},x),{children:[(0,a.jsx)("div",{className:"ProgressBar__fill ProgressBar__fill--animated",style:y}),(0,a.jsx)("div",{className:"ProgressBar__content",children:m?u:!s&&"".concat((100*h).toFixed(void 0===d?0:d),"%")})]}))}function tL(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tJ(e){var n=e.className,t=e.vertical,r=e.fill,i=e.reverse,o=e.zebra,l=tK(e,["className","vertical","fill","reverse","zebra"]);return(0,a.jsx)("div",tL({className:(0,g.Ly)(["Stack",r&&"Stack--fill",t?"Stack--vertical":"Stack--horizontal",o&&"Stack--zebra",i&&"Stack--reverse".concat(t?"--vertical":""),n,tP(e)])},tE(tL({direction:"".concat(t?"column":"row").concat(i?"-reverse":"")},l))))}function tX(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","value"]),O=(0,s.useRef)(null),A=null!=k?k:O,P=(n=(0,s.useState)(null!=I?I:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tX(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tX(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=P[0],B=P[1];(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=A.current)||e.focus(),o&&(null==(n=A.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){A.current&&document.activeElement!==A.current&&I!==E&&B(null!=I?I:"")},[I]);var z=(0,j.Fl)(S),T=(0,g.Ly)(["Input",c&&"Input--disabled",d&&"Input--fluid",h&&"Input--monospace",(0,j.WP)(S),l]);return(0,a.jsx)("input",(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unclamped","unit","value","bipolar","popupPosition","className","color","fillValue","ranges","size","style"]);return(0,a.jsx)(tk,{dragMatrix:[0,-1],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unclamped:d,unit:f,value:h,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.handleDragStart,d=e.inputElement,f=(0,c.hs)(null!=y?y:l,o,i),v=(0,c.hs)(l,o,i),k=b||(0,c.TG)(null!=y?y:h,w)||"default",S=Math.min((v-.5)*270,225);return(0,a.jsx)(nY,{content:r,contentClasses:"Knob__popupValue",handleOpen:s,placement:p||"top",preventPortal:!0,children:(0,a.jsxs)("div",(n=tV({className:(0,g.Ly)(["Knob","Knob--color--".concat(k),m&&"Knob--bipolar",x,(0,j.WP)(I)])},(0,j.Fl)(tV({style:tV({fontSize:"".concat(_,"em")},C)},I))),t=t={onMouseDown:u,children:[(0,a.jsx)("div",{className:"Knob__circle",children:(0,a.jsx)("div",{className:"Knob__cursorBox",style:{transform:"rotate(".concat(S,"deg)")},children:(0,a.jsx)("div",{className:"Knob__cursor"})})}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringTrackPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("circle",{className:"Knob__ringTrack",cx:"50",cy:"50",r:"50"}),(0,a.jsx)("title",{children:"track"})]}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringFillPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("title",{children:"fill"}),(0,a.jsx)("circle",{className:"Knob__ringFill",cx:"50",cy:"50",r:"50",style:{strokeDashoffset:Math.max(((m?2.75:2)-1.5*f)*Math.PI*50,0)}})]}),d]},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))})}})}function tW(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tY(e){var n=e.children,t=e.wrap,r=tG(e,["children","wrap"]);return(0,a.jsx)(tB,tq(tW({align:"stretch",justify:"space-between",mx:-.5,wrap:t},r),{children:n}))}function tQ(e){var n=e.children;return(0,a.jsx)("table",{className:"LabeledList",children:(0,a.jsx)("tbody",{children:n})})}function tZ(e){var n,t,r=e.children,i=e.className,o=e.disabled,l=e.display,c=e.onClick,u=e.onMouseOver,d=(e.open,e.openWidth),f=(e.onOutsideClick,function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","className","disabled","display","onClick","onMouseOver","open","openWidth","onOutsideClick"])),h=(0,s.useRef)(null);return(0,a.jsx)(nY,{allowedOutsideClasses:".Menubar_inner",content:(0,a.jsx)("div",{className:"MenuBar__menu",style:{width:d},children:r}),children:(0,a.jsx)("div",{className:"Menubar_inner",ref:h,children:(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children","onEnter","onEscape"]);return(0,a.jsx)(tp,{className:"Modal__dimmer",onKeyDown:function(e){e.key===w._.Enter&&(null==o||o(e)),(0,w.KL)(e.key)&&(null==l||l(e))},children:(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","color","info","success","danger"]);return(0,a.jsx)(y,function(e){for(var n=1;n=o?(t.currentValue=(0,c.qE)((0,c.LI)(u/o,0)*o,r,i),t.origin=n.screenY):Math.abs(a)>s&&(t.origin=n.screenY)}else Math.abs(a)>4&&(t.dragging=!0);return t})}),t8(e,"handleDragEnd",function(n){var t=e.state,r=t.dragging,i=t.currentValue,o=e.props,l=o.onChange;if(!o.disabled){if(document.body.style["pointer-events"]="auto",clearInterval(e.dragInterval),clearTimeout(e.dragTimeout),e.setState({dragging:!1,editing:!r,previousValue:i}),r)null==l||l(i);else if(e.inputRef){var a=e.inputRef.current;a&&(a.value="".concat(i),setTimeout(function(){a.focus(),a.select()},10))}document.removeEventListener("mousemove",e.handleDragMove),document.removeEventListener("mouseup",e.handleDragEnd)}}),t8(e,"handleBlur",function(n){var t=e.state,r=t.editing,i=t.previousValue,o=e.props,l=o.minValue,a=o.maxValue,s=o.onChange;if(!o.disabled&&r){var u=(0,c.qE)(Number.parseFloat(n.target.value),l,a);if(Number.isNaN(u))return void e.setState({editing:!1});e.setState({currentValue:u,editing:!1,previousValue:u}),i!==u&&(null==s||s(u))}}),t8(e,"handleKeyDown",function(n){var t=e.props,r=t.minValue,i=t.maxValue,o=t.onChange;if(!t.disabled){var l=e.state.previousValue;if(n.key===w._.Enter){var a=(0,c.qE)(Number.parseFloat(n.currentTarget.value),r,i);if(Number.isNaN(a))return void e.setState({editing:!1});e.setState({currentValue:a,editing:!1,previousValue:a}),l!==a&&(null==o||o(a))}else(0,w.KL)(n.key)&&e.setState({editing:!1})}}),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&t5(t,e),n=[{key:"componentDidMount",value:function(){var e=Number.parseFloat(this.props.value.toString());this.setState({currentValue:e,previousValue:e})}},{key:"render",value:function(){var e=this.state,n=e.dragging,t=e.editing,r=e.currentValue,i=this.props,o=i.className,l=i.fluid,s=i.animated,u=i.unit,d=i.value,f=i.minValue,m=i.maxValue,p=i.height,x=i.width,j=i.lineHeight,b=i.fontSize,v=i.format,w=Number.parseFloat(d.toString());n&&(w=r);var k=(0,a.jsxs)("div",{className:"NumberInput__content",children:[s&&!n?(0,a.jsx)(h,{format:v,value:w}):v?v(w):w,u?" ".concat(u):""]});return(0,a.jsxs)(y,{className:(0,g.Ly)(["NumberInput",l&&"NumberInput--fluid",o]),fontSize:b,lineHeight:j,minHeight:p,minWidth:x,onMouseDown:this.handleDragStart,children:[(0,a.jsx)("div",{className:"NumberInput__barContainer",children:(0,a.jsx)("div",{className:"NumberInput__bar",style:{height:"".concat((0,c.qE)((w-f)/(m-f)*100,0,100),"%")}})}),k,(0,a.jsx)("input",{className:"NumberInput__input",onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,ref:this.inputRef,style:{display:t?"inline":"none",fontSize:b,height:p,lineHeight:j}})]})}}],function(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["allowFloats","autoFocus","autoSelect","className","disabled","expensive","fluid","maxValue","minValue","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","onValidationChange","value"]),S=(0,s.useRef)(null),O=t9((0,s.useState)(null!=C?C:m),2),A=O[0],P=O[1],E=t9((0,s.useState)(!0),2),B=E[0],z=E[1];function T(e){b&&(u?re(function(){return b(e)}):b(e))}(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=S.current)||e.focus(),o&&(null==(n=S.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){if(S.current){var e=S.current.validity.valid;B!==e&&(z(e),null==_||_(e))}},[A]),(0,s.useEffect)(function(){S.current&&document.activeElement!==S.current&&C!==A&&P(null!=C?C:m)},[C]);var N=(0,j.Fl)(I),R=(0,g.Ly)(["Input","RestrictedInput",c&&"Input--disabled",d&&"Input--fluid",p&&"Input--monospace",(0,j.WP)(I),l,!B&&"RestrictedInput--invalid"]);return(0,a.jsx)("input",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["buttons","children","className","container_id","fill","fitted","flexGrow","noTopPadding","onScroll","ref","scrollable","scrollableHorizontal","stretchContents","title"]),w=(0,g.b5)(y)||(0,g.b5)(r),k=(0,s.useRef)(null),_=null!=m?m:k;return(0,s.useEffect)(function(){return _.current&&(p||x)&&(0,rt.tk)(_.current),function(){_.current&&(0,rt.WK)(_.current)}},[]),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unit","value","className","fillValue","color","ranges","children"]),w=void 0!==y;return(0,a.jsx)(tk,{dragMatrix:[1,0],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unit:d,value:f,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.editing,d=e.handleDragStart,x=e.inputElement,k=(0,c.J$)((0,c.hs)(null!=m?m:l,o,i)),_=(0,c.J$)((0,c.hs)(l,o,i)),C=p||(0,c.TG)(null!=m?m:f,b)||"default";return(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function ra(e){var n,t,r=e.className,i=e.collapsing,o=e.children,l=rl(e,["className","collapsing","children"]);return(0,a.jsx)("table",(n=ro({className:(0,g.Ly)(["Table",i&&"Table--collapsing",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:(0,a.jsx)("tbody",{children:o})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}function rc(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function rf(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return rc(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rc(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rh(e){var n=e.className,t=e.vertical,r=e.scrollable,i=e.fill,o=e.fluid,l=e.children,c=rd(e,["className","vertical","scrollable","fill","fluid","children"]),u=(0,s.useRef)(!0),d=(0,s.useRef)(null),f=(0,s.useRef)(null),h=rf((0,s.useState)(!1),2),m=h[0],p=h[1],x=rf((0,s.useState)(!1),2),b=x[0],y=x[1];function v(e){if(d.current){var n=d.current,t=.5*n.clientWidth;n.scrollBy({left:"left"===e?-t:t,behavior:"smooth"})}}(0,s.useEffect)(function(){var e=function(){p(i.scrollLeft>0),y(i.scrollLeft+i.clientWidthMath.abs(e.deltaX)&&(i.scrollLeft+=e.deltaY)};if(r&&!t&&d.current){var i=d.current;if(!(i.scrollWidthe.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","dontUseTabForIndent","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","userMarkup","value"]),P=(0,s.useRef)(null),E=null!=_?_:P,B=(n=(0,s.useState)(null!=O?O:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return rp(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rp(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),z=B[0],T=B[1];(0,s.useEffect)(function(){(i||o)&&setTimeout(function(){var e,n;null==(e=E.current)||e.focus(),o&&(null==(n=E.current)||n.select())},1)},[]),(0,s.useEffect)(function(){E.current&&document.activeElement!==E.current&&O!==z&&T(null!=O?O:"")},[O]);var N=(0,j.Fl)(A),R=(0,g.Ly)(["Input","TextArea",f&&"Input--fluid",m&&"Input--monospace",c&&"Input--disabled",(0,j.WP)(A),l]);return(0,a.jsx)("textarea",(t=function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/g,U=RegExp(J.source),F=RegExp(X.source),V=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/[\\^$.*+?()[\]{}|]/g,Z=RegExp(Q.source),ee=/^\s+/,en=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,er=/\{\n\/\* \[wrapped with (.+)\] \*/,ei=/,? & /,eo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,el=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,ec=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ed=/^0b[01]+$/i,ef=/^\[object .+?Constructor\]$/,eh=/^0o[0-7]+$/i,em=/^(?:0|[1-9]\d*)$/,ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ex=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ej="\ud800-\udfff",eb="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ey="\\u2700-\\u27bf",ev="a-z\\xdf-\\xf6\\xf8-\\xff",ew="A-Z\\xc0-\\xd6\\xd8-\\xde",ek="\\ufe0e\\ufe0f",e_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eC="['’]",eI="["+e_+"]",eS="["+eb+"]",eO="["+ev+"]",eA="[^"+ej+e_+"\\d+"+ey+ev+ew+"]",eP="\ud83c[\udffb-\udfff]",eE="[^"+ej+"]",eB="(?:\ud83c[\udde6-\uddff]){2}",ez="[\ud800-\udbff][\udc00-\udfff]",eT="["+ew+"]",eN="\\u200d",eR="(?:"+eO+"|"+eA+")",e$="(?:"+eT+"|"+eA+")",eD="(?:"+eC+"(?:d|ll|m|re|s|t|ve))?",eM="(?:"+eC+"(?:D|LL|M|RE|S|T|VE))?",eL="(?:"+eS+"|"+eP+")?",eK="["+ek+"]?",eJ="(?:"+eN+"(?:"+[eE,eB,ez].join("|")+")"+eK+eL+")*",eX=eK+eL+eJ,eU="(?:"+["["+ey+"]",eB,ez].join("|")+")"+eX,eF="(?:"+[eE+eS+"?",eS,eB,ez,"["+ej+"]"].join("|")+")",eV=RegExp(eC,"g"),eH=RegExp(eS,"g"),eW=RegExp(eP+"(?="+eP+")|"+eF+eX,"g"),eq=RegExp([eT+"?"+eO+"+"+eD+"(?="+[eI,eT,"$"].join("|")+")",e$+"+"+eM+"(?="+[eI,eT+eR,"$"].join("|")+")",eT+"?"+eR+"+"+eD,eT+"+"+eM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eU].join("|"),"g"),eG=RegExp("["+eN+ej+eb+ek+"]"),eY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eQ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eZ=-1,e0={};e0[P]=e0[E]=e0[B]=e0[z]=e0[T]=e0[N]=e0[R]=e0[$]=e0[D]=!0,e0[f]=e0[h]=e0[O]=e0[m]=e0[A]=e0[p]=e0[x]=e0[g]=e0[b]=e0[y]=e0[v]=e0[k]=e0[_]=e0[C]=e0[S]=!1;var e1={};e1[f]=e1[h]=e1[O]=e1[A]=e1[m]=e1[p]=e1[P]=e1[E]=e1[B]=e1[z]=e1[T]=e1[b]=e1[y]=e1[v]=e1[k]=e1[_]=e1[C]=e1[I]=e1[N]=e1[R]=e1[$]=e1[D]=!0,e1[x]=e1[g]=e1[S]=!1;var e2={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e8=parseFloat,e3=parseInt,e5=(void 0===t.g?"undefined":i(t.g))=="object"&&t.g&&t.g.Object===Object&&t.g,e4=("undefined"==typeof self?"undefined":i(self))=="object"&&self&&self.Object===Object&&self,e6=e5||e4||Function("return this")(),e7="object"==i(n)&&n&&!n.nodeType&&n,e9=e7&&"object"==i(e)&&e&&!e.nodeType&&e,ne=e9&&e9.exports===e7,nn=ne&&e5.process,nt=function(){try{var e=e9&&e9.require&&e9.require("util").types;if(e)return e;return nn&&nn.binding&&nn.binding("util")}catch(e){}}(),nr=nt&&nt.isArrayBuffer,ni=nt&&nt.isDate,no=nt&&nt.isMap,nl=nt&&nt.isRegExp,na=nt&&nt.isSet,nc=nt&&nt.isTypedArray;function ns(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}function nu(e,n,t,r){for(var i=-1,o=null==e?0:e.length;++i-1}function np(e,n,t){for(var r=-1,i=null==e?0:e.length;++r-1;);return t}function nD(e,n){for(var t=e.length;t--&&n_(n,e[t],0)>-1;);return t}var nM=nA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nL=nA({"&":"&","<":"<",">":">",'"':""","'":"'"});function nK(e){return"\\"+e2[e]}function nJ(e){return eG.test(e)}function nX(e){var n=-1,t=Array(e.size);return e.forEach(function(e,r){t[++n]=[r,e]}),t}function nU(e,n){return function(t){return e(n(t))}}function nF(e,n){for(var t=-1,r=e.length,i=0,o=[];++t",""":'"',"'":"'"}),nY=function e(n){var t,en,ej,eb,ey=(n=null==n?e6:nY.defaults(e6.Object(),n,nY.pick(e6,eQ))).Array,ev=n.Date,ew=n.Error,ek=n.Function,e_=n.Math,eC=n.Object,eI=n.RegExp,eS=n.String,eO=n.TypeError,eA=ey.prototype,eP=ek.prototype,eE=eC.prototype,eB=n["__core-js_shared__"],ez=eP.toString,eT=eE.hasOwnProperty,eN=0,eR=(t=/[^.]+$/.exec(eB&&eB.keys&&eB.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",e$=eE.toString,eD=ez.call(eC),eM=e6._,eL=eI("^"+ez.call(eT).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eK=ne?n.Buffer:o,eJ=n.Symbol,eX=n.Uint8Array,eU=eK?eK.allocUnsafe:o,eF=nU(eC.getPrototypeOf,eC),eW=eC.create,eG=eE.propertyIsEnumerable,e2=eA.splice,e5=eJ?eJ.isConcatSpreadable:o,e4=eJ?eJ.iterator:o,e7=eJ?eJ.toStringTag:o,e9=function(){try{var e=ix(eC,"defineProperty");return e({},"",{}),e}catch(e){}}(),nn=n.clearTimeout!==e6.clearTimeout&&n.clearTimeout,nt=ev&&ev.now!==e6.Date.now&&ev.now,nv=n.setTimeout!==e6.setTimeout&&n.setTimeout,nA=e_.ceil,nQ=e_.floor,nZ=eC.getOwnPropertySymbols,n0=eK?eK.isBuffer:o,n1=n.isFinite,n2=eA.join,n8=nU(eC.keys,eC),n3=e_.max,n5=e_.min,n4=ev.now,n6=n.parseInt,n7=e_.random,n9=eA.reverse,te=ix(n,"DataView"),tn=ix(n,"Map"),tt=ix(n,"Promise"),tr=ix(n,"Set"),ti=ix(n,"WeakMap"),to=ix(eC,"create"),tl=ti&&new ti,ta={},tc=iK(te),ts=iK(tn),tu=iK(tt),td=iK(tr),tf=iK(ti),th=eJ?eJ.prototype:o,tm=th?th.valueOf:o,tp=th?th.toString:o;function tx(e){if(oG(e)&&!oM(e)&&!r(e,ty)){if(r(e,tb))return e;if(eT.call(e,"__wrapped__"))return iJ(e)}return new tb(e)}var tg=function(){function e(){}return function(n){if(!oq(n))return{};if(eW)return eW(n);e.prototype=n;var t=new e;return e.prototype=o,t}}();function tj(){}function tb(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}function ty(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function tv(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1},tw.prototype.set=function(e,n){var t=this.__data__,r=tP(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this},tk.prototype.clear=function(){this.size=0,this.__data__={hash:new tv,map:new(tn||tw),string:new tv}},tk.prototype.delete=function(e){var n=im(this,e).delete(e);return this.size-=!!n,n},tk.prototype.get=function(e){return im(this,e).get(e)},tk.prototype.has=function(e){return im(this,e).has(e)},tk.prototype.set=function(e,n){var t=im(this,e),r=t.size;return t.set(e,n),this.size+=+(t.size!=r),this},t_.prototype.add=t_.prototype.push=function(e){return this.__data__.set(e,a),this},t_.prototype.has=function(e){return this.__data__.has(e)};function tO(e,n,t){(o===t||oN(e[n],t))&&(o!==t||n in e)||tz(e,n,t)}function tA(e,n,t){var r=e[n];eT.call(e,n)&&oN(r,t)&&(o!==t||n in e)||tz(e,n,t)}function tP(e,n){for(var t=e.length;t--;)if(oN(e[t][0],n))return t;return -1}function tE(e,n,t,r){return tL(e,function(e,i,o){n(r,e,t(e),o)}),r}function tB(e,n){return e&&rX(n,lx(n),e)}function tz(e,n,t){"__proto__"==n&&e9?e9(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t}function tT(e,n){for(var t=-1,r=n.length,i=ey(r),l=null==e;++t=n?e:n)),e}function tR(e,n,t,r,i,l){var a,c=1&n,s=2&n,u=4&n;if(t&&(a=i?t(e,r,i,l):t(e)),o!==a)return a;if(!oq(e))return e;var d=oM(e);if(d){if(x=(h=e).length,w=new h.constructor(x),x&&"string"==typeof h[0]&&eT.call(h,"index")&&(w.index=h.index,w.input=h.input),a=w,!c)return rJ(e,a)}else{var h,x,w,S,M,L,K,J,X=ib(e),U=X==g||X==j;if(oX(e))return rR(e,c);if(X==v||X==f||U&&!i){if(a=s||U?{}:iv(e),!c){return s?(S=e,M=(J=a)&&rX(e,lg(e),J),rX(S,ij(S),M)):(L=e,K=tB(a,e),rX(L,ig(L),K))}}else{if(!e1[X])return i?e:{};a=function(e,n,t){var r,i,o=e.constructor;switch(n){case O:return r$(e);case m:case p:return new o(+e);case A:return r=t?r$(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case P:case E:case B:case z:case T:case N:case R:case $:case D:return rD(e,t);case b:return new o;case y:case C:return new o(e);case k:return(i=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,i;case _:return new o;case I:return tm?eC(tm.call(e)):{}}}(e,X,c)}}l||(l=new tC);var F=l.get(e);if(F)return F;l.set(e,a),o1(e)?e.forEach(function(r){a.add(tR(r,n,t,r,e,l))}):oY(e)&&e.forEach(function(r,i){a.set(i,tR(r,n,t,i,e,l))});var V=u?s?ic:ia:s?lg:lx,H=d?o:V(e);return nd(H||e,function(r,i){H&&(r=e[i=r]),tA(a,i,tR(r,n,t,i,e,l))}),a}function t$(e,n,t){var r=t.length;if(null==e)return!r;for(e=eC(e);r--;){var i=t[r],l=n[i],a=e[i];if(o===a&&!(i in e)||!l(a))return!1}return!0}function tD(e,n,t){if("function"!=typeof e)throw new eO(l);return iT(function(){e.apply(o,t)},n)}function tM(e,n,t,r){var i=-1,o=nm,l=!0,a=e.length,c=[],s=n.length;if(!a)return c;t&&(n=nx(n,nT(t))),r?(o=np,l=!1):n.length>=200&&(o=nR,l=!1,n=new t_(n));t:for(;++i0&&t(a)?n>1?tF(a,n-1,t,r,i):ng(i,a):r||(i[i.length]=a)}return i}var tV=rH(),tH=rH(!0);function tW(e,n){return e&&tV(e,n,lx)}function tq(e,n){return e&&tH(e,n,lx)}function tG(e,n){return nh(n,function(n){return oV(e[n])})}function tY(e,n){n=rz(n,e);for(var t=0,r=n.length;null!=e&&tn}function t1(e,n){return null!=e&&eT.call(e,n)}function t2(e,n){return null!=e&&n in eC(e)}function t8(e,n,t){for(var r=t?np:nm,i=e[0].length,l=e.length,a=l,c=ey(l),s=1/0,u=[];a--;){var d=e[a];a&&n&&(d=nx(d,nT(n))),s=n5(d.length,s),c[a]=!t&&(n||i>=120&&d.length>=120)?new t_(a&&d):o}d=e[0];var f=-1,h=c[0];t:for(;++f=a)return c;return c*("desc"==t[r]?-1:1)}}return e.index-n.index}(e,n,t)});o--;)i[o]=i[o].value;return i}function rc(e,n,t){for(var r=-1,i=n.length,o={};++r-1;)a!==e&&e2.call(a,c,1),e2.call(e,c,1);return e}function ru(e,n){for(var t=e?n.length:0,r=t-1;t--;){var i=n[t];if(t==r||i!==o){var o=i;ik(i)?e2.call(e,i,1):rC(e,i)}}return e}function rd(e,n){return e+nQ(n7()*(n-e+1))}function rf(e,n){var t="";if(!e||n<1||n>0x1fffffffffffff)return t;do n%2&&(t+=e),(n=nQ(n/2))&&(e+=e);while(n);return t}function rh(e,n){return iN(iP(e,n,lJ),e+"")}function rm(e,n,t,r){if(!oq(e))return e;n=rz(n,e);for(var i=-1,l=n.length,a=l-1,c=e;null!=c&&++ii?0:i+n),(t=t>i?i:t)<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var o=ey(i);++r>>1,l=e[o];null!==l&&!o8(l)&&(t?l<=n:l=200){var s=n?null:r7(e);if(s)return nV(s);l=!1,i=nR,c=new t_}else c=n?[]:a;t:for(;++r=r?e:rg(e,n,t)}var rN=nn||function(e){return e6.clearTimeout(e)};function rR(e,n){if(n)return e.slice();var t=e.length,r=eU?eU(t):new e.constructor(t);return e.copy(r),r}function r$(e){var n=new e.constructor(e.byteLength);return new eX(n).set(new eX(e)),n}function rD(e,n){var t=n?r$(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function rM(e,n){if(e!==n){var t=o!==e,r=null===e,i=e==e,l=o8(e),a=o!==n,c=null===n,s=n==n,u=o8(n);if(!c&&!u&&!l&&e>n||l&&a&&s&&!c&&!u||r&&a&&s||!t&&s||!i)return 1;if(!r&&!l&&!u&&e1?t[i-1]:o,a=i>2?t[2]:o;for(l=e.length>3&&"function"==typeof l?(i--,l):o,a&&i_(t[0],t[1],a)&&(l=i<3?o:l,i=1),n=eC(n);++r-1?i[l?n[a]:a]:o}}function rQ(e){return il(function(n){var t=n.length,r=t,i=tb.prototype.thru;for(e&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new eO(l);if(i&&!c&&"wrapper"==iu(a))var c=new tb([],!0)}for(r=c?r:t;++r1&&y.reverse(),f&&uc))return!1;var u=l.get(e),d=l.get(n);if(u&&d)return u==n&&d==e;var f=-1,h=!0,m=2&t?new t_:o;for(l.set(e,n),l.set(n,e);++f-1&&e%1==0&&e1?"& ":"")+n[r],n=n.join(t>2?", ":" "),e.replace(et,"{\n/* [wrapped with "+n+"] */\n")}(l,(r=(o=l.match(er))?o[1].split(ei):[],i=t,nd(d,function(e){var n="_."+e[0];i&e[1]&&!nm(r,n)&&r.push(n)}),r.sort())))}function i$(e){var n=0,t=0;return function(){var r=n4(),i=16-(r-t);if(t=r,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(o,arguments)}}function iD(e,n){var t=-1,r=e.length,i=r-1;for(n=o===n?r:n;++t1?e[n-1]:o;return t="function"==typeof t?(e.pop(),t):o,i7(e,t)});function oo(e){var n=tx(e);return n.__chain__=!0,n}function ol(e,n){return n(e)}var oa=il(function(e){var n=e.length,t=n?e[0]:0,i=this.__wrapped__,l=function(n){return tT(n,e)};return n>1||this.__actions__.length||!r(i,ty)||!ik(t)?this.thru(l):((i=i.slice(t,+t+ +!!n)).__actions__.push({func:ol,args:[l],thisArg:o}),new tb(i,this.__chain__).thru(function(e){return n&&!e.length&&e.push(o),e}))}),oc=rU(function(e,n,t){eT.call(e,t)?++e[t]:tz(e,t,1)}),os=rY(iV),ou=rY(iH);function od(e,n){return(oM(e)?nd:tL)(e,ih(n,3))}function of(e,n){return(oM(e)?function(e,n){for(var t=null==e?0:e.length;t--&&!1!==n(e[t],t,e););return e}:tK)(e,ih(n,3))}var oh=rU(function(e,n,t){eT.call(e,t)?e[t].push(n):tz(e,t,[n])}),om=rh(function(e,n,t){var r=-1,i="function"==typeof n,o=oK(e)?ey(e.length):[];return tL(e,function(e){o[++r]=i?ns(n,e,t):t3(e,n,t)}),o}),op=rU(function(e,n,t){tz(e,t,n)});function ox(e,n){return(oM(e)?nx:rt)(e,ih(n,3))}var og=rU(function(e,n,t){e[+!t].push(n)},function(){return[[],[]]}),oj=rh(function(e,n){if(null==e)return[];var t=n.length;return t>1&&i_(e,n[0],n[1])?n=[]:t>2&&i_(n[0],n[1],n[2])&&(n=[n[0]]),ra(e,tF(n,1),[])}),ob=nt||function(){return e6.Date.now()};function oy(e,n,t){return n=t?o:n,n=e&&null==n?e.length:n,ie(e,128,o,o,o,o,n)}function ov(e,n){var t;if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=o),t}}var ow=rh(function(e,n,t){var r=1;if(t.length){var i=nF(t,id(ow));r|=32}return ie(e,r,n,t,i)}),ok=rh(function(e,n,t){var r=3;if(t.length){var i=nF(t,id(ok));r|=32}return ie(n,r,e,t,i)});function o_(e,n,t){n=t?o:n;var r=ie(e,8,o,o,o,o,o,n);return r.placeholder=o_.placeholder,r}function oC(e,n,t){n=t?o:n;var r=ie(e,16,o,o,o,o,o,n);return r.placeholder=oC.placeholder,r}function oI(e,n,t){var r,i,a,c,s,u,d=0,f=!1,h=!1,m=!0;if("function"!=typeof e)throw new eO(l);function p(n){var t=r,l=i;return r=i=o,d=n,c=e.apply(l,t)}function x(e){var t=e-u,r=e-d;return o===u||t>=n||t<0||h&&r>=a}function g(){var e,t,r,i=ob();if(x(i))return j(i);s=iT(g,(e=i-u,t=i-d,r=n-e,h?n5(r,a-t):r))}function j(e){return(s=o,m&&r)?p(e):(r=i=o,c)}function b(){var e,t=ob(),l=x(t);if(r=arguments,i=this,u=t,l){if(o===s)return d=e=u,s=iT(g,n),f?p(e):c;if(h)return rN(s),s=iT(g,n),p(u)}return o===s&&(s=iT(g,n)),c}return n=ln(n)||0,oq(t)&&(f=!!t.leading,a=(h="maxWait"in t)?n3(ln(t.maxWait)||0,n):a,m="trailing"in t?!!t.trailing:m),b.cancel=function(){o!==s&&rN(s),d=0,r=u=i=s=o},b.flush=function(){return o===s?c:j(ob())},b}var oS=rh(function(e,n){return tD(e,1,n)}),oO=rh(function(e,n,t){return tD(e,ln(n)||0,t)});function oA(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new eO(l);var t=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return t.cache=o.set(i,l)||o,l};return t.cache=new(oA.Cache||tk),t}function oP(e){if("function"!=typeof e)throw new eO(l);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}oA.Cache=tk;var oE=rh(function(e,n){var t=(n=1==n.length&&oM(n[0])?nx(n[0],nT(ih())):nx(tF(n,1),nT(ih()))).length;return rh(function(r){for(var i=-1,o=n5(r.length,t);++i=n}),oD=t5(function(){return arguments}())?t5:function(e){return oG(e)&&eT.call(e,"callee")&&!eG.call(e,"callee")},oM=ey.isArray,oL=nr?nT(nr):function(e){return oG(e)&&tZ(e)==O};function oK(e){return null!=e&&oW(e.length)&&!oV(e)}function oJ(e){return oG(e)&&oK(e)}var oX=n0||l1,oU=ni?nT(ni):function(e){return oG(e)&&tZ(e)==p};function oF(e){if(!oG(e))return!1;var n=tZ(e);return n==x||"[object DOMException]"==n||"string"==typeof e.message&&"string"==typeof e.name&&!oZ(e)}function oV(e){if(!oq(e))return!1;var n=tZ(e);return n==g||n==j||"[object AsyncFunction]"==n||"[object Proxy]"==n}function oH(e){return"number"==typeof e&&e==o9(e)}function oW(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function oq(e){var n=void 0===e?"undefined":i(e);return null!=e&&("object"==n||"function"==n)}function oG(e){return null!=e&&(void 0===e?"undefined":i(e))=="object"}var oY=no?nT(no):function(e){return oG(e)&&ib(e)==b};function oQ(e){return"number"==typeof e||oG(e)&&tZ(e)==y}function oZ(e){if(!oG(e)||tZ(e)!=v)return!1;var n=eF(e);if(null===n)return!0;var t=eT.call(n,"constructor")&&n.constructor;return"function"==typeof t&&r(t,t)&&ez.call(t)==eD}var o0=nl?nT(nl):function(e){return oG(e)&&tZ(e)==k},o1=na?nT(na):function(e){return oG(e)&&ib(e)==_};function o2(e){return"string"==typeof e||!oM(e)&&oG(e)&&tZ(e)==C}function o8(e){return(void 0===e?"undefined":i(e))=="symbol"||oG(e)&&tZ(e)==I}var o3=nc?nT(nc):function(e){return oG(e)&&oW(e.length)&&!!e0[tZ(e)]},o5=r5(rn),o4=r5(function(e,n){return e<=n});function o6(e){if(!e)return[];if(oK(e))return o2(e)?nW(e):rJ(e);if(e4&&e[e4]){for(var n,t=e[e4](),r=[];!(n=t.next()).done;)r.push(n.value);return r}var i=ib(e);return(i==b?nX:i==_?nV:lC)(e)}function o7(e){return e?(e=ln(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function o9(e){var n=o7(e),t=n%1;return n==n?t?n-t:n:0}function le(e){return e?tN(o9(e),0,0xffffffff):0}function ln(e){if("number"==typeof e)return e;if(o8(e))return u;if(oq(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=oq(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=nz(e);var t=ed.test(e);return t||eh.test(e)?e3(e.slice(2),t?2:8):eu.test(e)?u:+e}function lt(e){return rX(e,lg(e))}function lr(e){return null==e?"":rk(e)}var li=rF(function(e,n){if(iO(n)||oK(n))return void rX(n,lx(n),e);for(var t in n)eT.call(n,t)&&tA(e,t,n[t])}),lo=rF(function(e,n){rX(n,lg(n),e)}),ll=rF(function(e,n,t,r){rX(n,lg(n),e,r)}),la=rF(function(e,n,t,r){rX(n,lx(n),e,r)}),lc=il(tT),ls=rh(function(e,n){e=eC(e);var t=-1,r=n.length,i=r>2?n[2]:o;for(i&&i_(n[0],n[1],i)&&(r=1);++t1),n}),rX(e,ic(e),t),r&&(t=tR(t,7,ii));for(var i=n.length;i--;)rC(t,n[i]);return t}),lv=il(function(e,n){return null==e?{}:rc(e,n,function(n,t){return lf(e,t)})});function lw(e,n){if(null==e)return{};var t=nx(ic(e),function(e){return[e]});return n=ih(n),rc(e,t,function(e,t){return n(e,t[0])})}var lk=r9(lx),l_=r9(lg);function lC(e){return null==e?[]:nN(e,lx(e))}var lI=rq(function(e,n,t){return n=n.toLowerCase(),e+(t?lS(n):n)});function lS(e){return lN(lr(e).toLowerCase())}function lO(e){return(e=lr(e))&&e.replace(ep,nM).replace(eH,"")}var lA=rq(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),lP=rq(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),lE=rW("toLowerCase"),lB=rq(function(e,n,t){return e+(t?"_":"")+n.toLowerCase()}),lz=rq(function(e,n,t){return e+(t?" ":"")+lN(n)}),lT=rq(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),lN=rW("toUpperCase");function lR(e,n,t){if(e=lr(e),n=t?o:n,o===n){var r;return(r=e,eY.test(r))?e.match(eq)||[]:e.match(eo)||[]}return e.match(n)||[]}var l$=rh(function(e,n){try{return ns(e,o,n)}catch(e){return oF(e)?e:new ew(e)}}),lD=il(function(e,n){return nd(n,function(n){tz(e,n=iL(n),ow(e[n],e))}),e});function lM(e){return function(){return e}}var lL=rQ(),lK=rQ(!0);function lJ(e){return e}function lX(e){return t9("function"==typeof e?e:tR(e,1))}var lU=rh(function(e,n){return function(t){return t3(t,e,n)}}),lF=rh(function(e,n){return function(t){return t3(e,t,n)}});function lV(e,n,t){var r=lx(n),i=tG(n,r);null!=t||oq(n)&&(i.length||!r.length)||(t=n,n=e,e=this,i=tG(n,lx(n)));var o=!(oq(t)&&"chain"in t)||!!t.chain,l=oV(e);return nd(i,function(t){var r=n[t];e[t]=r,l&&(e.prototype[t]=function(){var n=this.__chain__;if(o||n){var t=e(this.__wrapped__);return(t.__actions__=rJ(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t}return r.apply(e,ng([this.value()],arguments))})}),e}function lH(){}var lW=r2(nx),lq=r2(nf),lG=r2(ny);function lY(e){return iC(e)?nO(iL(e)):function(n){return tY(n,e)}}var lQ=r3(),lZ=r3(!0);function l0(){return[]}function l1(){return!1}var l2=r1(function(e,n){return e+n},0),l8=r6("ceil"),l3=r1(function(e,n){return e/n},1),l5=r6("floor"),l4=r1(function(e,n){return e*n},1),l6=r6("round"),l7=r1(function(e,n){return e-n},0);return tx.after=function(e,n){if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){if(--e<1)return n.apply(this,arguments)}},tx.ary=oy,tx.assign=li,tx.assignIn=lo,tx.assignInWith=ll,tx.assignWith=la,tx.at=lc,tx.before=ov,tx.bind=ow,tx.bindAll=lD,tx.bindKey=ok,tx.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oM(e)?e:[e]},tx.chain=oo,tx.chunk=function(e,n,t){n=(t?i_(e,n,t):o===n)?1:n3(o9(n),0);var r=null==e?0:e.length;if(!r||n<1)return[];for(var i=0,l=0,a=ey(nA(r/n));ic?0:c+l),(a=o===a||a>c?c:o9(a))<0&&(a+=c),a=l>a?0:le(a);l>>0)?(e=lr(e))&&("string"==typeof n||null!=n&&!o0(n))&&!(n=rk(n))&&nJ(e)?rT(nW(e),0,t):e.split(n,t):[]},tx.spread=function(e,n){if("function"!=typeof e)throw new eO(l);return n=null==n?0:n3(o9(n),0),rh(function(t){var r=t[n],i=rT(t,0,n);return r&&ng(i,r),ns(e,this,i)})},tx.tail=function(e){var n=null==e?0:e.length;return n?rg(e,1,n):[]},tx.take=function(e,n,t){return e&&e.length?rg(e,0,(n=t||o===n?1:o9(n))<0?0:n):[]},tx.takeRight=function(e,n,t){var r=null==e?0:e.length;return r?rg(e,(n=r-(n=t||o===n?1:o9(n)))<0?0:n,r):[]},tx.takeRightWhile=function(e,n){return e&&e.length?rS(e,ih(n,3),!1,!0):[]},tx.takeWhile=function(e,n){return e&&e.length?rS(e,ih(n,3)):[]},tx.tap=function(e,n){return n(e),e},tx.throttle=function(e,n,t){var r=!0,i=!0;if("function"!=typeof e)throw new eO(l);return oq(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),oI(e,n,{leading:r,maxWait:n,trailing:i})},tx.thru=ol,tx.toArray=o6,tx.toPairs=lk,tx.toPairsIn=l_,tx.toPath=function(e){return oM(e)?nx(e,iL):o8(e)?[e]:rJ(iM(lr(e)))},tx.toPlainObject=lt,tx.transform=function(e,n,t){var r=oM(e),i=r||oX(e)||o3(e);if(n=ih(n,4),null==t){var o=e&&e.constructor;t=i?r?new o:[]:oq(e)&&oV(o)?tg(eF(e)):{}}return(i?nd:tW)(e,function(e,r,i){return n(t,e,r,i)}),t},tx.unary=function(e){return oy(e,1)},tx.union=i3,tx.unionBy=i5,tx.unionWith=i4,tx.uniq=function(e){return e&&e.length?r_(e):[]},tx.uniqBy=function(e,n){return e&&e.length?r_(e,ih(n,2)):[]},tx.uniqWith=function(e,n){return n="function"==typeof n?n:o,e&&e.length?r_(e,o,n):[]},tx.unset=function(e,n){return null==e||rC(e,n)},tx.unzip=i6,tx.unzipWith=i7,tx.update=function(e,n,t){return null==e?e:rI(e,n,rB(t))},tx.updateWith=function(e,n,t,r){return r="function"==typeof r?r:o,null==e?e:rI(e,n,rB(t),r)},tx.values=lC,tx.valuesIn=function(e){return null==e?[]:nN(e,lg(e))},tx.without=i9,tx.words=lR,tx.wrap=function(e,n){return oB(rB(n),e)},tx.xor=oe,tx.xorBy=on,tx.xorWith=ot,tx.zip=or,tx.zipObject=function(e,n){return rP(e||[],n||[],tA)},tx.zipObjectDeep=function(e,n){return rP(e||[],n||[],rm)},tx.zipWith=oi,tx.entries=lk,tx.entriesIn=l_,tx.extend=lo,tx.extendWith=ll,lV(tx,tx),tx.add=l2,tx.attempt=l$,tx.camelCase=lI,tx.capitalize=lS,tx.ceil=l8,tx.clamp=function(e,n,t){return o===t&&(t=n,n=o),o!==t&&(t=(t=ln(t))==t?t:0),o!==n&&(n=(n=ln(n))==n?n:0),tN(ln(e),n,t)},tx.clone=function(e){return tR(e,4)},tx.cloneDeep=function(e){return tR(e,5)},tx.cloneDeepWith=function(e,n){return tR(e,5,n="function"==typeof n?n:o)},tx.cloneWith=function(e,n){return tR(e,4,n="function"==typeof n?n:o)},tx.conformsTo=function(e,n){return null==n||t$(e,n,lx(n))},tx.deburr=lO,tx.defaultTo=function(e,n){return null==e||e!=e?n:e},tx.divide=l3,tx.endsWith=function(e,n,t){e=lr(e),n=rk(n);var r=e.length,i=t=o===t?r:tN(o9(t),0,r);return(t-=n.length)>=0&&e.slice(t,i)==n},tx.eq=oN,tx.escape=function(e){return(e=lr(e))&&F.test(e)?e.replace(X,nL):e},tx.escapeRegExp=function(e){return(e=lr(e))&&Z.test(e)?e.replace(Q,"\\$&"):e},tx.every=function(e,n,t){var r=oM(e)?nf:tJ;return t&&i_(e,n,t)&&(n=o),r(e,ih(n,3))},tx.find=os,tx.findIndex=iV,tx.findKey=function(e,n){return nw(e,ih(n,3),tW)},tx.findLast=ou,tx.findLastIndex=iH,tx.findLastKey=function(e,n){return nw(e,ih(n,3),tq)},tx.floor=l5,tx.forEach=od,tx.forEachRight=of,tx.forIn=function(e,n){return null==e?e:tV(e,ih(n,3),lg)},tx.forInRight=function(e,n){return null==e?e:tH(e,ih(n,3),lg)},tx.forOwn=function(e,n){return e&&tW(e,ih(n,3))},tx.forOwnRight=function(e,n){return e&&tq(e,ih(n,3))},tx.get=ld,tx.gt=oR,tx.gte=o$,tx.has=function(e,n){return null!=e&&iy(e,n,t1)},tx.hasIn=lf,tx.head=iq,tx.identity=lJ,tx.includes=function(e,n,t,r){e=oK(e)?e:lC(e),t=t&&!r?o9(t):0;var i=e.length;return t<0&&(t=n3(i+t,0)),o2(e)?t<=i&&e.indexOf(n,t)>-1:!!i&&n_(e,n,t)>-1},tx.indexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=null==t?0:o9(t);return i<0&&(i=n3(r+i,0)),n_(e,n,i)},tx.inRange=function(e,n,t){var r,i,l;return n=o7(n),o===t?(t=n,n=0):t=o7(t),(r=e=ln(e))>=n5(i=n,l=t)&&r=-0x1fffffffffffff&&e<=0x1fffffffffffff},tx.isSet=o1,tx.isString=o2,tx.isSymbol=o8,tx.isTypedArray=o3,tx.isUndefined=function(e){return o===e},tx.isWeakMap=function(e){return oG(e)&&ib(e)==S},tx.isWeakSet=function(e){return oG(e)&&"[object WeakSet]"==tZ(e)},tx.join=function(e,n){return null==e?"":n2.call(e,n)},tx.kebabCase=lA,tx.last=iZ,tx.lastIndexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=r;return o!==t&&(i=(i=o9(t))<0?n3(r+i,0):n5(i,r-1)),n==n?function(e,n,t){for(var r=t+1;r--&&e[r]!==n;);return r}(e,n,i):nk(e,nI,i,!0)},tx.lowerCase=lP,tx.lowerFirst=lE,tx.lt=o5,tx.lte=o4,tx.max=function(e){return e&&e.length?tX(e,lJ,t0):o},tx.maxBy=function(e,n){return e&&e.length?tX(e,ih(n,2),t0):o},tx.mean=function(e){return nS(e,lJ)},tx.meanBy=function(e,n){return nS(e,ih(n,2))},tx.min=function(e){return e&&e.length?tX(e,lJ,rn):o},tx.minBy=function(e,n){return e&&e.length?tX(e,ih(n,2),rn):o},tx.stubArray=l0,tx.stubFalse=l1,tx.stubObject=function(){return{}},tx.stubString=function(){return""},tx.stubTrue=function(){return!0},tx.multiply=l4,tx.nth=function(e,n){return e&&e.length?rl(e,o9(n)):o},tx.noConflict=function(){return e6._===this&&(e6._=eM),this},tx.noop=lH,tx.now=ob,tx.pad=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;if(!n||r>=n)return e;var i=(n-r)/2;return r8(nQ(i),t)+e+r8(nA(i),t)},tx.padEnd=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;return n&&rn){var r=e;e=n,n=r}if(t||e%1||n%1){var i=n7();return n5(e+i*(n-e+e8("1e-"+((i+"").length-1))),n)}return rd(e,n)},tx.reduce=function(e,n,t){var r=oM(e)?nj:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tL)},tx.reduceRight=function(e,n,t){var r=oM(e)?nb:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tK)},tx.repeat=function(e,n,t){return n=(t?i_(e,n,t):o===n)?1:o9(n),rf(lr(e),n)},tx.replace=function(){var e=arguments,n=lr(e[0]);return e.length<3?n:n.replace(e[1],e[2])},tx.result=function(e,n,t){n=rz(n,e);var r=-1,i=n.length;for(i||(i=1,e=o);++r0x1fffffffffffff)return[];var t=0xffffffff,r=n5(e,0xffffffff);n=ih(n),e-=0xffffffff;for(var i=nB(r,n);++t=l)return e;var c=t-nH(r);if(c<1)return r;var s=a?rT(a,0,c).join(""):e.slice(0,c);if(o===i)return s+r;if(a&&(c+=s.length-c),o0(i)){if(e.slice(c).search(i)){var u,d=s;for(i.global||(i=eI(i.source,lr(es.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;s=s.slice(0,o===f?c:f)}}else if(e.indexOf(rk(i),c)!=c){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},tx.unescape=function(e){return(e=lr(e))&&U.test(e)?e.replace(J,nG):e},tx.uniqueId=function(e){var n=++eN;return lr(e)+n},tx.upperCase=lT,tx.upperFirst=lN,tx.each=od,tx.eachRight=of,tx.first=iq,lV(tx,(eb={},tW(tx,function(e,n){eT.call(tx.prototype,n)||(eb[n]=e)}),eb),{chain:!1}),tx.VERSION="4.17.21",nd(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){tx[e].placeholder=tx}),nd(["drop","take"],function(e,n){ty.prototype[e]=function(t){t=o===t?1:n3(o9(t),0);var r=this.__filtered__&&!n?new ty(this):this.clone();return r.__filtered__?r.__takeCount__=n5(t,r.__takeCount__):r.__views__.push({size:n5(t,0xffffffff),type:e+(r.__dir__<0?"Right":"")}),r},ty.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),nd(["filter","map","takeWhile"],function(e,n){var t=n+1,r=1==t||3==t;ty.prototype[e]=function(e){var n=this.clone();return n.__iteratees__.push({iteratee:ih(e,3),type:t}),n.__filtered__=n.__filtered__||r,n}}),nd(["head","last"],function(e,n){var t="take"+(n?"Right":"");ty.prototype[e]=function(){return this[t](1).value()[0]}}),nd(["initial","tail"],function(e,n){var t="drop"+(n?"":"Right");ty.prototype[e]=function(){return this.__filtered__?new ty(this):this[t](1)}}),ty.prototype.compact=function(){return this.filter(lJ)},ty.prototype.find=function(e){return this.filter(e).head()},ty.prototype.findLast=function(e){return this.reverse().find(e)},ty.prototype.invokeMap=rh(function(e,n){return"function"==typeof e?new ty(this):this.map(function(t){return t3(t,e,n)})}),ty.prototype.reject=function(e){return this.filter(oP(ih(e)))},ty.prototype.slice=function(e,n){e=o9(e);var t=this;return t.__filtered__&&(e>0||n<0)?new ty(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),o!==n&&(t=(n=o9(n))<0?t.dropRight(-n):t.take(n-e)),t)},ty.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ty.prototype.toArray=function(){return this.take(0xffffffff)},tW(ty.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),l=tx[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);l&&(tx.prototype[n]=function(){var n=this.__wrapped__,c=i?[1]:arguments,s=r(n,ty),u=c[0],d=s||oM(n),f=function(e){var n=l.apply(tx,ng([e],c));return i&&h?n[0]:n};d&&t&&"function"==typeof u&&1!=u.length&&(s=d=!1);var h=this.__chain__,m=!!this.__actions__.length,p=a&&!h,x=s&&!m;if(!a&&d){n=x?n:new ty(this);var g=e.apply(n,c);return g.__actions__.push({func:ol,args:[f],thisArg:o}),new tb(g,h)}return p&&x?e.apply(this,c):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})}),nd(["pop","push","shift","sort","splice","unshift"],function(e){var n=eA[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);tx.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(oM(i)?i:[],e)}return this[t](function(t){return n.apply(oM(t)?t:[],e)})}}),tW(ty.prototype,function(e,n){var t=tx[n];if(t){var r=t.name+"";eT.call(ta,r)||(ta[r]=[]),ta[r].push({name:n,func:t})}}),ta[rZ(o,2).name]=[{name:"wrapper",func:o}],ty.prototype.clone=function(){var e=new ty(this.__wrapped__);return e.__actions__=rJ(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rJ(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rJ(this.__views__),e},ty.prototype.reverse=function(){if(this.__filtered__){var e=new ty(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},ty.prototype.value=function(){var e=this.__wrapped__.value(),n=this.__dir__,t=oM(e),r=n<0,i=t?e.length:0,o=function(e,n,t){for(var r=-1,i=t.length;++r=this.__values__.length,n=e?o:this.__values__[this.__index__++];return{done:e,value:n}},tx.prototype.plant=function(e){for(var n,t=this;r(t,tj);){var i=iJ(t);i.__index__=0,i.__values__=o,n?l.__wrapped__=i:n=i;var l=i;t=t.__wrapped__}return l.__wrapped__=e,n},tx.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,ty)){var n=e;return this.__actions__.length&&(n=new ty(this)),(n=n.reverse()).__actions__.push({func:ol,args:[i8],thisArg:o}),new tb(n,this.__chain__)}return this.thru(i8)},tx.prototype.toJSON=tx.prototype.valueOf=tx.prototype.value=function(){return rO(this.__wrapped__,this.__actions__)},tx.prototype.first=tx.prototype.head,e4&&(tx.prototype[e4]=function(){return this}),tx}();"function"==typeof define&&"object"==i(define.amd)&&define.amd?(e6._=nY,define(function(){return nY})):e9?((e9.exports=nY)._=nY,e7._=nY):e6._=nY}).call(this)},6312:function(e,n){"use strict";var t=Symbol.for("react.transitional.element");function r(e,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return{$$typeof:t,type:e,key:i,ref:void 0!==(n=r.ref)?n:null,props:r}}n.Fragment=Symbol.for("react.fragment"),n.jsx=r,n.jsxs=r},5059:function(e,n){"use strict";function t(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),p=Symbol.iterator,x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,j={};function b(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}function y(){}function v(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}b.prototype.isReactComponent={},b.prototype.setState=function(e,n){if("object"!==(void 0===e?"undefined":t(e))&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,g(w,b.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function _(){}var C={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function S(e,n,t){var i=t.ref;return{$$typeof:r,type:e,key:n,ref:void 0!==i?i:null,props:t}}function O(e){return"object"===(void 0===e?"undefined":t(e))&&null!==e&&e.$$typeof===r}var A=/\/+/g;function P(e,n){var r,i;return"object"===(void 0===e?"undefined":t(e))&&null!==e&&null!=e.key?(r=""+e.key,i={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return i[e]})):n.toString(36)}function E(e,n,o){if(null==e)return e;var l=[],a=0;return!function e(n,o,l,a,c){var s,u,d,f=void 0===n?"undefined":t(n);("undefined"===f||"boolean"===f)&&(n=null);var m=!1;if(null===n)m=!0;else switch(f){case"bigint":case"string":case"number":m=!0;break;case"object":switch(n.$$typeof){case r:case i:m=!0;break;case h:return e((m=n._init)(n._payload),o,l,a,c)}}if(m)return c=c(n),m=""===a?"."+P(n,0):a,k(c)?(l="",null!=m&&(l=m.replace(A,"$&/")+"/"),e(c,o,l,"",function(e){return e})):null!=c&&(O(c)&&(s=c,u=l+(null==c.key||n&&n.key===c.key?"":(""+c.key).replace(A,"$&/")+"/")+m,c=S(s.type,u,s.props)),o.push(c)),1;m=0;var x=""===a?".":a+":";if(k(n))for(var g=0;g>>1,i=e[r];if(0>>1;rl(c,t))sl(u,c)?(e[r]=u,e[s]=t,r=s):(e[r]=c,e[a]=t,r=a);else if(sl(u,t))e[r]=u,e[s]=t,r=s;else break}}return n}function l(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if(n.unstable_now=void 0,"object"===("undefined"==typeof performance?"undefined":t(performance))&&"function"==typeof performance.now){var a,c=performance;n.unstable_now=function(){return c.now()}}else{var s=Date,u=s.now();n.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,p=3,x=!1,g=!1,j=!1,b=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var n=i(f);null!==n;){if(null===n.callback)o(f);else if(n.startTime<=e)o(f),n.sortIndex=n.expirationTime,r(d,n);else break;n=i(f)}}function _(e){if(j=!1,k(e),!g)if(null!==i(d))g=!0,C||(C=!0,a());else{var n=i(f);null!==n&&z(_,n.startTime-e)}}var C=!1,I=-1,S=5,O=-1;function A(){return!!b||!(n.unstable_now()-Oe&&A());){var l=m.callback;if("function"==typeof l){m.callback=null,p=m.priorityLevel;var c=l(m.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof c){m.callback=c,k(e),t=!0;break n}m===i(d)&&o(d),k(e)}else o(d);m=i(d)}if(null!==m)t=!0;else{var s=i(f);null!==s&&z(_,s.startTime-e),t=!1}}break e}finally{m=null,p=r,x=!1}}}finally{t?a():C=!1}}}if("function"==typeof w)a=function(){w(P)};else if("undefined"!=typeof MessageChannel){var E=new MessageChannel,B=E.port2;E.port1.onmessage=P,a=function(){B.postMessage(null)}}else a=function(){y(P,0)};function z(e,t){I=y(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_forceFrameRate=function(e){0>e||125c?(e.sortIndex=l,r(f,e),null===i(d)&&e===i(f)&&(j?(v(I),I=-1):j=!0,z(_,l-c))):(e.sortIndex=s,r(d,e),g||x||(g=!0,C||(C=!0,a()))),e},n.unstable_shouldYield=A,n.unstable_wrapCallback=function(e){var n=p;return function(){var t=p;p=n;try{return e.apply(this,arguments)}finally{p=t}}}},8014:function(e,n,t){"use strict";e.exports=t(2685)},8587:function(e,n,t){"use strict";t.d(n,{TS:()=>s,Tj:()=>o,Ul:()=>a,pb:()=>i,y1:()=>c,yU:()=>u});function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i=function(e,n){if(null==e)return e;if(Array.isArray(e)){for(var t=[],i=0;ia)return 1}return 0},a=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;ri}),null==(r=window.performance)||r.now;var r,i={mark:function(e,n){},measure:function(e,n){}}},5900:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc,Tw:()=>a,VP:()=>s,y$:()=>l});var l=function(e,n){if(n)return n(l)(e);var t,r=[],i=function(n){t=e(t,n);for(var i=0;i1?a-1:0),s=1;s1?n-1:0),r=1;r1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=i({},t),l=!1,a=!0,c=!1,s=void 0;try{for(var u,d=n[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var f=u.value,h=e[f],m=t[f],p=h(m,r);m!==p&&(l=!0,o[f]=p)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}return l?o:t}},s=function(e,n){var t=function(){for(var t=arguments.length,r=Array(t),l=0;l0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]m});var u,d=(u=function(){return window.hubStorage&&!!window.hubStorage.getItem},function(){try{return!!u()}catch(e){return!1}}),f=function(){function e(){o(this,e),c(this,"store",void 0),c(this,"impl",void 0),this.impl=0,this.store={}}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){return[2,this.store[e]]})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return this.store[e]=n,[2]})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return this.store[e]=void 0,[2]})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return this.store={},[2]})}).call(this)}}]),e}(),h=function(){function e(){o(this,e),c(this,"impl",void 0),this.impl=1}return a(e,[{key:"get",value:function(e){return i(function(){var n;return s(this,function(t){switch(t.label){case 0:return[4,window.hubStorage.getItem("paradise-"+e)];case 1:if("string"==typeof(n=t.sent()))return[2,JSON.parse(n)];return[2,void 0]}})})()}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return window.hubStorage.setItem("paradise-"+e,JSON.stringify(n)),[2]})})()}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return window.hubStorage.removeItem("paradise-"+e),[2]})})()}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return window.hubStorage.clear(),[2]})})()}}]),e}(),m=new(function(){function e(){o(this,e),c(this,"backendPromise",void 0),c(this,"impl",0),this.backendPromise=i(function(){return s(this,function(e){return d()?[2,new h]:(console.warn("No supported storage backend found. Using in-memory storage."),[2,new f])})})()}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().get(e)]}})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().set(e,n)]}})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().remove(e)]}})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){switch(e.label){case 0:return[4,this.backendPromise];case 1:return[2,e.sent().clear()]}})}).call(this)}}]),e}())},6183:function(e,n,t){"use strict";t.d(n,{CO:()=>s,Xd:()=>f,Z4:()=>u,tk:()=>d});var r=t(8587);function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,l:()=>o});var r=[/v4shim/i],i={},o=function(e){return i[e]||e},l=function(e){return function(e){return function(n){var t=n.type,o=n.payload;if("asset/stylesheet"===t)return void Byond.loadCss(o);if("asset/mappings"===t){var l=!0,a=!1,c=void 0;try{for(var s,u=Object.keys(o)[Symbol.iterator]();!(l=(s=u.next()).done);l=!0)!function(){var e=s.value;if(!r.some(function(n){return n.test(e)})){var n=o[e],t=e.split(".").pop();i[e]=n,"css"===t&&Byond.loadCss(n),"js"===t&&Byond.loadJs(n)}}()}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return}e(n)}}}},2864:function(e,n,t){"use strict";t.d(n,{H$:()=>w,J3:()=>r,JV:()=>C,Oc:()=>$,QY:()=>M,Ul:()=>D,d4:()=>L,jB:()=>E,pX:()=>B});var r,i=t(9227),o=t(5900),l=t(1874),a=t(6400),c=t(1604),s=t(2533),u=t(2901);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function j(e){var n=function(e,n){if("object"!==b(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==b(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===b(n)?n:String(n)}function b(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function y(e,n){if(e){if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,n)}}var v=(0,s.h)("backend"),w=function(e){r=e},k=(0,o.VP)("backend/update"),_=(0,o.VP)("backend/setSharedState"),C=(0,o.VP)("backend/suspendStart"),I=(0,o.VP)("backend/createPayloadQueue"),S=(0,o.VP)("backend/dequeuePayloadQueue"),O=(0,o.VP)("backend/removePayloadQueue"),A=(0,o.VP)("nextPayloadChunk"),P={config:{},data:{},shared:{},outgoingPayloadQueues:{},suspended:Date.now(),suspending:!1},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,n=arguments.length>1?arguments[1]:void 0,t=n.type,r=n.payload;if("backend/update"===t){var i=p({},e.config,r.config),o=p({},e.data,r.static_data,r.data),l=p({},e.shared);if(r.shared){var a=!0,c=!1,s=void 0;try{for(var u,d=Object.keys(r.shared)[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var b=u.value,v=r.shared[b];""===v?l[b]=void 0:l[b]=JSON.parse(v)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}}return x(p({},e),{config:i,data:o,shared:l,suspended:!1})}if("backend/setSharedState"===t){var w=r.key,k=r.nextState;return x(p({},e),{shared:x(p({},e.shared),h({},w,k))})}if("backend/suspendStart"===t)return x(p({},e),{suspending:!0});if("backend/suspendSuccess"===t){var _=r.timestamp;return x(p({},e),{data:{},shared:{},config:x(p({},e.config),{title:"",status:1}),suspending:!1,suspended:_})}if("backend/createPayloadQueue"===t){var C=r.id,I=r.chunks,S=e.outgoingPayloadQueues;return x(p({},e),{outgoingPayloadQueues:x(p({},S),h({},C,I))})}if("backend/dequeuePayloadQueue"===t){var O=r.id,A=e.outgoingPayloadQueues,E=A[O],B=g(A,[O].map(j)),z=f(E)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||y(E)||m(),T=(z[0],z.slice(1));return x(p({},e),{outgoingPayloadQueues:T.length?x(p({},B),h({},O,T)):B})}if("backend/removePayloadQueue"===t){var N=r.id,R=e.outgoingPayloadQueues;R[N];var $=g(R,[N].map(j));return x(p({},e),{outgoingPayloadQueues:$})}return e},B=function(e){var n,t;return function(r){return function(o){var s=R(e.getState()),d=s.suspended,f=s.outgoingPayloadQueues,h=o.type,m=o.payload;if("update"===h)return void e.dispatch(k(m));if("suspend"===h)return void e.dispatch({type:"backend/suspendSuccess",payload:{timestamp:Date.now()}});if("ping"===h)return void Byond.sendMessage("ping/reply");if("backend/suspendStart"===h&&!t){v.log("suspending (".concat(Byond.windowId,")"));var p=function(){return Byond.sendMessage("suspend")};p(),t=setInterval(p,2e3)}if("backend/suspendSuccess"===h&&((0,u.Su)(),clearInterval(t),t=void 0,Byond.winset(Byond.windowId,{"is-visible":!1}),(0,l.sc)(),(0,l.zr)(),setTimeout(function(){return(0,c.$)()})),"backend/update"===h){var x,g,j=null==(g=m.config)||null==(x=g.window)?void 0:x.fancy;void 0===n?n=j:n!==j&&(v.log("changing fancy mode to",j),n=j,Byond.winset(Byond.windowId,{titlebar:!j,"can-resize":!j}))}if("backend/update"===h&&d&&(v.log("backend/update",m),(0,u.P7)(),(0,l.ao)(),(0,a.MN)(),setTimeout(function(){i.k.mark("resume/start"),R(e.getState()).suspended||(Byond.winset(Byond.windowId,{"is-visible":!0}),Byond.sendMessage("visible"),i.k.mark("resume/finish"))})),"oversizePayloadResponse"===h&&(m.allow?e.dispatch(A(m)):e.dispatch(O(m))),"acknowlegePayloadChunk"===h&&(e.dispatch(S(m)),e.dispatch(A(m))),"nextPayloadChunk"===h){var b=m.id,y=f[b][0];Byond.sendMessage("payloadChunk",{id:b,chunk:y})}return r(o)}}},z=function(e,n){for(var t=e.length-1,r=0,i=0;r1024){var c=i+z(l,1024);r.push(n.slice(i,c1&&void 0!==arguments[1]?arguments[1]:{};if(!((void 0===n?"undefined":b(n))==="object"&&null!==n&&!Array.isArray(n)))return void v.error("Payload for act() must be an object, got this:",n);var t=JSON.stringify(n);if(Object.entries({type:"act/"+e,payload:t,tgui:1,windowId:Byond.windowId}).reduce(function(e,n,t){var r=f(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||y(n,2)||m(),i=r[0],o=r[1];return e+"".concat(t>0?"&":"?").concat(encodeURIComponent(i),"=").concat(encodeURIComponent(o))},"").length>2048){var i=t.split(T),o="".concat(Date.now());null==r||r.dispatch(I({id:o,chunks:i})),Byond.sendMessage("oversizedPayloadRequest",{type:"act/"+e,id:o,chunkCount:i.length});return}Byond.sendMessage("act/"+e,n)},R=function(e){return e.backend||{}},$=function(){var e;return x(p({},null==r||null==(e=r.getState())?void 0:e.backend),{act:N})},D=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){r.dispatch(_({key:e,nextState:"function"==typeof n?n(a):n}))}]},M=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){Byond.sendMessage({type:"setSharedState",key:e,value:JSON.stringify("function"==typeof n?n(a):n)||""})}]},L=function(e){return e(null==r?void 0:r.getState())}},8095:function(e,n,t){"use strict";t.d(n,{H:()=>u});var r=t(8138),i=t(4530),o=t(6859);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["onMove","onKey","style"]),m=(0,i.useRef)(null),p=a(u),x=a(d),g=(n=(0,i.useMemo)(function(){var e=function(e){e.preventDefault(),e.buttons>0&&m.current?p(s(m.current,e)):t(!1)},n=function(){return t(!1)},t=function(t){var r=c(m.current),i=t?r.addEventListener:r.removeEventListener;i("mousemove",e),i("mouseup",n)};return[function(e){var n=e.nativeEvent,r=m.current;r&&(n.preventDefault(),r.focus(),p(s(r,n)),t(!0))},function(e){var n=e.which||e.keyCode;n<37||n>40||(e.preventDefault(),x({left:39===n?.05:37===n?-.05:0,top:40===n?.05:38===n?-.05:0}))},t]},[x,p]),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),3!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,3)||function(e,n){if(e){if("string"==typeof e)return l(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,3)}}(n,3)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=g[0],b=g[1],y=g[2];return(0,i.useEffect)(function(){return y},[y]),(0,r.jsx)("div",(t=function(e){for(var n=1;nu,gm:()=>C,tx:()=>v,Gi:()=>a});var r=t(8138),i=t(4530),o=t(7790);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","progressBar","timeStart","timeEnd","format"]),m=Math.max((u?d-u:d)*100,0),p=(n=(0,i.useState)(m),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=p[0],g=p[1],j=(0,i.useRef)(null);function b(){g(function(e){var n=Math.max(e-1e3,0);return n<=0&&clearInterval(j.current),n})}(0,i.useEffect)(function(){return j.current||(j.current=setInterval(b,1e3)),function(){return clearInterval(j.current)}},[]);var y=new Date(x).toISOString().slice(11,19),v=(0,r.jsx)(o.az,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var u=function(e){var n,t,i=e.children,l=s(e,["children"]);return(0,r.jsx)(o.XI,(n=c({},l),t=t={children:(0,r.jsx)(o.XI.Row,{children:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};u.Column=function(e){var n=e.size,t=e.style,i=s(e,["size","style"]);return(0,r.jsx)(o.XI.Cell,c({style:c({width:(void 0===n?1:n)+"%"},t)},i))},t(8095);var d=t(8595),f=t(2864);function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function g(e,n){return(g=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}var b=(0,i.createContext)({zoom:1}),y=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},v=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i,o,l,a;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return l=t,a=[e],l=h(l),n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(l,a||[],h(this).constructor):l.apply(this,a)),window.innerWidth,window.innerHeight,n.state={offsetX:null!=(r=e.offsetX)?r:0,offsetY:null!=(i=e.offsetY)?i:0,dragging:!1,originX:null,originY:null,zoom:null!=(o=e.zoom)?o: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),y(e)},n.handleDragMove=function(e){n.setState(function(n){var t=m({},n),r=e.screenX-t.originX,i=e.screenY-t.originY;return n.dragging?(t.offsetX+=r/t.zoom,t.offsetY+=i/t.zoom,t.originX=e.screenX,t.originY=e.screenY):t.dragging=!0,t}),y(e)},n.handleDragEnd=function(t){var r;n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),null==(r=e.onOffsetChange)||r.call(e,t,n.state),y(t)},n.handleZoom=function(t,r){n.setState(function(n){return n.zoom=Math.min(Math.max(r,1),8),e.onZoom&&e.onZoom(n.zoom),n})},n.handleReset=function(t){n.setState(function(r){var i;r.offsetX=0,r.offsetY=0,r.zoom=1,n.handleZoom(t,1),null==(i=e.onOffsetChange)||i.call(e,t,r)})},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e),n=[{key:"render",value:function(){var e=(0,f.Oc)().config,n=this.state,t=n.dragging,i=n.offsetX,l=n.offsetY,a=n.zoom,c=void 0===a?1:a,s=this.props.children,u=e.map+"_nanomap_z1.png",h=510*c+"px";return(0,r.jsx)(b.Provider,{value:{zoom:c},children:(0,r.jsxs)(o.az,{className:"NanoMap__container",children:[(0,r.jsxs)(o.az,{style:{width:h,height:h,marginTop:l*c+"px",marginLeft:i*c+"px",overflow:"hidden",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundSize:"cover",backgroundRepeat:"no-repeat",textAlign:"center",cursor:t?"move":"auto"},onMouseDown:this.handleDragStart,children:[(0,r.jsx)("img",{src:(0,d.l)(u),style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",imageRendering:"pixelated"}}),(0,r.jsx)(o.az,{children:s})]}),(0,r.jsx)(k,{zoom:c,onZoom:this.handleZoom,onReset:this.handleReset})]})})}}],function(e,n){for(var t=0;ti,b_:()=>a,fF:()=>c,lm:()=>r,wM:()=>l});var r={department:{command:"#526aff",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}},i=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}],o=[{id:"o2",name:"Oxygen",label:"O₂",color:"blue"},{id:"n2",name:"Nitrogen",label:"N₂",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO₂",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H₂O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N₂O",color:"red"},{id:"no2",name:"Nitryl",label:"NO₂",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H₂",color:"#997379"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}],l=function(e,n){var t=String(e).toLowerCase(),r=o.find(function(e){return e.id===t||e.name.toLowerCase()===t});return r&&r.label||n||e},a=function(e){var n=String(e).toLowerCase(),t=o.find(function(e){return e.id===n||e.name.toLowerCase()===n});return t&&t.color},c=function(e,n){if(e>n)return"in the future";var t=(n/=10)-(e/=10);if(t>3600){var r=Math.round(t/3600);return r+" hour"+(1===r?"":"s")+" ago"}if(t>60){var i=Math.round(t/60);return i+" minute"+(1===i?"":"s")+" ago"}var o=Math.round(t);return o+" second"+(1===o?"":"s")+" ago"}},4981:function(e,n,t){"use strict";t(8138),t(7218),t(4530),t(7790),t(3384),t(937)},7218:function(e,n,t){"use strict";t.d(n,{D:()=>r});var r=(0,t(4530).createContext)(["",function(e){}])},3123:function(e,n,t){"use strict";var r=t(5900);(0,r.VP)("debug/toggleKitchenSink"),(0,r.VP)("debug/toggleDebugLayout"),(0,r.VP)("debug/openExternalBrowser")},9216:function(e,n,t){"use strict";t.d(n,{L:()=>o});var r=t(2864),i=t(8318);function o(){return(0,r.d4)(i.m)}},1956:function(e,n,t){"use strict";t.d(n,{A$:()=>i.A,Lo:()=>r.L});var r=t(9216);t(4981),t(2550);var i=t(8408)},2550:function(e,n,t){"use strict";t(1128),t(1874),t(3123)},8408:function(e,n,t){"use strict";function r(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=n.type;return"debug/toggleKitchenSink"===t?i(r({},e),{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===t?i(r({},e),{debugLayout:!e.debugLayout}):e}t.d(n,{A:()=>o})},8318:function(e,n,t){"use strict";function r(e){return e.debug}t.d(n,{m:()=>r})},6400:function(e,n,t){"use strict";t.d(n,{BF:()=>z,C8:()=>P,MN:()=>E,nZ:()=>R,y9:()=>w});var r,i,o,l,a,c,s=t(1699),u=t(6183);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]2&&void 0!==arguments[2]?arguments[2]:50,i=[n],o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return h(function(){var n,t,r,o,l;return p(this,function(a){switch(a.label){case 0:if(!(t=e.fancy))return[3,2];return[4,s.IG.get(j)];case 1:t=a.sent(),a.label=2;case 2:return(n=t)&&x.log("recalled geometry:",n),r=(null==n?void 0:n.pos)||e.pos,o=e.size,e.scale&&o&&(o=[o[0]*g,o[1]*g]),e.scale?(document.body.style.zoom="",document.documentElement.style.setProperty("--scaling-amount",null)):(document.body.style.zoom="".concat(100/window.devicePixelRatio,"%"),document.documentElement.style.setProperty("--scaling-amount",window.devicePixelRatio.toString())),[4,i];case 3:return a.sent(),l=S(),o&&I(o=[Math.min(l[0],o[0]),Math.min(l[1],o[1])]),r?(o&&e.locked&&(r=B(r,o)[1]),C(r)):o&&C(r=(0,u.CO)((0,u.Xd)(l,.5),(0,u.Xd)(o,-.5),(0,u.Xd)(v,-1))),[2]}})})()},E=function(){return h(function(){var e;return p(this,function(n){switch(n.label){case 0:return e=k(),[4,i=Byond.winget(Byond.windowId,"pos").then(function(n){return[n.x-e[0],n.y-e[1]]})];case 1:return v=n.sent(),x.debug("screen offset",v),[2]}})})()},B=function(e,n){for(var t=[0-v[0],0-v[1]],r=S(),i=[e[0],e[1]],o=!1,l=0;l<2;l++){var a=t[l],c=t[l]+r[l];e[l]c&&(i[l]=c-n[l],o=!0)}return[o,i]},z=function(e){var n;x.log("drag start"),b=!0,o=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),null==(n=e.target)||n.focus(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",T),N(e)},T=function(e){x.log("drag end"),N(e),document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",T),b=!1,A()},N=function(e){b&&(e.preventDefault(),C((0,u.Z4)([e.screenX*g,e.screenY*g],o)))},R=function(e,n){return function(t){var r;l=[e,n],x.log("resize start",l),y=!0,o=(0,u.Z4)([t.screenX*g,t.screenY*g],k()),a=_(),null==(r=t.target)||r.focus(),document.addEventListener("mousemove",D),document.addEventListener("mouseup",$),D(t)}},$=function(e){x.log("resize end",c),D(e),document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",$),y=!1,A()},D=function(e){if(y){e.preventDefault();var n=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),t=(0,u.Z4)(n,o);(c=(0,u.CO)(a,(0,u.tk)(l,t),[1,1]))[0]=Math.max(c[0],150*g),c[1]=Math.max(c[1],50*g),I(c)}}},1604:function(e,n,t){"use strict";t.d(n,{$:()=>r});var r=function(){Byond.winset("paramapwindow.map",{focus:!0})}},9609:function(e,n,t){"use strict";t.r(n),t.d(n,{AICard:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(0===a.has_ai)return(0,r.jsx)(l.p8,{width:250,height:120,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Stored AI",children:(0,r.jsx)(i.az,{children:(0,r.jsx)("h3",{children:"No AI detected."})})})})});var c=null;return c=a.integrity>=75?"green":a.integrity>=25?"yellow":"red",(0,r.jsx)(l.p8,{width:600,height:420,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:a.name,children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:c,value:a.integrity/100})})}),(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h2",{children:1===a.flushing?"Wipe of AI in progress...":""})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{width:10,icon:a.wireless?"check":"times",content:a.wireless?"Enabled":"Disabled",color:a.wireless?"green":"red",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{width:10,icon:a.radio?"check":"times",content:a.radio?"Enabled":"Disabled",color:a.radio?"green":"red",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Wipe",children:(0,r.jsx)(i.$n.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:a.flushing||0===a.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return t("wipe")}})})]})})})]})})})}},1664:function(e,n,t){"use strict";t.r(n),t.d(n,{AIControllerDebugger:()=>u,CopyableValue:()=>c,ObjectReference:()=>s});var r=t(8138),i=t(9623),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=e.text;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{icon:"clipboard-list",onClick:function(){return navigator.clipboard.writeText(n)}}),(0,r.jsx)("span",{style:{fontFamily:"monospace"},children:n})]})},s=function(e){var n=(0,l.Oc)().act,t=e.obj_ref;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return n("vv",{uid:t.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return n("flw",{uid:t.uid})},children:"FLW"}),"\xa0",t.name]})},u=function(e){var n=(0,l.Oc)(),t=n.data,u=n.act,d=t.controller;return(0,r.jsx)(a.p8,{width:675,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.wn,{title:"Basic Info",children:(0,r.jsxs)(o.XI,{children:[d.pawn&&(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Pawn"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.pawn})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Status"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.ai_status})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Type"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.type})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Idle Behavior"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.idle_behavior})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Delay"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_delay})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Able to Plan"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.able_to_plan?"Yes":"No"})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"On Failed Planning Timeout"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.on_failed_planning_timeout?"Yes":"No"})})]}),d.movement_target&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Target"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.movement_target})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Target Source"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_target.source})})]})]})]})}),(0,r.jsx)(o.wn,{title:"Blackboard",children:(0,r.jsx)(o.XI,{className:"AIControllerDebugger__Blackboard",children:d.blackboard.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name.length>30?(0,r.jsx)(o.m_,{content:e.name,children:(0,r.jsx)(o.az,{children:(0,i.truncate)(e.name)})}):e.name}),(0,r.jsxs)(o.XI.Cell,{className:"bb_value",children:[e.uid&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return u("vv",{uid:e.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return u("flw",{uid:e.uid})},children:"FLW"}),"\xa0"]}),e.value||"null"]})]},e.name)})})}),(0,r.jsx)(o.wn,{title:"Current Behaviors",children:(0,r.jsx)(o.XI,{children:d.current_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})}),(0,r.jsx)(o.wn,{title:"Planned Behaviors",children:(0,r.jsx)(o.XI,{children:d.planned_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})})]})})})}},8679:function(e,n,t){"use strict";t.r(n),t.d(n,{AIFixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(null===a.occupant)return(0,r.jsx)(l.p8,{width:550,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stored AI",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"robot",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),(0,r.jsx)("h3",{children:"No Artificial Intelligence detected."})]})})})})});var c=!0;(2===a.stat||null===a.stat)&&(c=!1);var s=null;s=a.integrity>=75?"green":a.integrity>=25?"yellow":"red";var u=!0;return a.integrity>=100&&2!==a.stat&&(u=!1),(0,r.jsx)(l.p8,{children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:a.occupant,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:s,value:a.integrity/100})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{inline:!0,children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Actions",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{icon:a.wireless?"times":"check",content:a.wireless?"Disabled":"Enabled",color:a.wireless?"red":"green",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{icon:a.radio?"times":"check",content:a.radio?"Disabled":"Enabled",color:a.radio?"red":"green",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Start Repairs",children:(0,r.jsx)(i.$n,{icon:"wrench",disabled:!u||a.active,content:!u||a.active?"Already Repaired":"Repair",onClick:function(){return t("fix")}})})]}),(0,r.jsx)(i.az,{color:"green",lineHeight:2,children:a.active?"Reconstruction in progress.":""})]})})]})})})}},5233:function(e,n,t){"use strict";t.r(n),t.d(n,{AIProgramPicker:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.program_list,s=a.ai_info;return(0,r.jsx)(l.p8,{width:450,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Select Program",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory Available",children:s.memory}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth Available",children:s.bandwidth})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(i.$n,{icon:"file",onClick:function(){return t("select",{uid:e.UID})},children:1===e.installed?"Update":"Install"}),children:(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.BJ.Item,{mb:2,children:(0,r.jsx)(i.Ki.Item,{label:"Description",children:e.description})}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:1===e.installed?"Bandwidth Cost":"Memory Cost",children:e.memory_cost}),(0,r.jsx)(i.Ki.Item,{label:"Upgrade Level",children:e.upgrade_level})]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:"Installed",children:1===e.installed?"True":"False"}),(0,r.jsx)(i.Ki.Item,{label:"Passive",children:1===e.is_passive?"True":"False"})]})]})]})})},e)})})]})})})}},9991:function(e,n,t){"use strict";t.r(n),t.d(n,{AIResourceManagementConsole:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n,t=(0,l.Oc)().data.screen;return 0===t?n=(0,r.jsx)(u,{}):1===t&&(n=(0,r.jsx)(d,{})),n},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data;o.auth,o.ai_list,o.nodes_list;var s=o.screen;return(0,r.jsx)(a.p8,{width:350,height:425,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:0===s,icon:"list",onClick:function(){return t("menu",{screen:0})},children:"Allocated Resources"}),(0,r.jsx)(i.tU.Tab,{selected:1===s,icon:"circle-nodes",onClick:function(){return t("menu",{screen:1})},children:"Online Nodes"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{})})})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.screen;var o=t.ai_list;return t.nodes_list,(0,r.jsxs)(i.az,{children:[(!o||0===o.length)&&(0,r.jsx)(i.IC,{children:"No AI detected."}),!!o&&o.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory",children:e.memory}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Memory",children:e.memory_max}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth",children:e.bandwidth}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Bandwidth",children:e.bandwidth_max})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data;a.screen,a.ai_list;var c=a.nodes_list;return(0,r.jsxs)(i.az,{children:[(!c||0===c.length)&&(0,r.jsx)(i.IC,{children:"No nodes detected."}),!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),buttons:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"circle-nodes",onClick:function(){return t("reassign",{uid:e.uid})},children:"Reassign"})}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Assigned AI",children:e.assigned_ai}),(0,r.jsx)(i.Ki.Item,{label:"Resource",children:(0,o.ZH)(e.resource)}),(0,r.jsx)(i.Ki.Item,{label:"Amount",children:e.amount})]})},e)})]})}},731:function(e,n,t){"use strict";t.r(n),t.d(n,{APC:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(1992),c=function(e){return(0,r.jsx)(l.p8,{width:510,height:435,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(d,{})})})},s={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"}},u={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"}},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.locked&&!l.siliconUser;l.normallyLocked;var d=s[l.externalPower]||s[0],f=s[l.chargingStatus]||s[0],h=l.powerChannels||[],m=u[l.malfStatus]||u[0],p=l.powerCellStatus/100;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.InterfaceLockNoticeBox,{}),(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main Breaker",color:d.color,buttons:(0,r.jsx)(i.$n,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!c,color:l.isOperating?"":"bad",disabled:c,onClick:function(){return t("breaker")}}),children:["[ ",d.externalPowerText," ]"]}),(0,r.jsx)(i.Ki.Item,{label:"Power Cell",children:(0,r.jsx)(i.z2,{color:"good",value:p})}),(0,r.jsxs)(i.Ki.Item,{label:"Charge Mode",color:f.color,buttons:(0,r.jsx)(i.$n,{icon:l.chargeMode?"sync":"times",content:l.chargeMode?"Auto":"Off",selected:l.chargeMode,disabled:c,onClick:function(){return t("charge")}}),children:["[ ",f.chargingText," ]"]})]})}),(0,r.jsx)(i.wn,{title:"Power Channels",children:(0,r.jsxs)(i.Ki,{children:[h.map(function(e){var n=e.topicParams;return(0,r.jsxs)(i.Ki.Item,{label:e.title,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:!c&&(1===e.status||3===e.status),disabled:c,onClick:function(){return t("channel",n.auto)}}),(0,r.jsx)(i.$n,{icon:"power-off",content:"On",selected:!c&&2===e.status,disabled:c,onClick:function(){return t("channel",n.on)}}),(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:!c&&0===e.status,disabled:c,onClick:function(){return t("channel",n.off)}})]}),children:[e.powerLoad," W"]},e.title)}),(0,r.jsx)(i.Ki.Item,{label:"Total Load",children:(0,r.jsxs)("b",{children:[l.totalLoad," W"]})})]})}),(0,r.jsx)(i.wn,{title:"Misc",buttons:!!l.siliconUser&&(0,r.jsxs)(r.Fragment,{children:[!!l.malfStatus&&(0,r.jsx)(i.$n,{icon:m.icon,content:m.content,color:"bad",onClick:function(){return t(m.action)}}),(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:"Overload",onClick:function(){return t("overload")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cover Lock",buttons:(0,r.jsx)(i.$n,{mb:.4,icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",disabled:c,onClick:function(){return t("cover")}})}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Lighting",buttons:(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:l.emergencyLights?"Enabled":"Disabled",disabled:c,onClick:function(){return t("emergency_lighting")}})}),(0,r.jsx)(i.Ki.Item,{label:"Night Shift Lighting",buttons:(0,r.jsx)(i.$n,{mt:.4,icon:"lightbulb-o",content:l.nightshiftLights?"Enabled":"Disabled",onClick:function(){return t("toggle_nightshift")}})})]})})]})}},6181:function(e,n,t){"use strict";t.r(n),t.d(n,{ATM:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(g)if(s)switch(c){case 1:n=(0,r.jsx)(f,{});break;case 2:n=(0,r.jsx)(h,{});break;case 3:n=(0,r.jsx)(x,{});break;default:n=(0,r.jsx)(m,{})}else n=(0,r.jsx)(p,{});else n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,r.jsx)(a.p8,{width:550,height:650,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(o.wn,{children:n})]})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data;i.machine_id;var a=i.held_card_name;return(0,r.jsxs)(o.wn,{title:"Nanotrasen Automatic Teller Machine",children:[(0,r.jsx)(o.az,{children:"For all your monetary needs!"}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Card",children:(0,r.jsx)(o.$n,{content:a,icon:"eject",onClick:function(){return t("insert_card")}})})})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.security_level;return(0,r.jsxs)(o.wn,{title:"Select a new security level for this account",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return t("change_security_level",{new_security_level:1})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return t("change_security_level",{new_security_level:2})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},h=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=s((0,i.useState)(0),2),h=f[0],m=f[1],p=s((0,i.useState)(0),2),x=p[0],j=p[1],b=a.money;return(0,r.jsxs)(o.wn,{title:"Transfer Fund",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",b]}),(0,r.jsx)(o.Ki.Item,{label:"Target Account Number",children:(0,r.jsx)(o.pd,{placeholder:"7 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Funds to Transfer",children:(0,r.jsx)(o.pd,{onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Transaction Purpose",children:(0,r.jsx)(o.pd,{fluid:!0,onChange:function(e){return j(e)}})})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return t("transfer",{target_acc_number:u,funds_amount:h,purpose:x})}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=a.owner_name,h=a.money;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Welcome, "+f,buttons:(0,r.jsx)(o.$n,{content:"Logout",icon:"sign-out-alt",onClick:function(){return t("logout")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",h]}),(0,r.jsx)(o.Ki.Item,{label:"Withdrawal Amount",children:(0,r.jsx)(o.pd,{onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return t("withdrawal",{funds_amount:u})}})})]})}),(0,r.jsxs)(o.wn,{title:"Menu",children:[(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Change account security level",icon:"lock",onClick:function(){return t("view_screen",{view_screen:1})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return t("view_screen",{view_screen:2})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"View transaction log",icon:"list",onClick:function(){return t("view_screen",{view_screen:3})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Print balance statement",icon:"print",onClick:function(){return t("balance_statement")}})})]})]})},p=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(null),2),u=c[0],d=c[1],f=s((0,i.useState)(null),2),h=f[0],m=f[1];return a.machine_id,a.held_card_name,(0,r.jsx)(o.wn,{title:"Insert card or enter ID and pin to login",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Account ID",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Pin",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Login",icon:"sign-in-alt",onClick:function(){return t("attempt_auth",{account_num:u,account_pin:h})}})})]})})},x=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).transaction_log;return(0,r.jsxs)(o.wn,{title:"Transactions",children:[(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Timestamp"}),(0,r.jsx)(o.XI.Cell,{children:"Reason"}),(0,r.jsx)(o.XI.Cell,{children:"Value"}),(0,r.jsx)(o.XI.Cell,{children:"Terminal"})]}),t.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.time}),(0,r.jsx)(o.XI.Cell,{children:e.purpose}),(0,r.jsxs)(o.XI.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,r.jsx)(o.XI.Cell,{children:e.target_name})]},e)})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,l.Oc)(),t=n.act;return n.data,(0,r.jsx)(o.$n,{content:"Back",icon:"sign-out-alt",onClick:function(){return t("view_screen",{view_screen:0})}})}},4558:function(e,n,t){"use strict";t.r(n),t.d(n,{AccountsUplinkTerminal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(7352),u=t(736),d=t(6888),f=t(2264),h=t(4900);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(6888),u=t(2264),d=t(4900),f=function(e){switch(e){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";case 4:return"Advanced Disease Carriers";default:return"Something went wrong with this menu, make an issue report please!"}},h=function(e){switch(e){case 0:return(0,r.jsx)(j,{});case 1:return(0,r.jsx)(y,{});case 2:return(0,r.jsx)(w,{});case 3:return(0,r.jsx)(_,{});case 4:return(0,r.jsx)(I,{});default:return"Something went wrong with this menu, make an issue report please!"}},m=function(e){return(0,r.jsx)(c.p8,{width:800,height:600,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.IC,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,r.jsxs)(d.default.Default,{tabIndex:0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(p,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(x,{})})]})]})})})},p=function(){var e=(0,i.useContext)(d.default),n=e.tabIndex,t=e.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:0===n,onClick:function(){t(0)},icon:"user",children:"Antagonists"},"Antagonists"),(0,r.jsx)(o.tU.Tab,{selected:1===n,onClick:function(){t(1)},icon:"people-robbery",children:"Objectives"},"Objectives"),(0,r.jsx)(o.tU.Tab,{selected:2===n,onClick:function(){t(2)},icon:"handcuffs",children:"Security"},"Security"),(0,r.jsx)(o.tU.Tab,{selected:3===n,onClick:function(){t(3)},icon:"lock",children:"High Value Items"},"HighValueItems"),(0,r.jsx)(o.tU.Tab,{selected:4===n,onClick:function(){t(4)},icon:"virus",children:"Advanced Disease Carriers"},"AdvancedDiseaseCarriers")]})},x=function(){return(0,r.jsx)(s.default.Default,{children:(0,r.jsx)(g,{})})},g=function(){var e=(0,a.Oc)().act,n=(0,i.useContext)(d.default).tabIndex,t=(0,i.useContext)(s.default).setSearchText;return(0,r.jsx)(o.wn,{title:f(n),fill:!0,scrollable:!0,buttons:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.pd,{width:"300px",placeholder:"Search...",onChange:function(e){return t(e)}}),(0,r.jsx)(o.$n,{icon:"sync",onClick:function(){return e("refresh")},children:"Refresh"})]}),children:h(n)})},j=function(){return(0,r.jsx)(u.default.Default,{sortId:"antag_name",children:(0,r.jsx)(b,{})})},b=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.antagonists,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{id:"name",children:"Mob Name"}),(0,r.jsx)(O,{id:"",children:"Buttons"}),(0,r.jsx)(O,{id:"antag_name",children:"Antagonist Type"}),(0,r.jsx)(O,{id:"status",children:"Status"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.status+"|"+e.antag_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.body_destroyed?e.name:(0,r.jsx)(o.$n,{color:e.is_hijacker||!e.name?"red":"",tooltip:e.is_hijacker?"Hijacker":"",onClick:function(){return t("show_player_panel",{mind_uid:e.antag_mind_uid})},children:e.name?e.name:"??? (NO NAME)"})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.antag_mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.antag_mind_uid})},children:"OBS"}),(0,r.jsx)(o.$n,{onClick:function(){t("tp",{mind_uid:e.antag_mind_uid})},children:"TP"})]}),(0,r.jsx)(o.XI.Cell,{children:e.antag_name}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"red":"grey",children:e.status?e.status:"Alive"})})]},n)})]}):"No Antagonists!"},y=function(){return(0,r.jsx)(u.default.Default,{sortId:"target_name",children:(0,r.jsx)(v,{})})},v=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.objectives,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),c.filter((0,l.XZ)(d,function(e){return e.obj_name+"|"+e.target_name+"|"+(e.status?"success":"incompleted")+"|"+e.owner_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]||"target_name"===h&&e.no_target?t:void 0===n[h]||null===n[h]||"target_name"===h&&n.no_target?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.obj_uid})},children:e.obj_name})}),(0,r.jsx)(o.XI.Cell,{children:e.no_target?"":e.track.length?e.track.map(function(n,i){return(0,r.jsxs)(o.$n,{onClick:function(){return t("follow",{datum_uid:n})},children:[e.target_name," ",e.track.length>1?"("+(parseInt(i,10)+1)+")":""]},i)}):"No "+e.target_name+" Found"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"green":"grey",children:e.status?"Success":"Incomplete"})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("obj_owner",{owner_uid:e.owner_uid})},children:e.owner_name})})]},n)})]}):"No Objectives!"},w=function(){return(0,r.jsx)(u.default.Default,{sortId:"health",children:(0,r.jsx)(k,{})})},k=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.security,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder,p=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":e.broken_bone&&e.internal_bleeding?"Broken Bone, IB":e.broken_bone?"Broken Bone":e.internal_bleeding?"IB":"Alive"};return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId3",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"role",children:"Role"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"health",children:"Health"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.role+"|"+p(e)+"|"+e.antag})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.role}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:p(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.antag?(0,r.jsx)(o.$n,{textColor:"red",onClick:function(){t("tp",{mind_uid:e.mind_uid})},children:e.antag}):""}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{my:.5,minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Security!"},_=function(){return(0,r.jsx)(u.default.Default,{sortId:"person",children:(0,r.jsx)(C,{})})},C=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.high_value_items,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.loc})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.person})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.loc})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:"grey",children:e.admin_z?"On Admin Z-level":""})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.uid})},children:"FLW"})})]},n)})]}):"No High Value Items!"},I=function(){return(0,r.jsx)(u.default.Default,{sortId:"strain",children:(0,r.jsx)(S,{})})},S=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data,d=c.disease_carriers,f=c.virus_data,h=(0,i.useContext)(s.default).searchText,m=(0,i.useContext)(u.default),p=m.sortId,x=m.sortOrder,g=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":"Alive"};return d.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"virus_name",children:"Virus Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"strain",children:"Strain"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"progress",children:"Progress"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"health",children:"Health"})]}),d.filter((0,l.XZ)(h,function(e){return e.name+"||"+g(e)+"|"+e.strain+"|"+e.virus_name})).sort(function(e,n){var t=x?1:-1;return void 0===e[p]||null===e[p]?t:void 0===n[p]||null===n[p]?-1*t:"number"==typeof e[p]?(e[p]-n[p])*t:e[p].localeCompare(n[p])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{color:e.patient_zero?"red":"",onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:g(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.virus_name}),(0,r.jsx)(o.m_,{position:"right",content:"Symptoms: "+f[e.strain],children:(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.strain})},n),(0,r.jsx)(o.XI.Cell,{children:e.patient_zero?"Patient Zero":(0,r.jsx)(o.z2,{minValue:0,value:e.progress/100,maxValue:1,ranges:{good:[0,20],average:[20,60],bad:[60,100]},children:e.progress})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Disease Carriers!"},O=function(e){var n=e.id,t=(e.sort_group,e.default_sort,e.children),l=(0,i.useContext)(u.default),a=l.sortId,c=l.setSortId,s=l.sortOrder,d=l.setSortOrder;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:a!==n&&"transparent",width:"100%",onClick:function(){a===n?d(!s):(c(n),d(!0))},children:[t,a===n&&(0,r.jsx)(o.In,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},2794:function(e,n,t){"use strict";t.r(n),t.d(n,{AgentCard:()=>m,AgentCardAppearances:()=>x,AgentCardInfo:()=>p});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=a[c.power.main]||a[0],u=a[c.power.backup]||a[0],d=a[c.shock]||a[0];return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main",color:s.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){return t("disrupt-main")}}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"[".concat(c.power.main_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Backup",color:u.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){return t("disrupt-backup")}}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"[".concat(c.power.backup_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Electrify",color:d.color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&2!==c.shock),content:"Restore",onClick:function(){return t("shock-restore")}}),(0,r.jsx)(i.$n,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){return t("shock-temp")}}),(0,r.jsx)(i.$n,{icon:"bolt",disabled:!c.wires.shock||0===c.shock,content:"Permanent",onClick:function(){return t("shock-perm")}})]}),children:[2===c.shock?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"[".concat(c.shock_timeleft,"s]")||-1===c.shock_timeleft&&"[Permanent]"]})]})}),(0,r.jsx)(i.wn,{title:"Access and Door Control",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Scan",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){return t("idscan-toggle")}}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Access",buttons:(0,r.jsx)(i.$n,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){return t("emergency-toggle")}})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolts",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){return t("bolt-toggle")}}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){return t("light-toggle")}}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){return t("safe-toggle")}}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){return t("speed-toggle")}}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Control",color:"bad",buttons:(0,r.jsx)(i.$n,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){return t("open-close")}}),children:!!(c.locked||c.welded)&&(0,r.jsxs)("span",{children:["[Door is ",c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"","!]"]})})]})})]})})}},5486:function(e,n,t){"use strict";t.r(n),t.d(n,{AirAlarm:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1992),s=t(4900),u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).locked;return(0,r.jsx)(a.p8,{width:570,height:t?310:755,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(c.InterfaceLockNoticeBox,{}),(0,r.jsx)(f,{}),!t&&(0,r.jsxs)(s.default.Default,{tabIndex:0,children:[(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})]})})},d=function(e){return 0===e?"green":1===e?"orange":"red"},f=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.air,s=a.mode,u=a.atmos_alarm,f=a.locked,h=a.alarmActivated,m=a.rcon,p=a.target_temp;return n=0===c.danger.overall?0===u?"Optimal":"Caution: Atmos alert in area":1===c.danger.overall?"Caution":"DANGER: Internals Required",(0,r.jsx)(o.wn,{title:"Air Status",children:c?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Pressure",children:(0,r.jsxs)(o.az,{color:d(c.danger.pressure),children:[(0,r.jsx)(o.zv,{value:c.pressure})," kPa",!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{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})}})]})]})}),(0,r.jsx)(o.Ki.Item,{label:"Oxygen",children:(0,r.jsx)(o.z2,{value:c.contents.oxygen/100,fractionDigits:"1",color:d(c.danger.oxygen)})}),(0,r.jsx)(o.Ki.Item,{label:"Nitrogen",children:(0,r.jsx)(o.z2,{value:c.contents.nitrogen/100,fractionDigits:"1",color:d(c.danger.nitrogen)})}),(0,r.jsx)(o.Ki.Item,{label:"Carbon Dioxide",children:(0,r.jsx)(o.z2,{value:c.contents.co2/100,fractionDigits:"1",color:d(c.danger.co2)})}),(0,r.jsx)(o.Ki.Item,{label:"Toxins",children:(0,r.jsx)(o.z2,{value:c.contents.plasma/100,fractionDigits:"1",color:d(c.danger.plasma)})}),c.contents.n2o>.1&&(0,r.jsx)(o.Ki.Item,{label:"Nitrous Oxide",children:(0,r.jsx)(o.z2,{value:c.contents.n2o/100,fractionDigits:"1",color:d(c.danger.n2o)})}),c.contents.h2>.1&&(0,r.jsx)(o.Ki.Item,{label:"Hydrogen",children:(0,r.jsx)(o.z2,{value:c.contents.h2/100,fractionDigits:"1",color:d(c.danger.h2)})}),c.contents.water_vapor>.1&&(0,r.jsx)(o.Ki.Item,{label:"Water Vapor",children:(0,r.jsx)(o.z2,{value:c.contents.water_vapor/100,fractionDigits:"1",color:d(c.danger.water_vapor)})}),c.contents.other>.1&&(0,r.jsx)(o.Ki.Item,{label:"Other",children:(0,r.jsx)(o.z2,{value:c.contents.other/100,fractionDigits:"1",color:d(c.danger.other)})}),(0,r.jsx)(o.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(o.az,{color:d(c.danger.temperature),children:[(0,r.jsx)(o.zv,{value:c.temperature})," K / ",(0,r.jsx)(o.zv,{value:c.temperature_c})," C\xa0",(0,r.jsx)(o.$n,{icon:"thermometer-full",content:p+" C",onClick:function(){return i("temperature")}}),(0,r.jsx)(o.$n,{content:c.thermostat_state?"On":"Off",selected:c.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,r.jsx)(o.Ki.Item,{label:"Local Status",children:(0,r.jsxs)(o.az,{color:d(c.danger.overall),children:[n,!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})]})]})}),(0,r.jsxs)(o.Ki.Item,{label:"Remote Control Settings",children:[(0,r.jsx)(o.$n,{content:"Off",selected:1===m,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,r.jsx)(o.$n,{content:"Auto",selected:2===m,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,r.jsx)(o.$n,{content:"On",selected:3===m,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,r.jsx)(o.az,{children:"Unable to acquire air sample!"})})},h=function(e){var n=(0,i.useContext)(s.default),t=n.tabIndex,l=n.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsxs)(o.tU.Tab,{selected:0===t,onClick:function(){return l(0)},children:[(0,r.jsx)(o.In,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,r.jsxs)(o.tU.Tab,{selected:1===t,onClick:function(){return l(1)},children:[(0,r.jsx)(o.In,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,r.jsxs)(o.tU.Tab,{selected:2===t,onClick:function(){return l(2)},children:[(0,r.jsx)(o.In,{name:"cog"})," Mode"]},"Mode"),(0,r.jsxs)(o.tU.Tab,{selected:3===t,onClick:function(){return l(3)},children:[(0,r.jsx)(o.In,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},m=function(e){switch((0,i.useContext)(s.default).tabIndex){case 0:return(0,r.jsx)(p,{});case 1:return(0,r.jsx)(x,{});case 2:return(0,r.jsx)(g,{});case 3:return(0,r.jsx)(j,{});default:return"WE SHOULDN'T BE HERE!"}},p=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.vents.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.direction?"Blowing":"Siphoning",icon:e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return t("command",{cmd:"direction",val:!e.direction,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(o.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"External Pressure Target",children:[(0,r.jsx)(o.zv,{value:e.external})," kPa\xa0",(0,r.jsx)(o.$n,{content:"Set",icon:"cog",onClick:function(){return t("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Reset",icon:"redo-alt",onClick:function(){return t("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)})},x=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubbers.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",val:!e.scrubbing,id_tag:e.id_tag})}})]}),(0,r.jsx)(o.Ki.Item,{label:"Range",children:(0,r.jsx)(o.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",val:!e.widenet,id_tag:e.id_tag})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(o.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",val:!e.filter_co2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",val:!e.filter_toxins,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",val:!e.filter_n2o,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",val:!e.filter_o2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",val:!e.filter_n2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",val:!e.filter_h2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",val:!e.filter_h2o,id_tag:e.id_tag})}})]})]})},e.name)})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.modes,c=i.presets,s=i.emagged,u=i.mode,d=i.preset;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"System Mode",children:Object.keys(a).map(function(e){var n=a[e];if(!n.emagonly||s)return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:n.name,icon:"cog",selected:n.id===u,onClick:function(){return t("mode",{mode:n.id})}})}),(0,r.jsx)(o.XI.Cell,{children:n.desc})]},n.name)})}),(0,r.jsxs)(o.wn,{title:"System Presets",children:[(0,r.jsx)(o.az,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,r.jsx)(o.XI,{mt:1,children:c.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:e.name,icon:"cog",selected:e.id===d,onClick:function(){return t("preset",{preset:e.id})}})}),(0,r.jsx)(o.XI.Cell,{children:e.desc})]},e.name)})})]})]})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.thresholds;return(0,r.jsx)(o.wn,{title:"Alarm Thresholds",children:(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{width:"20%",children:"Value"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),e.settings.map(function(e){return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:-1===e.selected?"Off":e.selected,onClick:function(){return t("command",{cmd:"set_threshold",env:e.env,var:e.val})}})},e.val)})]},e.name)})]})})}},6962:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockAccessController:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.exterior_status,d=s.interior_status,f=s.processing;return n="open"===u?(0,r.jsx)(i.$n,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:f,onClick:function(){return c("force_ext")}}):(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:f,onClick:function(){return c("cycle_ext_door")}}),t="open"===d?(0,r.jsx)(i.$n,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:f,color:"open"===d?"red":f?"yellow":null,onClick:function(){return c("force_int")}}):(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:f,onClick:function(){return c("cycle_int_door")}}),(0,r.jsx)(l.p8,{width:330,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Door Status",children:"closed"===u?"Locked":"Open"}),(0,r.jsx)(i.Ki.Item,{label:"Internal Door Status",children:"closed"===d?"Locked":"Open"})]})}),(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.az,{children:[n,t]})})]})})}},9281:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockElectronics:()=>c,ChooseAccess:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){return(0,r.jsx)(l.p8,{width:500,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.unrestricted_dir;return(0,r.jsx)(i.wn,{title:"Access Control",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&l,onClick:function(){return t("unrestricted_access",{unres_dir:4})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&l,onClick:function(){return t("unrestricted_access",{unres_dir:2})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&l,onClick:function(){return t("unrestricted_access",{unres_dir:8})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&l,onClick:function(){return t("unrestricted_access",{unres_dir:1})}})})]})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.selected_accesses,s=l.one_access,u=l.regions;return(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(r.Fragment,{}),grantableList:[],usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return t("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,content:"All",onClick:function(){return t("set_one_access",{access:"all"})}})]}),accesses:u,selectedList:c,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}},934:function(e,n,t){"use strict";t.r(n),t.d(n,{AlertModal:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t30?Math.ceil(b.length/4):0)+(b.length&&g?5:0),I=325+100*(x.length>2),S=function(e){0===k&&-1===e?_(x.length-1):k===x.length-1&&1===e?_(0):_(k+e)};return(0,r.jsxs)(c.p8,{title:v,height:C,width:I,children:[!!y&&(0,r.jsx)(s.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.iy||n===l.Ri?d("choose",{choice:x[k]}):n===l.s6?d("cancel"):n===l.iU?(e.preventDefault(),S(-1)):(n===l.aW||n===l.zh)&&(e.preventDefault(),S(1))},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,m:1,children:(0,r.jsx)(o.az,{color:"label",overflow:"hidden",children:b})}),(0,r.jsxs)(o.BJ.Item,{children:[!!m&&(0,r.jsx)(o.y5,{}),(0,r.jsx)(f,{selected:k})]})]})})})]})},f=function(e){var n=(0,a.Oc)().data,t=n.buttons,i=void 0===t?[]:t,l=n.large_buttons,c=n.swapped_buttons,s=e.selected;return(0,r.jsx)(o.so,{fill:!0,align:"center",direction:c?"row":"row-reverse",justify:"space-around",wrap:!0,children:null==i?void 0:i.map(function(e,n){return l&&i.length<3?(0,r.jsx)(o.so.Item,{grow:!0,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n):(0,r.jsx)(o.so.Item,{grow:+!!l,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n)})})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.large_buttons,l=e.button,c=e.selected,s=l.length>7?"100%":7;return(0,r.jsx)(o.$n,{mx:+!!i,pt:.33*!!i,content:l,fluid:!!i,onClick:function(){return t("choose",{choice:l})},selected:c,textAlign:"center",height:!!i&&2,width:!i&&s})}},2712:function(e,n,t){"use strict";t.r(n),t.d(n,{AntagInfoHeretic:()=>y});var r=t(8138),i=t(4530),o=t(2864),l=t(7790),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?e.cost:"FREE")})]}),!!e.ascension&&(0,r.jsx)(l.az,{textAlign:"center",fontSize:"32px",children:(0,r.jsx)("span",{style:d,children:"DUSK"})})]},e.name)})}),(0,r.jsx)("hr",{})]},n)})})]})},b=function(){var e=(0,o.Oc)().data.charges;return(0,r.jsxs)(l.so,{direction:"column",height:"100%",children:[(0,r.jsxs)(l.az,{textAlign:"center",fontSize:"20px",mb:1,children:["You have ",(0,r.jsx)("b",{children:e||0}),"\xa0",(0,r.jsxs)("span",{style:u,children:["knowledge point",1!==e?"s":""]})," to spend."]}),(0,r.jsx)(l.so.Item,{grow:!0,children:(0,r.jsx)(j,{})})]})},y=function(){var e,n=(0,o.Oc)().data.ascended,t=(e=(0,i.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,2)||function(e,n){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=t[0],u=t[1];return(0,r.jsx)(a.p8,{width:675,height:635,children:(0,r.jsx)(a.p8.Content,{style:{backgroundImage:"none",background:n?"radial-gradient(circle, rgba(24,9,9,1) 54%, rgba(31,10,10,1) 60%, rgba(46,11,11,1) 80%, rgba(47,14,14,1) 100%);":"radial-gradient(circle, rgba(9,9,24,1) 54%, rgba(10,10,31,1) 60%, rgba(21,11,46,1) 80%, rgba(24,14,47,1) 100%);"},children:(0,r.jsxs)(l.so,{direction:"column",height:"100%",children:[(0,r.jsx)(l.so.Item,{children:(0,r.jsxs)(l.tU,{fluid:!0,children:[(0,r.jsx)(l.tU.Tab,{icon:"info",selected:0===s,onClick:function(){return u(0)},children:"Information"}),(0,r.jsx)(l.tU.Tab,{icon:1===s?"book-open":"book",selected:1===s,onClick:function(){return u(1)},children:"Research"})]})}),(0,r.jsx)(l.so.Item,{grow:!0,children:0===s?(0,r.jsx)(m,{}):(0,r.jsx)(b,{})})]})})})}},6473:function(e,n,t){"use strict";t.r(n),t.d(n,{AppearanceChanger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.change_race,u=a.species,d=a.specimen,f=a.change_gender,h=a.gender,m=a.change_eye_color,p=a.change_skin_tone,x=a.change_skin_color,g=a.change_runechat_color,j=a.change_head_accessory_color,b=a.change_hair_color,y=a.change_secondary_hair_color,v=a.change_facial_hair_color,w=a.change_secondary_facial_hair_color,k=a.change_head_marking_color,_=a.change_body_marking_color,C=a.change_tail_marking_color,I=a.change_head_accessory,S=a.head_accessory_styles,O=a.head_accessory_style,A=a.change_hair,P=a.hair_styles,E=a.hair_style,B=a.change_hair_gradient,z=a.change_facial_hair,T=a.facial_hair_styles,N=a.facial_hair_style,R=a.change_head_markings,$=a.head_marking_styles,D=a.head_marking_style,M=a.change_body_markings,L=a.body_marking_styles,K=a.body_marking_style,J=a.change_tail_markings,X=a.tail_marking_styles,U=a.tail_marking_style,F=a.change_body_accessory,V=a.body_accessory_styles,H=a.body_accessory_style,W=a.change_alt_head,q=a.alt_head_styles,G=a.alt_head_style,Y=!1;return(m||p||x||j||g||b||y||v||w||k||_||C)&&(Y=!0),(0,r.jsx)(l.p8,{width:800,height:450,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[!!s&&(0,r.jsx)(i.Ki.Item,{label:"Species",children:u.map(function(e){return(0,r.jsx)(i.$n,{content:e.specimen,selected:e.specimen===d,onClick:function(){return t("race",{race:e.specimen})}},e.specimen)})}),!!f&&(0,r.jsxs)(i.Ki.Item,{label:"Gender",children:[(0,r.jsx)(i.$n,{content:"Male",selected:"male"===h,onClick:function(){return t("gender",{gender:"male"})}}),(0,r.jsx)(i.$n,{content:"Female",selected:"female"===h,onClick:function(){return t("gender",{gender:"female"})}}),(0,r.jsx)(i.$n,{content:"Genderless",selected:"plural"===h,onClick:function(){return t("gender",{gender:"plural"})}})]}),!!Y&&(0,r.jsx)(c,{}),!!I&&(0,r.jsx)(i.Ki.Item,{label:"Head accessory",children:S.map(function(e){return(0,r.jsx)(i.$n,{content:e.headaccessorystyle,selected:e.headaccessorystyle===O,onClick:function(){return t("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)})}),!!A&&(0,r.jsx)(i.Ki.Item,{label:"Hair",children:P.map(function(e){return(0,r.jsx)(i.$n,{content:e.hairstyle,selected:e.hairstyle===E,onClick:function(){return t("hair",{hair:e.hairstyle})}},e.hairstyle)})}),!!B&&(0,r.jsxs)(i.Ki.Item,{label:"Hair Gradient",children:[(0,r.jsx)(i.$n,{content:"Change Style",onClick:function(){return t("hair_gradient")}}),(0,r.jsx)(i.$n,{content:"Change Offset",onClick:function(){return t("hair_gradient_offset")}}),(0,r.jsx)(i.$n,{content:"Change Color",onClick:function(){return t("hair_gradient_colour")}}),(0,r.jsx)(i.$n,{content:"Change Alpha",onClick:function(){return t("hair_gradient_alpha")}})]}),!!z&&(0,r.jsx)(i.Ki.Item,{label:"Facial hair",children:T.map(function(e){return(0,r.jsx)(i.$n,{content:e.facialhairstyle,selected:e.facialhairstyle===N,onClick:function(){return t("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)})}),!!R&&(0,r.jsx)(i.Ki.Item,{label:"Head markings",children:$.map(function(e){return(0,r.jsx)(i.$n,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return t("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)})}),!!M&&(0,r.jsx)(i.Ki.Item,{label:"Body markings",children:L.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===K,onClick:function(){return t("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)})}),!!J&&(0,r.jsx)(i.Ki.Item,{label:"Tail markings",children:X.map(function(e){return(0,r.jsx)(i.$n,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===U,onClick:function(){return t("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)})}),!!F&&(0,r.jsx)(i.Ki.Item,{label:"Body accessory",children:V.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===H,onClick:function(){return t("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)})}),!!W&&(0,r.jsx)(i.Ki.Item,{label:"Alternate head",children:q.map(function(e){return(0,r.jsx)(i.$n,{content:e.altheadstyle,selected:e.altheadstyle===G,onClick:function(){return t("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.Ki.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_runechat_color",text:"Change runechat color",action:"runechat_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!!l[e.key]&&(0,r.jsx)(i.$n,{content:e.text,onClick:function(){return t(e.action)}},e.key)})})}},6085:function(e,n,t){"use strict";t.r(n),t.d(n,{ArcadeBattle:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e,n){var t=(0,o.Oc)(),a=t.act,c=t.data,s=c.enemyName,u=c.playerHP,d=c.playerMaxHP,f=c.playerMP,h=c.playerMaxMP,m=c.enemyHP,p=c.enemyMaxHP,x=c.onCooldown,g=c.gameOver,j=c.previousEvent;return g?(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,align:"center",title:m<1?"Rejoyce!":"Game Over!",children:(0,r.jsxs)(i.BJ,{justify:"space-between",vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:j})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(i.$n,{bold:!0,fluid:!0,height:"100%",fontSize:"min(8vw, 15vh)",textAlign:"center",verticalAlignContent:"middle",onClick:function(){return a("newgame")},children:"New Game"})})]})})})}):(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:s,children:(0,r.jsxs)(i.z2,{maxValue:p,minValue:0,value:m,ranges:{red:[-10,10],orange:[10,20],green:[20,p]},children:["Their Health: ",m]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Fight!",children:j})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"You",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:d,minValue:0,value:u,ranges:{red:[-10,10],orange:[10,20],green:[20,d]},children:["Your Health: ",u]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:h,minValue:0,value:f,ranges:{red:[-10,h/4],orange:[h/4,h/2],green:[h/2,h]},children:["Your Magic: ",f]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{bold:!0,align:"center",children:"What will you do?"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"burst",lineHeight:3,onClick:function(){return a("attack")},disabled:x,children:"Attack"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"plus",lineHeight:3,onClick:function(){return a("heal")},disabled:x,children:"Heal"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"star",lineHeight:3,onClick:function(){return a("charge")},disabled:x,children:"Recharge"})})]})})]})})})]})})})}},3438:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosAlertConsole:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.pressure,u=a.max_pressure,d=a.filter_type,f=a.filter_type_list;return(0,r.jsx)(l.p8,{width:380,height:160,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:s,tickWhileDragging:!0,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Filter",children:f.map(function(e){return(0,r.jsx)(i.$n,{selected:e.gas_type===d,content:e.label,onClick:function(){return t("set_filter",{filter:e.gas_type})}},e.label)})})]})})})})}},7440:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosMixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.on,u=a.pressure,d=a.max_pressure,f=a.node1_concentration,h=a.node2_concentration;return(0,r.jsx)(l.p8,{width:330,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:u,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:u===d,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(c,{node_name:"Node 1",node_ref:f}),(0,r.jsx)(c,{node_name:"Node 2",node_ref:h})]})})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.node_name,a=e.node_ref;return(0,r.jsxs)(i.Ki.Item,{label:l,children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a-10)/100})}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,step:1,stepPixelSize:10,minValue:0,maxValue:100,value:a,onChange:function(e){return t("set_node",{node_name:l,concentration:e/100})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a+10)/100})}})]})}},7897:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosPump:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.rate,u=a.max_rate,d=a.gas_unit,f=a.step;return(0,r.jsx)(l.p8,{width:330,height:110,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_rate")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_rate",{rate:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_rate")}})]})]})})})})}},1164:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTankControl:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.sensors||{};return(0,r.jsx)(c.p8,{width:400,height:435,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[Object.keys(d).map(function(e){return(0,r.jsx)(i.wn,{title:e,children:(0,r.jsxs)(i.Ki,{children:[Object.keys(d[e]).indexOf("pressure")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[d[e].pressure," kpa"]}):"",Object.keys(d[e]).indexOf("temperature")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[d[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o","h2"].map(function(n){return Object.keys(d[e]).indexOf(n)>-1?(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(n),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(n),value:d[e][n],minValue:0,maxValue:100,children:(0,o.Mg)(d[e][n],2)+"%"})},(0,a.wM)(n)):""})]})},e)}),(0,r.jsx)(i.wn,{title:"Inlets",children:s.inlets&&Object.keys(s.inlets).length>0?s.inlets.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_inlet_active",{dev:e.uid})}})}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:e.rate,onChange:function(n){return t("set_inlet_volume_rate",{dev:e.uid,val:n})}})})]})},e)}):""}),(0,r.jsxs)(i.wn,{title:"Outlets",children:[s.vent_outlets&&Object.keys(s.vent_outlets).length>0?s.vent_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_outlet_active",{dev:e.uid})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(i.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:1})}}),(0,r.jsx)(i.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:2})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:e.rate,onChange:function(n){return t("set_outlet_pressure",{dev:e.uid,val:n})}})})]})},e)}):"",s.scrubber_outlets&&Object.keys(s.scrubber_outlets).length>0?(0,r.jsx)(u,{}):""]})]})})},u=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubber_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[(0,r.jsx)(i.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",id_tag:e.id_tag})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Range",children:(0,r.jsx)(i.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",id_tag:e.id_tag})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(i.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",id_tag:e.id_tag})}})]})]})},e.name)})}},8340:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTemperatureGate:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.temperature,u=a.max_temp,d=a.temp_unit,f=a.step,h=a.inverted;return(0,r.jsx)(l.p8,{width:330,height:130,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inverted",children:(0,r.jsx)(i.$n,{icon:h?"arrow-up":"arrow-down",content:h?"Yes":"No",color:h?null:"red",selected:h,onClick:function(){return t("inverted")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_temp")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_temperature",{temperature:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_temp")}})]})]})})})})}},6561:function(e,n,t){"use strict";t.r(n),t.d(n,{AugmentMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"".concat(t.current_level," / ").concat(t.max_level):"0 / ".concat(e.max_level);return(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.BJ,{vertical:!1,children:[(0,r.jsx)(o.$n,{height:"20px",width:"35px",mb:1,textAlign:"center",content:i,disabled:i>c||t&&t.current_level===t.max_level,tooltip:"Purchase this ability?",onClick:function(){n("purchase",{ability_path:e.ability_path}),p(m)}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.desc||"Description not available"}),(0,r.jsxs)(o.BJ.Item,{children:["Level: ",(0,r.jsx)("span",{style:{color:"green"},children:l}),v&&e.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",e.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})]})},h=function(e){var n=e.act,t=e.abilityTabs,i=e.knownAbilities,l=e.usableSwarms,a=i.filter(function(e){return e.current_levell,tooltip:"Upgrade this ability?",onClick:function(){return n("purchase",{ability_path:e.ability_path})}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.upgrade_text}),(0,r.jsxs)(o.BJ.Item,{children:["Level:"," ",(0,r.jsx)("span",{style:{color:"green"},children:"".concat(e.current_level," / ").concat(e.max_level)}),i&&i.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",i.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})}},8762:function(e,n,t){"use strict";t.r(n),t.d(n,{Autolathe:()=>f});var r=t(8138),i=t(8587),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn)&&!(e.requirements.glass*r>t)},f=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,f=s.total_amount,h=(s.max_amount,s.metal_amount),m=s.glass_amount,p=s.busyname,x=s.busyamt,g=s.showhacked,j=s.buildQueue,b=s.buildQueueLen,y=s.recipes,v=s.categories,w=s.fill_percent,k=u((0,a.QY)("category","Tools"),2),_=k[0],C=k[1],I=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),S=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),O=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),A=u((0,a.QY)("searchText",""),2),P=A[0],E=A[1],B=[];b>0&&(B=j.map(function(e,n){return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{fluid:!0,icon:"times",color:"transparent",content:e[0],onClick:function(){return t("remove_from_queue",{remove_from_queue:n+1})}},n)},n)}));var z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return(e.category.indexOf(_)>-1||!!n)&&(!!g||!e.hacked)});if(n){var r=(0,l.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name.toLowerCase()})}(y,P),T="Build";return P?T="Results for: '"+P+"':":_&&(T="Build ("+_+")"),(0,r.jsx)(c.p8,{width:750,height:525,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{width:"70%",children:(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:T,buttons:(0,r.jsx)(o.ms,{width:"150px",options:v,selected:_,onSelected:function(e){return C(e)}}),children:[(0,r.jsx)(o.pd,{fluid:!0,mb:1,placeholder:"Search for...",onChange:function(e){return E(e)},value:P}),z.map(function(e){return(0,r.jsxs)(o.BJ.Item,{grow:!0,children:[(0,r.jsx)("img",{src:"data:image /jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&1===x,disabled:!d(e,h,m,1),onClick:function(){return t("make",{make:e.uid,multiplier:1})},children:e.name}),e.max_multiplier>=10&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&10===x,disabled:!d(e,h,m,10),onClick:function(){return t("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&25===x,disabled:!d(e,h,m,25),onClick:function(){return t("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,r.jsxs)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&x===e.max_multiplier,disabled:!d(e,h,m,e.max_multiplier),onClick:function(){return t("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]}),e.requirements&&Object.keys(e.requirements).map(function(n){return(0,l.Sn)(n)+": "+e.requirements[n]}).join(", ")||(0,r.jsx)(o.az,{children:"No resources required."})]},e.uid)})]})}),(0,r.jsxs)(o.BJ.Item,{width:"30%",children:[(0,r.jsx)(o.wn,{title:"Materials",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Metal",children:I}),(0,r.jsx)(o.Ki.Item,{label:"Glass",children:S}),(0,r.jsx)(o.Ki.Item,{label:"Total",children:O}),(0,r.jsxs)(o.Ki.Item,{label:"Storage",children:[w,"% Full"]})]})}),(0,r.jsx)(o.wn,{title:"Building",children:(0,r.jsx)(o.az,{color:p?"green":"",children:p||"Nothing"})}),(0,r.jsxs)(o.wn,{title:"Build Queue",height:23.7,children:[B,(0,r.jsx)(o.$n,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!b,onClick:function(){return t("clear_queue")}})]})]})]})})})}},9766:function(e,n,t){"use strict";t.r(n),t.d(n,{BioChipPad:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.glow_brightness_base,s=a.glow_brightness_power,u=a.glow_contrast_base,d=a.glow_contrast_power,f=a.exposure_brightness_base,h=a.exposure_brightness_power,m=a.exposure_contrast_base,p=a.exposure_contrast_power;return(0,r.jsx)(l.p8,{title:"BloomEdit",width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Bloom Edit",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:c,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:s,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:u,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:d,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:f,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:h,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:m,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:p,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_power",{value:e})}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{children:[(0,r.jsx)(i.$n,{content:"Reload Lamps with New Parameters",onClick:function(){return t("update_lamps")}}),(0,r.jsx)(i.$n,{content:"Reset to Default",onClick:function(){return t("default")}})]})]})})})})}},7166:function(e,n,t){"use strict";t.r(n),t.d(n,{BlueSpaceArtilleryControl:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.ready?(0,r.jsx)(i.Ki.Item,{label:"Status",color:"green",children:"Ready"}):c.reloadtime_text?(0,r.jsx)(i.Ki.Item,{label:"Reloading In",color:"red",children:c.reloadtime_text}):(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:"No cannon connected!"}),(0,r.jsx)(l.p8,{width:400,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[c.notice&&(0,r.jsx)(i.Ki.Item,{label:"Alert",color:"red",children:c.notice}),n,(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.$n,{icon:"crosshairs",content:c.target?c.target:"None",onClick:function(){return a("recalibrate")}})}),1===c.ready&&!!c.target&&(0,r.jsx)(i.Ki.Item,{label:"Firing",children:(0,r.jsx)(i.$n,{icon:"skull",content:"FIRE!",color:"red",onClick:function(){return a("fire")}})}),!c.connected&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance",children:(0,r.jsx)(i.$n,{icon:"wrench",content:"Complete Deployment",onClick:function(){return a("build")}})})]})})})})})})}},8128:function(e,n,t){"use strict";t.r(n),t.d(n,{Alerts:()=>u,BluespaceTap:()=>s,Incursion:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){if((0,l.Oc)().data.portaling)return(0,r.jsx)(i.Rr,{fontsize:"256px",backgroundColor:"rgba(35,0,0,0.85)",children:(0,r.jsx)(i.Z8,{fontsize:"256px",interval:Math.random()>.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"skull",size:14,mb:"64px"}),(0,r.jsx)("br",{}),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})},s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.product||[],f=s.desiredMiningPower,h=s.miningPower,m=s.points,p=s.totalPoints,x=s.powerUse,g=s.availablePower,j=s.emagged,b=s.dirty,y=s.autoShutown,v=s.stabilizers,w=s.stabilizerPower,k=s.stabilizerPriority;return(0,r.jsx)(a.p8,{width:650,height:450,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(u,{}),(0,r.jsx)(i.Nt,{title:"Input Management",children:(0,r.jsxs)(i.wn,{fill:!0,title:"Input",children:[(0,r.jsx)(i.$n,{icon:y&&!j?"toggle-on":"toggle-off",content:"Auto shutdown",color:y&&!j?"green":"red",disabled:!!j,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){return t("auto_shutdown")}}),(0,r.jsx)(i.$n,{icon:v&&!j?"toggle-on":"toggle-off",content:"Stabilizers",color:v&&!j?"green":"red",disabled:!!j,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){return t("stabilizers")}}),(0,r.jsx)(i.$n,{icon:k&&!j?"toggle-on":"toggle-off",content:"Stabilizer priority",color:k&&!j?"green":"red",disabled:!!j,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){return t("stabilizer_priority")}}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Desired Mining Power",children:(0,o.d5)(f)}),(0,r.jsx)(i.Ki.Item,{verticalAlign:"top",label:"Set Desired Mining Power",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"step-backward",disabled:0===f||j,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:0})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:0===f||j,onClick:function(){return t("set",{set_power:f-1e7})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===f||j,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f-1e6})}})]}),(0,r.jsx)(i.BJ.Item,{mx:1,children:(0,r.jsx)(i.Q7,{disabled:j,minValue:0,value:f,maxValue:1/0,step:1,onChange:function(e){return t("set",{set_power:e})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:j,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e6})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:j,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e7})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Total Power Use",children:(0,o.d5)(x)}),(0,r.jsx)(i.Ki.Item,{label:"Mining Power Use",children:(0,o.d5)(h)}),(0,r.jsx)(i.Ki.Item,{label:"Stabilizer Power Use",children:(0,o.d5)(w)}),(0,r.jsx)(i.Ki.Item,{label:"Surplus Power",children:(0,o.d5)(g)})]})]})}),(0,r.jsxs)(i.wn,{fill:!0,title:"Output",children:[b?(0,r.jsx)(i.Rr,{backgroundColor:"rgba(63, 39, 18, 0.85)",children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"brown",fontsize:"256px",textAlign:"center",children:["Blockage Detected",(0,r.jsx)("br",{}),"Cleanup Required"]})})}):"",(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available Points",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Total Points",children:p})]})})}),(0,r.jsx)(i.BJ.Item,{align:"end",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.Ki,{children:d.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:(0,r.jsx)(i.$n,{disabled:e.price>=m,onClick:function(){return t("vend",{target:e.key})},content:e.price})},e.key)})})})})]})]})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.product;var o=t.miningPower,a=t.stabilizerPower,c=t.emagged,s=(t.safeLevels,t.autoShutown),u=t.stabilizers;return t.overhead,(0,r.jsxs)(r.Fragment,{children:[!s&&!c&&(0,r.jsx)(i.IC,{danger:1,children:"Auto shutdown disabled"}),c?(0,r.jsx)(i.IC,{danger:1,children:"All safeties disabled"}):o<=15e6?"":u?o>a+15e6?(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,r.jsx)(i.IC,{children:"High Power, engaging stabilizers"}):(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers disabled, Instability likely"})]})}},6807:function(e,n,t){"use strict";t.r(n),t.d(n,{BodyScanner:()=>p});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."],["paraplegic","bad","Lumbar nerves damaged."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],d={average:[.25,.5],bad:[.5,1/0]},f=function(e,n){for(var t=[],r=0;r0?e.filter(function(e){return!!e}).reduce(function(e,n){return(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)(i.az,{children:n},n)]})},null):null},m=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""},p=function(e){var n=(0,l.Oc)().data,t=n.occupied,i=n.occupant,o=t?(0,r.jsx)(x,{occupant:void 0===i?{}:i}):(0,r.jsx)(k,{});return(0,r.jsx)(a.p8,{width:700,height:600,title:"Body Scanner",children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:o})})},x=function(e){var n=e.occupant;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(g,{occupant:n}),(0,r.jsx)(j,{occupant:n}),(0,r.jsx)(b,{occupant:n}),(0,r.jsx)(v,{organs:n.extOrgan}),(0,r.jsx)(w,{organs:n.intOrgan})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"print",onClick:function(){return t("print_p")},children:"Print Report"}),(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectify")},children:"Eject"})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:o.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:o.maxHealth,value:o.health/o.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[o.stat][0],children:c[o.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempC)}),"\xb0C,\xa0",(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempF)}),"\xb0F"]}),(0,r.jsx)(i.Ki.Item,{label:"Implants",children:o.implant_len?(0,r.jsx)(i.az,{children:o.implant.map(function(e){return e.name}).join(", ")}):(0,r.jsx)(i.az,{color:"label",children:"None"})})]})})},j=function(e){var n=e.occupant;return n.hasBorer||n.blind||n.colourblind||n.nearsighted||n.hasVirus||n.paraplegic?(0,r.jsx)(i.wn,{title:"Abnormalities",children:s.map(function(e,t){if(n[e[0]])return(0,r.jsx)(i.az,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])})}):(0,r.jsx)(i.wn,{title:"Abnormalities",children:(0,r.jsx)(i.az,{color:"label",children:"No abnormalities found."})})},b=function(e){var n=e.occupant;return(0,r.jsx)(i.wn,{title:"Damage",children:(0,r.jsx)(i.XI,{children:f(u,function(e,t,o){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.XI.Row,{color:"label",children:[(0,r.jsxs)(i.XI.Cell,{children:[e[0],":"]}),(0,r.jsx)(i.XI.Cell,{children:!!t&&t[0]+":"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(y,{value:n[e[1]],marginBottom:o100)&&"average"||!!e.status.robotic&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{m:-.5,min:"0",max:e.maxHealth,mt:n>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:d,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.m_,{content:"Total damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"heartbeat",mr:.5}),Math.round(e.totalLoss)]})}),!!e.bruteLoss&&(0,r.jsx)(i.m_,{content:"Brute damage",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(0,r.jsx)(i.In,{name:"bone",mr:.5}),Math.round(e.bruteLoss)]})}),!!e.fireLoss&&(0,r.jsx)(i.m_,{content:"Burn damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"fire",mr:.5}),Math.round(e.fireLoss)]})})]})})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,m(e.germ_level),!!e.open&&"Open incision"])}),(0,r.jsxs)(i.az,{inline:!0,children:[h([!!e.status.splinted&&(0,r.jsx)(i.az,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})]),h(e.shrapnel.map(function(e){return e.known?e.name:"Unknown object"}))]})]})]},n)})]})})},w=function(e){return 0===e.organs.length?(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsx)(i.az,{color:"label",children:"N/A"})}):(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:"Damage"}),(0,r.jsx)(i.XI.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{color:!!e.dead&&"bad"||e.germ_level>100&&"average"||e.robotic>0&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:n>0&&"0.5rem",ranges:d,children:Math.round(e.damage)})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([m(e.germ_level)])}),(0,r.jsx)(i.az,{inline:!0,children:h([1===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),2===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Assisted"}),!!e.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})])})]})]},n)})]})})},k=function(){return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},2790:function(e,n,t){"use strict";t.r(n),t.d(n,{BookBinder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.selectedbook,u=c.book_categories,d=[];return u.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(l.p8,{width:600,height:400,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,title:"Book Binder",buttons:(0,r.jsx)(i.$n,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return t("print_book")}}),children:[(0,r.jsxs)(i.az,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Title",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,a.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(i.Ki.Item,{label:"Author",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,a.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(i.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.ms,{width:"190px",options:u.map(function(e){return e.description}),onSelected:function(e){return t("toggle_binder_category",{category_id:d[e]})}})})}),(0,r.jsx)(i.Ki.Item,{label:"Summary",children:(0,r.jsx)(i.$n,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,a.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(i.Ki.Item,{children:s.summary})]}),(0,r.jsx)("br",{}),u.filter(function(e){return s.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(i.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_binder_category",{category_id:e.category_id})}},e.category_id)})]})})]})})})]})}},1326:function(e,n,t){"use strict";t.r(n),t.d(n,{BotCall:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.cleanblood,f=c.area;return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsx)(i.wn,{title:"Cleaning Settings",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Clean Blood",disabled:s,onClick:function(){return t("blood")}})}),(0,r.jsxs)(i.wn,{title:"Misc Settings",children:[(0,r.jsx)(i.$n,{fluid:!0,content:f?"Reset Area Selection":"Restrict to Current Area",onClick:function(){return t("area")}}),null!==f&&(0,r.jsx)(i.az,{mb:1,children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Locked Area",children:f})})})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},3578:function(e,n,t){"use strict";t.r(n),t.d(n,{BotFloor:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.hullplating,f=c.replace,h=c.eat,m=c.make,p=c.fixfloor,x=c.nag_empty,g=c.magnet,j=c.tiles_amount;return(0,r.jsx)(l.p8,{width:500,height:510,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Floor Settings",children:[(0,r.jsx)(i.az,{mb:"5px",children:(0,r.jsx)(i.Ki.Item,{label:"Tiles Left",children:j})}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:s,onClick:function(){return t("autotile")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:s,onClick:function(){return t("replacetiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Repair damaged tiles and platings",disabled:s,onClick:function(){return t("fixfloors")}})]}),(0,r.jsxs)(i.wn,{title:"Miscellaneous",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:s,onClick:function(){return t("eattiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Make pieces of metal into tiles when empty",disabled:s,onClick:function(){return t("maketiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:x,content:"Transmit notice when empty",disabled:s,onClick:function(){return t("nagonempty")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:g,content:"Traction Magnets",disabled:s,onClick:function(){return t("anchored")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},5144:function(e,n,t){"use strict";t.r(n),t.d(n,{BotHonk:()=>a});var r=t(8138),i=t(2864),o=t(3384),l=t(9226),a=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.p8,{width:500,height:220,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(l.BotStatus,{})})})}},2078:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMed:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.shut_up,f=c.declare_crit,h=c.stationary_mode,m=c.heal_threshold,p=c.injection_amount,x=c.use_beaker,g=c.treat_virus,j=c.reagent_glass;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Communication Settings",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Speaker",checked:!d,disabled:s,onClick:function(){return t("toggle_speaker")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:f,disabled:s,onClick:function(){return t("toggle_critical_alerts")}})]}),(0,r.jsxs)(i.wn,{fill:!0,title:"Treatment Settings",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Healing Threshold",children:(0,r.jsx)(i.Ap,{value:m.value,minValue:m.min,maxValue:m.max,step:5,disabled:s,onChange:function(e,n){return t("set_heal_threshold",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Injection Level",children:(0,r.jsx)(i.Ap,{value:p.value,minValue:p.min,maxValue:p.max,step:5,format:function(e){return"".concat(e,"u")},disabled:s,onChange:function(e,n){return t("set_injection_amount",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reagent Source",children:(0,r.jsx)(i.$n,{content:x?"Beaker":"Internal Synthesizer",icon:x?"flask":"cogs",disabled:s,onClick:function(){return t("toggle_use_beaker")}})}),j&&(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsxs)(i.BJ,{inline:!0,width:"100%",children:[(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsxs)(i.z2,{value:j.amount,minValue:0,maxValue:j.max_amount,children:[j.amount," / ",j.max_amount]})}),(0,r.jsx)(i.BJ.Item,{ml:1,children:(0,r.jsx)(i.$n,{content:"Eject",disabled:s,onClick:function(){return t("eject_reagent_glass")}})})]})})]}),(0,r.jsx)(i.$n.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:g,disabled:s,onClick:function(){return t("toggle_treat_viral")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:s,onClick:function(){return t("toggle_stationary_mode")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})})}},881:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMule:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.check_id,f=c.check_weapons,h=c.check_warrant,m=c.arrest_mode,p=c.arrest_declare;return(0,r.jsx)(l.p8,{width:500,height:445,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Who To Arrest",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:s,onClick:function(){return t("authid")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:s,onClick:function(){return t("authwarrant")}})]}),(0,r.jsxs)(i.wn,{title:"Arrest Procedure",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Detain Targets Indefinitely",disabled:s,onClick:function(){return t("arrtype")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Announce Arrests On Radio",disabled:s,onClick:function(){return t("arrdeclare")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},2850:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigCells:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=e.cell,t=(0,o.Oc)().act,l=n.cell_id,a=n.occupant,c=n.crimes,s=n.brigged_by,u=n.time_left_seconds,d=n.time_set_seconds,f=n.ref,h="";return u>0&&(h+=" BrigCells__listRow--active"),(0,r.jsxs)(i.XI.Row,{className:h,children:[(0,r.jsx)(i.XI.Cell,{children:l}),(0,r.jsx)(i.XI.Cell,{children:a}),(0,r.jsx)(i.XI.Cell,{children:c}),(0,r.jsx)(i.XI.Cell,{children:s}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:d})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:u})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{type:"button",onClick:function(){t("release",{ref:f})},children:"Release"})})]})},c=function(e){var n=e.cells;return(0,r.jsxs)(i.XI,{className:"BrigCells__list",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{header:!0,children:"Cell"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Occupant"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Crimes"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Brigged By"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Brigged For"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Left"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Release"})]}),n.map(function(e){return(0,r.jsx)(a,{cell:e},e.ref)})]})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).cells;return(0,r.jsx)(l.p8,{theme:"security",width:800,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{cells:t})})})})})}},9478:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigTimer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;a.nameText=a.occupant,a.timing&&(a.prisoner_hasrec?a.nameText=(0,r.jsx)(i.az,{color:"green",children:a.occupant}):a.nameText=(0,r.jsx)(i.az,{color:"red",children:a.occupant}));var c="pencil-alt";a.prisoner_name&&!a.prisoner_hasrec&&(c="exclamation-triangle");var s=[],u=0;for(u=0;ud});var r=t(8138),i=t(4530),o=t(2864),l=t(3384),a=t(7790);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tp,CameraConsoleContent:()=>x});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(5490),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te?this.substring(0,e)+"...":this};var h=function(e,n){if(!n)return[];var t,r,i=e.findIndex(function(e){return e.name===n.name});return[null==(t=e[i-1])?void 0:t.name,null==(r=e[i+1])?void 0:r.name]},m=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,c.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name})},p=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,o=i.mapRef,c=i.activeCamera,d=f(h(m(i.cameras),c),2),p=d[0],g=d[1];return(0,r.jsxs)(u.p8,{width:870,height:708,children:[(0,r.jsx)("div",{className:"CameraConsole__left",children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(l.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(x,{})})})}),(0,r.jsxs)("div",{className:"CameraConsole__right",children:[(0,r.jsxs)("div",{className:"CameraConsole__toolbar",children:[(0,r.jsx)("b",{children:"Camera: "}),c&&c.name||"—"]}),(0,r.jsxs)("div",{className:(0,a.Ly)(["CameraConsole__toolbar","CameraConsole__toolbar--right"]),children:[(0,r.jsx)(l.$n,{icon:"chevron-left",disabled:!p,onClick:function(){return t("switch_camera",{name:p})}}),(0,r.jsx)(l.$n,{icon:"chevron-right",disabled:!g,onClick:function(){return t("switch_camera",{name:g})}})]}),(0,r.jsx)(l.D1,{className:"CameraConsole__map",params:{id:o,type:"map"}})]})]})},x=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,c=f((0,o.useState)(""),2),u=c[0],d=c[1],h=i.activeCamera,p=m(i.cameras,u);return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search for a camera",onChange:function(e){return d(e)}})}),(0,r.jsx)(l.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:p.map(function(e){return(0,r.jsx)("div",{title:e.name,className:(0,a.Ly)(["Button","Button--fluid",h&&e.name===h.name?"Button--selected":"Button--color--transparent"]),onClick:function(){return t("switch_camera",{name:e.name})},children:e.name.trimLongStr(23)},e.name)})})})]})}},2094:function(e,n,t){"use strict";t.r(n),t.d(n,{Canister:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=s.portConnected,d=s.tankPressure,f=s.releasePressure,h=s.defaultReleasePressure,m=s.minReleasePressure,p=s.maxReleasePressure,x=s.valveOpen,g=s.name,j=s.canLabel,b=s.colorContainer,y=s.color_index,v=s.hasHoldingTank,w=s.holdingTank,k="";y.prim&&(k=b.prim.options[y.prim].name);var _="";y.sec&&(_=b.sec.options[y.sec].name);var C="";y.ter&&(C=b.ter.options[y.ter].name);var I="";y.quart&&(I=b.quart.options[y.quart].name);var S=[],O=[],A=[],P=[],E=0;for(E=0;El});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.scanned_card,l=e.modifying_card;return(0,r.jsx)(i.wn,{title:"Authentication",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Login/Logout",children:t?(0,r.jsx)(i.$n,{icon:"sign-out-alt",selected:!0,onClick:function(){return n("interact_scanned")},children:"Log Out: ".concat(t.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_scanned")},children:"-----"})}),(0,r.jsx)(i.Ki.Item,{label:"Card To Modify",children:l?(0,r.jsx)(i.$n,{icon:"eject",selected:!0,onClick:function(){return n("interact_modify")},children:"Remove Card: ".concat(l.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_modify")},children:"-----"})})]})})}},7542:function(e,n,t){"use strict";t.r(n),t.d(n,{CardInformation:()=>l,CardSkins:()=>a,DropdownCardSkins:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.card;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Registered Name",children:(0,r.jsx)(i.$n,{icon:t&&"Unknown"!==t.registered_name?"pencil-alt":"exclamation-triangle",selected:!!t,onClick:function(){return n("reg")},children:null==t?void 0:t.registered_name})}),(0,r.jsx)(i.Ki.Item,{label:"Account Number",children:(0,r.jsx)(i.$n,{icon:(null==t?void 0:t.associated_account_number)?"pencil-alt":"exclamation-triangle",selected:!!(null==t?void 0:t.associated_account_number),onClick:function(){return n("set_card_account_number")},children:(null==t?void 0:t.associated_account_number)?null==t?void 0:t.associated_account_number:"None"})})]})},a=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[t.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)}),!!a&&(0,r.jsx)(i.az,{children:Array.isArray(c)&&c.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,color:"purple",onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)})})]})},c=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins,s=t.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}),u=Array.isArray(c)?c.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}):[],d=s.filter(function(e){return e.value===(null==l?void 0:l.current_skin)}).length>0;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[(0,r.jsx)(i.Ki.Item,{label:"Department Skins",children:(0,r.jsx)(i.ms,{options:s,selected:d?null==l?void 0:l.current_skin_name:null,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})}),!!a&&(0,r.jsx)(i.Ki.Item,{label:"Centcom Skins",children:(0,r.jsx)(i.ms,{options:u,selected:d?null:null==l?void 0:l.current_skin_name,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})})]})}},991:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputer:()=>x,SlashedIcon:()=>f});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(1487),s=t(4287),u=t(6530),d=t(9490),f=function(e){var n=e.title,t=e.name,o=e.text;return(0,r.jsx)(i.wn,{fill:!0,title:n,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:t,size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),o]})})})},h=function(){return(0,r.jsx)(f,{title:"Warning",name:"user",text:"Not logged in"})},m=function(){return(0,r.jsx)(f,{title:"Records",name:"scroll",text:"No records"})},p=function(){return(0,r.jsx)(f,{title:"Card Missing",name:"id-card",text:"No card to modify"})},x=function(){var e,n=(0,o.Oc)(),t=n.act,f=n.data,x=f.all_centcom_skins,g=f.auth_or_ghost,j=f.authenticated,b=f.can_terminate,y=f.card_skins,v=f.cooldown_time,w=f.is_centcom,k=f.job_slots,_=f.job_formats,C=f.jobs_dept,I=f.jobs,S=f.mode,O=f.modifying_card,A=f.people_dept,P=f.priority_jobs,E=f.records,B=f.regions,z=f.scanned_card,T=f.selectedAccess,N=f.target_dept,R=(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:0===S,onClick:function(){return t("mode",{mode:0})},children:"Job Transfers"}),!N&&(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:2===S,onClick:function(){return t("mode",{mode:2})},children:"Access Modification"}),(0,r.jsx)(i.tU.Tab,{icon:"folder-open",selected:1===S,onClick:function(){return t("mode",{mode:1})},children:"Job Management"}),(0,r.jsx)(i.tU.Tab,{icon:"scroll",selected:3===S,onClick:function(){return t("mode",{mode:3})},children:"Records"}),(0,r.jsx)(i.tU.Tab,{icon:"users",selected:4===S,onClick:function(){return t("mode",{mode:4})},children:"Department"})]});switch(S){case 0:e=j&&z?O?(0,r.jsx)(u.CardComputerJobTransfer,{target_dept:N,card:O,can_terminate:b,is_centcom:w,jobs:I,job_colors:_,jobs_dept:C,card_skins:y,all_centcom_skins:x}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 1:e=g?(0,r.jsx)(s.CardComputerJobPriority,{cooldown_time:v,target_dept:N,priority_jobs:P,job_slots:k}):(0,r.jsx)(h,{});break;case 2:e=j&&z?O?(0,r.jsx)(a.AccessList,{accesses:B,selectedList:T,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 3:e=j?E.length?(0,r.jsx)(d.CardComputerRecordsLog,{authenticated:j,records:E,target_dept:N,is_centcom:w}):(0,r.jsx)(m,{}):(0,r.jsx)(h,{});break;case 4:e=j&&z?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Your Team",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Name"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Sec Status"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Actions"})]}),A.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.name}),(0,r.jsx)(i.XI.Cell,{children:e.title}),(0,r.jsx)(i.XI.Cell,{children:e.crimstat}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{disabled:!e.demotable,onClick:function(){return t("remote_demote",{remote_demote:e.name})},children:e.buttontext})})]},e.title)})]})}):(0,r.jsx)(h,{});break;default:e=(0,r.jsx)(i.wn,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,r.jsx)(l.p8,{width:760,height:800,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(c.AuthBlock,{scanned_card:z,modifying_card:O})}),(0,r.jsx)(i.BJ.Item,{children:R}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:e})]})})})}},4287:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobPriority:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.cooldown_time,l=e.job_slots,a=e.target_dept,c=e.priority_jobs;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{color:t?"red":"",children:["Next Change Available:",t||"Now"]}),(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Job Slots",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Title"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Used Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Total Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Free Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Close Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Open Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Priority"})]}),l&&l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,className:"candystripe",children:[(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.az,{color:e.is_priority?"green":"",children:e.title})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.current_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions>e.current_positions&&(0,r.jsx)(i.az,{color:"green",children:e.total_positions-e.current_positions})||(0,r.jsx)(i.az,{color:"red",children:"0"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_close,onClick:function(){return n("make_job_unavailable",{job:e.title})},children:"-"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_open,onClick:function(){return n("make_job_available",{job:e.title})},children:"+"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:a&&(0,r.jsx)(i.az,{color:"green",children:c.indexOf(e.title)>-1?"Yes":""})||(0,r.jsx)(i.$n,{selected:e.is_priority,disabled:!!t||!e.can_prioritize,onClick:function(){return n("prioritize_job",{job:e.title})},children:e.is_priority?"Yes":"No"})})]},e.title)})]})})]})}},6530:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobTransfer:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(421),a=t(7542),c=l.lm.department,s=function(e){var n=(0,o.Oc)().act,t=e.job_colors,l=e.dept_name,a=e.job_names,c=e.dept_color,s=e.default_job_color,u=void 0===s?"":s,d=e.card;return(0,r.jsx)(i.Ki.Item,{label:l,labelColor:c,children:a.map(function(e){return(0,r.jsx)(i.$n,{selected:(null==d?void 0:d.rank)===e,color:t[e]?t[e]:u,onClick:function(){return n("assign",{assign_target:e})},children:e},e)})})},u=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.target_dept,u=e.card,d=e.can_terminate,f=e.is_centcom,h=e.jobs,m=e.jobs_dept,p=e.job_colors,x=e.all_centcom_skins,g=h&&[{name:"Special",jobs:h.top},{name:"Engineering",color:c.engineering,jobs:h.engineering},{name:"Medical",color:c.medical,jobs:h.medical},{name:"Science",color:c.science,jobs:h.science},{name:"Security",color:c.security,jobs:h.security},{name:"Service",color:c.service,jobs:h.service},{name:"Supply",color:c.supply,jobs:h.supply},{name:"Retirement",jobs:h.assistant}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{title:"Card Information",children:[!l&&(0,r.jsx)(a.CardInformation,{card:u}),(0,r.jsx)(i.Ki.Item,{label:"Latest Transfer",children:(null==u?void 0:u.lastlog)||"---"})]}),(0,r.jsx)(i.wn,{title:l?"Department Job Transfer":"Job Transfer",children:(0,r.jsxs)(i.Ki,{children:[l?(0,r.jsx)(s,{dept_name:"Department",job_colors:p,job_names:void 0===m?[]:m,card:u}):(0,r.jsx)(r.Fragment,{children:g.map(function(e){return(0,r.jsx)(s,{dept_name:e.name,dept_color:e.color,job_names:e.jobs,job_colors:p,card:u})})}),!!f&&(0,r.jsx)(s,{dept_name:"Centcom",dept_color:c.centcom,job_colors:p,job_names:h.centcom,default_job_color:"purple",card:u}),(0,r.jsx)(i.Ki.Item,{label:"Demotion",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Demoted"||(null==u?void 0:u.assignment)==="Terminated",tooltip:"Assistant access, 'demoted' title.",color:"red",icon:"times",onClick:function(){return n("demote")},children:"Demoted"},"Demoted")}),!!d&&(0,r.jsx)(i.Ki.Item,{label:"Non-Crew",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Terminated",tooltip:"Zero access. Not crew.",color:"red",icon:"eraser",onClick:function(){return n("terminate")},children:"Terminated"},"Terminate")})]})}),!l&&(0,r.jsx)(a.CardSkins,{card:u,card_skins:t,is_centcom:f,all_centcom_skins:x})]})}},9490:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerRecordsLog:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.authenticated,l=e.records,a=e.target_dept,c=e.is_centcom;return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Records",buttons:(0,r.jsx)(i.$n,{icon:"times",disabled:!t||0===l.length||a,onClick:function(){return n("wipe_all_logs")},children:"Delete All Records"}),children:[(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Crewman"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Old Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"New Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Authorized By"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Time"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Reason"}),!!c&&(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Deleted By"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.transferee}),(0,r.jsx)(i.XI.Cell,{children:e.oldvalue}),(0,r.jsx)(i.XI.Cell,{children:e.newvalue}),(0,r.jsx)(i.XI.Cell,{children:e.whodidit}),(0,r.jsx)(i.XI.Cell,{children:e.timestamp}),(0,r.jsx)(i.XI.Cell,{children:e.reason}),!!c&&(0,r.jsx)(i.XI.Cell,{children:e.deletedby})]},e.timestamp)})]}),!!c&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"pencil-alt",color:"purple",disabled:!t||0===l.length,onClick:function(){return n("wipe_my_logs")},children:"Delete MY Records"})})]})}},1488:function(e,n,t){"use strict";t.r(n)},6466:function(e,n,t){"use strict";t.r(n),t.d(n,{CargoConsole:()=>f});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,ChameleonAppearances:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,l.XZ)(n,function(e){return e.name});return e.filter(t)},f=function(e){var n,t=(0,a.Oc)(),l=t.act,c=t.data,u=(n=(0,i.useState)(""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return s(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=u[0],h=u[1],m=d(c.chameleon_skins,f),p=c.selected_appearance;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for an appearance",onChange:function(e){return h(e)}})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Item Appearance",children:m.map(function(e){var n=e.name+"_"+e.icon_state;return(0,r.jsx)(o.c_,{dmIcon:e.icon,dmIconState:e.icon_state,imageSize:64,m:.5,selected:n===p,tooltip:e.name,style:{opacity:n===p&&"1"||"0.5"},onClick:function(){l("change_appearance",{new_appearance:n})}},n)})})})]})}},9072:function(e,n,t){"use strict";t.r(n),t.d(n,{ChangelogView:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=[1,5,10,20,30,50,75],s=[1,5,10],u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).chemicals;return(0,r.jsx)(l.p8,{width:420,height:400+24*Math.ceil(t.length/3),children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.amount,s=l.energy,u=l.maxEnergy;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Dispense",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:c.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:a===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})})]})})})},f=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=[],u=0;u<(c.length+1)%3;u++)s.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:l.glass?"Drink Dispenser":"Chemical Dispenser",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",content:e.title,style:{marginLeft:"2px",textOverflow:"ellipsis"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%"},n)})]})})},h=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.isBeakerLoaded,u=l.beakerCurrentVolume,d=l.beakerMaxVolume,f=l.beakerContents;return(0,r.jsx)(i.BJ.Item,{height:16,children:(0,r.jsx)(i.wn,{title:l.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsxs)(i.az,{children:[!!c&&(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[u," / ",d," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!c,onClick:function(){return t("ejectBeaker")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:void 0===f?[]:f,buttons:function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return t("remove",{reagent:e.id,amount:-1})}}),s.map(function(n,o){return(0,r.jsx)(i.$n,{content:n,onClick:function(){return t("remove",{reagent:e.id,amount:n})}},o)}),(0,r.jsx)(i.$n,{content:"ALL",onClick:function(){return t("remove",{reagent:e.id,amount:e.volume})}})]})}})})})}},6277:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemHeater:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(3013),s=function(e){return(0,r.jsx)(a.p8,{width:350,height:275,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.targetTemp,s=a.targetTempReached,u=a.autoEject,d=a.isActive,f=a.currentTemp,h=a.isBeakerLoaded;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Settings",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Auto-eject",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){return t("toggle_autoeject")}}),(0,r.jsx)(i.$n,{content:d?"On":"Off",icon:"power-off",selected:d,disabled:!h,onClick:function(){return t("toggle_on")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.Q7,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,o.LI)(c,0),minValue:0,maxValue:1e3,onChange:function(e){return t("adjust_temperature",{target:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reading",color:s?"good":"average",children:h&&(0,r.jsx)(i.zv,{value:f,format:function(e){return(0,o.Mg)(e)+" K"}})||"—"})]})})})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.isBeakerLoaded,s=o.beakerCurrentVolume,u=o.beakerMaxVolume,d=o.beakerContents;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!a&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",onClick:function(){return t("eject_beaker")}})]}),children:(0,r.jsx)(c.BeakerContents,{beakerLoaded:a,beakerContents:d})})})}},9306:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemMaster:()=>x});var r=t(8138),i=t(7790),o=t(5490),l=t(3375),a=t(2864),c=t(3384),s=t(3013),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=[1,5,10,25,75],x=function(e){return(0,r.jsxs)(c.p8,{width:575,height:650,children:[(0,r.jsx)(u.ComplexModal,{}),(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(g,{}),(0,r.jsx)(j,{}),(0,r.jsx)(b,{}),(0,r.jsx)(C,{})]})})]})},g=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.beaker,c=o.beaker_reagents;return o.buffer_reagents.length,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!l,content:"Eject",onClick:function(){return t("eject")}}),children:l?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0&&(n=s.map(function(e){var n=e.id,i=e.sprite;return(0,r.jsx)(k,{icon:i,selected:c===n,onClick:function(){return t("set_sprite_style",{production_mode:l,style:n})}},n)})),(0,r.jsx)(w,{productionData:e.productionData,children:n&&(0,r.jsx)(i.Ki.Item,{label:"Style",children:n})})},C=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.loaded_pill_bottle_style,c=o.containerstyles,s=o.loaded_pill_bottle,u="20px",d="20px",f=c.map(function(e){var n=e.color,o=e.name,a=l===n;return(0,r.jsxs)(i.$n,{style:{position:"relative",width:u,height:d},onClick:function(){return t("set_container_style",{style:n})},icon:a?"check":"",tooltip:o,tooltipPosition:"top",children:[!a&&(0,r.jsx)("div",{style:{display:"inline-block"}}),(0,r.jsx)("span",{className:"Button",style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:u,height:d,backgroundColor:n,opacity:.6,filter:"alpha(opacity=60)"}})]},n)});return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Container Customization",buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!s,content:"Eject Container",onClick:function(){return t("ejectp")}}),children:s?(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Style",children:[(0,r.jsx)(i.$n,{style:{width:u,height:d},icon:"tint-slash",onClick:function(){return t("clear_container_style")},selected:!l,tooltip:"Default",tooltipPosition:"top"}),f]})}):(0,r.jsx)(i.az,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,u.modalRegisterBodyOverride)("analyze",function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=e.args.analysis;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:o.condi?"Condiment Analysis":"Reagent Analysis",children:(0,r.jsx)(i.az,{mx:"0.5rem",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:l.name}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:(l.desc||"").length>0?l.desc:"N/A"}),l.blood_type&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood type",children:l.blood_type}),(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})]}),!o.condi&&(0,r.jsx)(i.$n,{icon:o.printing?"spinner":"print",disabled:o.printing,iconSpin:!!o.printing,ml:"0.5rem",content:"Print",onClick:function(){return t("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})})})},2636:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningConsole:()=>c});var r=t(8138),i=t(7790),o=t(8595),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,c=o.tab,u=o.has_scanner,d=o.pod_amount;return(0,r.jsx)(a.p8,{width:640,height:520,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Cloning Console",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected scanner",children:u?"Online":"Missing"}),(0,r.jsx)(i.Ki.Item,{label:"Connected pods",children:d})]})}),(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:1===c,icon:"home",onClick:function(){return t("menu",{tab:1})},children:"Main Menu"}),(0,r.jsx)(i.tU.Tab,{selected:2===c,icon:"user",onClick:function(){return t("menu",{tab:2})},children:"Damage Configuration"})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(s,{})})]})})},s=function(e){var n,t=(0,l.Oc)().data.tab;return 1===t?n=(0,r.jsx)(u,{}):2===t&&(n=(0,r.jsx)(d,{})),n},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.pods,s=a.pod_amount,u=a.selected_pod_UID;return(0,r.jsxs)(i.az,{children:[!s&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No pods connected."}),!!s&&c.map(function(e,n){return(0,r.jsx)(i.wn,{layer:2,title:"Pod "+(n+1),children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsxs)(i.BJ.Item,{basis:"96px",shrink:0,children:[(0,r.jsx)("img",{src:(0,o.l)("pod_"+(e.cloning?"cloning":"idle")+".gif"),style:{width:"100%",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{selected:u===e.uid,onClick:function(){return t("select_pod",{uid:e.uid})},children:"Select"})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Progress",children:[!e.cloning&&(0,r.jsx)(i.az,{color:"average",children:"Pod is inactive."}),!!e.cloning&&(0,r.jsx)(i.z2,{value:e.clone_progress,maxValue:100,color:"good"})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Biomass",children:(0,r.jsxs)(i.z2,{value:e.biomass,ranges:{good:[2*e.biomass_storage_capacity/3,e.biomass_storage_capacity],average:[e.biomass_storage_capacity/3,2*e.biomass_storage_capacity/3],bad:[0,e.biomass_storage_capacity/3]},minValue:0,maxValue:e.biomass_storage_capacity,children:[e.biomass,"/",e.biomass_storage_capacity+" ("+100*e.biomass/e.biomass_storage_capacity+"%)"]})}),(0,r.jsx)(i.Ki.Item,{label:"Sanguine Reagent",children:e.sanguine_reagent}),(0,r.jsx)(i.Ki.Item,{label:"Osseous Reagent",children:e.osseous_reagent})]})})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.selected_pod_data,c=o.has_scanned,s=o.scanner_has_patient,u=o.feedback,d=o.scan_successful,m=o.cloning_cost,p=o.has_scanner,x=o.currently_scanning;return(0,r.jsxs)(i.az,{children:[!p&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No scanner connected."}),!!p&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.wn,{layer:2,title:"Scanner Info",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{icon:"hourglass-half",onClick:function(){return t("scan")},disabled:!s||x,children:"Scan"}),(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("eject")},disabled:!s||x,children:"Eject Patient"})]}),children:[!c&&!x&&(0,r.jsx)(i.az,{color:"average",children:s?"No scan detected for current patient.":"No patient is in the scanner."}),(!!c||!!x)&&(0,r.jsx)(i.az,{color:u.color,children:u.text})]}),(0,r.jsx)(i.wn,{layer:2,title:"Damages Breakdown",children:(0,r.jsxs)(i.az,{children:[(!d||!c)&&(0,r.jsx)(i.az,{color:"average",children:"No valid scan detected."}),!!d&&!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{onClick:function(){return t("fix_all")},children:"Repair All Damages"}),(0,r.jsx)(i.$n,{onClick:function(){return t("fix_none")},children:"Repair No Damages"})]}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{onClick:function(){return t("clone")},children:"Clone"})})]}),(0,r.jsxs)(i.BJ,{height:"25px",children:[(0,r.jsx)(i.BJ.Item,{width:"40%",children:(0,r.jsxs)(i.z2,{value:m[0],maxValue:a.biomass_storage_capacity,ranges:{bad:[2*a.biomass_storage_capacity/3,a.biomass_storage_capacity],average:[a.biomass_storage_capacity/3,2*a.biomass_storage_capacity/3],good:[0,a.biomass_storage_capacity/3]},color:m[0]>a.biomass?"bad":null,children:["Biomass: ",m[0],"/",a.biomass,"/",a.biomass_storage_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[1],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[1]>a.sanguine_reagent?"bad":"good",children:["Sanguine: ",m[1],"/",a.sanguine_reagent,"/",a.max_reagent_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[2],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[2]>a.osseous_reagent?"bad":"good",children:["Osseous: ",m[2],"/",a.osseous_reagent,"/",a.max_reagent_capacity]})})]}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})]})})]})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_limb_data,c=o.limb_list,s=o.desired_limb_data;return(0,r.jsx)(i.Nt,{title:"Limbs",children:c.map(function(e,n){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"15%",height:"20px",children:[a[e][4],":"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1}),0===a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{value:s[e][0]+s[e][1],maxValue:a[e][5],ranges:{good:[0,a[e][5]/3],average:[a[e][5]/3,2*a[e][5]/3],bad:[2*a[e][5]/3,a[e][5]]},children:["Post-Cloning Damage: ",(0,r.jsx)(i.In,{name:"bone"})," "+s[e][0]+" / ",(0,r.jsx)(i.In,{name:"fire"})," "+s[e][1]]})}),0!==a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][4]," is missing!"]})})]}),(0,r.jsxs)(i.BJ,{children:[!!a[e][3]&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][3],onClick:function(){return t("toggle_limb_repair",{limb:e,type:"replace"})},children:"Replace Limb"})}),!a[e][3]&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n.Checkbox,{disabled:!(a[e][0]||a[e][1]),checked:!(s[e][0]||s[e][1]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"damage"})},children:"Repair Damages"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(1&a[e][2]),checked:!(1&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"bone"})},children:"Mend Bone"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(32&a[e][2]),checked:!(32&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"ib"})},children:"Mend IB"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(128&a[e][2]),checked:!(128&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"critburn"})},children:"Mend Critical Burn"})]})]})]},e)})})},h=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_organ_data,c=o.organ_list,s=o.desired_organ_data;return(0,r.jsx)(i.Nt,{title:"Organs",children:c.map(function(e,n){return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"20%",height:"20px",children:[a[e][3],":"," "]}),"heart"!==a[e][5]&&(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ.Item,{children:[!!a[e][2]&&(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][2]&&!s[e][1],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"replace"})},children:"Replace Organ"}),!a[e][2]&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n.Checkbox,{disabled:!a[e][0],checked:!s[e][0],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"damage"})},children:"Repair Damages"})})]})}),"heart"===a[e][5]&&(0,r.jsx)(i.az,{color:"average",children:"Heart replacement is required for cloning."}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsxs)(i.BJ.Item,{width:"35%",children:[!!a[e][2]&&(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][3]," is missing!"]}),!a[e][2]&&(0,r.jsx)(i.z2,{value:s[e][0],maxValue:a[e][4],ranges:{good:[0,a[e][4]/3],average:[a[e][4]/3,2*a[e][4]/3],bad:[2*a[e][4]/3,a[e][4]]},children:"Post-Cloning Damage: "+s[e][0]})]})]})},e)})})}},1558:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningPod:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.biomass,s=a.biomass_storage_capacity,u=a.sanguine_reagent,d=a.osseous_reagent,f=a.organs,h=a.currently_cloning;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Liquid Storage",children:[(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsx)(i.z2,{value:c,ranges:{good:[2*s/3,s],average:[s/3,2*s/3],bad:[0,s/3]},minValue:0,maxValue:s})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:u+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"sanguine_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"sanguine_reagent"})}})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:d+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:d,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"osseous_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"osseous_reagent"})}})})]})]}),(0,r.jsxs)(i.wn,{title:"Organ Storage",children:[!h&&(0,r.jsxs)(i.az,{children:[!f&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No organs loaded."}),!!f&&f.map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:e.name}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Eject",onClick:function(){return t("eject_organ",{organ_ref:e.ref})}})})]},e)})]}),!!h&&(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:"5",mb:3}),(0,r.jsx)("br",{}),"Unable to access organ storage while cloning."]})})]})]})})}},1276:function(e,n,t){"use strict";t.r(n),t.d(n,{CoinMint:()=>c});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.materials,u=c.moneyBag,d=c.moneyBagContent,f=c.moneyBagMaxContent,h=(u?210:138)+64*Math.ceil(s.length/4);return(0,r.jsx)(a.p8,{width:210,height:h,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.IC,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Coin Type",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:c.active&&"bad",tooltip:!u&&"Need a money bag",disabled:!u,onClick:function(){return t("activate")}}),children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.z2,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eject",tooltip:"Eject selected material",onClick:function(){return t("ejectMat")}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:s.map(function(e){return(0,r.jsx)(i.$n,{bold:!0,inline:!0,m:.2,textAlign:"center",selected:e.id===c.chosenMaterial,tooltip:e.name,content:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",e.id])}),(0,r.jsx)(i.BJ.Item,{children:e.amount})]}),onClick:function(){return t("selectMaterial",{material:e.id})}},e.id)})})]})})}),!!u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Money Bag",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){return t("ejectBag")}}),children:(0,r.jsxs)(i.z2,{width:"100%",minValue:0,maxValue:f,value:d,children:[d," / ",f]})})})]})})})}},1572:function(e,n,t){"use strict";t.r(n),t.d(n,{HexColorInput:()=>B,ColorSelector:()=>A,ColorPickerModal:()=>O,ColorInput:()=>z});var r=t(8138),i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,n);return Math.round(t*e)/t},o=function(e){return h(l(e))},l=function(e){return("#"===e[0]&&(e=e.substring(1)),e.length<6)?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?i(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?i(parseInt(e.substring(6,8),16)/255,2):1}},a=function(e){return f(u(e))},c=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=(200-t)*r/100;return{h:i(n),s:i(l>0&&l<200?t*r/100/(l<=100?l:200-l)*100:0),l:i(l/2),a:i(o,2)}},s=function(e){var n=c(e),t=n.h,r=n.s,i=n.l;return"hsl(".concat(t,", ").concat(r,"%, ").concat(i,"%)")},u=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=Math.floor(n=n/360*6),a=(r/=100)*(1-(t/=100)),c=r*(1-(n-l)*t),s=r*(1-(1-n+l)*t),u=l%6;return{r:255*[r,c,a,a,s,r][u],g:255*[s,r,r,c,a,a][u],b:255*[a,a,s,r,r,c][u],a:i(o,2)}},d=function(e){var n=e.toString(16);return n.length<2?"0"+n:n},f=function(e){var n=e.r,t=e.g,r=e.b,o=e.a,l=o<1?d(i(255*o)):"";return"#"+d(i(n))+d(i(t))+d(i(r))+l},h=function(e){var n=e.r,t=e.g,r=e.b,i=e.a,o=Math.max(n,t,r),l=o-Math.min(n,t,r),a=l?o===n?(t-r)/l:o===t?2+(r-n)/l:4+(n-t)/l:0;return{h:60*(a<0?a+6:a),s:o?l/o*100:0,v:o/255*100,a:i}},m=/^#?([0-9A-F]{3,8})$/i,p=function(e,n){var t=m.exec(e),r=t?t[1].length:0;return 3===r||6===r||!!n&&4===r||!!n&&8===r},x=t(4530),g=t(7790),j=t(6859),b=t(5490),y=t(2864),v=t(7946),w=t(8095),k=t(3384),_=t(1942),C=t(9472);function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["prefixed","alpha","color","fluid","onChange"]);return(0,r.jsx)(z,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.colour_data;return(0,r.jsx)(l.p8,{width:360,height:190,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,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,r.jsx)(i.BJ,{textAlign:"center",textColor:"label",children:e.map(function(e){return(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:1,children:[e.name,":\xa0",(0,r.jsx)(i.Q7,{width:4,value:a[e.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(n){return t("setvalue",{idx:e.idx+1,value:n})}})]},e.name)})},e)})})})})})}},5325:function(e,n,t){"use strict";t.r(n),t.d(n,{CommunicationsComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(x+=" ("+a+"s)");var g=c?"Message [UNKNOWN]":"Message CentComm",b="Request Authentication Codes";return s>0&&(g+=" ("+s+"s)",b+=" ("+s+"s)"),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Captain-Only Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Alert",color:u,children:d}),(0,r.jsx)(o.Ki.Item,{label:"Change Alert",children:(0,r.jsx)(j,{levels:f,required_access:h})}),(0,r.jsx)(o.Ki.Item,{label:"Announcement",children:(0,r.jsx)(o.$n,{icon:"bullhorn",content:x,disabled:!h||a>0,onClick:function(){return t("announce")}})}),!!c&&(0,r.jsxs)(o.Ki.Item,{label:"Transmit",children:[(0,r.jsx)(o.$n,{icon:"broadcast-tower",color:"red",content:g,disabled:!h||s>0,onClick:function(){return t("MessageSyndicate")}}),(0,r.jsx)(o.$n,{icon:"sync-alt",content:"Reset Relays",disabled:!h,onClick:function(){return t("RestoreBackup")}})]})||(0,r.jsx)(o.Ki.Item,{label:"Transmit",children:(0,r.jsx)(o.$n,{icon:"broadcast-tower",content:g,disabled:!h||s>0,onClick:function(){return t("MessageCentcomm")}})}),(0,r.jsx)(o.Ki.Item,{label:"Nuclear Device",children:(0,r.jsx)(o.$n,{icon:"bomb",content:b,disabled:!h||s>0,onClick:function(){return t("nukerequest")}})})]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{fill:!0,title:"Command Staff Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Displays",children:(0,r.jsx)(o.$n,{icon:"tv",content:"Change Status Displays",disabled:!m,onClick:function(){return t("status")}})}),(0,r.jsx)(o.Ki.Item,{label:"Incoming Messages",children:(0,r.jsx)(o.$n,{icon:"folder-open",content:"View ("+p.length+")",disabled:!m,onClick:function(){return t("messagelist")}})})]})})})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.stat_display,c=i.authhead;i.current_message_title;var s=a.presets.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.name===a.type,disabled:!c,onClick:function(){return t("setstat",{statdisp:e.name})}},e.name)}),u=a.alerts.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.alert===a.icon,disabled:!c,onClick:function(){return t("setstat",{statdisp:3,alert:e.alert})}},e.alert)});return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Modify Status Screens",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Presets",children:s}),(0,r.jsx)(o.Ki.Item,{label:"Alerts",children:u}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 1",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_1,disabled:!c,onClick:function(){return t("setmsg1")}})}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 2",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_2,disabled:!c,onClick:function(){return t("setmsg2")}})})]})})})},g=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.authhead,s=a.current_message_title,u=a.current_message,d=a.messages;if(a.security_level,s)n=(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:s,buttons:(0,r.jsx)(o.$n,{icon:"times",content:"Return To Message List",disabled:!c,onClick:function(){return i("messagelist")}}),children:(0,r.jsx)(o.az,{children:u})})});else{var f=d.map(function(e){return(0,r.jsxs)(o.Ki.Item,{label:e.title,children:[(0,r.jsx)(o.$n,{icon:"eye",content:"View",disabled:!c||s===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,r.jsx)(o.$n.Confirm,{icon:"times",content:"Delete",disabled:!c,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)});n=(0,r.jsx)(o.wn,{title:"Messages Received",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,r.jsx)(o.Ki,{children:f})})}return(0,r.jsx)(o.az,{children:n})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.levels,c=e.required_access,s=e.use_confirm,u=i.security_level;return s?a.map(function(e){return(0,r.jsx)(o.$n.Confirm,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)}):a.map(function(e){return(0,r.jsx)(o.$n,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)})},b=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.is_admin,u=a.possible_cc_sounds;if(!c)return t("main");var d=s((0,i.useState)(""),2),f=d[0],h=d[1],m=s((0,i.useState)(""),2),p=m[0],x=m[1],g=s((0,i.useState)(0),2),j=g[0],b=g[1],y=s((0,i.useState)("Beep"),2),v=y[0],w=y[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Central Command Report",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Enter Subtitle here.",value:f,onChange:function(e){return h(e)}}),(0,r.jsx)(o.fs,{fluid:!0,height:"100%",rows:10,placeholder:"Enter Announcement here. Multiline input is accepted.",value:p,onChange:x}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"paper-plane",textAlign:"center",onClick:function(){t("make_cc_announcement",{subtitle:f,text:p,classified:j,beepsound:v}),x(""),h("")},children:"Send Announcement"}),(0,r.jsxs)(o.BJ,{align:"center",children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.ms,{options:u,selected:v,onSelected:function(e){return w(e)},disabled:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"volume-up",disabled:j,tooltip:"Test sound",onClick:function(){return t("test_sound",{sound:v})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n.Checkbox,{fluid:!0,checked:j,tooltip:j?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!j)},children:"Classified"})})]})]})})})}},6185:function(e,n,t){"use strict";t.r(n),t.d(n,{CompostBin:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(7946),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0,p=e.setViewingPhoto,g=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["setViewingPhoto"]);return(0,r.jsx)(o.wn,h(f({title:"Available Contracts",overflow:"auto",buttons:(0,r.jsxs)(o.$n,{disabled:!u||m,icon:"parachute-box",onClick:function(){return t("extract")},children:["Call Extraction"," ",m&&(0,r.jsx)(c.Gi,{timeEnd:d.time_left,format:function(e,n){return n.substr(3)}})]})},g),{children:l.slice().sort(function(e,n){return 1===e.status?-1:1===n.status?1:e.status-n.status}).map(function(e){var n;return(0,r.jsx)(o.wn,{title:(0,r.jsxs)(o.so,{children:[(0,r.jsx)(o.so.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,r.jsx)(o.so.Item,{basis:"content",children:e.has_photo&&(0,r.jsx)(o.$n,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return p("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,r.jsxs)(o.az,{width:"100%",children:[!!x[e.status]&&(0,r.jsx)(o.az,{color:x[e.status][1],inline:!0,mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:x[e.status][0]}),1===e.status&&(0,r.jsx)(o.$n.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return t("abort")}})]}),children:(0,r.jsxs)(o.so,{children:[(0,r.jsxs)(o.so.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,r.jsxs)(o.az,{color:"good",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,r.jsxs)(o.az,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,r.jsxs)(o.az,{color:"bad",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,r.jsxs)(o.so.Item,{flexBasis:"100%",children:[(0,r.jsxs)(o.so,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",w(e)]}),null==(n=e.difficulties)?void 0:n.map(function(n,i){return(0,r.jsx)(o.$n.Confirm,{disabled:!!s,content:n.name+" ("+n.reward+" TC)",onClick:function(){return t("activate",{uid:e.uid,difficulty:i+1})}},i)}),!!e.objective&&(0,r.jsxs)(o.az,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,r.jsx)("br",{}),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)})}))},w=function(e){if(e.objective&&!(e.status>1)){var n=e.objective.locs.user_area_id,t=e.objective.locs.user_coords,i=e.objective.locs.target_area_id,a=e.objective.locs.target_coords,c=n===i;return(0,r.jsx)(o.so.Item,{children:(0,r.jsx)(o.In,{name:c?"dot-circle-o":"arrow-alt-circle-right-o",color:c?"green":"yellow",rotation:c?null:-(0,l.KJ)(Math.atan2(a[1]-t[1],a[0]-t[0])),lineHeight:c?null:"0.85",size:"1.5"})})}},k=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.rep,c=i.buyables;return(0,r.jsx)(o.wn,h(f({title:"Available Purchases",overflow:"auto"},e),{children:c.map(function(e){return(0,r.jsxs)(o.wn,{title:e.name,children:[e.description,(0,r.jsx)("br",{}),(0,r.jsx)(o.$n.Confirm,{disabled:l-1&&(0,r.jsxs)(o.az,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)})}))},_=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return r=t,i=[e],r=d(r),(n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(r,i||[],d(this).constructor):r.apply(this,i))).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e),n=[{key:"tick",value:function(){var e=this.props,n=this.state;n.currentIndex<=e.allMessages.length?(this.setState(function(e){return{currentIndex:e.currentIndex+1}}),n.currentDisplay.push(e.allMessages[n.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))}},{key:"componentDidMount",value:function(){var e=this,n=this.props.linesPerSecond;this.timer=setInterval(function(){return e.tick()},1e3/(void 0===n?2.5:n))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){return(0,r.jsx)(o.az,{m:1,children:this.state.currentDisplay.map(function(e){return(0,r.jsxs)(i.Fragment,{children:[e,(0,r.jsx)("br",{})]},e)})})}}],function(e,n){for(var t=0;ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.slowFactor,s=a.oneWay,u=a.position;return(0,r.jsx)(l.p8,{width:350,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,r.jsx)(i.Ki.Item,{label:"Allow reverse",children:(0,r.jsx)(i.$n.Checkbox,{checked:!s,onClick:function(){return t("toggleOneWay")}})}),(0,r.jsx)(i.Ki.Item,{label:"Slowdown factor",children:(0,r.jsxs)(i.so,{children:[(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-left",onClick:function(){return t("slowFactor",{value:c-5})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-left",onClick:function(){return t("slowFactor",{value:c-1})}})," "]}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.Ap,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,n){return t("slowFactor",{value:n})}})}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-right",onClick:function(){return t("slowFactor",{value:c+1})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-right",onClick:function(){return t("slowFactor",{value:c+5})}})," "]})]})})]})})})})}},6714:function(e,n,t){"use strict";t.r(n),t.d(n,{CrewMonitor:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(7946),u=t(421),d=t(3384);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=2||s.ignoreSensors?(0,r.jsxs)(l.az,{inline:!0,ml:1,children:["(",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.oxy,children:e.oxy}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.toxin,children:e.tox}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.burn,children:e.fire}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.brute,children:e.brute}),")"]}):null]}),(0,r.jsx)(l.XI.Cell,{children:3===e.sensor_type||s.ignoreSensors?s.isAI||s.isObserver?(0,r.jsx)(l.$n,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return t("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,r.jsx)(l.az,{inline:!0,color:"grey",children:"Not Available"})})]},n)})]})]})},g=function(e){var n,t,i=e.color,o=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["color"]);return(0,r.jsx)(s.tx.Marker,(n=function(e){for(var n=1;ns});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],c=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],s=function(e){return(0,r.jsx)(l.p8,{width:520,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(u,{})})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,s=l.isOperating,u=l.hasOccupant,f=l.occupant,h=void 0===f?[]:f,m=l.cellTemperature,p=l.cellTemperatureStatus,x=l.isBeakerLoaded,g=l.cooldownProgress,j=l.auto_eject_healthy,b=l.auto_eject_dead;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectOccupant")},disabled:!u,children:"Eject"}),children:u?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,r.jsx)(i.zv,{value:Math.round(h.health)})})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[h.stat][0],children:c[h.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(h.bodyTemperature)})," K"]}),(0,r.jsx)(i.Ki.Divider,{}),a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.label,children:(0,r.jsx)(i.z2,{value:h[e.type]/100,ranges:{bad:[.01,1/0]},children:(0,r.jsx)(i.zv,{value:Math.round(h[e.type])})})},e.id)})]}):(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Cell",buttons:(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("ejectBeaker")},disabled:!x,children:"Eject Beaker"}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",onClick:function(){return t(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",color:p,children:[(0,r.jsx)(i.zv,{value:m})," K"]}),(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.Ki.Item,{label:"Dosage interval",children:(0,r.jsx)(i.z2,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!x&&"average",value:g,minValue:0,maxValue:100})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject healthy occupants",children:(0,r.jsx)(i.$n,{icon:j?"toggle-on":"toggle-off",selected:j,onClick:function(){return t(j?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:j?"On":"Off"})}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject dead occupants",children:(0,r.jsx)(i.$n,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return t(b?"auto_eject_dead_off":"auto_eject_dead_on")},children:b?"On":"Off"})})]})})})]})},d=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.isBeakerLoaded,a=t.beakerLabel,c=t.beakerVolume;return l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{inline:!0,color:!a&&"average",children:[a||"No label",":"]}),(0,r.jsx)(i.az,{inline:!0,color:!c&&"bad",ml:1,children:c?(0,r.jsx)(i.zv,{value:c,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})]}):(0,r.jsx)(i.az,{inline:!0,color:"bad",children:"No beaker loaded"})}},2394:function(e,n,t){"use strict";t.r(n),t.d(n,{CryopodConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.account_name,o=n.allow_items;return(0,r.jsx)(a.p8,{title:"Cryopod Console",width:400,height:480,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Hello, ".concat(t||"[REDACTED]","!"),children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,r.jsx)(s,{}),!!o&&(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)().data.frozen_crew;return(0,r.jsx)(i.Nt,{title:"Stored Crew",children:n.length?(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:n.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:e.rank},n)})})}):(0,r.jsx)(i.IC,{children:"No stored crew!"})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.frozen_items,c=function(e){var n=e.toString();return n.startsWith("the ")&&(n=n.slice(4,n.length)),(0,o.Sn)(n)};return(0,r.jsx)(i.Nt,{title:"Stored Items",children:a.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:c(e.name),buttons:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return t("one_item",{item:e.uid})}})},e)})})}),(0,r.jsx)(i.$n,{content:"Drop All Items",color:"red",onClick:function(){return t("all_items")}})]}):(0,r.jsx)(i.IC,{children:"No stored items!"})})}},3372:function(e,n,t){"use strict";t.r(n),t.d(n,{DNAModifier:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50],d=function(){var e,n=(0,o.Oc)(),t=(n.act,n.data),c=t.irradiating,s=t.dnaBlockSize,u=t.occupant,d=!u.isViableSubject||!u.uniqueIdentity||!u.structuralEnzymes;return c&&(e=(0,r.jsx)(v,{duration:c})),(0,r.jsxs)(l.p8,{width:660,height:800,children:[(0,r.jsx)(a.ComplexModal,{}),e,(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(f,{isDNAInvalid:d})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(h,{dnaBlockSize:s,isDNAInvalid:d})})]})})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,s=l.hasOccupant,u=l.occupant,d=e.isDNAInvalid;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,r.jsx)(i.$n,{disabled:!s,selected:a,icon:a?"toggle-on":"toggle-off",content:a?"Engaged":"Disengaged",onClick:function(){return t("toggleLock")}}),(0,r.jsx)(i.$n,{disabled:!s||a,icon:"user-slash",content:"Eject",onClick:function(){return t("ejectOccupant")}})]}),children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:u.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:u.minHealth,maxValue:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[u.stat][0],children:c[u.stat][1]}),(0,r.jsx)(i.Ki.Divider,{})]})}),d?(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Radiation",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:u.radiationLevel/100,color:"average"})}),(0,r.jsx)(i.Ki.Item,{label:"Unique Enzymes",children:l.occupant.uniqueEnzymes?l.occupant.uniqueEnzymes:(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})]}):(0,r.jsx)(i.az,{color:"label",children:"Cell unoccupied."})})},h=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.selectedMenuKey,u=a.hasOccupant,d=e.dnaBlockSize,f=e.isDNAInvalid;return u?f?(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No operation possible on this subject."]})})}):("ui"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"se"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"buffer"===c?n=(0,r.jsx)(g,{}):"rejuvenators"===c&&(n=(0,r.jsx)(y,{})),(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.tU,{children:s.map(function(e,n){return(0,r.jsx)(i.tU.Tab,{icon:e[2],selected:c===e[0],onClick:function(){return l("selectMenuKey",{key:e[0]})},children:e[1]},n)})}),n]})):(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant in DNA modifier."]})})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedUIBlock,c=l.selectedUISubBlock,s=l.selectedUITarget,u=l.occupant,d=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Unique Identifier",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:u.uniqueIdentity,selectedBlock:a,selectedSubblock:c,blockSize:d,action:"selectUIBlock"})})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:15,stepPixelSize:20,value:s,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,n){return t("changeUITarget",{value:n})}})})}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return t("pulseUIRadiation")}})]})]})})},p=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedSEBlock,c=l.selectedSESubBlock,s=l.occupant,u=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Structural Enzymes",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:s.structuralEnzymes,selectedBlock:a,selectedSubblock:c,blockSize:u,action:"selectSEBlock"})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",onClick:function(){return t("pulseSERadiation")}})})]})})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.radiationIntensity,a=t.radiationDuration;return(0,r.jsxs)(i.wn,{title:"Radiation Emitter",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Intensity",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:10,stepPixelSize:20,value:l,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationIntensity",{value:t})}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:a,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationDuration",{value:t})}})})]}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){return n("pulseRadiation")}})]})},g=function(){var e=(0,o.Oc)().data.buffers.map(function(e,n){return(0,r.jsx)(j,{id:n+1,name:"Buffer "+(n+1),buffer:e},n)});return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:"75%",mt:1,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Buffers",children:e})}),(0,r.jsx)(i.BJ.Item,{height:"25%",children:(0,r.jsx)(b,{})})]})},j=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.id,c=e.name,s=e.buffer,u=l.isInjectorReady,d=c+(s.data?" - "+s.label:"");return(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsxs)(i.wn,{title:d,mx:"0",lineHeight:"18px",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!s.data,icon:"trash",content:"Clear",onClick:function(){return t("bufferOption",{option:"clear",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data,icon:"pen",content:"Rename",onClick:function(){return t("bufferOption",{option:"changeLabel",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data||!l.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){return t("bufferOption",{option:"saveDisk",id:a})}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Write",children:[(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUI",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUIAndUE",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveSE",id:a})}}),(0,r.jsx)(i.$n,{disabled:!l.hasDisk||!l.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return t("bufferOption",{option:"loadDisk",id:a})}})]}),!!s.data&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Subject",children:s.owner||(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]}),(0,r.jsxs)(i.Ki.Item,{label:"Transfer to",children:[(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a})}}),(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Block Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a,block:1})}}),(0,r.jsx)(i.$n,{icon:"user",content:"Subject",mb:"0",onClick:function(){return t("bufferOption",{option:"transfer",id:a})}})]})]})]}),!s.data&&(0,r.jsx)(i.az,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.hasDisk,a=t.disk;return(0,r.jsx)(i.wn,{title:"Data Disk",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!l||!a.data,icon:"trash",content:"Wipe",onClick:function(){return n("wipeDisk")}}),(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectDisk")}})]}),children:l?a.data?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Label",children:a.label?a.label:"No label"}),(0,r.jsx)(i.Ki.Item,{label:"Subject",children:a.owner?a.owner:(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===a.type?"Unique Identifiers":"Structural Enzymes",!!a.ue&&" and Unique Enzymes"]})]}):(0,r.jsx)(i.az,{color:"label",children:"Disk is blank."}):(0,r.jsxs)(i.az,{color:"label",textAlign:"center",my:"1rem",children:[(0,r.jsx)(i.In,{name:"save-o",size:4}),(0,r.jsx)("br",{}),"No disk inserted."]})})},y=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.isBeakerLoaded,a=t.beakerVolume,c=t.beakerLabel;return(0,r.jsx)(i.wn,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectBeaker")}}),children:l?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Inject",children:[u.map(function(e,t){return(0,r.jsx)(i.$n,{disabled:e>a,icon:"syringe",content:e,onClick:function(){return n("injectRejuvenators",{amount:e})}},t)}),(0,r.jsx)(i.$n,{disabled:a<=0,icon:"syringe",content:"All",onClick:function(){return n("injectRejuvenators",{amount:a})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Beaker",children:[(0,r.jsx)(i.az,{mb:"0.5rem",children:c||"No label"}),a?(0,r.jsxs)(i.az,{color:"good",children:[a," unit",1===a?"":"s"," remaining"]}):(0,r.jsx)(i.az,{color:"bad",children:"Empty"})]})]}):(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,align:"center",justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"flask",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]})}),(0,r.jsx)(i.BJ.Item,{bold:!0,color:"label",mb:"2rem",children:(0,r.jsx)("h3",{children:"No Beaker Loaded"})})]})})},v=function(e){var n=e.duration;return(0,r.jsxs)(i.Rr,{textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",size:5,spin:!0}),(0,r.jsx)("br",{}),(0,r.jsx)(i.az,{color:"average",children:(0,r.jsxs)("h1",{children:[(0,r.jsx)(i.In,{name:"radiation"}),"\xa0Irradiating occupant\xa0",(0,r.jsx)(i.In,{name:"radiation"})]})}),(0,r.jsx)(i.az,{color:"label",children:(0,r.jsxs)("h3",{children:["For ",n," second",1===n?"":"s"]})})]})},w=function(e){for(var n=function(e){for(var n=e/s+1,o=[],l=0;ls});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(5490),c=t(4530),s=(0,c.createContext)({categoryStyles:[],removalMode:null}),u=function(e){var n=e.decal_typepath,t=e.direction,o=e.isSelected,l=e.onSelect,c="".concat(n.replace(/\//g,"_"),"_").concat(t);return(0,r.jsx)(i.az,{m:"2px",className:(0,a.Ly)(["decal_painter32x32",c]),onClick:l,style:{outlineStyle:o&&"solid"||"none",outlineWidth:"2px",outlineColor:"orange"}})},d=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedCategory,a=t.categories;return(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{selected:e==l,onClick:function(){return n("set_category",{category:e})},children:e})})})})})},f=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.removalMode,d=(0,c.useContext)(s).categoryStyles;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.so,{wrap:"wrap",children:d.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(u,{decal_typepath:e.typepath,direction:2,isSelected:l===e.typepath&&!a,onSelect:function(){return n("set_decal_type",{decal_type:e.typepath})}})},e.typepath)})})})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.selectedDir,c=t.removalMode;return(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,0,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:0===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(u,{decal_typepath:l,direction:e,isSelected:e===a&&!c,onSelect:function(){return n("set_direction",{direction:e})}})},e)})},e)})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,a=t.availableStyles,c=t.removalMode,u=a[t.selectedCategory];return(0,r.jsx)(l.p8,{width:650,height:565,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(s.Provider,{value:{categoryStyles:u,removalMode:c},children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Preview",children:[(0,r.jsx)(h,{}),(0,r.jsx)(i.$n,{icon:"eraser",color:c?"green":"transparent",onClick:function(){return n("toggle_removal_mode")},children:"Remove decals"})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Decals",children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{})]})})]})})})})}},3883:function(e,n,t){"use strict";t.r(n),t.d(n,{DestinationTagger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.destinations,u=c.selected_destination_id,d=s[u-1];return(0,r.jsx)(l.p8,{width:355,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,textAlign:"center",title:"TagMaster 3.1",children:[(0,r.jsxs)(i.az,{width:"100%",textAlign:"center",children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Selected:"})," ",null!=(n=d.name)?n:"None"]}),(0,r.jsx)(i.az,{mt:1.5,children:(0,r.jsx)(i.BJ,{overflowY:"auto",wrap:"wrap",align:"center",justify:"space-evenly",direction:"row",children:s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{m:"2px",children:(0,r.jsx)(i.$n,{color:"transparent",width:"105px",textAlign:"center",content:e.name,selected:e.id===u,onClick:function(){return a("select_destination",{destination:e.id})}})},n)})})})]})})})})}},6381:function(e,n,t){"use strict";t.r(n),t.d(n,{DisposalBin:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data;return 2===s.mode?(n="good",t="Ready"):s.mode<=0?(n="bad",t="N/A"):1===s.mode?(n="average",t="Pressurizing"):(n="average",t="Idle"),(0,r.jsx)(l.p8,{width:300,height:260,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"State",color:n,children:t}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{ranges:{bad:[-1/0,0],average:[0,99],good:[99,1/0]},value:s.pressure,minValue:0,maxValue:100})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Handle",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:s.isAI||s.panel_open,content:"Disengaged",selected:!s.flushing,onClick:function(){return c("disengageHandle")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:s.isAI||s.panel_open,content:"Engaged",selected:s.flushing,onClick:function(){return c("engageHandle")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:-1===s.mode,content:"Off",selected:!s.mode,onClick:function(){return c("pumpOff")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:-1===s.mode,content:"On",selected:s.mode,onClick:function(){return c("pumpOn")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Eject",children:(0,r.jsx)(i.$n,{icon:"sign-out-alt",disabled:s.isAI,content:"Eject Contents",onClick:function(){return c("eject")}})})]})})]})})}},2908:function(e,n,t){"use strict";t.r(n),t.d(n,{DnaVault:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).completed;return(0,r.jsx)(a.p8,{width:350,height:270,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),!!t&&(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.dna,a=t.dna_max,c=t.plants,s=t.plants_max,u=t.animals,d=t.animals_max;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"DNA Vault Database",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Human DNA",children:(0,r.jsx)(i.z2,{value:l/a,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:l+" / "+a+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Plant DNA",children:(0,r.jsx)(i.z2,{value:c/s,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:c+" / "+s+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Animal DNA",children:(0,r.jsx)(i.z2,{value:u/d,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:u+" / "+d+" Samples"})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.choiceA,s=a.choiceB,u=a.used;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{fill:!0,title:"Personal Gene Therapy",children:[(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Applicable Gene Therapy Treatments"}),!u&&(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:c,textAlign:"center",onClick:function(){return t("gene",{choice:c})}})}),(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:s,textAlign:"center",onClick:function(){return t("gene",{choice:s})}})})]})||(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Users DNA deemed unstable. Unable to provide more upgrades."})]})})}},2480:function(e,n,t){"use strict";t.r(n),t.d(n,{DroneConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){return(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.drone_fab,c=o.fab_power,s=o.drone_prod,u=o.drone_progress;return(0,r.jsx)(i.wn,{title:"Drone Fabricator",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"Online":"Offline",color:s?"green":"red",onClick:function(){return t("toggle_fab")}}),children:a?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Power",children:(0,r.jsxs)(i.az,{color:c?"good":"bad",children:["[ ",c?"Online":"Offline"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Drone Production",children:(0,r.jsx)(i.z2,{value:u/100,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})})]}):(0,r.jsx)(i.IC,{textAlign:"center",danger:1,children:(0,r.jsxs)(i.so,{inline:1,direction:"column",children:[(0,r.jsx)(i.so.Item,{children:"FABRICATOR NOT DETECTED."}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{icon:"search",content:"Search",onClick:function(){return t("find_fab")}})})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.drones,s=a.area_list,u=a.selected_area,d=a.ping_cd,f=function(e,n){var t,o;return 2===e?(t="bad",o="Disabled"):1!==e&&n?(t="good",o="Active"):(t="average",o="Inactive"),(0,r.jsx)(i.az,{color:t,children:o})};return(0,r.jsxs)(i.wn,{title:"Maintenance Units",children:[(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{children:"Request Drone presence in area:\xa0"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"125px",onSelected:function(e){return t("set_area",{area:e})}})})]}),(0,r.jsx)(i.$n,{content:"Send Ping",icon:"broadcast-tower",disabled:d||!c.length,title:c.length?null:"No active drones!",fluid:!0,textAlign:"center",py:.4,mt:.6,onClick:function(){return t("ping")}}),(0,r.jsx)(function(){if(c.length)return(0,r.jsx)(i.az,{py:.2,children:(0,r.jsx)(i.cG,{})})},{}),c.map(function(e){return(0,r.jsx)(i.wn,{title:(0,o.Sn)(e.name),buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sync",content:"Resync",disabled:2===e.stat||e.sync_cd,onClick:function(){return t("resync",{uid:e.uid})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Confirm,{icon:"power-off",content:"Recall",disabled:2===e.stat||e.pathfinding,tooltip:e.pathfinding?"This drone is currently pathfinding, please wait.":null,tooltipPosition:"left",color:"bad",onClick:function(){return t("recall",{uid:e.uid})}})})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:f(e.stat,e.client)}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:e.health,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Charge",children:(0,r.jsx)(i.z2,{value:e.charge,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location})]})},e.name)})]})}},1654:function(e,n,t){"use strict";t.r(n),t.d(n,{EFTPOS:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf,ERTOverview:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj?"red":"green",children:[g," total, versus ",j," spawnpoints"]})}),(0,r.jsx)(o.Ki.Item,{label:"Dispatch",children:(0,r.jsx)(o.$n,{width:10.5,textAlign:"center",icon:"ambulance",onClick:function(){return n("dispatch_ert",{silent:v})},children:"Send ERT"})})]})})})},p=function(){var e=(0,a.Oc)(),n=e.act,t=e.data.ert_request_messages;return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:t&&t.length?t.map(function(e){return(0,r.jsx)(o.wn,{title:e.time,buttons:(0,r.jsx)(o.$n,{onClick:function(){return n("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel",children:e.sender_real_name}),children:e.message},(0,l.jT)(e.time))}):(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsxs)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(o.In.Stack,{children:[(0,r.jsx)(o.In,{name:"broadcast-tower",size:5,color:"gray"}),(0,r.jsx)(o.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No ERT requests."]})})})})},x=function(){var e=(0,a.Oc)().act,n=u((0,i.useState)(""),2),t=n[0],l=n[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.fs,{placeholder:"Enter ERT denial reason here. Shift-Enter to add a new line.",fluid:!0,height:24,value:t,onChange:function(e){return l(e)}}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"times",mt:2,textAlign:"center",onClick:function(){return e("deny_ert",{reason:t})},children:"Deny ERT"})]})})}},9644:function(e,n,t){"use strict";t.r(n),t.d(n,{EconomyManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:325,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.next_payroll_time;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{label:"Pay Bonuses and Deductions",children:[(0,r.jsx)(i.Ki.Item,{label:"Global",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"global"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Members",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department_members"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Single Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)(i.az,{mb:.5,children:["Next Payroll in: ",l," Minutes"]}),(0,r.jsx)(i.$n,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return t("delay_payroll")}}),(0,r.jsx)(i.$n,{width:"auto",content:"Set Payroll Time",onClick:function(){return t("set_payroll")}}),(0,r.jsx)(i.$n,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return t("accelerate_payroll")}})]}),(0,r.jsxs)(i.IC,{children:[(0,r.jsx)("b",{children:"WARNING:"})," You take full responsibility for unbalancing the economy with these buttons!"]})]})}},6426:function(e,n,t){"use strict";t.r(n),t.d(n,{Electropack:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.power,u=c.code,d=c.frequency,f=c.minFrequency,h=c.maxFrequency;return(0,r.jsx)(a.p8,{width:360,height:135,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Frequency",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"freq"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:f/10,maxValue:h/10,value:d/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"code"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(e){return t("code",{code:e})}})})]})})})})}},9480:function(e,n,t){"use strict";t.r(n),t.d(n,{Emojipedia:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";return e&&0!==e.length?(e=(0,i.pb)(e,function(e){return!!(null==e?void 0:e.name)}),n&&(e=(0,i.pb)(e,(0,a.XZ)(n,function(e){return e.name+"|"+e.description}))),(0,i.Ul)(e,function(e){return null==e?void 0:e.name})):[]},C=function(e){if(y(e),""===e)return k(x.abilities);k(_(f.map(function(e){return e.abilities}).flat(),e))},I=function(e){g(e),k(e.abilities),y("")};return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.pd,{width:"200px",placeholder:"Search Abilities",onChange:function(e){C(e)},value:b}),(0,r.jsx)(l.$n,{icon:m?"square-o":"check-square-o",selected:!m,content:"Compact",onClick:function(){return t("set_view_mode",{mode:0})}}),(0,r.jsx)(l.$n,{icon:m?"check-square-o":"square-o",selected:m,content:"Expanded",onClick:function(){return t("set_view_mode",{mode:1})}})]}),children:[(0,r.jsx)(l.tU,{children:f.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===b&&x===e,onClick:function(){I(e)},children:e.category},e)})}),w.map(function(e,n){return(0,r.jsxs)(l.az,{p:.5,mx:-1,className:"candystripe",children:[(0,r.jsxs)(l.BJ,{align:"center",children:[(0,r.jsx)(l.BJ.Item,{ml:.5,color:"#dedede",children:e.name}),h.includes(e.power_path)&&(0,r.jsx)(l.BJ.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,r.jsxs)(l.BJ.Item,{mr:3,textAlign:"right",grow:1,children:[(0,r.jsxs)(l.az,{as:"span",color:"label",children:["Cost:"," "]}),(0,r.jsx)(l.az,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,r.jsx)(l.BJ.Item,{textAlign:"right",children:(0,r.jsx)(l.$n,{mr:.5,disabled:e.cost>u||h.includes(e.power_path),content:"Evolve",onClick:function(){return t("purchase",{power_path:e.power_path})}})})]}),!!m&&(0,r.jsx)(l.BJ,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},n)})]})})}},6251:function(e,n,t){"use strict";t.r(n),t.d(n,{ExosuitFabricator:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(7946),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(0,r.jsx)(o.$n,{icon:"arrow-up",onClick:function(){return t("queueswap",{from:n+1,to:n})}}),n0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--time",children:[(0,r.jsx)(o.cG,{}),"Processing time:",(0,r.jsx)(o.In,{name:"clock",mx:"0.5rem"}),(0,r.jsx)(o.az,{inline:!0,bold:!0,children:new Date(u/10*1e3).toISOString().substr(14,5)})]}),Object.keys(s).length>0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,r.jsx)(o.cG,{}),"Lacking materials to complete:",s.map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])})]})]})})})},j=function(e){var n,t,i=(0,c.Oc)(),a=(i.act,i.data),s=e.id,u=e.amount,d=e.lineDisplay,f=e.onClick,h=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["id","amount","lineDisplay","onClick"]),m=a.materials[s]||0,p=u||m;if(!(p<=0)||"metal"===s||"glass"===s)return(0,r.jsx)(o.BJ,(n=function(e){for(var n=1;nm&&"bad",ml:0,mr:1,children:p.toLocaleString("en-US")})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{basis:"content",children:(0,r.jsx)(o.$n,{width:"85%",color:"transparent",onClick:f,children:(0,r.jsx)(o.az,{mt:1,className:(0,l.Ly)(["materials32x32",s])})})}),(0,r.jsxs)(o.BJ.Item,{grow:"1",children:[(0,r.jsx)(o.az,{className:"Exofab__material--name",children:s}),(0,r.jsxs)(o.az,{className:"Exofab__material--amount",children:[p.toLocaleString("en-US")," cm\xb3 (",Math.round(p/2e3*10)/10," ","sheets)"]})]})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,l=e.design;return(0,r.jsxs)(o.az,{className:"Exofab__design",children:[(0,r.jsx)(o.$n,{disabled:l.notEnough||i.building,icon:"cog",content:l.name,onClick:function(){return t("build",{id:l.id})}}),(0,r.jsx)(o.$n,{icon:"plus-circle",onClick:function(){return t("queue",{id:l.id})}}),(0,r.jsx)(o.az,{className:"Exofab__design--cost",children:Object.entries(l.cost).map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])})}),(0,r.jsx)(o.BJ,{className:"Exofab__design--time",children:(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.In,{name:"clock"}),l.time>0?(0,r.jsxs)(r.Fragment,{children:[l.time/10," seconds"]}):"Instant"]})})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data.controllers;return(0,r.jsx)(u.p8,{children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(o.wn,{title:"Setup Linkage",children:(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Network Address"}),(0,r.jsx)(o.XI.Cell,{children:"Network ID"}),(0,r.jsx)(o.XI.Cell,{children:"Link"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.addr}),(0,r.jsx)(o.XI.Cell,{children:e.net_id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})},v=function(e){var n=(0,c.Oc)(),t=(n.act,n.data).tech_levels,i=e.showLevelsModal,l=e.setShowLevelsModal;return i?(0,r.jsx)(o.aF,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:(0,r.jsx)(o.wn,{title:"Current tech levels",buttons:(0,r.jsx)(o.$n,{content:"Close",onClick:function(){l(!1)}}),children:(0,r.jsx)(o.Ki,{children:t.map(function(e){var n=e.name,t=e.level;return(0,r.jsx)(o.Ki.Item,{label:n,children:t},n)})})})}):null}},9621:function(e,n,t){"use strict";t.r(n),t.d(n,{ExperimentConsole:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),c=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),s=function(e){var n=(0,o.Oc)(),t=n.act,s=n.data,u=s.open,d=s.feedback,f=s.occupant,h=s.occupant_name,m=s.occupant_status,p=function(){if(!f)return(0,r.jsx)(i.IC,{children:"No specimen detected."});var e=a.get(m);return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:h}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:e.color,children:e.text}),(0,r.jsx)(i.Ki.Item,{label:"Experiments",children:[0,1,2].map(function(e){return(0,r.jsx)(i.$n,{icon:c.get(e).icon,content:c.get(e).label,onClick:function(){return t("experiment",{experiment_type:e})}},e)})})]})}();return(0,r.jsx)(l.p8,{theme:"abductor",width:350,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Status",children:d})})}),(0,r.jsx)(i.wn,{title:"Scanner",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return t("door")}}),children:p})]})})}},5091:function(e,n,t){"use strict";t.r(n),t.d(n,{ExternalAirlockController:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n="good";return e<80?n="bad":e<95||e>110?n="average":e>120&&(n="bad"),n},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.chamber_pressure,u=(c.exterior_status,c.interior_status),d=c.processing;return(0,r.jsx)(l.p8,{width:330,height:205,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Chamber Pressure",children:(0,r.jsxs)(i.z2,{color:a(s),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,r.jsxs)(i.wn,{title:"Actions",buttons:(0,r.jsx)(i.$n,{content:"Abort",icon:"ban",color:"red",disabled:!d,onClick:function(){return t("abort")}}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:d,onClick:function(){return t("cycle_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:d,onClick:function(){return t("cycle_int")}})]}),(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_int")}})]})]})]})})}},6325:function(e,n,t){"use strict";t.r(n),t.d(n,{FaxMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:540,height:295,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:a.scan_name?"eject":"id-card",selected:a.scan_name,content:a.scan_name?a.scan_name:"-----",tooltip:a.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})}),(0,r.jsx)(i.Ki.Item,{label:"Authorize",children:(0,r.jsx)(i.$n,{icon:a.authenticated?"sign-out-alt":"id-card",selected:a.authenticated,disabled:a.nologin,content:a.realauth?"Log Out":"Log In",onClick:function(){return t("auth")}})})]})}),(0,r.jsx)(i.wn,{title:"Fax Menu",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Network",children:a.network}),(0,r.jsxs)(i.Ki.Item,{label:"Document",children:[(0,r.jsx)(i.$n,{icon:a.paper?"eject":"paperclip",disabled:!a.authenticated&&!a.paper,content:a.paper?a.paper:"-----",onClick:function(){return t("paper")}}),!!a.paper&&(0,r.jsx)(i.$n,{icon:"pencil-alt",content:"Rename",onClick:function(){return t("rename")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Sending To",children:(0,r.jsx)(i.$n,{icon:"print",content:a.destination?a.destination:"-----",disabled:!a.authenticated,onClick:function(){return t("dept")}})}),(0,r.jsx)(i.Ki.Item,{label:"Action",children:(0,r.jsx)(i.$n,{icon:"envelope",content:a.sendError?a.sendError:"Send",disabled:!a.paper||!a.destination||!a.authenticated||a.sendError,onClick:function(){return t("send")}})})]})})]})})}},9788:function(e,n,t){"use strict";t.r(n),t.d(n,{FilingCabinet:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=n.config,s=a.contents,u=c.title;return(0,r.jsx)(l.p8,{width:400,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Contents",children:[!s&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"folder-open",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"The ",u," is empty."]})}),!!s&&s.slice().map(function(e){return(0,r.jsxs)(i.BJ,{mt:.5,className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"80%",children:e.display_name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Retrieve",onClick:function(){return t("retrieve",{index:e.index})}})})]},e)})]})})})})}},26:function(e,n,t){"use strict";t.r(n),t.d(n,{FloorPainter:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=e.icon_state,a=e.direction,c=e.isSelected,s=e.onSelect;return(0,r.jsx)(i.Hg,{icon:t.icon,icon_state:l,direction:a,onClick:s,style:{borderStyle:c&&"solid"||"none",borderWidth:"2px",borderColor:"orange",padding:c&&"0px"||"2px"}})},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.availableStyles,u=c.selectedStyle,d=c.selectedDir,f=c.wideMode;return(0,r.jsx)(l.p8,{width:405,height:475,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.wn,{title:"Floor setup",children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-left",onClick:function(){return t("cycle_style",{offset:-1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(e){return t("select_style",{style:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-right",onClick:function(){return t("cycle_style",{offset:1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eraser",color:f?"green":"transparent",onClick:function(){return t("wide_mode")},children:"Wide mode"})})]}),(0,r.jsx)(i.az,{mt:"5px",mb:"5px",children:(0,r.jsx)(i.so,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:s.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(a,{icon_state:e,isSelected:u===e,onSelect:function(){return t("select_style",{style:e})}})},e)})})}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Direction",children:(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,null,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:null===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(a,{icon_state:u,direction:e,isSelected:e===d,onSelect:function(){return t("select_direction",{direction:e})}})},e)})},e)})})})})]})})})}},1561:function(e,n,t){"use strict";t.r(n),t.d(n,{GPS:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]}),void 0!==e.due&&(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.In,{name:"arrow-up",rotation:e.due}),"\xa0--"]})]}),(0,r.jsx)(o.XI.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:d(e.position)})]},n)})})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}},1259:function(e,n,t){"use strict";t.r(n),t.d(n,{GeneModder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)().data.has_seed;return(0,r.jsxs)(l.p8,{width:950,height:650,children:[(0,r.jsx)("div",{className:"GeneModder__left",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(x,{scrollable:!0})})}),(0,r.jsx)("div",{className:"GeneModder__right",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(a.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,r.jsx)(u,{}):(0,r.jsx)(s,{})]})})})]})},s=function(e){var n=(0,o.Oc)();return(n.act,n.data).disk,(0,r.jsxs)(i.wn,{title:"Genes",fill:!0,scrollable:!0,children:[(0,r.jsx)(f,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})},u=function(e){return(0,r.jsx)(i.wn,{fill:!0,height:"85%",children:(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,r.jsx)(i.In,{name:"leaf",size:5,mb:"10px"}),(0,r.jsx)("br",{}),"The plant DNA manipulator is missing a seed."]})})})},d=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.has_seed,u=c.seed,d=c.has_disk,f=c.disk;return n=s?(0,r.jsxs)(i.BJ.Item,{mb:"-6px",mt:"-4px",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(u.image),style:{verticalAlign:"middle",width:"32px",margin:"-1px",marginLeft:"-11px"}}),(0,r.jsx)(i.$n,{content:u.name,onClick:function(){return a("eject_seed")}}),(0,r.jsx)(i.$n,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return a("variant_name")}})]}):(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:"None",onClick:function(){return a("eject_seed")}})}),t=d?f.name:"None",(0,r.jsx)(i.wn,{title:"Storage",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Plant Sample",children:n}),(0,r.jsx)(i.Ki.Item,{label:"Data Disk",children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:t,tooltip:"Select Empty Disk",onClick:function(){return a("select_empty_disk")}})})})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.disk,c=l.core_genes;return(0,r.jsxs)(i.Nt,{title:"Core Genes",open:!0,children:[c.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("extract",{id:e.id})}})})]},e)})," ",(0,r.jsx)(i.BJ,{children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract All",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("bulk_extract_core")}})})})]},"Core Genes")},h=function(e){var n=(0,o.Oc)().data,t=n.reagent_genes,i=n.has_reagent;return(0,r.jsx)(p,{title:"Reagent Genes",gene_set:t,do_we_show:i})},m=function(e){var n=(0,o.Oc)().data,t=n.trait_genes,i=n.has_trait;return(0,r.jsx)(p,{title:"Trait Genes",gene_set:t,do_we_show:i})},p=function(e){var n=e.title,t=e.gene_set,l=e.do_we_show,a=(0,o.Oc)(),c=a.act,s=a.data.disk;return(0,r.jsx)(i.Nt,{title:n,open:!0,children:l?t.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==s?void 0:s.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove",icon:"times",onClick:function(){return c("remove",{id:e.id})}})})]},e)}):(0,r.jsx)(i.BJ.Item,{children:"No Genes Detected"})},n)},x=function(e){e.title,e.gene_set,e.do_we_show;var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_seed,c=l.empty_disks,s=l.stat_disks,u=l.trait_disks,d=l.reagent_disks;return(0,r.jsxs)(i.wn,{title:"Disks",children:[(0,r.jsx)("br",{}),"Empty Disks: ",c,(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){return t("eject_empty_disk")}}),(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stats",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[s.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:["All"===e.stat?(0,r.jsx)(i.$n,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(null==e?void 0:e.ready)||!a,icon:"arrow-circle-down",onClick:function(){return t("bulk_replace_core",{index:e.index})}}):(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!e||!a,content:"Replace",onClick:function(){return t("replace",{index:e.index,stat:e.stat})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Traits",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[u.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Reagents",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})})]})]})}},6954:function(e,n,t){"use strict";t.r(n),t.d(n,{GenericCrewManifest:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(2639),a=function(e){return(0,r.jsx)(o.p8,{theme:"nologo",width:588,height:510,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{noTopPadding:!0,children:(0,r.jsx)(l.CrewManifest,{})})})})}},9031:function(e,n,t){"use strict";t.r(n),t.d(n,{GhostHudPanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data,t=n.security,a=n.medical,s=n.diagnostic,u=n.pressure,d=n.radioactivity,f=n.ahud;return(0,r.jsx)(l.p8,{width:250,height:217,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(c,{label:"Medical",type:"medical",is_active:a}),(0,r.jsx)(c,{label:"Security",type:"security",is_active:t}),(0,r.jsx)(c,{label:"Diagnostic",type:"diagnostic",is_active:s}),(0,r.jsx)(c,{label:"Pressure",type:"pressure",is_active:u}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"toggle_rad",act_off:"toggle_rad"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Antag HUD",is_active:f,act_on:"ahud_on",act_off:"ahud_off"})]})})})},c=function(e){var n=(0,o.Oc)().act,t=e.label,l=e.type,a=void 0===l?null:l,c=e.is_active,s=e.act_on,u=void 0===s?"hud_on":s,d=e.act_off,f=void 0===d?"hud_off":d;return(0,r.jsxs)(i.so,{pt:.3,color:"label",children:[(0,r.jsx)(i.so.Item,{pl:.5,align:"center",width:"80%",children:t}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{mr:.6,content:c?"On":"Off",icon:c?"toggle-on":"toggle-off",selected:c,onClick:function(){return n(c?f:u,{hud_type:a})}})})]})}},3396:function(e,n,t){"use strict";t.r(n),t.d(n,{GlandDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.glands;return(0,r.jsx)(l.p8,{width:300,height:338,theme:"abductor",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(void 0===a?[]:a).map(function(e){return(0,r.jsx)(i.$n,{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 t("dispense",{gland_id:e.id})}},e.id)})})})})}},1009:function(e,n,t){"use strict";t.r(n),t.d(n,{GravityGen:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.charging_state,s=a.charge_count,u=a.breaker,d=a.ext_power;return(0,r.jsx)(l.p8,{width:350,height:170,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[function(e){if(e>0)return(0,r.jsxs)(i.IC,{danger:!0,p:1.5,children:[(0,r.jsx)("b",{children:"WARNING:"})," Radiation Detected!"]})}(c),(0,r.jsx)(i.wn,{fill:!0,title:"Generator Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"Online":"Offline",color:u?"green":"red",px:1.5,onClick:function(){return t("breaker")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power Status",color:d?"good":"bad",children:c>0?(0,r.jsxs)(i.az,{inline:!0,color:"average",children:["[ ",1===c?"Charging":"Discharging"," ]"]}):(0,r.jsxs)(i.az,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Gravity Charge",children:(0,r.jsx)(i.z2,{value:s/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}},6294:function(e,n,t){"use strict";t.r(n),t.d(n,{GuestPass:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(l.p8,{width:500,height:690,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){return t("mode",{mode:0})},children:"Issue Pass"}),(0,r.jsxs)(i.tU.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){return t("mode",{mode:1})},children:["Records (",c.issue_log.length,")"]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})})})})}),(0,r.jsx)(i.BJ.Item,{children:!c.showlogs&&(0,r.jsx)(i.wn,{title:"Issue Guest Pass",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Issue To",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){return t("giv_name")}})}),(0,r.jsx)(i.Ki.Item,{label:"Reason",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){return t("reason")}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){return t("duration")}})})]})})}),!c.showlogs&&(c.scan_name?(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){return t("issue")}}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(e){return t("access",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}):(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"id-card",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,r.jsx)(i.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){return t("print")}}),children:!!c.issue_log.length&&(0,r.jsx)(i.Ki,{children:c.issue_log.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{children:e},n)})})||(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"scroll",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No logs"]})})})})]})})})}},9511:function(e,n,t){"use strict";t.r(n),t.d(n,{HandheldChemDispenser:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[1,5,10,20,30,50],c=function(e){return(0,r.jsx)(l.p8,{width:390,height:430,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.amount,s=l.energy,u=l.maxEnergy,d=l.mode;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Amount",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:a.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:c===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})}),(0,r.jsx)(i.Ki.Item,{label:"Mode",verticalAlign:"middle",children:(0,r.jsxs)(i.BJ,{justify:"space-between",children:[(0,r.jsx)(i.$n,{icon:"cog",selected:"dispense"===d,content:"Dispense",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"dispense"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"remove"===d,content:"Remove",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"remove"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"isolate"===d,content:"Isolate",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"isolate"})}})]})})]})})})},u=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=l.current_reagent,u=[],d=0;d<(c.length+1)%3;d++)u.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"18%",children:(0,r.jsxs)(i.wn,{fill:!0,title:l.glass?"Drink Selector":"Chemical Selector",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:s===e.id,content:e.title,style:{marginLeft:"2px"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),u.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:"1",basis:"25%"},n)})]})})}},3365:function(e,n,t){"use strict";t.r(n),t.d(n,{HealthSensor:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,u=c.on,d=c.user_health,f=c.minHealth,h=c.maxHealth,m=c.alarm_health;return(0,r.jsx)(a.p8,{width:300,height:125,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scanning",children:(0,r.jsx)(i.$n,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return t("scan_toggle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health activation",children:(0,r.jsx)(i.Q7,{animate:!0,step:2,stepPixelSize:6,minValue:f,maxValue:h,value:m,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("alarm_health",{alarm_health:e})}})}),null!==d&&(0,r.jsx)(i.Ki.Item,{label:"User health",children:(0,r.jsx)(i.az,{color:s(d),bold:d>=100,children:(0,r.jsx)(i.zv,{value:d})})})]})})})})},s=function(e){return e>50?"green":e>0?"orange":"red"}},5880:function(e,n,t){"use strict";t.r(n),t.d(n,{Holodeck:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(3384),l=t(2864),a=t(7542),c=t(2723),s=function(){var e=(0,l.Oc)(),n=e.act,t=e.data,s=t.card,u=t.card_skins,d=t.all_centcom_skins,f=t.regions;return(0,r.jsx)(o.p8,{width:600,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Basic Information",children:[(0,r.jsx)(a.CardInformation,{card:s}),(0,r.jsx)(i.Ki.Item,{label:"Job Name",children:(0,r.jsx)(i.$n,{icon:s&&"Unknown"!==s.rank?"pencil-alt":"exclamation-triangle",selected:!!s,onClick:function(){return n("set_job_name")},children:null==s?void 0:s.rank})})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(a.DropdownCardSkins,{is_centcom:!0,card:s,card_skins:u,all_centcom_skins:d})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(c.AccessList,{accesses:f,selectedList:s.access,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})}})})]})})})}},6126:function(e,n,t){"use strict";t.r(n),t.d(n,{Instrument:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)();return n.act,n.data,(0,r.jsxs)(l.p8,{width:600,height:505,children:[(0,r.jsx)(c,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(d,{})]})})]})},c=function(e){var n=(0,o.Oc)(),t=n.act;if(n.data.help)return(0,r.jsx)(i.aF,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,r.jsx)(i.wn,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,r.jsxs)(i.az,{px:"0.5rem",mt:"-0.5rem",children:[(0,r.jsx)("h1",{children:"Making a Song"}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsx)("h1",{children:"Instrument Advanced Settings"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Type:"}),"\xa0Whether the instrument is legacy or synthesized.",(0,r.jsx)("br",{}),"Legacy instruments have a collection of sounds that are selectively used depending on the note to play.",(0,r.jsx)("br",{}),"Synthesized instruments use a base sound and change its pitch to match the note to play."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Current:"}),"\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),"\xa0The pitch to apply to all notes of the song."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain Mode:"}),"\xa0How a played note fades out.",(0,r.jsx)("br",{}),"Linear sustain means a note will fade out at a constant rate.",(0,r.jsx)("br",{}),"Exponential sustain means a note will fade out at an exponential rate, sounding smoother."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),"\xa0The volume threshold at which a note is fully stopped."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),"\xa0Whether the last note should be sustained indefinitely."]})]}),(0,r.jsx)(i.$n,{color:"grey",content:"Close",onClick:function(){return t("help")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.lines,c=l.playing,s=l.repeat,d=l.maxRepeats,f=l.tempo,h=l.minTempo,m=l.maxTempo,p=l.tickLag,x=l.volume,g=l.minVolume,j=l.maxVolume,b=l.ready;return(0,r.jsxs)(i.wn,{m:0,title:"Instrument",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"info",content:"Help",onClick:function(){return t("help")}}),(0,r.jsx)(i.$n,{icon:"file",content:"New",onClick:function(){return t("newsong")}}),(0,r.jsx)(i.$n,{icon:"upload",content:"Import",onClick:function(){return t("import")}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Playback",children:[(0,r.jsx)(i.$n,{selected:c,disabled:0===a.length||s<0,icon:"play",content:"Play",onClick:function(){return t("play")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"stop",content:"Stop",onClick:function(){return t("stop")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Repeat",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:0,maxValue:d,value:s,stepPixelSize:59,onChange:function(e,n){return t("repeat",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Tempo",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{disabled:f>=m,content:"-",as:"span",mr:"0.5rem",onClick:function(){return t("tempo",{new:f+p})}}),Math.round(600/f)," BPM",(0,r.jsx)(i.$n,{disabled:f<=h,content:"+",as:"span",ml:"0.5rem",onClick:function(){return t("tempo",{new:f-p})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Volume",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:g,maxValue:j,value:x,stepPixelSize:6,tickWhileDragging:!0,onChange:function(e,n){return t("setvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:b?(0,r.jsx)(i.az,{color:"good",children:"Ready"}):(0,r.jsx)(i.az,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,r.jsx)(u,{})]})},u=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.allowedInstrumentNames,u=c.instrumentLoaded,d=c.instrument,f=c.canNoteShift,h=c.noteShift,m=c.noteShiftMin,p=c.noteShiftMax,x=c.sustainMode,g=c.sustainLinearDuration,j=c.sustainExponentialDropoff,b=c.legacy,y=c.sustainDropoffVolume,v=c.sustainHeldNote;return 1===x?(n="Linear",t=(0,r.jsx)(i.Ap,{minValue:.1,maxValue:5,value:g,step:.5,stepPixelSize:85,format:function(e){return Math.round(100*e)/100+" seconds"},onChange:function(e,n){return a("setlinearfalloff",{new:n/10})}})):2===x&&(n="Exponential",t=(0,r.jsx)(i.Ap,{minValue:1.025,maxValue:10,value:j,step:.01,format:function(e){return Math.round(1e3*e)/1e3+"% per decisecond"},onChange:function(e,n){return a("setexpfalloff",{new:n})}})),s.sort(),(0,r.jsx)(i.az,{my:-1,children:(0,r.jsx)(i.Nt,{mt:"1rem",mb:"0",title:"Advanced",children:(0,r.jsxs)(i.wn,{mt:-1,children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:b?"Legacy":"Synthesized"}),(0,r.jsx)(i.Ki.Item,{label:"Current",children:u?(0,r.jsx)(i.ms,{options:s,selected:d,width:"50%",onSelected:function(e){return a("switchinstrument",{name:e})}}):(0,r.jsx)(i.az,{color:"bad",children:"None!"})}),!!(!b&&f)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Note Shift/Note Transpose",children:(0,r.jsx)(i.Ap,{minValue:m,maxValue:p,value:h,stepPixelSize:2,format:function(e){return e+" keys / "+Math.round(e/12*100)/100+" octaves"},onChange:function(e,n){return a("setnoteshift",{new:n})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Sustain Mode",children:[(0,r.jsx)(i.ms,{options:["Linear","Exponential"],selected:n,mb:"0.4rem",onSelected:function(e){return a("setsustainmode",{new:e})}}),t]}),(0,r.jsx)(i.Ki.Item,{label:"Volume Dropoff Threshold",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:.01,maxValue:100,value:y,stepPixelSize:6,onChange:function(e,n){return a("setdropoffvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Sustain indefinitely last held note",children:(0,r.jsx)(i.$n,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"Yes":"No",onClick:function(){return a("togglesustainhold")}})})]})]}),(0,r.jsx)(i.$n,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return a("reset")}})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.playing,c=l.lines,s=l.editing;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!s||a,icon:"plus",content:"Add Line",onClick:function(){return t("newline",{line:c.length+1})}}),(0,r.jsx)(i.$n,{selected:!s,icon:s?"chevron-up":"chevron-down",onClick:function(){return t("edit")}})]}),children:!!s&&(c.length>0?(0,r.jsx)(i.Ki,{children:c.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:n+1,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:a,icon:"pen",onClick:function(){return t("modifyline",{line:n+1})}}),(0,r.jsx)(i.$n,{disabled:a,icon:"trash",onClick:function(){return t("deleteline",{line:n+1})}})]}),children:e},n)})}):(0,r.jsx)(i.az,{color:"label",children:"Song is empty."}))})}},1783:function(e,n,t){"use strict";t.r(n),t.d(n,{KeyComboModal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=48&&e.keyCode<=57)&&(n+="Shift"),3===e.location&&(n+="Numpad"),h(e))if(e.shiftKey&&e.keyCode>=48&&e.keyCode<=57)n+="Shift"+(e.keyCode-48);else{var t=e.key.toUpperCase();n+=m[t]||t}return n},x=function(e){var n=(0,a.Oc)(),t=n.act,d=n.data,m=d.init_value,x=d.large_buttons,g=d.message,j=void 0===g?"":g,b=d.title,y=d.timeout,v=f((0,i.useState)(m),2),w=v[0],k=v[1],_=f((0,i.useState)(!0),2),C=_[0],I=_[1],S=function(e){if(!C){e.key===l._.Enter&&t("submit",{entry:w}),(0,l.KL)(e.key)&&t("cancel");return}if(e.preventDefault(),h(e)){O(p(e)),I(!1);return}if(e.key===l._.Escape){O(m),I(!1);return}},O=function(e){e!==w&&k(e)},A=130+(j.length>30?Math.ceil(j.length/3):0)+(j.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:b,width:240,height:A,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){S(e)},children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.y5,{}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:C,content:C&&null!==C?"Awaiting input...":""+w,width:"100%",textAlign:"center",onClick:function(){O(m),I(!0)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})]})})]})}},3928:function(e,n,t){"use strict";t.r(n),t.d(n,{KeycardAuth:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=(0,r.jsx)(i.wn,{title:"Keycard Authentication Device",children:(0,r.jsx)(i.az,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!a.swiping&&!a.busy)return(0,r.jsx)(l.p8,{width:540,height:280,children:(0,r.jsxs)(l.p8.Content,{children:[c,(0,r.jsx)(i.wn,{title:"Choose Action",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Red Alert",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",disabled:!a.redAvailable,onClick:function(){return t("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,r.jsx)(i.Ki.Item,{label:"ERT",children:(0,r.jsx)(i.$n,{icon:"broadcast-tower",onClick:function(){return t("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Maint Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Station-Wide Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})});var s=(0,r.jsx)(i.az,{color:"red",children:"Waiting for YOU to swipe your ID..."});return a.hasSwiped||a.ertreason||"Emergency Response Team"!==a.event?a.hasConfirm?s=(0,r.jsx)(i.az,{color:"green",children:"Request Confirmed!"}):a.isRemote?s=(0,r.jsx)(i.az,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):a.hasSwiped&&(s=(0,r.jsx)(i.az,{color:"orange",children:"Waiting for second person to confirm..."})):s=(0,r.jsx)(i.az,{color:"red",children:"Fill out the reason for your ERT request."}),(0,r.jsx)(l.p8,{width:540,height:265,children:(0,r.jsxs)(l.p8.Content,{children:[c,"Emergency Response Team"===a.event&&(0,r.jsx)(i.wn,{title:"Reason for ERT Call",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{color:a.ertreason?"":"red",icon:a.ertreason?"check":"pencil-alt",content:a.ertreason?a.ertreason:"-----",disabled:a.busy,onClick:function(){return t("ert")}})})}),(0,r.jsx)(i.wn,{title:a.event,buttons:(0,r.jsx)(i.$n,{icon:"arrow-circle-left",content:"Back",disabled:a.busy||a.hasConfirm,onClick:function(){return t("reset")}}),children:s})]})})}},6706:function(e,n,t){"use strict";t.r(n),t.d(n,{KitchenMachine:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.config,u=t.ingredients,d=t.operating,f=c.title;return(0,r.jsx)(l.p8,{width:400,height:320,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.Operating,{operating:d,name:f}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(s,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:u.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.inactive,c=l.tooltip;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"power-off",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return t("cook")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return t("eject")}})})]})})}},9846:function(e,n,t){"use strict";t.r(n),t.d(n,{LawManager:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.isAdmin,d=a.isSlaved,f=a.isMalf,h=a.isAIMalf,m=a.view;return(0,r.jsx)(l.p8,{width:800,height:f?620:365,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!(u&&d)&&(0,r.jsxs)(i.IC,{children:["This unit is slaved to ",d,"."]}),!!(f||h)&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:"Law Management",selected:0===m,onClick:function(){return t("set_view",{set_view:0})}}),(0,r.jsx)(i.$n,{content:"Lawsets",selected:1===m,onClick:function(){return t("set_view",{set_view:1})}})]}),0===m&&(0,r.jsx)(c,{}),1===m&&(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_zeroth_laws,c=l.zeroth_laws,s=l.has_ion_laws,d=l.ion_laws,f=l.ion_law_nr,h=l.has_inherent_laws,m=l.inherent_laws,p=l.has_supplied_laws,x=l.supplied_laws,g=l.channels,j=l.channel,b=l.isMalf,y=l.isAdmin,v=l.zeroth_law,w=l.ion_law,k=l.inherent_law,_=l.supplied_law,C=l.supplied_law_position;return(0,r.jsxs)(r.Fragment,{children:[!!a&&(0,r.jsx)(u,{title:"ERR_NULL_VALUE",laws:c,isMalf:b}),!!s&&(0,r.jsx)(u,{title:"".concat(f),laws:d,isMalf:b}),!!h&&(0,r.jsx)(u,{title:"Inherent",laws:m,isMalf:b}),!!p&&(0,r.jsx)(u,{title:"Supplied",laws:x,isMalf:b}),(0,r.jsx)(i.wn,{title:"Statement Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Statement Channel",children:g.map(function(e){return(0,r.jsx)(i.$n,{content:e.channel,selected:e.channel===j,onClick:function(){return t("law_channel",{law_channel:e.channel})}},e.channel)})}),(0,r.jsx)(i.Ki.Item,{label:"State Laws",children:(0,r.jsx)(i.$n,{content:"State Laws",onClick:function(){return t("state_laws")}})}),(0,r.jsx)(i.Ki.Item,{label:"Law Notification",children:(0,r.jsx)(i.$n,{content:"Notify",onClick:function(){return t("notify_laws")}})})]})}),!!b&&(0,r.jsx)(i.wn,{title:"Add Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Type"}),(0,r.jsx)(i.XI.Cell,{width:"60%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"20%",children:"Actions"})]}),!!(y&&!a)&&(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Zero"}),(0,r.jsx)(i.XI.Cell,{children:v}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_zeroth_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_zeroth_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Ion"}),(0,r.jsx)(i.XI.Cell,{children:w}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_ion_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_ion_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Inherent"}),(0,r.jsx)(i.XI.Cell,{children:k}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_inherent_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_inherent_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Supplied"}),(0,r.jsx)(i.XI.Cell,{children:_}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:C,onClick:function(){return t("change_supplied_law_position")}})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_supplied_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_supplied_law")}})]})]})]})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.law_sets;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsx)(i.wn,{title:e.name+" - "+e.header,buttons:(0,r.jsx)(i.$n,{content:"Load Laws",icon:"download",onClick:function(){return t("transfer_laws",{transfer_laws:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)})]})},e.name)})})},u=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.isMalf,a=e.laws,c=e.title;return(0,r.jsx)(i.wn,{title:c+" Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"69%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"21%",children:"State?"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.index}),(0,r.jsx)(i.XI.Cell,{children:e.law}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return t("state_law",{ref:e.ref,state_law:+!e.state})}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("edit_law",{edit_law:e.ref})}}),(0,r.jsx)(i.$n,{content:"Delete",icon:"trash",color:"red",onClick:function(){return t("delete_law",{delete_law:e.ref})}})]})]})]},e.law)})]})})}},3023:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e?"caution":"default",onClick:function(){return i("set_rating",{rating_value:e})}})},n)}),(0,r.jsxs)(o.BJ.Item,{bold:!0,ml:2,fontSize:"150%",children:[a+"/10",(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},h=function(e){var n=(0,l.Oc)().data,t=e.tabIndex,i=e.setTabIndex,a=n.login_state;return(0,r.jsx)(o.BJ.Item,{mb:1,children:(0,r.jsxs)(o.tU,{fluid:!0,textAlign:"center",children:[(0,r.jsx)(o.tU.Tab,{selected:0===t,onClick:function(){return i(0)},children:"Book Archives"}),(0,r.jsx)(o.tU.Tab,{selected:1===t,onClick:function(){return i(1)},children:"Corporate Literature"}),(0,r.jsx)(o.tU.Tab,{selected:2===t,onClick:function(){return i(2)},children:"Upload Book"}),1===a&&(0,r.jsx)(o.tU.Tab,{selected:3===t,onClick:function(){return i(3)},children:"Patron Manager"}),(0,r.jsx)(o.tU.Tab,{selected:4===t,onClick:function(){return i(4)},children:"Inventory"})]})})},m=function(e){switch(e.tabIndex){case 0:return(0,r.jsx)(x,{});case 1:return(0,r.jsx)(g,{});case 2:return(0,r.jsx)(j,{});case 3:return(0,r.jsx)(b,{});case 4:return(0,r.jsx)(y,{});default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},p=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.searchcontent,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{width:"35%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.title||"Input Title",onClick:function(){return(0,c.modalOpen)("edit_search_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.author||"Input Author",onClick:function(){return(0,c.modalOpen)("edit_search_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Ratings",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{mr:1,width:"min-content",content:a.ratingmin,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmin")}})}),(0,r.jsx)(o.BJ.Item,{children:"To"}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{ml:1,width:"min-content",content:a.ratingmax,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmax")}})})]})})]})]}),(0,r.jsxs)(o.BJ.Item,{width:"40%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{mt:2,children:(0,r.jsx)(o.ms,{mt:.6,width:"190px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_search_category",{category_id:d[e]})}})})})}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_search_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,r.jsx)(o.$n,{content:"Clear Search",icon:"eraser",onClick:function(){return t("clear_search")}}),a.ckey?(0,r.jsx)(o.$n,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return t("clear_ckey_search")}}):(0,r.jsx)(o.$n,{content:"Find My Books",icon:"search",onClick:function(){return t("find_users_books",{user_ckey:u})}})]})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.external_booklist,s=i.archive_pagenumber,u=i.num_pages,d=i.login_state;return(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.$n,{icon:"angle-double-left",disabled:1===s,onClick:function(){return t("deincrementpagemax")}}),(0,r.jsx)(o.$n,{icon:"chevron-left",disabled:1===s,onClick:function(){return t("deincrementpage")}}),(0,r.jsx)(o.$n,{bold:!0,content:s,onClick:function(){return(0,c.modalOpen)("setpagenumber")}}),(0,r.jsx)(o.$n,{icon:"chevron-right",disabled:s===u,onClick:function(){return t("incrementpage")}}),(0,r.jsx)(o.$n,{icon:"angle-double-right",disabled:s===u,onClick:function(){return t("incrementpagemax")}})]}),children:[(0,r.jsx)(p,{}),(0,r.jsx)("hr",{}),(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Ratings"}),(0,r.jsx)(o.XI.Cell,{children:"Category"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,r.jsxs)(o.XI.Cell,{children:[e.rating,(0,r.jsx)(o.In,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,r.jsx)(o.XI.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===d&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_external_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},e.id)})]})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.programmatic_booklist,s=i.login_state;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:2}),e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===s&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_programmatic_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},n)})]})})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.selectedbook,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,r.jsx)(o.$n.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:a.copyright,content:"Upload Book",onClick:function(){return t("uploadbook",{user_ckey:u})}}),children:[a.copyright?(0,r.jsx)(o.IC,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,r.jsx)("br",{}),(0,r.jsxs)(o.az,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.title,onClick:function(){return(0,c.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.author,onClick:function(){return(0,c.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{children:(0,r.jsx)(o.ms,{width:"240px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_upload_category",{category_id:d[e]})}})})})]}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,disabled:a.copyright,selected:!0,icon:"unlink",onClick:function(){return t("toggle_upload_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsx)(o.BJ.Item,{mr:75,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Summary",children:(0,r.jsx)(o.$n,{icon:"pen",width:"auto",disabled:a.copyright,content:"Edit Summary",onClick:function(){return(0,c.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(o.Ki.Item,{children:a.summary})]})})]})]})},b=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.checkout_data;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Patron"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Time Left"}),(0,r.jsx)(o.XI.Cell,{children:"Actions"})]}),i.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.In,{name:"user-tag"}),e.patron_name]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.title}),(0,r.jsx)(o.XI.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:(0,r.jsx)(o.$n,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return t("reportlost",{libraryid:e.libraryid})}})})]},n)})]})})},y=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).inventory_list;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"LIB ID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Status"})]}),t.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.libraryid}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book"})," ",e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},n)})]})})};(0,c.modalRegisterBodyOverride)("expand_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,s=i.user_ckey;return(0,r.jsxs)(o.wn,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsx)(o.Ki.Item,{label:"Summary",children:a.summary}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.rating,(0,r.jsx)(o.In,{name:"star",color:"yellow",verticalAlign:"top"})]}),!a.isProgrammatic&&(0,r.jsx)(o.Ki.Item,{label:"Categories",children:a.categories.join(", ")})]}),(0,r.jsx)("br",{}),s===a.ckey&&(0,r.jsx)(o.$n,{content:"Delete Book",icon:"trash",color:"red",disabled:a.isProgrammatic,onClick:function(){return t("delete_book",{bookid:a.id,user_ckey:s})}}),(0,r.jsx)(o.$n,{content:"Report Book",icon:"flag",color:"red",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("report_book",{bookid:a.id})}}),(0,r.jsx)(o.$n,{content:"Rate Book",icon:"star",color:"caution",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("rate_info",{bookid:a.id})}})]})}),(0,c.modalRegisterBodyOverride)("report_book",function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=e.args,s=a.selected_report,u=a.report_categories,d=a.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:c.title}),(0,r.jsx)(o.Ki.Item,{label:"Reasons",children:(0,r.jsx)(o.az,{children:u.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.$n,{content:e.description,selected:e.category_id===s,onClick:function(){return t("set_report",{report_type:e.category_id})}}),(0,r.jsx)("br",{})]},n)})})})]}),(0,r.jsx)(o.$n.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return t("submit_report",{bookid:c.id,user_ckey:d})}})]})}),(0,c.modalRegisterBodyOverride)("rate_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,c=i.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.current_rating?a.current_rating:0,(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,r.jsx)(o.Ki.Item,{label:"Total Ratings",children:a.total_ratings?a.total_ratings:0})]}),(0,r.jsx)(f,{}),(0,r.jsx)(o.$n.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return t("rate_book",{bookid:a.id,user_ckey:c})}})]})})},183:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:600,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)();switch((n.act,n.data).pagestate){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(f,{});case 3:return(0,r.jsx)(d,{});default:return"WE SHOULDN'T BE HERE!"}},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data,(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,a.modalOpen)("specify_ssid_delete")}}),(0,r.jsx)(i.$n,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_delete")}}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_search")}}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return t("view_reported_books")}})]})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.reports;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"All Reported Books",(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Uploader CKEY"}),(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{children:"Report Type"}),(0,r.jsx)(i.XI.Cell,{children:"Reporter Ckey"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.uploader_ckey}),(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.report_description}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.reporter_ckey}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return t("unflag_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.ckey,c=l.booklist;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"Books uploaded by ",a,(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),c.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})}},1536:function(e,n,t){"use strict";t.r(n),t.d(n,{ListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t10),2),I=C[0],S=C[1],O=f((0,i.useState)(""),2),A=O[0],P=O[1],E=function(e){var n,t,r,i,o=T.length-1;e===l.R?null===k||k===o?(_(0),null==(n=document.getElementById("0"))||n.scrollIntoView()):(_(k+1),null==(t=document.getElementById((k+1).toString()))||t.scrollIntoView()):e===l.gf&&(null===k||0===k?(_(o),null==(r=document.getElementById(o.toString()))||r.scrollIntoView()):(_(k-1),null==(i=document.getElementById((k-1).toString()))||i.scrollIntoView()))},B=function(e){var n=String.fromCharCode(e),t=x.find(function(e){return null==e?void 0:e.toLowerCase().startsWith(null==n?void 0:n.toLowerCase())});if(t){var r,i=x.indexOf(t);_(i),null==(r=document.getElementById(i.toString()))||r.scrollIntoView()}},z=function(){S(!I),P("")},T=x.filter(function(e){return null==e?void 0:e.toLowerCase().includes(A.toLowerCase())}),N=350+Math.ceil(j.length/3);return I||setTimeout(function(){var e;return null==(e=document.getElementById(k.toString()))?void 0:e.focus()},1),(0,r.jsxs)(c.p8,{title:v,width:325,height:N,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;(n===l.R||n===l.gf)&&(e.preventDefault(),E(n)),n===l.Ri&&(e.preventDefault(),t("submit",{entry:T[k]})),!I&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),B(n)),n===l.s6&&(e.preventDefault(),t("cancel"))},children:(0,r.jsx)(o.wn,{buttons:(0,r.jsx)(o.$n,{compact:!0,icon:I?"search":"font",selected:!0,tooltip:I?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){return z()}}),className:"ListInput__Section",fill:!0,title:j,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(m,{filteredItems:T,onClick:function(e){e!==k&&_(e)},onFocusSearch:function(){S(!1),S(!0)},searchBarVisible:I,selected:k})}),(0,r.jsx)(o.BJ.Item,{m:0,children:I&&(0,r.jsx)(p,{filteredItems:T,onSearch:function(e){var n;e!==A&&(P(e),_(0),null==(n=document.getElementById("0"))||n.scrollIntoView())},searchQuery:A,selected:k})}),(0,r.jsx)(o.BJ.Item,{mt:.5,children:(0,r.jsx)(s.InputButtons,{input:T[k]})})]})})})]})},m=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onClick,c=e.onFocusSearch,s=e.searchBarVisible,u=e.selected;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:t.map(function(e,a){return(0,r.jsx)(o.$n,{fluid:!0,color:"transparent",id:a,onClick:function(){return i(a)},onMouseDown:function(e){2===e.detail&&(e.preventDefault(),n("submit",{entry:t[u]}))},onKeyDown:function(e){var n=window.event?e.which:e.keyCode;s&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),c())},selected:a===u,style:{animation:"none",transition:"none"},children:e.replace(/^\w/,function(e){return e.toUpperCase()})},a)})})},p=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onSearch,l=e.searchQuery,c=e.selected;return(0,r.jsx)(o.pd,{width:"100%",autoFocus:!0,autoSelect:!0,placeholder:"Search...",value:l,onChange:function(e){return i(e)},onEnter:function(){n("submit",{entry:t[c]})}})}},7239:function(e,n,t){"use strict";t.r(n),t.d(n,{Loadout:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t2?Object.entries(s.gears).reduce(function(e,n){var t=u(n,2),r=(t[0],t[1]);return e.concat(Object.entries(r).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}}))},[]).filter(function(e){return I(e.gear)}):Object.entries(s.gears[p]).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}})).sort(d[v]),_&&(n=n.reverse()),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:p,buttons:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.ms,{height:1.66,selected:v,options:Object.keys(d),onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:_?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:_?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){return C(!_)}})}),x&&(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{width:20,placeholder:"Search...",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"magnifying-glass",selected:x,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){g(!x),b("")}})})]}),children:n.map(function(e){var n=e.key,t=e.gear,i=Object.keys(s.selected_gears).includes(n),l=1===t.cost?"".concat(t.cost," Point"):"".concat(t.cost," Points"),a=(0,r.jsxs)(o.az,{children:[t.name.length>12&&(0,r.jsx)(o.az,{children:t.name}),t.gear_tier>f&&(0,r.jsx)(o.az,{mt:t.name.length>12&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),d=(0,r.jsxs)(r.Fragment,{children:[t.allowed_roles&&(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"user",tooltip:(0,r.jsx)(o.wn,{m:-1,title:"Allowed Roles",children:t.allowed_roles.map(function(e){return(0,r.jsx)(o.az,{children:e},e)})}),tooltipPosition:"left"}),Object.entries(t.tweaks).map(function(e){var n=u(e,2),t=n[0];return n[1].map(function(e){return(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:e.icon,tooltip:e.tooltip,tooltipPosition:"top"},t)})}),(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"info",tooltip:t.desc,tooltipPosition:"top"})]}),p=(0,r.jsxs)(o.az,{className:"Loadout-InfoBox",children:[(0,r.jsx)(o.az,{style:{flexGrow:1},fontSize:1,color:"gold",opacity:.75,children:t.gear_tier>0&&"Tier ".concat(t.gear_tier)}),(0,r.jsx)(o.az,{fontSize:.75,opacity:.66,children:l})]});return(0,r.jsx)(o.c_,{m:.5,imageSize:84,dmIcon:t.icon,dmIconState:t.icon_state,tooltip:(t.name.length>12||t.gear_tier>0)&&a,tooltipPosition:"bottom",selected:i,disabled:t.gear_tier>f||h+t.cost>m&&!i,buttons:d,buttonsAlt:p,onClick:function(){return c("toggle_gear",{gear:n})},children:t.name},n)})})},p=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.setTweakedGear,c=Object.entries(i.gears).reduce(function(e,n){var t=u(n,2),r=Object.entries((t[0],t[1])).filter(function(e){var n=u(e,1)[0];return Object.keys(i.selected_gears).includes(n)}).map(function(e){var n=u(e,2);return function(e){for(var n=1;n0&&(0,r.jsx)(o.$n,{icon:"gears",iconColor:"gray",width:"33px",onClick:function(){return l(e)}}),(0,r.jsx)(o.$n,{icon:"times",iconColor:"red",width:"32px",onClick:function(){return t("toggle_gear",{gear:e.key})}})]}),children:e.name},e.key)})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{children:(0,r.jsx)(o.z2,{value:i.gear_slots,maxValue:i.max_gear_slots,ranges:{bad:[i.max_gear_slots,1/0],average:[.66*i.max_gear_slots,i.max_gear_slots],good:[0,.66*i.max_gear_slots]},children:(0,r.jsxs)(o.az,{textAlign:"center",children:["Used points ",i.gear_slots,"/",i.max_gear_slots]})})})})]})},x=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.tweakedGear,c=e.setTweakedGear;return(0,r.jsx)(o.Rr,{children:(0,r.jsx)(o.az,{className:"Loadout-Modal__background",children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,width:20,height:20,title:l.name,buttons:(0,r.jsx)(o.$n,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){return c("")}}),children:(0,r.jsx)(o.Ki,{children:Object.entries(l.tweaks).map(function(e){var n=u(e,2),a=n[0];return n[1].map(function(e){var n=i.selected_gears[l.key][a];return(0,r.jsxs)(o.Ki.Item,{label:e.name,color:n?"":"gray",buttons:(0,r.jsx)(o.$n,{color:"transparent",icon:"pen",onClick:function(){return t("set_tweak",{gear:l.key,tweak:a})}}),children:[n||"Default",(0,r.jsx)(o.az,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{backgroundColor:"".concat(n)}})]},a)})})})})})})}},5766:function(e,n,t){"use strict";t.r(n),t.d(n,{LoreConsole:()=>e2});var r,i=t(8138),o=t(2864),l=t(4530),a=t(7790),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/,b=RegExp(j.source,"g"),y=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,v=RegExp(y.source,"g"),w={"&":"&","<":"<",">":">",'"':""","'":"'"},k=function(e){return w[e]};function _(e,n){if(n){if(j.test(e))return e.replace(b,k)}else if(y.test(e))return e.replace(v,k);return e}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function I(e){return e.replace(C,function(e,n){return"colon"===(n=n.toLowerCase())?":":"#"===n.charAt(0)?"x"===n.charAt(1)?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""})}var S=/(^|[^\[])\^/g;function O(e,n){e="string"==typeof e?e:e.source,n=n||"";var t={replace:function(n,r){return r=(r=r.source||r).replace(S,"$1"),e=e.replace(n,r),t},getRegex:function(){return new RegExp(e,n)}};return t}var A=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(e,n,t){var r,i,o,l;if(e){try{r=decodeURIComponent(I(t)).replace(A,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}n&&!P.test(t)&&(i=n,o=t,B[" "+i]||(z.test(i)?B[" "+i]=i+"/":B[" "+i]=D(i,"/",!0)),l=-1===(i=B[" "+i]).indexOf(":"),t="//"===o.substring(0,2)?l?o:i.replace(T,"$1")+o:"/"!==o.charAt(0)?i+o:l?o:i.replace(N,"$1")+o);try{t=encodeURI(t).replace(/%25/g,"%")}catch(e){return null}return t}var B={},z=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,N=/^([^:]+:\/*[^/]*)[\s\S]*$/,R={exec:function(){}};function $(e,n){var t=e.replace(/\|/g,function(e,n,t){for(var r=!1,i=n;--i>=0&&"\\"===t[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),t.length>n)t.splice(n);else for(;t.length1;)1&n&&(t+=e),n>>=1,e+=e;return t+e}function L(e,n,t,r){var i=n.href,o=n.title?_(n.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:t,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:o,text:_(l)}}var K=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"space",value:function(e){var n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}},{key:"code",value:function(e){var n=this.rules.block.code.exec(e);if(n){var t=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?t:D(t,"\n")}}}},{key:"fences",value:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map(function(e){var n=e.match(/^\s+/);return null===n?e:(function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),1!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,1)||function(e,n){if(e){if("string"==typeof e)return s(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,1)}}(n,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].length>=r.length?e.slice(r.length):e}).join("\n")}(t,n[3]||"");return{type:"code",raw:t,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}},{key:"heading",value:function(e){var n=this.rules.block.heading.exec(e);if(n){var t=n[2].trim();if(/#$/.test(t)){var r=D(t,"#");this.options.pedantic?t=r.trim():(!r||/ $/.test(r))&&(t=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:t,tokens:this.lexer.inline(t)}}}},{key:"hr",value:function(e){var n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}},{key:"blockquote",value:function(e){var n=this.rules.block.blockquote.exec(e);if(n){var t=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;var i=this.lexer.blockTokens(t);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:t}}}},{key:"list",value:function(e){var n=this.rules.block.list.exec(e);if(n){var t,r,i,o,l,a,c,s,u,d,f,h,m=n[1].trim(),p=m.length>1,x={type:"list",raw:"",ordered:p,start:p?+m.slice(0,-1):"",loose:!1,items:[]};m=p?"\\d{1,9}\\".concat(m.slice(-1)):"\\".concat(m),this.options.pedantic&&(m=p?m:"[*+-]");for(var g=new RegExp("^( {0,3}".concat(m,")((?:[ ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,!(!(n=g.exec(e))||this.rules.block.hr.test(e)));){if(t=n[0],e=e.substring(t.length),s=n[2].split("\n",1)[0].replace(/^\t+/,function(e){return" ".repeat(3*e.length)}),u=e.split("\n",1)[0],this.options.pedantic?(o=2,f=s.trimLeft()):(o=(o=n[2].search(/[^ ]/))>4?1:o,f=s.slice(o),o+=n[1].length),a=!1,!s&&/^ *$/.test(u)&&(t+=u+"\n",e=e.substring(u.length+1),h=!0),!h)for(var j=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),y=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),v=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(u=d=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(y.test(u)||v.test(u)||j.test(u)||b.test(e)));){if(u.search(/[^ ]/)>=o||!u.trim())f+="\n"+u.slice(o);else{if(a||s.search(/[^ ]/)>=4||y.test(s)||v.test(s)||b.test(s))break;f+="\n"+u}a||u.trim()||(a=!0),t+=d+"\n",e=e.substring(d.length+1),s=u.slice(o)}!x.loose&&(c?x.loose=!0:/\n *\n *$/.test(t)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(i="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),x.items.push({type:"list_item",raw:t,task:!!r,checked:i,loose:!1,text:f}),x.raw+=t}x.items[x.items.length-1].raw=t.trimRight(),x.items[x.items.length-1].text=f.trimRight(),x.raw=x.raw.trimRight();var w=x.items.length;for(l=0;l0&&k.some(function(e){return/\n.*\n/.test(e.raw)})}if(x.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:t,raw:n[0],href:r,title:i}}}},{key:"table",value:function(e){var n=this.rules.block.table.exec(e);if(n){var t={type:"table",header:$(n[1]).map(function(e){return{text:e}}),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=n[0];var r,i,o,l,a=t.align.length;for(r=0;r/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):_(n[0]):n[0]}}},{key:"link",value:function(e){var n=this.rules.inline.link.exec(e);if(n){var t=n[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;var r=D(t.slice(0,-1),"\\");if((t.length-r.length)%2==0)return}else{var i=function(e,n){if(-1===e.indexOf(")"))return -1;for(var t=e.length,r=0,i=0;i-1){var o=(0===n[0].indexOf("!")?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,o).trim(),n[3]=""}}var l=n[2],a="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);c&&(l=c[1],a=c[3])}else a=n[3]?n[3].slice(1,-1):"";return l=l.trim(),/^$/.test(t)?l.slice(1):l.slice(1,-1)),L(n,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},n[0],this.lexer)}}},{key:"reflink",value:function(e,n){var t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){var r=(t[2]||t[1]).replace(/\s+/g," ");if(!(r=n[r.toLowerCase()])){var i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return L(t,r,t[0],this.lexer)}}},{key:"emStrong",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&!(r[3]&&t.match(RegExp("[\\p{L}\\p{N}]","u")))){var i=r[1]||r[2]||"";if(!i||i&&(""===t||this.rules.inline.punctuation.exec(t))){var o,l,a=r[0].length-1,c=a,s=0,u="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,n=n.slice(-1*e.length+a);null!=(r=u.exec(n));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]){if(l=o.length,r[3]||r[4]){c+=l;continue}if((r[5]||r[6])&&a%3&&!((a+l)%3)){s+=l;continue}if(!((c-=l)>0)){l=Math.min(l,l+c+s);var d=e.slice(0,a+r.index+(r[0].length-o.length)+l);if(Math.min(a,l)%2){var f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}}}}},{key:"codespan",value:function(e){var n=this.rules.inline.code.exec(e);if(n){var t=n[2].replace(/\n/g," "),r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=_(t,!0),{type:"codespan",raw:n[0],text:t}}}},{key:"br",value:function(e){var n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}},{key:"del",value:function(e){var n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}},{key:"autolink",value:function(e,n){var t,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(t=_(this.options.mangle?n(i[1]):i[1])):t=_(i[1]),{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e,n){var t,r,i,o;if(t=this.rules.inline.url.exec(e)){if("@"===t[2])i="mailto:"+(r=_(this.options.mangle?n(t[0]):t[0]));else{do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0];while(o!==t[0]);r=_(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,n){var t,r=this.rules.inline.text.exec(e);if(r)return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):_(r[0]):r[0]:_(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:t}}}]),e}(),J={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:R,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};J._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,J._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,J.def=O(J.def).replace("label",J._label).replace("title",J._title).getRegex(),J.bullet=/(?:[*+-]|\d{1,9}[.)])/,J.listItemStart=O(/^( *)(bull) */).replace("bull",J.bullet).getRegex(),J.list=O(J.list).replace(/bull/g,J.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+J.def.source+")").getRegex(),J._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",J._comment=/|$)/,J.html=O(J.html,"i").replace("comment",J._comment).replace("tag",J._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),J.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.blockquote=O(J.blockquote).replace("paragraph",J.paragraph).getRegex(),J.normal=m({},J),J.gfm=p(m({},J.normal),{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),J.gfm.table=O(J.gfm.table).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.gfm.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",J.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.pedantic=p(m({},J.normal),{html:O("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",J._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(J.normal._paragraph).replace("hr",J.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",J.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(t="x"+t.toString(16)),r+="&#"+t+";";return r}X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=O(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,X.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,X._comment=O(J._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),X.emStrong.lDelim=O(X.emStrong.lDelim).replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimAst=O(X.emStrong.rDelimAst,"g").replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimUnd=O(X.emStrong.rDelimUnd,"g").replace(/punct/g,X._punctuation).getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,X.autolink=O(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=O(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=O(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=O(X.reflink).replace("label",X._label).replace("ref",J._label).getRegex(),X.nolink=O(X.nolink).replace("ref",J._label).getRegex(),X.reflinkSearch=O(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal=m({},X),X.pedantic=p(m({},X.normal),{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()}),X.gfm=p(m({},X.normal),{escape:O(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,function(e,n,t){return n+" ".repeat(t.length)});e&&"break"!==(o=this,function(){if(o.options.extensions&&o.options.extensions.block&&o.options.extensions.block.some(function(t){return!!(n=t.call({lexer:l},e,a))&&(e=e.substring(n.raw.length),a.push(n),!0)}))return"continue";if(n=o.tokenizer.space(e))return e=e.substring(n.raw.length),1===n.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(n),"continue";if(n=o.tokenizer.code(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if((n=o.tokenizer.fences(e))||(n=o.tokenizer.heading(e))||(n=o.tokenizer.hr(e))||(n=o.tokenizer.blockquote(e))||(n=o.tokenizer.list(e))||(n=o.tokenizer.html(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(n=o.tokenizer.def(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.raw,o.inlineQueue[o.inlineQueue.length-1].src=t.text):o.tokens.links[n.tag]||(o.tokens.links[n.tag]={href:n.href,title:n.title}),"continue";if((n=o.tokenizer.table(e))||(n=o.tokenizer.lheading(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(r=e,o.options.extensions&&o.options.extensions.startBlock){var c=1/0,s=e.slice(1),u=void 0;o.options.extensions.startBlock.forEach(function(e){"number"==typeof(u=e.call({lexer:this},s))&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(r=e.substring(0,c+1))}if(o.state.top&&(n=o.tokenizer.paragraph(r)))return t=a[a.length-1],i&&"paragraph"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),i=r.length!==e.length,e=e.substring(n.raw.length),"continue";if(n=o.tokenizer.text(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&"text"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(o.options.silent)return console.error(d),"break";throw Error(d)}}()););return this.state.top=!0,a}},{key:"inline",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:n}),n}},{key:"inlineTokens",value:function(e){var n,t,r,i,o,l,a,c=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=e;if(this.tokens.links){var d=Object.keys(this.tokens.links);if(d.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(u));)d.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,i.index+i[0].length-2)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e&&"break"!==(a=this,function(){if(o||(l=""),o=!1,a.options.extensions&&a.options.extensions.inline&&a.options.extensions.inline.some(function(t){return!!(n=t.call({lexer:c},e,s))&&(e=e.substring(n.raw.length),s.push(n),!0)}))return"continue";if(n=a.tokenizer.escape(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.tag(e))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(n=a.tokenizer.link(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.reflink(e,a.tokens.links))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if((n=a.tokenizer.emStrong(e,u,l))||(n=a.tokenizer.codespan(e))||(n=a.tokenizer.br(e))||(n=a.tokenizer.del(e))||(n=a.tokenizer.autolink(e,F))||!a.state.inLink&&(n=a.tokenizer.url(e,F)))return e=e.substring(n.raw.length),s.push(n),"continue";if(r=e,a.options.extensions&&a.options.extensions.startInline){var i=1/0,d=e.slice(1),f=void 0;a.options.extensions.startInline.forEach(function(e){"number"==typeof(f=e.call({lexer:this},d))&&f>=0&&(i=Math.min(i,f))}),i<1/0&&i>=0&&(r=e.substring(0,i+1))}if(n=a.tokenizer.inlineText(r,U))return e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),o=!0,(t=s[s.length-1])&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(e){var h="Infinite loop on byte: "+e.charCodeAt(0);if(a.options.silent)return console.error(h),"break";throw Error(h)}}()););return s}}],[{key:"rules",get:function(){return{block:J,inline:X}}},{key:"lex",value:function(n,t){return new e(t).lex(n)}},{key:"lexInline",value:function(n,t){return new e(t).inlineTokens(n)}}]),e}(),H=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"code",value:function(e,n,t){var r=(n||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(t=!0,e=i)}return(e=e.replace(/\n$/,"")+"\n",r)?'
    '+(t?e:_(e,!0))+"
    \n":"
    "+(t?e:_(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,n,t,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(t);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,n,t){var r=n?"ol":"ul";return"<"+r+(n&&1!==t?' start="'+t+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,n){return n&&(n="".concat(n,"")),"\n\n"+e+"\n"+n+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,n){var t=n.header?"th":"td";return(n.align?"<".concat(t,' align="').concat(n.align,'">'):"<".concat(t,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,n,t){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return t;var r='
    "}},{key:"image",value:function(e,n,t){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return t;var r='').concat(t,'":">"}},{key:"text",value:function(e){return e}}]),e}(),W=function(){function e(){u(this,e)}return f(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,n,t){return""+t}},{key:"image",value:function(e,n,t){return""+t}},{key:"br",value:function(){return""}}]),e}(),q=function(){function e(){u(this,e),this.seen={}}return f(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,n){var t=e,r=0;if(this.seen.hasOwnProperty(t)){r=this.seen[e];do t=e+"-"+ ++r;while(this.seen.hasOwnProperty(t))}return n||(this.seen[e]=r,this.seen[t]=0),t}},{key:"slug",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=this.serialize(e);return this.getNextSafeSlug(t,n.dryrun)}}]),e}(),G=function(){function e(n){u(this,e),this.options=n||g,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new W,this.slugger=new q}return f(e,[{key:"parse",value:function(e){var n,t,r,i,o,l,a,c,s,u,d,f,h,m,p,x,g,j,b,y=!(arguments.length>1)||void 0===arguments[1]||arguments[1],v="",w=e.length;for(n=0;n0&&"paragraph"===p.tokens[0].type?(p.tokens[0].text=j+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&"text"===p.tokens[0].tokens[0].type&&(p.tokens[0].tokens[0].text=j+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:j}):m+=j),m+=this.parse(p.tokens,h),s+=this.renderer.listitem(m,g,x);v+=this.renderer.list(s,d,f);continue;case"html":v+=this.renderer.html(u.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(s=u.tokens?this.parseInline(u.tokens):u.text;n+1";return c?Promise.resolve(n):s?void s(null,n):n}if(c)return Promise.reject(e);if(s)return void s(e);throw e});if(null==t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if((u=r)&&u.sanitize&&!u.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),r.hooks&&(r.hooks.options=r),i){var a,c,s,u,d,f=r.highlight;try{r.hooks&&(t=r.hooks.preprocess(t)),d=e(t,r)}catch(e){return l(e)}var h=function(e){var t;if(!e)try{r.walkTokens&&Z.walkTokens(d,r.walkTokens),t=n(d,r),r.hooks&&(t=r.hooks.postprocess(t))}catch(n){e=n}return r.highlight=f,e?l(e):i(null,t)};if(!f||f.length<3||(delete r.highlight,!d.length))return h();var p=0;return Z.walkTokens(d,function(e){"code"===e.type&&(p++,setTimeout(function(){f(e.text,e.lang,function(n,t){if(n)return h(n);null!=t&&t!==e.text&&(e.text=t,e.escaped=!0),0==--p&&h()})},0))}),void(0===p&&h())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(function(n){return e(n,r)}).then(function(e){return r.walkTokens?Promise.all(Z.walkTokens(e,r.walkTokens)).then(function(){return e}):e}).then(function(e){return n(e,r)}).then(function(e){return r.hooks?r.hooks.postprocess(e):e}).catch(l);try{r.hooks&&(t=r.hooks.preprocess(t));var x=e(t,r);r.walkTokens&&Z.walkTokens(x,r.walkTokens);var g=n(x,r);return r.hooks&&(g=r.hooks.postprocess(g)),g}catch(e){return l(e)}}}function Z(e,n,t){return Q(V.lex,G.parse)(e,n,t)}h(Y,"passThroughHooks",new Set(["preprocess","postprocess"])),Z.options=Z.setOptions=function(e){return Z.defaults=m({},Z.defaults,e),g=Z.defaults,Z},Z.getDefaults=x,Z.defaults=g,Z.use=function(){for(var e=arguments.length,n=Array(e),t=0;t2?t-2:0),i=2;i1?n-1:0),r=1;r1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:ep;en&&en(e,null);let r=n.length;for(;r--;){let i=n[r];if("string"==typeof i){let e=t(i);e!==i&&(et(n)||(n[r]=e),i=e)}e[i]=!0}return e}function eI(e){let n=ea(null);for(let[t,r]of ee(e))ev(e,t)&&(Array.isArray(r)?n[t]=function(e){for(let n=0;n/gm),eK=el(/\$\{[\w\W]*/gm),eJ=el(/^data-[\-\w.\u00B7-\uFFFF]+$/),eX=el(/^aria-[\-\w]+$/),eU=el(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eF=el(/^(?:\w+script|data):/i),eV=el(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eH=el(/^html$/i);var eW=Object.freeze({__proto__:null,ARIA_ATTR:eX,ATTR_WHITESPACE:eV,CUSTOM_ELEMENT:el(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:eJ,DOCTYPE_NAME:eH,ERB_EXPR:eL,IS_ALLOWED_URI:eU,IS_SCRIPT_OR_DATA:eF,MUSTACHE_EXPR:eM,TMPLIT_EXPR:eK});let eq=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));let i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},eG=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var eY=function e(){let n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,r=n=>e(n);if(r.version="3.2.7",r.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return r.isSupported=!1,r;let{document:i}=t,o=i,l=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:s,Element:u,NodeFilter:d,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,x=u.prototype,g=eS(x,"cloneNode"),j=eS(x,"remove"),b=eS(x,"nextSibling"),y=eS(x,"childNodes"),v=eS(x,"parentNode");if("function"==typeof c){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let w="",{implementation:k,createNodeIterator:_,createDocumentFragment:C,getElementsByTagName:I}=i,{importNode:S}=o,O=eG();r.isSupported="function"==typeof ee&&"function"==typeof v&&k&&void 0!==k.createHTMLDocument;let{MUSTACHE_EXPR:A,ERB_EXPR:P,TMPLIT_EXPR:E,DATA_ATTR:B,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:T,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:R}=eW,{IS_ALLOWED_URI:$}=eW,D=null,M=eC({},[...eO,...eA,...eP,...eB,...eT]),L=null,K=eC({},[...eN,...eR,...e$,...eD]),J=Object.seal(ea(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,U=null,F=!0,V=!0,H=!1,W=!0,q=!1,G=!0,Y=!1,Q=!1,Z=!1,en=!1,et=!1,er=!1,ei=!0,el=!1,ec=!0,es=!1,e_={},eM=null,eL=eC({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eK=null,eJ=eC({},["audio","video","img","source","image","track"]),eX=null,eF=eC({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eV="http://www.w3.org/1998/Math/MathML",eY="http://www.w3.org/2000/svg",eQ="http://www.w3.org/1999/xhtml",eZ=eQ,e0=!1,e1=null,e2=eC({},[eV,eY,eQ],ex),e8=eC({},["mi","mo","mn","ms","mtext"]),e3=eC({},["annotation-xml"]),e5=eC({},["title","style","font","a","script"]),e4=null,e6=["application/xhtml+xml","text/html"],e7=null,e9=null,ne=i.createElement("form"),nn=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e9||e9!==e){if(e&&"object"==typeof e||(e={}),e=eI(e),e7="application/xhtml+xml"===(e4=-1===e6.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?ex:ep,D=ev(e,"ALLOWED_TAGS")?eC({},e.ALLOWED_TAGS,e7):M,L=ev(e,"ALLOWED_ATTR")?eC({},e.ALLOWED_ATTR,e7):K,e1=ev(e,"ALLOWED_NAMESPACES")?eC({},e.ALLOWED_NAMESPACES,ex):e2,eX=ev(e,"ADD_URI_SAFE_ATTR")?eC(eI(eF),e.ADD_URI_SAFE_ATTR,e7):eF,eK=ev(e,"ADD_DATA_URI_TAGS")?eC(eI(eJ),e.ADD_DATA_URI_TAGS,e7):eJ,eM=ev(e,"FORBID_CONTENTS")?eC({},e.FORBID_CONTENTS,e7):eL,X=ev(e,"FORBID_TAGS")?eC({},e.FORBID_TAGS,e7):eI({}),U=ev(e,"FORBID_ATTR")?eC({},e.FORBID_ATTR,e7):eI({}),e_=!!ev(e,"USE_PROFILES")&&e.USE_PROFILES,F=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,q=e.SAFE_FOR_TEMPLATES||!1,G=!1!==e.SAFE_FOR_XML,Y=e.WHOLE_DOCUMENT||!1,en=e.RETURN_DOM||!1,et=e.RETURN_DOM_FRAGMENT||!1,er=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,ei=!1!==e.SANITIZE_DOM,el=e.SANITIZE_NAMED_PROPS||!1,ec=!1!==e.KEEP_CONTENT,es=e.IN_PLACE||!1,$=e.ALLOWED_URI_REGEXP||eU,eZ=e.NAMESPACE||eQ,e8=e.MATHML_TEXT_INTEGRATION_POINTS||e8,e3=e.HTML_INTEGRATION_POINTS||e3,J=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&nn(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(J.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&nn(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(J.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(J.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(V=!1),et&&(en=!0),e_&&(D=eC({},eT),L=[],!0===e_.html&&(eC(D,eO),eC(L,eN)),!0===e_.svg&&(eC(D,eA),eC(L,eR),eC(L,eD)),!0===e_.svgFilters&&(eC(D,eP),eC(L,eR),eC(L,eD)),!0===e_.mathMl&&(eC(D,eB),eC(L,e$),eC(L,eD))),e.ADD_TAGS&&(D===M&&(D=eI(D)),eC(D,e.ADD_TAGS,e7)),e.ADD_ATTR&&(L===K&&(L=eI(L)),eC(L,e.ADD_ATTR,e7)),e.ADD_URI_SAFE_ATTR&&eC(eX,e.ADD_URI_SAFE_ATTR,e7),e.FORBID_CONTENTS&&(eM===eL&&(eM=eI(eM)),eC(eM,e.FORBID_CONTENTS,e7)),ec&&(D["#text"]=!0),Y&&eC(D,["html","head","body"]),D.table&&(eC(D,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ek('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ek('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=(n=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===n&&(n=eq(p,l)),null!==n&&"string"==typeof w&&(w=n.createHTML(""));eo&&eo(e),e9=e}},nr=eC({},[...eA,...eP,...eE]),ni=eC({},[...eB,...ez]),no=function(e){let n=v(e);n&&n.tagName||(n={namespaceURI:eZ,tagName:"template"});let t=ep(e.tagName),r=ep(n.tagName);return!!e1[e.namespaceURI]&&(e.namespaceURI===eY?n.namespaceURI===eQ?"svg"===t:n.namespaceURI===eV?"svg"===t&&("annotation-xml"===r||e8[r]):!!nr[t]:e.namespaceURI===eV?n.namespaceURI===eQ?"math"===t:n.namespaceURI===eY?"math"===t&&e3[r]:!!ni[t]:e.namespaceURI===eQ?(n.namespaceURI!==eY||!!e3[r])&&(n.namespaceURI!==eV||!!e8[r])&&!ni[t]&&(e5[t]||!nr[t]):"application/xhtml+xml"===e4&&!!e1[e.namespaceURI])},nl=function(e){eh(r.removed,{element:e});try{v(e).removeChild(e)}catch(n){j(e)}},na=function(e,n){try{eh(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){eh(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e)if(en||et)try{nl(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},nc=function(e){let t=null,r=null;if(Z)e=""+e;else{let n=eg(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===e4&&eZ===eQ&&(e=''+e+"");let o=n?n.createHTML(e):e;if(eZ===eQ)try{t=new m().parseFromString(o,e4)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(eZ,"template",null);try{t.documentElement.innerHTML=e0?w:o}catch(e){}}let l=t.body||t.documentElement;return(e&&r&&l.insertBefore(i.createTextNode(r),l.childNodes[0]||null),eZ===eQ)?I.call(t,Y?"html":"body")[0]:Y?t.documentElement:l},ns=function(e){return _.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},nu=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},nd=function(e){return"function"==typeof s&&e instanceof s};function nf(e,n,t){eu(e,e=>{e.call(r,n,t,e9)})}let nh=function(e){let n=null;if(nf(O.beforeSanitizeElements,e,null),nu(e))return nl(e),!0;let t=e7(e.nodeName);if(nf(O.uponSanitizeElement,e,{tagName:t,allowedTags:D}),G&&e.hasChildNodes()&&!nd(e.firstElementChild)&&ew(/<[/\w!]/g,e.innerHTML)&&ew(/<[/\w!]/g,e.textContent)||7===e.nodeType||G&&8===e.nodeType&&ew(/<[/\w]/g,e.data))return nl(e),!0;if(!D[t]||X[t]){if(!X[t]&&np(t)&&(J.tagNameCheck instanceof RegExp&&ew(J.tagNameCheck,t)||J.tagNameCheck instanceof Function&&J.tagNameCheck(t)))return!1;if(ec&&!eM[t]){let n=v(e)||e.parentNode,t=y(e)||e.childNodes;if(t&&n){let r=t.length;for(let i=r-1;i>=0;--i){let r=g(t[i],!0);r.__removalCount=(e.__removalCount||0)+1,n.insertBefore(r,b(e))}}}return nl(e),!0}return e instanceof u&&!no(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&ew(/<\/no(script|embed|frames)/i,e.innerHTML)?(nl(e),!0):(q&&3===e.nodeType&&(n=e.textContent,eu([A,P,E],e=>{n=ej(n,e," ")}),e.textContent!==n&&(eh(r.removed,{element:e.cloneNode()}),e.textContent=n)),nf(O.afterSanitizeElements,e,null),!1)},nm=function(e,n,t){if(ei&&("id"===n||"name"===n)&&(t in i||t in ne))return!1;if(V&&!U[n]&&ew(B,n));else if(F&&ew(z,n));else if(!L[n]||U[n]){if(!(np(e)&&(J.tagNameCheck instanceof RegExp&&ew(J.tagNameCheck,e)||J.tagNameCheck instanceof Function&&J.tagNameCheck(e))&&(J.attributeNameCheck instanceof RegExp&&ew(J.attributeNameCheck,n)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(n,e))||"is"===n&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&ew(J.tagNameCheck,t)||J.tagNameCheck instanceof Function&&J.tagNameCheck(t))))return!1}else if(eX[n]);else if(ew($,ej(t,N,"")));else if(("src"===n||"xlink:href"===n||"href"===n)&&"script"!==e&&0===eb(t,"data:")&&eK[e]);else if(H&&!ew(T,ej(t,N,"")));else if(t)return!1;return!0},np=function(e){return"annotation-xml"!==e&&eg(e,R)},nx=function(e){nf(O.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||nu(e))return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},o=t.length;for(;o--;){let{name:l,namespaceURI:a,value:c}=t[o],s=e7(l),u="value"===l?c:ey(c);if(i.attrName=s,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,nf(O.uponSanitizeAttribute,e,i),u=i.attrValue,el&&("id"===s||"name"===s)&&(na(l,e),u="user-content-"+u),G&&ew(/((--!?|])>)|<\/(style|title|textarea)/i,u)||"attributename"===s&&eg(u,"href")){na(l,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr||!W&&ew(/\/>/i,u)){na(l,e);continue}q&&eu([A,P,E],e=>{u=ej(u,e," ")});let d=e7(e.nodeName);if(!nm(d,s,u)){na(l,e);continue}if(n&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(a);else switch(p.getAttributeType(d,s)){case"TrustedHTML":u=n.createHTML(u);break;case"TrustedScriptURL":u=n.createScriptURL(u)}if(u!==c)try{a?e.setAttributeNS(a,l,u):e.setAttribute(l,u),nu(e)?nl(e):ef(r.removed)}catch(n){na(l,e)}}nf(O.afterSanitizeAttributes,e,null)},ng=function e(n){let t=null,r=ns(n);for(nf(O.beforeSanitizeShadowDOM,n,null);t=r.nextNode();)nf(O.uponSanitizeShadowNode,t,null),nh(t),nx(t),t.content instanceof a&&e(t.content);nf(O.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,l=null,c=null,u=null;if((e0=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!nd(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw ek("dirty is not a string, aborting")}else throw ek("toString is not a function");if(!r.isSupported)return e;if(Q||nt(t),r.removed=[],"string"==typeof e&&(es=!1),es){if(e.nodeName){let n=e7(e.nodeName);if(!D[n]||X[n])throw ek("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)1===(l=(i=nc("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?i=l:i.appendChild(l);else{if(!en&&!q&&!Y&&-1===e.indexOf("<"))return n&&er?n.createHTML(e):e;if(!(i=nc(e)))return en?null:er?w:""}i&&Z&&nl(i.firstChild);let d=ns(es?e:i);for(;c=d.nextNode();)nh(c),nx(c),c.content instanceof a&&ng(c.content);if(es)return e;if(en){if(et)for(u=C.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(L.shadowroot||L.shadowrootmode)&&(u=S.call(o,u,!0)),u}let f=Y?i.outerHTML:i.innerHTML;return Y&&D["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ew(eH,i.ownerDocument.doctype.name)&&(f="\n"+f),q&&eu([A,P,E],e=>{f=ej(f,e," ")}),n&&er?n.createHTML(f):f},r.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};nt(e),Q=!0},r.clearConfig=function(){e9=null,Q=!1},r.isValidAttribute=function(e,n,t){return e9||nt({}),nm(e7(e),e7(n),t)},r.addHook=function(e,n){"function"==typeof n&&eh(O[e],n)},r.removeHook=function(e,n){if(void 0!==n){let t=ed(O[e],n);return -1===t?void 0:em(O[e],t,1)[0]}return ef(O[e])},r.removeHooks=function(e){O[e]=[]},r.removeAllHooks=function(){O=eG()},r}(),eQ=["b","blockquote","br","center","code","dd","del","div","dl","dt","em","font","h1","h2","h3","h4","h5","h6","hr","i","ins","li","menu","ol","p","pre","span","strong","table","tbody","td","th","thead","tfoot","tr","u","ul"],eZ=["img"],e0=["class","style","background"];function e1(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&(0,i.jsx)(a.BJ.Item,{children:(0,i.jsx)(a.wn,{fill:!0,title:"Page ".concat(s+1,"/").concat(t.length),textAlign:"center",children:(0,i.jsxs)(a.BJ,{children:[(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Previous",fontSize:"150%",icon:"arrow-left",lineHeight:2,disabled:s<=0,onClick:function(){return u(s-1)}})}),(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Next",fontSize:"150%",icon:"arrow-right",lineHeight:2,disabled:s>=t.length-1,onClick:function(){return u(s+1)}})})]})})}),(0,i.jsxs)(a.BJ.Item,{children:[(0,i.jsx)("h1",{children:d.title&&d.title}),(0,i.jsx)("div",{className:"LoreConsole__entryText",dangerouslySetInnerHTML:{__html:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eQ,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:eZ;return n&&(t=t.concat(i)),eY.sanitize(e,{ALLOWED_TAGS:t,FORBID_ATTR:r})}(Z(d.body,{breaks:!0,smartypants:!0,smartLists:!0,baseUrl:"thisshouldbreakhttp"}))}})]})]})})}},5531:function(e,n,t){"use strict";t.r(n),t.d(n,{MODsuit:()=>_,MODsuitContent:()=>k});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,r.jsxs)(o.XI.Cell,{textAlign:"center",children:[(0,r.jsx)(o.$n,{onClick:function(){return t("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:j(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,r.jsx)(o.$n,{onClick:function(){return h(e.ref)},icon:"cog",selected:f===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===Object.keys(e.configuration_data).length}),(0,r.jsx)(o.$n,{onClick:function(){return t("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,r.jsx)(o.az,{children:e.description})]})})},e.ref)})||(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{textAlign:"center",children:"No Modules Detected"})})})})},k=function(){var e=(0,l.Oc)().data.interface_break;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!e,children:!!e&&(0,r.jsx)(p,{})||(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(b,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(y,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(v,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(w,{})})]})})},_=function(){var e=(0,l.Oc)().data.ui_theme;return(0,r.jsx)(a.p8,{theme:e,width:400,height:620,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(k,{})})})})}},5247:function(e,n,t){"use strict";t.r(n),t.d(n,{MagnetController:()=>d});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Set(["metal","glass"]),c=function(){return(0,r.jsx)(l.p8,{width:300,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s,{})})})},s=function(){return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metals",children:(0,r.jsxs)(i.XI,{className:"materials-table",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{header:!0,pl:"0.5rem",py:"0.5rem",children:"Material"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Sheets"}),(0,r.jsx)(u,{})]}),(0,r.jsx)(d,{})]})})},u=function(){if((0,o.Oc)().data.showPoints)return(0,r.jsx)(i.XI.Cell,{header:!0,children:"Points"})},d=function(){return(0,o.Oc)().data.materials.filter(function(e){return e.amount>=1||a.has(e.id)}).map(function(e){return(0,r.jsx)(f,{material:e},e.id)})},f=function(e){var n=e.material,t=n.id,l=n.amount,a=(0,o.Oc)().data,c=a.icon,s=a.showPoints,u=a.staticMaterials[t],d=u.iconState,f=u.name,h=u.points;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsxs)(i.XI.Cell,{children:[d?(0,r.jsx)(i.Hg,{icon:c,icon_state:d,verticalAlign:"middle"}):(0,r.jsx)(i.In,{name:"sheet-plastic",verticalAlign:"middle"}),null!=f?f:t]}),(0,r.jsx)(i.XI.Cell,{color:l>=1?"good":"gray",children:l}),!!s&&h&&(0,r.jsx)(i.XI.Cell,{children:h})]})}},2433:function(e,n,t){"use strict";t.r(n),t.d(n,{MechBayConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.recharge_port,c=a&&a.mech,s=c&&c.cell,u=c&&c.name;return(0,r.jsx)(l.p8,{width:400,height:155,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Sync",onClick:function(){return t("reconnect")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||(0,r.jsx)(i.z2,{value:c.health/c.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||!s&&(0,r.jsx)(i.IC,{children:"No cell is installed."})||(0,r.jsxs)(i.z2,{value:s.charge/s.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,r.jsx)(i.zv,{value:s.charge})," / "+s.maxcharge]})})]})})})})}},3763:function(e,n,t){"use strict";t.r(n),t.d(n,{MechaControlConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.beacons,u=c.stored_data;return u.length?(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Log",buttons:(0,r.jsx)(i.$n,{icon:"window-close",onClick:function(){return t("clear_log")}}),children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{color:"label",children:["(",e.time,")"]}),(0,r.jsx)(i.az,{children:(0,o.jT)(e.message)})]},e.time)})})})}):(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:s.length&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"comment",onClick:function(){return t("send_message",{mt:e.uid})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"eye",onClick:function(){return t("get_log",{mt:e.uid})},children:"View Log"}),(0,r.jsx)(i.$n.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return t("shock",{mt:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{ranges:{good:[.75*e.maxHealth,1/0],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-1/0,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:e.cell&&(0,r.jsx)(i.z2,{ranges:{good:[.75*e.cellMaxCharge,1/0],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-1/0,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,r.jsx)(i.IC,{children:"No Cell Installed"})}),(0,r.jsxs)(i.Ki.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,r.jsx)(i.Ki.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,o.Sn)(e.location)||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,r.jsx)(i.Ki.Item,{label:"Cargo Space",children:(0,r.jsx)(i.z2,{ranges:{bad:[.75*e.cargoMax,1/0],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-1/0,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)})||(0,r.jsx)(i.IC,{children:"No mecha beacons found."})})})}},9548:function(e,n,t){"use strict";t.r(n),t.d(n,{MedicalRecords:()=>b});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4900),s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.product,c=e.productImage,s=e.productCategory,u=i.user_money;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"32px",margin:"0px"}})}),(0,r.jsx)(o.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(o.$n,{disabled:a.price>u,icon:"shopping-cart",content:a.price,textAlign:"left",onClick:function(){return t("purchase",{name:a.name,category:s})}})})]})},u=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default).tabIndex,a=n.products,u=n.imagelist,d=["apparel","toy","decoration"];return(0,r.jsx)(o.XI,{children:a[d[t]].map(function(e){return(0,r.jsx)(s,{product:e,productImage:u[e.path],productCategory:d[t]},e.name)})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,s=i.user_cash,d=i.inserted_cash;return(0,r.jsx)(a.p8,{title:"Merch Computer",width:450,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:"User",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,r.jsx)("b",{children:d})," credits inserted."]}),(0,r.jsx)(o.$n,{disabled:!d,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return t("change")}})]}),children:(0,r.jsxs)(o.BJ.Item,{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!==s&&(0,r.jsxs)(o.az,{mt:"0.5rem",children:["Your balance is ",(0,r.jsxs)("b",{children:[s||0," credits"]}),"."]})]})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsxs)(c.default.Default,{tabIndex:1,children:[(0,r.jsx)(f,{}),(0,r.jsx)(u,{})]})})})]})})})},f=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default),a=t.tabIndex,s=t.setTabIndex;return n.login_state,(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{icon:"dice",selected:1===a,onClick:function(){return s(1)},children:"Toys"}),(0,r.jsx)(o.tU.Tab,{icon:"flag",selected:2===a,onClick:function(){return s(2)},children:"Decorations"})]})}},6231:function(e,n,t){"use strict";t.r(n),t.d(n,{MiningVendor:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e[1].price,e[1]}).sort(d[h]);if(0!==t.length)return m&&(t=t.reverse()),g=!0,(0,r.jsx)(x,{title:e[0],items:t,gridLayout:u},e[0])});return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:g?j:(0,r.jsx)(o.az,{color:"label",children:"No items matching your criteria was found!"})})})},p=function(e){var n=e.gridLayout,t=e.setGridLayout,i=e.setSearchText,l=e.sortOrder,a=e.setSortOrder,c=e.descending,s=e.setDescending;return(0,r.jsx)(o.az,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{fluid:!0,mt:.2,placeholder:"Search by item name..",onChange:function(e){return i(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:n?"list":"table-cells-large",height:1.75,tooltip:n?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){return t(!n)}})}),(0,r.jsx)(o.BJ.Item,{basis:"30%",children:(0,r.jsx)(o.ms,{selected:l,options:Object.keys(d),width:"100%",onSelected:function(e){return a(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:c?"arrow-down":"arrow-up",height:1.75,tooltip:c?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){return s(!c)}})})]})})},x=function(e){var n,t,i=(0,a.Oc)(),l=i.act,c=i.data,s=e.title,u=e.items,d=e.gridLayout,f=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["title","items","gridLayout"]);return(0,r.jsx)(o.Nt,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.gamestatus,s=a.cand_name,u=a.cand_birth,d=a.cand_age,f=a.cand_species,h=a.cand_planet,m=a.cand_job,p=a.cand_records,x=a.cand_curriculum,g=a.total_curriculums,j=a.reason;return 0===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,r.jsx)(i.BJ.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return t("start_game")}}),(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return t("instructions")}})]})]})})}):1===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,color:"grey",title:"Guide",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss ",(0,r.jsx)("b",{children:g})," candidates, one wrongly made choice leads to a game over."]}),(0,r.jsx)(i.Ki.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,r.jsxs)(i.Ki.Item,{label:"3#",color:"silver",children:[(0,r.jsx)("b",{children:"Unique"})," characters may appear, pay attention to them!"]}),(0,r.jsx)(i.Ki.Item,{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,r.jsxs)(i.Ki.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,r.jsx)("b",{children:"company morals"}),"!"]}),(0,r.jsx)(i.Ki.Item,{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,r.jsxs)(i.Ki.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,r.jsx)("b",{children:"typos"})," and ",(0,r.jsx)("b",{children:"missing words"}),", these do make for bad applications!"]}),(0,r.jsxs)(i.Ki.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for"," ",(0,r.jsx)("b",{children:"jobs"})," that they ",(0,r.jsx)("b",{children:"don't offer"}),"!"]}),(0,r.jsxs)(i.Ki.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,r.jsx)("b",{children:"naming schemes"}),", no company wants a Vox named Joe!"]}),(0,r.jsxs)(i.Ki.Item,{label:"10#",color:"silver",children:["For some unknown reason ",(0,r.jsx)("b",{children:"clowns"})," are never denied by the company, no matter what."]})]})})})})}):2===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,r.jsxs)(i.az,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",x]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",color:"silver",children:(0,r.jsx)("b",{children:s})}),(0,r.jsx)(i.Ki.Item,{label:"Species",color:"silver",children:(0,r.jsx)("b",{children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Age",color:"silver",children:(0,r.jsx)("b",{children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Date of Birth",color:"silver",children:(0,r.jsx)("b",{children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Planet of Origin",color:"silver",children:(0,r.jsx)("b",{children:h})}),(0,r.jsx)(i.Ki.Item,{label:"Requested Job",color:"silver",children:(0,r.jsx)("b",{children:m})}),(0,r.jsx)(i.Ki.Item,{label:"Employment Records",color:"silver",children:(0,r.jsx)("b",{children:p})})]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){return t("dismiss")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return t("hire")}})})]})})})]})})}):3===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{pt:"40%",fill:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,r.jsx)(i.BJ.Item,{fontSize:"15px",color:"label",textAlign:"center",children:j}),(0,r.jsxs)(i.BJ.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",x-1,"/",g]})]})}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}})})]})})}):void 0}},452:function(e,n,t){"use strict";t.r(n),t.d(n,{Newscaster:()=>v});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(421),s=t(3384),u=t(4744),d=t(7482);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||g(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}}var j=["security","engineering","medical","science","service","supply"],b={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"}},y=(0,i.createContext)(null),v=function(e){var n,t=(0,a.Oc)(),c=t.act,f=t.data,h=f.is_security,m=f.is_admin,p=f.is_silent,g=f.is_printing,j=f.screen,b=f.channels,v=f.channel_idx,C=void 0===v?-1:v,I=x((0,i.useState)(!1),2),O=I[0],A=I[1],P=x((0,i.useState)(""),2),E=P[0],B=P[1],z=x((0,i.useState)(!1),2),T=z[0],N=z[1],R=x((0,i.useState)([]),2),$=R[0],D=R[1];0===j||2===j?n=(0,r.jsx)(k,{}):1===j&&(n=(0,r.jsx)(_,{}));var M=b.reduce(function(e,n){return e+n.unread},0);return(0,r.jsxs)(s.p8,{theme:h&&"security",width:800,height:600,children:[(0,r.jsx)(y.Provider,{value:{viewingPhoto:E,setViewingPhoto:B},children:E?(0,r.jsx)(S,{}):(0,r.jsx)(u.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"})}),(0,r.jsx)(s.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.wn,{fill:!0,className:(0,l.Ly)(["Newscaster__menu",O&&"Newscaster__menu--open"]),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(w,{icon:"bars",title:"Toggle Menu",onClick:function(){return A(!O)}}),(0,r.jsx)(w,{icon:"newspaper",title:"Headlines",selected:0===j,onClick:function(){return c("headlines")},children:M>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:M>=10?"9+":M})}),(0,r.jsx)(w,{icon:"briefcase",title:"Job Openings",selected:1===j,onClick:function(){return c("jobs")}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:b.map(function(e){return(0,r.jsx)(w,{icon:e.icon,title:e.name,selected:2===j&&b[C-1]===e,onClick:function(){return c("channel",{uid:e.uid})},children:e.unread>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)})}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.cG,{}),(!!h||!!m)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("wanted_notice")}}),(0,r.jsx)(w,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return N(!T)}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(w,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("create_story")}}),(0,r.jsx)(w,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,u.modalOpen)("create_channel")}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(w,{icon:g?"spinner":"print",iconSpin:g,title:g?"Printing...":"Print Newspaper",onClick:function(){return c("print_newspaper")}}),(0,r.jsx)(w,{icon:p?"volume-mute":"volume-up",title:"Mute: "+(p?"On":"Off"),onClick:function(){return c("toggle_mute")}})]})]})}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,width:"100%",children:[(0,r.jsx)(d.TemporaryNotice,{}),(0,r.jsx)(y.Provider,{value:{viewingPhoto:E,setViewingPhoto:B,censorMode:T,fullStories:$,setFullStories:D},children:n})]})]})})]})},w=function(e){(0,a.Oc)().act;var n=e.icon,t=e.iconSpin,i=e.selected,c=void 0!==i&&i,s=e.security,u=e.onClick,d=e.title,f=e.children,x=p(e,["icon","iconSpin","selected","security","onClick","title","children"]);return(0,r.jsxs)(o.BJ,m(h({align:"center",className:(0,l.Ly)(["Newscaster__menuButton",c&&"Newscaster__menuButton--selected",void 0!==s&&s&&"Newscaster__menuButton--security"]),onClick:u},x),{children:[(0,r.jsxs)(o.BJ.Item,{children:[c&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--selectedBar"}),(0,r.jsx)(o.In,{name:void 0===n?"":n,spin:t,size:"2"})]}),(0,r.jsx)(o.BJ.Item,{className:"Newscaster__menuButton--title",children:d}),f]}))},k=function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.screen,s=l.is_admin,d=l.channel_idx,f=l.channel_can_manage,p=l.channels,x=l.stories,g=l.wanted,j=(0,i.useContext)(y),b=j.fullStories,v=j.censorMode,w=2===c&&d>-1?p[d-1]:null;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!g&&(0,r.jsx)(C,{story:g,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:w?w.icon:"newspaper",mr:"0.5rem"}),w?w.name:"Headlines"]}),children:x.length>0?x.slice().reverse().map(function(e){return!b.includes(e.uid)&&e.body.length+3>128?m(h({},e),{body_short:e.body.substr(0,124)+"..."}):e}).map(function(e,n){return(0,r.jsx)(C,{story:e},n)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no stories at this time."]})}),!!w&&(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,height:"40%",title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"info-circle",mr:"0.5rem"}),"About"]}),buttons:(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)(o.$n,{disabled:!!w.admin&&!s,selected:w.censored,icon:w.censored?"comment-slash":"comment",content:w.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return t("censor_channel",{uid:w.uid})}}),(0,r.jsx)(o.$n,{disabled:!f,icon:"cog",content:"Manage",onClick:function(){return(0,u.modalOpen)("manage_channel",{uid:w.uid})}})]}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:w.description||"N/A"}),(0,r.jsx)(o.Ki.Item,{label:"Owner",children:w.author||"N/A"}),!!s&&(0,r.jsx)(o.Ki.Item,{label:"Ckey",children:w.author_ckey}),(0,r.jsx)(o.Ki.Item,{label:"Public",children:w.public?"Yes":"No"}),(0,r.jsxs)(o.Ki.Item,{label:"Total Views",children:[(0,r.jsx)(o.In,{name:"eye",mr:"0.5rem"}),x.reduce(function(e,n){return e+n.view_count},0).toLocaleString()]})]})})]})},_=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),i=t.jobs,c=t.wanted,s=Object.entries(i).reduce(function(e,n){var t=x(n,2);return e+(t[0],t[1]).length},0);return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(C,{story:c,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,m:0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"briefcase",mr:"0.5rem"}),"Job Openings"]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:s>0?j.map(function(e){return Object.assign({},b[e],{id:e,jobs:i[e]})}).filter(function(e){return!!e&&e.jobs.length>0}).map(function(e){return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map(function(e){return(0,r.jsxs)(o.az,{class:(0,l.Ly)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["• ",e.title]},e.title)})},e.id)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no openings at this time."]})}),(0,r.jsxs)(o.wn,{height:"17%",children:["Interested in serving Nanotrasen?",(0,r.jsx)("br",{}),"Sign up for any of the above position now at the ",(0,r.jsx)("b",{children:"Head of Personnel's Office!"}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{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."})]})]})},C=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=e.story,d=e.wanted,h=void 0!==d&&d,m=s.is_admin,p=(0,i.useContext)(y),x=p.fullStories,j=p.setFullStories,b=p.censorMode;return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__story",h&&"Newscaster__story--wanted"]),title:(0,r.jsxs)(r.Fragment,{children:[h&&(0,r.jsx)(o.In,{name:"exclamation-circle",mr:"0.5rem"}),2&u.censor_flags&&"[REDACTED]"||u.title||"News from "+u.author]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",children:(0,r.jsxs)(o.az,{color:"label",children:[!h&&b&&(0,r.jsx)(o.az,{inline:!0,children:(0,r.jsx)(o.$n,{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 t("censor_story",{uid:u.uid})}})}),(0,r.jsxs)(o.az,{inline:!0,children:[(0,r.jsx)(o.In,{name:"user"})," ",u.author," |\xa0",!!m&&(0,r.jsxs)(r.Fragment,{children:["ckey: ",u.author_ckey," |\xa0"]}),!h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"eye"})," ",u.view_count.toLocaleString()," |\xa0"]}),(0,r.jsx)(o.In,{name:"clock"})," ",(0,c.fF)(u.publish_time,s.world_time)]})]})}),children:(0,r.jsx)(o.az,{children:2&u.censor_flags?"[REDACTED]":(0,r.jsxs)(r.Fragment,{children:[!!u.has_photo&&(0,r.jsx)(I,{name:"story_photo_"+u.uid+".png",style:{float:"right"},ml:"0.5rem"}),(u.body_short||u.body).split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),u.body_short&&(0,r.jsx)(o.$n,{content:"Read more..",mt:"0.5rem",onClick:function(){return j(((function(e){if(Array.isArray(e))return f(e)})(x)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(x)||g(x)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u.uid]))}}),(0,r.jsx)(o.az,{clear:"right"})]})})})},I=function(e){var n=e.name,t=p(e,["name"]),l=(0,i.useContext)(y).setViewingPhoto;return(0,r.jsx)(o.az,h({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},t))},S=function(e){var n=(0,i.useContext)(y),t=n.viewingPhoto,l=n.setViewingPhoto;return(0,r.jsxs)(o.aF,{className:"Newscaster__photoZoom",children:[(0,r.jsx)(o.az,{as:"img",src:t}),(0,r.jsx)(o.$n,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return l("")}})]})},O=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),l=!!e.args.uid&&t.channels.filter(function(n){return n.uid===e.args.uid}).pop();if("manage_channel"===e.id&&!l)return void(0,u.modalClose)();var c="manage_channel"===e.id,s=!!e.args.is_admin,d=e.args.scanned_user,f=x((0,i.useState)((null==l?void 0:l.author)||d||"Unknown"),2),h=f[0],m=f[1],p=x((0,i.useState)((null==l?void 0:l.name)||""),2),g=p[0],j=p[1],b=x((0,i.useState)((null==l?void 0:l.description)||""),2),y=b[0],v=b[1],w=x((0,i.useState)((null==l?void 0:l.icon)||"newspaper"),2),k=w[0],_=w[1],C=x((0,i.useState)(!!c&&!!(null==l?void 0:l.public)),2),I=C[0],S=C[1],O=x((0,i.useState)((null==l?void 0:l.admin)===1),2),A=O[0],P=O[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:c?"Manage "+l.name:"Create New Channel",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Owner",children:(0,r.jsx)(o.pd,{disabled:!s,width:"100%",value:h,onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:g,onChange:function(e){return j(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:y,onChange:function(e){return v(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Icon",children:[(0,r.jsx)(o.pd,{disabled:!s,value:k,width:"35%",mr:"0.5rem",onChange:function(e){return _(e)}}),(0,r.jsx)(o.In,{name:k,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,r.jsx)(o.Ki.Item,{label:"Accept Public Stories?",children:(0,r.jsx)(o.$n,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"Yes":"No",onClick:function(){return S(!I)}})}),s&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:A,icon:A?"lock":"lock-open",content:A?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return P(!A)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===h.trim().length||0===g.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:h,name:g.substr(0,49),description:y.substr(0,128),icon:k,public:+!!I,admin_locked:+!!A})}})]})};(0,u.modalRegisterBodyOverride)("create_channel",O),(0,u.modalRegisterBodyOverride)("manage_channel",O),(0,u.modalRegisterBodyOverride)("create_story",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.channels,d=l.channel_idx,f=void 0===d?-1:d,h=!!e.args.is_admin,m=e.args.scanned_user,p=s.slice().sort(function(e,n){if(f<0)return 0;var t=s[f-1];return t.uid===e.uid?-1:t.uid===n.uid?1:void 0}).filter(function(e){return h||!e.frozen&&(e.author===m||!!e.public)}),g=x((0,i.useState)(m||"Unknown"),2),j=g[0],b=g[1],y=x((0,i.useState)(p.length>0?p[0].name:""),2),v=y[0],w=y[1],k=x((0,i.useState)(""),2),_=k[0],C=k[1],S=x((0,i.useState)(""),2),O=S[0],A=S[1],P=x((0,i.useState)(!1),2),E=P[0],B=P[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.pd,{disabled:!h,width:"100%",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Channel",verticalAlign:"top",children:(0,r.jsx)(o.ms,{selected:v,options:p.map(function(e){return e.name}),mb:"0",width:"100%",onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.Ki.Divider,{}),(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:_,onChange:function(e){return C(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Story Text",verticalAlign:"top",children:(0,r.jsx)(o.pd,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:O,onChange:function(e){return A(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return t(c?"eject_photo":"attach_photo")}})}),(0,r.jsx)(o.Ki.Item,{label:"Preview",verticalAlign:"top",children:(0,r.jsx)(o.wn,{noTopPadding:!0,title:_,maxHeight:"13.5rem",overflow:"auto",children:(0,r.jsxs)(o.az,{mt:"0.5rem",children:[!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}}),O.split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),(0,r.jsx)(o.az,{clear:"right"})]})})}),h&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:E,icon:E?"lock":"lock-open",content:E?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return B(!E)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===j.trim().length||0===v.trim().length||0===_.trim().length||0===O.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)("create_story","",{author:j,channel:v,title:_.substr(0,127),body:O.substr(0,1023),admin_locked:+!!E})}})]})}),(0,u.modalRegisterBodyOverride)("wanted_notice",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.wanted,d=!!e.args.is_admin,f=e.args.scanned_user,h=x((0,i.useState)((null==s?void 0:s.author)||f||"Unknown"),2),m=h[0],p=h[1],g=x((0,i.useState)((null==s?void 0:s.title.substr(8))||""),2),j=g[0],b=g[1],y=x((0,i.useState)((null==s?void 0:s.body)||""),2),v=y[0],w=y[1],k=x((0,i.useState)((null==s?void 0:s.admin_locked)===1),2),_=k[0],C=k[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Authority",children:(0,r.jsx)(o.pd,{disabled:!d,width:"100%",value:m,onChange:function(e){return p(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",value:j,maxLength:"128",onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onChange:function(e){return w(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return t(c?"eject_photo":"attach_photo")}}),!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}})]}),d&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:_,icon:_?"lock":"lock-open",content:_?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return C(!_)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:!s,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){t("clear_wanted_notice"),(0,u.modalClose)()}}),(0,r.jsx)(o.$n.Confirm,{disabled:0===m.trim().length||0===j.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:m,name:j.substr(0,127),description:v.substr(0,511),admin_locked:+!!_})}})]})})},6563:function(e,n,t){"use strict";t.r(n),t.d(n,{Noticeboard:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.papers;return(0,r.jsx)(a.p8,{width:600,height:300,theme:"noticeboard",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,children:c.map(function(e){return(0,r.jsx)(i.BJ.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){return t("interact",{paper:e.ref})},onContextMenu:function(n){n.preventDefault(),t("showFull",{paper:e.ref})},children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,fontSize:.75,title:e.name,children:(0,o.jT)(e.contents)})},e.ref)})})})})}},5867:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearBomb:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return a.extended?(0,r.jsx)(l.p8,{width:350,height:290,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Auth Disk",children:(0,r.jsx)(i.$n,{icon:a.authdisk?"eject":"id-card",selected:a.authdisk,content:a.diskname?a.diskname:"-----",tooltip:a.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return t("auth")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auth Code",children:(0,r.jsx)(i.$n,{icon:"key",disabled:!a.authdisk,selected:a.authcode,content:a.codemsg,onClick:function(){return t("code")}})})]})}),(0,r.jsx)(i.wn,{title:"Arming & Disarming",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Bolted to floor",children:(0,r.jsx)(i.$n,{icon:a.anchored?"check":"times",selected:a.anchored,disabled:!a.authdisk,content:a.anchored?"YES":"NO",onClick:function(){return t("toggle_anchor")}})}),(0,r.jsx)(i.Ki.Item,{label:"Time Left",children:(0,r.jsx)(i.$n,{icon:"stopwatch",content:a.time,disabled:!a.authfull,tooltip:"Set Timer",onClick:function(){return t("set_time")}})}),(0,r.jsx)(i.Ki.Item,{label:"Safety",children:(0,r.jsx)(i.$n,{icon:a.safety?"check":"times",selected:a.safety,disabled:!a.authfull,content:a.safety?"ON":"OFF",tooltip:a.safety?"Disable Safety":"Enable Safety",onClick:function(){return t("toggle_safety")}})}),(0,r.jsx)(i.Ki.Item,{label:"Arm/Disarm",children:(0,r.jsx)(i.$n,{icon:(a.timer,"bomb"),disabled:a.safety||!a.authfull,color:"red",content:a.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return t("toggle_armed")}})})]})})]})}):(0,r.jsx)(l.p8,{width:350,height:115,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Deployment",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return t("deploy")}})})})})}},7579:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearRodFabricator:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:p.neighbor_requirements.map(function(e,n){return(0,r.jsx)(o.az,{children:e},n)})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:"None"})]})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.wn,{title:"Required Materials",children:p.materials&&0!==Object.keys(p.materials).length?(0,r.jsx)(o.XI,{children:Object.entries(p.materials).map(function(e,n){var t=s(e,2),i=t[0],l=t[1],a=Object.entries(f.resources||{}).find(function(e){var n=s(e,2),t=n[0];return n[1],t===i}),c=(a?a[1].amount:0)>=l;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,className:c?null:"color-red",children:i}),(0,r.jsx)(o.XI.Cell,{className:c?null:"color-red",children:l}),(0,r.jsxs)(o.XI.Cell,{className:c?null:"color-red",children:["(",Math.round(l/2e3)," sheets)"]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials required."})}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{icon:"wrench",content:"Fabricate",color:"good",onClick:function(){return h("fabricate_rod",{type_path:p.type_path})}})]})]})})]}),v===d&&(0,r.jsx)(o.wn,{title:"Material Storage",fill:!0,children:f.resources&&0!==Object.keys(f.resources).length?(0,r.jsx)(o.XI,{children:Object.entries(f.resources).map(function(e,n){var t=s(e,2),i=t[0],l=t[1];return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,children:i}),(0,r.jsxs)(o.XI.Cell,{children:[l.amount," units"]}),(0,r.jsxs)(o.XI.Cell,{children:["(",l.sheets," sheets)"]}),(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.$n,{content:"1",onClick:function(){return h("eject_material",{id:l.id,amount:"1"})}}),(0,r.jsx)(o.$n,{content:"C",onClick:function(){return h("eject_material",{id:l.id,amount:"custom"})}}),l.sheets>=5&&(0,r.jsx)(o.$n,{content:"5",onClick:function(){return h("eject_material",{id:l.id,amount:"5"})}}),(0,r.jsx)(o.$n,{content:"All",onClick:function(){return h("eject_material",{id:l.id,amount:l.sheets.toString()})}})]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials loaded."})})]})]})})})}},8007:function(e,n,t){"use strict";t.r(n),t.d(n,{NumberInputModal:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&x?5:0);return(0,r.jsxs)(c.p8,{title:y,width:270,height:_,children:[b&&(0,r.jsx)(u.Loader,{value:b}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.Ri&&f("submit",{entry:w}),n===l.s6&&f("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(h,{input:w,onClick:function(e){e!==w&&k(e)},onChange:function(e){e!==w&&k(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})})})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.min_value,c=i.max_value,s=i.init_value,u=i.round_value,d=e.input,f=e.onClick,h=e.onChange,m=Math.round(d!==l?Math.max(d/2,l):c/2),p=d===l&&l>0||1===d;return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===l,icon:"angle-double-left",onClick:function(){return f(l)},tooltip:d===l?"Min":"Min (".concat(l,")")})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.SM,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!u,minValue:l,maxValue:c,value:d,onChange:h,onEnter:function(e){return t("submit",{entry:e})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===c,icon:"angle-double-right",onClick:function(){return f(c)},tooltip:d===c?"Max":"Max (".concat(c,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:p,icon:"divide",onClick:function(){return f(m)},tooltip:p?"Split":"Split (".concat(m,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===s,icon:"redo",onClick:function(){return f(s)},tooltip:s?"Reset (".concat(s,")"):"Reset"})})]})}},4965:function(e,n,t){"use strict";t.r(n),t.d(n,{ObjAccessModifier:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(9281),a=function(){return(0,r.jsx)(o.p8,{width:500,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(l.ChooseAccess,{})})})})}},6499:function(e,n,t){"use strict";t.r(n),t.d(n,{OperatingComputer:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],c=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,1/0]},u=["bad","average","average","good","average","average","bad"],d=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.hasOccupant,u=c.choice;return n=u?(0,r.jsx)(m,{}):s?(0,r.jsx)(f,{}):(0,r.jsx)(h,{}),(0,r.jsx)(l.p8,{width:650,height:455,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:!u,icon:"user",onClick:function(){return a("choiceOff")},children:"Patient"}),(0,r.jsx)(i.tU.Tab,{selected:!!u,icon:"cog",onClick:function(){return a("choiceOn")},children:"Options"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:n})})]})})})},f=function(e){var n=(0,o.Oc)().data.occupant,t=n.activeSurgeries;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Patient",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:n.name}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:a[n.stat][0],children:a[n.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),c.map(function(e,t){return(0,r.jsx)(i.Ki.Item,{label:e[0]+" Damage",children:(0,r.jsx)(i.z2,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:Math.round(n[e[1]])},t)},t)}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:u[n.temperatureSuitability+3],children:[Math.round(n.btCelsius),"\xb0C, ",Math.round(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",children:[n.pulse," BPM"]})]})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Active surgeries",level:"2",children:n.inSurgery&&t?t.map(function(e,n){return(0,r.jsx)(i.wn,{style:{textTransform:"capitalize"},title:e.name+" ("+e.location+")",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Next Step",children:e.step},n)},n)},n)}):(0,r.jsx)(i.az,{color:"label",children:"No procedure ongoing."})})})]})},h=function(){return(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No patient detected."]})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.verbose,c=l.health,s=l.healthAlarm,u=l.oxy,d=l.oxyAlarm,f=l.crit;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Loudspeaker",children:(0,r.jsx)(i.$n,{selected:a,icon:a?"toggle-on":"toggle-off",content:a?"On":"Off",onClick:function(){return t(a?"verboseOff":"verboseOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer",children:(0,r.jsx)(i.$n,{selected:c,icon:c?"toggle-on":"toggle-off",content:c?"On":"Off",onClick:function(){return t(c?"healthOff":"healthOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:s,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("health_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm",children:(0,r.jsx)(i.$n,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return t(u?"oxyOff":"oxyOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:d,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("oxy_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Critical Alert",children:(0,r.jsx)(i.$n,{selected:f,icon:f?"toggle-on":"toggle-off",content:f?"On":"Off",onClick:function(){return t(f?"critOff":"critOn")}})})]})}},7701:function(e,n,t){"use strict";t.r(n),t.d(n,{Orbit:()=>j});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn},p=function(e,n){var t=e.name,r=n.name;if(!t||!r)return 0;var i=t.match(f),o=r.match(f);return i&&o&&t.replace(f,"")===r.replace(f,"")?parseInt(i[1],10)-parseInt(o[1],10):m(t,r)},x=function(e){var n=e.searchText,t=e.source,i=e.title,l=e.color,a=e.sorted,c=t.filter(h(n));return a&&c.sort(p),t.length>0&&(0,r.jsx)(o.wn,{title:"".concat(i," - (").concat(t.length,")"),children:c.map(function(e){return(0,r.jsx)(g,{thing:e,color:l},e.name)})})},g=function(e){var n=(0,c.Oc)().act,t=e.color,i=e.thing;return(0,r.jsxs)(o.$n,{color:t,tooltip:i.assigned_role?(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.az,{as:"img",mr:"0.5em",className:(0,l.Ly)(["job_icons16x16",i.assigned_role_sprite])})," ",i.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,r.jsxs)(o.az,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,r.jsx)(o.In,{name:"eye"}),")"]})]})},j=function(e){var n=(0,c.Oc)(),t=n.act,l=n.data,a=l.alive,u=l.antagonists,f=l.highlights,j=l.response_teams,b=l.tourist,y=(l.auto_observe,l.dead),v=l.ssd,w=l.ghosts,k=l.misc,_=l.npcs,C=d((0,i.useState)(""),2),I=C[0],S=C[1],O={},A=!0,P=!1,E=void 0;try{for(var B,z=u[Symbol.iterator]();!(A=(B=z.next()).done);A=!0){var T=B.value;void 0===O[T.antag]&&(O[T.antag]=[]),O[T.antag].push(T)}}catch(e){P=!0,E=e}finally{try{A||null==z.return||z.return()}finally{if(P)throw E}}var N=Object.entries(O);N.sort(function(e,n){return m(e[0],n[0])});var R=function(e){for(var n=0,r=[N.map(function(e){var n=d(e,2);return n[0],n[1]}),b,f,a,w,v,y,_,k];n0&&(0,r.jsx)(o.wn,{title:"Antagonists",children:N.map(function(e){var n=d(e,2),t=n[0],i=n[1];return(0,r.jsx)(o.wn,{title:"".concat(t," - (").concat(i.length,")"),level:2,children:i.filter(h(I)).sort(p).map(function(e){return(0,r.jsx)(g,{color:"bad",thing:e},e.name)})},t)})}),f.length>0&&(0,r.jsx)(x,{title:"Highlights",source:f,searchText:I,color:"teal"}),(0,r.jsx)(x,{title:"Response Teams",source:j,searchText:I,color:"purple"}),(0,r.jsx)(x,{title:"Tourists",source:b,searchText:I,color:"violet"}),(0,r.jsx)(x,{title:"Alive",source:a,searchText:I,color:"good"}),(0,r.jsx)(x,{title:"Ghosts",source:w,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"SSD",source:v,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"Dead",source:y,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"NPCs",source:_,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"Misc",source:k,searchText:I,sorted:!1})]})})}},5802:function(e,n,t){"use strict";t.r(n),t.d(n,{OreRedemption:()=>f});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384);function c(){return(c=Object.assign||function(e){for(var n=1;n0?"good":"grey",bold:a>0&&"good",children:a.toLocaleString("en-US")+" pts"})}),(0,r.jsx)(i.cG,{}),f?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Design disk",children:[(0,r.jsx)(i.$n,{selected:!0,bold:!0,icon:"eject",content:f.name,tooltip:"Ejects the design disk.",onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{disabled:!f.design||!f.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return t("download")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Stored design",children:(0,r.jsx)(i.az,{color:f.design&&(f.compatible?"good":"bad"),children:f.design||"N/A"})})]}):(0,r.jsx)(i.az,{color:"label",children:"No design disk inserted."})]}))},m=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).sheets,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"20%",children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(g,{ore:e},e.id)})]}))})},p=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).alloys,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(j,{ore:e},e.id)})]}))})},x=function(e){var n;return(0,r.jsx)(i.az,{className:"OreHeader",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:e.title}),null==(n=e.columns)?void 0:n.map(function(e){return(0,r.jsx)(i.BJ.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)})]})})},g=function(e){var n=(0,l.Oc)().act,t=e.ore;if(!t.value||!(t.amount<=0)||["metal","glass"].indexOf(t.id)>-1)return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"45%",align:"middle",children:(0,r.jsxs)(i.BJ,{align:"center",children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",t.id])}),(0,r.jsx)(i.BJ.Item,{children:t.name})]})}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",children:t.value}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),step:1,stepPixelSize:6,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})},j=function(e){var n=(0,l.Oc)().act,t=e.ore;return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"7%",align:"middle",children:(0,r.jsx)(i.az,{className:(0,o.Ly)(["alloys32x32",t.id])})}),(0,r.jsx)(i.BJ.Item,{basis:"30%",textAlign:"middle",align:"center",children:t.name}),(0,r.jsx)(i.BJ.Item,{basis:"35%",textAlign:"middle",color:t.amount>=1?"good":"gray",align:"center",children:t.description}),(0,r.jsx)(i.BJ.Item,{basis:"10%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),stepPixelSize:6,step:1,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})}},4235:function(e,n,t){"use strict";t.r(n),t.d(n,{PAI:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(222),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.app_template,u=a.app_icon,d=a.app_title,f=s(c);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{p:1,fill:!0,scrollable:!0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:u,mr:1}),d,"pai_main_menu"!==c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){return t("Back")}}),(0,r.jsx)(i.$n,{content:"Home",icon:"arrow-up",onClick:function(){return t("MASTER_back")}})]})]}),children:(0,r.jsx)(f,{})})})})})})}},2740:function(e,n,t){"use strict";t.r(n),t.d(n,{PDA:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(2721),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=t.app;if(!t.owner)return(0,r.jsx)(l.p8,{width:350,height:105,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var c=s(a.template);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:a.icon,mr:1}),a.name]}),children:(0,r.jsx)(c,{})})}),(0,r.jsx)(i.BJ.Item,{mt:7.5,children:(0,r.jsx)(f,{})})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.idInserted,c=l.idLink,s=l.stationTime,u=l.cartridge_name;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{ml:.5,children:(0,r.jsx)(i.$n,{icon:"id-card",color:"transparent",onClick:function(){return t("Authenticate")},content:a?c:"No ID Inserted"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sd-card",color:"transparent",onClick:function(){return t("Eject")},content:u?["Eject "+u]:"No Cartridge Inserted"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:s})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app;return(0,r.jsx)(i.az,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[!!l.has_back&&(0,r.jsx)(i.BJ.Item,{basis:"33%",mr:-.5,children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return t("Back")}})}),(0,r.jsx)(i.BJ.Item,{basis:l.has_back?"33%":"100%",children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.is_home?"disabled":"white",icon:"home",onClick:function(){t("Home")}})})]})})}},377:function(e,n,t){"use strict";t.r(n),t.d(n,{Pacman:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,u=s.active,d=s.anchored,f=s.broken,h=s.emagged,m=s.fuel_type,p=s.fuel_usage,x=s.fuel_stored,g=s.fuel_cap,j=s.is_ai,b=s.tmp_current,y=s.tmp_max,v=s.tmp_overheat,w=s.output_max,k=s.power_gen,_=s.output_set,C=s.has_fuel,I=Math.round(x/p*2),S=Math.round(I/60);return(0,r.jsx)(c.p8,{width:500,height:225,children:(0,r.jsxs)(c.p8.Content,{children:[(f||!d)&&(0,r.jsxs)(i.wn,{title:"Status",children:[!!f&&(0,r.jsx)(i.az,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!d&&(0,r.jsx)(i.az,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!d&&(0,r.jsxs)("div",{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!C,selected:u,onClick:function(){return t("toggle_power")}}),children:(0,r.jsxs)(i.so,{direction:"row",children:[(0,r.jsx)(i.so.Item,{width:"50%",className:"ml-1",children:(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Power setting",children:[(0,r.jsx)(i.Q7,{value:_,minValue:1,maxValue:w*(h?2.5:1),step:1,className:"mt-1",onChange:function(e){return t("change_power",{change_power:e})}}),"(",(0,o.d5)(_*k),")"]})})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{value:b/y,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[b," ℃"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[v>50&&(0,r.jsx)(i.az,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,r.jsx)(i.az,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,r.jsx)(i.az,{color:"orange",children:"Temperature High"}),0===v&&(0,r.jsx)(i.az,{color:"green",children:"Optimal"})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Fuel",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||j||!C,onClick:function(){return t("eject_fuel")}}),children:(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Fuel level",children:(0,r.jsxs)(i.z2,{value:x/g,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(x/1e3)," dm\xb3"]})})]})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fuel usage",children:[p/1e3," dm\xb3/s"]}),(0,r.jsxs)(i.Ki.Item,{label:"Fuel depletion",children:[!!C&&(p?I>120?"".concat(S," minutes"):"".concat(I," seconds"):"N/A"),!C&&(0,r.jsx)(i.az,{color:"red",children:"Out of fuel"})]})]})})]})})]})]})})}},9454:function(e,n,t){"use strict";t.r(n),t.d(n,{PanDEMIC:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)().data,a=t.reporting,u=t.analyzing,d=t.beakerLoaded,h=t.beakerContainsBlood,m=t.beakerContainsVirus,p=t.resistances,g=void 0===p?[]:p;return d?h?h&&!m&&(n=(0,r.jsx)(r.Fragment,{children:"No disease detected in provided blood sample."})):n=(0,r.jsx)(r.Fragment,{children:"No blood sample found in the loaded container."}):n=(0,r.jsx)(r.Fragment,{children:"No container loaded."}),(0,r.jsx)(l.p8,{width:700,height:640,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{operating:u||a,name:"PanD.E.M.I.C"}),n&&!m?(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{fill:!0,vertical:!0}),children:(0,r.jsx)(i.IC,{children:n})}):(0,r.jsx)(f,{}),(null==g?void 0:g.length)>0&&(0,r.jsx)(x,{align:"bottom"})]})})})},c=function(e){var n=e.operating,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.analyzing,s=a.analysisTime,u=a.analysisDuration,d=a.analysisDifficulty,f=a.totalContribution,h=a.analysisContributions,m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(d)}),h.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:Math.floor(e.amount)},n)}),(0,r.jsx)(i.Ki.Item,{label:"Total",children:Math.floor(f)}),(0,r.jsx)(i.Ki.Item,{label:"Analysis Result",children:d-f<0?"Disease Analyzed Successfully":"Analysis Failed"})]});if(n)return c?(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"Analyzing ",Math.floor(100-100*s/u),"%"]})})}):(0,r.jsx)(i.aF,{backgroundColor:"rgba(0, 0, 0, 1)",children:(0,r.jsx)(i.wn,{title:"Analysis Results",backgroundColor:"rgba(0, 0, 0, 1)",bold:!0,children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.Ki,{children:m}),(0,r.jsx)(i.$n,{textAlign:"center",onClick:function(){return l("close_report")},children:"Close"})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.beakerLoaded;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){return t("eject_beaker")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!l,onClick:function(){return t("destroy_eject_beaker")}})]})},u=function(e){var n,t,l,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.analysisDifficulty,d=s.analysisContributions,f=s.beakerContainsVirus,h=s.analyzing,m=s.canAnalyze,p=e.strain,x=p.commonName,g=p.description,j=p.strainID,b=p.sample_stage,y=p.known,v=p.diseaseAgent,w=p.bloodDNA,k=p.bloodType,_=p.possibleCures,C=p.transmissionRoute,I=p.isAdvanced,S=p.RequiredCures,O=p.Stabilized,A=p.StrainTracker,P=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",children:w?(0,r.jsx)("span",{style:{fontFamily:"'Courier New', monospace"},children:w}):"Undetectable"}),(0,r.jsx)(i.Ki.Item,{label:"Blood Type",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:null!=k?k:"Undetectable"}})})]});if(!f)return(0,r.jsx)(i.Ki,{children:P});var E=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(u)}),d.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:(0,r.jsx)(i.z2,{maxValue:Math.min(e.maxAmount,u),minValue:0,value:e.amount,ranges:{good:[.66*Math.min(e.maxAmount,u),1/0],average:[.33*Math.min(e.maxAmount,u),.66*Math.min(e.maxAmount,u)],bad:[-1/0,.33*Math.min(e.maxAmount,u)]},children:e.amount})},n)})]});if(I)return n=null!=x&&"Unknown"!==x?(0,r.jsx)(i.$n,{icon:"print",content:"Print Release Forms",disabled:!y,onClick:function(){return c("print_release_forms",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}):(0,r.jsx)(i.$n,{icon:"pen",content:null!=x&&"Unknown"!==x?"Rename Disease":"Name Disease",disabled:!y,onClick:function(){return c("name_strain",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}),I&&(t=(0,r.jsx)(i.$n,{content:"Analyze",disabled:!m||h,onClick:function(){return c("analyze_strain",{strain_index:e.strainIndex})}}),l=(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Delete Data",confirmContent:"Delete Data",disabled:!e.strain.known,onClick:function(){return c("remove_from_database",{strain_id:e.strain.strainFullID})}})),(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsxs)(i.BJ,{align:"left",children:[n,t,l]}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Common Name",className:"common-name-label",children:null!=x?x:"Unknown"}),g&&(0,r.jsx)(i.Ki.Item,{label:"Description",children:g}),(0,r.jsx)(i.Ki.Item,{label:"Strain ID",children:j}),m?E:"",(0,r.jsx)(i.Ki.Item,{label:"Sample Stage",children:b}),(0,r.jsx)(i.Ki.Item,{label:"Disease Agent",children:v}),P,(0,r.jsx)(i.Ki.Item,{label:"Spread Vector",children:null!=C?C:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Possible Cures",children:null!=_?_:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Required Cures",children:null!=S?S:"None"}),I?(0,r.jsx)(i.Ki.Item,{label:"Stabilized",children:1===O?"Yes":"No"}):"",I?(0,r.jsx)(i.Ki.Item,{label:"Tracked Strain",children:A&&""!==A?A:"None"}):""]})]})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=!!t.data.synthesisCooldown,c=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:a?"spinner":"clone",iconSpin:a,content:"Clone",disabled:a,onClick:function(){return l("clone_strain",{strain_index:e.strainIndex})}}),e.sectionButtons]});return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.wn,{title:null!=(n=e.sectionTitle)?n:"Strain Information",buttons:c,children:(0,r.jsx)(u,{strain:e.strain,strainIndex:e.strainIndex})})})},f=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,u=c.selectedStrainIndex,f=c.strains,h=f[u-1];if(0===f.length)return(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.IC,{children:"No disease detected in provided blood sample."})});if(1===f.length)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{strain:f[0],strainIndex:1,sectionButtons:(0,r.jsx)(s,{})}),(null==(t=f[0].symptoms)?void 0:t.length)>0&&(0,r.jsx)(m,{strain:f[0]})]});var p=(0,r.jsx)(s,{});return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Culture Information",fill:!0,buttons:p,children:[(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.tU,{children:f.map(function(e,n){var t;return(0,r.jsx)(i.tU.Tab,{icon:"virus",selected:u-1===n,onClick:function(){return a("switch_strain",{strain_index:n+1})},children:null!=(t=e.commonName)?t:"Unknown"},n)})})}),(0,r.jsx)(d,{strain:h,strainIndex:u}),(null==(n=h.symptoms)?void 0:n.length)>0&&(0,r.jsx)(m,{className:"remove-section-bottom-padding",strain:h})]})})},h=function(e){return e.reduce(function(e,n){return e+n},0)},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.predictions,c=l.symptom_names,s=l.analyzing,u=l.analysisDuration,d=e.strain,f=d.baseStats,m=d.symptoms,p=d.known;return(0,r.jsx)(i.so.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Infection Symptoms",fill:!0,className:e.className,children:(0,r.jsxs)(i.XI,{className:"symptoms-table",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{children:"Stealth"}),(0,r.jsx)(i.XI.Cell,{children:"Resistance"}),(0,r.jsx)(i.XI.Cell,{children:"Stage Speed"}),(0,r.jsx)(i.XI.Cell,{children:"Transmissibility"})]}),m.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[p||"UNKNOWN"!==e.name?(0,r.jsx)(i.XI.Cell,{children:e.name}):(0,r.jsx)(i.ms,{options:c.sort(function(e,n){return e.localeCompare(n)}),width:"180px",selected:a[n],disabled:s||-2===u,onSelected:function(e){return t("set_prediction",{pred_index:n+1,pred_value:e})}}),(0,r.jsx)(i.XI.Cell,{children:e.stealth}),(0,r.jsx)(i.XI.Cell,{children:e.resistance}),(0,r.jsx)(i.XI.Cell,{children:e.stageSpeed}),(0,r.jsx)(i.XI.Cell,{children:e.transmissibility})]},n)}),(0,r.jsx)(i.XI.Row,{className:"table-spacer"}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Base Stats"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.transmissibility:"UNKNOWN"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Total"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stealth}))+f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.resistance}))+f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stageSpeed}))+f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.transmissibility}))+f.transmissibility:"UNKNOWN"})]})]})})})},p=["flask","vial","eye-dropper"],x=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.synthesisCooldown,c=(l.beakerContainsVirus,l.resistances);return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Antibodies",fill:!0,children:(0,r.jsx)(i.BJ,{wrap:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:p[n%p.length],disabled:!!a,onClick:function(){return t("clone_vaccine",{resistance_index:n+1})},mr:"0.5em"}),e]},n)})})})})}},3566:function(e,n,t){"use strict";t.r(n),t.d(n,{ParticleAccelerator:()=>u});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(7946),c=t(3384),s=function(e){switch(e){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.assembled,u=a.power,h=a.strength,m=a.max_strength,p=(a.icon,a.layout_1,a.layout_2,a.layout_3,a.orientation);return(0,r.jsx)(c.p8,{width:395,height:s?160:"north"===p||"south"===p?540:465,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Control Panel",buttons:(0,r.jsx)(i.$n,{dmIcon:"sync",content:"Connect",onClick:function(){return t("scan")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",mb:"5px",children:(0,r.jsx)(i.az,{color:s?"good":"bad",children:s?"Operational":"Error: Verify Configuration"})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Strength",children:[(0,r.jsx)(i.$n,{icon:"backward",disabled:!s||0===h,onClick:function(){return t("remove_strength")},mr:"4px"}),h,(0,r.jsx)(i.$n,{icon:"forward",disabled:!s||h===m,onClick:function(){return t("add_strength")},ml:"4px"})]})]})}),s?"":(0,r.jsx)(i.wn,{title:p?"EM Acceleration Chamber Orientation: "+(0,o.ZH)(p):"Place EM Acceleration Chamber Next To Console",children:0===p?"":"north"===p||"south"===p?(0,r.jsx)(f,{}):(0,r.jsx)(d,{})})]})})},d=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,a=t.layout_1,c=t.layout_2,u=t.layout_3,d=t.orientation;return(0,r.jsxs)(i.XI,{children:[(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?a:u).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:c.slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?u:a).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})},f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,c=t.layout_1,u=t.layout_2,d=t.layout_3,f=t.orientation;return(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?c:d).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{children:u.slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?d:c).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,tooltip:e.status,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})}},3371:function(e,n,t){"use strict";t.r(n),t.d(n,{PdaPainter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.has_pda;return(0,r.jsx)(l.p8,{width:510,height:505,children:(0,r.jsx)(l.p8.Content,{children:n?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,r.jsx)(i.In,{name:"download",size:5,mb:"10px"}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.pda_colors;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.XI,{className:"PdaPainter__list",children:Object.keys(l).map(function(e){return(0,r.jsxs)(i.XI.Row,{onClick:function(){return t("choose_pda",{selectedPda:e})},children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/png;base64,".concat(l[e][0]),style:{verticalAlign:"middle",width:"32px",margin:"0px",imageRendering:"pixelated"}})}),(0,r.jsx)(i.XI.Cell,{children:e})]},e)})})})})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.current_appearance,c=l.preview_appearance;return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Current PDA",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(a),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return t("eject_pda")}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return t("paint_pda")}})]}),(0,r.jsx)(i.wn,{title:"Preview",children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}})})]})}},6144:function(e,n,t){"use strict";t.r(n),t.d(n,{PersonalCrafting:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.busy,d=a.category,f=a.display_craftable_only,h=a.display_compact,m=a.prev_cat,p=a.next_cat,x=a.subcategory,g=a.prev_subcat,j=a.next_subcat;return(0,r.jsx)(l.p8,{width:700,height:800,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!u&&(0,r.jsxs)(i.Rr,{fontSize:"32px",children:[(0,r.jsx)(i.In,{name:"cog",spin:1})," Crafting..."]}),(0,r.jsxs)(i.wn,{title:d,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Show Craftable Only",icon:f?"check-square-o":"square-o",selected:f,onClick:function(){return t("toggle_recipes")}}),(0,r.jsx)(i.$n,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return t("toggle_compact")}})]}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:m,icon:"arrow-left",onClick:function(){return t("backwardCat")}}),(0,r.jsx)(i.$n,{content:p,icon:"arrow-right",onClick:function(){return t("forwardCat")}})]}),x&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:g,icon:"arrow-left",onClick:function(){return t("backwardSubCat")}}),(0,r.jsx)(i.$n,{content:j,icon:"arrow-right",onClick:function(){return t("forwardSubCat")}})]}),h?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsx)(i.az,{mt:1,children:(0,r.jsxs)(i.Ki,{children:[c.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}),!a&&s.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsxs)(i.az,{mt:1,children:[c.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)}),!a&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)})]})}},2327:function(e,n,t){"use strict";t.r(n),t.d(n,{Photocopier:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:400,height:440,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{title:"Photocopier",color:"silver",children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Copies:"}),(0,r.jsx)(i.BJ.Item,{width:"2em",bold:!0,children:a.copynumber}),(0,r.jsxs)(i.BJ.Item,{style:{float:"right"},children:[(0,r.jsx)(i.$n,{icon:"minus",textAlign:"center",content:"",onClick:function(){return t("minus")}}),(0,r.jsx)(i.$n,{icon:"plus",textAlign:"center",content:"",onClick:function(){return t("add")}})]})]}),(0,r.jsxs)(i.BJ,{mb:2,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Toner:"}),(0,r.jsx)(i.BJ.Item,{bold:!0,children:a.toner})]}),(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Document:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.copyitem&&!a.mob,content:a.copyitem?a.copyitem:a.mob?a.mob+"'s ass!":"document",onClick:function(){return t("removedocument")}})})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Folder:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.folder,content:a.folder?a.folder:"folder",onClick:function(){return t("removefolder")}})})]})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(c,{})}),(0,r.jsx)(s,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.issilicon;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"copy",textAlign:"center",content:"Copy",onClick:function(){return t("copy")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"file-import",textAlign:"center",content:"Scan",onClick:function(){return t("scandocument")}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"file",color:"green",textAlign:"center",content:"Print Text",onClick:function(){return t("ai_text")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"image",color:"green",textAlign:"center",content:"Print Image",onClick:function(){return t("ai_pic")}})]})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Scanned Files",children:l.files.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:l.toner<=0,onClick:function(){return t("filecopy",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return t("deletefile",{uid:e.uid})}})]})},e.name)})})}},7331:function(e,n,t){"use strict";t.r(n),t.d(n,{PoolController:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["tempKey"]),s=c[l];if(!s)return null;var u=(0,o.Oc)(),d=u.data,f=u.act,h=d.currentTemp,m=s.label,p=s.icon;return(0,r.jsxs)(i.$n,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.direction,s=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Pump Direction",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:4,icon:"sign-in-alt",content:"In",selected:!c,onClick:function(){return t("set_direction",{direction:0})}}),(0,r.jsx)(i.$n,{width:4,icon:"sign-out-alt",content:"Out",selected:c,onClick:function(){return t("set_direction",{direction:1})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Port status",children:(0,r.jsx)(i.az,{color:s?"green":"average",bold:1,ml:.5,children:s?"Connected":"Disconnected"})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.target_pressure,s=l.max_target_pressure,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_pressure",{pressure:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_target_pressure,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},7920:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableScrubber:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Port Status:"}),(0,r.jsx)(i.BJ.Item,{color:c?"green":"average",bold:1,ml:6,children:c?"Connected":"Disconnected"})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.rate,s=l.max_rate,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_rate",{rate:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_rate,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},2854:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableTurret:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.locked,u=c.on,d=c.lethal,f=c.lethal_is_configurable,h=c.targetting_is_configurable,m=c.check_weapons,p=c.neutralize_noaccess,x=c.access_is_configurable,g=c.regions,j=c.selectedAccess,b=c.one_access,y=c.neutralize_norecord,v=c.neutralize_criminals,w=c.neutralize_all,k=c.neutralize_unidentified,_=c.neutralize_cyborgs;return(0,r.jsx)(l.p8,{width:475,height:750,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.BJ.Item,{m:0,children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:s,onClick:function(){return t("power")}})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Lethals",children:(0,r.jsx)(i.$n,{icon:d?"exclamation-triangle":"times",content:d?"On":"Off",color:d?"bad":"",disabled:s,onClick:function(){return t("lethal")}})}),!!x&&(0,r.jsx)(i.Ki.Item,{label:"One Access Mode",children:(0,r.jsx)(i.$n,{icon:b?"address-card":"exclamation-triangle",content:b?"On":"Off",selected:b,disabled:s,onClick:function(){return t("one_access")}})})]})})}),!!h&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Humanoid Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:v,content:"Wanted Criminals",disabled:s,onClick:function(){return t("autharrest")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:y,content:"No Sec Record",disabled:s,onClick:function(){return t("authnorecord")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Access",disabled:s,onClick:function(){return t("authaccess")}})]}),(0,r.jsxs)(i.wn,{title:"Other Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:k,content:"Unidentified Lifesigns (Xenos, Animals, Etc)",disabled:s,onClick:function(){return t("authxeno")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:_,content:"Cyborgs",disabled:s,onClick:function(){return t("authborgs")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:w,content:"All Non-Synthetics",disabled:s,onClick:function(){return t("authsynth")}})]})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!x&&(0,r.jsx)(a.AccessList,{accesses:g,selectedList:j,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})})]})})})}},1784:function(e,n,t){"use strict";t.r(n),t.d(n,{PowerMonitor:()=>m,PowerMonitorMainContent:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(6859),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t50?"battery-half":"battery-quarter";break;case"C":i="bolt";break;case"F":i="battery-full";break;case"M":i="slash"}return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.In,{width:"18px",textAlign:"center",name:i,color:"N"===n&&(t>50?"yellow":"red")||"C"===n&&"yellow"||"F"===n&&"green"||"M"===n&&"orange"}),(0,r.jsx)(l.az,{inline:!0,width:"36px",textAlign:"right",children:(0,a.Mg)(t)+"%"})]})},b=function(e){switch(e.status){case"AOn":n=!0,t=!0;break;case"AOff":n=!0,t=!1;break;case"On":n=!1,t=!0;break;case"Off":n=!1,t=!1}var n,t,i=(t?"On":"Off")+" [".concat(n?"auto":"manual","]");return(0,r.jsx)(l.m_,{content:i,children:(0,r.jsx)(l.BK,{color:t?"good":"bad",content:n?void 0:"M"})})}},8011:function(e,n,t){"use strict";t.r(n),t.d(n,{PrisonerImplantManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=t(7352),s=t(736),u=function(e){var n=(0,o.Oc)(),t=n.act,u=n.data,d=u.loginState,f=u.prisonerInfo,h=u.chemicalInfo,m=u.trackingInfo;if(!d.logged_in)return(0,r.jsx)(l.p8,{theme:"security",width:500,height:850,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s.LoginScreen,{})})});var p=[1,5,10];return(0,r.jsxs)(l.p8,{theme:"security",width:500,height:850,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.LoginInfo,{}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:f.name?"eject":"id-card",selected:f.name,content:f.name?f.name:"-----",tooltip:f.name?"Eject ID":"Insert ID",onClick:function(){return t("id_card")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Points",children:[null!==f.points?f.points:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"minus-square",disabled:null===f.points,content:"Reset",onClick:function(){return t("reset_points")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Point Goal",children:[null!==f.goal?f.goal:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"pen",disabled:null===f.goal,content:"Edit",onClick:function(){return(0,a.modalOpen)("set_points")}})]}),(0,r.jsx)(i.Ki.Item,{children:(0,r.jsxs)("box",{hidden:null===f.goal,children:["1 minute of prison time should roughly equate to 150 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Sentences should not exceed 5000 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Permanent prisoners should not be given a point goal.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle."]})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Tracking Implants",children:m.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.subject]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:e.health}),(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){return(0,a.modalOpen)("warn",{uid:e.uid})}})})]})]},e.subject)]}),(0,r.jsx)("br",{})]})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Chemical Implants",children:h.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.name]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Reagents",children:e.volume})}),p.map(function(n){return(0,r.jsx)(i.$n,{mt:2,disabled:e.volumea});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.can_go_home,s=a.emagged,u=a.id_inserted,d=a.id_name,f=a.id_points,h=a.id_goal,m=+!s,p=c?"Completed!":"Insufficient";s&&(p="ERR0R");var x="No ID inserted";return u?x=(0,r.jsx)(i.z2,{value:f/h,ranges:{good:[m,1/0],bad:[-1/0,m]},children:f+" / "+h+" "+p}):s&&(x="ERR0R COMPLETED?!@"),(0,r.jsx)(l.p8,{width:315,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:x}),(0,r.jsx)(i.Ki.Item,{label:"Shuttle controls",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Move shuttle",disabled:!c,onClick:function(){return t("move_shuttle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inserted ID",children:(0,r.jsx)(i.$n,{fluid:!0,content:u?d:"-------------",onClick:function(){return t("handle_id")}})})]})})})}},9083:function(e,n,t){"use strict";t.r(n),t.d(n,{PrizeCounter:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu;return(0,r.jsx)(o.c_,{fluid:!0,title:e.name,dmIcon:e.icon,dmIconState:e.icon_state,buttonsAlt:(0,r.jsxs)(o.$n,{bold:!0,fontSize:1.5,tooltip:n&&"Not enough tickets",disabled:n,onClick:function(){return t("purchase",{purchase:e.itemID})},children:[e.cost,(0,r.jsx)(o.In,{m:0,mt:.25,name:"ticket",color:n?"bad":"good",size:1.6})]}),children:e.desc},e.name)})})})})})})}},7692:function(e,n,t){"use strict";t.r(n),t.d(n,{QuirkMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e.cost},j=function(e){var n=p.has(e.name);if(n){var r=u(h.filter(function(n){return n!==e.name}),d.all_quirks);if(e.cost<0&&r<0)return}else if(e.cost>0&&!g(e))return;m(n?h.filter(function(n){return n!==e.name}):((function(e){if(Array.isArray(e))return c(e)})(h)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(h)||s(h)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e.name])),t(n?"remove_quirk":"add_quirk",{path:e.path})},b=function(e,n,t,i){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{p:.5,mb:1,color:t,style:{border:"1px solid ".concat(t),backgroundColor:"rgba(".concat("green"===t?"0,128,0":"255,0,0",",0.1)")},children:[(0,r.jsx)(o.In,{name:i})," ",n]}),e.map(function(e){var n=p.has(e.name),t=e.cost>0?"-".concat(e.cost):"+".concat(Math.abs(e.cost)),i=e.cost>0?"bad":"good",l=!1,a=n?"Remove":"Select",c=n?"bad":"good";if(n){var s=u(h.filter(function(n){return n!==e.name}),d.all_quirks);e.cost<0&&s<0&&(l=!0,a="Locked (Balance)",c="average")}else e.cost>0&&!g(e)&&(l=!0,a="Locked",c="average");return(0,r.jsx)(o.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(o.$n,{color:c,content:a,disabled:l,onClick:function(){return j(e)},fluid:!0}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:e.desc}),(0,r.jsx)(o.Ki.Item,{label:"Effect",children:(0,r.jsx)(o.az,{color:i,bold:!0,children:t})})]})},e.name)})]})};return(0,r.jsx)(a.p8,{width:750,height:550,theme:"ntos",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,basis:500,children:(0,r.jsx)(o.wn,{title:"Available Quirks",fill:!0,scrollable:!0,children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[b(d.all_quirks.filter(function(e){return e.cost<0}),"Negative Quirks (Add Points)","green","minus-circle"),b(d.all_quirks.filter(function(e){return e.cost>0}),"Positive Quirks (Cost Points)","bad","plus-circle")]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.cG,{vertical:!0})}),(0,r.jsx)(o.BJ.Item,{basis:250,children:(0,r.jsxs)(o.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(o.wn,{title:"Balance",children:(0,r.jsx)(o.az,{bold:!0,color:x>=0?"good":"bad",fontSize:"18px",children:x})}),(0,r.jsx)(o.wn,{title:"Selected Quirks",fill:!0,scrollable:!0,children:h.length?h.map(function(e){var n=d.all_quirks.find(function(n){return n.name===e});if(!n)return null;var t=n.cost>0?"-".concat(n.cost):"+".concat(Math.abs(n.cost)),i=n.cost>0?"var(--color-bad)":"var(--color-good)";return(0,r.jsx)(o.az,{mb:.5,p:.5,style:{borderLeft:"3px solid ".concat(i)},children:(0,r.jsxs)(o.BJ,{justify:"space-between",children:[(0,r.jsx)(o.az,{bold:!0,children:e}),(0,r.jsx)(o.az,{children:t})]})},e)}):(0,r.jsx)(o.az,{italic:!0,children:"No quirks selected."})})]})})]})})})}},7076:function(e,n,t){"use strict";t.r(n),t.d(n,{RCD:()=>s});var r=t(8138);t(4530);var i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(4744),s=function(){return(0,r.jsxs)(l.p8,{width:480,height:670,children:[(0,r.jsx)(c.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})})]})},u=function(){var e=(0,o.Oc)().data,n=e.matter,t=e.max_matter,l=.7*t,a=.25*t;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Matter Storage",children:(0,r.jsx)(i.z2,{ranges:{good:[l,1/0],average:[a,l],bad:[-1/0,a]},value:n,maxValue:t,children:(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:"".concat(n," / ").concat(t," units")})})})})},d=function(){return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Construction Type",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(f,{mode_type:"Floors and Walls"}),(0,r.jsx)(f,{mode_type:"Airlocks"}),(0,r.jsx)(f,{mode_type:"Windows"}),(0,r.jsx)(f,{mode_type:"Deconstruction"})]})})})},f=function(e){var n=e.mode_type,t=(0,o.Oc)(),l=t.act,a=t.data.mode;return(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",content:n,selected:+(a===n),onClick:function(){return l("mode",{mode:n})}})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.door_name,a=t.electrochromic,s=t.airlock_glass;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Airlock Settings",children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,r.jsxs)(r.Fragment,{children:["Rename: ",(0,r.jsx)("b",{children:l})]}),onClick:function(){return(0,c.modalOpen)("renameAirlock")}})}),(0,r.jsx)(i.BJ.Item,{children:1===s&&(0,r.jsx)(i.$n,{fluid:!0,icon:a?"toggle-on":"toggle-off",content:"Electrochromic",selected:a,onClick:function(){return n("electrochromic")}})})]})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.tab,c=t.locked,s=t.one_access,u=t.selected_accesses,d=t.regions;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.tU,{fluid:!0,children:[(0,r.jsx)(i.tU.Tab,{icon:"cog",selected:1===l,onClick:function(){return n("set_tab",{tab:1})},children:"Airlock Types"}),(0,r.jsx)(i.tU.Tab,{selected:2===l,icon:"list",onClick:function(){return n("set_tab",{tab:2})},children:"Airlock Access"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:1===l?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Types",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:0})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:1})})]})}):2===l&&c?(0,r.jsx)(i.wn,{fill:!0,title:"Access",buttons:(0,r.jsx)(i.$n,{icon:"lock-open",content:"Unlock",onClick:function(){return n("set_lock",{new_lock:"unlock"})}}),children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:5,mb:3}),(0,r.jsx)("br",{}),"Airlock access selection is currently locked."]})})}):(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"lock",content:"Lock",onClick:function(){return n("set_lock",{new_lock:"lock"})}}),usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return n("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,width:4,content:"All",onClick:function(){return n("set_one_access",{access:"all"})}})]}),accesses:d,selectedList:u,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})},grantableList:[]})})]})},p=function(e){var n=e.check_number,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.door_types_ui_list,s=a.door_type,u=c.filter(function(e,t){return t%2===n});return(0,r.jsx)(i.BJ.Item,{children:u.map(function(e,n){return(0,r.jsx)(i.BJ,{mb:.5,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,selected:s===e.type,content:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"3px",marginRight:"6px",marginLeft:"-3px"}}),e.name]}),onClick:function(){return l("door_type",{door_type:e.type})}})})},n)})})}},1703:function(e,n,t){"use strict";t.r(n),t.d(n,{RPD:()=>s});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.mainmenu,s=o.mode;return(0,r.jsx)(c.p8,{width:550,height:440,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{icon:e.icon,selected:e.mode===s,onClick:function(){return t("mode",{mode:e.mode})},children:e.category},e.category)})})}),function(e){switch(e){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(d,{});case 3:return(0,r.jsx)(h,{});case 4:return(0,r.jsx)(m,{});case 5:return(0,r.jsx)(p,{});case 6:return(0,r.jsx)(x,{});default:return"WE SHOULDN'T BE HERE!"}}(s)]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.pipemenu,u=c.pipe_category,d=c.pipelist,h=c.whatpipe,m=c.iconrotation;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:s.map(function(e){return(0,r.jsx)(i.tU.Tab,{textAlign:"center",selected:e.pipemode===u,onClick:function(){return t("pipe_category",{pipe_category:e.pipemode})},children:e.category},e.category)})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.pd,{fluid:!0,placeholder:"Enter pipe label",onChange:function(e){return t("set_label",{set_label:e})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:d.filter(function(e){return 1===e.pipe_type}).filter(function(e){return e.pipe_category===u}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===h,onClick:function(){return t("whatpipe",{whatpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),d.filter(function(e){return 1===e.pipe_type&&e.pipe_id===h&&1!==e.orientations}).map(function(e){return(0,r.jsx)(i.az,{children:e.bendy?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})})]}),(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]})},e.pipe_id)})]})})})})]})})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatdpipe,d=c.iconrotation;return c.auto_wrench_toggle,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 2===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatdpipe",{whatdpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 2===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.iconrotation,c=o.auto_wrench_toggle;return(0,r.jsxs)(i.BJ,{mb:1,textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Auto-orientation",selected:0===a,onClick:function(){return t("iconrotation",{iconrotation:0})}})}),(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:c,content:"Auto-anchor",onClick:function(){return t("auto_wrench_toggle")}})})]})},h=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"sync-alt",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to rotate loose pipes..."]})})})})},m=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"arrows-alt-h",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to flip loose pipes..."]})})})})},p=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"recycle",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to eat loose pipes..."]})})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatttube,d=c.iconrotation;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 3===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatttube",{whatttube:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 3===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})}},8930:function(e,n,t){"use strict";t.r(n),t.d(n,{Radio:()=>u});var r=t(8138),i=t(8587),o=t(7790),l=t(6859),a=t(2864),c=t(421),s=t(3384),u=function(e){var n=(0,a.Oc)(),t=n.act,u=n.data,d=u.freqlock,f=u.frequency,h=u.minFrequency,m=u.maxFrequency,p=u.canReset,x=u.listening,g=u.broadcasting,j=u.loudspeaker,b=u.has_loudspeaker,y=u.ichannels,v=u.schannels,w=c.Fo.find(function(e){return e.freq===f}),k=!!w&&!!w.name,_=[];c.Fo.forEach(function(e){_[e.name]=e.color});var C=(0,i.Tj)(v,function(e,n){return{name:n,status:!!e}}),I=(0,i.Tj)(y,function(e,n){return{name:n,freq:e}});return(0,r.jsx)(s.p8,{width:375,height:130+21.2*C.length+11*I.length,children:(0,r.jsx)(s.p8.Content,{scrollable:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Frequency",children:[d&&(0,r.jsx)(o.az,{inline:!0,color:"light-gray",children:(0,l.Mg)(f/10,1)+" kHz"})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q7,{animated:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:h/10,maxValue:m/10,value:f/10,format:function(e){return(0,l.Mg)(e,1)},onChange:function(e){return t("frequency",{adjust:e-f/10})}}),(0,r.jsx)(o.$n,{icon:"undo",content:"",disabled:!p,tooltip:"Reset",onClick:function(){return t("frequency",{tune:"reset"})}})]}),k&&w&&(0,r.jsxs)(o.az,{inline:!0,color:w.color,ml:2,children:["[",w.name,"]"]})]}),(0,r.jsxs)(o.Ki.Item,{label:"Audio",children:[(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:x?"volume-up":"volume-mute",selected:x,color:x?"":"bad",tooltip:x?"Disable Incoming":"Enable Incoming",onClick:function(){return t("listen")}}),(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:g?"microphone":"microphone-slash",selected:g,tooltip:g?"Disable Hotmic":"Enable Hotmic",onClick:function(){return t("broadcast")}}),!!b&&(0,r.jsx)(o.$n,{ml:1,icon:"bullhorn",selected:j,content:"Loudspeaker",tooltip:j?"Disable Loudspeaker":"Enable Loudspeaker",onClick:function(){return t("loudspeaker")}})]}),0!==v.length&&(0,r.jsx)(o.Ki.Item,{label:"Keyed Channels",children:C.map(function(e){return(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.$n,{icon:e.status?"check-square-o":"square-o",selected:e.status,content:"",onClick:function(){return t("channel",{channel:e.name})}}),(0,r.jsx)(o.az,{inline:!0,color:_[e.name],children:e.name})]},e.name)})}),0!==I.length&&(0,r.jsx)(o.Ki.Item,{label:"Standard Channel",children:I.map(function(e){return(0,r.jsx)(o.$n,{icon:"arrow-right",content:e.name,selected:k&&w&&w.name===e.name,onClick:function(){return t("ichannel",{ichannel:e.freq})}},"i_"+e.name)})})]})})})})}},4097:function(e,n,t){"use strict";t.r(n),t.d(n,{RankedListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:null;if(null!==a){var i=function(e){if(Array.isArray(e))return u(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||f(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i.splice(a,1)[0];null===r?i.push(o):i.splice(r,0,o),t(i),c(null),e.stopPropagation()}};return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,onDrop:function(e){return m(e)},onDragOver:h,children:(0,r.jsx)(o.XI,{children:n.map(function(e,n){return(0,r.jsx)(o.XI.Row,{style:{padding:"8px"},draggable:!0,onDragStart:function(){return s(n)},onDragOver:h,onDrop:function(e){return m(e,n)},children:(0,r.jsx)(o.$n,{fluid:!0,py:"0.25rem",color:"transparent",style:{animation:"none",transition:"none",cursor:"move"},icon:"grip-lines",children:e.replace(/^\w/,function(e){return e.toUpperCase()})})},n)})})})}},4087:function(e,n,t){"use strict";t.r(n),t.d(n,{ReactorMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),C=(t=Math).max.apply(t,[1].concat(function(e){if(Array.isArray(e))return s(e)}(n=_.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:500,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power Generation",children:(0,r.jsx)(i.z2,{value:x,minValue:0,maxValue:2e3,ranges:x<=1e4?{good:[400,1/0],average:[200,400],bad:[-1/0,200]}:{good:[-1/0,1/0]},children:(0,o.Mg)(x<1e4?x:x/1e3)+(x<1e4?" KW":" MW")})}),(0,r.jsx)(i.Ki.Item,{label:"Reactivity Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:u(g),minValue:0,maxValue:u(1e4),ranges:{teal:[-1/0,u(80)],good:[u(80),u(373)],average:[u(373),u(1e3)],bad:[u(1e3),1/0]},children:(0,o.Mg)(g)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:u(j),minValue:0,maxValue:u(5e4),ranges:{good:[u(1),u(1e3)],average:[-1/0,u(3e3)],bad:[u(3e3),1/0]},children:(0,o.Mg)(j)+" kPa"})}),(0,r.jsx)(i.Ki.Item,{label:"Control Rod Limiter",children:(0,r.jsx)(i.z2,{value:y,minValue:0,maxValue:100,ranges:{teal:[100,1/0],good:[70,99],average:[30,70],bad:[-1/0,30]},children:(0,o.Mg)(y)+" %"})})]}),(0,r.jsx)(i.wn,{title:"Desired Control Rod Limit",textAlign:"center",children:(0,r.jsx)(i.N6,{size:5,value:v,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:2,onChange:function(e,n){return f("set_throttle",{NGCR_throttle:n})}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:m?"Vent Open":"Vent Closed",selected:m,onClick:function(){return f("toggle_vent")}}),children:(0,r.jsx)(i.Ki,{children:_.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:C,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})})})]})})})}},1876:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentGrinder:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=t(6696),s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=n.config,s=t.operating,h=a.title;return(0,r.jsx)(l.p8,{width:400,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.Operating,{operating:s,name:h}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(f,{})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.inactive;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"mortar-pestle",disabled:l,tooltip:l?"There are no contents":"Grind the contents",tooltipPosition:"bottom",content:"Grind",onClick:function(){return t("grind")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"blender",disabled:l,tooltip:l?"There are no contents":"Juice the contents",tooltipPosition:"bottom",content:"Juice",onClick:function(){return t("juice")}})})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.contents,c=l.limit,s=l.count,u=l.inactive;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Contents",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",c," items"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Contents",onClick:function(){return t("eject")},disabled:u,tooltip:u?"There are no contents":""})]}),children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:a.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.beaker_loaded,s=l.beaker_current_volume,u=l.beaker_max_volume,d=l.beaker_contents;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Beaker",buttons:!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Detach Beaker",onClick:function(){return t("detach")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:d})})}},1569:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentsEditor:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9298),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.on;return(0,r.jsx)(l.p8,{width:300,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Receiver",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("recv_power")}})})}),(0,r.jsx)(a.Signaler,{data:c})]})})})}},5297:function(e,n,t){"use strict";t.r(n),t.d(n,{RequestConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){var e=(0,o.Oc)().data,n=e.screen,t=e.announcementConsole;return(0,r.jsx)(l.p8,{width:450,height:t?430:385,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:function(e){switch(e){case 0:return(0,r.jsx)(u,{});case 1:return(0,r.jsx)(d,{purpose:"ASSISTANCE"});case 2:return(0,r.jsx)(d,{purpose:"SUPPLIES"});case 3:return(0,r.jsx)(d,{purpose:"INFO"});case 4:return(0,r.jsx)(f,{type:"SUCCESS"});case 5:return(0,r.jsx)(f,{type:"FAIL"});case 6:return(0,r.jsx)(h,{type:"MESSAGES"});case 7:return(0,r.jsx)(m,{});case 8:return(0,r.jsx)(p,{});case 9:return(0,r.jsx)(x,{});case 10:return(0,r.jsx)(h,{type:"SHIPPING"});case 11:return(0,r.jsx)(g,{});default:return"WE SHOULDN'T BE HERE!"}}(n)})})})},c=function(e){var n=(0,o.Oc)().act,t=e.text,l=e.icon,a=e.screen;return(0,r.jsx)(i.$n,{fluid:!0,lineHeight:3,icon:l,onClick:function(){return n("setScreen",{setScreen:a})},children:t})},s=function(){var e=(0,o.Oc)().act;return(0,r.jsx)(i.$n,{icon:"arrow-left",onClick:function(){return e("setScreen",{setScreen:0})},children:"Back"})},u=function(){var e,n=(0,o.Oc)(),t=n.act,l=n.data,a=l.newmessagepriority,s=l.announcementConsole,u=l.silent;return e=3===a?(0,r.jsx)(i.Z8,{children:(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"NEW PRIORITY MESSAGES"})}):a>0?(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"There are new messages"}):(0,r.jsx)(i.az,{color:"label",mb:1,children:"There are no new messages"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,r.jsx)(i.$n,{width:9,selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return t("toggleSilent")},children:u?"Speaker Off":"Speaker On"}),children:[e,(0,r.jsx)(i.az,{children:(0,r.jsx)(c,{icon:a>0?"envelope-open-text":"envelope",screen:6,text:"View Messages"})}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"hand-paper",screen:1,text:"Request Assistance"}),(0,r.jsx)(c,{icon:"box",screen:2,text:"Request Supplies"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:11,text:"Request Secondary Goal"}),(0,r.jsx)(c,{icon:"comment",screen:3,text:"Relay Anonymous Information"})]}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"tag",screen:9,text:"Print Shipping Label"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:10,text:"View Shipping Logs"})]}),!!s&&(0,r.jsx)(i.az,{mt:1,children:(0,r.jsx)(c,{icon:"bullhorn",screen:8,text:"Send Station-Wide Announcement"})})]})})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.department,u=a.assist_dept,d=a.supply_dept,f=a.info_dept,h=[];switch(e.purpose){case"ASSISTANCE":h=u,n="Request assistance from another department";break;case"SUPPLIES":h=d,n="Request supplies from another department";break;case"INFO":h=f,n="Relay information to another department"}return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.Ki,{children:h.filter(function(e){return e!==c}).map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:[(0,r.jsx)(i.$n,{icon:"envelope",onClick:function(){return l("writeInput",{write:e,priority:2})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"exclamation-circle",onClick:function(){return l("writeInput",{write:e,priority:3})},children:"High Priority"})]},e)})})})})},f=function(e){var n;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Unable to contact messaging server"}return(0,r.jsx)(i.wn,{fill:!0,title:n,buttons:(0,r.jsx)(s,{})})},h=function(e){var n,t=(0,o.Oc)(),l=(t.act,t.data),a=l.message_log,c=l.shipping_log,u=[];switch(e.type){case"MESSAGES":u=a,n="Message Log";break;case"SHIPPING":u=c,n="Shipping label print log"}return u.reverse(),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:u.map(function(e,n){return(0,r.jsxs)(i.az,{textAlign:"left",children:[e.map(function(e,n){return(0,r.jsx)("div",{children:e},n)}),(0,r.jsx)("hr",{})]},n)})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.recipient,a=t.message,c=t.msgVerified,u=t.msgStamped;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,r.jsx)(s,{}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Recipient",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Message",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",color:"green",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Stamped by",color:"blue",children:u})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"envelope",onClick:function(){return n("department",{department:l})},children:"Send Message"})})})]})},p=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.message,a=t.announceAuth;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(i.$n,{icon:"edit",onClick:function(){return n("writeAnnouncement")},children:"Edit Message"})]}),children:l})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"bullhorn",disabled:!(a&&l),onClick:function(){return n("sendAnnouncement")},children:"Send Announcement"})]})})]})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.shipDest,a=t.msgVerified,c=t.ship_dept;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.wn,{title:"Print Shipping Label",buttons:(0,r.jsx)(s,{}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Destination",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",children:a})]}),(0,r.jsx)(i.$n,{fluid:!0,mt:1,textAlign:"center",icon:"print",disabled:!(l&&a),onClick:function(){return n("printLabel")},children:"Print Label"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Destinations",children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:(0,r.jsx)(i.$n,{selected:l===e,onClick:function(){return n("shipSelect",{shipSelect:e})},children:l===e?"Selected":"Select"})},e)})})})})]})},g=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.secondaryGoalAuth,a=t.secondaryGoalEnabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,r.jsx)(s,{})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?l?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"clipboard-list",disabled:!(l&&a),onClick:function(){return n("requestSecondaryGoal")},children:"Request Secondary Goal"})]})})]})}},4384:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>c,RndBackupConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.network_name,u=a.has_disk,d=a.disk_name,f=a.linked,h=a.techs,m=a.last_timestamp;return(0,r.jsx)(l.p8,{width:900,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Device Info",children:[(0,r.jsx)(i.az,{mb:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Current Network",children:f?(0,r.jsx)(i.$n,{content:s,icon:"unlink",selected:1,onClick:function(){return t("unlink")}}):"None"}),(0,r.jsx)(i.Ki.Item,{label:"Loaded Disk",children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:d+" (Last backup: "+m+")",icon:"save",selected:1,onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Save all",onClick:function(){return t("saveall2disk")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load all",onClick:function(){return t("saveall2network")}})]}):"None"})]})}),!!f||(0,r.jsx)(c,{})]}),(0,r.jsx)(i.az,{mt:2,children:(0,r.jsx)(i.wn,{title:"Tech Info",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Tech Name"}),(0,r.jsx)(i.XI.Cell,{children:"Network Level"}),(0,r.jsx)(i.XI.Cell,{children:"Disk Level"}),(0,r.jsx)(i.XI.Cell,{children:"Actions"})]}),Object.keys(h).map(function(e){return!(h[e].network_level>0||h[e].disk_level>0)||(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:h[e].name}),(0,r.jsx)(i.XI.Cell,{children:h[e].network_level||"None"}),(0,r.jsx)(i.XI.Cell,{children:h[e].disk_level||"None"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Load to network",disabled:!u||!f,onClick:function(){return t("savetech2network",{tech:e})}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load to disk",disabled:!u||!f,onClick:function(){return t("savetech2disk",{tech:e})}})]})]},e)})]})})})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})}},4080:function(e,n,t){"use strict";t.r(n),t.d(n,{AnalyzerMenu:()=>a});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.data,o=n.act,a=t.tech_levels,s=t.loaded_item,u=t.linked_analyzer,d=t.can_discover;return u?s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Object Analysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Deconstruct",icon:"microscope",onClick:function(){o("deconstruct")}}),(0,r.jsx)(i.$n,{content:"Eject",icon:"eject",onClick:function(){o("eject_item")}}),!d||(0,r.jsx)(i.$n,{content:"Discover",icon:"atom",onClick:function(){o("discover")}})]}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name})})}),(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{id:"research-levels",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Research Field"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Current Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Object Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"New Level"})]}),a.map(function(e){return(0,r.jsx)(c,{techLevel:e},e.id)})]})})]}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})},c=function(e){var n=e.techLevel,t=n.name,l=n.desc,a=n.level,c=n.object_level,s=n.ui_icon,u=null!=c,d=u&&c>=a?Math.max(c,a+1):a;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"circle-info",tooltip:l})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.In,{name:s})," ",t]}),(0,r.jsx)(i.XI.Cell,{children:a}),u?(0,r.jsx)(i.XI.Cell,{children:c}):(0,r.jsx)(i.XI.Cell,{className:"research-level-no-effect",children:"-"}),(0,r.jsx)(i.XI.Cell,{className:(0,o.Ly)([d!==a&&"upgraded-level"]),children:d})]})}},9529:function(e,n,t){"use strict";t.r(n),t.d(n,{DataDiskMenu:()=>d});var r=t(8138),i=t(7790),o=t(2864),l="tech",a=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;return a?(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:a.name}),(0,r.jsx)(i.Ki.Item,{label:"Level",children:a.level}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:a.desc})]}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_tech")}})})]}):null},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;if(!a)return null;var c=a.name,s=a.lathe_types,u=a.materials,d=s.join(", ");return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:c}),d?(0,r.jsx)(i.Ki.Item,{label:"Lathe Types",children:d}):null,(0,r.jsx)(i.Ki.Item,{label:"Required Materials"})]}),u.map(function(e){return(0,r.jsxs)(i.az,{children:["- ",(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:e.name})," x ",e.amount]},e.name)}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_design")}})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.disk_data;return(0,r.jsx)(i.wn,function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=function(e){var n=(0,o.Oc)(),t=n.data,a=n.act,c=t.category,s=t.matching_designs,u=4===t.menu?"build":"imprint";return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,height:36,title:c,children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(i.XI,{className:"RndConsole__LatheCategory__MatchingDesigns",children:s.map(function(e){var n=e.id,t=e.name,o=e.can_build,l=e.materials;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"print",content:t,disabled:o<1,onClick:function(){return a(u,{id:n,amount:1})}})}),(0,r.jsx)(i.XI.Cell,{children:o>=5?(0,r.jsx)(i.$n,{content:"x5",onClick:function(){return a(u,{id:n,amount:5})}}):null}),(0,r.jsx)(i.XI.Cell,{children:o>=10?(0,r.jsx)(i.$n,{content:"x10",onClick:function(){return a(u,{id:n,amount:10})}}):null}),(0,r.jsx)(i.XI.Cell,{children:l.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[" | ",(0,r.jsxs)("span",{className:e.is_red?"color-red":null,children:[e.amount," ",e.name]})]})})})]},n)})})]})}},4154:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheChemicalStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_chemicals,c=4===t.menu;return(0,r.jsxs)(i.wn,{title:"Chemical Storage",children:[(0,r.jsx)(i.$n,{content:"Purge All",icon:"trash",onClick:function(){l(c?"disposeallP":"disposeallI")}}),(0,r.jsx)(i.Ki,{children:a.map(function(e){var n=e.volume,t=e.name,o=e.id;return(0,r.jsx)(i.Ki.Item,{label:"* ".concat(n," of ").concat(t),children:(0,r.jsx)(i.$n,{content:"Purge",icon:"trash",onClick:function(){l(c?"disposeP":"disposeI",{id:o})}})},o)})})]})}},8563:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMainMenu:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=t(6013),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.act,s=t.menu,u=t.categories;return(0,r.jsxs)(i.wn,{title:(4===s?"Protolathe":"Circuit Imprinter")+" Menu",children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(a.LatheSearch,{}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(i.so,{wrap:"wrap",children:u.map(function(e){return(0,r.jsx)(i.so,{style:{flexBasis:"50%",marginBottom:"6px"},children:(0,r.jsx)(i.$n,{icon:"arrow-right",content:e,onClick:function(){c("setCategory",{category:e})}})},e)})})]})}},7635:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterialStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_materials;return(0,r.jsx)(i.wn,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,r.jsx)(i.XI,{children:a.map(function(e){var n=e.id,o=e.amount,a=e.name,c=function(e){l(4===t.menu?"lathe_ejectsheet":"imprinter_ejectsheet",{id:n,amount:e})},s=Math.floor(o/2e3),u=o<1;return(0,r.jsxs)(i.XI.Row,{className:u?"color-grey":"color-yellow",children:[(0,r.jsxs)(i.XI.Cell,{minWidth:"210px",children:["* ",o," of ",a]}),(0,r.jsxs)(i.XI.Cell,{minWidth:"110px",children:["(",s," sheet",1===s?"":"s",")"]}),(0,r.jsx)(i.XI.Cell,{children:o>=2e3?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"1x",icon:"eject",onClick:function(){return c(1)}}),(0,r.jsx)(i.$n,{content:"C",icon:"eject",onClick:function(){return c("custom")}}),o>=1e4?(0,r.jsx)(i.$n,{content:"5x",icon:"eject",onClick:function(){return c(5)}}):null,(0,r.jsx)(i.$n,{content:"All",icon:"eject",onClick:function(){return c(50)}})]}):null})]},n)})})})}},5887:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterials:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().data,t=n.total_materials,l=n.max_materials,a=n.max_chemicals,c=n.total_chemicals;return(0,r.jsx)(i.az,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,r.jsxs)(i.XI,{width:"auto",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Material Amount:"}),(0,r.jsx)(i.XI.Cell,{children:t}),l?(0,r.jsx)(i.XI.Cell,{children:" / "+l}):null]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Chemical Amount:"}),(0,r.jsx)(i.XI.Cell,{children:c}),a?(0,r.jsx)(i.XI.Cell,{children:" / "+a}):null]})]})})}},9760:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMenu:()=>p});var r=t(8138),i=t(7790),o=t(2864),l=t(2247),a=t(1465),c=t(4154),s=t(8563),u=t(7635);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.pd,{placeholder:"Search...",onEnter:function(e){return n("search",{to_search:e})}})})}},7726:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.controllers;return(0,r.jsx)(l.p8,{width:800,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})}},3321:function(e,n,t){"use strict";t.r(n),t.d(n,{SettingsMenu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(a,{}),(0,r.jsx)(c,{})]})},a=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;l.sync;var a=l.admin;return(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.so,{direction:"column",align:"flex-start",children:[(0,r.jsx)(i.$n,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){t("unlink")}}),1===a?(0,r.jsx)(i.$n,{icon:"gears",color:"red",content:"[ADMIN] Maximize research levels",onClick:function(){return t("maxresearch")}}):null]})})},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.linked_analyzer,c=t.linked_lathe,s=t.linked_imprinter;return(0,r.jsx)(i.wn,{title:"Linked Devices",buttons:(0,r.jsx)(i.$n,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return l("find_device")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scientific Analyzer",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!a,content:a?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"analyze"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Protolathe",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!c,content:c?"Unlink":"Undetected",onClick:function(){l("disconnect",{item:"lathe"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Circuit Imprinter",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!s,content:s?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"imprinter"})}})})]})})}},2247:function(e,n,t){"use strict";t.r(n),t.d(n,{MENU:()=>h,PRINTER_MENU:()=>m,RndConsole:()=>g});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4080),c=t(9529),s=t(9760),u=t(7726),d=t(3321),f=i.tU.Tab,h={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},m={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},p=function(e){switch(e){case h.MAIN:return(0,r.jsx)(b,{});case h.DISK:return(0,r.jsx)(c.DataDiskMenu,{});case h.ANALYZE:return(0,r.jsx)(a.AnalyzerMenu,{});case h.LATHE:case h.IMPRINTER:return(0,r.jsx)(s.LatheMenu,{});case h.SETTINGS:return(0,r.jsx)(d.SettingsMenu,{});default:return"UNKNOWN MENU"}},x=function(e){var n=(0,o.Oc)(),t=n.act,i=n.data.menu,l=e.menu,a=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nd});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t-1});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Network Configuration",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Network Name",children:(0,r.jsx)(o.$n,{content:h||"Unset",selected:h,icon:"edit",onClick:function(){return t("network_name")}})}),(0,r.jsx)(o.Ki.Item,{label:"Network Password",children:(0,r.jsx)(o.$n,{content:f||"Unset",selected:f,icon:"lock",onClick:function(){return t("network_password")}})})]})}),(0,r.jsxs)(o.wn,{title:"Connected Devices",children:[(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:"ALL"===s,onClick:function(){return d("ALL")},icon:"network-wired",children:"All Devices"},"AllDevices"),(0,r.jsx)(o.tU.Tab,{selected:"SRV"===s,onClick:function(){return d("SRV")},icon:"server",children:"R&D Servers"},"RNDServers"),(0,r.jsx)(o.tU.Tab,{selected:"RDC"===s,onClick:function(){return d("RDC")},icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,r.jsx)(o.tU.Tab,{selected:"MFB"===s,onClick:function(){return d("MFB")},icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,r.jsx)(o.tU.Tab,{selected:"MSC"===s,onClick:function(){return d("MSC")},icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Device Name"}),(0,r.jsx)(o.XI.Cell,{children:"Device ID"}),(0,r.jsx)(o.XI.Cell,{children:"Unlink"})]}),x.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink_device",{dclass:e.dclass,uid:e.id})}})})]},e.id)})]})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.designs,s=u((0,i.useState)(""),2),d=s[0],f=s[1];return(0,r.jsxs)(o.wn,{title:"Design Management",children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for designs",mb:2,onChange:function(e){return f(e)}}),c.filter((0,l.XZ)(d,function(e){return e.name})).map(function(e){return(0,r.jsx)(o.$n.Checkbox,{fluid:!0,content:e.name,checked:!e.blacklisted,onClick:function(){return t(e.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:e.uid})}},e.name)})]})}},5156:function(e,n,t){"use strict";t.r(n),t.d(n,{RndServer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.active,d=a.network_name;return(0,r.jsx)(l.p8,{width:600,height:500,resizable:!0,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Server Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine power",children:(0,r.jsx)(i.$n,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link status",children:null===d?(0,r.jsx)(i.az,{color:"red",children:"Unlinked"}):(0,r.jsx)(i.az,{color:"green",children:"Linked"})})]})}),null===d?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.network_name;return(0,r.jsx)(i.wn,{title:"Network Info",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected network ID",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.netname}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},7868:function(e,n,t){"use strict";t.r(n),t.d(n,{RobotSelfDiagnosis:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e,n){var t=e/n;return t<=.2?"good":t<=.5?"average":"bad"},s=function(e){var n=(0,l.Oc)().data.component_data;return(0,r.jsx)(a.p8,{width:280,height:480,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:n.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),children:e.installed<=0?(0,r.jsx)(i.IC,{m:-.5,height:3.5,color:"red",style:{fontStyle:"normal"},children:(0,r.jsx)(i.so,{height:"100%",children:(0,r.jsx)(i.so.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{width:"72%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",color:c(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",color:c(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,r.jsx)(i.Ki.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},n)})})})}},1696:function(e,n,t){"use strict";t.r(n),t.d(n,{RoboticsControlConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.can_hack,u=a.safety,d=a.show_lock_all,f=a.cyborgs;return(0,r.jsx)(l.p8,{width:500,height:460,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!d&&(0,r.jsxs)(i.wn,{title:"Emergency Lock Down",children:[(0,r.jsx)(i.$n,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){return t("arm",{})}}),(0,r.jsx)(i.$n,{icon:"lock",disabled:u,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return t("masslock",{})}})]}),(0,r.jsx)(c,{cyborgs:void 0===f?[]:f,can_hack:s})]})})},c=function(e){var n=e.cyborgs;e.can_hack;var t=(0,o.Oc)(),l=t.act,a=t.data,c="Detonate";return(a.detonate_cooldown>0&&(c+=" ("+a.detonate_cooldown+"s)"),n.length)?n.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[!!e.hackable&&!e.emagged&&(0,r.jsx)(i.$n,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return l("hackbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!a.auth,onClick:function(){return l("stopbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"bomb",content:c,disabled:!a.auth||a.detonate_cooldown>0,color:"bad",onClick:function(){return l("killbot",{uid:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.az,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,r.jsx)(i.az,{children:e.locstring})}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:(0,r.jsx)(i.z2,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Capacity",children:(0,r.jsx)(i.az,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})]})||(0,r.jsx)(i.Ki.Item,{label:"Cell",children:(0,r.jsx)(i.az,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,r.jsx)(i.Ki.Item,{label:"Safeties",children:(0,r.jsx)(i.az,{color:"bad",children:"DISABLED"})}),(0,r.jsx)(i.Ki.Item,{label:"Module",children:e.module}),(0,r.jsx)(i.Ki.Item,{label:"Master AI",children:(0,r.jsx)(i.az,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)}):(0,r.jsx)(i.IC,{children:"No cyborg units detected within access parameters."})}},5826:function(e,n,t){"use strict";t.r(n),t.d(n,{Safe:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=(n.act,n.data),i=t.dial,c=t.open;return t.locked,t.contents,(0,r.jsx)(a.p8,{theme:"safe",width:600,height:800,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsxs)(o.az,{className:"Safe--engraving",children:[(0,r.jsx)(s,{}),(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"25%"}),(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,r.jsx)(o.In,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,r.jsx)("br",{}),c?(0,r.jsx)(u,{}):(0,r.jsx)(o.az,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*i+"deg)",zIndex:0}})]}),!c&&(0,r.jsx)(d,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.dial,c=i.open,s=i.locked,u=function(e,n){return(0,r.jsx)(o.$n,{disabled:c||n&&!s,icon:"arrow-"+(n?"right":"left"),content:(n?"Right":"Left")+" "+e,iconRight:n,onClick:function(){return t(n?"turnleft":"turnright",{num:e})},style:{zIndex:10}})};return(0,r.jsxs)(o.az,{className:"Safe--dialer",children:[(0,r.jsx)(o.$n,{disabled:s,icon:c?"lock":"lock-open",content:c?"Close":"Open",mb:"0.5rem",onClick:function(){return t("open")}}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{position:"absolute",children:[u(50),u(10),u(1)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[u(1,!0),u(10,!0),u(50,!0)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--number",children:a})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.contents;return(0,r.jsx)(o.az,{className:"Safe--contents",overflow:"auto",children:a.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsxs)(o.$n,{mb:"0.5rem",onClick:function(){return t("retrieve",{index:n+1})},children:[(0,r.jsx)(o.az,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,r.jsx)("br",{})]},e)})})},d=function(e){return(0,r.jsxs)(o.wn,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,r.jsxs)(o.az,{children:["1. Turn the dial left to the first number.",(0,r.jsx)("br",{}),"2. Turn the dial right to the second number.",(0,r.jsx)("br",{}),"3. Continue repeating this process for each number, switching between left and right each time.",(0,r.jsx)("br",{}),"4. Open the safe."]}),(0,r.jsx)(o.az,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},1892:function(e,n,t){"use strict";t.r(n),t.d(n,{SatelliteControl:()=>u,SatelliteControlFooter:()=>h,SatelliteControlMapView:()=>f,SatelliteControlSatellitesList:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=d?"good":"average",value:u,maxValue:100,children:[u,"%"]})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{content:"Check coverage",disabled:f,onClick:function(){return t("begin_test")}})})]})})}),(0,r.jsx)(o.BJ.Item,{color:c,children:a})]})}},7943:function(e,n,t){"use strict";t.r(n),t.d(n,{SecureStorage:()=>s});var r=t(8138),i=t(7790),o=t(7686),l=t(5490),a=t(2864),c=t(3384),s=function(e){return(0,r.jsx)(c.p8,{theme:"securestorage",height:500,width:280,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})})})})})},u=function(e){var n=(0,a.Oc)().act,t=window.event?e.which:e.keyCode;if(t===o.Ri){e.preventDefault(),n("keypad",{digit:"E"});return}if(t===o.s6){e.preventDefault(),n("keypad",{digit:"C"});return}if(t===o.ye){e.preventDefault(),n("backspace");return}if(t>=o.Pm&&t<=o.Wy){e.preventDefault(),n("keypad",{digit:t-o.Pm});return}if(t>=o.hr&&t<=o.C){e.preventDefault(),n("keypad",{digit:t-o.hr});return}},d=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),o=t.locked,c=t.no_passcode,s=t.emagged,d=t.user_entered_code;return(0,r.jsx)(i.wn,{fill:!0,className:"SecureStorage",onKeyDown:function(e){return u(e)},children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:7.3,children:(0,r.jsx)(i.az,{className:(0,l.Ly)(["SecureStorage__displayBox","SecureStorage__displayBox--"+(c?"":o?"bad":"good")]),height:"100%",children:s?"ERROR":d})}),(0,r.jsx)(i.BJ.Item,{align:"center",children:(0,r.jsx)(i.XI,{collapsing:!0,children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map(function(e){return(0,r.jsx)(i.XI.Row,{children:e.map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(f,{number:e})},e)})},e[0])})})})]})})},f=function(e){var n=(0,a.Oc)(),t=n.act;n.data;var o=e.number;return(0,r.jsx)(i.$n,{bold:!0,fluid:!0,textAlign:"center",fontSize:"55px",lineHeight:1.25,width:"80px",className:(0,l.Ly)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+o]),onClick:function(){return t("keypad",{digit:o})},children:o})}},8589:function(e,n,t){"use strict";t.r(n),t.d(n,{SecurityRecords:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=n},r=function(e,n){return e<=n},i=e.split(" "),o=[],l=!0,a=!1,c=void 0;try{for(var s,u=i[Symbol.iterator]();!(l=(s=u.next()).done);l=!0){var d=function(){var e=s.value.split(":");if(0===e.length)return"continue";if(1===e.length)return o.push(function(n){return(n.name+" ("+n.variant+")").toLocaleLowerCase().includes(e[0].toLocaleLowerCase())}),"continue";if(e.length>2)return{v:function(e){return!1}};var i=void 0,l=n;if("-"===e[1][e[1].length-1]?(l=r,i=Number(e[1].substring(0,e[1].length-1))):"+"===e[1][e[1].length-1]?(l=t,i=Number(e[1].substring(0,e[1].length-1))):i=Number(e[1]),isNaN(i))return{v:function(e){return!1}};switch(e[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":o.push(function(e){return l(e.lifespan,i)});break;case"e":case"end":case"endurance":o.push(function(e){return l(e.endurance,i)});break;case"m":case"mat":case"maturation":o.push(function(e){return l(e.maturation,i)});break;case"pr":case"prod":case"production":o.push(function(e){return l(e.production,i)});break;case"y":case"yield":o.push(function(e){return l(e.yield,i)});break;case"po":case"pot":case"potency":o.push(function(e){return l(e.potency,i)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":o.push(function(e){return l(e.amount,i)});break;default:return{v:function(e){return!1}}}}();if("object"==(d&&"undefined"!=typeof Symbol&&d.constructor===Symbol?"symbol":typeof d))return d.v}}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return function(e){var n=!0,t=!1,r=void 0;try{for(var i,l=o[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)if(!(0,i.value)(e))return!1}catch(e){t=!0,r=e}finally{try{n||null==l.return||l.return()}finally{if(t)throw r}}return!0}},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=(0,i.useContext)(d),s=c.searchTextState,f=c.vendAmountState,m=c.sortIdState,x=c.sortOrderState,g=u(s,2),j=g[0];g[1];var b=u(f,2),y=b[0];b[1];var v=u(m,2),w=v[0];v[1];var k=u(x,2),_=k[0];k[1];var C=a.icons,I=a.seeds;return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(o.XI,{className:"SeedExtractor__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(p,{id:"name",children:"Name"}),(0,r.jsx)(p,{id:"lifespan",children:"Lifespan"}),(0,r.jsx)(p,{id:"endurance",children:"Endurance"}),(0,r.jsx)(p,{id:"maturation",children:"Maturation"}),(0,r.jsx)(p,{id:"production",children:"Production"}),(0,r.jsx)(p,{id:"yield",children:"Yield"}),(0,r.jsx)(p,{id:"potency",children:"Potency"}),(0,r.jsx)(p,{id:"amount",children:"Stock"})]}),0===I.length?"No seeds present.":I.filter(h(j)).sort(function(e,n){var t=_?1:-1;return"number"==typeof e[w]?(e[w]-n[w])*t:e[w].localeCompare(n[w])*t}).map(function(e){return(0,r.jsxs)(o.XI.Row,{onClick:function(){return t("vend",{seed_id:e.id,seed_variant:e.variant,vend_amount:y})},children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(C[e.image]),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),e.name]}),(0,r.jsx)(o.XI.Cell,{children:e.lifespan}),(0,r.jsx)(o.XI.Cell,{children:e.endurance}),(0,r.jsx)(o.XI.Cell,{children:e.maturation}),(0,r.jsx)(o.XI.Cell,{children:e.production}),(0,r.jsx)(o.XI.Cell,{children:e.yield}),(0,r.jsx)(o.XI.Cell,{children:e.potency}),(0,r.jsx)(o.XI.Cell,{children:e.amount})]},e.id)})]})})})},p=function(e){var n=(0,i.useContext)(d),t=n.sortIdState,l=n.sortOrderState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1],p=e.id,x=e.children;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:c!==p&&"transparent",fluid:!0,onClick:function(){c===p?m(!h):(s(p),m(!0))},children:[x,c===p&&(0,r.jsx)(o.In,{name:h?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e){var n=(0,i.useContext)(d),t=n.searchTextState,l=n.vendAmountState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1];return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{placeholder:"Search by name, variant, potency:70+, production:3-, ...",fluid:!0,onChange:function(e){return s(e)},value:c})}),(0,r.jsxs)(o.BJ.Item,{children:["Vend amount:",(0,r.jsx)(o.pd,{placeholder:"1",onChange:function(e){return m(Number(e)>=1?Number(e):1)},value:"".concat(h)})]})]})}},631:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:350,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:a.status?a.status:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Missing"})}),!!a.shuttle&&(!!a.docking_ports_len&&(0,r.jsx)(i.Ki.Item,{label:"Send to ",children:a.docking_ports.map(function(e){return(0,r.jsx)(i.$n,{icon:"chevron-right",content:e.name,onClick:function(){return t("move",{move:e.id})}},e.name)})})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Locked"})}),!!a.admin_controlled&&(0,r.jsx)(i.Ki.Item,{label:"Authorization",children:(0,r.jsx)(i.$n,{icon:"exclamation-circle",content:"Request Authorization",disabled:!a.status,onClick:function(){return t("request")}})})]}))]})})})})}},5060:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleManipulator:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)();return 0===(n.act,n.data).active?(0,r.jsx)(s,{}):(0,r.jsx)(u,{})},s=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.singularities;return(0,r.jsx)(a.p8,{width:450,height:185,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Detected Singularities",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Refresh",onClick:function(){return t("refresh")}}),children:(0,r.jsx)(i.XI,{children:(void 0===c?[]:c).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.singularity_id+". "+e.area_name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,width:"120px",children:(0,r.jsx)(i.z2,{value:e.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(e.stage)})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.$n,{content:"Details",onClick:function(){return t("view",{view:e.singularity_id})}})})]},e.singularity_id)})})})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.active;var s=c.singulo_stage,u=c.singulo_potential_stage,d=c.singulo_energy,f=c.singulo_high,h=c.singulo_low,m=c.generators;return(0,r.jsx)(a.p8,{width:550,height:185,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Stage",children:(0,r.jsx)(i.z2,{value:s,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(s)})}),(0,r.jsx)(i.Ki.Item,{label:"Potential Stage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:6,ranges:{good:[1,s+.5],average:[s+.5,s+1.5],bad:[s+1.5,s+2]},children:(0,o.Mg)(u)})}),(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsx)(i.z2,{value:d,minValue:h,maxValue:f,ranges:{good:[.67*f+.33*h,f],average:[.33*f+.67*h,.67*f+.33*h],bad:[h,.33*f+.67*h]},children:(0,o.Mg)(d)+"MJ"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return t("back")}}),children:(0,r.jsx)(i.Ki,{children:(void 0===m?[]:m).map(function(e){return(0,r.jsx)(i.Ki.Item,{label:"Remaining Charge",children:(0,r.jsx)(i.z2,{value:e.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.Mg)(e.charge)})},e.gen_index)})})})})]})})})}},1495:function(e,n,t){"use strict";t.r(n),t.d(n,{Sleeper:()=>f});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,1/0]},d=["bad","average","average","good","average","average","bad"],f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).hasOccupant?(0,r.jsx)(h,{}):(0,r.jsx)(j,{});return(0,r.jsx)(a.p8,{width:550,height:760,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:t}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(x,{})})]})})})},h=function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{}),(0,r.jsx)(p,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.occupant,u=a.auto_eject_dead;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Auto-eject if dead:\xa0"}),(0,r.jsx)(i.$n,{icon:u?"toggle-on":"toggle-off",selected:u,content:u?"On":"Off",onClick:function(){return t("auto_eject_dead_"+(u?"off":"on"))}}),(0,r.jsx)(i.$n,{icon:"user-slash",content:"Eject",onClick:function(){return t("ejectify")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:s.maxHealth,value:s.health,ranges:{good:[.5*s.maxHealth,1/0],average:[0,.5*s.maxHealth],bad:[-1/0,0]},children:(0,o.LI)(s.health,0)})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[s.stat][0],children:c[s.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.maxTemp,value:s.bodyTemperature,color:d[s.temperatureSuitability+3],children:[(0,o.LI)(s.btCelsius,0),"\xb0C, ",(0,o.LI)(s.btFaren,0),"\xb0F"]})}),!!s.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.bloodMax,value:s.bloodLevel,ranges:{bad:[-1/0,.6*s.bloodMax],average:[.6*s.bloodMax,.9*s.bloodMax],good:[.9*s.bloodMax,1/0]},children:[s.bloodPercent,"%, ",s.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",verticalAlign:"middle",children:[s.pulse," BPM"]})]})]})})},p=function(e){var n=(0,l.Oc)().data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant Damage",children:(0,r.jsx)(i.Ki,{children:s.map(function(e,t){var l=n[e[1]],a="number"==typeof l?l:0;return(0,r.jsx)(i.Ki.Item,{label:e[0],children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:a,ranges:u,children:(0,o.LI)(a,0)},t)},t)})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.hasOccupant,c=o.isBeakerLoaded,s=o.beakerMaxSpace,u=o.beakerFreeSpace,d=o.dialysis&&u>0;return(0,r.jsx)(i.wn,{title:"Dialysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!c||u<=0||!a,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Active":"Inactive",onClick:function(){return t("togglefilter")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"eject",content:"Eject",onClick:function(){return t("removebeaker")}})]}),children:c?(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Space",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:u,ranges:{good:[.5*s,1/0],average:[.25*s,.5*s],bad:[-1/0,.25*s]},children:[u,"u"]})})}):(0,r.jsx)(i.az,{color:"label",children:"No beaker loaded."})})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.occupant,c=o.chemicals,s=o.maxchem,u=o.amounts;return(0,r.jsx)(i.wn,{title:"Occupant Chemicals",children:c.map(function(e,n){var o,l="";return e.overdosing?(l="bad",o=(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(l="average",o=(0,r.jsxs)(i.az,{color:"average",children:[(0,r.jsx)(i.In,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsx)(i.wn,{title:e.title,buttons:o,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:e.occ_amount,color:l,mr:"0.5rem",children:[e.pretty_amount,"/",s,"u"]}),u.map(function(n,o){return(0,r.jsx)(i.$n,{disabled:!e.injectable||e.occ_amount+n>s||2===a.stat,icon:"syringe",content:"Inject ".concat(n,"u"),mb:"0",height:"19px",onClick:function(){return t("chemical",{chemid:e.id,amount:n})}},o)})]})})},n)})})},j=function(e){return(0,r.jsx)(i.wn,{fill:!0,textAlign:"center",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},6526:function(e,n,t){"use strict";t.r(n),t.d(n,{SlotMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return null===c.money?(0,r.jsx)(l.p8,{width:350,height:90,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:"Could not scan your card or could not find account!"}),(0,r.jsx)(i.az,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===c.plays?c.plays+" player has tried their luck today!":c.plays+" players have tried their luck today!",(0,r.jsx)(l.p8,{width:300,height:151,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{lineHeight:2,children:n}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Credits Remaining",children:(0,r.jsx)(i.zv,{value:c.money})}),(0,r.jsx)(i.Ki.Item,{label:"10 credits to spin",children:(0,r.jsx)(i.$n,{icon:"coins",disabled:c.working,content:c.working?"Spinning...":"Spin",onClick:function(){return a("spin")}})})]}),(0,r.jsx)(i.az,{bold:!0,lineHeight:2,color:c.resultlvl,children:c.result})]})})}))}},1645:function(e,n,t){"use strict";t.r(n),t.d(n,{Smartfridge:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.secure,s=a.can_dry,u=a.drying,d=a.contents;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(i.IC,{children:"Secure Access: Please have your identification ready."}),(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s?"Drying rack":"Contents",buttons:!!s&&(0,r.jsx)(i.$n,{width:4,icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return t("drying")}}),children:[!d&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"cookie-bite",size:5,color:"brown"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No products loaded."]})}),!!d&&d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:"55%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,r.jsxs)(i.BJ.Item,{width:13,children:[(0,r.jsx)(i.$n,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return t("vend",{index:e.vend,amount:1})}}),(0,r.jsx)(i.Q7,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(n){return t("vend",{index:e.vend,amount:n})}}),(0,r.jsx)(i.$n,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){return t("vend",{index:e.vend,amount:e.quantity})}})]})]},e)})]})]})})})}},1399:function(e,n,t){"use strict";t.r(n),t.d(n,{Smes:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.capacityPercent,u=(c.capacity,c.charge),d=c.inputAttempt,f=c.inputting,h=c.inputLevel,m=c.inputLevelMax,p=c.inputAvailable,x=c.outputPowernet,g=c.outputAttempt,j=c.outputting,b=c.outputLevel,y=c.outputLevelMax,v=c.outputUsed,w=s>=100&&"good"||f&&"average"||"bad";return(0,r.jsx)(a.p8,{width:340,height:360,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stored Energy",children:(0,r.jsx)(i.z2,{value:.01*s,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,r.jsx)(i.wn,{title:"Input",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Charge Mode",buttons:(0,r.jsx)(i.$n,{icon:d?"sync-alt":"times",selected:d,onClick:function(){return t("tryinput")},children:d?"Auto":"Off"}),children:(0,r.jsx)(i.az,{color:w,children:s>=100&&"Fully Charged"||f&&"Charging"||"Not Charging"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Input",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===h,onClick:function(){return t("input",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===h,onClick:function(){return t("input",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:h/1e3,fillValue:p/1e3,minValue:0,maxValue:m/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("input",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:h===m,onClick:function(){return t("input",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:h===m,onClick:function(){return t("input",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Available",children:(0,o.d5)(p)})]})}),(0,r.jsx)(i.wn,{fill:!0,title:"Output",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Output Mode",buttons:(0,r.jsx)(i.$n,{icon:g?"power-off":"times",selected:g,onClick:function(){return t("tryoutput")},children:g?"On":"Off"}),children:(0,r.jsx)(i.az,{color:j&&"good"||u>0&&"average"||"bad",children:x?j?"Sending":u>0?"Not Sending":"No Charge":"Not Connected"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Output",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===b,onClick:function(){return t("output",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===b,onClick:function(){return t("output",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:b/1e3,minValue:0,maxValue:y/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("output",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:b===y,onClick:function(){return t("output",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:b===y,onClick:function(){return t("output",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Outputting",children:(0,o.d5)(v)})]})})]})})})}},1343:function(e,n,t){"use strict";t.r(n),t.d(n,{SolarControl:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.generated,u=c.generated_ratio,d=c.tracking_state,f=c.tracking_rate,h=c.connected_panels,m=c.connected_tracker,p=c.cdir,x=c.direction,g=c.rotating_direction;return(0,r.jsx)(a.p8,{width:490,height:277,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Scan for new hardware",onClick:function(){return t("refresh")}}),children:(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Solar tracker",color:m?"good":"bad",children:m?"OK":"N/A"}),(0,r.jsx)(i.Ki.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(0,r.jsx)(l.xA.Column,{size:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power output",children:(0,r.jsx)(i.z2,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:u,children:s+" W"})}),(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[p,"\xb0 (",x,")"]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[2===d&&(0,r.jsx)(i.az,{children:" Automated "}),1===d&&(0,r.jsxs)(i.az,{children:[" ",f,"\xb0/h (",g,")"," "]}),0===d&&(0,r.jsx)(i.az,{children:" Tracker offline "})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[2!==d&&(0,r.jsx)(i.Q7,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onChange:function(e){return t("cdir",{cdir:e})}}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker status",children:[(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:0===d,onClick:function(){return t("track",{track:0})}}),(0,r.jsx)(i.$n,{icon:"clock-o",content:"Timed",selected:1===d,onClick:function(){return t("track",{track:1})}}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:2===d,disabled:!m,onClick:function(){return t("track",{track:2})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[1===d&&(0,r.jsx)(i.Q7,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:f,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onChange:function(e){return t("tdir",{tdir:e})}}),0===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Tracker offline "}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},4263:function(e,n,t){"use strict";t.r(n),t.d(n,{SpawnersMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.spawners||[];return(0,r.jsx)(l.p8,{width:700,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{children:a.map(function(e){return(0,r.jsxs)(i.wn,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return t("jump",{ID:e.uids})}}),(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return t("spawn",{ID:e.uids})}})]}),children:[(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)})})})})}},8729:function(e,n,t){"use strict";t.r(n),t.d(n,{SpecMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return(0,r.jsx)(l.p8,{width:1100,height:600,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("hemomancer")}}),children:[(0,r.jsx)("h3",{children:"Focuses on blood magic and the manipulation of blood around you."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Vampiric claws"}),": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood Barrier"}),": Unlocked at 250 blood, allows you to select two turfs and create a wall between them."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood tendrils"}),": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Sanguine pool"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Predator senses"}),": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood eruption"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"The blood bringers rite"}),": 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."]})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("umbrae")}}),children:[(0,r.jsx)("h3",{children:"Focuses on darkness, stealth ambushing and mobility."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Cloak of darkness"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow anchor"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow snare"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Dark passage"}),": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Extinguish"}),": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms."]}),(0,r.jsx)("b",{children:"Shadow boxing"}),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Eternal darkness"}),": 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."]}),(0,r.jsx)("p",{children:"In addition, you also gain permanent X-ray vision."})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("gargantua")}}),children:[(0,r.jsx)("h3",{children:"Focuses on tenacity and melee damage."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rejuvenate"}),": Will heal you at an increased rate based on how much damage you have taken."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell"}),": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Seismic stomp"}),": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood rush"}),": Unlocked at 250 blood, gives you a short speed boost when cast."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell II"}),": Unlocked at 400 blood, increases all melee damage by 10."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Overwhelming force"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Demonic grasp"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Charge"}),": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Desecrated Duel"}),": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages."]})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("dantalion")}}),children:[(0,r.jsx)("h3",{children:"Focuses on thralling and illusions."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Enthrall"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall cap"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall commune"}),": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Subspace swap"}),": Unlocked at 250 blood, allows you to swap positions with a target."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Pacify"}),": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Decoy"}),": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rally thralls"}),": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood bond"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Mass Hysteria"}),": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals."]})]})})}},9469:function(e,n,t){"use strict";t.r(n),t.d(n,{StackCraft:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:e*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:e})}}))}()}catch(e){u=!0,d=e}finally{try{s||null==h.return||h.return()}finally{if(u)throw d}}return -1===l.indexOf(i)&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:i*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:i})}})),(0,r.jsx)(r.Fragment,{children:c.map(function(e){return e})})},x=function(e){return Object.entries(e.recipes).map(function(e){var n=u(e,2),t=n[0],i=n[1];return m(i)?(0,r.jsx)(o.Nt,{title:t,child_mt:0,childStyles:{padding:"0.5em",backgroundColor:"rgba(62, 97, 137, 0.15)",border:"1px solid rgba(255, 255, 255, 0.1)",borderTop:"none",borderRadius:"0 0 0.33em 0.33em"},children:(0,r.jsx)(o.az,{p:1,pb:.25,children:(0,r.jsx)(x,{recipes:i})})},t):(0,r.jsx)(g,{title:t,recipe:i},t)})},g=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.amount,l=e.title,c=e.recipe,s=c.result_amount,u=c.required_amount,d=c.max_result_amount,f=c.uid,h=c.icon,m=c.icon_state,x=c.image,g="".concat(s>1?"".concat(s,"x "):"").concat(l),j="".concat(u," sheet").concat(u>1?"s":""),b=c.required_amount>i?0:Math.floor(i/c.required_amount);return(0,r.jsx)(o.c_,{fluid:!0,base64:x,dmIcon:h,dmIconState:m,imageSize:32,disabled:!b,tooltip:j,buttons:d>1&&b>1&&(0,r.jsx)(p,{recipe:c,max_possible_multiplier:b}),onClick:function(){return t("make",{recipe_uid:f,multiplier:1})},children:g})}},5592:function(e,n,t){"use strict";t.r(n),t.d(n,{StationAlertConsole:()=>a,StationAlertConsoleContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){return(0,r.jsx)(l.p8,{width:325,height:500,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().data.alarms||[],t=n.Fire||[],l=n.Atmosphere||[],a=n.Power||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Fire Alarms",children:(0,r.jsxs)("ul",{children:[0===t.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),t.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Atmospherics Alarms",children:(0,r.jsxs)("ul",{children:[0===l.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),l.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Power Alarms",children:(0,r.jsxs)("ul",{children:[0===a.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),a.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})})]})}},5651:function(e,n,t){"use strict";t.r(n),t.d(n,{StationTraitsPanel:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:f.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n,{color:"red",icon:"times",onClick:function(){t("setup_future_traits",{station_traits:(0,i.pb)((0,i.Tj)(f,function(e){return e.path}),function(n){return n!==e.path})})},children:"Delete"})})]})},e.path)})}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No station traits will run next round."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){return t("clear_future_traits")},children:"Run Station Traits Normally"})]}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No future station traits are planned."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){return t("setup_future_traits",{station_traits:[]})},children:"Prevent station traits from running next round"})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data;return i.current_traits.length>0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:i.current_traits.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n.Confirm,{content:"Revert",color:"red",disabled:i.too_late_to_revert||!e.can_revert,tooltip:!e.can_revert&&"This trait is not revertable."||i.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){return t("revert",{ref:e.ref})}})})]})},e.ref)})}):(0,r.jsx)(l.az,{textAlign:"center",children:"There are no active station traits."})},m=function(e){var n,t=u((0,o.useState)(1),2),i=t[0],a=t[1];switch(i){case 0:n=(0,r.jsx)(f,{});break;case 1:n=(0,r.jsx)(h,{});break;default:throw Error("Unhandled case: ".concat(i))}return(0,r.jsx)(c.p8,{title:"Modify Station Traits",height:350,width:350,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.tU,{children:[(0,r.jsx)(l.tU.Tab,{icon:"eye",selected:1===i,onClick:function(){return a(1)},children:"View"}),(0,r.jsx)(l.tU.Tab,{icon:"edit",selected:0===i,onClick:function(){return a(0)},children:"Edit"})]})}),(0,r.jsxs)(l.BJ.Item,{m:0,children:[(0,r.jsx)(l.cG,{}),n]})]})})})}},5724:function(e,n,t){"use strict";t.r(n),t.d(n,{StripMenu:()=>x});var r=t(8138),i=t(8587),o=t(7790),l=t(8595),a=t(2864),c=t(3384),s=function(e){return 0===e?5:9},u="64px",d=function(e){return"".concat(e[0],"/").concat(e[1])},f=function(e){var n=e.align,t=e.children;return(0,r.jsx)(o.az,{style:{position:"absolute",left:"left"===n?"6px":"48px",textAlign:n,textShadow:"2px 2px 2px #000",top:"2px"},children:t})},h={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},m={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,4]),image:"inventory-pda.png"}},p={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,8]),image:"inventory-pda.png"}},x=function(e){var n=(0,a.Oc)(),t=n.act,f=n.data,x=new Map;if(0===f.show_mode){var g=!0,j=!1,b=void 0;try{for(var y,v=Object.keys(f.items)[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var w=y.value;x.set(m[w].gridSpot,w)}}catch(e){j=!0,b=e}finally{try{g||null==v.return||v.return()}finally{if(j)throw b}}}else{var k=!0,_=!1,C=void 0;try{for(var I,S=Object.keys(f.items)[Symbol.iterator]();!(k=(I=S.next()).done);k=!0){var O=I.value;x.set(p[O].gridSpot,O)}}catch(e){_=!0,C=e}finally{try{k||null==S.return||S.return()}finally{if(_)throw C}}}return 0===x.size?(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsx)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:"No slots"})})})}):(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,i.y1)(0,5).map(function(e){return(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,i.y1)(0,s(f.show_mode)).map(function(n){var i,a,c,s=d([e,n]),p=x.get(s);if(!p)return(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u}},s);var g=f.items[p],j=m[p];return null===g?c=j.displayName:"name"in g?(a=(0,r.jsx)(o._V,{src:"data:image/jpeg;base64,".concat(g.icon),height:"100%",width:"100%",style:{imageRendering:"pixelated",verticalAlign:"middle"}}),c=g.name):"obscured"in g&&(a=(0,r.jsx)(o.In,{name:1===g.obscured?"ban":"eye-slash",size:3,ml:0,mt:2.5,color:"white",style:{textAlign:"center",height:"100%",width:"100%"}}),c="obscured ".concat(j.displayName)),null!==g&&"alternates"in g&&null!==g.alternates&&(i=g.alternates),(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u},children:(0,r.jsxs)(o.az,{style:{position:"relative",width:"100%",height:"100%"},children:[(0,r.jsxs)(o.$n,{onClick:function(){t("use",{key:p})},fluid:!0,color:(null==g?void 0:g.interacting)?"average":null,tooltip:c,style:{position:"relative",width:"100%",height:"100%",padding:0,backgroundColor:(null==g?void 0:g.cantstrip)?"transparent":"none"},children:[j.image&&(0,r.jsx)(o._V,{src:(0,l.l)(j.image),opacity:.7,style:{position:"absolute",width:"32px",height:"32px",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%) scale(2)"}}),(0,r.jsx)(o.az,{style:{position:"relative"},children:a}),j.additionalComponent]}),(0,r.jsx)(o.BJ,{direction:"row-reverse",children:void 0!==i&&i.map(function(e,n){var i=1.8*n;return(0,r.jsx)(o.BJ.Item,{width:"100%",children:(0,r.jsx)(o.$n,{onClick:function(){t("alt",{key:p,action_key:e})},tooltip:h[e].text,width:"1.8em",style:{background:"rgba(0, 0, 0, 0.6)",position:"absolute",bottom:0,right:"".concat(i,"em"),zIndex:2+n},children:(0,r.jsx)(o.In,{name:h[e].icon})})},n)})})]})},s)})})},e)})})})})}},2975:function(e,n,t){"use strict";t.r(n),t.d(n,{SuitStorage:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.uv;return(0,r.jsx)(l.p8,{width:400,height:260,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!n&&(0,r.jsx)(i.Rr,{backgroundColor:"black",opacity:.85,children:(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{bold:!0,textAlign:"center",mb:1,children:[(0,r.jsx)(i.In,{name:"spinner",spin:1,size:4,mb:4}),(0,r.jsx)("br",{}),"Disinfection of contents in progress..."]})})}),(0,r.jsx)(c,{}),(0,r.jsx)(u,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.helmet,c=l.suit,u=l.magboots,d=l.mask,f=l.storage,h=l.open,m=l.locked;return(0,r.jsx)(i.wn,{fill:!0,title:"Stored Items",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return t("cook")}}),(0,r.jsx)(i.$n,{content:m?"Unlock":"Lock",icon:m?"unlock":"lock",disabled:h,onClick:function(){return t("toggle_lock")}})]}),children:h&&!m?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(s,{object:a,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,r.jsx)(s,{object:c,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,r.jsx)(s,{object:u,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,r.jsx)(s,{object:d,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,r.jsx)(s,{object:f,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:m?"lock":"exclamation-circle",size:"5",mb:3}),(0,r.jsx)("br",{}),m?"The unit is locked.":"The unit is closed."]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.object,a=e.label,c=e.missingText,s=e.eject;return(0,r.jsx)(i.Ki.Item,{label:a,children:(0,r.jsx)(i.az,{my:.5,children:l?(0,r.jsx)(i.$n,{my:-1,icon:"eject",content:l,onClick:function(){return t(s)}}):(0,r.jsxs)(i.az,{color:"silver",bold:!0,children:["No ",c," found."]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.open,c=l.locked;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,content:a?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:a?"times-circle":"expand",color:a?"red":"green",disabled:c,textAlign:"center",onClick:function(){return t("toggle_open")}})})}},4835:function(e,n,t){"use strict";t.r(n),t.d(n,{SupermatterMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),k=(n=Math).max.apply(n,[1].concat(function(e){if(Array.isArray(e))return s(e)}(e=w.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:270,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:h/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Peak EER",children:(0,r.jsx)(i.z2,{value:p,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(p)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Nominal EER",children:(0,r.jsx)(i.z2,{value:m,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(m)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Gas Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:d(x),minValue:0,maxValue:d(1e4),ranges:{teal:[-1/0,d(80)],good:[d(80),d(373)],average:[d(373),d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(x)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Mole Per Tile",children:(0,r.jsx)(i.z2,{value:j,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.Mg)(j)+" mol"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:d(g),minValue:0,maxValue:d(5e4),ranges:{good:[d(1),d(300)],average:[-1/0,d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(g)+" kPa"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return u("back")}}),children:(0,r.jsx)(i.Ki,{children:w.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:k,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})]})})})}},2266:function(e,n,t){"use strict";t.r(n),t.d(n,{SyndicateComputerSimple:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{theme:"syndicate",width:400,height:400,children:(0,r.jsx)(l.p8.Content,{children:a.rows.map(function(e){return(0,r.jsxs)(i.wn,{title:e.title,buttons:(0,r.jsx)(i.$n,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return t(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,r.jsx)(i.az,{children:e.bullets.map(function(e){return(0,r.jsx)(i.az,{children:e},e)})})]},e.title)})})})}},8073:function(e,n,t){"use strict";t.r(n),t.d(n,{TEG:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return c.error?(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{title:"Error",children:[c.error,(0,r.jsx)(i.$n,{icon:"circle",content:"Recheck",onClick:function(){return t("check")}})]})})}):(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Cold Loop ("+c.cold_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Cold Inlet",children:[a(c.cold_inlet_temp)," K, ",a(c.cold_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Cold Outlet",children:[a(c.cold_outlet_temp)," K, ",a(c.cold_outlet_pressure)," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Hot Loop ("+c.hot_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Hot Inlet",children:[a(c.hot_inlet_temp)," K, ",a(c.hot_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Hot Outlet",children:[a(c.hot_outlet_temp)," K, ",a(c.hot_outlet_pressure)," kPa"]})]})}),(0,r.jsxs)(i.wn,{title:"Power Output",children:[a(c.output_power)," W",!!c.warning_switched&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},5808:function(e,n,t){"use strict";t.r(n),t.d(n,{TachyonArray:()=>a,TachyonArrayContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.records,u=void 0===s?[]:s,d=a.explosion_target,f=a.toxins_tech,h=a.printing;return(0,r.jsx)(l.p8,{width:500,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Shift's Target",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Current Toxins Level",children:f}),(0,r.jsxs)(i.Ki.Item,{label:"Administration",children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print All Logs",disabled:!u.length||h,align:"center",onClick:function(){return t("print_logs")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){return t("delete_logs")}})]})]})}),u.length?(0,r.jsx)(c,{}):(0,r.jsx)(i.IC,{children:"No Records"})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.wn,{title:"Logged Explosions",children:(0,r.jsx)(i.so,{children:(0,r.jsx)(i.so.Item,{children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Time"}),(0,r.jsx)(i.XI.Cell,{children:"Epicenter"}),(0,r.jsx)(i.XI.Cell,{children:"Actual Size"}),(0,r.jsx)(i.XI.Cell,{children:"Theoretical Size"})]}),(void 0===l?[]:l).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.logged_time}),(0,r.jsx)(i.XI.Cell,{children:e.epicenter}),(0,r.jsx)(i.XI.Cell,{children:e.actual_size_message}),(0,r.jsx)(i.XI.Cell,{children:e.theoretical_size_message}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return t("delete_record",{index:e.index})}})})]},e.index)})]})})})})}},5125:function(e,n,t){"use strict";t.r(n),t.d(n,{Tank:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.has_mask?(0,r.jsx)(i.Ki.Item,{label:"Mask",children:(0,r.jsx)(i.$n,{fluid:!0,width:"76%",icon:c.connected?"check":"times",content:c.connected?"Internals On":"Internals Off",selected:c.connected,onClick:function(){return a("internals")}})}):(0,r.jsx)(i.Ki.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,r.jsx)(l.p8,{width:325,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Tank Pressure",children:(0,r.jsx)(i.z2,{value:c.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:c.tankPressure+" kPa"})}),(0,r.jsxs)(i.Ki.Item,{label:"Release Pressure",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.ReleasePressure===c.minReleasePressure,tooltip:"Min",onClick:function(){return a("pressure",{pressure:"min"})}}),(0,r.jsx)(i.Q7,{animated:!0,value:parseFloat(c.releasePressure),width:"65px",unit:"kPa",minValue:c.minReleasePressure,maxValue:c.maxReleasePressure,onChange:function(e){return a("pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.ReleasePressure===c.maxReleasePressure,tooltip:"Max",onClick:function(){return a("pressure",{pressure:"max"})}}),(0,r.jsx)(i.$n,{icon:"undo",content:"",disabled:c.ReleasePressure===c.defaultReleasePressure,tooltip:"Reset",onClick:function(){return a("pressure",{pressure:"reset"})}})]}),n]})})})})}},7112:function(e,n,t){"use strict";t.r(n),t.d(n,{TankDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.o_tanks,s=a.p_tanks;return(0,r.jsx)(l.p8,{width:250,height:105,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:0===c,icon:"arrow-circle-down",onClick:function(){return t("oxygen")}})}),(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+s+")",disabled:0===s,icon:"arrow-circle-down",onClick:function(){return t("plasma")}})})]})})})}},3283:function(e,n,t){"use strict";t.r(n),t.d(n,{TcommsCore:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.linked,d=a.active,f=a.network_id;return(0,r.jsx)(l.p8,{width:600,height:292,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Relay Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine Power",children:(0,r.jsx)(i.$n,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Network ID",children:(0,r.jsx)(i.$n,{content:f||"Unset",selected:f,icon:"server",onClick:function(){return t("network_id")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link Status",children:1===u?(0,r.jsx)(i.az,{color:"green",children:"Linked"}):(0,r.jsx)(i.az,{color:"red",children:"Unlinked"})})]})}),1===u?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.linked_core_id,c=l.linked_core_addr,s=l.hidden_link;return(0,r.jsx)(i.wn,{title:"Link Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Linked Core ID",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Linked Core Address",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Hidden Link",children:(0,r.jsx)(i.$n,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){return t("toggle_hidden_link")}})}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.cores;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Sector"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:e.sector}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},5605:function(e,n,t){"use strict";t.r(n),t.d(n,{Teleporter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.targetsTeleport?a.targetsTeleport:{},s=a.calibrated,u=a.calibrating,d=a.powerstation,f=a.regime,h=a.teleporterhub,m=a.target,p=a.locked,x=a.adv_beacon_allowed,g=a.advanced_beacon_locking;return(0,r.jsx)(l.p8,{width:350,height:325,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(!d||!h)&&(0,r.jsxs)(i.wn,{fill:!0,title:"Error",children:[h,!d&&(0,r.jsx)(i.az,{color:"bad",children:" Powerstation not linked "}),d&&!h&&(0,r.jsx)(i.az,{color:"bad",children:" Teleporter hub not linked "})]}),d&&h&&(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Status",buttons:(0,r.jsx)(r.Fragment,{children:!!x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xa0"}),(0,r.jsx)(i.$n,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"Enabled":"Disabled",onClick:function(){return t("advanced_beacon_locking",{on:+!g})}})]})}),children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,r.jsxs)(i.BJ.Item,{children:[0===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),1===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),2===f&&(0,r.jsx)(i.az,{children:m})]})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Regime:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:1===f?"good":null,onClick:function(){return t("setregime",{regime:1})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:0===f?"good":null,onClick:function(){return t("setregime",{regime:0})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:2===f?"good":null,disabled:!p,onClick:function(){return t("setregime",{regime:2})}})})]}),(0,r.jsxs)(i.BJ,{label:"Calibration",mt:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,r.jsxs)(i.BJ.Item,{children:["None"!==m&&(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:15.8,textAlign:"center",mt:.5,children:u&&(0,r.jsx)(i.az,{color:"average",children:"In Progress"})||s&&(0,r.jsx)(i.az,{color:"good",children:"Optimal"})||(0,r.jsx)(i.az,{color:"bad",children:"Sub-Optimal"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{icon:"sync-alt",tooltip:"Calibrates the hub. \\ Accidents may occur when the \\ calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!s||!!u,onClick:function(){return t("calibrate")}})})]}),"None"===m&&(0,r.jsx)(i.az,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(p&&d&&h&&2===f)&&(0,r.jsx)(i.wn,{title:"GPS",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return t("load")}}),(0,r.jsx)(i.$n,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return t("eject")}})]})})]})})})})}},8336:function(e,n,t){"use strict";t.r(n),t.d(n,{TelescienceConsole:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)||(0,r.jsx)("ul",{children:m.map(function(e){return(0,r.jsx)("li",{children:e},e)})})]})}),(0,r.jsx)(o.wn,{title:"Telepad Status",children:1===f?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Bearing",children:(0,r.jsxs)(o.az,{inline:!0,position:"relative",children:[(0,r.jsx)(o.Q7,{unit:"\xb0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:v,value:j,onChange:function(e){C(e),s("setbear",{bear:e})}}),(0,r.jsx)(o.In,{ml:1,size:1,name:"arrow-up",rotation:_})]})}),(0,r.jsx)(o.Ki.Item,{label:"Current Elevation",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:v,value:b,onChange:function(e){return s("setelev",{elev:e})}})}),(0,r.jsx)(o.Ki.Item,{label:"Power Level",children:p.map(function(e,n){return(0,r.jsx)(o.$n,{content:e,selected:g===e,disabled:n>=x-1||v,onClick:function(){return s("setpwr",{pwr:n+1})}},e)})}),(0,r.jsx)(o.Ki.Item,{label:"Target Sector",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:w,value:y,disabled:v,onChange:function(e){return s("setz",{newz:e})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Telepad Actions",children:[(0,r.jsx)(o.$n,{content:"Send",disabled:v,onClick:function(){return s("pad_send")}}),(0,r.jsx)(o.$n,{content:"Receive",disabled:v,onClick:function(){return s("pad_receive")}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Crystal Maintenance",children:[(0,r.jsx)(o.$n,{content:"Recalibrate Crystals",disabled:v,onClick:function(){return s("recal_crystals")}}),(0,r.jsx)(o.$n,{content:"Eject Crystals",disabled:v,onClick:function(){return s("eject_crystals")}})]})]}):(0,r.jsx)(r.Fragment,{children:"No pad linked to console. Please use a multitool to link a pad."})}),(0,r.jsx)(o.wn,{title:"GPS Actions",children:1===h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Eject GPS",onClick:function(){return s("eject_gps")}}),(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Store Coordinates",onClick:function(){return s("store_to_gps")}})]}):(0,r.jsx)(r.Fragment,{children:"Please insert a GPS to store coordinates to it."})})]})})}},1745:function(e,n,t){"use strict";t.r(n),t.d(n,{TempGun:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,f=c.target_temperature,h=c.temperature,m=c.max_temp,p=c.min_temp;return(0,r.jsx)(a.p8,{width:250,height:121,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.Q7,{animate:!0,step:10,stepPixelSize:6,minValue:p,maxValue:m,value:f,format:function(e){return(0,o.Mg)(e,2)},width:"50px",onChange:function(e){return t("target_temperature",{target_temperature:e})}}),"\xb0C"]}),(0,r.jsx)(i.Ki.Item,{label:"Current Temperature",children:(0,r.jsxs)(i.az,{color:s(h),bold:h>500-273.15,children:[(0,r.jsx)(i.zv,{value:(0,o.LI)(h,2)}),"\xb0C"]})}),(0,r.jsx)(i.Ki.Item,{label:"Power Cost",children:(0,r.jsx)(i.az,{color:d(h),children:u(h)})})]})})})})},s=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},u=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},d=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},4273:function(e,n,t){"use strict";t.r(n),t.d(n,{TextInputModal:()=>m,removeAllSkiplines:()=>h,sanitizeMultiline:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=30,O=135+(b.length>30?Math.ceil(b.length/4):0)+75*!!S+(b.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:k,width:325,height:O,children:[w&&(0,r.jsx)(u.Loader,{value:w}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){e.key!==l._.Enter||S&&e.shiftKey||m("submit",{entry:C}),(0,l.KL)(e.key)&&m("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{color:"label",children:b})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.fs,{autoFocus:!0,autoSelect:!0,fluid:!0,height:y||C.length>=30?"100%":"1.8rem",maxLength:g,onEscape:function(){return m("cancel")},onChange:function(e){e!==C&&I(y?f(e):h(e))},placeholder:"Type something...",value:C})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:C,message:"".concat(C.length,"/").concat(g||"∞")})})]})})})]})}},9449:function(e,n,t){"use strict";t.r(n),t.d(n,{ThermoMachine:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(a.p8,{width:300,height:225,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:c.temperature,format:function(e){return(0,o.Mg)(e,2)}})," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[(0,r.jsx)(i.zv,{value:c.pressure,format:function(e){return(0,o.Mg)(e,2)}})," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Controls",buttons:(0,r.jsx)(i.$n,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Setting",textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){return t("cooling")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){return t("target",{target:c.min})}}),(0,r.jsx)(i.Q7,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onChange:function(e){return t("target",{target:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){return t("target",{target:c.max})}}),(0,r.jsx)(i.$n,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){return t("target",{target:c.initial})}})]})]})})]})})}},1760:function(e,n,t){"use strict";t.r(n),t.d(n,{TransferValve:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.tank_one,s=a.tank_two,u=a.attached_device,d=a.valve;return(0,r.jsx)(l.p8,{width:460,height:285,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Valve Status",children:(0,r.jsx)(i.$n,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!s,onClick:function(){return t("toggle")}})})})}),(0,r.jsx)(i.wn,{title:"Assembly",buttons:(0,r.jsx)(i.$n,{icon:"cog",content:"Configure Assembly",disabled:!u,onClick:function(){return t("device")}}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:u?(0,r.jsx)(i.$n,{icon:"eject",content:u,disabled:!u,onClick:function(){return t("remove_device")}}):(0,r.jsx)(i.az,{color:"average",children:"No Assembly"})})})}),(0,r.jsx)(i.wn,{title:"Attachment One",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:c?(0,r.jsx)(i.$n,{icon:"eject",content:c,disabled:!c,onClick:function(){return t("tankone")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})}),(0,r.jsx)(i.wn,{title:"Attachment Two",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:s?(0,r.jsx)(i.$n,{icon:"eject",content:s,disabled:!s,onClick:function(){return t("tanktwo")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})})]})})}},6971:function(e,n,t){"use strict";t.r(n),t.d(n,{TurbineComputer:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.compressor,s=o.compressor_broken,f=o.turbine,h=o.turbine_broken,m=o.online,p=o.throttle,x=(o.preBurnTemperature,o.bearingDamage),g=!!(l&&!s&&f&&!h);return(0,r.jsx)(c.p8,{width:400,height:415,children:(0,r.jsxs)(c.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:m?"power-off":"times",content:m?"Online":"Offline",selected:m,disabled:!g,onClick:function(){return t("toggle_power")}}),(0,r.jsx)(i.$n,{icon:"times",content:"Disconnect",onClick:function(){return t("disconnect")}})]}),children:g?(0,r.jsx)(d,{}):(0,r.jsx)(u,{})}),x>=100?(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:"Bearings Inoperable, Repair Required"})}):(0,r.jsx)(i.wn,{title:"Throttle",children:g?(0,r.jsx)(i.N6,{size:3,value:p,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,tickWhileDragging:!0,onChange:function(e,n){return t("set_throttle",{throttle:n})}}):""})]})})},u=function(e){var n=(0,a.Oc)().data,t=n.compressor,o=n.compressor_broken,l=n.turbine,c=n.turbine_broken;return n.online,(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Compressor Status",color:!t||o?"bad":"good",children:o?t?"Offline":"Missing":"Online"}),(0,r.jsx)(i.Ki.Item,{label:"Turbine Status",color:!l||c?"bad":"good",children:c?l?"Offline":"Missing":"Online"})]})},d=function(e){var n=(0,a.Oc)().data,t=n.rpm,c=n.temperature,s=n.power,u=n.bearingDamage,d=n.preBurnTemperature,f=n.postBurnTemperature,h=n.thermalEfficiency,m=n.compressionRatio,p=n.gasThroughput;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Turbine Speed",children:[(0,l.Mg)(t,2)," RPM"]}),(0,r.jsxs)(i.Ki.Item,{label:"Effective Compression Ratio",children:[(0,l.Mg)(m,2),":1"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Pre Burn Temp",children:[(0,l.Mg)(d,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Post Burn Temp",children:[(0,l.Mg)(f,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Compressor Temp",children:[(0,l.Mg)(c,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Thermal Efficiency",children:[(0,l.Mg)(100*h,2)," %"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gas Throughput",children:[(0,l.Mg)(p,2)," mol/s"]}),(0,r.jsx)(i.Ki.Item,{label:"Generated Power",children:(0,o.d5)(s)}),(0,r.jsx)(i.Ki.Item,{label:"Bearing Damage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,l.Mg)(u)+"%"})})]})}},8380:function(e,n,t){"use strict";t.r(n),t.d(n,{Uplink:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";if(e=(0,i.pb)(e,function(e){return!!e.name}),n){var t=(0,a.XZ)(n,function(e){var n="".concat(e.name,"|").concat(e.desc,"|").concat(e.cost,"tc");return e.hijack_only&&(n+="|hijack"),n});e=(0,i.pb)(e,function(e){return t(e)})}return(0,i.Ul)(e,function(e){return e.name})},v=function(e){if(b(e),""===e)return p(d[0].items);p(y(d.map(function(e){return e.items}).flat(),e))},w=f((0,o.useState)(1),2),k=w[0],_=w[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ,{vertical:!0,children:(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.wn,{title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:k,onClick:function(){return _(!k)}}),(0,r.jsx)(l.$n,{content:"Random Item",icon:"question",onClick:function(){return t("buyRandom")}}),(0,r.jsx)(l.$n,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return t("refund")}})]}),children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search Equipment",value:g,onChange:function(e){v(e)}})})})}),(0,r.jsxs)(l.BJ,{fill:!0,mt:.3,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.tU,{vertical:!0,children:d.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===g&&e.items===m,onClick:function(){p(e.items),b("")},children:e.cat},e.cat)})})})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.BJ,{vertical:!0,children:m.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:k},(0,a.jT)(e.name))},(0,a.jT)(e.name))})})})})]})]})},x=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,s=i.cart,u=i.crystals,d=i.cart_price,h=f((0,o.useState)(0),2),m=h[0],p=h[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:m,onClick:function(){return p(!m)}}),(0,r.jsx)(l.$n,{content:"Empty Cart",icon:"trash",onClick:function(){return t("empty_cart")},disabled:!s}),(0,r.jsx)(l.$n,{content:"Purchase Cart ("+d+"TC)",icon:"shopping-cart",onClick:function(){return t("purchase_cart")},disabled:!s||d>u})]}),children:(0,r.jsx)(l.BJ,{vertical:!0,children:s?s.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:m,buttons:(0,r.jsx)(y,{i:e})})},(0,a.jT)(e.name))}):(0,r.jsx)(l.az,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=i.cats,a=i.lucky_numbers;return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,r.jsx)(l.$n,{icon:"dice",content:"See more suggestions",onClick:function(){return t("shuffle_lucky_numbers")}}),children:(0,r.jsx)(l.BJ,{wrap:!0,children:a.map(function(e){return o[e.cat].items[e.item]}).filter(function(e){return null!=e}).map(function(e,n){return(0,r.jsx)(l.BJ.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",grow:!0,children:(0,r.jsx)(j,{i:e})},n)})})})})},j=function(e){var n=e.i,t=e.showDecription,i=e.buttons,o=void 0===i?(0,r.jsx)(b,{i:n}):i;return(0,r.jsx)(l.wn,{title:(0,a.jT)(n.name),buttons:o,children:(void 0===t?1:t)?(0,r.jsx)(l.az,{italic:!0,children:(0,a.jT)(n.desc)}):null})},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i,a=i.crystals;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{icon:"shopping-cart",color:1===o.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return t("add_to_cart",{item:o.obj_path})},disabled:o.cost>a}),(0,r.jsx)(l.$n,{content:"Buy ("+o.cost+"TC)"+(o.refundable?" [Refundable]":""),color:1===o.hijack_only&&"red",tooltip:1===o.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return t("buyItem",{item:o.obj_path})},disabled:o.cost>a})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i;return i.exploitable,(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.$n,{icon:"times",content:"("+o.cost*o.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return t("remove_from_cart",{item:o.obj_path})}}),(0,r.jsx)(l.$n,{icon:"minus",tooltip:0===o.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:--o.amount})},disabled:o.amount<=0}),(0,r.jsx)(l.$n.Input,{value:"".concat(o.amount),width:"45px",tooltipPosition:"bottom-end",tooltip:0===o.limit&&"Discount already redeemed!",onCommit:function(e){return t("set_cart_item_quantity",{item:o.obj_path,quantity:e})},disabled:-1!==o.limit&&o.amount>=o.limit&&o.amount<=0}),(0,r.jsx)(l.$n,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:0===o.limit&&"Discount already redeemed!",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:++o.amount})},disabled:-1!==o.limit&&o.amount>=o.limit})]})},v=function(e){var n=(0,c.Oc)(),t=n.act,s=n.data,u=s.exploitable,d=s.selected_record,h=f((0,o.useState)(""),2),m=h[0],p=h[1],x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,a.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,function(e){return r(e)})}return(0,i.Ul)(t,function(e){return e.name})}(u,m);return(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search Crew",onChange:function(e){return p(e)}}),(0,r.jsx)(l.tU,{vertical:!0,children:x&&x.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:e.name===d.name,onClick:function(){return t("view_record",{uid_gen:e.uid_gen})},children:e.name},e.uid_gen)})})]})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:d.name,children:(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Age",children:d.age}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:d.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:d.rank}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:d.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:d.species}),(0,r.jsx)(l.Ki.Item,{label:"NT Relation",children:d.nt_relation})]})}),!!d.has_photos&&d.photos.map(function(e,n){return(0,r.jsxs)(l.BJ.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,r.jsx)("img",{src:e,style:{width:"96px",marginTop:"1rem",marginBottom:"0.5rem",imageRendering:"pixelated"}}),(0,r.jsx)("br",{}),"Photo #",n+1]},n)})]})})})]})}},1638:function(e,n,t){"use strict";t.r(n),t.d(n,{Vending:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);th&&a.price>m;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.Hg,{verticalAlign:"middle",icon:s,icon_state:u,fallback:(0,r.jsx)(i.In,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsxs)(i.az,{color:c<=0&&"bad"||c<=a.max_amount/2&&"average"||"good",children:[c," in stock"]})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,disabled:j,icon:g,content:x,textAlign:"left",onClick:function(){return t("vend",{inum:a.inum})}})})]})},u=function(e){var n,t=(0,o.Oc)(),a=t.act,u=t.data,d=u.user,f=u.usermoney,h=u.inserted_cash,m=u.product_records,p=u.hidden_records,x=u.stock,g=(u.vend_ready,u.inserted_item_name),j=u.panel_open,b=u.speaker,y=u.locked,v=u.bypass_lock;return n=c(void 0===m?[]:m),u.extended_inventory&&(n=c(n).concat(c(void 0===p?[]:p))),n=n.filter(function(e){return!!e}),(0,r.jsx)(l.p8,{title:"Vending Machine",width:450,height:Math.min((!y||v?230:171)+32*n.length,585),children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(!y||!!v)&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Configuration",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Rename Vendor",onClick:function(){return a("rename",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Change Vendor Appearance",onClick:function(){return a("change_appearance",{})}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"User",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:!!g&&(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:g}),onClick:function(){return a("eject_item",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{disabled:!h,icon:"money-bill-wave-alt",content:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("b",{children:h})," credits"]}):"Dispense Change",tooltip:h?"Dispense Change":null,textAlign:"left",onClick:function(){return a("change")}})})]}),children:d&&(0,r.jsxs)(i.az,{children:["Welcome, ",(0,r.jsx)("b",{children:d.name}),", ",(0,r.jsx)("b",{children:d.job||"Unemployed"}),"!",(0,r.jsx)("br",{}),"Your balance is ",(0,r.jsxs)("b",{children:[f," credits"]}),".",(0,r.jsx)("br",{})]})})}),!!j&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Maintenance",children:(0,r.jsx)(i.$n,{icon:b?"check":"volume-mute",selected:b,content:"Speaker",textAlign:"left",onClick:function(){return a("toggle_voice",{})}})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsx)(i.XI,{children:n.map(function(e){return(0,r.jsx)(s,{product:e,productStock:x[e.name],productIcon:e.icon,productIconState:e.icon_state},e.name)})})})})]})})})}},2144:function(e,n,t){"use strict";t.r(n),t.d(n,{VolumeMixer:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.channels;return(0,r.jsx)(a.p8,{width:350,height:Math.min(95+50*c.length,565),children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.az,{fontSize:"1.25rem",color:"label",mt:n>0&&"0.5rem",children:e.name}),(0,r.jsx)(o.az,{mt:"0.5rem",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{mr:.5,children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:0})}})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,mx:"0.5rem",children:(0,r.jsx)(o.Ap,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(n,r){return t("volume",{channel:e.num,volume:r})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:100})}})})})]})})]},e.num)})})})})}},7063:function(e,n,t){"use strict";t.r(n),t.d(n,{VotePanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.remaining,s=a.question,u=a.choices,d=a.user_vote,f=a.counts,h=a.show_counts;return(0,r.jsx)(l.p8,{width:400,height:360,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s,children:[(0,r.jsxs)(i.az,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),u.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mb:1,fluid:!0,lineHeight:3,multiLine:e,content:e+(h?" ("+(f[e]||0)+")":""),onClick:function(){return t("vote",{target:e})},selected:e===d})},e)})]})})})}},7983:function(e,n,t){"use strict";t.r(n),t.d(n,{Wires:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.wires||[],s=a.status||[],u=56+23*c.length+(status?0:15+17*s.length);return(0,r.jsx)(l.p8,{width:350,height:u,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:e.cut?"Mend":"Cut",onClick:function(){return t("cut",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:"Pulse",onClick:function(){return t("pulse",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:e.attached?"Detach":"Attach",onClick:function(){return t("attach",{wire:e.color})}})]}),children:!!e.wire&&(0,r.jsxs)("i",{children:["(",e.wire,")"]})},e.seen_color)})})})}),!!s.length&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:s.map(function(e){return(0,r.jsx)(i.az,{color:"lightgray",children:e},e)})})})]})})})}},8167:function(e,n,t){"use strict";t.r(n),t.d(n,{WizardApprenticeContract:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.used;return(0,r.jsx)(l.p8,{width:500,height:555,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,r.jsx)("p",{children:"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points."}),a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,r.jsx)(i.wn,{title:"Which school of magic is your apprentice studying?",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,r.jsx)("br",{}),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("fire")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,r.jsx)("br",{}),"They know Teleport, Blink and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("translocation")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,r.jsx)("br",{}),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("restoration")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,r.jsx)("br",{}),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("stealth")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,r.jsx)("br",{}),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,r.jsx)("br",{}),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("honk")}})]}),(0,r.jsx)(i.Ki.Divider,{})]})})]})})}},234:function(e,n,t){"use strict";t.r(n),t.d(n,{ZLevelManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4530);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(8587),o=t(4530),l=t(7790);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&!g.includes(e.ref)&&!p.includes(e.ref),checked:p.includes(e.ref),onClick:function(){return j(e.ref)}},e.desc)})]})]})})}},7276:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosScan:()=>l});var r=t(8138),i=t(8587),o=t(7790),l=function(e){var n=e.aircontents;return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.Ki,{children:(0,i.pb)(n,function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}).map(function(e){var n,t,i,l,a;return(0,r.jsxs)(o.Ki.Item,{label:e.entry,color:(n=e.val,t=e.bad_low,i=e.poor_low,l=e.poor_high,a=e.bad_high,nl?"average":n>a?"bad":"good"),children:[e.val,e.units]},e.entry)})})})}},3013:function(e,n,t){"use strict";t.r(n),t.d(n,{BeakerContents:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.beakerLoaded,t=e.beakerContents,o=void 0===t?[]:t,l=e.buttons;return(0,r.jsx)(i.BJ,{vertical:!0,children:n?0===o.length?(0,r.jsx)(i.BJ.Item,{color:"label",children:"Beaker is empty."}):o.map(function(e,n){var t;return(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{color:"label",grow:!0,children:[(t=e.volume)+" unit"+(1===t?"":"s")," of ",e.name]},e.name),!!l&&(0,r.jsx)(i.BJ.Item,{children:l(e,n)})]},e.name)}):(0,r.jsx)(i.BJ.Item,{color:"label",children:"No beaker loaded."})})}},9226:function(e,n,t){"use strict";t.r(n),t.d(n,{BotStatus:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,c=l.noaccess,s=l.maintpanel,u=l.on,d=l.autopatrol,f=l.canhack,h=l.emagged,m=l.remote_disabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",a?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.wn,{title:"General Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:c,onClick:function(){return t("power")}})}),void 0!==d&&(0,r.jsx)(i.Ki.Item,{label:"Patrol",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){return t("autopatrol")}})}),!!s&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance Panel",children:(0,r.jsx)(i.az,{color:"bad",children:"Panel Open!"})}),(0,r.jsx)(i.Ki.Item,{label:"Safety System",children:(0,r.jsx)(i.az,{color:h?"bad":"good",children:h?"DISABLED!":"Enabled"})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Hacking",children:(0,r.jsx)(i.$n,{icon:"terminal",content:h?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){return t("hack")}})}),(0,r.jsx)(i.Ki.Item,{label:"Remote Access",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:!m,content:"AI Remote Control",disabled:c,onClick:function(){return t("disableremote")}})})]})})]})}},4744:function(e,n,t){"use strict";t.r(n),t.d(n,{ComplexModal:()=>h,modalAnswer:()=>d,modalClose:()=>f,modalOpen:()=>s,modalRegisterBodyOverride:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(421).lm.department,c=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],s=function(e){if(-1!==c.indexOf(e))return!0},u=function(e){return e.length>0&&(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,color:"white",children:[(0,r.jsx)(i.XI.Cell,{width:"50%",children:"Name"}),(0,r.jsx)(i.XI.Cell,{width:"35%",children:"Rank"}),(0,r.jsx)(i.XI.Cell,{width:"15%",children:"Active"})]}),e.map(function(e){var n;return(0,r.jsxs)(i.XI.Row,{color:(n=e.rank,-1!==c.indexOf(n)?"green":"orange"),bold:s(e.rank),children:[(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.name)}),(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.rank)}),(0,r.jsx)(i.XI.Cell,{children:e.active})]},e.name+e.rank)})]})},d=function(e){if((0,l.Oc)().act,e.data)n=e.data;else{var n;n=(0,l.Oc)().data}var t=n.manifest,o=t.heads,c=t.sec,s=t.eng,d=t.med,f=t.sci,h=t.ser,m=t.sup,p=t.misc;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.command,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:u(o)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.security,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:u(c)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.engineering,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:u(s)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.medical,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:u(d)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.science,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:u(f)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.service,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:u(h)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.supply,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:u(m)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:u(p)})]})}},1942:function(e,n,t){"use strict";t.r(n),t.d(n,{InputButtons:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.large_buttons,c=l.swapped_buttons,s=e.input,u=e.message,d=e.disabled,f=(0,r.jsx)(i.$n,{color:"good",textAlign:"center",bold:!!a,fluid:!!a,tooltip:!!a&&u,disabled:!!d,width:!a&&6,onClick:function(){return t("submit",{entry:s})},children:"Submit"}),h=(0,r.jsx)(i.$n,{color:"bad",textAlign:"center",bold:!!a,fluid:!!a,width:!a&&6,onClick:function(){return t("cancel")},children:"Cancel"});return(0,r.jsxs)(i.BJ,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[(0,r.jsx)(i.BJ.Item,{grow:a,children:h}),!a&&u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{color:"label",textAlign:"center",children:u})}),(0,r.jsx)(i.BJ.Item,{grow:a,children:f})]})}},1992:function(e,n,t){"use strict";t.r(n),t.d(n,{InterfaceLockNoticeBox:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.siliconUser,c=void 0===a?l.siliconUser:a,s=e.locked,u=void 0===s?l.locked:s,d=e.normallyLocked,f=void 0===d?l.normallyLocked:d,h=e.onLockStatusChange,m=void 0===h?function(){return t("lock")}:h,p=e.accessText;return c?(0,r.jsx)(i.IC,{color:c&&"grey",children:(0,r.jsxs)(i.so,{align:"center",children:[(0,r.jsx)(i.so.Item,{children:"Interface lock status:"}),(0,r.jsx)(i.so.Item,{grow:"1"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{m:"0",color:f?"red":"green",icon:f?"lock":"unlock",content:f?"Locked":"Unlocked",onClick:function(){m&&m(!u)}})})]})}):(0,r.jsxs)(i.IC,{children:["Swipe ",void 0===p?"an ID card":p," to ",u?"unlock":"lock"," this interface."]})}},9472:function(e,n,t){"use strict";t.r(n),t.d(n,{Loader:()=>l});var r=t(8138),i=t(7790),o=t(6859),l=function(e){var n=e.value;return(0,r.jsx)("div",{className:"AlertModal__Loader",children:(0,r.jsx)(i.az,{className:"AlertModal__LoaderProgress",style:{width:100*(0,o.J$)(n)+"%"}})})}},7352:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginInfo:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState;if(l)return(0,r.jsx)(i.IC,{info:!0,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:.5,children:["Logged in as: ",a.name," (",a.rank,")"]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"eject",disabled:!a.id,content:"Eject ID",color:"good",onClick:function(){return t("login_eject")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){return t("login_logout")}})]})]})})}},736:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginScreen:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState,c=l.isAI,s=l.isRobot,u=l.isAdmin;return(0,r.jsx)(i.wn,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,r.jsx)(i.so,{height:"100%",align:"center",justify:"center",children:(0,r.jsxs)(i.so.Item,{textAlign:"center",mt:"-2rem",children:[(0,r.jsxs)(i.az,{fontSize:"1.5rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,r.jsxs)(i.az,{color:"label",my:"1rem",children:["ID:",(0,r.jsx)(i.$n,{icon:"id-card",content:a.id?a.id:"----------",ml:"0.5rem",onClick:function(){return t("login_insert")}})]}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",disabled:!a.id,content:"Login",onClick:function(){return t("login_login",{login_type:1})}}),!!c&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return t("login_login",{login_type:2})}}),!!s&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return t("login_login",{login_type:3})}}),!!u&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){return t("login_login",{login_type:4})}})]})})})}},6696:function(e,n,t){"use strict";t.r(n),t.d(n,{Operating:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.operating,t=e.name;if(n)return(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"The ",t," is processing..."]})})})}},6888:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>a});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)().act,t=e.data,a=t.code,c=t.frequency,s=t.minFrequency,u=t.maxFrequency;return(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Frequency",children:(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:s/10,maxValue:u/10,value:c/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return n("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:a,width:"80px",onChange:function(e){return n("code",{code:e})}})})]}),(0,r.jsx)(i.$n,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},4455:function(e,n,t){"use strict";t.r(n),t.d(n,{SimpleRecords:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(u,function(e){return null==e?void 0:e.Name});return n&&(t=(0,i.pb)(t,(0,a.XZ)(n,function(e){return e.Name}))),(0,i.Ul)(t,function(e){return e.Name})}(u,f);return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search records...",onChange:function(e){return h(e)}}),m.map(function(e){return(0,r.jsx)(l.az,{children:(0,r.jsx)(l.$n,{mb:.5,content:e.Name,icon:"user",onClick:function(){return t("Records",{target:e.uid})}})},e)})]})},f=function(e){(0,c.Oc)().act;var n,t=e.data.records,i=t.general,o=t.medical,a=t.security;switch(e.recordType){case"MED":n=(0,r.jsx)(l.wn,{level:2,title:"Medical Data",children:o?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Blood Type",children:o.blood_type}),(0,r.jsx)(l.Ki.Item,{label:"Minor Disabilities",children:o.mi_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.mi_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Disabilities",children:o.ma_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.ma_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Allergies",children:o.alg}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.alg_d}),(0,r.jsx)(l.Ki.Item,{label:"Current Diseases",children:o.cdi}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.cdi_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:o.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":n=(0,r.jsx)(l.wn,{level:2,title:"Security Data",children:a?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Criminal Status",children:a.criminal}),(0,r.jsx)(l.Ki.Item,{label:"Minor Crimes",children:a.mi_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.mi_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Crimes",children:a.ma_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.ma_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:a.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Security record lost!"})})}return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.wn,{title:"General Data",children:i?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Name",children:i.name}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:i.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:i.species}),(0,r.jsx)(l.Ki.Item,{label:"Age",children:i.age}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:i.rank}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:i.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Physical Status",children:i.p_stat}),(0,r.jsx)(l.Ki.Item,{label:"Mental Status",children:i.m_stat})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"General record lost!"})}),n]})}},2264:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.temp;if(a){var c,s,u=l({},a.style,!0);return(0,r.jsx)(i.IC,(c=function(e){for(var n=1;nc});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.total_earnings,c=n.total_energy;return n.name,(0,r.jsx)(a.p8,{title:"Power Transmission Laser",width:"310",height:"485",children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsxs)(i.IC,{success:!0,children:["Earned Credits : ",t?(0,o.up)(t):0]}),(0,r.jsxs)(i.IC,{success:!0,children:["Energy Sold : ",c?(0,o.QL)(c,0,"J"):"0 J"]})]})})},s=function(e){var n=(0,l.Oc)().data,t=n.max_capacity,a=n.held_power,c=n.input_total,s=n.max_grid_load;return(0,r.jsxs)(i.wn,{title:"Status",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Reserve energy",children:a?(0,o.QL)(a,0,"J"):"0 J"})}),(0,r.jsx)(i.z2,{mt:"0.5em",mb:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:a/t}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Grid Saturation"})}),(0,r.jsx)(i.z2,{mt:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:Math.min(c,t-a)/s})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.input_total,s=a.accepting_power,u=a.sucking_power,d=a.input_number,f=a.power_format;return(0,r.jsxs)(i.wn,{title:"Input Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Input Circuit",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",onClick:function(){return t("toggle_input")},children:s?"Enabled":"Disabled"}),children:(0,r.jsx)(i.az,{color:u&&"good"||s&&"average"||"bad",children:u&&"Online"||s&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Input Level",children:c?(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",animated:!0,size:1.25,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,value:d,onChange:function(e){return t("set_input",{set_input:e})}}),(0,r.jsx)(i.$n,{selected:1===f,onClick:function(){return t("inputW")},children:"W"}),(0,r.jsx)(i.$n,{selected:1e3===f,onClick:function(){return t("inputKW")},children:"KW"}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("inputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("inputGW")},children:"GW"})]})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.output_total,s=a.firing,u=a.accepting_power,d=a.output_number,f=a.output_multiplier,h=a.target,m=a.held_power;return(0,r.jsxs)(i.wn,{title:"Output Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Laser Circuit",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"crosshairs",color:""===h?"green":"red",onClick:function(){return t("target")},children:h}),(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",disabled:!s&&m<1e6,onClick:function(){return t("toggle_output")},children:s?"Enabled":"Disabled"})]}),children:(0,r.jsx)(i.az,{color:s&&"good"||u&&"average"||"bad",children:s&&"Online"||u&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Output Level",children:c?c<0?"-"+(0,o.d5)(Math.abs(c)):(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",size:1.25,animated:!0,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,ranges:{bad:[-1/0,-1]},value:d,onChange:function(e){return t("set_output",{set_output:e})}}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("outputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("outputGW")},children:"GW"})]})]})}},2817:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_atmosphere:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.AtmosScan,{aircontents:t.app_data.aircontents})}},7716:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_bioscan:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).app_data,l=t.holder,a=t.dead,c=t.health,s=t.brute,u=t.oxy,d=t.tox,f=t.burn;return(t.temp,l)?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"Dead"}):(0,r.jsx)(i.az,{bold:!0,color:"green",children:"Alive"})}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:0,max:1,value:c/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Damage",children:(0,r.jsx)(i.az,{color:"blue",children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Toxin Damage",children:(0,r.jsx)(i.az,{color:"green",children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",children:(0,r.jsx)(i.az,{color:"orange",children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",children:(0,r.jsx)(i.az,{color:"red",children:s})})]}):(0,r.jsx)(i.az,{color:"red",children:"Error: No biological host found."})}},1091:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_directives:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.master,c=l.dna,s=l.prime,u=l.supplemental;return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Master",children:a?a+" ("+c+")":"None"}),a&&(0,r.jsx)(i.Ki.Item,{label:"Request DNA",children:(0,r.jsx)(i.$n,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return t("getdna")}})}),(0,r.jsx)(i.Ki.Item,{label:"Prime Directive",children:s}),(0,r.jsx)(i.Ki.Item,{label:"Supplemental Directives",children:u||"None"})]}),(0,r.jsx)(i.az,{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,r.jsx)(i.az,{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."})]})}},9316:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_doorjack:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data.app_data,s=c.cable,u=c.machine,d=c.inprogress,f=c.progress;return c.aborted,n=u?(0,r.jsx)(i.$n,{selected:!0,content:"Connected"}):(0,r.jsx)(i.$n,{content:s?"Extended":"Retracted",color:s?"orange":null,onClick:function(){return a("cable")}}),u&&(t=(0,r.jsxs)(i.Ki.Item,{label:"Hack",children:[(0,r.jsx)(i.z2,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:f,maxValue:100}),d?(0,r.jsx)(i.$n,{mt:1,color:"red",content:"Abort",onClick:function(){return a("cancel")}}):(0,r.jsx)(i.$n,{mt:1,content:"Start",onClick:function(){return a("jack")}})]})),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cable",children:n}),t]})}},5042:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.available_software,c=l.installed_software,s=l.installed_toggles,u=l.available_ram,d=l.emotions,f=l.current_emotion,h=l.speech_verbs,m=l.current_speech_verb,p=l.available_chassises,x=l.current_chassis,g=[];return c.map(function(e){return g[e.key]=e.name}),s.map(function(e){return g[e.key]=e.name}),(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available RAM",children:u}),(0,r.jsxs)(i.Ki.Item,{label:"Available Software",children:[a.filter(function(e){return!g[e.key]}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>u,onClick:function(){return t("purchaseSoftware",{key:e.key})}},e.key)}),0===a.filter(function(e){return!g[e.key]}).length&&"No software available!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Software",children:[c.filter(function(e){return"mainmenu"!==e.key}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,onClick:function(){return t("startSoftware",{software_key:e.key})}},e.key)}),0===c.length&&"No software installed!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Toggles",children:[s.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return t("setToggle",{toggle_key:e.key})}},e.key)}),0===s.length&&"No toggles installed!"]}),(0,r.jsx)(i.Ki.Item,{label:"Select Emotion",children:d.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.id===f,onClick:function(){return t("setEmotion",{emotion:e.id})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Speaking State",children:h.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.name===m,onClick:function(){return t("setSpeechStyle",{speech_state:e.name})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Chassis Type",children:p.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.icon===x,onClick:function(){return t("setChassis",{chassis_to_change:e.icon})}},e.id)})})]})})}},702:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.CrewManifest,{data:t.app_data})}},9513:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_medrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"MED"})}},984:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_messenger:()=>l});var r=t(8138),i=t(2864),o=t(3260),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return t.app_data.active_convo?(0,r.jsx)(o.ActiveConversation,{data:t.app_data}):(0,r.jsx)(o.MessengerList,{data:t.app_data})}},9028:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_radio:()=>a});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.app_data,c=a.minFrequency,s=a.maxFrequency,u=a.frequency,d=a.broadcasting;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Frequency",children:[(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:c/10,maxValue:s/10,value:u/10,format:function(e){return(0,o.Mg)(e,1)},onChange:function(e){return t("freq",{freq:e})}}),(0,r.jsx)(i.$n,{tooltip:"Reset",icon:"undo",onClick:function(){return t("freq",{freq:"145.9"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Broadcast Nearby Speech",children:(0,r.jsx)(i.$n,{onClick:function(){return t("toggleBroadcast")},selected:d,content:d?"Enabled":"Disabled"})})]})}},6838:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_secrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},4244:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t.app_data})}},8539:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_atmos_scan:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.AtmosScan,{aircontents:n.aircontents})}},5246:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_cookbook:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.games;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsxs)(i.$n,{width:"33%",textAlign:"center",color:"transparent",onClick:function(){return t("play",{id:e.id})},children:[(0,r.jsx)(i.In.Stack,{height:"96px",children:"Minesweeper"===e.name?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.In,{ml:"4px",mt:"10px",name:"flag",size:"6",color:"gray",rotation:30}),(0,r.jsx)(i.In,{ml:"20px",mt:"4px",name:"bomb",size:"3",color:"black"})]}):(0,r.jsx)(i.In,{name:"gamepad",size:"6"})}),(0,r.jsx)(i.az,{children:e.name})]},e.name)})})}},3606:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_janitor:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).janitor,l=t.user_loc,a=t.mops,c=t.buckets,s=t.cleanbots,u=t.carts,d=t.janicarts;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Current Location",children:[l.x,",",l.y]}),a&&(0,r.jsx)(i.Ki.Item,{label:"Mop Locations",children:a.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),c&&(0,r.jsx)(i.Ki.Item,{label:"Mop Bucket Locations",children:c.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),s&&(0,r.jsx)(i.Ki.Item,{label:"Cleanbot Locations",children:s.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),u&&(0,r.jsx)(i.Ki.Item,{label:"Janitorial Cart Locations",children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),d&&(0,r.jsx)(i.Ki.Item,{label:"Janicart Locations",children:d.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.direction_from_user,")"]},e)})})]})}},2526:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.owner,c=l.ownjob,s=l.idInserted,u=l.categories,d=l.pai,f=l.notifying;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Owner",color:"average",children:[a,", ",c]}),(0,r.jsx)(i.Ki.Item,{label:"ID",children:(0,r.jsx)(i.$n,{icon:"sync",content:"Update PDA Info",disabled:!s,onClick:function(){return t("UpdateInfo")}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Functions",children:(0,r.jsx)(i.Ki,{children:u.map(function(e){var n=l.apps[e];return n&&n.length?(0,r.jsx)(i.Ki.Item,{label:e,children:n.map(function(e){return(0,r.jsx)(i.$n,{icon:e.uid in f?e.notify_icon:e.icon,iconSpin:e.uid in f,color:e.uid in f?"red":"transparent",content:e.name,onClick:function(){return t("StartProgram",{program:e.uid})}},e.uid)})},e):null})})})}),(0,r.jsx)(i.BJ.Item,{children:!!d&&(0,r.jsxs)(i.wn,{title:"pAI",children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return t("pai",{option:1})}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return t("pai",{option:2})}})]})})]})}},4642:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.CrewManifest,{})}},1212:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_medical:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"MED"})}},3260:function(e,n,t){"use strict";t.r(n),t.d(n,{ActiveConversation:()=>d,MessengerList:()=>f,pda_messenger:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,MineSweeperLeaderboard:()=>d,pda_minesweeper:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(2264);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).mulebot.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.mulebot.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.mulebot,c=a.botstatus,s=a.active,u=c.mode,d=c.loca,f=c.load,h=c.powr,m=c.dest,p=c.home,x=c.retn,g=c.pick;switch(u){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=u}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[h,"%"]}),(0,r.jsx)(i.Ki.Item,{label:"Home",children:p}),(0,r.jsx)(i.Ki.Item,{label:"Destination",children:(0,r.jsx)(i.$n,{content:m?m+" (Set)":"None (Set)",onClick:function(){return l("target")}})}),(0,r.jsx)(i.Ki.Item,{label:"Current Load",children:(0,r.jsx)(i.$n,{content:f?f+" (Unload)":"None",disabled:!f,onClick:function(){return l("unload")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Pickup",children:(0,r.jsx)(i.$n,{content:g?"Yes":"No",selected:g,onClick:function(){return l("set_pickup_type",{autopick:+!g})}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Return",children:(0,r.jsx)(i.$n,{content:x?"Yes":"No",selected:x,onClick:function(){return l("set_auto_return",{autoret:+!x})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Proceed",icon:"play",onClick:function(){return l("start")}}),(0,r.jsx)(i.$n,{content:"Return Home",icon:"home",onClick:function(){return l("home")}})]})]})]})}},9749:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_nanobank:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.note;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{children:l}),(0,r.jsx)(i.$n,{icon:"pen",onClick:function(){return t("Edit")},content:"Edit"})]})}},4702:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_power:()=>l});var r=t(8138),i=t(2864),o=t(1784),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.PowerMonitorMainContent,{})}},6651:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_secbot:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).beepsky.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.beepsky.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.beepsky,c=a.botstatus,s=a.active,u=c.mode,d=c.loca;switch(u){case 0:n="Ready";break;case 1:n="Apprehending target";break;case 2:case 3:n="Arresting target";break;case 4:n="Starting patrol";break;case 5:n="On patrol";break;case 6:n="Responding to summons"}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Go",icon:"play",onClick:function(){return l("go")}}),(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Summon",icon:"arrow-down",onClick:function(){return l("summon")}})]})]})]})}},7155:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_security:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"SEC"})}},7024:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t})}},7148:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_status_display:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Code",children:[(0,r.jsx)(i.$n,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return t("Status",{statdisp:0})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"clock",content:"Evac ETA",onClick:function(){return t("Status",{statdisp:1})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"edit",content:"Message",onClick:function(){return t("Status",{statdisp:2})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"exclamation-triangle",content:"Red Alert",onClick:function(){return t("Status",{statdisp:3,alert:"redalert"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"boxes",content:"NT Logo",onClick:function(){return t("Status",{statdisp:3,alert:"default"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"lock",content:"Lockdown",onClick:function(){return t("Status",{statdisp:3,alert:"lockdown"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"biohazard",content:"Biohazard",onClick:function(){return t("Status",{statdisp:3,alert:"biohazard"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Message line 1",children:(0,r.jsx)(i.$n,{content:l.message1+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:1})}})}),(0,r.jsx)(i.Ki.Item,{label:"Message line 2",children:(0,r.jsx)(i.$n,{content:l.message2+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:2})}})})]})})}},7632:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_supplyrecords:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).supply,l=t.shuttle_loc,a=t.shuttle_time,c=t.shuttle_moving,s=t.approved,u=t.approved_count,d=t.requests,f=t.requests_count;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Shuttle Status",children:c?(0,r.jsxs)(i.az,{children:["In transit ",a]}):(0,r.jsx)(i.az,{children:l})})}),(0,r.jsx)(i.wn,{mt:1,title:"Requested Orders",children:f>0&&d.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)})}),(0,r.jsx)(i.wn,{title:"Approved Orders",children:u>0&&s.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)})})]})}},9136:function(e,n,t){"use strict";t.d(n,{P:()=>d});var r=t(8138),i=t(4530),o=t(1128),l=t(5490),a=t(3375);function c(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){var n=e.className,t=e.theme,i=void 0===t?"nanotrasen":t,o=e.children,d=u(e,["className","theme","children"]);return document.documentElement.className="theme-".concat(i),(0,r.jsx)("div",{className:"theme-"+i,children:(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout",n,(0,a.WP)(d)])},(0,a.Fl)(d)),{children:o}))})}d.Content=function(e){var n=e.className,t=e.scrollable,d=e.children,f=u(e,["className","scrollable","children"]),h=(0,i.useRef)(null);return(0,i.useEffect)(function(){var e=h.current;return e&&t&&(0,o.tk)(e),function(){e&&t&&(0,o.WK)(e)}},[]),(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout__content",t&&"Layout__content--scrollable",n,(0,a.WP)(f)]),ref:h},(0,a.Fl)(f)),{children:d}))}},2372:function(e,n,t){"use strict";t(8138),t(7790),t(5490),t(2864),t(1956),t(9136)},7655:function(e,n,t){"use strict";t.d(n,{c:()=>s});var r=t(8138),i=t(7790),o=t(2316),l=t(5490),a=t(3268),c=t(2864);function s(e){var n=e.className,t=e.title,s=e.status,u=e.canClose,d=e.fancy,f=e.onDragStart,h=e.onClose,m=e.children;c.J3.dispatch;var p="string"==typeof t&&t===t.toLowerCase()&&(0,a.Sn)(t)||t;return(0,r.jsxs)("div",{className:(0,l.Ly)(["TitleBar",n]),children:[(0,r.jsx)("div",{className:"TitleBar__dragZone",onMouseDown:function(e){return d&&f&&f(e)}}),void 0===s?(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",name:"tools",opacity:.5}):(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",color:function(e){switch(e){case o.KA:return"good";case o.bz:return"average";case o.KS:default:return"bad"}}(s),name:s===o.KS?"eye-slash":"eye"}),(0,r.jsx)("div",{className:"TitleBar__title",children:p}),!!m&&(0,r.jsx)("div",{className:"TitleBar__buttons",children:m}),!1,!!(d&&u)&&(0,r.jsx)("div",{className:"TitleBar__close",onClick:h,children:(0,r.jsx)(i.In,{className:"TitleBar__close--icon",name:"times"})})]})}t(3123)},7334:function(e,n,t){"use strict";t.d(n,{p:()=>b});var r=t(8138),i=t(4530),o=t(2316),l=t(5490),a=t(3268),c=t(2864),s=t(1956),u=t(6400),d=t(2533),f=t(9136),h=t(7655);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","fitted","children"]);return(0,r.jsx)(f.P.Content,x(p({className:(0,l.Ly)(["Window__content",n])},o),{children:t&&i||(0,r.jsx)("div",{className:"Window__contentPadding",children:i})}))}},3384:function(e,n,t){"use strict";t.d(n,{p8:()=>r.p}),t(9136),t(2372);var r=t(7334)},2533:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,v:()=>a});var o=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Generic",t=arguments.length,r=Array(t>2?t-2:0),o=2;o=2){var l=[n].concat(i(r)).map(function(e){var n;return"string"==typeof e?e:(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e.stack||String(e):JSON.stringify(e)}).filter(function(e){return e}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",ns:n,message:l})}},l=function(e){return{debug:function(){for(var n=arguments.length,t=Array(n),r=0;rc,Su:()=>s,XX:()=>u});var r,i=t(9227),o=t(1843);(0,t(2533).h)("renderer");var l=!0,a=!1;function c(){l=l||"resumed",a=!1}function s(){a=!0}function u(e){if(i.k.mark("render/start"),!r){var n=document.getElementById("react-root");r=(0,o.createRoot)(n)}r.render(e),i.k.mark("render/finish"),!a&&l&&(l=!1)}},483:function(e,n,t){"use strict";t.d(n,{l:()=>f,z:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(1956),a=t(3384),c=t(4808),s=function(e,n){return function(){return(0,r.jsx)(a.p8,{children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:["notFound"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," was not found."]}),"missingExport"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," is missing an export."]})]})})}};function u(){return(0,r.jsx)(a.p8,{children:(0,r.jsx)(a.p8.Content,{scrollable:!0})})}function d(){return(0,r.jsx)(a.p8,{height:130,title:"Loading",width:150,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{align:"center",fill:!0,justify:"center",vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.In,{color:"blue",name:"toolbox",spin:!0,size:4})}),(0,r.jsx)(i.BJ.Item,{children:"Please wait..."})]})})})}function f(){var e,n=(0,o.Oc)(),t=n.suspended,r=n.config;if((0,l.Lo)().kitchenSink,t)return u;if(null==r?void 0:r.refreshing)return d;for(var i=null==r?void 0:r.interface,a=[function(e){return"./".concat(e,".tsx")},function(e){return"./".concat(e,".jsx")},function(e){return"./".concat(e,"/index.tsx")},function(e){return"./".concat(e,"/index.jsx")}];!e&&a.length>0;){var f=a.shift()(i);try{e=c(f)}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw e}}if(!e)return s("notFound",i);var h=e[i];return h||s("missingExport",i)}},7997:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2533);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(1699),o=t(7790),l=t(9582),a={title:"Storage",render:function(){return(0,r.jsx)(c,{})}},c=function(e){return window.localStorage?(0,r.jsx)(o.wn,{title:"Local Storage",buttons:(0,r.jsx)(o.$n,{icon:"recycle",onClick:function(){localStorage.clear(),i.IG.clear()},children:"Clear"}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Keys in use",children:localStorage.length}),(0,r.jsx)(o.Ki.Item,{label:"Remaining space",children:(0,l.QL)(localStorage.remainingSpace,0,"B")})]})}):(0,r.jsx)(o.IC,{children:"Local storage is not available."})}},9615:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(7218);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,sendMessage:()=>o,setupHotReloading:()=>a,subscribe:()=>i});let r=[];function i(e){r.push(e)}function o(e){}function l(e,n){}function a(){}}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,i.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(t,r){if(1&r&&(t=this(t)),8&r||"object"==typeof t&&t&&(4&r&&t.__esModule||16&r&&"function"==typeof t.then))return t;var o=Object.create(null);i.r(o);var l={};e=e||[null,n({}),n([]),n(n)];for(var a=2&r&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(e=>{l[e]=()=>t[e]});return l.default=()=>t,i.d(o,l),o},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.k=e=>""+e+".css",i.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.p="/",i.rv=()=>"1.5.8",i.ruid="bundler=rspack@1.5.8",(()=>{"use strict";var e,n=i(8138);i(5810),i(8232),i(5153),i(4620),i(9258),i(3001),i(4648),i(5616),i(2186),i(6070),i(8523),i(4372),i(8500),i(9782),i(9770);var t=i(9227),r=i(1128),o=i(1874),l=i(2864),a=i(4530),c=i(8595),s=i(2533);function u(){return(0,a.useEffect)(function(){0===Object.keys(Byond.iconRefMap).length&&(function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return fetch(n,t).catch(function(){return new Promise(function(i){setTimeout(function(){e(n,t,r).then(i)},r)})})})((0,c.l)("icon_ref_map.json")).then(function(e){return e.json()}).then(function(e){return Byond.iconRefMap=e}).catch(function(e){return s.v.log(e)})},[]),null}function d(){return(0,n.jsx)(a.Suspense,{fallback:null,children:(0,n.jsx)(u,{})})}function f(){var e=(0,i(483).l)(l.J3);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,{}),(0,n.jsx)(d,{})]})}var h=function(){document.addEventListener("click",function(e){for(var n=e.target;;){if(!n||n===document.body)return;if("a"===String(n.tagName).toLowerCase())break;n=n.parentElement}var t=n.getAttribute("href")||"";if(!("?"===t.charAt(0)||t.startsWith("byond://"))){e.preventDefault();var r=t;r.toLowerCase().startsWith("www")&&(r="https://"+r),Byond.sendMessage({type:"openLink",url:r})}})},m=i(2901),p=i(5900);function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?t-1:0),i=1;ie.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},t=n.sideEffects,r=n.reducer,i=n.middleware,o=b([(0,p.HY)({debug:y.A$,backend:l.jB}),r]),a=void 0===t||t?w((null==i?void 0:i.pre)||[]).concat([c.h,l.pX],w((null==i?void 0:i.post)||[])):[],s=p.Tw.apply(void 0,w(a)),u=(0,p.y$)(o,s);return window.__store__=u,window.__augmentStack__=(e=u,function(n,t){(t=t||Error(n.split("\n")[0])).stack=t.stack||n,k.log("FatalError:",t);var r,i,o=e.getState(),l=null==o||null==(r=o.backend)?void 0:r.config;return n+"\nUser Agent: "+navigator.userAgent+"\nState: "+JSON.stringify({ckey:null==l||null==(i=l.client)?void 0:i.ckey,interface:null==l?void 0:l.interface,window:null==l?void 0:l.window})}),u}();!function e(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):((0,l.H$)(_),(0,r.y4)(),(0,o.Bm)({keyUpVerb:"Key_Up",keyDownVerb:"Key_Down",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}}),h(),_.subscribe(function(){return(0,m.XX)((0,n.jsx)(f,{}))}),Byond.subscribe(function(e,n){return _.dispatch({type:e,payload:n})}))}()})()})(); \ No newline at end of file diff --git a/tools/ci/check_simplemob_additions.py b/tools/ci/check_simplemob_additions.py index 29bc85bb34b..61338cb429e 100644 --- a/tools/ci/check_simplemob_additions.py +++ b/tools/ci/check_simplemob_additions.py @@ -71,6 +71,7 @@ BURNDOWN_LIST = { "/mob/living/simple_animal/hostile/construct/builder/hostile", "/mob/living/simple_animal/hostile/construct/harvester", "/mob/living/simple_animal/hostile/construct/harvester/hostile", + "/mob/living/simple_animal/hostile/construct/harvester/heretic", "/mob/living/simple_animal/hostile/construct/proteon", "/mob/living/simple_animal/hostile/construct/proteon/hostile", "/mob/living/simple_animal/hostile/construct/wraith",