From a2bb27916432100dee904335bfc71dc580f3e360 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Fri, 1 Jan 2016 16:12:02 -0600 Subject: [PATCH] NanoUI is now 'tgui' --- .travis.yml | 6 +- .../components/binary_devices/passive_gate.dm | 4 +- .../components/binary_devices/pump.dm | 4 +- .../components/binary_devices/volume_pump.dm | 4 +- .../components/trinary_devices/filter.dm | 4 +- .../components/trinary_devices/mixer.dm | 4 +- .../components/unary_devices/cryo.dm | 4 +- code/__DEFINES/nano.dm | 15 -- code/__DEFINES/tgui.dm | 4 + code/controllers/subsystem/nano.dm | 30 --- code/controllers/subsystem/tgui.dm | 30 +++ code/datums/mind.dm | 5 +- code/game/machinery/alarm.dm | 4 +- code/game/machinery/atmoalter/canister.dm | 4 +- .../machinery/doors/airlock_electronics.dm | 4 +- code/game/machinery/spaceheater.dm | 6 +- .../game/objects/items/weapons/tanks/tanks.dm | 4 +- code/modules/client/asset_cache.dm | 6 +- code/modules/client/preferences.dm | 8 +- code/modules/client/preferences_savefile.dm | 6 +- code/modules/mob/dead/observer/observer.dm | 4 +- code/modules/mob/logout.dm | 2 +- code/modules/nano/states/admin.dm | 12 - code/modules/nano/states/conscious.dm | 12 - code/modules/nano/states/contained.dm | 12 - code/modules/nano/states/deep_inventory.dm | 12 - code/modules/nano/states/hands.dm | 20 -- code/modules/nano/states/inventory.dm | 12 - code/modules/nano/states/physical.dm | 21 -- code/modules/nano/states/self.dm | 12 - code/modules/nano/states/states.dm | 112 --------- code/modules/power/apc.dm | 4 +- code/modules/power/smes.dm | 4 +- code/modules/power/solar.dm | 4 +- .../chemistry/machinery/chem_dispenser.dm | 4 +- .../chemistry/machinery/chem_heater.dm | 4 +- code/modules/{nano => tgui}/external.dm | 55 ++--- code/modules/tgui/states/admin.dm | 12 + code/modules/tgui/states/conscious.dm | 12 + code/modules/tgui/states/contained.dm | 12 + code/modules/tgui/states/deep_inventory.dm | 12 + code/modules/{nano => tgui}/states/default.dm | 50 ++-- code/modules/tgui/states/hands.dm | 20 ++ code/modules/tgui/states/inventory.dm | 12 + .../{nano => tgui}/states/notcontained.dm | 14 +- code/modules/tgui/states/physical.dm | 21 ++ code/modules/tgui/states/self.dm | 12 + code/modules/tgui/states/states.dm | 112 +++++++++ code/modules/{nano => tgui}/states/zlevel.dm | 10 +- code/modules/{nano => tgui}/subsystem.dm | 113 ++++----- code/modules/{nano/nanoui.dm => tgui/tgui.dm} | 161 ++++++------ nano/oldtemplates/_generic.dot | 14 -- nano/oldtemplates/_nanotrasen.dot | 14 -- nano/oldtemplates/air_alarm.dot | 233 ------------------ nano/oldtemplates/airlock_electronics.dot | 33 --- nano/oldtemplates/apc.dot | 157 ------------ nano/oldtemplates/atmos_filter.dot | 27 -- nano/oldtemplates/atmos_mixer.dot | 36 --- nano/oldtemplates/atmos_pump.dot | 27 -- nano/oldtemplates/canister.dot | 80 ------ nano/oldtemplates/chem_dispenser.dot | 55 ----- nano/oldtemplates/chem_heater.dot | 38 --- nano/oldtemplates/cryo.dot | 121 --------- nano/oldtemplates/smes.dot | 89 ------- nano/oldtemplates/solar_control.dot | 85 ------- nano/oldtemplates/space_heater.dot | 79 ------ nano/oldtemplates/tanks.dot | 37 --- nano/scripts/constants.coffee | 6 - tgstation.dme | 34 +-- {nano => tgui}/.gitignore | 0 {nano => tgui}/Gulpfile.js | 0 .../assets/nanoui.css => tgui/assets/tgui.css | 0 nano/assets/nanoui.js => tgui/assets/tgui.js | 7 +- {nano => tgui}/coffeelint.json | 0 {nano => tgui}/colors.json | 0 .../gulp/compilers/coffeescript.coffee | 0 {nano => tgui}/gulp/compilers/stylus.coffee | 0 {nano => tgui}/gulp/config/flags.coffee | 0 {nano => tgui}/gulp/config/index.coffee | 0 {nano => tgui}/gulp/config/plugins.coffee | 1 - {nano => tgui}/gulp/index.coffee | 0 {nano => tgui}/gulp/tasks/build.coffee | 0 {nano => tgui}/gulp/tasks/clean.coffee | 0 {nano => tgui}/gulp/tasks/css.coffee | 0 {nano => tgui}/gulp/tasks/js.coffee | 1 - {nano => tgui}/gulp/tasks/reload.coffee | 0 {nano => tgui}/gulp/tasks/size.coffee | 0 {nano => tgui}/gulp/tasks/watch.coffee | 0 {nano => tgui}/images/nanotrasen.svg | 0 {nano => tgui}/package.json | 3 +- {nano => tgui}/paths.json | 4 +- {nano => tgui}/reload.bat | 0 {nano => tgui}/scripts/byond.coffee | 2 +- {nano => tgui}/scripts/components/bar.ract | 0 {nano => tgui}/scripts/components/button.ract | 2 +- .../scripts/components/display.ract | 0 {nano => tgui}/scripts/components/notice.ract | 0 {nano => tgui}/scripts/components/resize.ract | 0 .../scripts/components/section.ract | 0 .../scripts/components/subdisplay.ract | 0 .../scripts/components/titlebar.ract | 8 +- tgui/scripts/constants.coffee | 6 + .../scripts/interfaces/air_alarm.ract | 0 .../scripts/interfaces/air_alarm/back.ract | 0 .../interfaces/air_alarm/controls.ract | 0 .../scripts/interfaces/air_alarm/modes.ract | 0 .../interfaces/air_alarm/scrubbers.ract | 0 .../scripts/interfaces/air_alarm/status.ract | 0 .../interfaces/air_alarm/thresholds.ract | 0 .../scripts/interfaces/air_alarm/vents.ract | 0 .../interfaces/airlock_electronics.ract | 0 {nano => tgui}/scripts/interfaces/apc.ract | 0 .../scripts/interfaces/atmos_filter.ract | 0 .../scripts/interfaces/atmos_mixer.ract | 0 .../scripts/interfaces/atmos_pump.ract | 0 .../scripts/interfaces/canister.ract | 0 .../scripts/interfaces/chem_dispenser.ract | 0 .../scripts/interfaces/chem_heater.ract | 0 {nano => tgui}/scripts/interfaces/cryo.ract | 0 {nano => tgui}/scripts/interfaces/error.ract | 0 {nano => tgui}/scripts/interfaces/smes.ract | 0 .../scripts/interfaces/solar_control.ract | 0 .../scripts/interfaces/space_heater.ract | 0 {nano => tgui}/scripts/interfaces/tanks.ract | 0 {nano => tgui}/scripts/main.coffee | 6 +- {nano => tgui}/scripts/math.coffee | 0 {nano => tgui}/scripts/text.coffee | 0 .../nanoui.ract => tgui/scripts/tgui.ract | 0 {nano => tgui}/styles/components/bar.styl | 0 {nano => tgui}/styles/components/button.styl | 0 {nano => tgui}/styles/components/display.styl | 0 {nano => tgui}/styles/components/notice.styl | 0 {nano => tgui}/styles/components/resize.styl | 0 {nano => tgui}/styles/components/section.styl | 0 .../styles/components/subdisplay.styl | 0 .../styles/components/titlebar.styl | 0 {nano => tgui}/styles/config.styl | 0 {nano => tgui}/styles/core/clearfix.styl | 0 {nano => tgui}/styles/core/colors.styl | 0 {nano => tgui}/styles/core/document.styl | 0 {nano => tgui}/styles/core/header.styl | 0 {nano => tgui}/styles/core/text.styl | 0 {nano => tgui}/styles/main.styl | 0 {nano => tgui}/styles/styles/generic.styl | 0 {nano => tgui}/styles/styles/nanotrasen.styl | 0 nano/nanoui.html => tgui/tgui.html | 17 +- 146 files changed, 548 insertions(+), 1709 deletions(-) delete mode 100644 code/__DEFINES/nano.dm create mode 100644 code/__DEFINES/tgui.dm delete mode 100644 code/controllers/subsystem/nano.dm create mode 100644 code/controllers/subsystem/tgui.dm delete mode 100644 code/modules/nano/states/admin.dm delete mode 100644 code/modules/nano/states/conscious.dm delete mode 100644 code/modules/nano/states/contained.dm delete mode 100644 code/modules/nano/states/deep_inventory.dm delete mode 100644 code/modules/nano/states/hands.dm delete mode 100644 code/modules/nano/states/inventory.dm delete mode 100644 code/modules/nano/states/physical.dm delete mode 100644 code/modules/nano/states/self.dm delete mode 100644 code/modules/nano/states/states.dm rename code/modules/{nano => tgui}/external.dm (50%) create mode 100644 code/modules/tgui/states/admin.dm create mode 100644 code/modules/tgui/states/conscious.dm create mode 100644 code/modules/tgui/states/contained.dm create mode 100644 code/modules/tgui/states/deep_inventory.dm rename code/modules/{nano => tgui}/states/default.dm (52%) create mode 100644 code/modules/tgui/states/hands.dm create mode 100644 code/modules/tgui/states/inventory.dm rename code/modules/{nano => tgui}/states/notcontained.dm (66%) create mode 100644 code/modules/tgui/states/physical.dm create mode 100644 code/modules/tgui/states/self.dm create mode 100644 code/modules/tgui/states/states.dm rename code/modules/{nano => tgui}/states/zlevel.dm (53%) rename code/modules/{nano => tgui}/subsystem.dm (60%) rename code/modules/{nano/nanoui.dm => tgui/tgui.dm} (58%) delete mode 100644 nano/oldtemplates/_generic.dot delete mode 100644 nano/oldtemplates/_nanotrasen.dot delete mode 100644 nano/oldtemplates/air_alarm.dot delete mode 100644 nano/oldtemplates/airlock_electronics.dot delete mode 100644 nano/oldtemplates/apc.dot delete mode 100644 nano/oldtemplates/atmos_filter.dot delete mode 100644 nano/oldtemplates/atmos_mixer.dot delete mode 100644 nano/oldtemplates/atmos_pump.dot delete mode 100644 nano/oldtemplates/canister.dot delete mode 100644 nano/oldtemplates/chem_dispenser.dot delete mode 100644 nano/oldtemplates/chem_heater.dot delete mode 100644 nano/oldtemplates/cryo.dot delete mode 100644 nano/oldtemplates/smes.dot delete mode 100644 nano/oldtemplates/solar_control.dot delete mode 100644 nano/oldtemplates/space_heater.dot delete mode 100644 nano/oldtemplates/tanks.dot delete mode 100644 nano/scripts/constants.coffee rename {nano => tgui}/.gitignore (100%) rename {nano => tgui}/Gulpfile.js (100%) rename nano/assets/nanoui.css => tgui/assets/tgui.css (100%) rename nano/assets/nanoui.js => tgui/assets/tgui.js (74%) rename {nano => tgui}/coffeelint.json (100%) rename {nano => tgui}/colors.json (100%) rename {nano => tgui}/gulp/compilers/coffeescript.coffee (100%) rename {nano => tgui}/gulp/compilers/stylus.coffee (100%) rename {nano => tgui}/gulp/config/flags.coffee (100%) rename {nano => tgui}/gulp/config/index.coffee (100%) rename {nano => tgui}/gulp/config/plugins.coffee (91%) rename {nano => tgui}/gulp/index.coffee (100%) rename {nano => tgui}/gulp/tasks/build.coffee (100%) rename {nano => tgui}/gulp/tasks/clean.coffee (100%) rename {nano => tgui}/gulp/tasks/css.coffee (100%) rename {nano => tgui}/gulp/tasks/js.coffee (94%) rename {nano => tgui}/gulp/tasks/reload.coffee (100%) rename {nano => tgui}/gulp/tasks/size.coffee (100%) rename {nano => tgui}/gulp/tasks/watch.coffee (100%) rename {nano => tgui}/images/nanotrasen.svg (100%) rename {nano => tgui}/package.json (97%) rename {nano => tgui}/paths.json (75%) rename {nano => tgui}/reload.bat (100%) rename {nano => tgui}/scripts/byond.coffee (88%) rename {nano => tgui}/scripts/components/bar.ract (100%) rename {nano => tgui}/scripts/components/button.ract (89%) rename {nano => tgui}/scripts/components/display.ract (100%) rename {nano => tgui}/scripts/components/notice.ract (100%) rename {nano => tgui}/scripts/components/resize.ract (100%) rename {nano => tgui}/scripts/components/section.ract (100%) rename {nano => tgui}/scripts/components/subdisplay.ract (100%) rename {nano => tgui}/scripts/components/titlebar.ract (81%) create mode 100644 tgui/scripts/constants.coffee rename {nano => tgui}/scripts/interfaces/air_alarm.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/back.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/controls.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/modes.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/scrubbers.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/status.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/thresholds.ract (100%) rename {nano => tgui}/scripts/interfaces/air_alarm/vents.ract (100%) rename {nano => tgui}/scripts/interfaces/airlock_electronics.ract (100%) rename {nano => tgui}/scripts/interfaces/apc.ract (100%) rename {nano => tgui}/scripts/interfaces/atmos_filter.ract (100%) rename {nano => tgui}/scripts/interfaces/atmos_mixer.ract (100%) rename {nano => tgui}/scripts/interfaces/atmos_pump.ract (100%) rename {nano => tgui}/scripts/interfaces/canister.ract (100%) rename {nano => tgui}/scripts/interfaces/chem_dispenser.ract (100%) rename {nano => tgui}/scripts/interfaces/chem_heater.ract (100%) rename {nano => tgui}/scripts/interfaces/cryo.ract (100%) rename {nano => tgui}/scripts/interfaces/error.ract (100%) rename {nano => tgui}/scripts/interfaces/smes.ract (100%) rename {nano => tgui}/scripts/interfaces/solar_control.ract (100%) rename {nano => tgui}/scripts/interfaces/space_heater.ract (100%) rename {nano => tgui}/scripts/interfaces/tanks.ract (100%) rename {nano => tgui}/scripts/main.coffee (87%) rename {nano => tgui}/scripts/math.coffee (100%) rename {nano => tgui}/scripts/text.coffee (100%) rename nano/scripts/nanoui.ract => tgui/scripts/tgui.ract (100%) rename {nano => tgui}/styles/components/bar.styl (100%) rename {nano => tgui}/styles/components/button.styl (100%) rename {nano => tgui}/styles/components/display.styl (100%) rename {nano => tgui}/styles/components/notice.styl (100%) rename {nano => tgui}/styles/components/resize.styl (100%) rename {nano => tgui}/styles/components/section.styl (100%) rename {nano => tgui}/styles/components/subdisplay.styl (100%) rename {nano => tgui}/styles/components/titlebar.styl (100%) rename {nano => tgui}/styles/config.styl (100%) rename {nano => tgui}/styles/core/clearfix.styl (100%) rename {nano => tgui}/styles/core/colors.styl (100%) rename {nano => tgui}/styles/core/document.styl (100%) rename {nano => tgui}/styles/core/header.styl (100%) rename {nano => tgui}/styles/core/text.styl (100%) rename {nano => tgui}/styles/main.styl (100%) rename {nano => tgui}/styles/styles/generic.styl (100%) rename {nano => tgui}/styles/styles/nanotrasen.styl (100%) rename nano/nanoui.html => tgui/tgui.html (61%) diff --git a/.travis.yml b/.travis.yml index cae1bc372d5..6eb8961a07f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ env: cache: directories: - - nano/node_modules + - tgui/node_modules - $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} @@ -39,7 +39,7 @@ install: - pip install --user beautifulsoup4 -q before_script: - - cd nano && npm install && cd .. + - cd tgui && npm install && cd .. - chmod +x ./install-byond.sh - ./install-byond.sh @@ -48,7 +48,7 @@ script: - (! grep 'step_[xy]' _maps/**/*.dmm) - md5sum -c - <<< "49bc6b1b9ed56c83cceb6674bd97cb34 *html/changelogs/example.yml" - tools/check_filedirs.sh tgstation.dme - - cd nano && gulp && gulp --min && cd .. + - cd tgui && gulp && cd .. - python tools/ss13_genchangelog.py html/changelog.html html/changelogs - source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup - bash dm.sh -M${DM_MAPFILE} tgstation.dme diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index 8098e41520d..59893d278c9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -97,8 +97,8 @@ Passive gate is similar to the regular pump except: if(stat & (BROKEN|NOPOWER)) return ui_interact(user) -/obj/machinery/atmospherics/components/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/atmospherics/components/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "atmos_pump", name, 400, 115) ui.open() diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 8377505cd8e..377cd215a07 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -105,8 +105,8 @@ Thus, the two variables affect pump operation are set in New(): return ui_interact(user) -/obj/machinery/atmospherics/components/binary/pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/atmospherics/components/binary/pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "atmos_pump", name, 400, 115) ui.open() diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index cd9ca2e7acc..3223f152343 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -102,8 +102,8 @@ Thus, the two variables affect pump operation are set in New(): return ui_interact(user) -/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "atmos_pump", name, 400, 115) ui.open() diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 7c6f978a0af..67dbf2f8717 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -166,8 +166,8 @@ Filter types: return ui_interact(user) -/obj/machinery/atmospherics/components/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/atmospherics/components/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "atmos_filter", name, 450, 145) ui.open() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index fe358579618..4e3939141e2 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -129,8 +129,8 @@ return ui_interact(user) -/obj/machinery/atmospherics/components/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/atmospherics/components/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "atmos_mixer", name, 450, 175) ui.open() diff --git a/code/ATMOSPHERICS/components/unary_devices/cryo.dm b/code/ATMOSPHERICS/components/unary_devices/cryo.dm index 96e6858e3d5..0521057f5a3 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cryo.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cryo.dm @@ -110,8 +110,8 @@ return ui_interact(user) -/obj/machinery/atmospherics/components/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/atmospherics/components/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "cryo", name, 410, 550, state = notcontained_state) ui.open() diff --git a/code/__DEFINES/nano.dm b/code/__DEFINES/nano.dm deleted file mode 100644 index 96bc05691a6..00000000000 --- a/code/__DEFINES/nano.dm +++ /dev/null @@ -1,15 +0,0 @@ - /** - * NanoUI Defines - * - * Contains all NanoUI state definitions. - * - * /tg/station user interface library - * thanks to baystation12 - * - * modified by neersighted - **/ - -#define NANO_INTERACTIVE 2 // Green/Interactive -#define NANO_UPDATE 1 // Orange/Updates Only -#define NANO_DISABLED 0 // Red/Disabled -#define NANO_CLOSE -1 // Closed \ No newline at end of file diff --git a/code/__DEFINES/tgui.dm b/code/__DEFINES/tgui.dm new file mode 100644 index 00000000000..5ba0096d1be --- /dev/null +++ b/code/__DEFINES/tgui.dm @@ -0,0 +1,4 @@ +#define UI_INTERACTIVE 2 // Green/Interactive +#define UI_UPDATE 1 // Orange/Updates Only +#define UI_DISABLED 0 // Red/Disabled +#define UI_CLOSE -1 // Closed \ No newline at end of file diff --git a/code/controllers/subsystem/nano.dm b/code/controllers/subsystem/nano.dm deleted file mode 100644 index b1dd083b1c6..00000000000 --- a/code/controllers/subsystem/nano.dm +++ /dev/null @@ -1,30 +0,0 @@ -var/datum/subsystem/nano/SSnano - -/datum/subsystem/nano - name = "NanoUI" - wait = 10 - priority = 16 - display = 6 - - can_fire = 1 // This needs to fire before round start. - - var/list/open_uis = list() // A list of open NanoUIs, grouped by src_object and ui_key. - var/list/processing_uis = list() // A list of processing NanoUIs, not grouped. - var/html // The HTML template used by new UIs; minus initial data. - - -/datum/subsystem/nano/New() - html = file2text('nano/nanoui.html') // Read the HTML from disk. - - NEW_SS_GLOBAL(SSnano) - -/datum/subsystem/nano/stat_entry() - ..("O:[open_uis.len]|P:[processing_uis.len]") // Show how many interfaces we have open/are processing. - -/datum/subsystem/nano/fire() // Process UIs. - for(var/thing in processing_uis) - var/datum/nanoui/ui = thing - if(ui && ui.user && ui.src_object) - ui.process() - continue - processing_uis.Remove(ui) diff --git a/code/controllers/subsystem/tgui.dm b/code/controllers/subsystem/tgui.dm new file mode 100644 index 00000000000..e9aca112ca8 --- /dev/null +++ b/code/controllers/subsystem/tgui.dm @@ -0,0 +1,30 @@ +var/datum/subsystem/tgui/SStgui + +/datum/subsystem/tgui + name = "tgui" + wait = 10 + priority = 16 + display = 6 + + can_fire = 1 // This needs to fire before round start. + + var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key. + var/list/processing_uis = list() // A list of processing UIs, not grouped. + var/html // The HTML template used by new UIs; minus initial data. + + +/datum/subsystem/tgui/New() + html = file2text('tgui/tgui.html') // Read the HTML from disk. + + NEW_SS_GLOBAL(SStgui) + +/datum/subsystem/tgui/stat_entry() + ..("O:[open_uis.len]|P:[processing_uis.len]") // Show how many interfaces we have open/are processing. + +/datum/subsystem/tgui/fire() // Process UIs. + for(var/thing in processing_uis) + var/datum/tgui/ui = thing + if(ui && ui.user && ui.src_object) + ui.process() + continue + processing_uis.Remove(ui) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 915bf455b66..1ee1a3d01ea 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -63,7 +63,7 @@ /datum/mind/proc/transfer_to(mob/new_character) if(current) // remove ourself from our old body's mind variable current.mind = null - SSnano.on_transfer(current, new_character) + SStgui.on_transfer(current, new_character) if(key) if(new_character.key != key) //if we're transfering into a body with a key associated which is not ours @@ -1576,5 +1576,4 @@ /mob/living/simple_animal/hostile/construct/mind_initialize() ..() mind.assigned_role = "[initial(name)]" - mind.special_role = "Cultist" - + mind.special_role = "Cultist" diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index c554ce88419..9bcf2624df8 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -187,8 +187,8 @@ else if (!shorted) ui_interact(user) -/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "air_alarm", name, 480, 660) ui.open() diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 510fad5a889..90c1d413860 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -273,8 +273,8 @@ update_flag return ui_interact(user) -/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "canister", name, 480, 420, state = physical_state) ui.open() diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 8282a682489..bd742dbe2e2 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -13,8 +13,8 @@ add_fingerprint(user) ui_interact(user) -/obj/item/weapon/electronics/airlock/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) - SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/item/weapon/electronics/airlock/ui_interact(mob/user, ui_key = "main", var/datum/tgui/ui = null, force_open = 0) + SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "airlock_electronics", name, 975, 415, state = hands_state) ui.open() diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index ccc9b2d2cd3..38af33e7b43 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -132,7 +132,7 @@ C.add_fingerprint(usr) user.visible_message("\The [user] inserts a power cell into \the [src].", "You insert the power cell into \the [src].") - SSnano.update_uis(src) + SStgui.update_uis(src) else user << "The hatch must be open to insert a power cell!" return @@ -153,8 +153,8 @@ /obj/machinery/space_heater/interact(mob/user) ui_interact(user) -/obj/machinery/space_heater/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/space_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "space_heater", name, 490, 340, state = physical_state) ui.open() diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index d3f9d746a75..e4f6d465e18 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -119,8 +119,8 @@ add_fingerprint(user) ui_interact(user) -/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "tanks", name, 530, 220, state = inventory_state) ui.open() diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 66384199db2..6e73a0bfd97 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -173,10 +173,10 @@ You can set verify to TRUE if you want send() to sleep until the client has the //DEFINITIONS FOR ASSET DATUMS START HERE. -/datum/asset/simple/nanoui +/datum/asset/simple/tgui assets = list( - "nanoui.css" = 'nano/assets/nanoui.css', - "nanoui.js" = 'nano/assets/nanoui.js' + "tgui.css" = 'tgui/assets/tgui.css', + "tgui.js" = 'tgui/assets/tgui.js' ) /datum/asset/simple/pda diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index b142bc28df4..2fdb79069e3 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -27,7 +27,7 @@ var/list/preferences_datums = list() var/UI_style = "Midnight" - var/nanoui_fancy = TRUE + var/tgui_fancy = TRUE var/toggles = TOGGLES_DEFAULT var/chat_toggles = TOGGLES_DEFAULT_CHAT var/ghost_form = "ghost" @@ -325,7 +325,7 @@ var/list/preferences_datums = list() dat += "
" dat += "

General Settings

" dat += "UI Style: [UI_style]
" - dat += "Fancy NanoUI: [(nanoui_fancy) ? "Yes" : "No"]
" + dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"]
" dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" dat += "Ghost ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" @@ -1011,8 +1011,8 @@ var/list/preferences_datums = list() else UI_style = "Midnight" - if("nanoui") - nanoui_fancy = !nanoui_fancy + if("tgui_fancy") + tgui_fancy = !tgui_fancy if("hear_adminhelps") toggles ^= SOUND_ADMINHELP diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index ceea9a220fe..38a3e556494 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -165,7 +165,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["ooccolor"] >> ooccolor S["lastchangelog"] >> lastchangelog S["UI_style"] >> UI_style - S["nanoui_fancy"] >> nanoui_fancy + S["nanoui_fancy"] >> tgui_fancy S["be_special"] >> be_special if(islist(S["be_special"])) @@ -193,7 +193,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car ooccolor = sanitize_ooccolor(sanitize_hexcolor(ooccolor, 6, 1, initial(ooccolor))) lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) UI_style = sanitize_inlist(UI_style, list("Midnight", "Plasmafire", "Retro"), initial(UI_style)) - nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy)) + tgui_fancy = sanitize_integer(tgui_fancy, 0, 1, initial(tgui_fancy)) default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot)) toggles = sanitize_integer(toggles, 0, 65535, initial(toggles)) ghost_form = sanitize_inlist(ghost_form, ghost_forms, initial(ghost_form)) @@ -213,7 +213,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["ooccolor"] << ooccolor S["lastchangelog"] << lastchangelog S["UI_style"] << UI_style - S["nanoui_fancy"] << nanoui_fancy + S["nanoui_fancy"] << tgui_fancy S["be_special"] << be_special S["default_slot"] << default_slot S["toggles"] << toggles diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 1d3e6ed3a72..641fa9446f5 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -86,7 +86,7 @@ Works together with spawning an observer, noted above. if(key) if(!cmptext(copytext(key,1,2),"@")) // Skip aghosts. var/mob/dead/observer/ghost = new(src) // Transfer safety to observer spawning proc. - SSnano.on_transfer(src, ghost) // Transfer NanoUIs. + SStgui.on_transfer(src, ghost) // Transfer NanoUIs. ghost.can_reenter_corpse = can_reenter_corpse ghost.key = key return ghost @@ -156,7 +156,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients usr << "Another consciousness is in your body...It is resisting you." return - SSnano.on_transfer(src, mind.current) // Transfer NanoUIs. + SStgui.on_transfer(src, mind.current) // Transfer NanoUIs. mind.current.key = key return 1 diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index f1bc6dcabcc..968b4f0c16c 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -1,5 +1,5 @@ /mob/Logout() - SSnano.on_logout(src) + SStgui.on_logout(src) player_list -= src log_access("Logout: [key_name(src)]") if(admin_datums[src.ckey]) diff --git a/code/modules/nano/states/admin.dm b/code/modules/nano/states/admin.dm deleted file mode 100644 index d4048b9e11d..00000000000 --- a/code/modules/nano/states/admin.dm +++ /dev/null @@ -1,12 +0,0 @@ - /** - * NanoUI State: admin_state - * - * Checks that the user is an admin, end-of-story. - **/ - -/var/global/datum/nano_state/admin_state/admin_state = new() - -/datum/nano_state/admin_state/can_use_topic(atom/movable/src_object, mob/user) - if(check_rights_for(user.client, R_ADMIN)) - return NANO_INTERACTIVE - return NANO_CLOSE diff --git a/code/modules/nano/states/conscious.dm b/code/modules/nano/states/conscious.dm deleted file mode 100644 index 07574e91da7..00000000000 --- a/code/modules/nano/states/conscious.dm +++ /dev/null @@ -1,12 +0,0 @@ - /** - * NanoUI State: conscious_state - * - * Only checks if the user is conscious. - **/ - -/var/global/datum/nano_state/conscious_state/conscious_state = new() - -/datum/nano_state/conscious_state/can_use_topic(atom/movable/src_object, mob/user) - if(user.stat == CONSCIOUS) - return NANO_INTERACTIVE - return NANO_CLOSE diff --git a/code/modules/nano/states/contained.dm b/code/modules/nano/states/contained.dm deleted file mode 100644 index 89b18d0b136..00000000000 --- a/code/modules/nano/states/contained.dm +++ /dev/null @@ -1,12 +0,0 @@ - /** - * NanoUI State: contained_state - * - * Checks that the user is inside the src_object. - **/ - -/var/global/datum/nano_state/contained_state/contained_state = new() - -/datum/nano_state/contained_state/can_use_topic(atom/movable/src_object, mob/user) - if(!src_object.contains(user)) - return NANO_CLOSE - return user.shared_nano_interaction(src_object) diff --git a/code/modules/nano/states/deep_inventory.dm b/code/modules/nano/states/deep_inventory.dm deleted file mode 100644 index d01f43bb2f4..00000000000 --- a/code/modules/nano/states/deep_inventory.dm +++ /dev/null @@ -1,12 +0,0 @@ - /** - * NanoUI State: deep_inventory_state - * - * Checks that the src_object is in the user's fist-level (backpack, webbing, etc) inventory. - **/ - -/var/global/datum/nano_state/deep_inventory_state/deep_inventory_state = new() - -/datum/nano_state/deep_inventory_state/can_use_topic(atom/movable/src_object, mob/user) - if(!user.contains(src_object)) - return NANO_CLOSE - return user.shared_nano_interaction(src_object) diff --git a/code/modules/nano/states/hands.dm b/code/modules/nano/states/hands.dm deleted file mode 100644 index 32807335433..00000000000 --- a/code/modules/nano/states/hands.dm +++ /dev/null @@ -1,20 +0,0 @@ - /** - * NanoUI State: hands_state - * - * Checks that the src_object is in the user's hands. - **/ - -/var/global/datum/nano_state/hands_state/hands_state = new() - -/datum/nano_state/hands_state/can_use_topic(atom/movable/src_object, mob/user) - . = user.shared_nano_interaction(src_object) - if(. > NANO_CLOSE) - return min(., user.hands_can_use_topic(src_object)) - -/mob/proc/hands_can_use_topic(atom/movable/src_object) - return NANO_CLOSE - -/mob/living/hands_can_use_topic(atom/movable/src_object) - if(src_object in get_both_hands(src)) - return NANO_INTERACTIVE - return NANO_CLOSE \ No newline at end of file diff --git a/code/modules/nano/states/inventory.dm b/code/modules/nano/states/inventory.dm deleted file mode 100644 index e1160339e8a..00000000000 --- a/code/modules/nano/states/inventory.dm +++ /dev/null @@ -1,12 +0,0 @@ - /** - * NanoUI State: inventory_state - * - * Checks that the src_object is in the user's top-level (hand, ear, pocket, belt, etc) inventory. - **/ - -/var/global/datum/nano_state/inventory_state/inventory_state = new() - -/datum/nano_state/inventory_state/can_use_topic(atom/movable/src_object, mob/user) - if(!(src_object in user)) - return NANO_CLOSE - return user.shared_nano_interaction(src_object) diff --git a/code/modules/nano/states/physical.dm b/code/modules/nano/states/physical.dm deleted file mode 100644 index 569e284e447..00000000000 --- a/code/modules/nano/states/physical.dm +++ /dev/null @@ -1,21 +0,0 @@ - /** - * NanoUI State: physical_state - * - * Short-circuits the default state to only check physical distance. - **/ - -/var/global/datum/nano_state/physical/physical_state = new() - -/datum/nano_state/physical/can_use_topic(atom/movable/src_object, mob/user) - . = user.shared_nano_interaction(src_object) - if(. > NANO_CLOSE) - return min(., user.physical_can_use_topic(src_object)) - -/mob/proc/physical_can_use_topic(atom/movable/src_object) - return NANO_CLOSE - -/mob/living/physical_can_use_topic(atom/movable/src_object) - return shared_living_nano_distance(src_object) - -/mob/living/silicon/physical_can_use_topic(atom/movable/src_object) - return max(NANO_UPDATE, shared_living_nano_distance(src_object)) // Silicons can always see. diff --git a/code/modules/nano/states/self.dm b/code/modules/nano/states/self.dm deleted file mode 100644 index 9817c68ac0e..00000000000 --- a/code/modules/nano/states/self.dm +++ /dev/null @@ -1,12 +0,0 @@ - /** - * NanoUI State: self_state - * - * Only checks that the user and src_object are the same. - **/ - -/var/global/datum/nano_state/self_state/self_state = new() - -/datum/nano_state/self_state/can_use_topic(atom/movable/src_object, mob/user) - if(src_object != user) - return NANO_CLOSE - return user.shared_nano_interaction(src_object) diff --git a/code/modules/nano/states/states.dm b/code/modules/nano/states/states.dm deleted file mode 100644 index 532f7e4dfb9..00000000000 --- a/code/modules/nano/states/states.dm +++ /dev/null @@ -1,112 +0,0 @@ - /** - * NanoUI States - * - * Base state and helpers for states. Just does some sanity checks, implement a state for in-depth checks. - **/ - - /** - * public - * - * Checks if a user can use src_object's NanoUI, under the given state. - * - * required user mob The mob who opened/is using the NanoUI. - * required state datum/nano_state The state to check. - * - * return NANO_state The state of the UI. - **/ -/atom/proc/nano_state(mob/user, datum/nano_state/state) - var/src_object = nano_host() - - if(istype(user, /mob/dead/observer)) // Special-case ghosts. - if(check_rights_for(user.client, R_ADMIN)) - return NANO_INTERACTIVE // Admins can interact anyway. - if(get_dist(src_object, src) > user.client.view) - return NANO_CLOSE // Keep ghosts from opening too many NanoUIs. - return NANO_UPDATE // Ghosts can only view. - return state.can_use_topic(src_object, user) // Check if the state allows interaction. - - /** - * private - * - * Checks if a user can use src_object's NanoUI, and returns the state. - * Can call a mob proc, which allows overrides for each mob. - * - * required src_object atom/movable The object which owns the NanoUI. - * required user mob The mob who opened/is using the NanoUI. - * - * return NANO_state The state of the UI. - **/ -/datum/nano_state/proc/can_use_topic(atom/movable/src_object, mob/user) - return NANO_CLOSE // Don't allow interaction by default. - - - /** - * public - * - * Standard interaction/sanity checks. Different mob types may have overrides. - * - * return NANO_state The state of the UI. - **/ -/mob/proc/shared_nano_interaction(atom/movable/src_object) - if(!client || stat) // Close NanoUIs if mindless or dead/unconcious. - return NANO_CLOSE - // Update NanoUIs if incapicitated but concious. - else if(incapacitated() || lying) - return NANO_UPDATE - return NANO_INTERACTIVE - -/mob/living/carbon/human/shared_nano_interaction(atom/movable/src_object) - // If we have telekinesis and remain close enough, allow interaction. - if(dna.check_mutation(TK)) - if(tkMaxRangeCheck(src, src_object)) - return NANO_INTERACTIVE - return ..() - -/mob/living/silicon/ai/shared_nano_interaction(atom/movable/src_object) - if(lacks_power()) // Close NanoUIs if the AI is unpowered. - return NANO_CLOSE - return ..() - -/mob/living/silicon/robot/shared_nano_interaction(atom/movable/src_object) - if(cell.charge <= 0) // Close NanoUIs if the Borg is unpowered. - return NANO_CLOSE - if(lockcharge) // Disable NanoUIs if the Borg is locked. - return NANO_DISABLED - return ..() - -/** - * public - * - * Check the distance for a living mob. - * Really only used for checks outside the context of a mob. - * Otherwise, use shared_living_nano_distance(). - * - * required src_object atom/movable The object which owns the NanoUI. - * required user mob The mob who opened/is using the NanoUI. - * - * return NANO_state The state of the UI. - **/ -/atom/proc/contents_nano_distance(atom/movable/src_object, mob/living/user) - return user.shared_living_nano_distance(src_object) // Just call this mob's check. - - /** - * public - * - * Distance versus interaction check. - * - * required src_object atom/movable The object which owns the NanoUI. - * - * return NANO_state The state of the UI. - **/ -/mob/living/proc/shared_living_nano_distance(atom/movable/src_object) - if(!(src_object in view(4, src))) // If the object is out of view, close it. - return NANO_CLOSE - - var/dist = get_dist(src_object, src) - if(dist <= 1) // Open and interact if 1-0 tiles away. - return NANO_INTERACTIVE - else if(dist <= 2) // View only if 2-3 tiles away. - return NANO_UPDATE - else if(dist <= 5) // Disable if 5 tiles away. - return NANO_DISABLED - return NANO_CLOSE // Otherwise, we got nothing. \ No newline at end of file diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6460d023421..c31e232396a 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -626,8 +626,8 @@ else ui_interact(user) -/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "apc", name, 550, 560) ui.open() diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 0cbbf3f5420..898d249c9d2 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -329,8 +329,8 @@ return ui_interact(user) -/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "smes", name, 500, 455) ui.open() diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 58f62ad9f8f..27aec3f4eb8 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -369,8 +369,8 @@ return ui_interact(user) -/obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "solar_control", name, 515, 425) ui.open() diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 767d7082461..e306000e1e5 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -85,8 +85,8 @@ return ui_interact(user) -/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "chem_dispenser", name, 550, 600) ui.open() diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 2e177703ef4..12b2728897f 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -96,8 +96,8 @@ return ui_interact(user) -/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) +/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open) if (!ui) ui = new(user, src, ui_key, "chem_heater", name, 450, 340) ui.open() diff --git a/code/modules/nano/external.dm b/code/modules/tgui/external.dm similarity index 50% rename from code/modules/nano/external.dm rename to code/modules/tgui/external.dm index 7a15197eedc..1efa5cee8fe 100644 --- a/code/modules/nano/external.dm +++ b/code/modules/tgui/external.dm @@ -1,41 +1,36 @@ /** - * NanoUI External + * tgui external * - * Contains all external NanoUI declarations. - * - * /tg/station user interface library - * thanks to baystation12 - * - * modified by neersighted + * Contains all external tgui declarations. **/ /** * public * - * Used to open and update NanoUIs. - * If this proc is not implemented properly, the NanoUI will not update correctly. + * Used to open and update UIs. + * If this proc is not implemented properly, the UI will not update correctly. * - * required user mob The mob who opened/is using the NanoUI. - * optional ui_key string The ui_key of the NanoUI. - * optional ui datum/nanoui The UI to be updated, if it exists. + * required user mob The mob who opened/is using the UI. + * optional ui_key string The ui_key of the UI. + * optional ui datum/tgui The UI to be updated, if it exists. * optional force_open bool If the UI should be re-opened instead of updated. - * optional master_ui datum/nanoui The parent NanoUI. - * optional state datum/nano_state The state used to determine status. + * optional master_ui datum/tgui The parent UI. + * optional state datum/ui_state The state used to determine status. **/ -/atom/movable/proc/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, \ - force_open = 0, datum/nano_ui/master_ui = null, \ - datum/nano_state/state = default_state) +/atom/movable/proc/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, \ + force_open = 0, datum/tgui/master_ui = null, \ + datum/ui_state/state = default_state) return -1 // Sorta implemented. /** * public * - * Data to be sent to the NanoUI. - * This must be implemented for a NanoUI to work. + * Data to be sent to the UI. + * This must be implemented for a UI to work. * - * required user mob The mob interacting with the NanoUI. + * required user mob The mob interacting with the UI. * - * return list Data to be sent to the NanoUI. + * return list Data to be sent to the UI. **/ /atom/movable/proc/get_ui_data(mob/user) return list() // Not implemented. @@ -44,7 +39,7 @@ /** * public * - * Called on a NanoUI when the UI receieves a href. + * Called on a UI when the UI receieves a href. * Think of this as Topic(). * * required action string The action/button that has been invoked by the user. @@ -59,34 +54,34 @@ /** * private * - * The NanoUI's host object (usually src_object). - * Used internally by nano_state(s). + * The UI's host object (usually src_object). + * Used internally by ui_state(s). **/ -/atom/proc/nano_host() +/atom/proc/ui_host() return src /** * global * - * Used to track NanoUIs for a mob. + * Used to track UIs for a mob. **/ /mob/var/list/open_uis = list() /** * verb * - * Called by NanoUIs when they are closed. + * Called by UIs when they are closed. * Must be a verb so winset() can call it. * * required uiref ref The UI that was closed. **/ -/client/verb/nanoclose(uiref as text) +/client/verb/uiclose(uiref as text) // Name the verb, and hide it from the user panel. - set name = "nanoclose" + set name = "uiclose" set hidden = 1 // Get the UI based on the ref. - var/datum/nanoui/ui = locate(uiref) + var/datum/tgui/ui = locate(uiref) // If we found the UI, close it. if(istype(ui)) diff --git a/code/modules/tgui/states/admin.dm b/code/modules/tgui/states/admin.dm new file mode 100644 index 00000000000..c9a3bb467c4 --- /dev/null +++ b/code/modules/tgui/states/admin.dm @@ -0,0 +1,12 @@ + /** + * tgui state: admin_state + * + * Checks that the user is an admin, end-of-story. + **/ + +/var/global/datum/ui_state/admin_state/admin_state = new() + +/datum/ui_state/admin_state/can_use_topic(atom/movable/src_object, mob/user) + if(check_rights_for(user.client, R_ADMIN)) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/states/conscious.dm b/code/modules/tgui/states/conscious.dm new file mode 100644 index 00000000000..1b781a458d7 --- /dev/null +++ b/code/modules/tgui/states/conscious.dm @@ -0,0 +1,12 @@ + /** + * tgui state: conscious_state + * + * Only checks if the user is conscious. + **/ + +/var/global/datum/ui_state/conscious_state/conscious_state = new() + +/datum/ui_state/conscious_state/can_use_topic(atom/movable/src_object, mob/user) + if(user.stat == CONSCIOUS) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/states/contained.dm b/code/modules/tgui/states/contained.dm new file mode 100644 index 00000000000..20cda3241e0 --- /dev/null +++ b/code/modules/tgui/states/contained.dm @@ -0,0 +1,12 @@ + /** + * tgui state: contained_state + * + * Checks that the user is inside the src_object. + **/ + +/var/global/datum/ui_state/contained_state/contained_state = new() + +/datum/ui_state/contained_state/can_use_topic(atom/movable/src_object, mob/user) + if(!src_object.contains(user)) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/tgui/states/deep_inventory.dm b/code/modules/tgui/states/deep_inventory.dm new file mode 100644 index 00000000000..4fef9ad5b3c --- /dev/null +++ b/code/modules/tgui/states/deep_inventory.dm @@ -0,0 +1,12 @@ + /** + * tgui state: deep_inventory_state + * + * Checks that the src_object is in the user's fist-level (backpack, webbing, etc) inventory. + **/ + +/var/global/datum/ui_state/deep_inventory_state/deep_inventory_state = new() + +/datum/ui_state/deep_inventory_state/can_use_topic(atom/movable/src_object, mob/user) + if(!user.contains(src_object)) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/nano/states/default.dm b/code/modules/tgui/states/default.dm similarity index 52% rename from code/modules/nano/states/default.dm rename to code/modules/tgui/states/default.dm index cd5155b9c05..8e1c3e8dec9 100644 --- a/code/modules/nano/states/default.dm +++ b/code/modules/tgui/states/default.dm @@ -1,60 +1,60 @@ /** - * NanoUI State: default_state + * tgui state: default_state * * Checks a number of things -- mostly physical distance for humans and view for robots. **/ -/var/global/datum/nano_state/default/default_state = new() +/var/global/datum/ui_state/default/default_state = new() -/datum/nano_state/default/can_use_topic(atom/movable/src_object, mob/user) +/datum/ui_state/default/can_use_topic(atom/movable/src_object, mob/user) return user.default_can_use_topic(src_object) // Call the individual mob-overriden procs. /mob/proc/default_can_use_topic(atom/movable/src_object) - return NANO_CLOSE // Don't allow interaction by default. + return UI_CLOSE // Don't allow interaction by default. /mob/living/default_can_use_topic(atom/movable/src_object) - . = shared_nano_interaction(src_object) - if(. > NANO_CLOSE) - . = min(., shared_living_nano_distance(src_object)) // Check the distance... - if(. == NANO_INTERACTIVE) // Non-human living mobs can only look, not touch. - return NANO_UPDATE + . = shared_ui_interaction(src_object) + if(. > UI_CLOSE) + . = min(., shared_living_ui_distance(src_object)) // Check the distance... + if(. == UI_INTERACTIVE) // Non-human living mobs can only look, not touch. + return UI_UPDATE /mob/living/carbon/human/default_can_use_topic(atom/movable/src_object) - . = shared_nano_interaction(src_object) - if(. > NANO_CLOSE) - . = min(., shared_living_nano_distance(src_object)) // Check the distance... + . = shared_ui_interaction(src_object) + if(. > UI_CLOSE) + . = min(., shared_living_ui_distance(src_object)) // Check the distance... // Derp a bit if we have brain loss. if(prob(getBrainLoss())) - return NANO_UPDATE + return UI_UPDATE /mob/living/silicon/robot/default_can_use_topic(atom/movable/src_object) - . = shared_nano_interaction(src_object) - if(. <= NANO_DISABLED) + . = shared_ui_interaction(src_object) + if(. <= UI_DISABLED) return // Robots can interact with anything they can see. if(get_dist(src, src_object) <= src.client.view) - return NANO_INTERACTIVE - return NANO_DISABLED // Otherwise they can keep the UI open. + return UI_INTERACTIVE + return UI_DISABLED // Otherwise they can keep the UI open. /mob/living/silicon/ai/default_can_use_topic(atom/movable/src_object) - . = shared_nano_interaction(src_object) - if(. < NANO_INTERACTIVE) + . = shared_ui_interaction(src_object) + if(. < UI_INTERACTIVE) return // The AI can interact with anything it can see nearby, or with cameras. if((get_dist(src, src_object) <= src.client.view) || cameranet.checkTurfVis(get_turf_pixel(src_object))) - return NANO_INTERACTIVE - return NANO_CLOSE + return UI_INTERACTIVE + return UI_CLOSE /mob/living/simple_animal/drone/default_can_use_topic(atom/movable/src_object) - . = shared_nano_interaction(src_object) - if(. > NANO_CLOSE) - . = min(., shared_living_nano_distance(src_object)) // Drones can only use things they're near. + . = shared_ui_interaction(src_object) + if(. > UI_CLOSE) + . = min(., shared_living_ui_distance(src_object)) // Drones can only use things they're near. /mob/living/silicon/pai/default_can_use_topic(atom/movable/src_object) // pAIs can only use themselves and the owner's radio. if((src_object == src || src_object == radio) && !stat) - return NANO_INTERACTIVE + return UI_INTERACTIVE else return ..() diff --git a/code/modules/tgui/states/hands.dm b/code/modules/tgui/states/hands.dm new file mode 100644 index 00000000000..536a90597e4 --- /dev/null +++ b/code/modules/tgui/states/hands.dm @@ -0,0 +1,20 @@ + /** + * tgui state: hands_state + * + * Checks that the src_object is in the user's hands. + **/ + +/var/global/datum/ui_state/hands_state/hands_state = new() + +/datum/ui_state/hands_state/can_use_topic(atom/movable/src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) + return min(., user.hands_can_use_topic(src_object)) + +/mob/proc/hands_can_use_topic(atom/movable/src_object) + return UI_CLOSE + +/mob/living/hands_can_use_topic(atom/movable/src_object) + if(src_object in get_both_hands(src)) + return UI_INTERACTIVE + return UI_CLOSE \ No newline at end of file diff --git a/code/modules/tgui/states/inventory.dm b/code/modules/tgui/states/inventory.dm new file mode 100644 index 00000000000..a5f7233f00d --- /dev/null +++ b/code/modules/tgui/states/inventory.dm @@ -0,0 +1,12 @@ + /** + * tgui state: inventory_state + * + * Checks that the src_object is in the user's top-level (hand, ear, pocket, belt, etc) inventory. + **/ + +/var/global/datum/ui_state/inventory_state/inventory_state = new() + +/datum/ui_state/inventory_state/can_use_topic(atom/movable/src_object, mob/user) + if(!(src_object in user)) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/nano/states/notcontained.dm b/code/modules/tgui/states/notcontained.dm similarity index 66% rename from code/modules/nano/states/notcontained.dm rename to code/modules/tgui/states/notcontained.dm index 11dfe67025c..8df75b57626 100644 --- a/code/modules/nano/states/notcontained.dm +++ b/code/modules/tgui/states/notcontained.dm @@ -1,22 +1,22 @@ /** - * NanoUI State: notcontained_state + * tgui state: notcontained_state * * Checks that the user is not inside src_object, and then makes the default checks. **/ -/var/global/datum/nano_state/notcontained_state/notcontained_state = new() +/var/global/datum/ui_state/notcontained_state/notcontained_state = new() -/datum/nano_state/notcontained_state/can_use_topic(atom/movable/src_object, mob/user) - . = user.shared_nano_interaction(src_object) - if(. > NANO_CLOSE) +/datum/ui_state/notcontained_state/can_use_topic(atom/movable/src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) return min(., user.notcontained_can_use_topic(src_object)) /mob/proc/notcontained_can_use_topic(atom/movable/src_object) - return NANO_CLOSE + return UI_CLOSE /mob/living/notcontained_can_use_topic(atom/movable/src_object) if(src_object.contains(src)) - return NANO_CLOSE // Close if we're inside it. + return UI_CLOSE // Close if we're inside it. return default_can_use_topic(src_object) /mob/living/silicon/notcontained_can_use_topic(atom/movable/src_object) diff --git a/code/modules/tgui/states/physical.dm b/code/modules/tgui/states/physical.dm new file mode 100644 index 00000000000..a3fae3b276e --- /dev/null +++ b/code/modules/tgui/states/physical.dm @@ -0,0 +1,21 @@ + /** + * tgui state: physical_state + * + * Short-circuits the default state to only check physical distance. + **/ + +/var/global/datum/ui_state/physical/physical_state = new() + +/datum/ui_state/physical/can_use_topic(atom/movable/src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) + return min(., user.physical_can_use_topic(src_object)) + +/mob/proc/physical_can_use_topic(atom/movable/src_object) + return UI_CLOSE + +/mob/living/physical_can_use_topic(atom/movable/src_object) + return shared_living_ui_distance(src_object) + +/mob/living/silicon/physical_can_use_topic(atom/movable/src_object) + return max(UI_UPDATE, shared_living_ui_distance(src_object)) // Silicons can always see. diff --git a/code/modules/tgui/states/self.dm b/code/modules/tgui/states/self.dm new file mode 100644 index 00000000000..edb7c3ef300 --- /dev/null +++ b/code/modules/tgui/states/self.dm @@ -0,0 +1,12 @@ + /** + * tgui state: self_state + * + * Only checks that the user and src_object are the same. + **/ + +/var/global/datum/ui_state/self_state/self_state = new() + +/datum/ui_state/self_state/can_use_topic(atom/movable/src_object, mob/user) + if(src_object != user) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/tgui/states/states.dm b/code/modules/tgui/states/states.dm new file mode 100644 index 00000000000..195d9394e3e --- /dev/null +++ b/code/modules/tgui/states/states.dm @@ -0,0 +1,112 @@ + /** + * tgui states + * + * Base state and helpers for states. Just does some sanity checks, implement a state for in-depth checks. + **/ + + /** + * public + * + * Checks if a user can use src_object's UI, under the given state. + * + * required user mob The mob who opened/is using the UI. + * required state datum/ui_state The state to check. + * + * return UI_state The state of the UI. + **/ +/atom/proc/ui_state(mob/user, datum/ui_state/state) + var/src_object = ui_host() + + if(istype(user, /mob/dead/observer)) // Special-case ghosts. + if(check_rights_for(user.client, R_ADMIN)) + return UI_INTERACTIVE // Admins can interact anyway. + if(get_dist(src_object, src) > user.client.view) + return UI_CLOSE // Keep ghosts from opening too many UIs. + return UI_UPDATE // Ghosts can only view. + return state.can_use_topic(src_object, user) // Check if the state allows interaction. + + /** + * private + * + * Checks if a user can use src_object's UI, and returns the state. + * Can call a mob proc, which allows overrides for each mob. + * + * required src_object atom/movable The object which owns the UI. + * required user mob The mob who opened/is using the UI. + * + * return UI_state The state of the UI. + **/ +/datum/ui_state/proc/can_use_topic(atom/movable/src_object, mob/user) + return UI_CLOSE // Don't allow interaction by default. + + + /** + * public + * + * Standard interaction/sanity checks. Different mob types may have overrides. + * + * return UI_state The state of the UI. + **/ +/mob/proc/shared_ui_interaction(atom/movable/src_object) + if(!client || stat) // Close UIs if mindless or dead/unconcious. + return UI_CLOSE + // Update UIs if incapicitated but concious. + else if(incapacitated() || lying) + return UI_UPDATE + return UI_INTERACTIVE + +/mob/living/carbon/human/shared_ui_interaction(atom/movable/src_object) + // If we have telekinesis and remain close enough, allow interaction. + if(dna.check_mutation(TK)) + if(tkMaxRangeCheck(src, src_object)) + return UI_INTERACTIVE + return ..() + +/mob/living/silicon/ai/shared_ui_interaction(atom/movable/src_object) + if(lacks_power()) // Close UIs if the AI is unpowered. + return UI_CLOSE + return ..() + +/mob/living/silicon/robot/shared_ui_interaction(atom/movable/src_object) + if(cell.charge <= 0) // Close UIs if the Borg is unpowered. + return UI_CLOSE + if(lockcharge) // Disable UIs if the Borg is locked. + return UI_DISABLED + return ..() + +/** + * public + * + * Check the distance for a living mob. + * Really only used for checks outside the context of a mob. + * Otherwise, use shared_living_ui_distance(). + * + * required src_object atom/movable The object which owns the UI. + * required user mob The mob who opened/is using the UI. + * + * return UI_state The state of the UI. + **/ +/atom/proc/contents_ui_distance(atom/movable/src_object, mob/living/user) + return user.shared_living_ui_distance(src_object) // Just call this mob's check. + + /** + * public + * + * Distance versus interaction check. + * + * required src_object atom/movable The object which owns the UI. + * + * return UI_state The state of the UI. + **/ +/mob/living/proc/shared_living_ui_distance(atom/movable/src_object) + if(!(src_object in view(4, src))) // If the object is out of view, close it. + return UI_CLOSE + + var/dist = get_dist(src_object, src) + if(dist <= 1) // Open and interact if 1-0 tiles away. + return UI_INTERACTIVE + else if(dist <= 2) // View only if 2-3 tiles away. + return UI_UPDATE + else if(dist <= 5) // Disable if 5 tiles away. + return UI_DISABLED + return UI_CLOSE // Otherwise, we got nothing. \ No newline at end of file diff --git a/code/modules/nano/states/zlevel.dm b/code/modules/tgui/states/zlevel.dm similarity index 53% rename from code/modules/nano/states/zlevel.dm rename to code/modules/tgui/states/zlevel.dm index 199c22e22c0..2f06f36c8f8 100644 --- a/code/modules/nano/states/zlevel.dm +++ b/code/modules/tgui/states/zlevel.dm @@ -1,14 +1,14 @@ /** - * NanoUI State: z_state + * tgui state: z_state * * Only checks that the Z-level of the user and src_object are the same. **/ -/var/global/datum/nano_state/z_state/z_state = new() +/var/global/datum/ui_state/z_state/z_state = new() -/datum/nano_state/z_state/can_use_topic(atom/movable/src_object, mob/user) +/datum/ui_state/z_state/can_use_topic(atom/movable/src_object, mob/user) var/turf/turf_obj = get_turf(src_object) var/turf/turf_usr = get_turf(user) if(!turf_obj || !turf_usr || !(turf_obj.z == turf_usr.z)) - return NANO_CLOSE - return NANO_INTERACTIVE + return UI_CLOSE + return UI_INTERACTIVE diff --git a/code/modules/nano/subsystem.dm b/code/modules/tgui/subsystem.dm similarity index 60% rename from code/modules/nano/subsystem.dm rename to code/modules/tgui/subsystem.dm index b539566bd45..14b4dd5f7e5 100644 --- a/code/modules/nano/subsystem.dm +++ b/code/modules/tgui/subsystem.dm @@ -1,34 +1,29 @@ /** - * NanoUI Subsystem + * tgui subsystem * - * Contains all NanoUI state and subsystem code. - * - * /tg/station user interface library - * thanks to baystation12 - * - * modified by neersighted + * Contains all tgui state and subsystem code. **/ /** * public * - * Get a open NanoUI given a user, src_object, and ui_key and try to update it with data. + * Get a open UI given a user, src_object, and ui_key and try to update it with data. * - * required user mob The mob who opened/is using the NanoUI. - * required src_object atom/movable The object which owns the NanoUI. - * required ui_key string The ui_key of the NanoUI. - * optional ui datum/nanoui The UI to be updated, if it exists. + * required user mob The mob who opened/is using the UI. + * required src_object atom/movable The object which owns the UI. + * required ui_key string The ui_key of the UI. + * optional ui datum/tgui The UI to be updated, if it exists. * optional data list The data to update the UI with, if it exists. * optional force_open bool If the UI should be re-opened instead of updated. * - * return datum/nanoui The found NanoUI. + * return datum/tgui The found UI. **/ -/datum/subsystem/nano/proc/try_update_ui(mob/user, atom/movable/src_object, ui_key, datum/nanoui/ui, \ +/datum/subsystem/tgui/proc/try_update_ui(mob/user, atom/movable/src_object, ui_key, datum/tgui/ui, \ list/data = null, force_open = 0) if(!data) data = src_object.get_ui_data(user) - if(isnull(ui)) // No NanoUI was passed, so look for one. + if(isnull(ui)) // No UI was passed, so look for one. ui = get_open_ui(user, src_object, ui_key) if(!isnull(ui)) @@ -43,22 +38,22 @@ /** * private * - * Get a open NanoUI given a user, src_object, and ui_key. + * Get a open UI given a user, src_object, and ui_key. * - * required user mob The mob who opened/is using the NanoUI. - * required src_object atom/movable The object which owns the NanoUI. - * required ui_key string The ui_key of the NanoUI. + * required user mob The mob who opened/is using the UI. + * required src_object atom/movable The object which owns the UI. + * required ui_key string The ui_key of the UI. * - * return datum/nanoui The found NanoUI. + * return datum/tgui The found UI. **/ -/datum/subsystem/nano/proc/get_open_ui(mob/user, atom/movable/src_object, ui_key) +/datum/subsystem/tgui/proc/get_open_ui(mob/user, atom/movable/src_object, ui_key) var/src_object_key = "\ref[src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return null // No UIs open. else if(isnull(open_uis[src_object_key][ui_key]) || !istype(open_uis[src_object_key][ui_key], /list)) return null // No UIs open for this object. - for(var/datum/nanoui/ui in open_uis[src_object_key][ui_key]) // Find UIs for this object. + for(var/datum/tgui/ui in open_uis[src_object_key][ui_key]) // Find UIs for this object. if(ui.user == user) // Make sure we have the right user return ui @@ -67,21 +62,21 @@ /** * private * - * Update all NanoUIs attached to src_object. + * Update all UIs attached to src_object. * - * required src_object atom/movable The object which owns the NanoUIs. + * required src_object atom/movable The object which owns the UIs. * - * return int The number of NanoUIs updated. + * return int The number of UIs updated. **/ -/datum/subsystem/nano/proc/update_uis(atom/movable/src_object) +/datum/subsystem/tgui/proc/update_uis(atom/movable/src_object) var/src_object_key = "\ref[src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 // Couldn't find any UIs for this object. var/update_count = 0 for(var/ui_key in open_uis[src_object_key]) - for(var/datum/nanoui/ui in open_uis[src_object_key][ui_key]) - if(ui && ui.src_object && ui.user && ui.src_object.nano_host()) // Check the UI is valid. + for(var/datum/tgui/ui in open_uis[src_object_key][ui_key]) + if(ui && ui.src_object && ui.user && ui.src_object.ui_host()) // Check the UI is valid. ui.process(force = 1) // Update the UI. update_count++ // Count each UI we update. return update_count @@ -89,21 +84,21 @@ /** * private * - * Close all NanoUIs attached to src_object. + * Close all UIs attached to src_object. * - * required src_object atom/movable The object which owns the NanoUIs. + * required src_object atom/movable The object which owns the UIs. * - * return int The number of NanoUIs closed. + * return int The number of UIs closed. **/ -/datum/subsystem/nano/proc/close_uis(atom/movable/src_object) +/datum/subsystem/tgui/proc/close_uis(atom/movable/src_object) var/src_object_key = "\ref[src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 // Couldn't find any UIs for this object. var/close_count = 0 for(var/ui_key in open_uis[src_object_key]) - for(var/datum/nanoui/ui in open_uis[src_object_key][ui_key]) - if(ui && ui.src_object && ui.user && ui.src_object.nano_host()) // Check the UI is valid. + for(var/datum/tgui/ui in open_uis[src_object_key][ui_key]) + if(ui && ui.src_object && ui.user && ui.src_object.ui_host()) // Check the UI is valid. ui.close() // Close the UI. close_count++ // Count each UI we close. return close_count @@ -111,20 +106,20 @@ /** * private * - * Update all NanoUIs belonging to a user. + * Update all UIs belonging to a user. * - * required user mob The mob who opened/is using the NanoUI. + * required user mob The mob who opened/is using the UI. * optional src_object atom/movable If provided, only update UIs belonging this atom. * optional ui_key string If provided, only update UIs with this UI key. * - * return int The number of NanoUIs updated. + * return int The number of UIs updated. **/ -/datum/subsystem/nano/proc/update_user_uis(mob/user, atom/movable/src_object = null, ui_key = null) +/datum/subsystem/tgui/proc/update_user_uis(mob/user, atom/movable/src_object = null, ui_key = null) if(isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) return 0 // Couldn't find any UIs for this user. var/update_count = 0 - for(var/datum/nanoui/ui in user.open_uis) + for(var/datum/tgui/ui in user.open_uis) if((isnull(src_object) || !isnull(src_object) && ui.src_object == src_object) && (isnull(ui_key) || !isnull(ui_key) && ui.ui_key == ui_key)) ui.process(force = 1) // Update the UI. update_count++ // Count each UI we upadte. @@ -133,20 +128,20 @@ /** * private * - * Close all NanoUIs belonging to a user. + * Close all UIs belonging to a user. * - * required user mob The mob who opened/is using the NanoUI. + * required user mob The mob who opened/is using the UI. * optional src_object atom/movable If provided, only update UIs belonging this atom. * optional ui_key string If provided, only update UIs with this UI key. * - * return int The number of NanoUIs closed. + * return int The number of UIs closed. **/ -/datum/subsystem/nano/proc/close_user_uis(mob/user, atom/movable/src_object = null, ui_key = null) +/datum/subsystem/tgui/proc/close_user_uis(mob/user, atom/movable/src_object = null, ui_key = null) if(isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) return 0 // Couldn't find any UIs for this user. var/close_count = 0 - for(var/datum/nanoui/ui in user.open_uis) + for(var/datum/tgui/ui in user.open_uis) if((isnull(src_object) || !isnull(src_object) && ui.src_object == src_object) && (isnull(ui_key) || !isnull(ui_key) && ui.ui_key == ui_key)) ui.close() // Close the UI. close_count++ // Count each UI we close. @@ -155,11 +150,11 @@ /** * private * - * Add a NanoUI to the list of open UIs. + * Add a UI to the list of open UIs. * - * required ui datum/nanoui The UI to be added. + * required ui datum/tgui The UI to be added. **/ -/datum/subsystem/nano/proc/on_open(datum/nanoui/ui) +/datum/subsystem/tgui/proc/on_open(datum/tgui/ui) var/src_object_key = "\ref[ui.src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) open_uis[src_object_key] = list(ui.ui_key = list()) // Make a list for the ui_key and src_object. @@ -175,13 +170,13 @@ /** * private * - * Remove a NanoUI from the list of open UIs. + * Remove a UI from the list of open UIs. * - * required ui datum/nanoui The UI to be removed. + * required ui datum/tgui The UI to be removed. * * return bool If the UI was removed or not. **/ -/datum/subsystem/nano/proc/on_close(datum/nanoui/ui) +/datum/subsystem/tgui/proc/on_close(datum/tgui/ui) var/src_object_key = "\ref[ui.src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 // It wasn't open. @@ -198,35 +193,35 @@ /** * private * - * Handle client logout, by closing all their NanoUIs. + * Handle client logout, by closing all their UIs. * * required user mob The mob which logged out. * - * return int The number of NanoUIs closed. + * return int The number of UIs closed. **/ -/datum/subsystem/nano/proc/on_logout(mob/user) +/datum/subsystem/tgui/proc/on_logout(mob/user) return close_user_uis(user) /** * private * - * Handle clients switching mobs, by transfering their NanoUIs. + * Handle clients switching mobs, by transfering their UIs. * * required user source The client's original mob. * required user target The client's new mob. * - * return bool If the NanoUIs were transferred. + * return bool If the UIs were transferred. **/ -/datum/subsystem/nano/proc/on_transfer(mob/source, mob/target) +/datum/subsystem/tgui/proc/on_transfer(mob/source, mob/target) if(!source || isnull(source.open_uis) || !istype(source.open_uis, /list) || open_uis.len == 0) - return 0 // The old mob had no open NanoUIs. + return 0 // The old mob had no open UIs. if(isnull(target.open_uis) || !istype(target.open_uis, /list)) target.open_uis = list() // Create a list for the new mob if needed. - for(var/datum/nanoui/ui in source.open_uis) + for(var/datum/tgui/ui in source.open_uis) ui.user = target // Inform the UIs of their new owner. - target.open_uis.Add(ui) // Transfer all the NanoUIs. + target.open_uis.Add(ui) // Transfer all the UIs. source.open_uis.Cut() // Clear the old list. return 1 // Let the caller know we did it. diff --git a/code/modules/nano/nanoui.dm b/code/modules/tgui/tgui.dm similarity index 58% rename from code/modules/nano/nanoui.dm rename to code/modules/tgui/tgui.dm index b5d8f4e0ac5..8cc69f3145e 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/tgui/tgui.dm @@ -1,24 +1,17 @@ /** - * NanoUI - * - * Contains the NanoUI datum, and its procs. + * tgui * * /tg/station user interface library - * thanks to baystation12 - * - * modified by neersighted **/ /** - * NanoUI datum: - * - * Represents a NanoUI. + * tgui datum (represents a UI). **/ -/datum/nanoui - var/mob/user // The mob who opened/is using the NanoUI. - var/atom/movable/src_object // The object which owns the NanoUI. - var/title // The title of te NanoUI. - var/ui_key // The ui_key of the NanoUI. This allows multiple UIs for one src_object. +/datum/tgui + var/mob/user // The mob who opened/is using the UI. + var/atom/movable/src_object // The object which owns the UI. + var/title // The title of te UI. + var/ui_key // The ui_key of the UI. This allows multiple UIs for one src_object. var/window_id // The window_id for browse() and onclose(). var/width = 0 // The window width. var/height = 0 // The window height @@ -34,35 +27,35 @@ var/atom/ref = null // An extra ref to call when the window is closed. var/style = "nanotrasen" // The style to be used for this UI. var/interface // The interface (template) to be used for this UI. - var/auto_update = 1 // Update the NanoUI every MC tick. - var/list/initial_data // The data (and datastructure) used to initialize the NanoUI. - var/status = NANO_INTERACTIVE // The status/visibility of the NanoUI. - var/datum/nano_state/state = null // Topic state used to determine status/interactability. - var/datum/nanoui/master_ui // The parent NanoUI. - var/list/datum/nanoui/children = list() // Children of this NanoUI. + var/auto_update = 1 // Update the UI every MC tick. + var/list/initial_data // The data (and datastructure) used to initialize the UI. + var/status = UI_INTERACTIVE // The status/visibility of the UI. + var/datum/ui_state/state = null // Topic state used to determine status/interactability. + var/datum/tgui/master_ui // The parent UI. + var/list/datum/tgui/children = list() // Children of this UI. /** * public * - * Create a new NanoUI. + * Create a new UI. * - * required user mob The mob who opened/is using the NanoUI. - * required src_object atom/movable The object which owns the NanoUI. - * required ui_key string The ui_key of the NanoUI. + * required user mob The mob who opened/is using the UI. + * required src_object atom/movable The object which owns the UI. + * required ui_key string The ui_key of the UI. * required interface string The interface used to render the UI. - * optional title string The title of the NanoUI. + * optional title string The title of the UI. * optional width int The window width. * optional height int The window height. * optional ref atom An extra ref to use when the window is closed. - * optional master_ui datum/nanoui The parent NanoUI. - * optional state datum/nano_state The state used to determine status. + * optional master_ui datum/tgui The parent UI. + * optional state datum/ui_state The state used to determine status. * - * return datum/nanoui The requested NanoUI. + * return datum/tgui The requested UI. **/ -/datum/nanoui/New(mob/user, atom/movable/src_object, ui_key, interface, \ +/datum/tgui/New(mob/user, atom/movable/src_object, ui_key, interface, \ title, width = 0, height = 0, \ - atom/ref = null, datum/nanoui/master_ui = null, \ - datum/nano_state/state = default_state) + atom/ref = null, datum/tgui/master_ui = null, \ + datum/ui_state/state = default_state) src.user = user src.src_object = src_object src.ui_key = ui_key @@ -85,22 +78,22 @@ master_ui.children += src src.state = state - var/datum/asset/assets = get_asset_datum(/datum/asset/simple/nanoui) + var/datum/asset/assets = get_asset_datum(/datum/asset/simple/tgui) assets.send(user) /** * public * - * Open this NanoUI (and initialize it with data). + * Open this UI (and initialize it with data). * * optional data list The data to intialize the UI with. **/ -/datum/nanoui/proc/open(list/data = null) +/datum/tgui/proc/open(list/data = null) if(!user.client) return // Bail if there is no client. update_status(push = 0) // Update the window status. - if(status == NANO_CLOSE) + if(status == UI_CLOSE) return // Bail if we should close. if(!initial_data) @@ -113,19 +106,19 @@ window_size = "size=[width]x[height];" user << browse(get_html(), "window=[window_id];[window_size][list2params(window_options)]") // Open the window. - winset(user, window_id, "on-close=\"nanoclose \ref[src]\"") // Instruct the client to signal NanoUI when the window is closed. - SSnano.on_open(src) + winset(user, window_id, "on-close=\"uiclose \ref[src]\"") // Instruct the client to signal UI when the window is closed. + SStgui.on_open(src) /** * public * - * Reinitialize the NanoUI. + * Reinitialize the UI. * (Possibly with a new interface and/or data). * * optional template string The name of the new interface. * optional data list The new initial data. **/ -/datum/nanoui/proc/reinitialize(interface, list/data) +/datum/tgui/proc/reinitialize(interface, list/data) if(interface) set_interface(interface) // Set a new interface. if(data) @@ -135,90 +128,90 @@ /** * public * - * Close the NanoUI, and all its children. + * Close the UI, and all its children. **/ -/datum/nanoui/proc/close() +/datum/tgui/proc/close() user << browse(null, "window=[window_id]") // Close the window. - SSnano.on_close(src) - for(var/datum/nanoui/child in children) // Loop through and close all children. + SStgui.on_close(src) + for(var/datum/tgui/child in children) // Loop through and close all children. child.close() /** * public * - * Sets the browse() window options for this NanoUI. + * Sets the browse() window options for this UI. * * required window_options list The window options to set. **/ -/datum/nanoui/proc/set_window_options(list/window_options) +/datum/tgui/proc/set_window_options(list/window_options) src.window_options = window_options /** * public * - * Set the style for this NanoUI. + * Set the style for this UI. * * required style string The new UI style. **/ -/datum/nanoui/proc/set_style(style) +/datum/tgui/proc/set_style(style) src.style = lowertext(style) /** * public * - * Set the interface (template) for this NanoUI. + * Set the interface (template) for this UI. * * required interface string The new UI interface. **/ -/datum/nanoui/proc/set_interface(interface) +/datum/tgui/proc/set_interface(interface) src.interface = lowertext(interface) /** * public * - * Enable/disable auto-updating of the NanoUI. + * Enable/disable auto-updating of the UI. * * required state bool Enable/disable auto-updating. **/ -/datum/nanoui/proc/set_auto_update(state = 1) +/datum/tgui/proc/set_auto_update(state = 1) auto_update = state /** * private * - * Set the data to initialize the NanoUI with. + * Set the data to initialize the UI with. * The datastructure cannot be changed by subsequent updates. * - * optional data list The data/datastructure to initialize the NanoUI with. + * optional data list The data/datastructure to initialize the UI with. **/ -/datum/nanoui/proc/set_initial_data(list/data) +/datum/tgui/proc/set_initial_data(list/data) initial_data = data /** * private * - * Generate HTML for this NanoUI. + * Generate HTML for this UI. * - * return string NanoUI HTML output. + * return string UI HTML output. **/ -/datum/nanoui/proc/get_html() +/datum/tgui/proc/get_html() // Poplate HTML with JSON. - return replacetextEx(SSnano.html, "{}", get_json(initial_data)) + return replacetextEx(SStgui.html, "{}", get_json(initial_data)) /** * private * - * Get the config data/datastructure to initialize the NanoUI with. + * Get the config data/datastructure to initialize the UI with. * * return list The config data. **/ -/datum/nanoui/proc/get_config_data() +/datum/tgui/proc/get_config_data() var/list/config_data = list( "title" = title, "status" = status, "style" = style, "interface" = interface, - "fancy" = user.client.prefs.nanoui_fancy, + "fancy" = user.client.prefs.tgui_fancy, "window" = window_id, "ref" = "\ref[src]", "user" = list( @@ -240,7 +233,7 @@ * * return string The packaged JSON. **/ -/datum/nanoui/proc/get_json(list/data) +/datum/tgui/proc/get_json(list/data) var/list/json_data = list() json_data["config"] = get_config_data() @@ -256,13 +249,13 @@ /** * private * - * Handle clicks from the NanoUI. - * Call the src_object's ui_act() if status is NANO_INTERACTIVE. + * Handle clicks from the UI. + * Call the src_object's ui_act() if status is UI_INTERACTIVE. * If the src_object's ui_act() returns 1, update all UIs attacked to it. **/ -/datum/nanoui/Topic(href, href_list) +/datum/tgui/Topic(href, href_list) update_status(push = 0) // Update the window state. - if(status != NANO_INTERACTIVE || user != usr) + if(status != UI_INTERACTIVE || user != usr) return // If UI is not interactive or usr calling Topic is not the UI user. var/action = href_list["action"] // Pull the action out. @@ -270,17 +263,17 @@ var/update = src_object.ui_act(action, href_list, state) // Call ui_act() on the src_object. if(src_object && update) - SSnano.update_uis(src_object) // If we have a src_object and its ui_act() told us to update. + SStgui.update_uis(src_object) // If we have a src_object and its ui_act() told us to update. /** * private * - * Update the NanoUI. + * Update the UI. * Only updates the data if update is true, otherwise only updates the status. * * optional force bool If the UI should be forced to update. **/ -/datum/nanoui/process(force = 0) +/datum/tgui/process(force = 0) if(!src_object || !user) // If the object or user died (or something else), abort. close() return @@ -293,14 +286,14 @@ /** * private * - * Push data to an already open NanoUI. + * Push data to an already open UI. * * required data list The data to send. * optional force bool If the update should be sent regardless of state. **/ -/datum/nanoui/proc/push_data(data, force = 0) +/datum/tgui/proc/push_data(data, force = 0) update_status(push = 0) // Update the window state. - if(status <= NANO_DISABLED && !force) + if(status <= UI_DISABLED && !force) return // Cannot update UI, we have no visibility. // Send the new JSON to the recieveUpdate() Javascript function. @@ -315,22 +308,22 @@ * * optional force_open bool If force_open should be passed to ui_interact. **/ -/datum/nanoui/proc/update(force_open = 0) +/datum/tgui/proc/update(force_open = 0) src_object.ui_interact(user, ui_key, src, force_open, master_ui, state) /** * private * - * Update the status/visibility of the NanoUI for its user. + * Update the status/visibility of the UI for its user. * - * optional push bool Push an update to the UI (an update is always sent for NANO_DISABLED). + * optional push bool Push an update to the UI (an update is always sent for UI_DISABLED). **/ -/datum/nanoui/proc/update_status(push = 0) - var/new_status = src_object.nano_state(user, state) +/datum/tgui/proc/update_status(push = 0) + var/new_status = src_object.ui_state(user, state) if(master_ui) new_status = min(new_status, master_ui.status) - if(new_status == NANO_CLOSE) + if(new_status == UI_CLOSE) close() else set_status(new_status, push) @@ -338,18 +331,18 @@ /** * private * - * Set the status/visibility of the NanoUI. + * Set the status/visibility of the UI. * - * required status int The status to set (NANO_CLOSE/NANO_DISABLED/NANO_UPDATE/NANO_INTERACTIVE). - * optional push bool Push an update to the UI (an update is always sent for NANO_DISABLED). + * required status int The status to set (UI_CLOSE/UI_DISABLED/UI_UPDATE/UI_INTERACTIVE). + * optional push bool Push an update to the UI (an update is always sent for UI_DISABLED). **/ -/datum/nanoui/proc/set_status(status, push = 0) +/datum/tgui/proc/set_status(status, push = 0) if(src.status != status) // Only update if status has changed. - if(src.status == NANO_DISABLED) + if(src.status == UI_DISABLED) src.status = status if(push) update() else src.status = status - if(status == NANO_DISABLED || push) // Update if the UI just because disabled, or a push is requested. + if(status == UI_DISABLED || push) // Update if the UI just because disabled, or a push is requested. push_data(null, force = 1) \ No newline at end of file diff --git a/nano/oldtemplates/_generic.dot b/nano/oldtemplates/_generic.dot deleted file mode 100644 index 698191ae91c..00000000000 --- a/nano/oldtemplates/_generic.dot +++ /dev/null @@ -1,14 +0,0 @@ -
-
- - {{=config.title}} - - -
- -
-
Initiating...
-
- -
-
diff --git a/nano/oldtemplates/_nanotrasen.dot b/nano/oldtemplates/_nanotrasen.dot deleted file mode 100644 index c41921a7824..00000000000 --- a/nano/oldtemplates/_nanotrasen.dot +++ /dev/null @@ -1,14 +0,0 @@ -
-
- - {{=config.title}} - - -
- -
-
Initiating...
-
- -
-
diff --git a/nano/oldtemplates/air_alarm.dot b/nano/oldtemplates/air_alarm.dot deleted file mode 100644 index 364767cbfc9..00000000000 --- a/nano/oldtemplates/air_alarm.dot +++ /dev/null @@ -1,233 +0,0 @@ -
- {{? data.siliconUser}} -
- Interface Lock: -
- {{=helper.link('Engaged', 'lock', 'toggleaccess', null, data.locked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlock', 'toggleaccess', null, data.locked ? null : 'selected')}} -
-
- {{??}} - {{? data.locked}} - Swipe an ID card to unlock this interface. - {{??}} - Swipe an ID card to lock this interface. - {{?}} - {{?}} -
-
-

Air Status

- {{? data.environment_data}} - {{~ data.environment_data:info:i}} -
- {{=info.name}}: -
- {{? info.danger_level == 2}} - - {{?? info.danger_level == 1}} - - {{??}} - - {{?}} - {{=helper.fixed(info.value, 2)}}{{=info.unit}} -
-
- {{~}} -
- Local Status: -
- {{? data.danger_level == 2}} - Danger (Internals Required) - {{?? data.danger_level == 1}} - Caution - {{??}} - Optimal - {{?}} -
-
-
- Area Status: -
- {{? data.atmos_alarm}} - Atmosphere Alarm - {{?? data.fire_alarm}} - Fire Alarm - {{??}} - Nominal - {{?}} -
-
- {{??}} -
- Warning: Cannot obtain air sample for analysis. -
- {{?}} - {{? data.emagged}} -
-
- Warning: Safety measures offline. Device may exhibit abnormal behavior. -
- {{?}} -
-{{? (!data.locked || data.siliconUser)}} - {{? data.screen != 1}} - {{=helper.link('Back', 'arrow-left', 'screen', {'screen': 1})}} - {{?}} - {{? data.screen == 1}} -
-

Air Controls

-
- {{? !data.atmos_alarm}} - {{=helper.link('Area Atmospheric Alarm', 'hand-stop-o', 'alarm')}} - {{??}} - {{=helper.link('Area Atmospheric Alarm', 'close', 'reset', null, null, 'caution')}} - {{?}} -
-
- {{? data.mode != 3}} - {{=helper.link('Panic Siphon', 'exclamation', 'mode', {'mode': 3})}} - {{??}} - {{=helper.link('Panic Siphon', 'close', 'mode', {'mode': 1}, null, 'danger')}} - {{?}} -
-
- {{=helper.link('Vent Controls', 'sign-out', 'screen', {'screen': 2})}} -
-
- {{=helper.link('Scrubber Controls', 'filter', 'screen', {'screen': 3})}} -
-
- {{=helper.link('Set Environmental Mode', 'cog', 'screen', {'screen': 4})}} -
-
- {{=helper.link('Set Alarm Threshold', 'bar-chart', 'screen', {'screen': 5})}} -
-
- {{?? data.screen == 2}} - {{~ data.vents:vent:i}} -
-

{{=vent.long_name}}

-
- Power: -
- {{? vent.power}} - {{=helper.link('On', 'power-off', 'adjust', {'id_tag': vent.id_tag, 'command': 'power', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Off', 'close', 'adjust', {'id_tag': vent.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
- Mode: -
- {{? vent.direction == "release"}} - Pressurizing - {{??}} - Siphoning - {{?}} -
-
-
- Pressure Checks: -
- {{=helper.link('Internal', 'sign-in', 'adjust', {'id_tag': vent.id_tag, 'command': 'incheck', 'val': vent.checks}, null, vent.incheck ? 'selected' : null)}} - {{=helper.link('External', 'sign-out', 'adjust', {'id_tag': vent.id_tag, 'command': 'excheck', 'val': vent.checks}, null, vent.excheck ? 'selected' : null)}} -
-
-
- Set Pressure: -
- {{=helper.link(helper.fixed(vent.external), 'pencil', 'adjust', {'id_tag': vent.id_tag, 'command': 'set_external_pressure'})}} - {{=helper.link('Reset', 'refresh', 'adjust', {'id_tag': vent.id_tag, 'command': 'reset_external_pressure'}, vent.extdefault ? 'disabled' : null)}} -
-
-
- {{~}} - {{? !data.vents.length}} - No vents connected. - {{?}} - {{?? data.screen == 3}} - {{~ data.scrubbers:scrubber:i}} -
-

{{=scrubber.long_name}}

-
- Power: -
- {{? scrubber.power}} - {{=helper.link('On', 'power-off', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Off', 'close', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
- Mode: -
- {{? scrubber.scrubbing}} - {{=helper.link('Scrubbing', 'filter', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Siphoning', 'sign-in', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
- Range: -
- {{? scrubber.widenet}} - {{=helper.link('Extended', 'expand', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution')}} - {{??}} - {{=helper.link('Normal', 'compress', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null)}} - {{?}} -
-
-
- Filters: -
- {{=helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "co2_scrub", 'val': scrubber.filter_co2 ? 0 : 1}, null, scrubber.filter_co2 ? 'selected' : null)}} - {{=helper.link("N2O", scrubber.filter_n2o ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "n2o_scrub", 'val': scrubber.filter_n2o ? 0 : 1}, null, scrubber.filter_n2o ? 'selected' : null)}} - {{=helper.link("Plasma", scrubber.filter_toxins ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "tox_scrub", 'val': scrubber.filter_toxins ? 0 : 1}, null, scrubber.filter_toxins ? 'selected' : null)}} -
-
-
- {{~}} - {{? !data.scrubbers.length}} - No scrubbers connected. - {{?}} - {{?? data.screen == 4}} -
-

Environmental Modes

- {{~ data.modes:mode:i}} -
- {{=helper.link(mode.name, mode.selected ? 'check-square-o' : 'square-o', 'mode', {'mode': mode.mode}, null, mode.selected ? (mode.danger ? 'danger' : 'selected') : null)}} -
- {{~}} -
- {{?? data.screen == 5}} -
-

Alarm Thresholds

- - - - - - - - - - - - {{~ data.thresholds:threshold:i}} - - - {{~ threshold.settings:setting:j}} - - {{~}} - - {{~}} - -
min2min1max1max2
{{=threshold.name}} - {{=helper.link(setting.selected >= 0 ? helper.round(setting.selected*100)/100 : "Off", null, 'adjust', {'command': 'set_threshold', 'env': setting.env, 'var': setting.val})}} -
- - {{?}} -{{?}} diff --git a/nano/oldtemplates/airlock_electronics.dot b/nano/oldtemplates/airlock_electronics.dot deleted file mode 100644 index 5edfb225e5b..00000000000 --- a/nano/oldtemplates/airlock_electronics.dot +++ /dev/null @@ -1,33 +0,0 @@ -
-
- {{? data.oneAccess}} - {{=helper.link('One Required', 'unlock', 'one_access')}} - {{??}} - {{=helper.link('All Required', 'lock', 'one_access')}} - {{?}} - {{=helper.link('Clear', 'refresh', 'clear')}} -
-
- - - {{~ data.regions :region:i}} - - {{~}} - - - - - {{~ data.regions :region:i}} - - {{~}} - - -
- {{=region.name}} -
- {{~ region.accesses :access:j}} - {{=helper.link(access.name, access.req ? 'check-square-o' : 'square-o', 'set', {'access': access.id}, null, access.req ? 'selected' : null)}} -
- {{~}} -
-
diff --git a/nano/oldtemplates/apc.dot b/nano/oldtemplates/apc.dot deleted file mode 100644 index 3c0d59e702a..00000000000 --- a/nano/oldtemplates/apc.dot +++ /dev/null @@ -1,157 +0,0 @@ -
- {{? data.siliconUser}} -
- Interface Lock: -
- {{=helper.link('Engaged', 'lock', 'toggleaccess', null, data.locked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlock', 'toggleaccess', null, data.malfStatus >= 2 ? 'linkOff' : (data.locked ? null : 'selected'))}} -
-
- {{??}} - {{? data.locked}} - Swipe an ID card to unlock this interface. - {{??}} - Swipe an ID card to lock this interface. - {{?}} - {{?}} -
-
-

Power Status

-
- Main Breaker: -
- {{? data.locked && !data.siliconUser}} - {{? data.isOperating}} - On - {{??}} - Off - {{?}} - {{??}} - {{=helper.link('On', 'power-off', 'breaker', null, data.isOperating ? 'selected' : null)}} - {{=helper.link('Off', 'close', 'breaker', null, data.isOperating ? null : 'selected')}} - {{?}} -
-
-
- External Power: -
- {{? data.externalPower == 2}} - Good - {{?? data.externalPower == 1}} - Low - {{??}} - None - {{?}} -
-
-
- Power Cell: -
- {{? data.powerCellStatus != null}} - {{=helper.bar(data.powerCellStatus, 0, 100, data.powerCellStatus >= 50 ? "good" : data.powerCellStatus >= 25 ? "average" : "bad", helper.fixed(data.powerCellStatus) + "%")}} - {{??}} - Power cell removed. - {{?}} -
-
- {{? data.powerCellStatus != null}} -
- Charge Mode: -
- {{? data.locked && !data.siliconUser}} - {{? data.chargeMode}} - Auto - {{??}} - Off - {{?}} - {{??}} - {{=helper.link('Auto', 'refresh', 'chargemode', null, data.chargeMode ? 'selected' : null)}} - {{=helper.link('Off', 'close', 'chargemode', null, data.chargeMode ? null : 'selected')}} - {{?}} -   - {{? data.chargingStatus > 1}} - [Fully Charged] - {{?? data.chargingStatus == 1}} - [Charging] - {{??}} - [Not Charging] - {{?}} -
-
- {{?}} -
-
-

Power Channels

- - {{~ data.powerChannels :channel:i}} - - - - - - - - {{~}} - - - - - - - -
{{=channel.title}}:{{=channel.powerLoad}} W - {{? channel.status <= 1}} - Off - {{?? channel.status >= 2}} - On - {{?}} - - {{? channel.status == 1 || channel.status == 3}} - [Auto] - {{??}} - [Manual] - {{?}} - - {{? !data.locked || data.siliconUser}} - {{=helper.link('Auto', 'refresh', 'channel', channel.topicParams.auto, (channel.status == 1 || channel.status == 3) ? 'selected' : null)}} - {{=helper.link('On', 'power-off', 'channel', channel.topicParams.on, (channel.status == 2) ? 'selected' : null)}} - {{=helper.link('Off', 'close', 'channel', channel.topicParams.off, (channel.status == 0) ? 'selected' : null)}} - {{?}} -
Total Load:{{=data.totalLoad}} W
-
-{{? data.siliconUser}} -
-

System Overrides

-
- {{=helper.link('Overload Lighting Circuit', 'lightbulb-o', 'overload')}} -
-
- {{? data.malfStatus == 1}} - {{=helper.link('Override Programming', 'terminal', 'hack')}} - {{?? data.malfStatus == 2}} - {{=helper.link('Shunt Core Processes', 'caret-square-o-down', 'occupy')}} - {{?? data.malfStatus == 3}} - {{=helper.link('Return to Main Core', 'carat-square-o-left', 'deoccupy')}} - {{?? data.malfStatus == 4}} - {{=helper.link('Shunt Core Processes', 'caret-square-o-down')}} - {{?}} -
-
-{{?}} -
-
- Cover Lock: -
- {{? data.locked && !data.siliconUser}} - {{? data.coverLocked}} - Engaged - {{??}} - Disengaged - {{?}} - {{??}} - {{=helper.link('Engaged', 'lock', 'lock', null, data.coverLocked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlock', 'lock', null, data.coverLocked ? null : 'selected')}} - {{?}} -
-
-
diff --git a/nano/oldtemplates/atmos_filter.dot b/nano/oldtemplates/atmos_filter.dot deleted file mode 100644 index bb8457fecc3..00000000000 --- a/nano/oldtemplates/atmos_filter.dot +++ /dev/null @@ -1,27 +0,0 @@ -
-
- Power: -
- {{=helper.link(data.on? 'On' : 'Off', data.on ? 'power-off' : 'close', 'power')}} -
-
-
- Output Pressure: -
- {{=helper.link('Set', 'pencil', 'pressure', {'set': 'custom'})}} - {{=helper.link('Max', 'plus', 'pressure', {'set': 'max'}, data.set_pressure == data.max_pressure ? 'disabled' : null)}} - {{=data.set_pressure}} kPa -
-
-
- Filter: -
- {{=helper.link('Nothing', null, 'filter', {'mode': -1}, data.filter_type == -1 ? 'selected' : null)}} - {{=helper.link('Plasma', null, 'filter', {'mode': 0}, data.filter_type == 0 ? 'selected' : null)}} - {{=helper.link('O2', null, 'filter', {'mode': 1}, data.filter_type == 1 ? 'selected' : null)}} - {{=helper.link('N2', null, 'filter', {'mode': 2}, data.filter_type == 2 ? 'selected' : null)}} - {{=helper.link('CO2', null, 'filter', {'mode': 3}, data.filter_type == 3 ? 'selected' : null)}} - {{=helper.link('N2O', null, 'filter', {'mode': 4}, data.filter_type == 4 ? 'selected' : null)}} -
-
-
diff --git a/nano/oldtemplates/atmos_mixer.dot b/nano/oldtemplates/atmos_mixer.dot deleted file mode 100644 index 3b95b934c6e..00000000000 --- a/nano/oldtemplates/atmos_mixer.dot +++ /dev/null @@ -1,36 +0,0 @@ -
-
- Power: -
- {{=helper.link(data.on? 'On' : 'Off', data.on? 'power-off' : 'close', 'power')}} -
-
-
- Output Pressure: -
- {{=helper.link('Set', 'pencil', 'pressure', {'set': 'custom'})}} - {{=helper.link('Max', 'plus', 'pressure', {'set': 'max'}, data.set_pressure == data.max_pressure ? 'disabled' : null)}} - {{=data.set_pressure}} kPa -
-
-
- Node 1: -
- {{=helper.link('', 'fast-backward', 'node1', {'concentration' : '-0.1'}, null)}} - {{=helper.link('', 'backward', 'node1', {'concentration' : '-0.01'}, null)}} - {{=helper.link('', 'forward', 'node1', {'concentration' : '0.01'}, null)}} - {{=helper.link('', 'fast-forward', 'node1', {'concentration' : '0.1'}, null)}} - {{=data.node1_concentration}}% -
-
-
- Node 2: -
- {{=helper.link('', 'fast-backward', 'node2', {'concentration' : '-0.1'}, null)}} - {{=helper.link('', 'backward', 'node2', {'concentration' : '-0.01'}, null)}} - {{=helper.link('', 'forward', 'node2', {'concentration' : '0.01'}, null)}} - {{=helper.link('', 'fast-forward', 'node2', {'concentration' : '0.1'}, null)}} - {{=data.node2_concentration}}% -
-
-
diff --git a/nano/oldtemplates/atmos_pump.dot b/nano/oldtemplates/atmos_pump.dot deleted file mode 100644 index 70f1c48aa49..00000000000 --- a/nano/oldtemplates/atmos_pump.dot +++ /dev/null @@ -1,27 +0,0 @@ -
-
- Power: -
- {{=helper.link(data.on? 'On' : 'Off', data.on? 'power-off' : 'close', 'power')}} -
-
- {{? data.max_rate}} -
- Transfer Rate: -
- {{=helper.link('Set', 'pencil', 'transfer', {'set': 'custom'})}} - {{=helper.link('Max', 'plus', 'transfer', {'set' : 'max'}, data.transfer_rate == data.max_rate ? 'disabled' : null)}} - {{=data.transfer_rate}} L/s -
-
- {{??}} -
- Output Pressure: -
- {{=helper.link('Set', 'pencil', 'pressure', {'set': 'custom'})}} - {{=helper.link('Max', 'plus', 'pressure', {'set' : 'max'}, data.set_pressure == data.max_pressure ? 'disabled' : null)}} - {{=data.set_pressure}} kPa -
-
- {{?}} -
diff --git a/nano/oldtemplates/canister.dot b/nano/oldtemplates/canister.dot deleted file mode 100644 index 20cad52be96..00000000000 --- a/nano/oldtemplates/canister.dot +++ /dev/null @@ -1,80 +0,0 @@ -
- {{? data.hasHoldingTank }} - The regulator is connected to a tank. - {{??}} - The regulator is not connected to a tank. - {{?}} -
-
-

Canister

-
- {{=helper.link('Relabel', 'pencil', 'relabel', null, data.canLabel ? null : 'disabled')}} -
-
- Pressure: -
- {{=data.tankPressure}} kPa -
-
-
- - Port: - -
- {{? data.portConnected}} - Connected - {{??}} - Disconnected - {{?}} -
-
-
-
-

Valve

-
- Release Pressure: -
- {{=helper.bar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure, null, data.releasePressure + ' kPa')}} -
-
-
-
Pressure Regulator:
-
- {{=helper.link('Reset', 'refresh', 'pressure', {'set': 'reset'}, (data.releasePressure != data.defaultReleasePressure) ? null : 'disabled')}} - {{=helper.link('Min', 'minus', 'pressure', {'set': 'min'}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} - {{=helper.link('Set', 'pencil', 'pressure', {'set': 'custom'}, null)}} - {{=helper.link('Max', 'plus', 'pressure', {'set': 'max'}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} -
-
-
-
Valve:
-
- {{=helper.link('Open', 'unlock', 'valve', null, data.valveOpen ? 'selected' : null)}} - {{=helper.link('Close', 'lock', 'valve', null, data.valveOpen ? null : 'selected')}} -
-
-
-
-

Holding Tank

- {{? data.hasHoldingTank}} -
- {{=helper.link('Eject', 'eject', 'eject')}} -
-
- Label: -
- {{=data.holdingTank.name}} -
-
-
- Tank Pressure: -
- {{=data.holdingTank.tankPressure}} kPa -
-
- {{??}} -
- No Holding Tank -
- {{?}} -
diff --git a/nano/oldtemplates/chem_dispenser.dot b/nano/oldtemplates/chem_dispenser.dot deleted file mode 100644 index ea56c34a96d..00000000000 --- a/nano/oldtemplates/chem_dispenser.dot +++ /dev/null @@ -1,55 +0,0 @@ -
-

Status

-
- Energy: -
- {{=helper.bar(data.energy, 0, data.maxEnergy, null, data.energy + ' Units')}} -
-
-
- Amount: -
- {{~ data.beakerTransferAmounts :amount:i}} - {{=helper.link(amount, 'plus', 'amount', {'set': amount}, (data.amount == amount) ? 'selected' : null)}} - {{~}} -
-
-
-
-

Dispense

-
- {{~ data.chemicals :chem:i}} - {{=helper.link(chem.title, 'tint', 'dispense', chem.commands, null, 'gridable')}} - {{~}} -
-
-
-

Beaker

-
-
- {{=helper.link('Eject', 'eject', 'eject', null, data.isBeakerLoaded ? null : 'disabled')}} -
-
- {{~ data.beakerTransferAmounts :amount:i}} - {{=helper.link(amount, 'minus', 'remove', {'amount': amount})}} - {{~}} -
-
-
-
Contents:
-
- {{? data.isBeakerLoaded}} - {{? data.beakerContents.length}} - {{=data.beakerCurrentVolume}}/{{=data.beakerMaxVolume}} Units
- {{~ data.beakerContents :reagent:i}} - {{=reagent.volume}} units of {{=reagent.name}}
- {{~}} - {{??}} - Beaker Empty - {{?}} - {{??}} - No Beaker Loaded - {{?}} -
-
-
diff --git a/nano/oldtemplates/chem_heater.dot b/nano/oldtemplates/chem_heater.dot deleted file mode 100644 index b1bf72b3472..00000000000 --- a/nano/oldtemplates/chem_heater.dot +++ /dev/null @@ -1,38 +0,0 @@ -
-

Status

-
- Power: -
- {{=helper.link(data.isActive ? 'On' : 'Off', data.isActive ? 'power-off' : 'close', 'power', null, data.isBeakerLoaded ? null : 'disabled')}} -
-
-
- Target: -
- {{=helper.link(data.targetTemp + 'K', 'pencil', 'temperature')}} -
-
-
-
-

Beaker

-
- {{=helper.link('Eject', 'eject', 'eject', null, data.isBeakerLoaded ? null : 'disabled')}} -
-
- Contents: -
- {{? data.isBeakerLoaded}} - Temperature: {{=data.currentTemp}}K
- {{? data.beakerContents.length}} - {{~ data.beakerContents :reagent:i}} - {{=reagent.volume}} units of {{=reagent.name}}
- {{~}} - {{??}} - Beaker Empty - {{?}} - {{??}} - No Beaker Loaded - {{?}} -
-
- diff --git a/nano/oldtemplates/cryo.dot b/nano/oldtemplates/cryo.dot deleted file mode 100644 index dd182abce5c..00000000000 --- a/nano/oldtemplates/cryo.dot +++ /dev/null @@ -1,121 +0,0 @@ -
-

Occupant

-
- Occupant: -
- {{? data.hasOccupant}} - {{=data.occupant.name}} - {{??}} - No Occupant - {{?}} -
-
- {{? data.hasOccupant}} -
- State: -
- {{? data.occupant.stat == 0}} - Conscious - {{?? data.occupant.stat == 1}} - Unconscious - {{??}} - Dead - {{?}} -
-
-
- Temperature: -
- {{=helper.round(data.occupant.bodyTemperature)}} K -
-
- {{?}} - {{? data.hasOccupant && data.occupant.stat < 2}} -
- Health: -
- {{=helper.bar(data.occupant.health, data.occupant.minHealth, data.occupant.Maxhealth, data.occupant.health >= 0 ? 'good' : 'average', helper.round(data.occupant.health))}} -
-
-
- Brute: -
- {{=helper.bar(data.occupant.bruteLoss, 0, data.occupant.maxHealth, 'bad', helper.round(data.occupant.bruteLoss))}} -
-
-
- Respiratory: -
- {{=helper.bar(data.occupant.oxyLoss, 0, data.occupant.maxHealth, 'bad', helper.round(data.occupant.oxyLoss))}} -
-
-
- Toxin: -
- {{=helper.bar(data.occupant.toxLoss, 0, data.occupant.maxHealth, 'bad', helper.round(data.occupant.toxLoss))}} -
-
-
- Burn: -
- {{=helper.bar(data.occupant.fireLoss, 0, data.occupant.maxHealth, 'bad', helper.round(data.occupant.fireLoss))}} -
-
- {{?}} -
-
-

Cell

-
- Power: -
- {{? data.isOperating}} - {{=helper.link('On', 'power-off', 'off')}} - {{??}} - {{=helper.link('Off', 'close', 'on')}} - {{?}} -
-
-
- Temperature: -
- {{=data.cellTemperature}} K -
-
-
- Door: -
- {{? data.isOpen}} - {{=helper.link('Open', 'unlock', 'close')}} - {{??}} - {{=helper.link('Closed', 'lock', 'open')}} - {{?}} - {{? data.autoEject}} - {{=helper.link('Auto', 'sign-out', 'autoeject')}} - {{??}} - {{=helper.link('Manual', 'sign-in', 'autoeject')}} - {{?}} -
-
-
-
-

Beaker

-
- {{=helper.link('Eject', 'eject', 'ejectbeaker', null, data.isBeakerLoaded ? null : 'disabled')}} -
-
- Contents: -
- {{? data.isBeakerLoaded}} - {{? data.beakerContents.length}} - {{~ data.beakerContents :reagent:i}} - {{=reagent.volume}} units of {{=reagent.name}}
- {{~}} - {{??}} - Beaker Empty - {{?}} - {{??}} - No Beaker Loaded - {{?}} -
-
- diff --git a/nano/oldtemplates/smes.dot b/nano/oldtemplates/smes.dot deleted file mode 100644 index ddcc232f4ed..00000000000 --- a/nano/oldtemplates/smes.dot +++ /dev/null @@ -1,89 +0,0 @@ -
-

Storage

-
- Stored Energy: -
- {{=helper.bar(data.capacityPercent, 0, 100, data.capacityPercent >= 50 ? 'good' : data.capacityPercent >= 15 ? 'average' : 'bad', helper.round(data.capacityPercent) + '%')}} -
-
-
-
-

Input

-
- Charge Mode: -
- {{=helper.link('Auto', 'refresh', 'tryinput', null, data.inputAttempt ? 'selected' : null)}} - {{=helper.link('Off', 'close', 'tryinput', null, data.inputAttempt ? null : 'selected')}} -   - {{? data.capacityPercent >= 99}} - [Fully Charged] - {{?? data.inputting}} - [Charging] - {{??}} - [Not Charging] - {{?}} -
-
-
- Input Setting: -
- {{=helper.bar(data.inputLevel, 0, data.inputLevelMax, null, data.inputLevel + ' W')}} -
-
-
- Adjust Input: -
- {{=helper.link('', 'fast-backward', 'input', {'set': 'min'}, data.inputLevel ? null : 'selected')}} - {{=helper.link('', 'backward', 'input', {'set': 'minus'}, data.inputLevel ? null : 'disabled')}} - {{=helper.link('Set', 'pencil', 'input', {'set': 'custom'}, null)}} - {{=helper.link('', 'forward', 'input', {'set': 'plus'}, data.inputLevel == data.inputLevelMax ? 'disabled' : null)}} - {{=helper.link('', 'fast-forward', 'input', {'set': 'max'}, data.inputLevel == data.inputLevelMax ? 'selected' : null)}} -
-
-
- Available: -
- {{=data.inputAvailable}} W -
-
-
-
-

Output

-
- Charge Mode: -
- {{=helper.link('On', 'power-off', 'tryoutput', null, data.outputAttempt ? 'selected' : null)}} - {{=helper.link('Off', 'close', 'tryoutput', null, data.outputAttempt ? null : 'selected')}} -   - {{? data.outputting}} - [Sending] - {{?? data.charge > 0}} - [Not Sending] - {{??}} - [No Charge] - {{?}} -
-
-
- Output Setting: -
- {{=helper.bar(data.outputLevel, 0, data.outputLevelMax, null, data.outputLevel + ' W')}} -
-
-
- Adjust Output: -
- {{=helper.link('', 'fast-backward', 'output', {'set': 'min'}, data.outputLevel ? null : 'selected')}} - {{=helper.link('', 'backward', 'output', {'set': 'minus'}, data.outputLevel ? null : 'disabled')}} - {{=helper.link('Set', 'pencil', 'output', {'set': 'custom'}, null)}} - {{=helper.link('', 'forward', 'output', {'set': 'plus'}, data.outputLevel == data.outputLevelMax ? 'disabled' : null)}} - {{=helper.link('', 'fast-forward', 'output', {'set': 'max'}, data.outputLevel == data.outputLevelMax ? 'selected' : null)}} -
-
-
- Outputting: -
- {{=data.outputUsed}} W -
-
-
diff --git a/nano/oldtemplates/solar_control.dot b/nano/oldtemplates/solar_control.dot deleted file mode 100644 index 1aab8970560..00000000000 --- a/nano/oldtemplates/solar_control.dot +++ /dev/null @@ -1,85 +0,0 @@ -
-

Status

-
- Generated Power: -
- {{=data.generated}} W -
-
-
- Orientation: -
- {{=data.angle}}° ({{=data.direction}}) -
-
-
- Adjust: -
- {{=helper.link('15°', 'step-backward', 'control', {'cdir': '-15'})}} - {{=helper.link('1°', 'backward', 'control', {'cdir': '-1'})}} - {{=helper.link('1°', 'forward', 'control', {'cdir': '1'})}} - {{=helper.link('15°', 'step-forward', 'control', {'cdir': '15'})}} -
-
-
-
-

Tracking

-
- Tracker Mode: -
- {{=helper.link('Off', 'close', 'tracking', {'mode': '0'}, (data.tracking_state == 0) ? 'selected' : '')}} - {{=helper.link('Timed', 'clock-o', 'tracking', {'mode': '1'}, (data.tracking_state == 1) ? 'selected' : '')}} - {{? data.connected_tracker}} - {{=helper.link('Auto', 'refresh', 'tracking', {'mode': '2'}, (data.tracking_state == 2) ? 'selected' : '')}} - {{??}} - {{=helper.link('Auto', 'refresh', null, null, 'disabled')}} - {{?}} -
-
-
- Tracking Rate: -
- {{=data.tracking_rate}} deg/h ({{=data.rotating_way}}) -
-
-
- Adjust: -
- {{=helper.link('180°', 'fast-backward', 'control', {'tdir': '-180'})}} - {{=helper.link('30°', 'step-backward', 'control', {'tdir': '-30'})}} - {{=helper.link('1°', 'backward', 'control', {'tdir': '-1'})}} - {{=helper.link('1°', 'forward', 'control', {'tdir': '1'})}} - {{=helper.link('30°', 'step-forward', 'control', {'tdir': '30'})}} - {{=helper.link('180°', 'fast-forward', 'control', {'tdir': '180'})}} -
-
-
-
-

Devices

-
- Search: -
- {{=helper.link('Refresh', 'refresh', 'refresh')}} -
-
-
- - Solar Tracker: - -
- {{? data.connected_tracker}} - Found - {{??}} - Not Found - {{?}} -
-
-
- - Solars Panels: - -
- {{=data.connected_panels}} Connected -
- -
diff --git a/nano/oldtemplates/space_heater.dot b/nano/oldtemplates/space_heater.dot deleted file mode 100644 index f4e1fb3005c..00000000000 --- a/nano/oldtemplates/space_heater.dot +++ /dev/null @@ -1,79 +0,0 @@ -
-

Status

-
- Power: -
- {{=helper.link('On', 'power-off', 'power', null, data.on ? 'selected' : null)}} - {{=helper.link('Off', 'close', 'power', null, data.on ? null : 'selected')}} -
-
-
- Stored Energy: -
- {{? data.hasPowercell}} - {{=helper.bar(data.powerLevel, 0, 100, 'good', data.powerLevel + '%')}} - {{??}} - No power cell loaded. - {{?}} -
-
- {{? data.open}} -
- Cell: -
- {{? data.hasPowercell}} - {{=helper.link('Eject', 'eject', 'ejectcell')}} - {{??}} - {{=helper.link('Install', 'eject', 'installcell')}} - {{?}} -
-
- {{?}} -
-
-

Thermostat

-
- Current Temp: -
- {{=data.currentTemp}}°C -
-
-
- Target Temp: -
- {{=data.targetTemp}}°C -
-
- {{? data.open}} -
- Adjustment: -
- {{=helper.link('', 'fast-backward', 'temp', {'set': -20}, data.targetTemp > data.minTemp ? null : 'disabled')}} - {{=helper.link('', 'backward', 'temp', {'set': -5}, data.targetTemp > data.minTemp ? null : 'disabled')}} - {{=helper.link('Set', 'pencil', 'temp', {'set': 'custom'}, null)}} - {{=helper.link('', 'forward', 'temp', {'set': 5}, data.targetTemp < data.maxTemp ? null : 'disabled')}} - {{=helper.link('', 'fast-forward', 'temp', {'set': 20}, data.targetTemp < data.maxTemp ? null : 'disabled')}} -
-
- {{?}} -
- - Operational Mode: - -
- {{? data.open}} - {{=helper.link('Heat', 'long-arrow-up', 'mode', {'mode': 'heat'}, data.mode != "heat" ? null : 'selected')}} - {{=helper.link('Cool', 'long-arrow-down', 'mode', {'mode': 'cool'}, data.mode != "cool" ? null : 'selected')}} - {{=helper.link('Auto', 'arrows-v', 'mode', {'mode': 'auto'}, (data.mode == "heat" || data.mode == "cool") ? null : 'selected')}} - {{??}} - {{? data.mode == "heat"}} - Heat - {{?? data.mode == "cool"}} - Cool - {{??}} - Auto - {{?}} - {{?}} -
-
-
diff --git a/nano/oldtemplates/tanks.dot b/nano/oldtemplates/tanks.dot deleted file mode 100644 index 7bc46a39a4d..00000000000 --- a/nano/oldtemplates/tanks.dot +++ /dev/null @@ -1,37 +0,0 @@ -
- {{? data.hasHoldingTank }} - The regulator is connected to a mask. - {{??}} - The regulator is not connected to a mask. - {{?}} -
-
-
- Tank Pressure: -
- {{=helper.bar(data.tankPressure, 0, 1013, (data.tankPressure > 200) ? 'good' : ((data.tankPressure > 100) ? 'average' : 'bad'), data.tankPressure + ' kPa')}} -
- -
- Release Pressure: -
- {{=helper.bar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure, null, data.releasePressure + ' kPa')}} -
-
-
- Pressure Regulator: -
- {{=helper.link('Reset', 'refresh', 'pressure', {'set': 'reset'}, (data.releasePressure != data.defaultReleasePressure) ? null : 'disabled')}} - {{=helper.link('Min', 'minus', 'pressure', {'set': 'min'}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} - {{=helper.link('Set', 'pencil', 'pressure', {'set': 'custom'}, null)}} - {{=helper.link('Max', 'plus', 'pressure', {'set': 'max'}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} -
-
-
- Valve: -
- {{=helper.link('Open', 'unlock', 'valve', null, data.maskConnected ? (data.valveOpen ? 'selected' : null) : 'disabled')}} - {{=helper.link('Close', 'lock', 'valuve', null, data.valveOpen ? null : 'selected')}} -
-
-
diff --git a/nano/scripts/constants.coffee b/nano/scripts/constants.coffee deleted file mode 100644 index 06316714916..00000000000 --- a/nano/scripts/constants.coffee +++ /dev/null @@ -1,6 +0,0 @@ -# Constants used in NanoUI; these are mirrored from the BYOND code. -module.exports = - NANO_INTERACTIVE: 2 - NANO_UPDATE: 1 - NANO_DISABLED: 0 - NANO_CLOSE: -1 diff --git a/tgstation.dme b/tgstation.dme index e49f30668ea..46bc38731a4 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -34,7 +34,6 @@ #include "code\__DEFINES\machines.dm" #include "code\__DEFINES\math.dm" #include "code\__DEFINES\misc.dm" -#include "code\__DEFINES\nano.dm" #include "code\__DEFINES\pipe_construction.dm" #include "code\__DEFINES\preferences.dm" #include "code\__DEFINES\qdel.dm" @@ -44,6 +43,7 @@ #include "code\__DEFINES\sight.dm" #include "code\__DEFINES\stat.dm" #include "code\__DEFINES\tablecrafting.dm" +#include "code\__DEFINES\tgui.dm" #include "code\__HELPERS\_logging.dm" #include "code\__HELPERS\_string_lists.dm" #include "code\__HELPERS\cmp.dm" @@ -156,7 +156,6 @@ #include "code\controllers\subsystem\machines.dm" #include "code\controllers\subsystem\minimap.dm" #include "code\controllers\subsystem\mobs.dm" -#include "code\controllers\subsystem\nano.dm" #include "code\controllers\subsystem\npcpool.dm" #include "code\controllers\subsystem\objects.dm" #include "code\controllers\subsystem\pai.dm" @@ -164,6 +163,7 @@ #include "code\controllers\subsystem\server_maintenance.dm" #include "code\controllers\subsystem\shuttles.dm" #include "code\controllers\subsystem\sun.dm" +#include "code\controllers\subsystem\tgui.dm" #include "code\controllers\subsystem\ticker.dm" #include "code\controllers\subsystem\timer.dm" #include "code\controllers\subsystem\voting.dm" @@ -1365,21 +1365,6 @@ #include "code\modules\mob\new_player\poll.dm" #include "code\modules\mob\new_player\preferences_setup.dm" #include "code\modules\mob\new_player\sprite_accessories.dm" -#include "code\modules\nano\external.dm" -#include "code\modules\nano\nanoui.dm" -#include "code\modules\nano\subsystem.dm" -#include "code\modules\nano\states\admin.dm" -#include "code\modules\nano\states\conscious.dm" -#include "code\modules\nano\states\contained.dm" -#include "code\modules\nano\states\deep_inventory.dm" -#include "code\modules\nano\states\default.dm" -#include "code\modules\nano\states\hands.dm" -#include "code\modules\nano\states\inventory.dm" -#include "code\modules\nano\states\notcontained.dm" -#include "code\modules\nano\states\physical.dm" -#include "code\modules\nano\states\self.dm" -#include "code\modules\nano\states\states.dm" -#include "code\modules\nano\states\zlevel.dm" #include "code\modules\ninja\__ninjaDefines.dm" #include "code\modules\ninja\admin_ninja_verbs.dm" #include "code\modules\ninja\energy_katana.dm" @@ -1601,6 +1586,21 @@ #include "code\modules\telesci\gps.dm" #include "code\modules\telesci\telepad.dm" #include "code\modules\telesci\telesci_computer.dm" +#include "code\modules\tgui\external.dm" +#include "code\modules\tgui\subsystem.dm" +#include "code\modules\tgui\tgui.dm" +#include "code\modules\tgui\states\admin.dm" +#include "code\modules\tgui\states\conscious.dm" +#include "code\modules\tgui\states\contained.dm" +#include "code\modules\tgui\states\deep_inventory.dm" +#include "code\modules\tgui\states\default.dm" +#include "code\modules\tgui\states\hands.dm" +#include "code\modules\tgui\states\inventory.dm" +#include "code\modules\tgui\states\notcontained.dm" +#include "code\modules\tgui\states\physical.dm" +#include "code\modules\tgui\states\self.dm" +#include "code\modules\tgui\states\states.dm" +#include "code\modules\tgui\states\zlevel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\vehicles\atv.dm" #include "code\modules\vehicles\pimpin_ride.dm" diff --git a/nano/.gitignore b/tgui/.gitignore similarity index 100% rename from nano/.gitignore rename to tgui/.gitignore diff --git a/nano/Gulpfile.js b/tgui/Gulpfile.js similarity index 100% rename from nano/Gulpfile.js rename to tgui/Gulpfile.js diff --git a/nano/assets/nanoui.css b/tgui/assets/tgui.css similarity index 100% rename from nano/assets/nanoui.css rename to tgui/assets/tgui.css diff --git a/nano/assets/nanoui.js b/tgui/assets/tgui.js similarity index 74% rename from nano/assets/nanoui.js rename to tgui/assets/tgui.js index cf2acaa4b35..d6c9951b840 100644 --- a/nano/assets/nanoui.js +++ b/tgui/assets/tgui.js @@ -3,7 +3,6 @@ return this.parentWindow}},textContent:{get:function(){return 11===this.nodeType !0):void 0:(r.index=0,u=new ev(r),t.fragmentsToRender.push(t.fragments[0]=u),t.length=1,!0):un(t)}function un(t){return t.length?(t.fragmentsToUnrender=t.fragments.splice(0,t.fragments.length).filter(cn),t.fragmentsToUnrender.forEach(G),t.length=t.fragmentsToRender.length=0,!0):void 0}function cn(t){return t.rendered}function ln(t){t.rebind("","")}function pn(t){var e,n,r;for(e="",n=0,r=this.length,n=0;r>n;n+=1)e+=this.fragments[n].toString(t);return e}function hn(){var t=this;this.fragments.forEach(G),this.fragmentsToRender.forEach(function(e){return L(t.fragments,e)}),this.fragmentsToRender=[],gl.call(this),this.length=0,this.unbound=!0}function fn(t){this.fragments.forEach(t?dn:mn),this.renderedFragments=[],this.rendered=!1}function dn(t){t.unrender(!0)}function mn(t){t.unrender(!1)}function vn(){var t,e,n,r,i,a,o;for(n=this.renderedFragments;t=this.fragmentsToUnrender.pop();)t.unrender(!0),n.splice(n.indexOf(t),1);for(;t=this.fragmentsToRender.shift();)t.render();for(this.rendered&&(i=this.parentFragment.getNode()),o=this.fragments.length,a=0;o>a;a+=1)t=this.fragments[a],e=n.indexOf(t,a),e!==a?(this.docFrag.appendChild(t.detach()),-1!==e&&n.splice(e,1),n.splice(a,0,t)):this.docFrag.childNodes.length&&(r=t.firstNode(),i.insertBefore(this.docFrag,r));this.rendered&&this.docFrag.childNodes.length&&(r=this.parentFragment.findNextNode(this),i.insertBefore(this.docFrag,r)),this.renderedFragments=this.fragments.slice()}function gn(){var t,e;if(this.docFrag){for(t=this.nodes.length,e=0;t>e;e+=1)this.docFrag.appendChild(this.nodes[e]);return this.docFrag}}function bn(t){var e,n,r,i;for(n=this.nodes.length,e=0;n>e;e+=1)if(r=this.nodes[e],1===r.nodeType){if(po(r,t))return r;if(i=r.querySelector(t))return i}return null}function yn(t,e){var n,r,i,a,o,s;for(r=this.nodes.length,n=0;r>n;n+=1)if(i=this.nodes[n],1===i.nodeType&&(po(i,t)&&e.push(i),a=i.querySelectorAll(t)))for(o=a.length,s=0;o>s;s+=1)e.push(a[s])}function wn(){return this.rendered&&this.nodes[0]?this.nodes[0]:this.parentFragment.findNextNode(this)}function xn(t){return fp[t]||(fp[t]=lo(t))}function _n(t){var e,n,r;t&&"select"===t.name&&t.binding&&(e=I(t.node.options).filter(kn),t.getAttribute("multiple")?r=e.map(function(t){return t.value}):(n=e[0])&&(r=n.value),void 0!==r&&t.binding.setValue(r),t.bubble())}function kn(t){return t.selected}function En(){if(this.rendered)throw Error("Attempted to render an item that was already rendered");return this.docFrag=document.createDocumentFragment(),this.nodes=dp(this.value,this.parentFragment.getNode(),this.docFrag),mp(this.pElement),this.rendered=!0,this.docFrag}function Tn(t){var e;(e=this.root.viewmodel.wrapped[this.keypath.str])&&(t=e.get()),t!==this.value&&(this.value=t,this.parentFragment.bubble(),this.rendered&&ms.addView(this))}function Cn(){return void 0!=this.value?_e(""+this.value):""}function On(t){this.rendered&&t&&(this.nodes.forEach(e),this.rendered=!1)}function Sn(){var t,e;if(this.rendered){for(;this.nodes&&this.nodes.length;)t=this.nodes.pop(),t.parentNode.removeChild(t);e=this.parentFragment.getNode(),this.nodes=dp(this.value,e,this.docFrag),e.insertBefore(this.docFrag,this.parentFragment.findNextNode(this)),mp(this.pElement)}}function An(){var t,e=this.node;return e?((t=e.parentNode)&&t.removeChild(e),e):void 0}function Pn(){return null}function jn(){return this.node}function Nn(t){return this.attributes&&this.attributes[t]?this.attributes[t].value:void 0}function Fn(){var t=this.useProperty||!this.rendered?this.fragment.getValue():""+this.fragment;s(t,this.value)||("id"===this.name&&this.value&&delete this.root.nodes[this.value],this.value=t,"value"===this.name&&this.node&&(this.node._ractive.value=t),this.rendered&&ms.addView(this))}function Mn(t){var e=t.fragment.items;if(1===e.length)return e[0].type===xc?e[0]:void 0}function Rn(t){return this.type=Oc,this.element=t.element,this.root=t.root,Bp(this,t.name),this.isBoolean=el.test(this.name),t.value&&"string"!=typeof t.value?(this.parentFragment=this.element.parentFragment,this.fragment=new ev({template:t.value,root:this.root,owner:this}),this.value=this.fragment.getValue(),this.interpolator=qp(this),this.isBindable=!!this.interpolator&&!this.interpolator.isStatic,void(this.ready=!0)):void(this.value=this.isBoolean?!0:t.value||"")}function Ln(t,e){this.fragment&&this.fragment.rebind(t,e)}function In(t){var e;this.node=t,t.namespaceURI&&t.namespaceURI!==no.html||(e=$p[this.name]||this.name,void 0!==t[e]&&(this.propertyName=e),(this.isBoolean||this.isTwoway)&&(this.useProperty=!0),"value"===e&&(t._ractive.value=this.value)),this.rendered=!0,this.update()}function Dn(){var t=this,e=t.name,n=t.namespacePrefix,r=t.value,i=t.interpolator,a=t.fragment;if(("value"!==e||"select"!==this.element.name&&"textarea"!==this.element.name)&&("value"!==e||void 0===this.element.getAttribute("contenteditable"))){if("name"===e&&"input"===this.element.name&&i)return"name={{"+(i.keypath.str||i.ref)+"}}";if(this.isBoolean)return r?e:"";if(a){if(1===a.items.length&&null==a.items[0].value)return"";r=""+a}return n&&(e=n+":"+e),r?e+'="'+Un(r)+'"':e}}function Un(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")}function Vn(){this.fragment&&this.fragment.unbind(),"id"===this.name&&delete this.root.nodes[this.value]}function Bn(){var t,e,n,r,i=this.value;if(!this.locked)for(this.node._ractive.value=i,t=this.node.options,r=t.length;r--;)if(e=t[r],n=e._ractive?e._ractive.value:e.value,n==i){e.selected=!0;break}}function qn(){var t,e,n,r,i=this.value;for(a(i)||(i=[i]),t=this.node.options,e=t.length;e--;)n=t[e],r=n._ractive?n._ractive.value:n.value,n.selected=N(i,r)}function zn(){var t=this,e=t.node,n=t.value;e.checked=n==e._ractive.value}function Hn(){var t,e,n,r,i=this.node;if(t=i.checked,i.value=this.element.getAttribute("value"),i.checked=this.element.getAttribute("value")===this.element.getAttribute("name"),t&&!i.checked&&this.element.binding&&(n=this.element.binding.siblings,r=n.length)){for(;r--;){if(e=n[r],!e.element.node)return;if(e.element.node.checked)return ms.addRactive(e.root),e.handleChange()}this.root.viewmodel.set(e.keypath,void 0)}}function Wn(){var t,e,n=this,r=n.element,i=n.node,o=n.value,s=r.binding;if(t=r.getAttribute("value"),a(o)){for(e=o.length;e--;)if(t==o[e])return void(s.isChecked=i.checked=!0);s.isChecked=i.checked=!1}else s.isChecked=i.checked=o==t}function $n(){this.node.className=n(this.value)}function Gn(){var t=this,e=t.node,n=t.value;this.root.nodes[n]=e,e.id=n}function Kn(){var t,e;t=this.node,e=this.value,void 0===e&&(e=""),t.style.setAttribute("cssText",e)}function Qn(){var t=this.value;void 0===t&&(t=""),this.locked||(this.node.innerHTML=t)}function Yn(){var t=this,e=t.node,n=t.value;e._ractive.value=n,this.locked||(e.value=void 0==n?"":n)}function Jn(){this.locked||(this.node[this.propertyName]=this.value)}function Zn(){var t=this,e=t.node,n=t.namespace,r=t.name,i=t.value,a=t.fragment;n?e.setAttributeNS(n,r,""+(a||i)):this.isBoolean?i?e.setAttribute(r,""):e.removeAttribute(r):null==i?e.removeAttribute(r):e.setAttribute(r,""+(a||i))}function Xn(){var t,e,n=this,r=n.name,i=n.element,a=n.node;"id"===r?e=eh:"value"===r?"select"===i.name&&"value"===r?e=i.getAttribute("multiple")?Yp:Qp:"textarea"===i.name?e=ih:null!=i.getAttribute("contenteditable")?e=rh:"input"===i.name&&(t=i.getAttribute("type"),e="file"===t?jo:"radio"===t&&i.binding&&"name"===i.binding.name?Zp:ih):this.isTwoway&&"name"===r?"radio"===a.type?e=Jp:"checkbox"===a.type&&(e=Xp):"style"===r&&a.style.setAttribute?e=nh:"class"!==r||a.namespaceURI&&a.namespaceURI!==no.html?this.useProperty&&(e=ah):e=th,e||(e=oh),this.update=e,this.update()}function tr(t,e){var n=e?"svg":"div";return ch.innerHTML="<"+n+" "+t+">",I(ch.childNodes[0].attributes)}function er(t,e){for(var n=t.length;n--;)if(t[n].name===e.name)return!1;return!0}function nr(t){for(;t=t.parent;)if("form"===t.name)return t}function rr(){this._ractive.binding.handleChange()}function ir(){var t;bh.call(this),t=this._ractive.root.viewmodel.get(this._ractive.binding.keypath),this.value=void 0==t?"":t}function ar(){var t=this._ractive.binding,e=this;t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.rendered&&bh.call(e),t._timeout=void 0},t.element.lazy)}function or(t,e,n){var r=t+e+n;return kh[r]||(kh[r]=[])}function sr(t){return t.isChecked}function ur(t){return t.element.getAttribute("value")}function cr(t){var e,n,r,i,a,o=t.attributes;return t.binding&&(t.binding.teardown(),t.binding=null),(t.getAttribute("contenteditable")||o.contenteditable&&lr(o.contenteditable))&&lr(o.value)?n=xh:"input"===t.name?(e=t.getAttribute("type"),"radio"===e||"checkbox"===e?(r=lr(o.name),i=lr(o.checked),r&&i&&m("A radio input can have two-way binding on its name attribute, or its checked attribute - not both",{ractive:t.root}),r?n="radio"===e?Oh:Ah:i&&(n="radio"===e?Th:jh)):"file"===e&&lr(o.value)?n=Ih:lr(o.value)&&(n="number"===e||"range"===e?Dh:yh)):"select"===t.name&&lr(o.value)?n=t.getAttribute("multiple")?Rh:Fh:"textarea"===t.name&&lr(o.value)&&(n=yh),n&&(a=new n(t))&&a.keypath?a:void 0}function lr(t){return t&&t.isBindable}function pr(){var t=this.getAction();t&&!this.hasListener?this.listen():!t&&this.hasListener&&this.unrender()}function hr(t){Bs(this.root,this.getAction(),{event:t})}function fr(){return(""+this.action).trim()}function dr(t,e,n){var r,i,a,o=this;this.element=t,this.root=t.root,this.parentFragment=t.parentFragment,this.name=e,-1!==e.indexOf("*")&&(p('Only component proxy-events may contain "*" wildcards, <%s on-%s="..."/> is not valid',t.name,e),this.invalid=!0),n.m?(i=n.a.r,this.method=n.m,this.keypaths=[],this.fn=Al(n.a.s,i.length),this.parentFragment=t.parentFragment,a=this.root,this.refResolvers=[],i.forEach(function(t,e){var n=void 0;(n=Hh.exec(t))?o.keypaths[e]={eventObject:!0,refinements:n[1]?n[1].split("."):[]}:o.refResolvers.push(Sl(o,t,function(t){return o.resolve(e,t)}))}),this.fire=mr):(r=n.n||n,"string"!=typeof r&&(r=new ev({template:r,root:this.root,owner:this})),this.action=r,n.d?(this.dynamicParams=new ev({template:n.d,root:this.root,owner:this.element}),this.fire=gr):n.a&&(this.params=n.a,this.fire=vr))}function mr(t){var e,n,r;if(e=this.root,"function"!=typeof e[this.method])throw Error('Attempted to call a non-existent method ("'+this.method+'")');n=this.keypaths.map(function(n){var r,i,a;if(void 0!==n){if(n.eventObject){if(r=t,i=n.refinements.length)for(a=0;i>a;a+=1)r=r[n.refinements[a]]}else r=e.viewmodel.get(n);return r}}),Vs.enqueue(e,t),r=this.fn.apply(null,n),e[this.method].apply(e,r),Vs.dequeue(e)}function vr(t){Bs(this.root,this.getAction(),{event:t,args:this.params})}function gr(t){var e=this.dynamicParams.getArgsList();"string"==typeof e&&(e=e.substr(1,e.length-2)),Bs(this.root,this.getAction(),{event:t,args:e})}function br(t){var e,n,r,i={};e=this._ractive,n=e.events[t.type],(r=Cl(n.element.parentFragment))&&(i=Cl.resolve(r)),n.fire({node:this,original:t,index:i,keypath:e.keypath.str,context:e.root.viewmodel.get(e.keypath)})}function yr(){var t,e=this.name;if(!this.invalid){if(t=g("events",this.root,e))this.custom=t(this.node,wr(e));else{if(!("on"+e in this.node||window&&"on"+e in window||Xa))return void(Kh[e]||v(Ro(e,"event"),{node:this.node}));this.node.addEventListener(e,Wh,!1)}this.hasListener=!0}}function wr(t){return Gh[t]||(Gh[t]=function(e){var n=e.node._ractive;e.index=n.index,e.keypath=n.keypath.str,e.context=n.root.viewmodel.get(n.keypath),n.events[t].fire(e)}),Gh[t]}function xr(t,e){function n(n){n&&n.rebind(t,e)}var r;return this.method?(r=this.element.parentFragment,void this.refResolvers.forEach(n)):("string"!=typeof this.action&&n(this.action),void(this.dynamicParams&&n(this.dynamicParams)))}function _r(){this.node=this.element.node,this.node._ractive.events[this.name]=this,(this.method||this.getAction())&&this.listen()}function kr(t,e){this.keypaths[t]=e}function Er(){return this.method?void this.refResolvers.forEach(G):("string"!=typeof this.action&&this.action.unbind(),void(this.dynamicParams&&this.dynamicParams.unbind()))}function Tr(){this.custom?this.custom.teardown():this.node.removeEventListener(this.name,Wh,!1),this.hasListener=!1}function Cr(){var t=this;this.dirty||(this.dirty=!0,ms.scheduleTask(function(){Or(t),t.dirty=!1})),this.parentFragment.bubble()}function Or(t){var e,n,r,i,a;e=t.node,e&&(i=I(e.options),n=t.getAttribute("value"),r=t.getAttribute("multiple"),void 0!==n?(i.forEach(function(t){var e,i;e=t._ractive?t._ractive.value:t.value,i=r?Sr(n,e):n==e,i&&(a=!0),t.selected=i}),a||(i[0]&&(i[0].selected=!0),t.binding&&t.binding.forceUpdate())):t.binding&&t.binding.forceUpdate())}function Sr(t,e){for(var n=t.length;n--;)if(t[n]==e)return!0}function Ar(t,e){t.select=jr(t.parent),t.select&&(t.select.options.push(t),e.a||(e.a={}),void 0!==e.a.value||e.a.hasOwnProperty("disabled")||(e.a.value=e.f),"selected"in e.a&&void 0!==t.select.getAttribute("value")&&delete e.a.selected)}function Pr(t){t.select&&L(t.select.options,t)}function jr(t){if(t)do if("select"===t.name)return t;while(t=t.parent)}function Nr(t){var e,n,r,i,a,o,s;this.type=Ec,e=this.parentFragment=t.parentFragment,n=this.template=t.template,this.parent=t.pElement||e.pElement,this.root=r=e.root,this.index=t.index,this.key=t.key,this.name=Vp(n.e),"option"===this.name&&Ar(this,n),"select"===this.name&&(this.options=[],this.bubble=Cr),"form"===this.name&&(this.formBindings=[]),s=Dp(this,n),this.attributes=ph(this,n.a),this.conditionalAttributes=dh(this,n.m),n.f&&(this.fragment=new ev({template:n.f,root:r,owner:this,pElement:this,cssIds:null})),o=r.twoway,s.twoway===!1?o=!1:s.twoway===!0&&(o=!0),this.twoway=o,this.lazy=s.lazy,o&&(i=Uh(this,n.a))&&(this.binding=i,a=this.root._twowayBindings[i.keypath.str]||(this.root._twowayBindings[i.keypath.str]=[]),a.push(i)),n.v&&(this.eventHandlers=nf(this,n.v)),n.o&&(this.decorator=new uf(this,n.o)),this.intro=n.t0||n.t1,this.outro=n.t0||n.t2}function Fr(t,e){function n(n){n.rebind(t,e)}var r,i,a,o;if(this.attributes&&this.attributes.forEach(n),this.conditionalAttributes&&this.conditionalAttributes.forEach(n),this.eventHandlers&&this.eventHandlers.forEach(n),this.decorator&&n(this.decorator),this.fragment&&n(this.fragment),a=this.liveQueries)for(o=this.root,r=a.length;r--;)a[r]._makeDirty();this.node&&(i=this.node._ractive)&&_(i,"keypath",t,e)}function Mr(t){var e;(t.attributes.width||t.attributes.height)&&t.node.addEventListener("load",e=function(){var n=t.getAttribute("width"),r=t.getAttribute("height");void 0!==n&&t.node.setAttribute("width",n),void 0!==r&&t.node.setAttribute("height",r),t.node.removeEventListener("load",e,!1)},!1)}function Rr(t){t.node.addEventListener("reset",Ir,!1)}function Lr(t){t.node.removeEventListener("reset",Ir,!1)}function Ir(){var t=this._ractive.proxy;ms.start(),t.formBindings.forEach(Dr),ms.end()}function Dr(t){t.root.viewmodel.set(t.keypath,t.resetValue)}function Ur(t,e,n){var r,i,a;this.element=t,this.root=r=t.root,this.isIntro=n,i=e.n||e,("string"==typeof i||(a=new ev({template:i,root:r,owner:t}),i=""+a,a.unbind(),""!==i))&&(this.name=i,e.a?this.params=e.a:e.d&&(a=new ev({template:e.d,root:r,owner:t}),this.params=a.getArgsList(),a.unbind()),this._fn=g("transitions",r,i),this._fn||v(Ro(i,"transition"),{ractive:this.root}))}function Vr(t){return t}function Br(){Df.hidden=document[Mf]}function qr(){Df.hidden=!0}function zr(){Df.hidden=!1}function Hr(){var t,e,n,r=this;return t=this.node=this.element.node,e=t.getAttribute("style"),this.complete=function(i){n||(!i&&r.isIntro&&Wr(t,e),t._ractive.transition=null,r._manager.remove(r),n=!0)},this._fn?void this._fn.apply(this.root,[this].concat(this.params)):void this.complete()}function Wr(t,e){e?t.setAttribute("style",e):(t.getAttribute("style"),t.removeAttribute("style"))}function $r(){var t,e,n,r=this,i=this.root;return t=Gr(this),e=this.node=lo(this.name,t),this.parentFragment.cssIds&&this.node.setAttribute("data-ractive-css",this.parentFragment.cssIds.map(function(t){return"{"+t+"}"}).join(" ")),xo(this.node,"_ractive",{value:{proxy:this,keypath:ss(this.parentFragment),events:wo(null),root:i}}),this.attributes.forEach(function(t){return t.render(e)}),this.conditionalAttributes.forEach(function(t){return t.render(e)}),this.fragment&&("script"===this.name?(this.bubble=Qf,this.node.text=this.fragment.toString(!1),this.fragment.unrender=jo):"style"===this.name?(this.bubble=Kf,this.bubble(),this.fragment.unrender=jo):this.binding&&this.getAttribute("contenteditable")?this.fragment.unrender=jo:this.node.appendChild(this.fragment.render())),this.binding&&(this.binding.render(),this.node._ractive.binding=this.binding),this.eventHandlers&&this.eventHandlers.forEach(function(t){return t.render()}),"option"===this.name&&Kr(this),"img"===this.name?Mr(this):"form"===this.name?Rr(this):"input"===this.name||"textarea"===this.name?this.node.defaultValue=this.node.value:"option"===this.name&&(this.node.defaultSelected=this.node.selected),this.decorator&&this.decorator.fn&&ms.scheduleTask(function(){r.decorator.torndown||r.decorator.init()},!0),i.transitionsEnabled&&this.intro&&(n=new Yf(this,this.intro,!0),ms.registerTransition(n),ms.scheduleTask(function(){return n.start()},!0),this.transition=n),this.node.autofocus&&ms.scheduleTask(function(){return r.node.focus()},!0),Qr(this),this.node}function Gr(t){var e,n,r;return e=(n=t.getAttribute("xmlns"))?n:"svg"===t.name?no.svg:(r=t.parent)?"foreignObject"===r.name?no.html:r.node.namespaceURI:t.root.el.namespaceURI}function Kr(t){var e,n,r;if(t.select&&(n=t.select.getAttribute("value"),void 0!==n))if(e=t.getAttribute("value"),t.select.node.multiple&&a(n)){for(r=n.length;r--;)if(e==n[r]){t.node.selected=!0;break}}else t.node.selected=e==n}function Qr(t){var e,n,r,i,a;e=t.root;do for(n=e._liveQueries,r=n.length;r--;)i=n[r],a=n["_"+i],a._test(t)&&(t.liveQueries||(t.liveQueries=[])).push(a);while(e=e.parent)}function Yr(t){var e,n,r;if(e=t.getAttribute("value"),void 0===e||!t.select)return!1;if(n=t.select.getAttribute("value"),n==e)return!0;if(t.select.getAttribute("multiple")&&a(n))for(r=n.length;r--;)if(n[r]==e)return!0}function Jr(t){var e,n,r,i;return e=t.attributes,n=e.type,r=e.value,i=e.name,n&&"radio"===n.value&&r&&i.interpolator&&r.value===i.interpolator.value?!0:void 0}function Zr(t){var e=""+t;return e?" "+e:""}function Xr(){this.fragment&&this.fragment.unbind(),this.binding&&this.binding.unbind(),this.eventHandlers&&this.eventHandlers.forEach(G),"option"===this.name&&Pr(this),this.attributes.forEach(G),this.conditionalAttributes.forEach(G)}function ti(t){var e,n,r;(r=this.transition)&&r.complete(),"option"===this.name?this.detach():t&&ms.detachWhenReady(this),this.fragment&&this.fragment.unrender(!1),(e=this.binding)&&(this.binding.unrender(),this.node._ractive.binding=null,n=this.root._twowayBindings[e.keypath.str],n.splice(n.indexOf(e),1)),this.eventHandlers&&this.eventHandlers.forEach(K),this.decorator&&ms.registerDecorator(this.decorator),this.root.transitionsEnabled&&this.outro&&(r=new Yf(this,this.outro,!1),ms.registerTransition(r),ms.scheduleTask(function(){return r.start()})),this.liveQueries&&ei(this),"form"===this.name&&Lr(this)}function ei(t){var e,n,r;for(r=t.liveQueries.length;r--;)e=t.liveQueries[r],n=e.selector,e._remove(t.node)}function ni(t,e){var n=id.exec(e)[0];return null===t||n.length%s}}) cannot contain nested inline partials",e,{ractive:t});var s=r?a:ai(a,e);s.partials[e]=i=o.t}return r&&(i._fn=r),i.v?i.t:i}}function ai(t,e){return t.partials.hasOwnProperty(e)?t:oi(t.constructor,e)}function oi(t,e){return t?t.partials.hasOwnProperty(e)?t:oi(t._Parent,e):void 0}function si(t,e){if(e){if(e.template&&e.template.p&&e.template.p[t])return e.template.p[t];if(e.parentFragment&&e.parentFragment.owner)return si(t,e.parentFragment.owner)}}function ui(t,e){var n,r=b("components",t,e);if(r&&(n=r.components[e],!n._Parent)){var i=n.bind(r);if(i.isOwner=r.components.hasOwnProperty(e),n=i(),!n)return void m(Mo,e,"component","component",{ractive:t});"string"==typeof n&&(n=ui(t,n)),n._fn=i,r.components[e]=n}return n}function ci(){var t=this.instance.fragment.detach();return vd.fire(this.instance),t}function li(t){return this.instance.fragment.find(t)}function pi(t,e){return this.instance.fragment.findAll(t,e)}function hi(t,e){e._test(this,!0),this.instance.fragment&&this.instance.fragment.findAllComponents(t,e)}function fi(t){return t&&t!==this.name?this.instance.fragment?this.instance.fragment.findComponent(t):null:this.instance}function di(){return this.parentFragment.findNextNode(this)}function mi(){return this.rendered?this.instance.fragment.firstNode():null}function vi(t,e,n){function r(t){var n,r;t.value=e,t.updating||(r=t.ractive,n=t.keypath,t.updating=!0,ms.start(r),r.viewmodel.mark(n),ms.end(),t.updating=!1)}var i,a,o,s,u,c;if(i=t.obj,a=t.prop,n&&!n.configurable){if("length"===a)return;throw Error('Cannot use magic mode with property "'+a+'" - object is not configurable')}n&&(o=n.get,s=n.set),u=o||function(){return e},c=function(t){s&&s(t),e=o?o():t,c._ractiveWrappers.forEach(r)},c._ractiveWrappers=[t],Object.defineProperty(i,a,{get:u,set:c,enumerable:!0,configurable:!0})}function gi(t,e){var n,r,i,a;if(this.adaptors)for(n=this.adaptors.length,r=0;n>r;r+=1)if(i=this.adaptors[r],i.filter(e,t,this.ractive))return a=this.wrapped[t]=i.wrap(this.ractive,e,t,yi(t)),void(a.value=e)}function bi(t,e){var n,r={};if(!e)return t;e+=".";for(n in t)t.hasOwnProperty(n)&&(r[e+n]=t[n]);return r}function yi(t){var e;return Vd[t]||(e=t?t+".":"",Vd[t]=function(n,r){var i;return"string"==typeof n?(i={},i[e+n]=r,i):"object"==typeof n?e?bi(n,t):n:void 0}),Vd[t]}function wi(t){var e,n,r=[Go];for(e=t.length;e--;)for(n=t[e].parent;n&&!n.isRoot;)-1===t.indexOf(n)&&j(r,n),n=n.parent;return r}function xi(t,e,n){var r;ki(t,e),n||(r=e.wildcardMatches(),r.forEach(function(n){_i(t,n,e)}))}function _i(t,e,n){var r,i,a;e=e.str||e,r=t.depsMap.patternObservers,i=r&&r[e],i&&i.forEach(function(e){a=n.join(e.lastKey),ki(t,a),_i(t,e,a)})}function ki(t,e){t.patternObservers.forEach(function(t){t.regex.test(e.str)&&t.update(e)})}function Ei(){function t(t){var r=t.key;t.viewmodel===o?(o.clearCache(r.str),t.invalidate(),n.push(r),e(r)):t.viewmodel.mark(r)}function e(n){var r,i;o.noCascade.hasOwnProperty(n.str)||((i=o.deps.computed[n.str])&&i.forEach(t),(r=o.depsMap.computed[n.str])&&r.forEach(e))}var n,r,i,a=this,o=this,s={};return n=this.changes,n.length?(n.slice().forEach(e),r=Bd(n),r.forEach(function(e){var r;-1===n.indexOf(e)&&(r=o.deps.computed[e.str])&&r.forEach(t)}),this.changes=[],this.patternObservers.length&&(r.forEach(function(t){return qd(a,t,!0)}),n.forEach(function(t){return qd(a,t)})),this.deps.observers&&(r.forEach(function(t){return Ti(a,null,t,"observers")}),Oi(this,n,"observers")),this.deps["default"]&&(i=[],r.forEach(function(t){return Ti(a,i,t,"default")}),i.length&&Ci(this,i,n),Oi(this,n,"default")),n.forEach(function(t){s[t.str]=a.get(t)}),this.implicitChanges={},this.noCascade={},s):void 0}function Ti(t,e,n,r){var i,a;(i=Si(t,n,r))&&(a=t.get(n),i.forEach(function(t){e&&t.refineValue?e.push(t):t.setValue(a)}))}function Ci(t,e,n){e.forEach(function(e){for(var r=!1,i=0,a=n.length,o=[];a>i;){var s=n[i];if(s===e.keypath){r=!0;break}s.slice(0,e.keypath.length)===e.keypath&&o.push(s),i++}r&&e.setValue(t.get(e.keypath)),o.length&&e.refineValue(o)})}function Oi(t,e,n){function r(t){t.forEach(i),t.forEach(a)}function i(e){var r=Si(t,e,n);r&&s.push({keypath:e,deps:r})}function a(e){var i;(i=t.depsMap[n][e.str])&&r(i)}function o(e){var n=t.get(e.keypath);e.deps.forEach(function(t){return t.setValue(n)})}var s=[];r(e),s.forEach(o)}function Si(t,e,n){var r=t.deps[n];return r?r[e.str]:null}function Ai(){this.captureGroups.push([])}function Pi(t,e){var n,r;if(e||(r=this.wrapped[t])&&r.teardown()!==!1&&(this.wrapped[t]=null),this.cache[t]=void 0,n=this.cacheMap[t])for(;n.length;)this.clearCache(n.pop())}function ji(t,e){var n=e.firstKey;return!(n in t.data||n in t.computations||n in t.mappings)}function Ni(t,e){var n=new Qd(t,e);return this.ready&&n.init(this),this.computations[t.str]=n}function Fi(t,e){var n,r,i,a,o,s=this.cache,u=t.str;if(e=e||Xd,e.capture&&(a=R(this.captureGroups))&&(~a.indexOf(t)||a.push(t)),So.call(this.mappings,t.firstKey))return this.mappings[t.firstKey].get(t,e);if(t.isSpecial)return t.value;if(void 0===s[u]?((r=this.computations[u])&&!r.bypass?(n=r.get(),this.adapt(u,n)):(i=this.wrapped[u])?n=i.value:t.isRoot?(this.adapt("",this.data),n=this.data):n=Mi(this,t),s[u]=n):n=s[u],!e.noUnwrap&&(i=this.wrapped[u])&&(n=i.get()),t.isRoot&&e.fullRootGet)for(o in this.mappings)n[o]=this.mappings[o].getValue();return n===Jd?void 0:n}function Mi(t,e){var n,r,i,a;return n=t.get(e.parent),(a=t.wrapped[e.parent.str])&&(n=a.get()),null!==n&&void 0!==n?((r=t.cacheMap[e.parent.str])?-1===r.indexOf(e.str)&&r.push(e.str):t.cacheMap[e.parent.str]=[e.str],"object"!=typeof n||e.lastKey in n?(i=n[e.lastKey],t.adapt(e.str,i,!1),t.cache[e.str]=i,i):t.cache[e.str]=Jd):void 0}function Ri(){var t;for(t in this.computations)this.computations[t].init(this)}function Li(t,e){var n=this.mappings[t.str]=new nm(t,e);return n.initViewmodel(this),n}function Ii(t,e){var n,r=t.str;e&&(e.implicit&&(this.implicitChanges[r]=!0),e.noCascade&&(this.noCascade[r]=!0)),(n=this.computations[r])&&n.invalidate(),-1===this.changes.indexOf(t)&&this.changes.push(t);var i=e?e.keepExistingWrapper:!1;this.clearCache(r,i),this.ready&&this.onchange()}function Di(t,e,n,r){var i,a,o,s;if(this.mark(t),r&&r.compare){o=Vi(r.compare);try{i=e.map(o),a=n.map(o)}catch(u){m('merge(): "%s" comparison failed. Falling back to identity checking',t),i=e,a=n}}else i=e,a=n;s=im(i,a),this.smartUpdate(t,n,s,e.length!==n.length)}function Ui(t){return JSON.stringify(t)}function Vi(t){if(t===!0)return Ui;if("string"==typeof t)return om[t]||(om[t]=function(e){return e[t]}),om[t];if("function"==typeof t)return t;throw Error("The `compare` option must be a function, or a string representing an identifying field (or `true` to use JSON.stringify)")}function Bi(t,e){var n,r,i,a=void 0===arguments[2]?"default":arguments[2];e.isStatic||((n=this.mappings[t.firstKey])?n.register(t,e,a):(r=this.deps[a]||(this.deps[a]={}),i=r[t.str]||(r[t.str]=[]),i.push(e),this.depsMap[a]||(this.depsMap[a]={}),t.isRoot||qi(this,t,a)))}function qi(t,e,n){for(var r,i,a;!e.isRoot;)r=t.depsMap[n],i=r[e.parent.str]||(r[e.parent.str]=[]),a=e.str,void 0===i["_"+a]&&(i["_"+a]=0,i.push(e)),i["_"+a]+=1,e=e.parent}function zi(){return this.captureGroups.pop()}function Hi(t){this.data=t,this.clearCache("")}function Wi(t,e){var n,r,i,a,o=void 0===arguments[2]?{}:arguments[2];if(!o.noMapping&&(n=this.mappings[t.firstKey]))return n.set(t,e);if(r=this.computations[t.str]){if(r.setting)return;r.set(e),e=r.get()}s(this.cache[t.str],e)||(i=this.wrapped[t.str],i&&i.reset&&(a=i.reset(e)!==!1,a&&(e=i.get())),r||a||$i(this,t,e),o.silent?this.clearCache(t.str):this.mark(t))}function $i(t,e,n){var r,i,a,o;a=function(){r.set?r.set(e.lastKey,n):(i=r.get(),o())},o=function(){i||(i=Md(e.lastKey),t.set(e.parent,i,{silent:!0})),i[e.lastKey]=n},r=t.wrapped[e.parent.str],r?a():(i=t.get(e.parent),(r=t.wrapped[e.parent.str])?a():o())}function Gi(t,e,n){var r,i,a,o=this;if(i=n.length,n.forEach(function(e,n){-1===e&&o.mark(t.join(n),fm)}),this.set(t,e,{silent:!0}),(r=this.deps["default"][t.str])&&r.filter(Ki).forEach(function(t){return t.shuffle(n,e)}),i!==e.length){for(this.mark(t.join("length"),hm),a=n.touchedFrom;aa;a+=1)this.mark(t.join(a),fm)}}function Ki(t){return"function"==typeof t.shuffle}function Qi(){var t,e=this;for(Object.keys(this.cache).forEach(function(t){return e.clearCache(t)});t=this.unresolvedImplicitDependencies.pop();)t.teardown()}function Yi(t,e){var n,r,i,a=void 0===arguments[2]?"default":arguments[2];if(!e.isStatic){if(n=this.mappings[t.firstKey])return n.unregister(t,e,a);if(r=this.deps[a][t.str],i=r.indexOf(e),-1===i)throw Error("Attempted to remove a dependant that was no longer registered! This should not happen. If you are seeing this bug in development please raise an issue at https://github.com/RactiveJS/Ractive/issues - thanks");r.splice(i,1),t.isRoot||Ji(this,t,a)}}function Ji(t,e,n){for(var r,i;!e.isRoot;)r=t.depsMap[n],i=r[e.parent.str],i["_"+e.str]-=1,i["_"+e.str]||(L(i,e),i["_"+e.str]=void 0),e=e.parent}function Zi(t){this.hook=new ns(t),this.inProcess={},this.queue={}}function Xi(t,e){return t[e._guid]||(t[e._guid]=[])}function ta(t,e){var n=Xi(t.queue,e);for(t.hook.fire(e);n.length;)ta(t,n.shift());delete t.queue[e._guid]}function ea(t,e){var n,r={};for(n in e)r[n]=na(t,n,e[n]);return r}function na(t,e,n){var r,i;return"function"==typeof n&&(r=ia(n,t)),"string"==typeof n&&(r=ra(t,n)),"object"==typeof n&&("string"==typeof n.get?r=ra(t,n.get):"function"==typeof n.get?r=ia(n.get,t):p("`%s` computation must have a `get()` method",e),"function"==typeof n.set&&(i=ia(n.set,t))),{getter:r,setter:i}}function ra(t,e){var n,r,i;return n="return ("+e.replace(wm,function(t,e){return r=!0,'__ractive.get("'+e+'")'})+");",r&&(n="var __ractive = this; "+n),i=Function(n),r?i.bind(t):i}function ia(t,e){return/this/.test(""+t)?t.bind(e):t}function aa(e){var n,i,a=void 0===arguments[1]?{}:arguments[1],o=void 0===arguments[2]?{}:arguments[2];if(Av.DEBUG&&Oo(),ua(e,o),xo(e,"data",{get:ca}),xm.fire(e,a),Tm.forEach(function(t){e[t]=r(wo(e.constructor[t]||null),a[t])}),i=new gm({adapt:oa(e,e.adapt,a),data:qu.init(e.constructor,e,a),computed:ym(e,r(wo(e.constructor.prototype.computed),a.computed)),mappings:o.mappings,ractive:e,onchange:function(){return ms.addRactive(e)}}),e.viewmodel=i,i.init(),oc.init(e.constructor,e,a),_m.fire(e),km.begin(e),e.template){var s=void 0;(o.cssIds||e.cssId)&&(s=o.cssIds?o.cssIds.slice():[],e.cssId&&s.push(e.cssId)),e.fragment=new ev({template:e.template,root:e,owner:e,cssIds:s})}if(km.end(e),n=t(e.el)){var u=e.render(n,e.append);Av.DEBUG_PROMISES&&u["catch"](function(t){throw v("Promise debugging is enabled, to help solve errors that happen asynchronously. Some browsers will log unhandled promise rejections, in which case you can safely disable promise debugging:\n Ractive.DEBUG_PROMISES = false;"),m("An error happened during rendering",{ractive:e}),t.stack&&h(t.stack),t})}}function oa(t,e,n){function r(e){return"string"==typeof e&&(e=g("adaptors",t,e),e||p(Ro(e,"adaptor"))),e}var i,a,o;if(e=e.map(r),i=M(n.adapt).map(r),i=sa(e,i),a="magic"in n?n.magic:t.magic,o="modifyArrays"in n?n.modifyArrays:t.modifyArrays,a){if(!eo)throw Error("Getters and setters (magic mode) are not supported in this browser");o&&i.push(Dd),i.push(Id)}return o&&i.push(Nd),i}function sa(t,e){for(var n=t.slice(),r=e.length;r--;)~n.indexOf(e[r])||n.push(e[r]);return n}function ua(t,e){t._guid="r-"+Em++,t._subs=wo(null),t._config={},t._twowayBindings=wo(null),t._animations=[],t.nodes={},t._liveQueries=[],t._liveComponentQueries=[],t._boundFunctions=[],t._observers=[],e.component?(t.parent=e.parent,t.container=e.container||null,t.root=t.parent.root,t.component=e.component,e.component.instance=t,t._inlinePartials=e.inlinePartials):(t.root=t,t.parent=t.container=null)}function ca(){throw Error("Using `ractive.data` is no longer supported - you must use the `ractive.get()` API instead")}function la(t,e,n){this.parentFragment=t.parentFragment,this.callback=n,this.fragment=new ev({template:e,root:t.root,owner:this}),this.update()}function pa(t,e,n){var r;return e.r?r=Sl(t,e.r,n):e.x?r=new Nl(t,t.parentFragment,e.x,n):e.rx&&(r=new Ll(t,e.rx,n)),r; }function ha(t){return 1===t.length&&t[0].t===xc}function fa(t,e){var n;for(n in e)e.hasOwnProperty(n)&&da(t.instance,t.root,n,e[n])}function da(t,e,n,r){"string"!=typeof r&&p("Components currently only support simple events - you cannot include arguments. Sorry!"),t.on(n,function(){var t,n;return arguments.length&&arguments[0]&&arguments[0].node&&(t=Array.prototype.shift.call(arguments)),n=Array.prototype.slice.call(arguments),Bs(e,r,{event:t,args:n}),!1})}function ma(t,e){var n,r;if(!e)throw Error('Component "'+this.name+'" not found');n=this.parentFragment=t.parentFragment,r=n.root,this.root=r,this.type=Sc,this.name=t.template.e,this.index=t.index,this.indexRefBindings={},this.yielders={},this.resolvers=[],Sm(this,e,t.template.a,t.template.f,t.template.p),Am(this,t.template.v),(t.template.t0||t.template.t1||t.template.t2||t.template.o)&&m('The "intro", "outro" and "decorator" directives have no effect on components',{ractive:this.instance}),Pm(this)}function va(t,e){function n(n){n.rebind(t,e)}var r;this.resolvers.forEach(n);for(var i in this.yielders)this.yielders[i][0]&&n(this.yielders[i][0]);(r=this.root._liveComponentQueries["_"+this.name])&&r._makeDirty()}function ga(){var t=this.instance;return t.render(this.parentFragment.getNode()),this.rendered=!0,t.fragment.detach()}function ba(){return""+this.instance.fragment}function ya(){var t=this.instance;this.resolvers.forEach(G),wa(this),t._observers.forEach(Q),t.fragment.unbind(),t.viewmodel.teardown(),t.fragment.rendered&&t.el.__ractive_instances__&&L(t.el.__ractive_instances__,t),Lm.fire(t)}function wa(t){var e,n;e=t.root;do(n=e._liveComponentQueries["_"+t.name])&&n._remove(t);while(e=e.parent)}function xa(t){this.shouldDestroy=t,this.instance.unrender()}function _a(t){var e=this;this.owner=t.owner,this.parent=this.owner.parentFragment,this.root=t.root,this.pElement=t.pElement,this.context=t.context,this.index=t.index,this.key=t.key,this.registeredIndexRefs=[],this.cssIds="cssIds"in t?t.cssIds:this.parent?this.parent.cssIds:null,this.items=t.template.map(function(n,r){return ka({parentFragment:e,pElement:t.pElement,template:n,index:r})}),this.value=this.argsList=null,this.dirtyArgs=this.dirtyValue=!0,this.bound=!0}function ka(t){if("string"==typeof t.template)return new vl(t);switch(t.template.t){case Ac:return new zm(t);case xc:return new ql(t);case kc:return new up(t);case _c:return new Cp(t);case Ec:var e=void 0;return(e=dd(t.parentFragment.root,t.template.e))?new Um(t,e):new nd(t);case Tc:return new fd(t);case Cc:return new Bm(t);case Pc:return new Wm(t);default:throw Error("Something very strange happened. Please file an issue at https://github.com/ractivejs/ractive/issues. Thanks!")}}function Ea(t,e){(!this.owner||this.owner.hasContext)&&_(this,"context",t,e),this.items.forEach(function(n){n.rebind&&n.rebind(t,e)})}function Ta(){var t;return 1===this.items.length?t=this.items[0].render():(t=document.createDocumentFragment(),this.items.forEach(function(e){t.appendChild(e.render())})),this.rendered=!0,t}function Ca(t){return this.items?this.items.map(t?Sa:Oa).join(""):""}function Oa(t){return""+t}function Sa(t){return t.toString(!0)}function Aa(){this.bound&&(this.items.forEach(Pa),this.bound=!1)}function Pa(t){t.unbind&&t.unbind()}function ja(t){if(!this.rendered)throw Error("Attempted to unrender a fragment that was not rendered");this.items.forEach(function(e){return e.unrender(t)}),this.rendered=!1}function Na(t){var e,n,r,i,a;if(t=t||{},"object"!=typeof t)throw Error("The reset method takes either no arguments, or an object containing new data");for((n=this.viewmodel.wrapped[""])&&n.reset?n.reset(t)===!1&&this.viewmodel.reset(t):this.viewmodel.reset(t),r=oc.reset(this),i=r.length;i--;)if(rv.indexOf(r[i])>-1){a=!0;break}if(a){var o=void 0;this.viewmodel.mark(Go),(o=this.component)&&(o.shouldDestroy=!0),this.unrender(),o&&(o.shouldDestroy=!1),this.fragment.template!==this.template&&(this.fragment.unbind(),this.fragment=new ev({template:this.template,root:this,owner:this})),e=this.render(this.el,this.anchor)}else e=ms.start(this,!0),this.viewmodel.mark(Go),ms.end();return iv.fire(this,t),e}function Fa(t){var e,n;Ku.init(null,this,{template:t}),e=this.transitionsEnabled,this.transitionsEnabled=!1,(n=this.component)&&(n.shouldDestroy=!0),this.unrender(),n&&(n.shouldDestroy=!1),this.fragment.unbind(),this.fragment=new ev({template:this.template,root:this,owner:this}),this.render(this.el,this.anchor),this.transitionsEnabled=e}function Ma(t,e){var n,r;if(r=ms.start(this,!0),c(t)){n=t;for(t in n)n.hasOwnProperty(t)&&(e=n[t],Ra(this,t,e))}else Ra(this,t,e);return ms.end(),r}function Ra(t,e,n){e=E(O(e)),e.isPattern?T(t,e).forEach(function(e){t.viewmodel.set(e,n)}):t.viewmodel.set(e,n)}function La(t,e){return Ko(this,t,void 0===e?-1:-e)}function Ia(){var t;return this.fragment.unbind(),this.viewmodel.teardown(),this._observers.forEach(Q),this.fragment.rendered&&this.el.__ractive_instances__&&L(this.el.__ractive_instances__,this),this.shouldDestroy=!0,t=this.fragment.rendered?this.unrender():os.resolve(),dv.fire(this),this._boundFunctions.forEach(Da),t}function Da(t){delete t.fn[t.prop]}function Ua(t){var e=this;if("string"!=typeof t)throw new TypeError(Fo);var n=void 0;return/\*/.test(t)?(n={},T(this,E(O(t))).forEach(function(t){n[t.str]=!e.viewmodel.get(t)}),this.set(n)):this.set(t,!this.get(t))}function Va(){return this.fragment.toString(!0)}function Ba(){var t,e;if(!this.fragment.rendered)return m("ractive.unrender() was called on a Ractive instance that was not rendered"),os.resolve();for(t=ms.start(this,!0),e=!this.component||this.component.shouldDestroy||this.shouldDestroy;this._animations[0];)this._animations[0].stop();return this.fragment.unrender(e),L(this.el.__ractive_instances__,this),bv.fire(this),ms.end(),t}function qa(t){var e;return t=E(t)||Go,e=ms.start(this,!0),this.viewmodel.mark(t),ms.end(),xv.fire(this,t),e}function za(t,e){var n,r,i;if("string"!=typeof t||e){i=[];for(r in this._twowayBindings)(!t||E(r).equalsOrStartsWith(t))&&i.push.apply(i,this._twowayBindings[r])}else i=this._twowayBindings[t];return n=Ha(this,i),this.set(n)}function Ha(t,e){var n={},r=[];return e.forEach(function(t){var e,i;if(!t.radioName||t.element.node.checked){if(t.checkboxName)return void(r[t.keypath.str]||t.changed()||(r.push(t.keypath),r[t.keypath.str]=t));e=t.attribute.value,i=t.getValue(),F(e,i)||s(e,i)||(n[t.keypath.str]=i)}}),r.length&&r.forEach(function(t){var e,i,a;e=r[t.str],i=e.attribute.value,a=e.getValue(),F(i,a)||(n[t.str]=a)}),n}function Wa(t,e){return"function"==typeof e&&/_super/.test(t)}function $a(t){for(var e={};t;)Ga(t,e),Qa(t,e),t=t._Parent!==Av?t._Parent:!1;return e}function Ga(t,e){ec.forEach(function(n){Ka(n.useDefaults?t.prototype:t,e,n.name)})}function Ka(t,e,n){var r,i=Object.keys(t[n]);i.length&&((r=e[n])||(r=e[n]={}),i.filter(function(t){return!(t in r)}).forEach(function(e){return r[e]=t[n][e]}))}function Qa(t,e){Object.keys(t.prototype).forEach(function(n){if("computed"!==n){var r=t.prototype[n];if(n in e){if("function"==typeof e[n]&&"function"==typeof r&&e[n]._method){var i=void 0,a=r._method;a&&(r=r._method),i=Ev(e[n]._method,r),a&&(i._method=i),e[n]=i}}else e[n]=r._method?r._method:r}})}function Ya(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return e.length?e.reduce(Ja,this):Ja(this)}function Ja(t){var e,n,i=void 0===arguments[1]?{}:arguments[1];return i.prototype instanceof Av&&(i=Tv(i)),e=function(t){return this instanceof e?void Cm(this,t):new e(t)},n=wo(t.prototype),n.constructor=e,_o(e,{defaults:{value:n},extend:{value:Ya,writable:!0,configurable:!0},_Parent:{value:t}}),oc.extend(t,n,i),qu.extend(t,n,i),i.computed&&(n.computed=r(wo(t.prototype.computed),i.computed)),e.prototype=n,e}var Za,Xa,to,eo,no,ro,io,ao=3,oo={el:void 0,append:!1,template:{v:ao,t:[]},preserveWhitespace:!1,sanitize:!1,stripComments:!0,delimiters:["{{","}}"],tripleDelimiters:["{{{","}}}"],interpolate:!1,data:{},computed:{},magic:!1,modifyArrays:!0,adapt:[],isolated:!1,twoway:!0,lazy:!1,noIntro:!1,transitionsEnabled:!0,complete:void 0,css:null,noCssTransform:!1},so=oo,uo={linear:function(t){return t},easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return Math.pow(t-1,3)+1},easeInOut:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)}};Za="object"==typeof document,Xa="undefined"!=typeof navigator&&/jsDom/.test(navigator.appName),to="undefined"!=typeof console&&"function"==typeof console.warn&&"function"==typeof console.warn.apply;try{Object.defineProperty({},"test",{value:0}),eo=!0}catch(co){eo=!1}no={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},ro="undefined"==typeof document?!1:document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),io=["o","ms","moz","webkit"];var lo,po,ho,fo,mo,vo,go,bo,yo;if(lo=ro?function(t,e){return e&&e!==no.html?document.createElementNS(e,t):document.createElement(t)}:function(t,e){if(e&&e!==no.html)throw"This browser does not support namespaces other than http://www.w3.org/1999/xhtml. The most likely cause of this error is that you're trying to render SVG in an older browser. See http://docs.ractivejs.org/latest/svg-and-older-browsers for more information";return document.createElement(t)},Za){for(ho=lo("div"),fo=["matches","matchesSelector"],yo=function(t){return function(e,n){return e[t](n)}},go=fo.length;go--&&!po;)if(mo=fo[go],ho[mo])po=yo(mo);else for(bo=io.length;bo--;)if(vo=io[go]+mo.substr(0,1).toUpperCase()+mo.substring(1),ho[vo]){po=yo(vo);break}po||(po=function(t,e){var n,r,i;for(r=t.parentNode,r||(ho.innerHTML="",r=ho,t=t.cloneNode(),ho.appendChild(t)),n=r.querySelectorAll(e),i=n.length;i--;)if(n[i]===t)return!0;return!1})}else po=null;var wo,xo,_o,ko=null;try{Object.defineProperty({},"test",{value:0}),Za&&Object.defineProperty(document.createElement("div"),"test",{value:0}),xo=Object.defineProperty}catch(Eo){xo=function(t,e,n){t[e]=n.value}}try{try{Object.defineProperties({},{test:{value:0}})}catch(Eo){throw Eo}Za&&Object.defineProperties(lo("div"),{test:{value:0}}),_o=Object.defineProperties}catch(Eo){_o=function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&xo(t,n,e[n])}}try{Object.create(null),wo=Object.create}catch(Eo){wo=function(){var t=function(){};return function(e,n){var r;return null===e?{}:(t.prototype=e,r=new t,n&&Object.defineProperties(r,n),r)}}()}var To,Co,Oo,So=Object.prototype.hasOwnProperty,Ao=Object.prototype.toString,Po=/^\[object (?:Array|FileList)\]$/,jo=function(){},No={};to?!function(){var t=["%cRactive.js %c0.7.3 %cin debug mode, %cmore...","color: rgb(114, 157, 52); font-weight: normal;","color: rgb(85, 85, 85); font-weight: normal;","color: rgb(85, 85, 85); font-weight: normal;","color: rgb(82, 140, 224); font-weight: normal; text-decoration: underline;"],e="You're running Ractive 0.7.3 in debug mode - messages will be printed to the console to help you fix problems and optimise your application.\n\nTo disable debug mode, add this line at the start of your app:\n Ractive.DEBUG = false;\n\nTo disable debug mode when your app is minified, add this snippet:\n Ractive.DEBUG = /unminified/.test(function(){/*unminified*/});\n\nGet help and support:\n http://docs.ractivejs.org\n http://stackoverflow.com/questions/tagged/ractivejs\n http://groups.google.com/forum/#!forum/ractive-js\n http://twitter.com/ractivejs\n\nFound a bug? Raise an issue:\n https://github.com/ractivejs/ractive/issues\n\n";Oo=function(){var n=!!console.groupCollapsed;console[n?"groupCollapsed":"log"].apply(console,t),console.log(e),n&&console.groupEnd(t),Oo=jo},Co=function(t,e){if(Oo(),"object"==typeof e[e.length-1]){var n=e.pop(),r=n?n.ractive:null;if(r){var i=void 0;r.component&&(i=r.component.name)&&(t="<"+i+"> "+t);var a=void 0;(a=n.node||r.fragment&&r.fragment.rendered&&r.find("*"))&&e.push(a)}}console.warn.apply(console,["%cRactive.js: %c"+t,"color: rgb(114, 157, 52);","color: rgb(85, 85, 85);"].concat(e))},To=function(){console.log.apply(console,arguments)}}():Co=To=Oo=jo;var Fo="Bad arguments",Mo='A function was specified for "%s" %s, but no %s was returned',Ro=function(t,e){return'Missing "'+t+'" '+e+" plugin. You may need to download a plugin via http://docs.ractivejs.org/latest/plugins#"+e+"s"},Lo=function(t,e,n,r){if(t===e)return y(e);if(r){var i=g("interpolators",n,r);if(i)return i(t,e)||y(e);p(Ro(r,"interpolator"))}return Uo.number(t,e)||Uo.array(t,e)||Uo.object(t,e)||y(e)},Io=Lo,Do={number:function(t,e){var n;return u(t)&&u(e)?(t=+t,e=+e,n=e-t,n?function(e){return t+e*n}:function(){return t}):null},array:function(t,e){var n,r,i,o;if(!a(t)||!a(e))return null;for(n=[],r=[],o=i=Math.min(t.length,e.length);o--;)r[o]=Io(t[o],e[o]);for(o=i;o=this.duration?(null!==a&&(ms.start(this.root),this.root.viewmodel.set(a,this.to),ms.end()),this.step&&this.step(1,this.to),this.complete(this.to),i=this.root._animations.indexOf(this),-1===i&&m("Animation was not found"),this.root._animations.splice(i,1),this.running=!1,!1):(e=this.easing?this.easing(t/this.duration):t/this.duration,null!==a&&(n=this.interpolator(e),ms.start(this.root),this.root.viewmodel.set(a,n),ms.end()),this.step&&this.step(e,n),!0)):!1},stop:function(){var t;this.running=!1,t=this.root._animations.indexOf(this),-1===t&&m("Animation was not found"),this.root._animations.splice(t,1)}};var ws=ys,xs=nt,_s={stop:jo},ks=it,Es=new ns("detach"),Ts=at,Cs=ot,Os=function(){var t,e,n;t=this._root[this._isComponentQuery?"liveComponentQueries":"liveQueries"],e=this.selector,n=t.indexOf(e),-1!==n&&(t.splice(n,1),t[e]=null)},Ss=function(t,e){var n,r,i,a,o,s,u,c,l,p;for(n=ut(t.component||t._ractive.proxy),r=ut(e.component||e._ractive.proxy),i=R(n),a=R(r);i&&i===a;)n.pop(),r.pop(),o=i,i=R(n),a=R(r);if(i=i.component||i,a=a.component||a,l=i.parentFragment,p=a.parentFragment,l===p)return s=l.items.indexOf(i),u=p.items.indexOf(a),s-u||n.length-r.length;if(c=o.fragments)return s=c.indexOf(l),u=c.indexOf(p),s-u||n.length-r.length;throw Error("An unexpected condition was met while comparing the position of two components. Please file an issue at https://github.com/RactiveJS/Ractive/issues - thanks!")},As=function(t,e){var n;return t.compareDocumentPosition?(n=t.compareDocumentPosition(e),2&n?1:-1):Ss(t,e)},Ps=function(){this.sort(this._isComponentQuery?Ss:As),this._dirty=!1},js=function(){var t=this;this._dirty||(this._dirty=!0,ms.scheduleTask(function(){t._sort()}))},Ns=function(t){var e=this.indexOf(this._isComponentQuery?t.instance:t);-1!==e&&this.splice(e,1)},Fs=ct,Ms=lt,Rs=pt,Ls=ht,Is=ft,Ds=dt,Us={enqueue:function(t,e){t.event&&(t._eventQueue=t._eventQueue||[],t._eventQueue.push(t.event)),t.event=e},dequeue:function(t){t._eventQueue&&t._eventQueue.length?t.event=t._eventQueue.pop():delete t.event}},Vs=Us,Bs=mt,qs=bt,zs=yt,Hs={capture:!0,noUnwrap:!0,fullRootGet:!0},Ws=wt,$s=new ns("insert"),Gs=_t,Ks=function(t,e,n,r){this.root=t,this.keypath=e,this.callback=n,this.defer=r.defer,this.context=r&&r.context?r.context:t};Ks.prototype={init:function(t){this.value=this.root.get(this.keypath.str),t!==!1?this.update():this.oldValue=this.value},setValue:function(t){var e=this;s(t,this.value)||(this.value=t,this.defer&&this.ready?ms.scheduleTask(function(){return e.update()}):this.update())},update:function(){this.updating||(this.updating=!0,this.callback.call(this.context,this.value,this.oldValue,this.keypath.str),this.oldValue=this.value,this.updating=!1)}};var Qs,Ys=Ks,Js=kt,Zs=Array.prototype.slice;Qs=function(t,e,n,r){this.root=t,this.callback=n,this.defer=r.defer,this.keypath=e,this.regex=RegExp("^"+e.str.replace(/\./g,"\\.").replace(/\*/g,"([^\\.]+)")+"$"),this.values={},this.defer&&(this.proxies=[]),this.context=r&&r.context?r.context:t},Qs.prototype={init:function(t){var e,n;if(e=Js(this.root,this.keypath),t!==!1)for(n in e)e.hasOwnProperty(n)&&this.update(E(n));else this.values=e},update:function(t){var e,n=this;if(t.isPattern){e=Js(this.root,t);for(t in e)e.hasOwnProperty(t)&&this.update(E(t))}else if(!this.root.viewmodel.implicitChanges[t.str])return this.defer&&this.ready?void ms.scheduleTask(function(){return n.getProxy(t).update()}):void this.reallyUpdate(t)},reallyUpdate:function(t){var e,n,r,i;return e=t.str,n=this.root.viewmodel.get(t),this.updating?void(this.values[e]=n):(this.updating=!0,s(n,this.values[e])&&this.ready||(r=Zs.call(this.regex.exec(e),1),i=[n,this.values[e],e].concat(r),this.values[e]=n,this.callback.apply(this.context,i)),void(this.updating=!1))},getProxy:function(t){var e=this;return this.proxies[t.str]||(this.proxies[t.str]={update:function(){return e.reallyUpdate(t)}}),this.proxies[t.str]}};var Xs,tu,eu,nu,ru,iu,au=Qs,ou=Et,su={},uu=Tt,cu=Ct,lu=function(t){return t.trim()},pu=function(t){return""!==t},hu=Ot,fu=St,du=At,mu=Pt,vu=Array.prototype,gu=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];var o,s,u,c,l=[];if(e=E(O(e)),o=this.viewmodel.get(e),s=o.length,!a(o))throw Error("Called ractive."+t+"('"+e.str+"'), but '"+e.str+"' does not refer to an array");return l=mu(o,t,r),c=vu[t].apply(o,r),u=ms.start(this,!0).then(function(){return c}),l?this.viewmodel.smartUpdate(e,o,l):this.viewmodel.mark(e),ms.end(),u}},bu=gu("pop"),yu=gu("push"),wu="/* Ractive.js component styles */\n",xu=[],_u=!1;Za?(eu=document.createElement("style"),eu.type="text/css",nu=document.getElementsByTagName("head")[0],iu=!1,ru=eu.styleSheet,tu=function(){var t=wu+xu.map(function(t){return"\n/* {"+t.id+"} */\n"+t.styles}).join("\n");ru?ru.cssText=t:eu.innerHTML=t,iu||(nu.appendChild(eu),iu=!0)},Xs={add:function(t){xu.push(t),_u=!0},apply:function(){_u&&(tu(),_u=!1)}}):Xs={add:jo,apply:jo};var ku,Eu,Tu,Cu=Xs,Ou=Nt,Su=new ns("render"),Au=new ns("complete"),Pu={extend:function(t,e,n){e.adapt=Mt(e.adapt,M(n.adapt))},init:function(){}},ju=Pu,Nu=Rt,Fu=/(?:^|\})?\s*([^\{\}]+)\s*\{/g,Mu=/\/\*.*?\*\//g,Ru=/((?:(?:\[[^\]+]\])|(?:[^\s\+\>\~:]))+)((?::[^\s\+\>\~\(]+(?:\([^\)]+\))?)?\s*[\s\+\>\~]?)\s*/g,Lu=/^@media/,Iu=/\[data-ractive-css~="\{[a-z0-9-]+\}"]/g,Du=1,Uu={name:"css",extend:function(t,e,n){if(n.css){var r=Du++,i=n.noCssTransform?n.css:Nu(n.css,r);e.cssId=r,Cu.add({id:r,styles:i})}},init:function(){}},Vu=Uu,Bu={name:"data",extend:function(t,e,n){var r=void 0,i=void 0;if(n.data&&c(n.data))for(r in n.data)i=n.data[r],i&&"object"==typeof i&&(c(i)||a(i))&&m("Passing a `data` option with object and array properties to Ractive.extend() is discouraged, as mutating them is likely to cause bugs. Consider using a data function instead:\n\n // this...\n data: function () {\n return {\n myObject: {}\n };\n })\n\n // instead of this:\n data: {\n myObject: {}\n }");e.data=Ut(e.data,n.data)},init:function(t,e,n){var r=Ut(t.prototype.data,n.data);return"function"==typeof r&&(r=r.call(e)),r||{}},reset:function(t){var e=this.init(t.constructor,t,t.viewmodel);return t.viewmodel.reset(e),!0}},qu=Bu,zu=null,Hu=["preserveWhitespace","sanitize","stripComments","delimiters","tripleDelimiters","interpolate"],Wu={fromId:Ht,isHashedId:Wt,isParsed:$t,getParseOptions:Gt,createHelper:qt,parse:zt},$u=Wu,Gu={name:"template",extend:function(t,e,n){var r;"template"in n&&(r=n.template,"function"==typeof r?e.template=r:e.template=Jt(r,e))},init:function(t,e,n){var r,i;r="template"in n?n.template:t.prototype.template,"function"==typeof r&&(i=r,r=Qt(e,i),e._config.template={fn:i,result:r}),r=Jt(r,e),e.template=r.t,r.p&&Zt(e.partials,r.p)},reset:function(t){var e,n=Kt(t);return n?(e=Jt(n,t),t.template=e.t,Zt(t.partials,e.p,!0),!0):void 0}},Ku=Gu;ku=["adaptors","components","computed","decorators","easing","events","interpolators","partials","transitions"],Eu=function(t,e){this.name=t,this.useDefaults=e},Eu.prototype={constructor:Eu,extend:function(t,e,n){this.configure(this.useDefaults?t.defaults:t,this.useDefaults?e:e.constructor,n)},init:function(){},configure:function(t,e,n){var r,i=this.name,a=n[i];r=wo(t[i]);for(var o in a)r[o]=a[o];e[i]=r},reset:function(t){var e=t[this.name],n=!1;return Object.keys(e).forEach(function(t){var r=e[t];r._fn&&(r._fn.isOwner?e[t]=r._fn:delete e[t],n=!0)}),n}},Tu=ku.map(function(t){return new Eu(t,"computed"===t)});var Qu,Yu,Ju,Zu,Xu,tc,ec=Tu,nc=Xt,rc=re;Zu={adapt:ju,css:Vu,data:qu,template:Ku},Ju=Object.keys(so),tc=oe(Ju.filter(function(t){return!Zu[t]})),Xu=oe(Ju.concat(ec.map(function(t){return t.name}))),Yu=[].concat(Ju.filter(function(t){return!ec[t]&&!Zu[t]}),ec,Zu.data,Zu.template,Zu.css),Qu={extend:function(t,e,n){return ie("extend",t,e,n)},init:function(t,e,n){return ie("init",t,e,n)},reset:function(t){return Yu.filter(function(e){return e.reset&&e.reset(t)}).map(function(t){return t.name})},order:Yu};var ic,ac,oc=Qu,sc=se,uc=ue,cc=ce,lc=le,pc=pe,hc=he,fc=fe,dc=de,mc=/^\s+/;ac=function(t){this.name="ParseError",this.message=t;try{throw Error(t)}catch(e){this.stack=e.stack}},ac.prototype=Error.prototype,ic=function(t,e){var n,r,i=0;for(this.str=t,this.options=e||{},this.pos=0,this.lines=this.str.split("\n"),this.lineEnds=this.lines.map(function(t){var e=i+t.length+1;return i=e,e},0),this.init&&this.init(t,e),n=[];this.posn;n+=1)if(this.pos=e,i=t[n](this))return i;return null},getLinePos:function(t){for(var e,n=0,r=0;t>=this.lineEnds[n];)r=this.lineEnds[n],n+=1;return e=t-r,[n+1,e+1,t]},error:function(t){var e=this.getLinePos(this.pos),n=e[0],r=e[1],i=this.lines[e[0]-1],a=0,o=i.replace(/\t/g,function(t,n){return n/g,ul=/&/g;var dl=function(){return e(this.node)},ml=function(t){this.type=wc,this.text=t.template};ml.prototype={detach:dl,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createTextNode(this.text)),this.node},toString:function(t){return t?Ee(this.text):this.text},unrender:function(t){return t?this.detach():void 0}};var vl=ml,gl=Te,bl=Ce,yl=function(t,e,n){var r;this.ref=e,this.resolved=!1,this.root=t.root,this.parentFragment=t.parentFragment,this.callback=n,r=us(t.root,e,t.parentFragment),void 0!=r?this.resolve(r):ms.addUnresolved(this)};yl.prototype={resolve:function(t){this.keypath&&!t&&ms.addUnresolved(this),this.resolved=!0,this.keypath=t,this.callback(t)},forceResolution:function(){this.resolve(E(this.ref))},rebind:function(t,e){var n;void 0!=this.keypath&&(n=this.keypath.replace(t,e),void 0!==n&&this.resolve(n))},unbind:function(){this.resolved||ms.removeUnresolved(this)}};var wl=yl,xl=function(t,e,n){this.parentFragment=t.parentFragment,this.ref=e,this.callback=n,this.rebind()},_l={"@keypath":{prefix:"c",prop:["context"]},"@index":{prefix:"i",prop:["index"]},"@key":{prefix:"k",prop:["key","index"]}};xl.prototype={rebind:function(){var t,e=this.ref,n=this.parentFragment,r=_l[e];if(!r)throw Error('Unknown special reference "'+e+'" - valid references are @index, @key and @keypath');if(this.cached)return this.callback(E("@"+r.prefix+Oe(this.cached,r)));if(-1!==r.prop.indexOf("index")||-1!==r.prop.indexOf("key"))for(;n;){if(n.owner.currentSubtype===Lc&&void 0!==(t=Oe(n,r)))return this.cached=n,n.registerIndexRef(this),this.callback(E("@"+r.prefix+t));n=!n.parent&&n.owner&&n.owner.component&&n.owner.component.parentFragment&&!n.owner.component.instance.isolated?n.owner.component.parentFragment:n.parent}else for(;n;){if(void 0!==(t=Oe(n,r)))return this.callback(E("@"+r.prefix+t.str));n=n.parent}},unbind:function(){this.cached&&this.cached.unregisterIndexRef(this)}};var kl=xl,El=function(t,e,n){this.parentFragment=t.parentFragment,this.ref=e,this.callback=n,e.ref.fragment.registerIndexRef(this),this.rebind()};El.prototype={rebind:function(){var t,e=this.ref.ref;t="k"===e.ref.t?"k"+e.fragment.key:"i"+e.fragment.index,void 0!==t&&this.callback(E("@"+t))},unbind:function(){this.ref.ref.fragment.unregisterIndexRef(this)}};var Tl=El,Cl=Se;Se.resolve=function(t){var e,n,r={};for(e in t.refs)n=t.refs[e],r[n.ref.n]="k"===n.ref.t?n.fragment.key:n.fragment.index;return r};var Ol,Sl=Ae,Al=Pe,Pl={},jl=Function.prototype.bind;Ol=function(t,e,n,r){var i,a=this;i=t.root,this.root=i,this.parentFragment=e,this.callback=r,this.owner=t,this.str=n.s,this.keypaths=[],this.pending=n.r.length,this.refResolvers=n.r.map(function(t,e){return Sl(a,t,function(t){a.resolve(e,t)})}),this.ready=!0,this.bubble()},Ol.prototype={bubble:function(){this.ready&&(this.uniqueString=Ne(this.str,this.keypaths),this.keypath=Fe(this.uniqueString),this.createEvaluator(),this.callback(this.keypath))},unbind:function(){for(var t;t=this.refResolvers.pop();)t.unbind()},resolve:function(t,e){this.keypaths[t]=e,this.bubble()},createEvaluator:function(){var t,e,n,r,i,a=this;r=this.keypath,t=this.root.viewmodel.computations[r.str],t?this.root.viewmodel.mark(r):(i=Al(this.str,this.refResolvers.length),e=this.keypaths.map(function(t){var e;return"undefined"===t?function(){}:t.isSpecial?(e=t.value,function(){return e}):function(){var e=a.root.viewmodel.get(t,{noUnwrap:!0,fullRootGet:!0});return"function"==typeof e&&(e=Re(e,a.root)),e}}),n={deps:this.keypaths.filter(Me),getter:function(){var t=e.map(je);return i.apply(null,t)}},t=this.root.viewmodel.compute(r,n))},rebind:function(t,e){this.refResolvers.forEach(function(n){return n.rebind(t,e)})}};var Nl=Ol,Fl=function(t,e,n){var r=this;this.resolver=e,this.root=e.root,this.parentFragment=n,this.viewmodel=e.root.viewmodel,"string"==typeof t?this.value=t:t.t===Fc?this.refResolver=Sl(this,t.n,function(t){r.resolve(t)}):new Nl(e,n,t,function(t){r.resolve(t)})};Fl.prototype={resolve:function(t){this.keypath&&this.viewmodel.unregister(this.keypath,this),this.keypath=t,this.value=this.viewmodel.get(t),this.bind(),this.resolver.bubble()},bind:function(){this.viewmodel.register(this.keypath,this)},rebind:function(t,e){this.refResolver&&this.refResolver.rebind(t,e)},setValue:function(t){this.value=t,this.resolver.bubble()},unbind:function(){this.keypath&&this.viewmodel.unregister(this.keypath,this),this.refResolver&&this.refResolver.unbind()},forceResolution:function(){this.refResolver&&this.refResolver.forceResolution()}};var Ml=Fl,Rl=function(t,e,n){var r,i,a,o,s=this;this.parentFragment=o=t.parentFragment,this.root=r=t.root,this.mustache=t,this.ref=i=e.r,this.callback=n,this.unresolved=[],(a=us(r,i,o))?this.base=a:this.baseResolver=new wl(this,i,function(t){s.base=t,s.baseResolver=null,s.bubble()}),this.members=e.m.map(function(t){return new Ml(t,s,o)}),this.ready=!0,this.bubble()};Rl.prototype={getKeypath:function(){var t=this.members.map(Le);return!t.every(Ie)||this.baseResolver?null:this.base.join(t.join("."))},bubble:function(){this.ready&&!this.baseResolver&&this.callback(this.getKeypath())},unbind:function(){this.members.forEach(G)},rebind:function(t,e){var n;if(this.base){var r=this.base.replace(t,e);r&&r!==this.base&&(this.base=r,n=!0)}this.members.forEach(function(r){r.rebind(t,e)&&(n=!0)}),n&&this.bubble()},forceResolution:function(){this.baseResolver&&(this.base=E(this.ref),this.baseResolver.unbind(),this.baseResolver=null),this.members.forEach(De),this.bubble()}};var Ll=Rl,Il=Ue,Dl=Ve,Ul=Be,Vl={getValue:bl,init:Il,resolve:Dl,rebind:Ul},Bl=function(t){this.type=xc,Vl.init(this,t)};Bl.prototype={update:function(){this.node.data=void 0==this.value?"":this.value},resolve:Vl.resolve,rebind:Vl.rebind,detach:dl,unbind:gl,render:function(){return this.node||(this.node=document.createTextNode(n(this.value))),this.node},unrender:function(t){t&&e(this.node)},getValue:Vl.getValue,setValue:function(t){var e;this.keypath&&(e=this.root.viewmodel.wrapped[this.keypath.str])&&(t=e.get()),s(t,this.value)||(this.value=t,this.parentFragment.bubble(),this.node&&ms.addView(this))},firstNode:function(){return this.node},toString:function(t){var e=""+n(this.value);return t?Ee(e):e}};var ql=Bl,zl=qe,Hl=ze,Wl=He,$l=We,Gl=$e,Kl=Ge,Ql=Ke,Yl=Qe,Jl=Ye,Zl=function(t,e){Vl.rebind.call(this,t,e)},Xl=Ze,tp=Xe,ep=pn,np=hn,rp=fn,ip=vn,ap=function(t){this.type=kc,this.subtype=this.currentSubtype=t.template.n,this.inverted=this.subtype===Rc,this.pElement=t.pElement,this.fragments=[],this.fragmentsToCreate=[],this.fragmentsToRender=[],this.fragmentsToUnrender=[],t.template.i&&(this.indexRefs=t.template.i.split(",").map(function(t,e){return{n:t,t:0===e?"k":"i"}})),this.renderedFragments=[],this.length=0,Vl.init(this,t)};ap.prototype={bubble:zl,detach:Hl,find:Wl,findAll:$l,findAllComponents:Gl,findComponent:Kl,findNextNode:Ql,firstNode:Yl,getIndexRef:function(t){if(this.indexRefs)for(var e=this.indexRefs.length;e--;){var n=this.indexRefs[e];if(n.n===t)return n}},getValue:Vl.getValue,shuffle:Jl,rebind:Zl,render:Xl,resolve:Vl.resolve,setValue:tp,toString:ep,unbind:np,unrender:rp,update:ip};var op,sp,up=ap,cp=gn,lp=bn,pp=yn,hp=wn,fp={};try{lo("table").innerHTML="foo"}catch(Eo){op=!0,sp={TABLE:['',"
"],THEAD:['',"
"],TBODY:['',"
"],TR:['',"
"],SELECT:['"]}}var dp=function(t,e,n){var r,i,a,o,s,u=[];if(null!=t&&""!==t){for(op&&(i=sp[e.tagName])?(r=xn("DIV"),r.innerHTML=i[0]+t+i[1],r=r.querySelector(".x"),"SELECT"===r.tagName&&(a=r.options[r.selectedIndex])):e.namespaceURI===no.svg?(r=xn("DIV"),r.innerHTML=''+t+"",r=r.querySelector(".x")):(r=xn(e.tagName),r.innerHTML=t,"SELECT"===r.tagName&&(a=r.options[r.selectedIndex]));o=r.firstChild;)u.push(o),n.appendChild(o);if("SELECT"===e.tagName)for(s=u.length;s--;)u[s]!==a&&(u[s].selected=!1)}return u},mp=_n,vp=En,gp=Tn,bp=Cn,yp=On,wp=Sn,xp=function(t){this.type=_c,Vl.init(this,t)};xp.prototype={detach:cp,find:lp,findAll:pp,firstNode:hp,getValue:Vl.getValue,rebind:Vl.rebind,render:vp,resolve:Vl.resolve,setValue:gp,toString:bp,unbind:gl,unrender:yp,update:wp};var _p,kp,Ep,Tp,Cp=xp,Op=function(){this.parentFragment.bubble()},Sp=An,Ap=function(t){return this.node?po(this.node,t)?this.node:this.fragment&&this.fragment.find?this.fragment.find(t):void 0:null},Pp=function(t,e){e._test(this,!0)&&e.live&&(this.liveQueries||(this.liveQueries=[])).push(e),this.fragment&&this.fragment.findAll(t,e)},jp=function(t,e){this.fragment&&this.fragment.findAllComponents(t,e)},Np=function(t){return this.fragment?this.fragment.findComponent(t):void 0},Fp=Pn,Mp=jn,Rp=Nn,Lp=/^true|on|yes|1$/i,Ip=/^[0-9]+$/,Dp=function(t,e){var n,r,i;return i=e.a||{},r={},n=i.twoway,void 0!==n&&(r.twoway=0===n||Lp.test(n)),n=i.lazy,void 0!==n&&(0!==n&&Ip.test(n)?r.lazy=parseInt(n):r.lazy=0===n||Lp.test(n)),r},Up=Fn;_p="altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath vkern".split(" "),kp="attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits contentScriptType contentStyleType diffuseConstant edgeMode externalResourcesRequired filterRes filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" "),Ep=function(t){for(var e={},n=t.length;n--;)e[t[n].toLowerCase()]=t[n];return e},Tp=Ep(_p.concat(kp));var Vp=function(t){var e=t.toLowerCase();return Tp[e]||e},Bp=function(t,e){var n,r;if(n=e.indexOf(":"),-1===n||(r=e.substr(0,n),"xmlns"===r))t.name=t.element.namespace!==no.html?Vp(e):e;else if(e=e.substring(n+1),t.name=Vp(e),t.namespace=no[r.toLowerCase()],t.namespacePrefix=r,!t.namespace)throw'Unknown namespace ("'+r+'")'},qp=Mn,zp=Rn,Hp=Ln,Wp=In,$p={"accept-charset":"acceptCharset",accesskey:"accessKey",bgcolor:"bgColor","class":"className",codebase:"codeBase",colspan:"colSpan",contenteditable:"contentEditable",datetime:"dateTime",dirname:"dirName","for":"htmlFor","http-equiv":"httpEquiv",ismap:"isMap",maxlength:"maxLength",novalidate:"noValidate",pubdate:"pubDate",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"},Gp=Dn,Kp=Vn,Qp=Bn,Yp=qn,Jp=zn,Zp=Hn,Xp=Wn,th=$n,eh=Gn,nh=Kn,rh=Qn,ih=Yn,ah=Jn,oh=Zn,sh=Xn,uh=function(t){this.init(t)};uh.prototype={bubble:Up,init:zp,rebind:Hp,render:Wp,toString:Gp,unbind:Kp,update:sh};var ch,lh=uh,ph=function(t,e){var n,r,i=[];for(n in e)"twoway"!==n&&"lazy"!==n&&e.hasOwnProperty(n)&&(r=new lh({element:t,name:n,value:e[n],root:t.root}),i[n]=r,"value"!==n&&i.push(r));return(r=i.value)&&i.push(r),i};"undefined"!=typeof document&&(ch=lo("div"));var hh=function(t,e){this.element=t,this.root=t.root,this.parentFragment=t.parentFragment,this.attributes=[],this.fragment=new ev({root:t.root,owner:this,template:[e]})};hh.prototype={bubble:function(){this.node&&this.update(),this.element.bubble()},rebind:function(t,e){this.fragment.rebind(t,e)},render:function(t){this.node=t,this.isSvg=t.namespaceURI===no.svg,this.update()},unbind:function(){this.fragment.unbind()},update:function(){var t,e,n=this;t=""+this.fragment,e=tr(t,this.isSvg),this.attributes.filter(function(t){return er(e,t)}).forEach(function(t){n.node.removeAttribute(t.name)}),e.forEach(function(t){n.node.setAttribute(t.name,t.value)}),this.attributes=e},toString:function(){return""+this.fragment}};var fh=hh,dh=function(t,e){return e?e.map(function(e){return new fh(t,e)}):[]},mh=function(t){var e,n,r,i;if(this.element=t,this.root=t.root,this.attribute=t.attributes[this.name||"value"],e=this.attribute.interpolator,e.twowayBinding=this,n=e.keypath){if("}"===n.str.slice(-1))return v("Two-way binding does not work with expressions (`%s` on <%s>)",e.resolver.uniqueString,t.name,{ractive:this.root}),!1;if(n.isSpecial)return v("Two-way binding does not work with %s",e.resolver.ref,{ractive:this.root}),!1}else{var a=e.template.r?"'"+e.template.r+"' reference":"expression";m("The %s being used for two-way binding is ambiguous, and may cause unexpected results. Consider initialising your data to eliminate the ambiguity",a,{ractive:this.root}),e.resolver.forceResolution(),n=e.keypath}this.attribute.isTwoway=!0,this.keypath=n,r=this.root.viewmodel.get(n),void 0===r&&this.getInitialValue&&(r=this.getInitialValue(),void 0!==r&&this.root.viewmodel.set(n,r)),(i=nr(t))&&(this.resetValue=r,i.formBindings.push(this))};mh.prototype={handleChange:function(){var t=this;ms.start(this.root),this.attribute.locked=!0,this.root.viewmodel.set(this.keypath,this.getValue()),ms.scheduleTask(function(){return t.attribute.locked=!1}),ms.end()},rebound:function(){var t,e,n;e=this.keypath,n=this.attribute.interpolator.keypath,e!==n&&(L(this.root._twowayBindings[e.str],this),this.keypath=n,t=this.root._twowayBindings[n.str]||(this.root._twowayBindings[n.str]=[]),t.push(this))},unbind:function(){}},mh.extend=function(t){var e,n=this;return e=function(t){mh.call(this,t),this.init&&this.init()},e.prototype=wo(n.prototype),r(e.prototype,t),e.extend=mh.extend,e};var vh,gh=mh,bh=rr;vh=gh.extend({getInitialValue:function(){return""},getValue:function(){return this.element.node.value},render:function(){var t,e=this.element.node,n=!1;this.rendered=!0,t=this.root.lazy,this.element.lazy===!0?t=!0:this.element.lazy===!1?t=!1:u(this.element.lazy)?(t=!1,n=+this.element.lazy):u(t||"")&&(n=+t,t=!1,this.element.lazy=n),this.handler=n?ar:bh,e.addEventListener("change",bh,!1),t||(e.addEventListener("input",this.handler,!1),e.attachEvent&&e.addEventListener("keyup",this.handler,!1)),e.addEventListener("blur",ir,!1)},unrender:function(){var t=this.element.node;this.rendered=!1,t.removeEventListener("change",bh,!1),t.removeEventListener("input",this.handler,!1),t.removeEventListener("keyup",this.handler,!1),t.removeEventListener("blur",ir,!1)}});var yh=vh,wh=yh.extend({getInitialValue:function(){return this.element.fragment?""+this.element.fragment:""},getValue:function(){return this.element.node.innerHTML}}),xh=wh,_h=or,kh={},Eh=gh.extend({name:"checked",init:function(){this.siblings=_h(this.root._guid,"radio",this.element.getAttribute("name")),this.siblings.push(this)},render:function(){var t=this.element.node;t.addEventListener("change",bh,!1),t.attachEvent&&t.addEventListener("click",bh,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",bh,!1),t.removeEventListener("click",bh,!1)},handleChange:function(){ms.start(this.root),this.siblings.forEach(function(t){t.root.viewmodel.set(t.keypath,t.getValue())}),ms.end()},getValue:function(){return this.element.node.checked},unbind:function(){L(this.siblings,this)}}),Th=Eh,Ch=gh.extend({name:"name",init:function(){this.siblings=_h(this.root._guid,"radioname",this.keypath.str),this.siblings.push(this),this.radioName=!0},getInitialValue:function(){return this.element.getAttribute("checked")?this.element.getAttribute("value"):void 0},render:function(){var t=this.element.node;t.name="{{"+this.keypath.str+"}}",t.checked=this.root.viewmodel.get(this.keypath)==this.element.getAttribute("value"),t.addEventListener("change",bh,!1),t.attachEvent&&t.addEventListener("click",bh,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",bh,!1),t.removeEventListener("click",bh,!1)},getValue:function(){var t=this.element.node;return t._ractive?t._ractive.value:t.value},handleChange:function(){this.element.node.checked&&gh.prototype.handleChange.call(this)},rebound:function(t,e){var n;gh.prototype.rebound.call(this,t,e),(n=this.element.node)&&(n.name="{{"+this.keypath.str+"}}")},unbind:function(){L(this.siblings,this)}}),Oh=Ch,Sh=gh.extend({name:"name",getInitialValue:function(){return this.noInitialValue=!0,[]},init:function(){var t,e;this.checkboxName=!0,this.siblings=_h(this.root._guid,"checkboxes",this.keypath.str),this.siblings.push(this),this.noInitialValue&&(this.siblings.noInitialValue=!0),this.siblings.noInitialValue&&this.element.getAttribute("checked")&&(t=this.root.viewmodel.get(this.keypath),e=this.element.getAttribute("value"),t.push(e))},unbind:function(){L(this.siblings,this)},render:function(){var t,e,n=this.element.node;t=this.root.viewmodel.get(this.keypath),e=this.element.getAttribute("value"),a(t)?this.isChecked=N(t,e):this.isChecked=t==e,n.name="{{"+this.keypath.str+"}}",n.checked=this.isChecked,n.addEventListener("change",bh,!1),n.attachEvent&&n.addEventListener("click",bh,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",bh,!1),t.removeEventListener("click",bh,!1)},changed:function(){var t=!!this.isChecked;return this.isChecked=this.element.node.checked,this.isChecked===t},handleChange:function(){this.isChecked=this.element.node.checked,gh.prototype.handleChange.call(this)},getValue:function(){return this.siblings.filter(sr).map(ur)}}),Ah=Sh,Ph=gh.extend({name:"checked",render:function(){var t=this.element.node;t.addEventListener("change",bh,!1),t.attachEvent&&t.addEventListener("click",bh,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",bh,!1),t.removeEventListener("click",bh,!1)},getValue:function(){return this.element.node.checked}}),jh=Ph,Nh=gh.extend({getInitialValue:function(){var t,e,n,r,i=this.element.options;if(void 0===this.element.getAttribute("value")&&(e=t=i.length,t)){for(;e--;)if(i[e].getAttribute("selected")){n=i[e].getAttribute("value"),r=!0;break}if(!r)for(;++ee;e+=1)if(r=t[e],t[e].selected)return i=r._ractive?r._ractive.value:r.value},forceUpdate:function(){var t=this,e=this.getValue();void 0!==e&&(this.attribute.locked=!0,ms.scheduleTask(function(){return t.attribute.locked=!1}),this.root.viewmodel.set(this.keypath,e))}}),Fh=Nh,Mh=Fh.extend({getInitialValue:function(){return this.element.options.filter(function(t){return t.getAttribute("selected")}).map(function(t){return t.getAttribute("value")})},render:function(){var t;this.element.node.addEventListener("change",bh,!1),t=this.root.viewmodel.get(this.keypath),void 0===t&&this.handleChange()},unrender:function(){this.element.node.removeEventListener("change",bh,!1)},setValue:function(){throw Error("TODO not implemented yet")},getValue:function(){var t,e,n,r,i,a;for(t=[],e=this.element.node.options,r=e.length,n=0;r>n;n+=1)i=e[n],i.selected&&(a=i._ractive?i._ractive.value:i.value,t.push(a));return t},handleChange:function(){var t,e,n;return t=this.attribute,e=t.value,n=this.getValue(),void 0!==e&&F(n,e)||Fh.prototype.handleChange.call(this),this},forceUpdate:function(){var t=this,e=this.getValue();void 0!==e&&(this.attribute.locked=!0,ms.scheduleTask(function(){return t.attribute.locked=!1}),this.root.viewmodel.set(this.keypath,e))},updateModel:function(){void 0!==this.attribute.value&&this.attribute.value.length||this.root.viewmodel.set(this.keypath,this.initialValue)}}),Rh=Mh,Lh=gh.extend({render:function(){this.element.node.addEventListener("change",bh,!1)},unrender:function(){this.element.node.removeEventListener("change",bh,!1)},getValue:function(){return this.element.node.files}}),Ih=Lh,Dh=yh.extend({getInitialValue:function(){},getValue:function(){var t=parseFloat(this.element.node.value);return isNaN(t)?void 0:t}}),Uh=cr,Vh=pr,Bh=hr,qh=fr,zh=dr,Hh=/^event(?:\.(.+))?/,Wh=br,$h=yr,Gh={},Kh={touchstart:!0,touchmove:!0,touchend:!0,touchcancel:!0,touchleave:!0},Qh=xr,Yh=_r,Jh=kr,Zh=Er,Xh=Tr,tf=function(t,e,n){this.init(t,e,n)};tf.prototype={bubble:Vh,fire:Bh,getAction:qh,init:zh,listen:$h,rebind:Qh,render:Yh,resolve:Jh,unbind:Zh,unrender:Xh};var ef=tf,nf=function(t,e){var n,r,i,a,o=[];for(r in e)if(e.hasOwnProperty(r))for(i=r.split("-"),n=i.length;n--;)a=new ef(t,i[n],e[r]),o.push(a);return o},rf=function(t,e){var n,r,i,a=this;this.element=t,this.root=n=t.root,r=e.n||e,("string"==typeof r||(i=new ev({template:r,root:n,owner:t}),r=""+i,i.unbind(),""!==r))&&(e.a?this.params=e.a:e.d&&(this.fragment=new ev({template:e.d,root:n,owner:t}),this.params=this.fragment.getArgsList(),this.fragment.bubble=function(){this.dirtyArgs=this.dirtyValue=!0,a.params=this.getArgsList(),a.ready&&a.update()}),this.fn=g("decorators",n,r),this.fn||p(Ro(r,"decorator")))};rf.prototype={init:function(){var t,e,n;if(t=this.element.node,this.params?(n=[t].concat(this.params),e=this.fn.apply(this.root,n)):e=this.fn.call(this.root,t),!e||!e.teardown)throw Error("Decorator definition must return an object with a teardown method");this.actual=e,this.ready=!0},update:function(){this.actual.update?this.actual.update.apply(this.root,this.params):(this.actual.teardown(!0),this.init())},rebind:function(t,e){this.fragment&&this.fragment.rebind(t,e)},teardown:function(t){this.torndown=!0,this.ready&&this.actual.teardown(),!t&&this.fragment&&this.fragment.unbind()}};var af,of,sf,uf=rf,cf=Nr,lf=Fr,pf=Ur,hf=function(t){return t.replace(/-([a-zA-Z])/g,function(t,e){return e.toUpperCase()})};Za?(of={},sf=lo("div").style,af=function(t){var e,n,r;if(t=hf(t),!of[t])if(void 0!==sf[t])of[t]=t;else for(r=t.charAt(0).toUpperCase()+t.substring(1),e=io.length;e--;)if(n=io[e],void 0!==sf[n+r]){of[t]=n+r;break}return of[t]}):af=null;var ff,df,mf=af;Za?(df=window.getComputedStyle||ko.getComputedStyle,ff=function(t){var e,n,r,i,o;if(e=df(this.node),"string"==typeof t)return o=e[mf(t)],"0px"===o&&(o=0),o;if(!a(t))throw Error("Transition$getStyle must be passed a string, or an array of strings representing CSS properties");for(n={},r=t.length;r--;)i=t[r],o=e[mf(i)],"0px"===o&&(o=0),n[i]=o;return n}):ff=null;var vf=ff,gf=function(t,e){var n;if("string"==typeof t)this.node.style[mf(t)]=e;else for(n in t)t.hasOwnProperty(n)&&(this.node.style[mf(n)]=t[n]);return this},bf=function(t){var e;this.duration=t.duration,this.step=t.step,this.complete=t.complete,"string"==typeof t.easing?(e=t.root.easing[t.easing],e||(v(Ro(t.easing,"easing")),e=Vr)):e="function"==typeof t.easing?t.easing:Vr,this.easing=e,this.start=Xo(),this.end=this.start+this.duration,this.running=!0,bs.add(this)};bf.prototype={tick:function(t){var e,n;return this.running?t>this.end?(this.step&&this.step(1),this.complete&&this.complete(1),!1):(e=t-this.start,n=this.easing(e/this.duration),this.step&&this.step(n),!0):!1},stop:function(){this.abort&&this.abort(),this.running=!1}};var yf,wf,xf,_f,kf,Ef,Tf,Cf,Of=bf,Sf=RegExp("^-(?:"+io.join("|")+")-"),Af=function(t){return t.replace(Sf,"")},Pf=RegExp("^(?:"+io.join("|")+")([A-Z])"),jf=function(t){var e;return t?(Pf.test(t)&&(t="-"+t),e=t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})):""},Nf={},Ff={};Za?(wf=lo("div").style,function(){void 0!==wf.transition?(xf="transition",_f="transitionend",kf=!0):void 0!==wf.webkitTransition?(xf="webkitTransition",_f="webkitTransitionEnd",kf=!0):kf=!1}(),xf&&(Ef=xf+"Duration",Tf=xf+"Property",Cf=xf+"TimingFunction"),yf=function(t,e,n,r,i){setTimeout(function(){var a,o,s,u,c;u=function(){o&&s&&(t.root.fire(t.name+":end",t.node,t.isIntro),i())},a=(t.node.namespaceURI||"")+t.node.tagName,t.node.style[Tf]=r.map(mf).map(jf).join(","),t.node.style[Cf]=jf(n.easing||"linear"),t.node.style[Ef]=n.duration/1e3+"s",c=function(e){var n;n=r.indexOf(hf(Af(e.propertyName))),-1!==n&&r.splice(n,1),r.length||(t.node.removeEventListener(_f,c,!1),s=!0,u())},t.node.addEventListener(_f,c,!1),setTimeout(function(){for(var i,l,p,h,f,d=r.length,v=[];d--;)h=r[d],i=a+h,kf&&!Ff[i]&&(t.node.style[mf(h)]=e[h],Nf[i]||(l=t.getStyle(h),Nf[i]=t.getStyle(h)!=e[h],Ff[i]=!Nf[i],Ff[i]&&(t.node.style[mf(h)]=l))),(!kf||Ff[i])&&(void 0===l&&(l=t.getStyle(h)),p=r.indexOf(h),-1===p?m("Something very strange happened with transitions. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!",{node:t.node}):r.splice(p,1),f=/[^\d]*$/.exec(e[h])[0],v.push({name:mf(h),interpolator:Io(parseFloat(l),parseFloat(e[h])),suffix:f}));v.length?new Of({root:t.root,duration:n.duration,easing:hf(n.easing||""),step:function(e){var n,r;for(r=v.length;r--;)n=v[r],t.node.style[n.name]=n.interpolator(e)+n.suffix},complete:function(){o=!0,u()}}):o=!0,r.length||(t.node.removeEventListener(_f,c,!1),s=!0,u())},0)},n.delay||0)}):yf=null;var Mf,Rf,Lf,If,Df,Uf=yf;if("undefined"!=typeof document){if(Mf="hidden",Df={},Mf in document)Lf="";else for(If=io.length;If--;)Rf=io[If],Mf=Rf+"Hidden",Mf in document&&(Lf=Rf);void 0!==Lf?(document.addEventListener(Lf+"visibilitychange",Br),Br()):("onfocusout"in document?(document.addEventListener("focusout",qr),document.addEventListener("focusin",zr)):(window.addEventListener("pagehide",qr),window.addEventListener("blur",qr),window.addEventListener("pageshow",zr),window.addEventListener("focus",zr)),Df.hidden=!1)}var Vf,Bf,qf,zf=Df;Za?(Bf=window.getComputedStyle||ko.getComputedStyle,Vf=function(t,e,n){var r,i=this;if(4===arguments.length)throw Error("t.animateStyle() returns a promise - use .then() instead of passing a callback");if(zf.hidden)return this.setStyle(t,e),qf||(qf=os.resolve());"string"==typeof t?(r={},r[t]=e):(r=t,n=e),n||(v('The "%s" transition does not supply an options object to `t.animateStyle()`. This will break in a future version of Ractive. For more info see https://github.com/RactiveJS/Ractive/issues/340',this.name),n=this);var a=new os(function(t){var e,a,o,s,u,c,l;if(!n.duration)return i.setStyle(r),void t();for(e=Object.keys(r),a=[],o=Bf(i.node),u={},c=e.length;c--;)l=e[c],s=o[mf(l)],"0px"===s&&(s=0),s!=r[l]&&(a.push(l),i.node.style[mf(l)]=s);return a.length?void Uf(i,r,n,a,t):void t()});return a}):Vf=null;var Hf=Vf,Wf=function(t,e){return"number"==typeof t?t={duration:t}:"string"==typeof t?t="slow"===t?{duration:600}:"fast"===t?{duration:200}:{duration:400}:t||(t={}),i({},t,e)},$f=Hr,Gf=function(t,e,n){this.init(t,e,n)};Gf.prototype={init:pf,start:$f,getStyle:vf,setStyle:gf,animateStyle:Hf,processParams:Wf};var Kf,Qf,Yf=Gf,Jf=$r;Kf=function(){var t=this.node,e=this.fragment.toString(!1);if(window&&window.appearsToBeIELessEqual8&&(t.type="text/css"),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}},Qf=function(){this.node.type&&"text/javascript"!==this.node.type||m("Script tag was updated. This does not cause the code to be re-evaluated!",{ractive:this.root}),this.node.text=this.fragment.toString(!1)};var Zf=function(){var t,e;return this.template.y?"":(t="<"+this.template.e,t+=this.attributes.map(Zr).join("")+this.conditionalAttributes.map(Zr).join(""),"option"===this.name&&Yr(this)&&(t+=" selected"),"input"===this.name&&Jr(this)&&(t+=" checked"),t+=">","textarea"===this.name&&void 0!==this.getAttribute("value")?t+=Ee(this.getAttribute("value")):void 0!==this.getAttribute("contenteditable")&&(t+=this.getAttribute("value")||""),this.fragment&&(e="script"!==this.name&&"style"!==this.name,t+=this.fragment.toString(e)),nl.test(this.template.e)||(t+=""),t)},Xf=Xr,td=ti,ed=function(t){this.init(t)};ed.prototype={bubble:Op,detach:Sp,find:Ap,findAll:Pp,findAllComponents:jp,findComponent:Np,findNextNode:Fp,firstNode:Mp,getAttribute:Rp,init:cf,rebind:lf,render:Jf,toString:Zf,unbind:Xf,unrender:td};var nd=ed,rd=/^\s*$/,id=/^\s*/,ad=function(t){var e,n,r,i;return e=t.split("\n"),n=e[0],void 0!==n&&rd.test(n)&&e.shift(),r=R(e),void 0!==r&&rd.test(r)&&e.pop(),i=e.reduce(ni,null),i&&(t=e.map(function(t){return t.replace(i,"")}).join("\n")),t},od=ri,sd=function(t,e){var n;return e?n=t.split("\n").map(function(t,n){return n?e+t:t}).join("\n"):t},ud='Could not find template for partial "%s"',cd=function(t){var e,n;e=this.parentFragment=t.parentFragment,this.root=e.root,this.type=Tc,this.index=t.index,this.name=t.template.r,this.rendered=!1,this.fragment=this.fragmentToRender=this.fragmentToUnrender=null,Vl.init(this,t),this.keypath||((n=od(this.root,this.name,e))?(gl.call(this),this.isNamed=!0,this.setTemplate(n)):v(ud,this.name))};cd.prototype={bubble:function(){this.parentFragment.bubble()},detach:function(){return this.fragment.detach()},find:function(t){return this.fragment.find(t)},findAll:function(t,e){return this.fragment.findAll(t,e)},findComponent:function(t){return this.fragment.findComponent(t)},findAllComponents:function(t,e){return this.fragment.findAllComponents(t,e)},firstNode:function(){return this.fragment.firstNode()},findNextNode:function(){return this.parentFragment.findNextNode(this)},getPartialName:function(){return this.isNamed&&this.name?this.name:void 0===this.value?this.name:this.value},getValue:function(){ -return this.fragment.getValue()},rebind:function(t,e){this.isNamed||Ul.call(this,t,e),this.fragment&&this.fragment.rebind(t,e)},render:function(){return this.docFrag=document.createDocumentFragment(),this.update(),this.rendered=!0,this.docFrag},resolve:Vl.resolve,setValue:function(t){var e;(void 0===t||t!==this.value)&&(void 0!==t&&(e=od(this.root,""+t,this.parentFragment)),!e&&this.name&&(e=od(this.root,this.name,this.parentFragment))&&(gl.call(this),this.isNamed=!0),e||v(ud,this.name,{ractive:this.root}),this.value=t,this.setTemplate(e||[]),this.bubble(),this.rendered&&ms.addView(this))},setTemplate:function(t){this.fragment&&(this.fragment.unbind(),this.rendered&&(this.fragmentToUnrender=this.fragment)),this.fragment=new ev({template:t,root:this.root,owner:this,pElement:this.parentFragment.pElement}),this.fragmentToRender=this.fragment},toString:function(t){var e,n,r,i;return e=this.fragment.toString(t),n=this.parentFragment.items[this.index-1],n&&n.type===wc?(r=n.text.split("\n").pop(),(i=/^\s+$/.exec(r))?sd(e,i[0]):e):e},unbind:function(){this.isNamed||gl.call(this),this.fragment&&this.fragment.unbind()},unrender:function(t){this.rendered&&(this.fragment&&this.fragment.unrender(t),this.rendered=!1)},update:function(){var t,e;this.fragmentToUnrender&&(this.fragmentToUnrender.unrender(!0),this.fragmentToUnrender=null),this.fragmentToRender&&(this.docFrag.appendChild(this.fragmentToRender.render()),this.fragmentToRender=null),this.rendered&&(t=this.parentFragment.getNode(),e=this.parentFragment.findNextNode(this),t.insertBefore(this.docFrag,e))}};var ld,pd,hd,fd=cd,dd=ui,md=ci,vd=new ns("detach"),gd=li,bd=pi,yd=hi,wd=fi,xd=di,_d=mi,kd=function(t,e,n,r){var i=t.root,a=t.keypath;r?i.viewmodel.smartUpdate(a,e,r):i.viewmodel.mark(a)},Ed=[],Td=["pop","push","reverse","shift","sort","splice","unshift"];Td.forEach(function(t){var e=function(){for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];var i,a,o,s;for(i=mu(this,t,n),a=Array.prototype[t].apply(this,arguments),ms.start(),this._ractive.setting=!0,s=this._ractive.wrappers.length;s--;)o=this._ractive.wrappers[s],ms.addRactive(o.root),kd(o,this,t,i);return ms.end(),this._ractive.setting=!1,a};xo(Ed,t,{value:e})}),ld={},ld.__proto__?(pd=function(t){t.__proto__=Ed},hd=function(t){t.__proto__=Array.prototype}):(pd=function(t){var e,n;for(e=Td.length;e--;)n=Td[e],xo(t,n,{value:Ed[n],configurable:!0})},hd=function(t){var e;for(e=Td.length;e--;)delete t[Td[e]]}),pd.unpatch=hd;var Cd,Od,Sd,Ad=pd;Cd={filter:function(t){return a(t)&&(!t._ractive||!t._ractive.setting)},wrap:function(t,e,n){return new Od(t,e,n)}},Od=function(t,e,n){this.root=t,this.value=e,this.keypath=E(n),e._ractive||(xo(e,"_ractive",{value:{wrappers:[],instances:[],setting:!1},configurable:!0}),Ad(e)),e._ractive.instances[t._guid]||(e._ractive.instances[t._guid]=0,e._ractive.instances.push(t)),e._ractive.instances[t._guid]+=1,e._ractive.wrappers.push(this)},Od.prototype={get:function(){return this.value},teardown:function(){var t,e,n,r,i;if(t=this.value,e=t._ractive,n=e.wrappers,r=e.instances,e.setting)return!1;if(i=n.indexOf(this),-1===i)throw Error(Sd);if(n.splice(i,1),n.length){if(r[this.root._guid]-=1,!r[this.root._guid]){if(i=r.indexOf(this.root),-1===i)throw Error(Sd);r.splice(i,1)}}else delete t._ractive,Ad.unpatch(this.value)}},Sd="Something went wrong in a rather interesting way";var Pd,jd,Nd=Cd,Fd=/^\s*[0-9]+\s*$/,Md=function(t){return Fd.test(t)?[]:{}};try{Object.defineProperty({},"test",{value:0}),Pd={filter:function(t,e,n){var r,i;return e?(e=E(e),(r=n.viewmodel.wrapped[e.parent.str])&&!r.magic?!1:(i=n.viewmodel.get(e.parent),a(i)&&/^[0-9]+$/.test(e.lastKey)?!1:i&&("object"==typeof i||"function"==typeof i))):!1},wrap:function(t,e,n){return new jd(t,e,n)}},jd=function(t,e,n){var r,i,a;return n=E(n),this.magic=!0,this.ractive=t,this.keypath=n,this.value=e,this.prop=n.lastKey,r=n.parent,this.obj=r.isRoot?t.viewmodel.data:t.viewmodel.get(r),i=this.originalDescriptor=Object.getOwnPropertyDescriptor(this.obj,this.prop),i&&i.set&&(a=i.set._ractiveWrappers)?void(-1===a.indexOf(this)&&a.push(this)):void vi(this,e,i)},jd.prototype={get:function(){return this.value},reset:function(t){return this.updating?void 0:(this.updating=!0,this.obj[this.prop]=t,ms.addRactive(this.ractive),this.ractive.viewmodel.mark(this.keypath,{keepExistingWrapper:!0}),this.updating=!1,!0)},set:function(t,e){this.updating||(this.obj[this.prop]||(this.updating=!0,this.obj[this.prop]=Md(t),this.updating=!1),this.obj[this.prop][t]=e)},teardown:function(){var t,e,n,r,i;return this.updating?!1:(t=Object.getOwnPropertyDescriptor(this.obj,this.prop),e=t&&t.set,void(e&&(r=e._ractiveWrappers,i=r.indexOf(this),-1!==i&&r.splice(i,1),r.length||(n=this.obj[this.prop],Object.defineProperty(this.obj,this.prop,this.originalDescriptor||{writable:!0,enumerable:!0,configurable:!0}),this.obj[this.prop]=n))))}}}catch(Eo){Pd=!1}var Rd,Ld,Id=Pd;Id&&(Rd={filter:function(t,e,n){return Id.filter(t,e,n)&&Nd.filter(t)},wrap:function(t,e,n){return new Ld(t,e,n)}},Ld=function(t,e,n){this.value=e,this.magic=!0,this.magicWrapper=Id.wrap(t,e,n),this.arrayWrapper=Nd.wrap(t,e,n)},Ld.prototype={get:function(){return this.value},teardown:function(){this.arrayWrapper.teardown(),this.magicWrapper.teardown()},reset:function(t){return this.magicWrapper.reset(t)}});var Dd=Rd,Ud=gi,Vd={},Bd=wi,qd=xi,zd=Ei,Hd=Ai,Wd=Pi,$d=function(t,e){this.computation=t,this.viewmodel=t.viewmodel,this.ref=e,this.root=this.viewmodel.ractive,this.parentFragment=this.root.component&&this.root.component.parentFragment};$d.prototype={resolve:function(t){this.computation.softDeps.push(t),this.computation.unresolvedDeps[t.str]=null,this.viewmodel.register(t,this.computation,"computed")}};var Gd=$d,Kd=function(t,e){this.key=t,this.getter=e.getter,this.setter=e.setter,this.hardDeps=e.deps||[],this.softDeps=[],this.unresolvedDeps={},this.depValues={},this._dirty=this._firstRun=!0};Kd.prototype={constructor:Kd,init:function(t){var e,n=this;this.viewmodel=t,this.bypass=!0,e=t.get(this.key),t.clearCache(this.key.str),this.bypass=!1,this.setter&&void 0!==e&&this.set(e),this.hardDeps&&this.hardDeps.forEach(function(e){return t.register(e,n,"computed")})},invalidate:function(){this._dirty=!0},get:function(){var t,e,n=this,r=!1;if(this.getting){var i="The "+this.key.str+" computation indirectly called itself. This probably indicates a bug in the computation. It is commonly caused by `array.sort(...)` - if that's the case, clone the array first with `array.slice().sort(...)`";return d(i),this.value}if(this.getting=!0,this._dirty){if(this._firstRun||!this.hardDeps.length&&!this.softDeps.length?r=!0:[this.hardDeps,this.softDeps].forEach(function(t){var e,i,a;if(!r)for(a=t.length;a--;)if(e=t[a],i=n.viewmodel.get(e),!s(i,n.depValues[e.str]))return n.depValues[e.str]=i,void(r=!0)}),r){this.viewmodel.capture();try{this.value=this.getter()}catch(a){m('Failed to compute "%s"',this.key.str),h(a.stack||a),this.value=void 0}t=this.viewmodel.release(),e=this.updateDependencies(t),e&&[this.hardDeps,this.softDeps].forEach(function(t){t.forEach(function(t){n.depValues[t.str]=n.viewmodel.get(t)})})}this._dirty=!1}return this.getting=this._firstRun=!1,this.value},set:function(t){if(this.setting)return void(this.value=t);if(!this.setter)throw Error("Computed properties without setters are read-only. (This may change in a future version of Ractive!)");this.setter(t)},updateDependencies:function(t){var e,n,r,i,a;for(n=this.softDeps,e=n.length;e--;)r=n[e],-1===t.indexOf(r)&&(i=!0,this.viewmodel.unregister(r,this,"computed"));for(e=t.length;e--;)r=t[e],-1!==n.indexOf(r)||this.hardDeps&&-1!==this.hardDeps.indexOf(r)||(i=!0,ji(this.viewmodel,r)&&!this.unresolvedDeps[r.str]?(a=new Gd(this,r.str),t.splice(e,1),this.unresolvedDeps[r.str]=a,ms.addUnresolved(a)):this.viewmodel.register(r,this,"computed"));return i&&(this.softDeps=t.slice()),i}};var Qd=Kd,Yd=Ni,Jd={FAILED_LOOKUP:!0},Zd=Fi,Xd={},tm=Ri,em=Li,nm=function(t,e){this.localKey=t,this.keypath=e.keypath,this.origin=e.origin,this.deps=[],this.unresolved=[],this.resolved=!1};nm.prototype={forceResolution:function(){this.keypath=this.localKey,this.setup()},get:function(t,e){return this.resolved?this.origin.get(this.map(t),e):void 0},getValue:function(){return this.keypath?this.origin.get(this.keypath):void 0},initViewmodel:function(t){this.local=t,this.setup()},map:function(t){return void 0===typeof this.keypath?this.localKey:t.replace(this.localKey,this.keypath)},register:function(t,e,n){this.deps.push({keypath:t,dep:e,group:n}),this.resolved&&this.origin.register(this.map(t),e,n)},resolve:function(t){void 0!==this.keypath&&this.unbind(!0),this.keypath=t,this.setup()},set:function(t,e){this.resolved||this.forceResolution(),this.origin.set(this.map(t),e)},setup:function(){var t=this;void 0!==this.keypath&&(this.resolved=!0,this.deps.length&&(this.deps.forEach(function(e){var n=t.map(e.keypath);if(t.origin.register(n,e.dep,e.group),e.dep.setValue)e.dep.setValue(t.origin.get(n));else{if(!e.dep.invalidate)throw Error("An unexpected error occurred. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!");e.dep.invalidate()}}),this.origin.mark(this.keypath)))},setValue:function(t){if(!this.keypath)throw Error("Mapping does not have keypath, cannot set value. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!");this.origin.set(this.keypath,t)},unbind:function(t){var e=this;t||delete this.local.mappings[this.localKey],this.resolved&&(this.deps.forEach(function(t){e.origin.unregister(e.map(t.keypath),t.dep,t.group)}),this.tracker&&this.origin.unregister(this.keypath,this.tracker))},unregister:function(t,e,n){var r,i;if(this.resolved){for(r=this.deps,i=r.length;i--;)if(r[i].dep===e){r.splice(i,1);break}this.origin.unregister(this.map(t),e,n)}}};var rm=Ii,im=function(t,e){var n,r,i,a;return n={},r=0,i=t.map(function(t,i){var o,s,u;s=r,u=e.length;do{if(o=e.indexOf(t,s),-1===o)return a=!0,-1;s=o+1}while(n[o]&&u>s);return o===r&&(r+=1),o!==i&&(a=!0),n[o]=!0,o})},am=Di,om={},sm=Bi,um=zi,cm=Hi,lm=Wi,pm=Gi,hm={implicit:!0},fm={noCascade:!0},dm=Qi,mm=Yi,vm=function(t){var e,n,r=t.adapt,i=t.data,a=t.ractive,o=t.computed,s=t.mappings;this.ractive=a,this.adaptors=r,this.onchange=t.onchange,this.cache={},this.cacheMap=wo(null),this.deps={computed:wo(null),"default":wo(null)},this.depsMap={computed:wo(null),"default":wo(null)},this.patternObservers=[],this.specials=wo(null),this.wrapped=wo(null),this.computations=wo(null),this.captureGroups=[],this.unresolvedImplicitDependencies=[],this.changes=[],this.implicitChanges={},this.noCascade={},this.data=i,this.mappings=wo(null);for(e in s)this.map(E(e),s[e]);if(i)for(e in i)(n=this.mappings[e])&&void 0===n.getValue()&&n.setValue(i[e]);for(e in o)s&&e in s&&p("Cannot map to a computed property ('%s')",e),this.compute(E(e),o[e]);this.ready=!0};vm.prototype={adapt:Ud,applyChanges:zd,capture:Hd,clearCache:Wd,compute:Yd,get:Zd,init:tm,map:em,mark:rm,merge:am,register:sm,release:um,reset:cm,set:lm,smartUpdate:pm,teardown:dm,unregister:mm};var gm=vm;Zi.prototype={constructor:Zi,begin:function(t){this.inProcess[t._guid]=!0},end:function(t){var e=t.parent;e&&this.inProcess[e._guid]?Xi(this.queue,e).push(t):ta(this,t),delete this.inProcess[t._guid]}};var bm=Zi,ym=ea,wm=/\$\{([^\}]+)\}/g,xm=new ns("construct"),_m=new ns("config"),km=new bm("init"),Em=0,Tm=["adaptors","components","decorators","easing","events","interpolators","partials","transitions"],Cm=aa,Om=la;la.prototype={bubble:function(){this.dirty||(this.dirty=!0,ms.addView(this))},update:function(){this.callback(this.fragment.getValue()),this.dirty=!1},rebind:function(t,e){this.fragment.rebind(t,e)},unbind:function(){this.fragment.unbind()}};var Sm=function(t,e,n,i,o){var s,u,c,l,p,h,f={},d={},v={},g=[];for(u=t.parentFragment,c=t.root,o=o||{},r(f,o),o.content=i||[],f[""]=o.content,e.defaults.el&&m("The <%s/> component has a default `el` property; it has been disregarded",t.name),l=u;l;){if(l.owner.type===Ac){p=l.owner.container;break}l=l.parent}return n&&Object.keys(n).forEach(function(e){var r,i,o=n[e];if("string"==typeof o)r=cl(o),d[e]=r?r.value:o;else if(0===o)d[e]=!0;else{if(!a(o))throw Error("erm wut");ha(o)?(v[e]={origin:t.root.viewmodel,keypath:void 0},i=pa(t,o[0],function(t){t.isSpecial?h?s.set(e,t.value):(d[e]=t.value,delete v[e]):h?s.viewmodel.mappings[e].resolve(t):v[e].keypath=t})):i=new Om(t,o,function(t){h?s.set(e,t):d[e]=t}),g.push(i)}}),s=wo(e.prototype),Cm(s,{el:null,append:!0,data:d,partials:o,magic:c.magic||e.defaults.magic,modifyArrays:c.modifyArrays,adapt:c.adapt},{parent:c,component:t,container:p,mappings:v,inlinePartials:f,cssIds:u.cssIds}),h=!0,t.resolvers=g,s},Am=fa,Pm=function(t){var e,n;for(e=t.root;e;)(n=e._liveComponentQueries["_"+t.name])&&n.push(t.instance),e=e.parent},jm=ma,Nm=va,Fm=ga,Mm=ba,Rm=ya,Lm=new ns("teardown"),Im=xa,Dm=function(t,e){this.init(t,e)};Dm.prototype={detach:md,find:gd,findAll:bd,findAllComponents:yd,findComponent:wd,findNextNode:xd,firstNode:_d,init:jm,rebind:Nm,render:Fm,toString:Mm,unbind:Rm,unrender:Im};var Um=Dm,Vm=function(t){this.type=Cc,this.value=t.template.c};Vm.prototype={detach:dl,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createComment(this.value)),this.node},toString:function(){return""},unrender:function(t){t&&this.node.parentNode.removeChild(this.node)}};var Bm=Vm,qm=function(t){var e,n;this.type=Ac,this.container=e=t.parentFragment.root,this.component=n=e.component,this.container=e,this.containerFragment=t.parentFragment,this.parentFragment=n.parentFragment;var r=this.name=t.template.n||"",i=e._inlinePartials[r];i||(m('Could not find template for partial "'+r+'"',{ractive:t.root}),i=[]),this.fragment=new ev({owner:this,root:e.parent,template:i,pElement:this.containerFragment.pElement}),a(n.yielders[r])?n.yielders[r].push(this):n.yielders[r]=[this],ms.scheduleTask(function(){if(n.yielders[r].length>1)throw Error("A component template can only have one {{yield"+(r?" "+r:"")+"}} declaration at a time")})};qm.prototype={detach:function(){return this.fragment.detach()},find:function(t){return this.fragment.find(t)},findAll:function(t,e){return this.fragment.findAll(t,e)},findComponent:function(t){return this.fragment.findComponent(t)},findAllComponents:function(t,e){return this.fragment.findAllComponents(t,e)},findNextNode:function(){return this.containerFragment.findNextNode(this)},firstNode:function(){return this.fragment.firstNode()},getValue:function(t){return this.fragment.getValue(t)},render:function(){return this.fragment.render()},unbind:function(){this.fragment.unbind()},unrender:function(t){this.fragment.unrender(t),L(this.component.yielders[this.name],this)},rebind:function(t,e){this.fragment.rebind(t,e)},toString:function(){return""+this.fragment}};var zm=qm,Hm=function(t){this.declaration=t.template.a};Hm.prototype={init:jo,render:jo,unrender:jo,teardown:jo,toString:function(){return""}};var Wm=Hm,$m=_a,Gm=Ea,Km=Ta,Qm=Ca,Ym=Aa,Jm=ja,Zm=function(t){this.init(t)};Zm.prototype={bubble:sc,detach:uc,find:cc,findAll:lc,findAllComponents:pc,findComponent:hc,findNextNode:fc,firstNode:dc,getArgsList:pl,getNode:hl,getValue:fl,init:$m,rebind:Gm,registerIndexRef:function(t){var e=this.registeredIndexRefs;-1===e.indexOf(t)&&e.push(t)},render:Km,toString:Qm,unbind:Ym,unregisterIndexRef:function(t){var e=this.registeredIndexRefs;e.splice(e.indexOf(t),1)},unrender:Jm};var Xm,tv,ev=Zm,nv=Na,rv=["template","partials","components","decorators","events"],iv=new ns("reset"),av=function(t,e){function n(e,r,i){i&&i.partials[t]||e.forEach(function(e){e.type===Tc&&e.getPartialName()===t&&r.push(e),e.fragment&&n(e.fragment.items,r,i),a(e.fragments)?n(e.fragments,r,i):a(e.items)?n(e.items,r,i):e.type===Sc&&e.instance&&n(e.instance.fragment.items,r,e.instance),e.type===Ec&&(a(e.attributes)&&n(e.attributes,r,i),a(e.conditionalAttributes)&&n(e.conditionalAttributes,r,i))})}var r,i=[];return n(this.fragment.items,i),this.partials[t]=e,r=ms.start(this,!0),i.forEach(function(e){e.value=void 0,e.setValue(t)}),ms.end(),r},ov=Fa,sv=gu("reverse"),uv=Ma,cv=gu("shift"),lv=gu("sort"),pv=gu("splice"),hv=La,fv=Ia,dv=new ns("teardown"),mv=Ua,vv=Va,gv=Ba,bv=new ns("unrender"),yv=gu("unshift"),wv=qa,xv=new ns("update"),_v=za,kv={add:Yo,animate:xs,detach:ks,find:Ts,findAll:Ms,findAllComponents:Rs,findComponent:Ls,findContainer:Is,findParent:Ds,fire:qs,get:zs,insert:Ws,merge:Gs,observe:uu,observeOnce:cu,off:hu,on:fu,once:du,pop:bu,push:yu,render:Ou,reset:nv,resetPartial:av,resetTemplate:ov,reverse:sv,set:uv,shift:cv,sort:lv,splice:pv,subtract:hv,teardown:fv,toggle:mv,toHTML:vv,toHtml:vv,unrender:gv,unshift:yv,update:wv,updateModel:_v},Ev=function(t,e,n){return n||Wa(t,e)?function(){var n,r="_super"in this,i=this._super;return this._super=e,n=t.apply(this,arguments),r&&(this._super=i),n}:t},Tv=$a,Cv=Ya,Ov=function(t){var e,n,r={};return t&&(e=t._ractive)?(r.ractive=e.root,r.keypath=e.keypath.str,r.index={},(n=Cl(e.proxy.parentFragment))&&(r.index=Cl.resolve(n)),r):r};Xm=function(t){return this instanceof Xm?void Cm(this,t):new Xm(t)},tv={DEBUG:{writable:!0,value:!0},DEBUG_PROMISES:{writable:!0,value:!0},extend:{value:Cv},getNodeInfo:{value:Ov},parse:{value:zu},Promise:{value:os},svg:{value:ro},magic:{value:eo},VERSION:{value:"0.7.3"},adaptors:{writable:!0,value:{}},components:{writable:!0,value:{}},decorators:{writable:!0,value:{}},easing:{writable:!0,value:uo},events:{writable:!0,value:{}},interpolators:{writable:!0,value:Uo},partials:{writable:!0,value:{}},transitions:{writable:!0,value:{}}},_o(Xm,tv),Xm.prototype=r(kv,so),Xm.prototype.constructor=Xm,Xm.defaults=Xm.prototype;var Sv="function";if(typeof Date.now!==Sv||typeof String.prototype.trim!==Sv||typeof Object.keys!==Sv||typeof Array.prototype.indexOf!==Sv||typeof Array.prototype.forEach!==Sv||typeof Array.prototype.map!==Sv||typeof Array.prototype.filter!==Sv||"undefined"!=typeof window&&typeof window.addEventListener!==Sv)throw Error("It looks like you're attempting to use Ractive.js in an older browser. You'll need to use one of the 'legacy builds' in order to continue - see http://docs.ractivejs.org/latest/legacy-builds for more information.");var Av=Xm;return Av})},{}],8:[function(t,e,n){!function(){function t(t,e,n){return t.call.apply(t.bind,arguments)}function n(t,e,n){if(!t)throw Error();if(2r;r++)if(n[r]==e)return!0;return!1}function u(t){if("string"==typeof t.fa)return t.fa;var e=t.k.location.protocol;return"about:"==e&&(e=t.F.location.protocol),"https:"==e?"https:":"http:"}function c(t,e,n){function r(){u&&i&&o&&(u(s),u=null)}e=t.createElement("link",{rel:"stylesheet",href:e,media:"all"});var i=!1,o=!0,s=null,u=n||null;Z?(e.onload=function(){i=!0,r()},e.onerror=function(){i=!0,s=Error("Stylesheet failed to load"),r()}):setTimeout(function(){i=!0,r()},0),a(t,"head",e)}function l(t,e,n,r){var i=t.H.getElementsByTagName("head")[0];if(i){var a=t.createElement("script",{src:e}),o=!1;return a.onload=a.onreadystatechange=function(){o||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(o=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&i.removeChild(a))},i.appendChild(a),setTimeout(function(){o||(o=!0,n&&n(Error("Script load timeout")))},r||5e3),a}return null}function p(){this.S=0,this.K=null}function h(t){return t.S++,function(){t.S--,d(t)}}function f(t,e){t.K=e,d(t)}function d(t){0==t.S&&t.K&&(t.K(),t.K=null)}function m(t){this.ea=t||"-"}function v(t,e){this.Q=t,this.M=4,this.L="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.L=n[1],this.M=parseInt(n[2],10))}function g(t){return w(t)+" "+(t.M+"00")+" 300px "+b(t.Q)}function b(t){var e=[];t=t.split(/,\s*/);for(var n=0;nparseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return tt}function M(t,e,n){for(var r in X)if(X.hasOwnProperty(r)&&e===t.s[X[r]]&&n===t.s[X[r]])return!0;return!1}function R(t){var e,n=t.w.m.offsetWidth,r=t.A.m.offsetWidth;(e=n===t.s.serif&&r===t.s["sans-serif"])||(e=F()&&M(t,n,r)),e?J()-t.ga>=t.v?F()&&M(t,n,r)&&(null===t.Z||t.Z.hasOwnProperty(t.g.getName()))?I(t,t.G):I(t,t.J):L(t):I(t,t.G)}function L(t){setTimeout(r(function(){R(this)},t),50)}function I(t,e){setTimeout(r(function(){this.w.remove(),this.A.remove(),this.C.remove(),this.D.remove(),e(this.g)},t),0)}function D(t,e,n){this.a=t,this.p=e,this.P=0,this.ba=this.Y=!1,this.v=n}function U(t){0==--t.P&&t.Y&&(t.ba?(t=t.p,t.u&&o(t.j,[t.e.d(t.f,"active")],[t.e.d(t.f,"loading"),t.e.d(t.f,"inactive")]),T(t,"active")):E(t.p))}function V(t){this.F=t,this.q=new C,this.$=0,this.T=this.U=!0}function B(t,e,n,i,a){var s=0==--t.$;(t.T||t.U)&&setTimeout(function(){var t=a||null,u=i||null||{};if(0===n.length&&s)E(e.p);else{e.P+=n.length,s&&(e.Y=s);var c,l=[];for(c=0;ce;e++)r[e].load(function(e,n,r){B(t,a,e,n,r)})}function z(t,e,n){this.N=t?t:e+nt,this.o=[],this.R=[],this.ca=n||""}function H(t,e){for(var n=e.length,r=0;n>r;r++){var i=e[r].split(":");3==i.length&&t.R.push(i.pop());var a="";2==i.length&&""!=i[1]&&(a=":"),t.o.push(i.join(a))}}function W(t){this.o=t,this.aa=[],this.I={}}function $(t,e){this.a=t,this.c=e}function G(t,e){this.a=t,this.c=e,this.X=[]}function K(t,e){this.a=t,this.c=e}function Q(t,e){this.a=t,this.c=e}function Y(t,e){this.a=t,this.c=e}var J=Date.now||function(){return+new Date},Z=!!window.FontFace;i.prototype.createElement=function(t,e,n){if(t=this.H.createElement(t),e)for(var r in e)e.hasOwnProperty(r)&&("style"==r?t.style.cssText=e[r]:t.setAttribute(r,e[r]));return n&&t.appendChild(this.H.createTextNode(n)),t},m.prototype.d=function(t){for(var e=[],n=0;n=n.v?n.J(n.g):e.fonts.load(g(n.g),n.h).then(function(e){1<=e.length?n.G(n.g):setTimeout(t,25)},function(){n.J(n.g)})}var e=this.a.k.document,n=this,r=J();t()};var X={ia:"serif",ha:"sans-serif"},tt=null;N.prototype.start=function(){this.s.serif=this.C.m.offsetWidth,this.s["sans-serif"]=this.D.m.offsetWidth,this.ga=J(),R(this)};var et=null;D.prototype.V=function(t){var e=this.p;e.u&&o(e.j,[e.e.d(e.f,t.getName(),""+y(t),"active")],[e.e.d(e.f,t.getName(),""+y(t),"loading"),e.e.d(e.f,t.getName(),""+y(t),"inactive")]),T(e,"fontactive",t),this.ba=!0,U(this)},D.prototype.W=function(t){var e=this.p;if(e.u){var n=s(e.j,e.e.d(e.f,t.getName(),""+y(t),"active")),r=[],i=[e.e.d(e.f,t.getName(),""+y(t),"loading")];n||r.push(e.e.d(e.f,t.getName(),""+y(t),"inactive")),o(e.j,r,i)}T(e,"fontinactive",t),U(this)},V.prototype.load=function(t){this.a=new i(this.F,t.context||this.F),this.U=!1!==t.events,this.T=!1!==t.classes,q(this,new _(this.a,t),t)};var nt="//fonts.googleapis.com/css";z.prototype.d=function(){if(0==this.o.length)throw Error("No fonts to load!");if(-1!=this.N.indexOf("kit="))return this.N;for(var t=this.o.length,e=[],n=0;t>n;n++)e.push(this.o[n].replace(/ /g,"+"));return t=this.N+"?family="+e.join("%7C"),0e;e++){var n=this.o[e].split(":"),r=n[0].replace(/\+/g," "),i=["n4"];if(2<=n.length){var a,o=n[1];if(a=[],o)for(var o=o.split(","),s=o.length,u=0;s>u;u++){var c;if(c=o[u],c.match(/^[\w-]+$/))if(c=ot.exec(c.toLowerCase()),null==c)c="";else{var l;if(l=c[1],null==l||""==l)l="4";else{var p=it[l];l=p?p:isNaN(l)?"4":l.substr(0,1)}c=c[2],c=""+(null==c||""==c?"n":at[c])+l}else c="";c&&a.push(c)}0i;++i){var o=n.fonts[i];r.X.push(new v(o.name,x("font-weight:"+o.weight+";font-style:"+o.style)))}t(r.X)},l(this.a,this.B(e),function(e){e&&t([])})):t([])},K.prototype.B=function(t){return(this.c.api||"https://use.typekit.net")+"/"+t+".js"},K.prototype.load=function(t){var e=this.c.id,n=this.a.k;e?l(this.a,this.B(e),function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var r=[],i=0;ie;e++)c(this.a,r[e],h(o));var s=[];for(e=0,n=i.length;n>e;e++)if(r=i[e].split(":"),r[1])for(var u=r[1].split(","),l=0;l50?"good":t>25?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[31,1,988],t:7,e:"n-notice",f:[{t:4,f:[{p:[33,5,1032],t:7,e:"n-section",a:{label:"Interface Lock"},f:[{p:[34,7,1074],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.locked"],s:'_0?"lock":"unlock"'},p:[34,23,1090]}],action:"lock"},f:[{t:2,x:{r:["data.locked"],s:'_0?"Engaged":"Disengaged"'},p:[34,74,1141]}]}]}],n:50,r:"data.siliconUser",p:[32,3,1002]},{t:4,n:51,f:[{p:[37,5,1230],t:7,e:"span",f:["Swipe an ID card to ",{t:2,x:{r:["data.locked"],s:'_0?"unlock":"lock"'},p:[37,31,1256]}," this interface."]}],r:"data.siliconUser"}]}," ",{p:[40,1,1340],t:7,e:"n-display",a:{title:"Power Status"},f:[{p:[41,3,1376],t:7,e:"n-section",a:{label:"Main Breaker"},f:[{t:4,f:[{p:[43,7,1462],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.isOperating"],s:'_0?"good":"bad"'},p:[43,20,1475]}]},f:[{t:2,x:{r:["data.isOperating"],s:'_0?"On":"Off"'},p:[43,59,1514]}]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"},p:[42,5,1414]},{t:4,n:51,f:[{p:[45,7,1578],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isOperating"],s:'_0?"power-off":"close"'},p:[45,23,1594]}],style:[{t:2,x:{r:["data.isOperating"],s:'_0?"selected":null'},p:[45,76,1647]}],action:"breaker"},f:[{t:2,x:{r:["data.isOperating"],s:'_0?"On":"Off"'},p:[46,26,1715]}]}],x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"}}]}," ",{p:[49,3,1794],t:7,e:"n-section",a:{label:"External Power"},f:[{p:[50,5,1834],t:7,e:"span",a:{"class":[{t:2,x:{r:["powerState","data.externalPower"],s:"_0(_1)"},p:[50,18,1847]}]},f:[{t:2,x:{r:["data.externalPower"],s:'_0==2?"Good":_0==1?"Low":"None"'},p:[50,54,1883]}]}]}," ",{p:[52,3,1989],t:7,e:"n-section",a:{label:"Power Cell"},f:[{t:4,f:[{p:[54,7,2069],t:7,e:"n-bar",a:{min:"0",max:"100",value:[{t:2,r:"data.powerCellStatus",p:[54,39,2101]}],state:[{t:2,r:"powerCellStatusState",p:[54,72,2134]}]},f:[{t:2,x:{r:["adata.powerCellStatus"],s:"Math.fixed(_0)"},p:[54,98,2160]},"%"]}],n:50,x:{r:["data.powerCellStatus"],s:"_0!=null"},p:[53,5,2025]},{t:4,n:51,f:[{p:[56,7,2228],t:7,e:"span",a:{"class":"bad"},f:["Power cell removed."]}],x:{r:["data.powerCellStatus"],s:"_0!=null"}}]}," ",{t:4,f:[{p:[60,5,2347],t:7,e:"n-section",a:{label:"Charge Mode"},f:[{t:4,f:[{p:[62,9,2436],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.chargeMode"],s:'_0?"good":"bad"'},p:[62,22,2449]}]},f:[{t:2,x:{r:["data.chargeMode"],s:'_0?"Auto":"Off"'},p:[62,60,2487]}]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"},p:[61,7,2386]},{t:4,n:51,f:[{p:[64,9,2556],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.chargeMode"],s:'_0?"refresh":"close"'},p:[64,25,2572]}],style:[{t:2,x:{r:["data.chargeMode"],s:'_0?"selected":null'},p:[64,75,2622]}],action:"charge"},f:[{t:2,x:{r:["data.chargeMode"],s:'_0?"Auto":"Off"'},p:[65,27,2690]}]}],x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"}}," [",{p:[68,8,2775],t:7,e:"span",a:{"class":[{t:2,x:{r:["powerState","data.chargingStatus"],s:"_0(_1)"},p:[68,21,2788]}]},f:[{t:2,x:{r:["data.chargingStatus"],s:'_0==2?"Fully Charged":_0==1?"Charging":"Not Charging"'},p:[68,58,2825]}]},"]"]}],n:50,x:{r:["data.powerCellStatus"],s:"_0!=null"},p:[59,3,2305]}]}," ",{p:[72,1,2981],t:7,e:"n-display",a:{title:"Power Channels"},f:[{t:4,f:[{p:[74,5,3054],t:7,e:"n-section",a:{label:[{t:2,r:"title",p:[74,23,3072]}],nowrap:0},f:[{p:[75,7,3098],t:7,e:"div",a:{"class":"content"},f:[{t:2,x:{r:["powerLoad"],s:"Math.round(_0)"},p:[75,28,3119]}," W"]}," ",{p:[76,7,3160],t:7,e:"div",a:{"class":"content"},f:[{p:[76,28,3181],t:7,e:"span",a:{"class":[{t:2,x:{r:["status"],s:'_0>=2?"good":"bad"'},p:[76,41,3194]}]},f:[{t:2,x:{r:["status"],s:'_0>=2?"On":"Off"'},p:[76,75,3228]}]}]}," ",{p:[77,7,3279],t:7,e:"div",a:{"class":"content"},f:["[",{p:[77,29,3301],t:7,e:"span",f:[{t:2,x:{r:["status"],s:'_0==1||_0==3?"Auto":"Manual"'},p:[77,35,3307]}]},"]"]}," ",{p:[78,7,3379],t:7,e:"div",a:{"class":"content",style:"float:right"},f:[{t:4,f:[{p:[80,11,3482],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["status"],s:'_0==1||_0==3?"selected":null'},p:[80,43,3514]}],action:"channel",params:[{t:2,r:"topicParams.auto",p:[81,38,3604]}]},f:["Auto"]}," ",{p:[82,11,3653],t:7,e:"n-button",a:{icon:"power-off",state:[{t:2,x:{r:["status"],s:'_0==2?"selected":null'},p:[82,45,3687]}],action:"channel",params:[{t:2,r:"topicParams.on",p:[83,21,3762]}]},f:["On"]}," ",{p:[84,11,3807],t:7,e:"n-button",a:{icon:"close",state:[{t:2,x:{r:["status"],s:'_0==0?"selected":null'},p:[84,41,3837]}],action:"channel",params:[{t:2,r:"topicParams.off",p:[85,21,3912]}]},f:["Off"]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"!_0||_1"},p:[79,9,3430]}]}]}],n:52,r:"adata.powerChannels",p:[73,3,3019]}," ",{p:[90,3,4013],t:7,e:"n-section",a:{label:"Total Load"},f:[{p:[91,5,4049],t:7,e:"span",a:{"class":"bold"},f:[{t:2,x:{r:["adata.totalLoad"],s:"Math.round(_0)"},p:[91,24,4068]}," W"]}]}]}," ",{t:4,f:[{p:[95,3,4168],t:7,e:"n-display",a:{title:"System Overrides"},f:[{p:[96,5,4210],t:7,e:"n-button",a:{icon:"lightbulb-o",action:"overload"},f:["Overload"]}," ",{t:4,f:[{p:[98,7,4313],t:7,e:"n-button",a:{icon:[{t:2,r:"malfIcon",p:[98,23,4329]}],state:[{t:2,x:{r:["data.malfStatus"],s:'_0==4?"disabled":null'},p:[98,44,4350]}],action:[{t:2,r:"malfAction",p:[98,98,4404]}]},f:[{t:2,r:"malfButton",p:[98,114,4420]}]}],n:50,r:"data.malfStatus",p:[97,5,4282]}]}],n:50,r:"data.siliconUser",p:[94,1,4140]},{p:[102,1,4485],t:7,e:"n-notice",f:[{p:[103,3,4499],t:7,e:"n-section",a:{label:"Cover Lock"},f:[{t:4,f:[{p:[105,7,4583],t:7,e:"span",f:[{t:2,x:{r:["data.coverLocked"],s:'_0?"Engaged":"Disengaged"'},p:[105,13,4589]}]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"},p:[104,5,4535]},{t:4,n:51,f:[{p:[107,7,4665],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.coverLocked"],s:'_0?"lock":"unlock"'},p:[107,23,4681]}],action:"cover"},f:[{t:2,x:{r:["data.coverLocked"],s:'_0?"Engaged":"Disengaged"'},p:[107,80,4738]}]}],x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"}}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],29:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",f:[{p:[2,3,15],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,46],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[3,21,62]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[3,65,106]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[4,22,161]}]}]}," ",{p:[6,3,218],t:7,e:"n-section",a:{label:"Output Pressure"},f:[{p:[7,5,259],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[8,5,353],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.set_pressure","data.max_pressure"],s:'_0==_1?"disabled":null'},p:[8,34,382]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}," ",{p:[9,5,513],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.set_pressure"],s:"Math.round(_0)"},p:[9,30,538]}," kPa"]}]}," ",{p:[11,3,603],t:7,e:"n-section",a:{label:"Filter"},f:[{p:[12,5,635],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==-1?"selected":null'},p:[12,22,652]}],action:"filter",params:'{"mode": -1}'},f:["Nothing"]}," ",{p:[14,5,769],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==0?"selected":null'},p:[14,22,786]}],action:"filter",params:'{"mode": 0}'},f:["Plasma"]}," ",{p:[16,5,900],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==1?"selected":null'},p:[16,22,917]}],action:"filter",params:'{"mode": 1}'},f:["O2"]}," ",{p:[18,5,1027],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==2?"selected":null'},p:[18,22,1044]}],action:"filter",params:'{"mode": 2}'},f:["N2"]}," ",{p:[20,5,1154],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==3?"selected":null'},p:[20,22,1171]}],action:"filter",params:'{"mode": 3}'},f:["CO2"]}," ",{p:[22,5,1282],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==4?"selected":null'},p:[22,22,1299]}],action:"filter",params:'{"mode": 4}'},f:["N2O"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],30:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",f:[{p:[2,3,15],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,46],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[3,21,62]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[3,65,106]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[4,22,161]}]}]}," ",{p:[6,3,218],t:7,e:"n-section",a:{label:"Output Pressure"},f:[{p:[7,5,259],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[8,5,353],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.set_pressure","data.max_pressure"],s:'_0==_1?"disabled":null'},p:[8,34,382]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}," ",{p:[9,5,513],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.set_pressure"],s:"Math.round(_0)"},p:[9,30,538]}," kPa"]}]}," ",{p:[11,3,603],t:7,e:"n-section",a:{label:"Node 1"},f:[{p:[12,5,635],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==0?"disabled":null'},p:[12,43,673]}],action:"node1",params:'{"concentration": -0.1}'}}," ",{p:[14,5,790],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==0?"disabled":null'},p:[14,38,823]}],action:"node1",params:'{"concentration": -0.01}'}}," ",{p:[16,5,941],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==100?"disabled":null'},p:[16,37,973]}],action:"node1",params:'{"concentration": 0.01}'}}," ",{p:[18,5,1092],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==100?"disabled":null'},p:[18,42,1129]}],action:"node1",params:'{"concentration": 0.1}'}}," ",{p:[20,5,1247],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.node1_concentration"],s:"Math.round(_0)"},p:[20,30,1272]},"%"]}]}," ",{p:[22,3,1341],t:7,e:"n-section",a:{label:"Node 2"},f:[{p:[23,5,1373],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==0?"disabled":null'},p:[23,43,1411]}],action:"node2",params:'{"concentration": -0.1}'}}," ",{p:[25,5,1528],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==0?"disabled":null'},p:[25,38,1561]}],action:"node2",params:'{"concentration": -0.01}'}}," ",{p:[27,5,1679],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==100?"disabled":null'},p:[27,37,1711]}],action:"node2",params:'{"concentration": 0.01}'}}," ",{p:[29,5,1830],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==100?"disabled":null'},p:[29,42,1867]}],action:"node2",params:'{"concentration": 0.1}'}}," ",{ -p:[31,5,1985],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.node2_concentration"],s:"Math.round(_0)"},p:[31,30,2010]},"%"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],31:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",f:[{p:[2,3,15],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,46],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[3,21,62]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[3,65,106]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[4,22,161]}]}]}," ",{t:4,f:[{p:[7,5,245],t:7,e:"n-section",a:{label:"Transfer Rate"},f:[{p:[8,7,286],t:7,e:"n-button",a:{icon:"pencil",action:"transfer",params:'{"rate": "custom"}'},f:["Set"]}," ",{p:[9,7,378],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.transfer_rate","data.max_rate"],s:'_0==_1?"disabled":null'},p:[9,36,407]}],action:"transfer",params:'{"rate": "max"}'},f:["Max"]}," ",{p:[10,7,533],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.transfer_rate"],s:"Math.round(_0)"},p:[10,32,558]}," L/s"]}]}],n:50,r:"data.max_rate",p:[6,3,218]},{t:4,n:51,f:[{p:[13,5,640],t:7,e:"n-section",a:{label:"Output Pressure"},f:[{p:[14,7,683],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[15,7,779],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.set_pressure","data.max_pressure"],s:'_0==_1?"disabled":null'},p:[15,36,808]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}," ",{p:[16,7,941],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.set_pressure"],s:"Math.round(_0)"},p:[16,32,966]}," kPa"]}]}],r:"data.max_rate"}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],32:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-notice",f:[{p:[2,3,14],t:7,e:"span",f:["The regulator ",{t:2,x:{r:["data.hasHoldingTank"],s:'_0?"is":"is not"'},p:[2,23,34]}," connected to a tank."]}]}," ",{p:{button:[{p:[6,5,182],t:7,e:"n-button",a:{icon:"pencil",state:[{t:2,x:{r:["data.canLabel"],s:'_0?null:"disabled"'},p:[6,36,213]}],action:"relable"},f:["Relabel"]}]},t:7,e:"n-display",a:{title:"Canister",button:0},f:[" ",{p:[8,3,307],t:7,e:"n-section",a:{label:"Pressure"},f:[{p:[9,5,341],t:7,e:"span",f:[{t:2,x:{r:["adata.tankPressure"],s:"Math.round(_0)"},p:[9,11,347]}," kPa"]}]}," ",{p:[11,3,412],t:7,e:"n-section",a:{label:"Port"},f:[{p:[12,5,442],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.portConnected"],s:'_0?"good":"average"'},p:[12,18,455]}]},f:[{t:2,x:{r:["data.portConnected"],s:'_0?"Connected":"Not Connected"'},p:[12,63,500]}]}]}]}," ",{p:[15,1,593],t:7,e:"n-display",a:{title:"Valve"},f:[{p:[16,3,622],t:7,e:"n-section",a:{label:"Release Pressure"},f:[{p:[17,5,664],t:7,e:"n-bar",a:{min:[{t:2,r:"data.minReleasePressure",p:[17,17,676]}],max:[{t:2,r:"data.maxReleasePressure",p:[17,51,710]}],value:[{t:2,r:"data.releasePressure",p:[18,14,753]}]},f:[{t:2,x:{r:["adata.releasePressure"],s:"Math.round(_0)"},p:[18,40,779]}," kPa"]}]}," ",{p:[20,3,848],t:7,e:"n-section",a:{label:"Pressure Regulator"},f:[{p:[21,5,892],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["data.releasePressure","data.defaultReleasePressure"],s:'_0!=_1?null:"disabled"'},p:[21,37,924]}],action:"pressure",params:'{"pressure": "reset"}'},f:["Reset"]}," ",{p:[23,5,1079],t:7,e:"n-button",a:{icon:"minus",state:[{t:2,x:{r:["data.releasePressure","data.minReleasePressure"],s:'_0>_1?null:"disabled"'},p:[23,35,1109]}],action:"pressure",params:'{"pressure": "min"}'},f:["Min"]}," ",{p:[25,5,1255],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[26,5,1349],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.releasePressure","data.maxReleasePressure"],s:'_0<_1?null:"disabled"'},p:[26,34,1378]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}]}," ",{p:[29,3,1538],t:7,e:"n-section",a:{label:"Valve"},f:[{p:[30,5,1569],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.valveOpen"],s:'_0?"unlock":"lock"'},p:[30,21,1585]}],style:[{t:2,x:{r:["data.valveOpen","data.hasHoldingTank"],s:'_0?_1?"caution":"danger":null'},p:[31,14,1639]}],action:"valve"},f:[{t:2,x:{r:["data.valveOpen"],s:'_0?"Open":"Closed"'},p:[32,22,1733]}]}]}]}," ",{p:{button:[{t:4,f:[{p:[38,7,1917],t:7,e:"n-button",a:{icon:"eject",style:[{t:2,x:{r:["data.valveOpen"],s:'_0?"danger":null'},p:[38,37,1947]}],action:"eject"},f:["Eject"]}],n:50,r:"data.hasHoldingTank",p:[37,5,1882]}]},t:7,e:"n-display",a:{title:"Holding Tank",button:0},f:[" ",{t:4,f:[{p:[42,3,2080],t:7,e:"n-section",a:{label:"Label"},f:[{t:2,r:"data.holdingTank.name",p:[43,4,2110]}]}," ",{p:[45,3,2155],t:7,e:"n-section",a:{label:"Pressure"},f:[{t:2,x:{r:["adata.holdingTank.tankPressure"],s:"Math.round(_0)"},p:[46,4,2188]}," kPa"]}],n:50,r:"data.hasHoldingTank",p:[41,3,2049]},{t:4,n:51,f:[{p:[49,3,2269],t:7,e:"n-section",f:[{p:[50,4,2285],t:7,e:"span",a:{"class":"average"},f:["No Holding Tank"]}]}],r:"data.hasHoldingTank"}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],33:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",a:{title:"Power"},f:[{p:[2,3,29],t:7,e:"n-section",a:{label:"Energy"},f:[{p:[3,5,61],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.maxEnergy",p:[3,25,81]}],value:[{t:2,r:"data.energy",p:[3,52,108]}]},f:[{t:2,x:{r:["adata.energy"],s:"Math.fixed(_0)"},p:[3,69,125]}," Units"]}]}," ",{t:4,f:[{p:[6,5,227],t:7,e:"n-section",a:{label:"Amount"},f:[{t:4,f:[{p:[8,9,307],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.amount","."],s:'_0==_1?"selected":null'},p:[8,38,336]}],action:"amount",params:['{"amount": ',{t:2,r:".",p:[8,115,413]},"}"]},f:[{t:2,r:".",p:[8,123,421]}]}],n:52,r:"data.beakerTransferAmounts",p:[7,7,261]}]}],n:50,r:"data.beakerTransferAmounts",p:[5,3,187]}]}," ",{p:[13,1,499],t:7,e:"n-display",a:{title:"Dispense"},f:[{p:[14,3,531],t:7,e:"n-section",f:[{t:4,f:[{p:[16,7,580],t:7,e:"n-button",a:{grid:0,icon:"tint",action:"dispense",params:['{"reagent": "',{t:2,r:"id",p:[16,73,646]},'"}']},f:[{t:2,r:"title",p:[16,83,656]}]}],n:52,r:"data.chemicals",p:[15,5,548]}]}]}," ",{p:{button:[{p:[22,5,785],t:7,e:"n-button",a:{icon:"eject",state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[22,35,815]}],action:"eject"},f:["Eject"]}]},t:7,e:"n-display",a:{title:"Beaker",button:0},f:[" ",{t:4,f:[{p:[25,5,951],t:7,e:"n-section",a:{label:"Remove"},f:[{t:4,f:[{p:[27,9,1031],t:7,e:"n-button",a:{icon:"minus",action:"remove",params:['{"amount": ',{t:2,r:".",p:[27,67,1089]},"}"]},f:[{t:2,r:".",p:[27,75,1097]}]}],n:52,r:"data.beakerTransferAmounts",p:[26,7,985]}]}],n:50,r:"data.beakerTransferAmounts",p:[24,3,911]}," ",{p:[31,3,1163],t:7,e:"n-section",a:{label:"Contents"},f:[{t:4,f:[{p:[33,7,1232],t:7,e:"span",f:[{t:2,x:{r:["adata.beakerCurrentVolume"],s:"Math.round(_0)"},p:[33,13,1238]},"/",{t:2,r:"data.beakerMaxVolume",p:[33,55,1280]}," Units"]}," ",{p:[34,7,1325],t:7,e:"br"}," ",{t:4,f:[{p:[36,9,1378],t:7,e:"span",a:{"class":"highlight"},t0:"fade",f:[{t:2,x:{r:["volume"],s:"Math.fixed(_0,2)"},p:[36,52,1421]}," units of ",{t:2,r:"name",p:[36,87,1456]}]},{p:[36,102,1471],t:7,e:"br"}],n:52,r:"adata.beakerContents",p:[35,7,1338]},{t:4,n:51,f:[{p:[38,9,1502],t:7,e:"span",a:{"class":"bad"},f:["Beaker Empty"]}],r:"adata.beakerContents"}],n:50,r:"data.isBeakerLoaded",p:[32,5,1197]},{t:4,n:51,f:[{p:[41,7,1578],t:7,e:"span",a:{"class":"average"},f:["No Beaker"]}],r:"data.isBeakerLoaded"}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],34:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",a:{title:"Thermostat"},f:[{p:[2,3,34],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,65],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isActive"],s:'_0?"power-off":"close"'},p:[3,21,81]}],style:[{t:2,x:{r:["data.isActive"],s:'_0?"selected":null'},p:[4,10,134]}],state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[5,10,183]}],action:"power"},f:[{t:2,x:{r:["data.isActive"],s:'_0?"On":"Off"'},p:[6,18,246]}]}]}," ",{p:[8,3,309],t:7,e:"n-section",a:{label:"Target"},f:[{p:[9,4,340],t:7,e:"n-button",a:{icon:"pencil",action:"temperature"},f:[{t:2,x:{r:["adata.targetTemp"],s:"Math.round(_0)"},p:[9,49,385]}," K"]}]}]}," ",{p:{button:[{p:[14,5,524],t:7,e:"n-button",a:{icon:"eject",state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[14,35,554]}],action:"eject"},f:["Eject"]}]},t:7,e:"n-display",a:{title:"Beaker",button:0},f:[" ",{p:[16,3,650],t:7,e:"n-section",a:{label:"Contents"},f:[{t:4,f:[{p:[18,7,719],t:7,e:"span",f:["Temperature: ",{t:2,x:{r:["adata.currentTemp"],s:"Math.round(_0)"},p:[18,26,738]}," K"]}," ",{p:[19,7,788],t:7,e:"br"}," ",{t:4,f:[{p:[21,9,842],t:7,e:"span",a:{"class":"highlight"},t0:"fade",f:[{t:2,x:{r:["volume"],s:"Math.fixed(_0,2)"},p:[21,52,885]}," units of ",{t:2,r:"name",p:[21,87,920]}]},{p:[21,102,935],t:7,e:"br"}],n:52,r:"adata.beakerContents",p:[20,7,802]},{t:4,n:51,f:[{p:[23,9,966],t:7,e:"span",a:{"class":"bad"},f:["Beaker Empty"]}],r:"adata.beakerContents"}],n:50,r:"data.isBeakerLoaded",p:[17,5,684]},{t:4,n:51,f:[{p:[26,7,1042],t:7,e:"span",a:{"class":"average"},f:["No Beaker"]}],r:"data.isBeakerLoaded"}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],35:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};!function(t){t.exports={computed:{cellTemperatureState:function(){var t;return t=this.get("data.cellTemperature"),225>t?"good":273.15>t?"average":"bad"},occupantStatState:function(){var t;return t=this.get("data.occupant.stat"),0===t?"good":1===t?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[16,1,414],t:7,e:"n-display",a:{title:"Occupant"},f:[{p:[17,3,446],t:7,e:"n-section",a:{label:"Occupant"},f:[{p:[18,3,478],t:7,e:"span",f:[{t:2,x:{r:["data.occupant.name"],s:'_0?_0:"No Occupant"'},p:[18,9,484]}]}]}," ",{t:4,f:[{p:[21,5,600],t:7,e:"n-section",a:{label:"State"},f:[{p:[22,7,633],t:7,e:"span",a:{"class":[{t:2,r:"occupantStatState",p:[22,20,646]}]},f:[{t:2,x:{r:["data.occupant.stat"],s:'_0==0?"Conscious":_0==1?"Unconcious":"Dead"'},p:[22,43,669]}]}]}," ",{p:[24,4,789],t:7,e:"n-section",a:{label:"Temperature"},f:[{p:[25,6,827],t:7,e:"span",f:[{t:2,x:{r:["adata.occupant.bodyTemperature"],s:"Math.round(_0)"},p:[25,12,833]}," K"]}]}," ",{p:[27,5,911],t:7,e:"n-section",a:{label:"Health"},f:[{p:[28,7,945],t:7,e:"n-bar",a:{min:[{t:2,r:"data.occupant.minHealth",p:[28,19,957]}],max:[{t:2,r:"data.occupant.maxHealth",p:[28,53,991]}],value:[{t:2,r:"data.occupant.health",p:[28,89,1027]}],state:[{t:2,x:{r:["data.occupant.health"],s:'_0>=0?"good":"average"'},p:[29,16,1069]}]},f:[{t:2,x:{r:["adata.occupant.health"],s:"Math.round(_0)"},p:[29,68,1121]}]}]}," ",{t:4,f:[{p:[32,7,1356],t:7,e:"n-section",a:{label:[{t:2,r:"label",p:[32,25,1374]}]},f:[{p:[33,9,1395],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.occupant.maxHealth",p:[33,29,1415]}],value:[{t:2,rx:{r:"data.occupant",m:[{t:30,n:"type"}]},p:[33,65,1451]}],state:"bad"},f:[{t:2,x:{r:["type","adata.occupant"],s:"Math.round(_1[_0])"},p:[33,102,1488]}]}]}],n:52,x:{r:[],s:'[{label:"Brute",type:"bruteLoss"},{label:"Respiratory",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Burn",type:"fireLoss"}]'},p:[31,5,1190]}],n:50,r:"data.hasOccupant",p:[20,3,570]}]}," ",{p:[38,1,1594],t:7,e:"n-display",a:{title:"Cell"},f:[{p:[39,3,1622],t:7,e:"n-section",a:{label:"Power"},f:[{p:[40,5,1653],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isOperating"],s:'_0?"power-off":"close"'},p:[40,21,1669]}],style:[{t:2,x:{r:["data.isOperating"],s:'_0?"selected":null'},p:[41,14,1729]}],state:[{t:2,x:{r:["data.isOpen"],s:'_0?"disabled":null'},p:[42,14,1785]}],action:"power"},f:[{t:2,x:{r:["data.isOperating"],s:'_0?"On":"Off"'},p:[43,22,1844]}]}]}," ",{p:[45,3,1910],t:7,e:"n-section",a:{label:"Temperature"},f:[{p:[46,3,1945],t:7,e:"span",a:{"class":[{t:2,r:"cellTemperatureState",p:[46,16,1958]}]},f:[{t:2,x:{r:["adata.cellTemperature"],s:"Math.round(_0)"},p:[46,42,1984]}," K"]}]}," ",{p:[48,2,2048],t:7,e:"n-section",a:{label:"Door"},f:[{p:[49,5,2078],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isOpen"],s:'_0?"unlock":"lock"'},p:[49,21,2094]}],action:"door"},f:[{t:2,x:{r:["data.isOpen"],s:'_0?"Open":"Closed"'},p:[49,72,2145]}]}," ",{p:[50,5,2197],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.autoEject"],s:'_0?"sign-out":"sign-in"'},p:[50,21,2213]}],action:"autoeject"},f:[{t:2,x:{r:["data.autoEject"],s:'_0?"Auto":"Manual"'},p:[50,85,2277]}]}]}]}," ",{p:{button:[{p:[55,5,2419],t:7,e:"n-button",a:{icon:"eject",state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[55,35,2449]}],action:"ejectbeaker"},f:["Eject"]}]},t:7,e:"n-display",a:{title:"Beaker",button:0},f:[" ",{p:[57,3,2551],t:7,e:"n-section",a:{label:"Contents"},f:[{t:4,f:[{t:4,f:[{p:[60,9,2660],t:7,e:"span",a:{"class":"highlight"},t0:"fade",f:[{t:2,x:{r:["volume"],s:"Math.fixed(_0,2)"},p:[60,52,2703]}," units of ",{t:2,r:"name",p:[60,87,2738]}]},{p:[60,102,2753],t:7,e:"br"}],n:52,r:"adata.beakerContents",p:[59,7,2620]},{t:4,n:51,f:[{p:[62,9,2784],t:7,e:"span",a:{"class":"bad"},f:["Beaker Empty"]}],r:"adata.beakerContents"}],n:50,r:"data.isBeakerLoaded",p:[58,5,2585]},{t:4,n:51,f:[{p:[65,7,2860],t:7,e:"span",a:{"class":"average"},f:["No Beaker"]}],r:"data.isBeakerLoaded"}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],36:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-notice",f:[{p:[2,3,14],t:7,e:"span",f:["The requested interface (",{t:2,r:"config.interface",p:[2,34,45]},") was not found. Does it exist?"]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],37:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};!function(t){t.exports={computed:{capacityPercentState:function(){var t;return t=this.get("data.capacityPercent"),t>50?"good":t>15?"average":"bad"},inputState:function(){var t,e;return t=this.get("data.capacityPercent"),e=this.get("data.inputting"),t>=100?"good":e?"average":"bad"},outputState:function(){var t,e;return t=this.get("data.charge"),e=this.get("data.outputting"),e?"good":t>0?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[23,1,624],t:7,e:"n-display",a:{title:"Storage"},f:[{p:[24,3,655],t:7,e:"n-section",a:{label:"Stored Energy"},f:[{p:[25,5,694],t:7,e:"n-bar",a:{min:"0",max:"100",value:[{t:2,r:"data.capacityPercent",p:[25,37,726]}],state:[{t:2,r:"capacityPercentState",p:[25,70,759]}]},f:[{t:2,x:{r:["adata.capacityPercent"],s:"Math.fixed(_0)"},p:[25,96,785]},"%"]}]}]}," ",{p:[28,1,863],t:7,e:"n-display",a:{title:"Input"},f:[{p:[29,3,892],t:7,e:"n-section",a:{label:"Charge Mode"},f:[{p:[30,5,929],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.inputAttempt"],s:'_0?"refresh":"close"'},p:[30,21,945]}],style:[{t:2,x:{r:["data.inputAttempt"],s:'_0?"selected":null'},p:[30,73,997]}],action:"tryinput"},f:[{t:2,x:{r:["data.inputAttempt"],s:'_0?"Auto":"Off"'},p:[31,25,1065]}]},"   [",{p:[33,6,1133],t:7,e:"span",a:{"class":[{t:2,r:"inputState",p:[33,19,1146]}]},f:[{t:2,x:{r:["data.capacityPercent","data.inputting"],s:'_0>=100?"Fully Charged":_1?"Charging":"Not Charging"'},p:[33,35,1162]}]},"]"]}," ",{p:[35,3,1285],t:7,e:"n-section",a:{label:"Target Input"},f:[{p:[36,5,1323],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.inputLevelMax",p:[36,25,1343]}],value:[{t:2,r:"data.inputLevel",p:[36,56,1374]}]},f:[{t:2,x:{r:["adata.inputLevel"],s:"Math.round(_0)"},p:[36,77,1395]},"W"]}]}," ",{p:[38,3,1455],t:7,e:"n-section",a:{label:"Adjust Input"},f:[{p:[39,5,1493],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.inputLevel"],s:'_0==0?"disabled":null'},p:[39,43,1531]}],action:"input",params:'{"input": "min"}'}}," ",{p:[40,5,1625],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.inputLevel"],s:'_0==0?"disabled":null'},p:[40,38,1658]}],action:"input",params:'{"input": "minus"}'}}," ",{p:[41,5,1754],t:7,e:"n-button",a:{icon:"pencil",action:"input",params:'{"input": "custom"}'},f:["Set"]}," ",{p:[42,5,1842],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.inputLevel","data.inputLevelMax"],s:'_0==_1?"disabled":null'},p:[42,37,1874]}],action:"input",params:'{"input": "plus"}'}}," ",{p:[43,5,1986],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.inputLevel","data.inputLevelMax"],s:'_0==_1?"disabled":null'},p:[43,42,2023]}],action:"input",params:'{"input": "max"}'}}]}," ",{p:[45,3,2148],t:7,e:"n-section",a:{label:"Available"},f:[{p:[46,3,2181],t:7,e:"span",f:[{t:2,x:{r:["adata.inputAvailable"],s:"Math.round(_0)"},p:[46,9,2187]},"W"]}]}]}," ",{p:[49,1,2262],t:7,e:"n-display",a:{title:"Output"},f:[{p:[50,3,2292],t:7,e:"n-section",a:{label:"Output Mode"},f:[{p:[51,5,2329],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.outputAttempt"],s:'_0?"power-off":"close"'},p:[51,21,2345]}],style:[{t:2,x:{r:["data.outputAttempt"],s:'_0?"selected":null'},p:[51,76,2400]}],action:"tryoutput"},f:[{t:2,x:{r:["data.outputAttempt"],s:'_0?"On":"Off"'},p:[52,26,2470]}]},"   [",{p:[54,6,2537],t:7,e:"span",a:{"class":[{t:2,r:"outputState",p:[54,19,2550]}]},f:[{t:2,x:{r:["data.outputting","data.charge"],s:'_0?"Sending":_1>0?"Not Sending":"No Charge"'},p:[54,36,2567]}]},"]"]}," ",{p:[56,3,2673],t:7,e:"n-section",a:{label:"Target Output"},f:[{p:[57,5,2712],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.outputLevelMax",p:[57,25,2732]}],value:[{t:2,r:"data.outputLevel",p:[57,57,2764]}]},f:[{t:2,x:{r:["adata.outputLevel"],s:"Math.round(_0)"},p:[57,79,2786]},"W"]}]}," ",{p:[59,3,2847],t:7,e:"n-section",a:{label:"Adjust Output"},f:[{p:[60,5,2886],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.outputLevel"],s:'_0==0?"disabled":null'},p:[60,43,2924]}],action:"output",params:'{"output": "min"}'}}," ",{p:[61,5,3021],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.outputLevel"],s:'_0==0?"disabled":null'},p:[61,38,3054]}],action:"output",params:'{"output": "minus"}'}}," ",{p:[62,5,3153],t:7,e:"n-button",a:{icon:"pencil",action:"output",params:'{"output": "custom"}'},f:["Set"]}," ",{p:[63,5,3243],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.outputLevel","data.outputLevelMax"],s:'_0==_1?"disabled":null'},p:[63,37,3275]}],action:"output",params:'{"output": "plus"}'}}," ",{p:[64,5,3391],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.outputLevel","data.outputLevelMax"],s:'_0==_1?"disabled":null'},p:[64,42,3428]}],action:"output",params:'{"output": "max"}'}}]}," ",{p:[66,3,3557],t:7,e:"n-section",a:{label:"Outputting"},f:[{p:[67,3,3591],t:7,e:"span",f:[{t:2,x:{r:["adata.outputUsed"],s:"Math.round(_0)"},p:[67,9,3597]},"W"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],38:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",a:{title:"Status"},f:[{p:[2,3,30],t:7,e:"n-section",a:{label:"Generated Power"},f:[{t:2,x:{r:["adata.generated"],s:"Math.round(_0)"},p:[3,5,71]},"W"]}," ",{p:[5,3,123],t:7,e:"n-section",a:{label:"Orientation"},f:[{p:[6,5,160],t:7,e:"span",f:[{t:2,x:{r:["adata.angle"],s:"Math.round(_0)"},p:[6,11,166]},"° (",{t:2,r:"data.direction",p:[6,45,200]},")"]}]}," ",{p:[8,3,246],t:7,e:"n-section",a:{label:"Adjust Angle"},f:[{p:[9,5,284],t:7,e:"n-button",a:{icon:"step-backward",action:"control",params:'{"cdir": -15}'},f:["15°"]}," ",{p:[10,5,379],t:7,e:"n-button",a:{icon:"backward",action:"control",params:'{"cdir": -5}'},f:["5°"]}," ",{p:[11,5,467],t:7,e:"n-button",a:{icon:"forward",action:"control",params:'{"cdir": 5}'},f:["5°"]}," ",{p:[12,5,553],t:7,e:"n-button",a:{icon:"step-forward",action:"control",params:'{"cdir": 15}'},f:["15°"]}]}]}," ",{p:[15,1,671],t:7,e:"n-display",a:{title:"Tracking"},f:[{p:[16,3,703],t:7,e:"n-section",a:{label:"Tracker Mode"},f:[{p:[17,5,741],t:7,e:"n-button",a:{icon:"close",state:[{t:2,x:{r:["data.tracking_state"],s:'_0==0?"selected":null'},p:[17,35,771]}],action:"tracking",params:'{"mode": 0}'},f:["Off"]}," ",{p:[19,5,887],t:7,e:"n-button",a:{icon:"clock-o",state:[{t:2,x:{r:["data.tracking_state"],s:'_0==1?"selected":null'},p:[19,37,919]}],action:"tracking",params:'{"mode": 1}'},f:["Timed"]}," ",{p:[21,5,1037],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["data.connected_tracker","data.tracking_state"],s:'_0?_1==2?"selected":null:"disabled"'},p:[21,37,1069]}],action:"tracking",params:'{"mode": 2}'},f:["Auto"]}]}," ",{p:[24,3,1237],t:7,e:"n-section",a:{label:"Tracking Rate"},f:[{p:[25,3,1274],t:7,e:"span",f:[{t:2,x:{r:["adata.tracking_rate"],s:"Math.round(_0)"},p:[25,9,1280]},"°/h (",{t:2,r:"data.rotating_way",p:[25,53,1324]},")"]}]}," ",{p:[27,3,1372],t:7,e:"n-section",a:{label:"Adjust Rate"},f:[{p:[28,5,1409],t:7,e:"n-button",a:{icon:"fast-backward",action:"control",params:'{"tdir": -180}'},f:["180°"]}," ",{p:[29,5,1506],t:7,e:"n-button",a:{icon:"step-backward",action:"control",params:'{"tdir": -30}'},f:["30°"]}," ",{p:[30,5,1601],t:7,e:"n-button",a:{icon:"backward",action:"control",params:'{"tdir": -5}'},f:["5°"]}," ",{p:[31,5,1689],t:7,e:"n-button",a:{icon:"forward",action:"control",params:'{"tdir": 5}'},f:["5°"]}," ",{p:[32,5,1775],t:7,e:"n-button",a:{icon:"step-forward",action:"control",params:'{"tdir": 30}'},f:["30°"]}," ",{p:[33,5,1868],t:7,e:"n-button",a:{icon:"fast-forward",action:"control",params:'{"tdir": 180}'},f:["180°"]}]}]}," ",{p:{button:[{p:[38,5,2051],t:7,e:"n-button",a:{icon:"refresh",action:"refresh"},f:["Refresh"]}]},t:7,e:"n-display",a:{title:"Devices",button:0},f:[" ",{p:[40,2,2130],t:7,e:"n-section",a:{label:"Solar Tracker"},f:[{p:[41,5,2169],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.connected_tracker"],s:'_0?"good":"bad"'},p:[41,18,2182]}]},f:[{t:2,x:{r:["data.connected_tracker"],s:'_0?"":"Not "'},p:[41,63,2227]},"Found"]}]}," ",{p:[43,2,2297],t:7,e:"n-section",a:{label:"Solar Panels"},f:[{p:[44,3,2333],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.connected_panels"],s:'_0?"good":"bad"'},p:[44,16,2346]}]},f:[{t:2,x:{r:["adata.connected_panels"],s:"Math.round(_0)"},p:[44,60,2390]}," Panels Connected"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],39:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};!function(e){e.exports={data:{text:t("../text")}}}(i),i.exports.template={v:3,t:[" ",{p:{button:[{t:4,f:[{p:[10,7,193],t:7,e:"n-button",a:{icon:"eject",action:"eject"},f:["Eject"]}],n:50,r:"data.open",p:[9,5,168]}]},t:7,e:"n-display",a:{title:"Power",button:0},f:[" ",{p:[13,3,280],t:7,e:"n-section",a:{label:"Power"},f:[{p:[14,5,311],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[14,21,327]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[15,14,378]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[16,22,433]}]}]}," ",{p:[18,3,490],t:7,e:"n-section",a:{label:"Cell"},f:[{t:4,f:[{p:[20,7,553],t:7,e:"n-bar",a:{min:"0",max:"100",value:[{t:2,r:"data.powerLevel",p:[20,39,585]}]},f:[{t:2,x:{r:["adata.powerLevel"],s:"Math.fixed(_0)"},p:[20,60,606]},"%"]}],n:50,r:"data.hasPowercell",p:[19,5,520]},{t:4,n:51,f:[{p:[22,4,664],t:7,e:"span",a:{"class":"bad"},f:["No Cell"]}],r:"data.hasPowercell"}]}]}," ",{p:[26,1,739],t:7,e:"n-display",a:{title:"Thermostat"},f:[{p:[27,3,773],t:7,e:"n-section",a:{label:"Current Temperature"},f:[{p:[28,3,816],t:7,e:"span",f:[{t:2,x:{r:["adata.currentTemp"],s:"Math.round(_0)"},p:[28,9,822]},"°C"]}]}," ",{p:[30,2,886],t:7,e:"n-section",a:{label:"Target Temperature"},f:[{p:[31,3,928],t:7,e:"span",f:[{t:2,x:{r:["adata.targetTemp"],s:"Math.round(_0)"},p:[31,9,934]},"°C"]}]}," ",{t:4,f:[{p:[34,2,1018],t:7,e:"n-section",a:{label:"Adjust Target"},f:[{p:[35,7,1059],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.targetTemp","data.minTemp"],s:'_0>_1?null:"disabled"'},p:[35,45,1097]}],action:"target",params:'{"target": -20}'}}," ",{p:[36,7,1203],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.targetTemp","data.minTemp"],s:'_0>_1?null:"disabled"'},p:[36,40,1236]}],action:"target",params:'{"target": -5}'}}," ",{p:[37,7,1341],t:7,e:"n-button",a:{icon:"pencil",action:"target",params:'{"target": "custom"}'},f:["Set"]}," ",{p:[38,7,1433],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.targetTemp","data.maxTemp"],s:'_0<_1?null:"disabled"'},p:[38,39,1465]}],action:"target",params:'{"target": 5}'}}," ",{p:[39,7,1569],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.targetTemp","data.maxTemp"],s:'_0<_1?null:"disabled"'},p:[39,44,1606]}],action:"target",params:'{"target": 20}'}}]}],n:50,r:"data.open",p:[33,3,998]}," ",{p:[42,3,1734],t:7,e:"n-section",a:{label:"Mode"},f:[{t:4,f:[{p:[44,7,1787],t:7,e:"n-button",a:{icon:"long-arrow-up",state:[{t:2,x:{r:["data.mode"],s:'_0=="heat"?"selected":null'},p:[44,45,1825]}],action:"mode",params:'{"mode": "heat"}'},f:["Heat"]}," ",{p:[45,7,1933],t:7,e:"n-button",a:{icon:"long-arrow-down",state:[{t:2,x:{r:["data.mode"],s:'_0=="cool"?"selected":null'},p:[45,47,1973]}],action:"mode",params:'{"mode": "cool"}'},f:["Cool"]}," ",{p:[46,7,2081],t:7,e:"n-button",a:{icon:"arrows-v",state:[{t:2,x:{r:["data.mode"],s:'_0=="auto"?"selected":null'},p:[46,40,2114]}],action:"mode",params:'{"mode": "auto"}'},f:["Auto"]}],n:50,r:"data.open",p:[43,3,1762]},{t:4,n:51,f:[{p:[48,4,2231],t:7,e:"span",f:[{t:2,x:{r:["text","data.mode"],s:"_0.titleCase(_1)"},p:[48,10,2237]}]}],r:"data.open"}]}]}]},e.exports=r.extend(i.exports)},{"../text":44,"ractive/ractive.runtime":7}],40:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};!function(t){t.exports={data:{tankPressureState:function(){var t;return t=this.get("data.tankPressureState"),t>=200?"good":t>=100?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[11,1,255],t:7,e:"n-notice",f:[{p:[12,3,269],t:7,e:"span",f:["The regulator ",{t:2,x:{r:["data.hasHoldingTank"],s:'_0?"is":"is not"'},p:[12,23,289]}," connected to a mask."]}]}," ",{p:[14,1,373],t:7,e:"n-display",f:[{p:[15,3,388],t:7,e:"n-section",a:{label:"Tank Pressure"},f:[{p:[16,7,429],t:7,e:"n-bar",a:{min:"0",max:"1013",value:[{t:2,r:"data.tankPressure",p:[16,40,462]}],state:[{t:2,r:"tankPressureState",p:[17,16,501]}]},f:[{t:2,x:{r:["adata.tankPressure"],s:"Math.round(_0)"},p:[17,39,524]}," kPa"]}]}," ",{p:[19,3,590],t:7,e:"n-section",a:{label:"Release Pressure"},f:[{p:[20,5,632],t:7,e:"n-bar",a:{min:[{t:2,r:"data.minReleasePressure",p:[20,17,644]}],max:[{t:2,r:"data.maxReleasePressure",p:[20,51,678]}],value:[{t:2,r:"data.releasePressure",p:[21,14,721]}]},f:[{t:2,x:{r:["adata.releasePressure"],s:"Math.round(_0)"},p:[21,40,747]}," kPa"]}]}," ",{p:[23,3,816],t:7,e:"n-section",a:{label:"Pressure Regulator"},f:[{p:[24,5,860],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["data.releasePressure","data.defaultReleasePressure"],s:'_0!=_1?null:"disabled"'},p:[24,37,892]}],action:"pressure",params:'{"pressure": "reset"}'},f:["Reset"]}," ",{p:[26,5,1047],t:7,e:"n-button",a:{icon:"minus",state:[{t:2,x:{r:["data.releasePressure","data.minReleasePressure"],s:'_0>_1?null:"disabled"'},p:[26,35,1077]}],action:"pressure",params:'{"pressure": "min"}'},f:["Min"]}," ",{p:[28,5,1223],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[29,5,1317],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.releasePressure","data.maxReleasePressure"],s:'_0<_1?null:"disabled"'},p:[29,34,1346]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}]}," ",{p:[32,3,1506],t:7,e:"n-section",a:{label:"Valve"},f:[{p:[33,5,1537],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.valveOpen"],s:'_0?"unlock":"lock"'},p:[33,21,1553]}],state:[{t:2,x:{r:["data.maskConnected"],s:'_0?null:"disabled"'},p:[33,68,1600]}],action:"valve"},f:[{t:2,x:{r:["data.valveOpen"],s:'_0?"Open":"Closed"'},p:[34,22,1666]}]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],41:[function(t,e,n){"use strict";var r,i,a;t("ie8/build/ie8.max"),t("dom4/build/dom4.max"),t("es5-shim"),t("html5shiv"),t("./math"),i=t("ractive/ractive.runtime"),i.DEBUG=/minified/.test(function(t){}),a=t("webfontloader"),a.load({custom:{families:["FontAwesome"],urls:["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"]}}),r=t("./nanoui"),window.nanoui=new r({el:"#container",data:function(){var t;return t=JSON.parse(document.getElementById("data").textContent),(null==t||null==t.data||null==t.config)&&alert("Initial data did not load correctly."),t.adata=t.data,t},onrender:function(){return this.observe("config.style",function(t,e,n){return null!=e&&document.body.classList.remove(e),null!=t?document.body.classList.add(t):void 0})}})},{"./math":42,"./nanoui":43,"dom4/build/dom4.max":1,"es5-shim":2,html5shiv:3,"ie8/build/ie8.max":4,"ractive/ractive.runtime":7,webfontloader:8}],42:[function(t,e,n){"use strict";Math.clamp=function(t,e,n){return Math.max(e,Math.min(t,n))},Math.fixed=function(t,e){return null==e&&(e=1),+(Math.round(t+"e"+e)+"e-"+e)}},{}],43:[function(t,e,n){"use strict";var r=t("ractive/ractive.runtime"),i={exports:{}};!function(e){e.exports={components:{"n-bar":t("./components/bar"),"n-button":t("./components/button"),"n-display":t("./components/display"),"n-notice":t("./components/notice"),"n-section":t("./components/section"),"n-subdisplay":t("./components/subdisplay")},events:{enter:t("ractive-events-keys").enter,space:t("ractive-events-keys").space},transitions:{fade:t("ractive-transitions-fade")},onconfig:function(){var e,n;return n=this.get("config.interface"),e={air_alarm:t("./interfaces/air_alarm.ract"),airlock_electronics:t("./interfaces/airlock_electronics.ract"),apc:t("./interfaces/apc.ract"),atmos_filter:t("./interfaces/atmos_filter.ract"),atmos_mixer:t("./interfaces/atmos_mixer.ract"),atmos_pump:t("./interfaces/atmos_pump.ract"),canister:t("./interfaces/canister.ract"),chem_dispenser:t("./interfaces/chem_dispenser.ract"),chem_heater:t("./interfaces/chem_heater.ract"),cryo:t("./interfaces/cryo.ract"),error:t("./interfaces/error.ract"),smes:t("./interfaces/smes.ract"),solar_control:t("./interfaces/solar_control.ract"),space_heater:t("./interfaces/space_heater.ract"),tanks:t("./interfaces/tanks.ract")},null!=e[n]?this.components["interface"]=e[n]:null==this.components["interface"]?this.components["interface"]=t("./interfaces/error"):void 0},onrender:function(){return this.observe("config.style",function(t,e,n){return null!=e&&this.el.classList.remove(e(e)),null!=t?this.el.classList.add(t(t)):void 0})}}}(i),i.exports.template={v:3,t:[" "," "," ",{p:[31,1,1244],t:7,e:"titlebar",f:[{t:3,r:"config.title",p:[31,11,1254]}]}," ",{p:[32,1,1285],t:7,e:"main",f:[{p:[33,3,1295],t:7,e:"interface"}]}," ",{p:[35,1,1319],t:7,e:"resize"}]},i.exports.components=i.exports.components||{};var a={titlebar:t("./components/titlebar.ract"),resize:t("./components/resize.ract")};for(var o in a)a.hasOwnProperty(o)&&(i.exports.components[o]=a[o]);e.exports=r.extend(i.exports)},{"./components/bar":10,"./components/button":11,"./components/display":12,"./components/notice":13,"./components/resize.ract":14,"./components/section":15,"./components/subdisplay":16,"./components/titlebar.ract":17,"./interfaces/air_alarm.ract":19,"./interfaces/airlock_electronics.ract":27,"./interfaces/apc.ract":28,"./interfaces/atmos_filter.ract":29,"./interfaces/atmos_mixer.ract":30,"./interfaces/atmos_pump.ract":31,"./interfaces/canister.ract":32,"./interfaces/chem_dispenser.ract":33,"./interfaces/chem_heater.ract":34,"./interfaces/cryo.ract":35,"./interfaces/error":36,"./interfaces/error.ract":36,"./interfaces/smes.ract":37,"./interfaces/solar_control.ract":38,"./interfaces/space_heater.ract":39,"./interfaces/tanks.ract":40,"ractive-events-keys":5,"ractive-transitions-fade":6,"ractive/ractive.runtime":7}],44:[function(t,e,n){"use strict";e.exports={upperCaseFirst:function(t){ -return t[0].toUpperCase()+t.slice(1).toLowerCase()},titleCase:function(t){return t.replace(/\w\S*/g,this.upperCaseFirst)}}},{}]},{},[41]); \ No newline at end of file +return this.fragment.getValue()},rebind:function(t,e){this.isNamed||Ul.call(this,t,e),this.fragment&&this.fragment.rebind(t,e)},render:function(){return this.docFrag=document.createDocumentFragment(),this.update(),this.rendered=!0,this.docFrag},resolve:Vl.resolve,setValue:function(t){var e;(void 0===t||t!==this.value)&&(void 0!==t&&(e=od(this.root,""+t,this.parentFragment)),!e&&this.name&&(e=od(this.root,this.name,this.parentFragment))&&(gl.call(this),this.isNamed=!0),e||v(ud,this.name,{ractive:this.root}),this.value=t,this.setTemplate(e||[]),this.bubble(),this.rendered&&ms.addView(this))},setTemplate:function(t){this.fragment&&(this.fragment.unbind(),this.rendered&&(this.fragmentToUnrender=this.fragment)),this.fragment=new ev({template:t,root:this.root,owner:this,pElement:this.parentFragment.pElement}),this.fragmentToRender=this.fragment},toString:function(t){var e,n,r,i;return e=this.fragment.toString(t),n=this.parentFragment.items[this.index-1],n&&n.type===wc?(r=n.text.split("\n").pop(),(i=/^\s+$/.exec(r))?sd(e,i[0]):e):e},unbind:function(){this.isNamed||gl.call(this),this.fragment&&this.fragment.unbind()},unrender:function(t){this.rendered&&(this.fragment&&this.fragment.unrender(t),this.rendered=!1)},update:function(){var t,e;this.fragmentToUnrender&&(this.fragmentToUnrender.unrender(!0),this.fragmentToUnrender=null),this.fragmentToRender&&(this.docFrag.appendChild(this.fragmentToRender.render()),this.fragmentToRender=null),this.rendered&&(t=this.parentFragment.getNode(),e=this.parentFragment.findNextNode(this),t.insertBefore(this.docFrag,e))}};var ld,pd,hd,fd=cd,dd=ui,md=ci,vd=new ns("detach"),gd=li,bd=pi,yd=hi,wd=fi,xd=di,_d=mi,kd=function(t,e,n,r){var i=t.root,a=t.keypath;r?i.viewmodel.smartUpdate(a,e,r):i.viewmodel.mark(a)},Ed=[],Td=["pop","push","reverse","shift","sort","splice","unshift"];Td.forEach(function(t){var e=function(){for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];var i,a,o,s;for(i=mu(this,t,n),a=Array.prototype[t].apply(this,arguments),ms.start(),this._ractive.setting=!0,s=this._ractive.wrappers.length;s--;)o=this._ractive.wrappers[s],ms.addRactive(o.root),kd(o,this,t,i);return ms.end(),this._ractive.setting=!1,a};xo(Ed,t,{value:e})}),ld={},ld.__proto__?(pd=function(t){t.__proto__=Ed},hd=function(t){t.__proto__=Array.prototype}):(pd=function(t){var e,n;for(e=Td.length;e--;)n=Td[e],xo(t,n,{value:Ed[n],configurable:!0})},hd=function(t){var e;for(e=Td.length;e--;)delete t[Td[e]]}),pd.unpatch=hd;var Cd,Od,Sd,Ad=pd;Cd={filter:function(t){return a(t)&&(!t._ractive||!t._ractive.setting)},wrap:function(t,e,n){return new Od(t,e,n)}},Od=function(t,e,n){this.root=t,this.value=e,this.keypath=E(n),e._ractive||(xo(e,"_ractive",{value:{wrappers:[],instances:[],setting:!1},configurable:!0}),Ad(e)),e._ractive.instances[t._guid]||(e._ractive.instances[t._guid]=0,e._ractive.instances.push(t)),e._ractive.instances[t._guid]+=1,e._ractive.wrappers.push(this)},Od.prototype={get:function(){return this.value},teardown:function(){var t,e,n,r,i;if(t=this.value,e=t._ractive,n=e.wrappers,r=e.instances,e.setting)return!1;if(i=n.indexOf(this),-1===i)throw Error(Sd);if(n.splice(i,1),n.length){if(r[this.root._guid]-=1,!r[this.root._guid]){if(i=r.indexOf(this.root),-1===i)throw Error(Sd);r.splice(i,1)}}else delete t._ractive,Ad.unpatch(this.value)}},Sd="Something went wrong in a rather interesting way";var Pd,jd,Nd=Cd,Fd=/^\s*[0-9]+\s*$/,Md=function(t){return Fd.test(t)?[]:{}};try{Object.defineProperty({},"test",{value:0}),Pd={filter:function(t,e,n){var r,i;return e?(e=E(e),(r=n.viewmodel.wrapped[e.parent.str])&&!r.magic?!1:(i=n.viewmodel.get(e.parent),a(i)&&/^[0-9]+$/.test(e.lastKey)?!1:i&&("object"==typeof i||"function"==typeof i))):!1},wrap:function(t,e,n){return new jd(t,e,n)}},jd=function(t,e,n){var r,i,a;return n=E(n),this.magic=!0,this.ractive=t,this.keypath=n,this.value=e,this.prop=n.lastKey,r=n.parent,this.obj=r.isRoot?t.viewmodel.data:t.viewmodel.get(r),i=this.originalDescriptor=Object.getOwnPropertyDescriptor(this.obj,this.prop),i&&i.set&&(a=i.set._ractiveWrappers)?void(-1===a.indexOf(this)&&a.push(this)):void vi(this,e,i)},jd.prototype={get:function(){return this.value},reset:function(t){return this.updating?void 0:(this.updating=!0,this.obj[this.prop]=t,ms.addRactive(this.ractive),this.ractive.viewmodel.mark(this.keypath,{keepExistingWrapper:!0}),this.updating=!1,!0)},set:function(t,e){this.updating||(this.obj[this.prop]||(this.updating=!0,this.obj[this.prop]=Md(t),this.updating=!1),this.obj[this.prop][t]=e)},teardown:function(){var t,e,n,r,i;return this.updating?!1:(t=Object.getOwnPropertyDescriptor(this.obj,this.prop),e=t&&t.set,void(e&&(r=e._ractiveWrappers,i=r.indexOf(this),-1!==i&&r.splice(i,1),r.length||(n=this.obj[this.prop],Object.defineProperty(this.obj,this.prop,this.originalDescriptor||{writable:!0,enumerable:!0,configurable:!0}),this.obj[this.prop]=n))))}}}catch(Eo){Pd=!1}var Rd,Ld,Id=Pd;Id&&(Rd={filter:function(t,e,n){return Id.filter(t,e,n)&&Nd.filter(t)},wrap:function(t,e,n){return new Ld(t,e,n)}},Ld=function(t,e,n){this.value=e,this.magic=!0,this.magicWrapper=Id.wrap(t,e,n),this.arrayWrapper=Nd.wrap(t,e,n)},Ld.prototype={get:function(){return this.value},teardown:function(){this.arrayWrapper.teardown(),this.magicWrapper.teardown()},reset:function(t){return this.magicWrapper.reset(t)}});var Dd=Rd,Ud=gi,Vd={},Bd=wi,qd=xi,zd=Ei,Hd=Ai,Wd=Pi,$d=function(t,e){this.computation=t,this.viewmodel=t.viewmodel,this.ref=e,this.root=this.viewmodel.ractive,this.parentFragment=this.root.component&&this.root.component.parentFragment};$d.prototype={resolve:function(t){this.computation.softDeps.push(t),this.computation.unresolvedDeps[t.str]=null,this.viewmodel.register(t,this.computation,"computed")}};var Gd=$d,Kd=function(t,e){this.key=t,this.getter=e.getter,this.setter=e.setter,this.hardDeps=e.deps||[],this.softDeps=[],this.unresolvedDeps={},this.depValues={},this._dirty=this._firstRun=!0};Kd.prototype={constructor:Kd,init:function(t){var e,n=this;this.viewmodel=t,this.bypass=!0,e=t.get(this.key),t.clearCache(this.key.str),this.bypass=!1,this.setter&&void 0!==e&&this.set(e),this.hardDeps&&this.hardDeps.forEach(function(e){return t.register(e,n,"computed")})},invalidate:function(){this._dirty=!0},get:function(){var t,e,n=this,r=!1;if(this.getting){var i="The "+this.key.str+" computation indirectly called itself. This probably indicates a bug in the computation. It is commonly caused by `array.sort(...)` - if that's the case, clone the array first with `array.slice().sort(...)`";return d(i),this.value}if(this.getting=!0,this._dirty){if(this._firstRun||!this.hardDeps.length&&!this.softDeps.length?r=!0:[this.hardDeps,this.softDeps].forEach(function(t){var e,i,a;if(!r)for(a=t.length;a--;)if(e=t[a],i=n.viewmodel.get(e),!s(i,n.depValues[e.str]))return n.depValues[e.str]=i,void(r=!0)}),r){this.viewmodel.capture();try{this.value=this.getter()}catch(a){m('Failed to compute "%s"',this.key.str),h(a.stack||a),this.value=void 0}t=this.viewmodel.release(),e=this.updateDependencies(t),e&&[this.hardDeps,this.softDeps].forEach(function(t){t.forEach(function(t){n.depValues[t.str]=n.viewmodel.get(t)})})}this._dirty=!1}return this.getting=this._firstRun=!1,this.value},set:function(t){if(this.setting)return void(this.value=t);if(!this.setter)throw Error("Computed properties without setters are read-only. (This may change in a future version of Ractive!)");this.setter(t)},updateDependencies:function(t){var e,n,r,i,a;for(n=this.softDeps,e=n.length;e--;)r=n[e],-1===t.indexOf(r)&&(i=!0,this.viewmodel.unregister(r,this,"computed"));for(e=t.length;e--;)r=t[e],-1!==n.indexOf(r)||this.hardDeps&&-1!==this.hardDeps.indexOf(r)||(i=!0,ji(this.viewmodel,r)&&!this.unresolvedDeps[r.str]?(a=new Gd(this,r.str),t.splice(e,1),this.unresolvedDeps[r.str]=a,ms.addUnresolved(a)):this.viewmodel.register(r,this,"computed"));return i&&(this.softDeps=t.slice()),i}};var Qd=Kd,Yd=Ni,Jd={FAILED_LOOKUP:!0},Zd=Fi,Xd={},tm=Ri,em=Li,nm=function(t,e){this.localKey=t,this.keypath=e.keypath,this.origin=e.origin,this.deps=[],this.unresolved=[],this.resolved=!1};nm.prototype={forceResolution:function(){this.keypath=this.localKey,this.setup()},get:function(t,e){return this.resolved?this.origin.get(this.map(t),e):void 0},getValue:function(){return this.keypath?this.origin.get(this.keypath):void 0},initViewmodel:function(t){this.local=t,this.setup()},map:function(t){return void 0===typeof this.keypath?this.localKey:t.replace(this.localKey,this.keypath)},register:function(t,e,n){this.deps.push({keypath:t,dep:e,group:n}),this.resolved&&this.origin.register(this.map(t),e,n)},resolve:function(t){void 0!==this.keypath&&this.unbind(!0),this.keypath=t,this.setup()},set:function(t,e){this.resolved||this.forceResolution(),this.origin.set(this.map(t),e)},setup:function(){var t=this;void 0!==this.keypath&&(this.resolved=!0,this.deps.length&&(this.deps.forEach(function(e){var n=t.map(e.keypath);if(t.origin.register(n,e.dep,e.group),e.dep.setValue)e.dep.setValue(t.origin.get(n));else{if(!e.dep.invalidate)throw Error("An unexpected error occurred. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!");e.dep.invalidate()}}),this.origin.mark(this.keypath)))},setValue:function(t){if(!this.keypath)throw Error("Mapping does not have keypath, cannot set value. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!");this.origin.set(this.keypath,t)},unbind:function(t){var e=this;t||delete this.local.mappings[this.localKey],this.resolved&&(this.deps.forEach(function(t){e.origin.unregister(e.map(t.keypath),t.dep,t.group)}),this.tracker&&this.origin.unregister(this.keypath,this.tracker))},unregister:function(t,e,n){var r,i;if(this.resolved){for(r=this.deps,i=r.length;i--;)if(r[i].dep===e){r.splice(i,1);break}this.origin.unregister(this.map(t),e,n)}}};var rm=Ii,im=function(t,e){var n,r,i,a;return n={},r=0,i=t.map(function(t,i){var o,s,u;s=r,u=e.length;do{if(o=e.indexOf(t,s),-1===o)return a=!0,-1;s=o+1}while(n[o]&&u>s);return o===r&&(r+=1),o!==i&&(a=!0),n[o]=!0,o})},am=Di,om={},sm=Bi,um=zi,cm=Hi,lm=Wi,pm=Gi,hm={implicit:!0},fm={noCascade:!0},dm=Qi,mm=Yi,vm=function(t){var e,n,r=t.adapt,i=t.data,a=t.ractive,o=t.computed,s=t.mappings;this.ractive=a,this.adaptors=r,this.onchange=t.onchange,this.cache={},this.cacheMap=wo(null),this.deps={computed:wo(null),"default":wo(null)},this.depsMap={computed:wo(null),"default":wo(null)},this.patternObservers=[],this.specials=wo(null),this.wrapped=wo(null),this.computations=wo(null),this.captureGroups=[],this.unresolvedImplicitDependencies=[],this.changes=[],this.implicitChanges={},this.noCascade={},this.data=i,this.mappings=wo(null);for(e in s)this.map(E(e),s[e]);if(i)for(e in i)(n=this.mappings[e])&&void 0===n.getValue()&&n.setValue(i[e]);for(e in o)s&&e in s&&p("Cannot map to a computed property ('%s')",e),this.compute(E(e),o[e]);this.ready=!0};vm.prototype={adapt:Ud,applyChanges:zd,capture:Hd,clearCache:Wd,compute:Yd,get:Zd,init:tm,map:em,mark:rm,merge:am,register:sm,release:um,reset:cm,set:lm,smartUpdate:pm,teardown:dm,unregister:mm};var gm=vm;Zi.prototype={constructor:Zi,begin:function(t){this.inProcess[t._guid]=!0},end:function(t){var e=t.parent;e&&this.inProcess[e._guid]?Xi(this.queue,e).push(t):ta(this,t),delete this.inProcess[t._guid]}};var bm=Zi,ym=ea,wm=/\$\{([^\}]+)\}/g,xm=new ns("construct"),_m=new ns("config"),km=new bm("init"),Em=0,Tm=["adaptors","components","decorators","easing","events","interpolators","partials","transitions"],Cm=aa,Om=la;la.prototype={bubble:function(){this.dirty||(this.dirty=!0,ms.addView(this))},update:function(){this.callback(this.fragment.getValue()),this.dirty=!1},rebind:function(t,e){this.fragment.rebind(t,e)},unbind:function(){this.fragment.unbind()}};var Sm=function(t,e,n,i,o){var s,u,c,l,p,h,f={},d={},v={},g=[];for(u=t.parentFragment,c=t.root,o=o||{},r(f,o),o.content=i||[],f[""]=o.content,e.defaults.el&&m("The <%s/> component has a default `el` property; it has been disregarded",t.name),l=u;l;){if(l.owner.type===Ac){p=l.owner.container;break}l=l.parent}return n&&Object.keys(n).forEach(function(e){var r,i,o=n[e];if("string"==typeof o)r=cl(o),d[e]=r?r.value:o;else if(0===o)d[e]=!0;else{if(!a(o))throw Error("erm wut");ha(o)?(v[e]={origin:t.root.viewmodel,keypath:void 0},i=pa(t,o[0],function(t){t.isSpecial?h?s.set(e,t.value):(d[e]=t.value,delete v[e]):h?s.viewmodel.mappings[e].resolve(t):v[e].keypath=t})):i=new Om(t,o,function(t){h?s.set(e,t):d[e]=t}),g.push(i)}}),s=wo(e.prototype),Cm(s,{el:null,append:!0,data:d,partials:o,magic:c.magic||e.defaults.magic,modifyArrays:c.modifyArrays,adapt:c.adapt},{parent:c,component:t,container:p,mappings:v,inlinePartials:f,cssIds:u.cssIds}),h=!0,t.resolvers=g,s},Am=fa,Pm=function(t){var e,n;for(e=t.root;e;)(n=e._liveComponentQueries["_"+t.name])&&n.push(t.instance),e=e.parent},jm=ma,Nm=va,Fm=ga,Mm=ba,Rm=ya,Lm=new ns("teardown"),Im=xa,Dm=function(t,e){this.init(t,e)};Dm.prototype={detach:md,find:gd,findAll:bd,findAllComponents:yd,findComponent:wd,findNextNode:xd,firstNode:_d,init:jm,rebind:Nm,render:Fm,toString:Mm,unbind:Rm,unrender:Im};var Um=Dm,Vm=function(t){this.type=Cc,this.value=t.template.c};Vm.prototype={detach:dl,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createComment(this.value)),this.node},toString:function(){return""},unrender:function(t){t&&this.node.parentNode.removeChild(this.node)}};var Bm=Vm,qm=function(t){var e,n;this.type=Ac,this.container=e=t.parentFragment.root,this.component=n=e.component,this.container=e,this.containerFragment=t.parentFragment,this.parentFragment=n.parentFragment;var r=this.name=t.template.n||"",i=e._inlinePartials[r];i||(m('Could not find template for partial "'+r+'"',{ractive:t.root}),i=[]),this.fragment=new ev({owner:this,root:e.parent,template:i,pElement:this.containerFragment.pElement}),a(n.yielders[r])?n.yielders[r].push(this):n.yielders[r]=[this],ms.scheduleTask(function(){if(n.yielders[r].length>1)throw Error("A component template can only have one {{yield"+(r?" "+r:"")+"}} declaration at a time")})};qm.prototype={detach:function(){return this.fragment.detach()},find:function(t){return this.fragment.find(t)},findAll:function(t,e){return this.fragment.findAll(t,e)},findComponent:function(t){return this.fragment.findComponent(t)},findAllComponents:function(t,e){return this.fragment.findAllComponents(t,e)},findNextNode:function(){return this.containerFragment.findNextNode(this)},firstNode:function(){return this.fragment.firstNode()},getValue:function(t){return this.fragment.getValue(t)},render:function(){return this.fragment.render()},unbind:function(){this.fragment.unbind()},unrender:function(t){this.fragment.unrender(t),L(this.component.yielders[this.name],this)},rebind:function(t,e){this.fragment.rebind(t,e)},toString:function(){return""+this.fragment}};var zm=qm,Hm=function(t){this.declaration=t.template.a};Hm.prototype={init:jo,render:jo,unrender:jo,teardown:jo,toString:function(){return""}};var Wm=Hm,$m=_a,Gm=Ea,Km=Ta,Qm=Ca,Ym=Aa,Jm=ja,Zm=function(t){this.init(t)};Zm.prototype={bubble:sc,detach:uc,find:cc,findAll:lc,findAllComponents:pc,findComponent:hc,findNextNode:fc,firstNode:dc,getArgsList:pl,getNode:hl,getValue:fl,init:$m,rebind:Gm,registerIndexRef:function(t){var e=this.registeredIndexRefs;-1===e.indexOf(t)&&e.push(t)},render:Km,toString:Qm,unbind:Ym,unregisterIndexRef:function(t){var e=this.registeredIndexRefs;e.splice(e.indexOf(t),1)},unrender:Jm};var Xm,tv,ev=Zm,nv=Na,rv=["template","partials","components","decorators","events"],iv=new ns("reset"),av=function(t,e){function n(e,r,i){i&&i.partials[t]||e.forEach(function(e){e.type===Tc&&e.getPartialName()===t&&r.push(e),e.fragment&&n(e.fragment.items,r,i),a(e.fragments)?n(e.fragments,r,i):a(e.items)?n(e.items,r,i):e.type===Sc&&e.instance&&n(e.instance.fragment.items,r,e.instance),e.type===Ec&&(a(e.attributes)&&n(e.attributes,r,i),a(e.conditionalAttributes)&&n(e.conditionalAttributes,r,i))})}var r,i=[];return n(this.fragment.items,i),this.partials[t]=e,r=ms.start(this,!0),i.forEach(function(e){e.value=void 0,e.setValue(t)}),ms.end(),r},ov=Fa,sv=gu("reverse"),uv=Ma,cv=gu("shift"),lv=gu("sort"),pv=gu("splice"),hv=La,fv=Ia,dv=new ns("teardown"),mv=Ua,vv=Va,gv=Ba,bv=new ns("unrender"),yv=gu("unshift"),wv=qa,xv=new ns("update"),_v=za,kv={add:Yo,animate:xs,detach:ks,find:Ts,findAll:Ms,findAllComponents:Rs,findComponent:Ls,findContainer:Is,findParent:Ds,fire:qs,get:zs,insert:Ws,merge:Gs,observe:uu,observeOnce:cu,off:hu,on:fu,once:du,pop:bu,push:yu,render:Ou,reset:nv,resetPartial:av,resetTemplate:ov,reverse:sv,set:uv,shift:cv,sort:lv,splice:pv,subtract:hv,teardown:fv,toggle:mv,toHTML:vv,toHtml:vv,unrender:gv,unshift:yv,update:wv,updateModel:_v},Ev=function(t,e,n){return n||Wa(t,e)?function(){var n,r="_super"in this,i=this._super;return this._super=e,n=t.apply(this,arguments),r&&(this._super=i),n}:t},Tv=$a,Cv=Ya,Ov=function(t){var e,n,r={};return t&&(e=t._ractive)?(r.ractive=e.root,r.keypath=e.keypath.str,r.index={},(n=Cl(e.proxy.parentFragment))&&(r.index=Cl.resolve(n)),r):r};Xm=function(t){return this instanceof Xm?void Cm(this,t):new Xm(t)},tv={DEBUG:{writable:!0,value:!0},DEBUG_PROMISES:{writable:!0,value:!0},extend:{value:Cv},getNodeInfo:{value:Ov},parse:{value:zu},Promise:{value:os},svg:{value:ro},magic:{value:eo},VERSION:{value:"0.7.3"},adaptors:{writable:!0,value:{}},components:{writable:!0,value:{}},decorators:{writable:!0,value:{}},easing:{writable:!0,value:uo},events:{writable:!0,value:{}},interpolators:{writable:!0,value:Uo},partials:{writable:!0,value:{}},transitions:{writable:!0,value:{}}},_o(Xm,tv),Xm.prototype=r(kv,so),Xm.prototype.constructor=Xm,Xm.defaults=Xm.prototype;var Sv="function";if(typeof Date.now!==Sv||typeof String.prototype.trim!==Sv||typeof Object.keys!==Sv||typeof Array.prototype.indexOf!==Sv||typeof Array.prototype.forEach!==Sv||typeof Array.prototype.map!==Sv||typeof Array.prototype.filter!==Sv||"undefined"!=typeof window&&typeof window.addEventListener!==Sv)throw Error("It looks like you're attempting to use Ractive.js in an older browser. You'll need to use one of the 'legacy builds' in order to continue - see http://docs.ractivejs.org/latest/legacy-builds for more information.");var Av=Xm;return Av})},{}],8:[function(t,e,n){!function(){function t(t,e,n){return t.call.apply(t.bind,arguments)}function n(t,e,n){if(!t)throw Error();if(2r;r++)if(n[r]==e)return!0;return!1}function u(t){if("string"==typeof t.fa)return t.fa;var e=t.k.location.protocol;return"about:"==e&&(e=t.F.location.protocol),"https:"==e?"https:":"http:"}function c(t,e,n){function r(){u&&i&&o&&(u(s),u=null)}e=t.createElement("link",{rel:"stylesheet",href:e,media:"all"});var i=!1,o=!0,s=null,u=n||null;Z?(e.onload=function(){i=!0,r()},e.onerror=function(){i=!0,s=Error("Stylesheet failed to load"),r()}):setTimeout(function(){i=!0,r()},0),a(t,"head",e)}function l(t,e,n,r){var i=t.H.getElementsByTagName("head")[0];if(i){var a=t.createElement("script",{src:e}),o=!1;return a.onload=a.onreadystatechange=function(){o||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(o=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&i.removeChild(a))},i.appendChild(a),setTimeout(function(){o||(o=!0,n&&n(Error("Script load timeout")))},r||5e3),a}return null}function p(){this.S=0,this.K=null}function h(t){return t.S++,function(){t.S--,d(t)}}function f(t,e){t.K=e,d(t)}function d(t){0==t.S&&t.K&&(t.K(),t.K=null)}function m(t){this.ea=t||"-"}function v(t,e){this.Q=t,this.M=4,this.L="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.L=n[1],this.M=parseInt(n[2],10))}function g(t){return w(t)+" "+(t.M+"00")+" 300px "+b(t.Q)}function b(t){var e=[];t=t.split(/,\s*/);for(var n=0;nparseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return tt}function M(t,e,n){for(var r in X)if(X.hasOwnProperty(r)&&e===t.s[X[r]]&&n===t.s[X[r]])return!0;return!1}function R(t){var e,n=t.w.m.offsetWidth,r=t.A.m.offsetWidth;(e=n===t.s.serif&&r===t.s["sans-serif"])||(e=F()&&M(t,n,r)),e?J()-t.ga>=t.v?F()&&M(t,n,r)&&(null===t.Z||t.Z.hasOwnProperty(t.g.getName()))?I(t,t.G):I(t,t.J):L(t):I(t,t.G)}function L(t){setTimeout(r(function(){R(this)},t),50)}function I(t,e){setTimeout(r(function(){this.w.remove(),this.A.remove(),this.C.remove(),this.D.remove(),e(this.g)},t),0)}function D(t,e,n){this.a=t,this.p=e,this.P=0,this.ba=this.Y=!1,this.v=n}function U(t){0==--t.P&&t.Y&&(t.ba?(t=t.p,t.u&&o(t.j,[t.e.d(t.f,"active")],[t.e.d(t.f,"loading"),t.e.d(t.f,"inactive")]),T(t,"active")):E(t.p))}function V(t){this.F=t,this.q=new C,this.$=0,this.T=this.U=!0}function B(t,e,n,i,a){var s=0==--t.$;(t.T||t.U)&&setTimeout(function(){var t=a||null,u=i||null||{};if(0===n.length&&s)E(e.p);else{e.P+=n.length,s&&(e.Y=s);var c,l=[];for(c=0;ce;e++)r[e].load(function(e,n,r){B(t,a,e,n,r)})}function z(t,e,n){this.N=t?t:e+nt,this.o=[],this.R=[],this.ca=n||""}function H(t,e){for(var n=e.length,r=0;n>r;r++){var i=e[r].split(":");3==i.length&&t.R.push(i.pop());var a="";2==i.length&&""!=i[1]&&(a=":"),t.o.push(i.join(a))}}function W(t){this.o=t,this.aa=[],this.I={}}function $(t,e){this.a=t,this.c=e}function G(t,e){this.a=t,this.c=e,this.X=[]}function K(t,e){this.a=t,this.c=e}function Q(t,e){this.a=t,this.c=e}function Y(t,e){this.a=t,this.c=e}var J=Date.now||function(){return+new Date},Z=!!window.FontFace;i.prototype.createElement=function(t,e,n){if(t=this.H.createElement(t),e)for(var r in e)e.hasOwnProperty(r)&&("style"==r?t.style.cssText=e[r]:t.setAttribute(r,e[r]));return n&&t.appendChild(this.H.createTextNode(n)),t},m.prototype.d=function(t){for(var e=[],n=0;n=n.v?n.J(n.g):e.fonts.load(g(n.g),n.h).then(function(e){1<=e.length?n.G(n.g):setTimeout(t,25)},function(){n.J(n.g)})}var e=this.a.k.document,n=this,r=J();t()};var X={ia:"serif",ha:"sans-serif"},tt=null;N.prototype.start=function(){this.s.serif=this.C.m.offsetWidth,this.s["sans-serif"]=this.D.m.offsetWidth,this.ga=J(),R(this)};var et=null;D.prototype.V=function(t){var e=this.p;e.u&&o(e.j,[e.e.d(e.f,t.getName(),""+y(t),"active")],[e.e.d(e.f,t.getName(),""+y(t),"loading"),e.e.d(e.f,t.getName(),""+y(t),"inactive")]),T(e,"fontactive",t),this.ba=!0,U(this)},D.prototype.W=function(t){var e=this.p;if(e.u){var n=s(e.j,e.e.d(e.f,t.getName(),""+y(t),"active")),r=[],i=[e.e.d(e.f,t.getName(),""+y(t),"loading")];n||r.push(e.e.d(e.f,t.getName(),""+y(t),"inactive")),o(e.j,r,i)}T(e,"fontinactive",t),U(this)},V.prototype.load=function(t){this.a=new i(this.F,t.context||this.F),this.U=!1!==t.events,this.T=!1!==t.classes,q(this,new _(this.a,t),t)};var nt="//fonts.googleapis.com/css";z.prototype.d=function(){if(0==this.o.length)throw Error("No fonts to load!");if(-1!=this.N.indexOf("kit="))return this.N;for(var t=this.o.length,e=[],n=0;t>n;n++)e.push(this.o[n].replace(/ /g,"+"));return t=this.N+"?family="+e.join("%7C"),0e;e++){var n=this.o[e].split(":"),r=n[0].replace(/\+/g," "),i=["n4"];if(2<=n.length){var a,o=n[1];if(a=[],o)for(var o=o.split(","),s=o.length,u=0;s>u;u++){var c;if(c=o[u],c.match(/^[\w-]+$/))if(c=ot.exec(c.toLowerCase()),null==c)c="";else{var l;if(l=c[1],null==l||""==l)l="4";else{var p=it[l];l=p?p:isNaN(l)?"4":l.substr(0,1)}c=c[2],c=""+(null==c||""==c?"n":at[c])+l}else c="";c&&a.push(c)}0i;++i){var o=n.fonts[i];r.X.push(new v(o.name,x("font-weight:"+o.weight+";font-style:"+o.style)))}t(r.X)},l(this.a,this.B(e),function(e){e&&t([])})):t([])},K.prototype.B=function(t){return(this.c.api||"https://use.typekit.net")+"/"+t+".js"},K.prototype.load=function(t){var e=this.c.id,n=this.a.k;e?l(this.a,this.B(e),function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var r=[],i=0;ie;e++)c(this.a,r[e],h(o));var s=[];for(e=0,n=i.length;n>e;e++)if(r=i[e].split(":"),r[1])for(var u=r[1].split(","),l=0;l50?"good":t>25?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[31,1,988],t:7,e:"n-notice",f:[{t:4,f:[{p:[33,5,1032],t:7,e:"n-section",a:{label:"Interface Lock"},f:[{p:[34,7,1074],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.locked"],s:'_0?"lock":"unlock"'},p:[34,23,1090]}],action:"lock"},f:[{t:2,x:{r:["data.locked"],s:'_0?"Engaged":"Disengaged"'},p:[34,74,1141]}]}]}],n:50,r:"data.siliconUser",p:[32,3,1002]},{t:4,n:51,f:[{p:[37,5,1230],t:7,e:"span",f:["Swipe an ID card to ",{t:2,x:{r:["data.locked"],s:'_0?"unlock":"lock"'},p:[37,31,1256]}," this interface."]}],r:"data.siliconUser"}]}," ",{p:[40,1,1340],t:7,e:"n-display",a:{title:"Power Status"},f:[{p:[41,3,1376],t:7,e:"n-section",a:{label:"Main Breaker"},f:[{t:4,f:[{p:[43,7,1462],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.isOperating"],s:'_0?"good":"bad"'},p:[43,20,1475]}]},f:[{t:2,x:{r:["data.isOperating"],s:'_0?"On":"Off"'},p:[43,59,1514]}]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"},p:[42,5,1414]},{t:4,n:51,f:[{p:[45,7,1578],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isOperating"],s:'_0?"power-off":"close"'},p:[45,23,1594]}],style:[{t:2,x:{r:["data.isOperating"],s:'_0?"selected":null'},p:[45,76,1647]}],action:"breaker"},f:[{t:2,x:{r:["data.isOperating"],s:'_0?"On":"Off"'},p:[46,26,1715]}]}],x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"}}]}," ",{p:[49,3,1794],t:7,e:"n-section",a:{label:"External Power"},f:[{p:[50,5,1834],t:7,e:"span",a:{"class":[{t:2,x:{r:["powerState","data.externalPower"],s:"_0(_1)"},p:[50,18,1847]}]},f:[{t:2,x:{r:["data.externalPower"],s:'_0==2?"Good":_0==1?"Low":"None"'},p:[50,54,1883]}]}]}," ",{p:[52,3,1989],t:7,e:"n-section",a:{label:"Power Cell"},f:[{t:4,f:[{p:[54,7,2069],t:7,e:"n-bar",a:{min:"0",max:"100",value:[{t:2,r:"data.powerCellStatus",p:[54,39,2101]}],state:[{t:2,r:"powerCellStatusState",p:[54,72,2134]}]},f:[{t:2,x:{r:["adata.powerCellStatus"],s:"Math.fixed(_0)"},p:[54,98,2160]},"%"]}],n:50,x:{r:["data.powerCellStatus"],s:"_0!=null"},p:[53,5,2025]},{t:4,n:51,f:[{p:[56,7,2228],t:7,e:"span",a:{"class":"bad"},f:["Power cell removed."]}],x:{r:["data.powerCellStatus"],s:"_0!=null"}}]}," ",{t:4,f:[{p:[60,5,2347],t:7,e:"n-section",a:{label:"Charge Mode"},f:[{t:4,f:[{p:[62,9,2436],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.chargeMode"],s:'_0?"good":"bad"'},p:[62,22,2449]}]},f:[{t:2,x:{r:["data.chargeMode"],s:'_0?"Auto":"Off"'},p:[62,60,2487]}]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"},p:[61,7,2386]},{t:4,n:51,f:[{p:[64,9,2556],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.chargeMode"],s:'_0?"refresh":"close"'},p:[64,25,2572]}],style:[{t:2,x:{r:["data.chargeMode"],s:'_0?"selected":null'},p:[64,75,2622]}],action:"charge"},f:[{t:2,x:{r:["data.chargeMode"],s:'_0?"Auto":"Off"'},p:[65,27,2690]}]}],x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"}}," [",{p:[68,8,2775],t:7,e:"span",a:{"class":[{t:2,x:{r:["powerState","data.chargingStatus"],s:"_0(_1)"},p:[68,21,2788]}]},f:[{t:2,x:{r:["data.chargingStatus"],s:'_0==2?"Fully Charged":_0==1?"Charging":"Not Charging"'},p:[68,58,2825]}]},"]"]}],n:50,x:{r:["data.powerCellStatus"],s:"_0!=null"},p:[59,3,2305]}]}," ",{p:[72,1,2981],t:7,e:"n-display",a:{title:"Power Channels"},f:[{t:4,f:[{p:[74,5,3054],t:7,e:"n-section",a:{label:[{t:2,r:"title",p:[74,23,3072]}],nowrap:0},f:[{p:[75,7,3098],t:7,e:"div",a:{"class":"content"},f:[{t:2,x:{r:["powerLoad"],s:"Math.round(_0)"},p:[75,28,3119]}," W"]}," ",{p:[76,7,3160],t:7,e:"div",a:{"class":"content"},f:[{p:[76,28,3181],t:7,e:"span",a:{"class":[{t:2,x:{r:["status"],s:'_0>=2?"good":"bad"'},p:[76,41,3194]}]},f:[{t:2,x:{r:["status"],s:'_0>=2?"On":"Off"'},p:[76,75,3228]}]}]}," ",{p:[77,7,3279],t:7,e:"div",a:{"class":"content"},f:["[",{p:[77,29,3301],t:7,e:"span",f:[{t:2,x:{r:["status"],s:'_0==1||_0==3?"Auto":"Manual"'},p:[77,35,3307]}]},"]"]}," ",{p:[78,7,3379],t:7,e:"div",a:{"class":"content",style:"float:right"},f:[{t:4,f:[{p:[80,11,3482],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["status"],s:'_0==1||_0==3?"selected":null'},p:[80,43,3514]}],action:"channel",params:[{t:2,r:"topicParams.auto",p:[81,38,3604]}]},f:["Auto"]}," ",{p:[82,11,3653],t:7,e:"n-button",a:{icon:"power-off",state:[{t:2,x:{r:["status"],s:'_0==2?"selected":null'},p:[82,45,3687]}],action:"channel",params:[{t:2,r:"topicParams.on",p:[83,21,3762]}]},f:["On"]}," ",{p:[84,11,3807],t:7,e:"n-button",a:{icon:"close",state:[{t:2,x:{r:["status"],s:'_0==0?"selected":null'},p:[84,41,3837]}],action:"channel",params:[{t:2,r:"topicParams.off",p:[85,21,3912]}]},f:["Off"]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"!_0||_1"},p:[79,9,3430]}]}]}],n:52,r:"adata.powerChannels",p:[73,3,3019]}," ",{p:[90,3,4013],t:7,e:"n-section",a:{label:"Total Load"},f:[{p:[91,5,4049],t:7,e:"span",a:{"class":"bold"},f:[{t:2,x:{r:["adata.totalLoad"],s:"Math.round(_0)"},p:[91,24,4068]}," W"]}]}]}," ",{t:4,f:[{p:[95,3,4168],t:7,e:"n-display",a:{title:"System Overrides"},f:[{p:[96,5,4210],t:7,e:"n-button",a:{icon:"lightbulb-o",action:"overload"},f:["Overload"]}," ",{t:4,f:[{p:[98,7,4313],t:7,e:"n-button",a:{icon:[{t:2,r:"malfIcon",p:[98,23,4329]}],state:[{t:2,x:{r:["data.malfStatus"],s:'_0==4?"disabled":null'},p:[98,44,4350]}],action:[{t:2,r:"malfAction",p:[98,98,4404]}]},f:[{t:2,r:"malfButton",p:[98,114,4420]}]}],n:50,r:"data.malfStatus",p:[97,5,4282]}]}],n:50,r:"data.siliconUser",p:[94,1,4140]},{p:[102,1,4485],t:7,e:"n-notice",f:[{p:[103,3,4499],t:7,e:"n-section",a:{label:"Cover Lock"},f:[{t:4,f:[{p:[105,7,4583],t:7,e:"span",f:[{t:2,x:{r:["data.coverLocked"],s:'_0?"Engaged":"Disengaged"'},p:[105,13,4589]}]}],n:50,x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"},p:[104,5,4535]},{t:4,n:51,f:[{p:[107,7,4665],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.coverLocked"],s:'_0?"lock":"unlock"'},p:[107,23,4681]}],action:"cover"},f:[{t:2,x:{r:["data.coverLocked"],s:'_0?"Engaged":"Disengaged"'},p:[107,80,4738]}]}],x:{r:["data.locked","data.siliconUser"],s:"_0&&!_1"}}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],29:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",f:[{p:[2,3,15],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,46],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[3,21,62]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[3,65,106]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[4,22,161]}]}]}," ",{p:[6,3,218],t:7,e:"n-section",a:{label:"Output Pressure"},f:[{p:[7,5,259],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[8,5,353],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.set_pressure","data.max_pressure"],s:'_0==_1?"disabled":null'},p:[8,34,382]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}," ",{p:[9,5,513],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.set_pressure"],s:"Math.round(_0)"},p:[9,30,538]}," kPa"]}]}," ",{p:[11,3,603],t:7,e:"n-section",a:{label:"Filter"},f:[{p:[12,5,635],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==-1?"selected":null'},p:[12,22,652]}],action:"filter",params:'{"mode": -1}'},f:["Nothing"]}," ",{p:[14,5,769],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==0?"selected":null'},p:[14,22,786]}],action:"filter",params:'{"mode": 0}'},f:["Plasma"]}," ",{p:[16,5,900],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==1?"selected":null'},p:[16,22,917]}],action:"filter",params:'{"mode": 1}'},f:["O2"]}," ",{p:[18,5,1027],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==2?"selected":null'},p:[18,22,1044]}],action:"filter",params:'{"mode": 2}'},f:["N2"]}," ",{p:[20,5,1154],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==3?"selected":null'},p:[20,22,1171]}],action:"filter",params:'{"mode": 3}'},f:["CO2"]}," ",{p:[22,5,1282],t:7,e:"n-button",a:{state:[{t:2,x:{r:["data.filter_type"],s:'_0==4?"selected":null'},p:[22,22,1299]}],action:"filter",params:'{"mode": 4}'},f:["N2O"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],30:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",f:[{p:[2,3,15],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,46],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[3,21,62]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[3,65,106]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[4,22,161]}]}]}," ",{p:[6,3,218],t:7,e:"n-section",a:{label:"Output Pressure"},f:[{p:[7,5,259],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[8,5,353],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.set_pressure","data.max_pressure"],s:'_0==_1?"disabled":null'},p:[8,34,382]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}," ",{p:[9,5,513],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.set_pressure"],s:"Math.round(_0)"},p:[9,30,538]}," kPa"]}]}," ",{p:[11,3,603],t:7,e:"n-section",a:{label:"Node 1"},f:[{p:[12,5,635],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==0?"disabled":null'},p:[12,43,673]}],action:"node1",params:'{"concentration": -0.1}'}}," ",{p:[14,5,790],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==0?"disabled":null'},p:[14,38,823]}],action:"node1",params:'{"concentration": -0.01}'}}," ",{p:[16,5,941],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==100?"disabled":null'},p:[16,37,973]}],action:"node1",params:'{"concentration": 0.01}'}}," ",{p:[18,5,1092],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.node1_concentration"],s:'_0==100?"disabled":null'},p:[18,42,1129]}],action:"node1",params:'{"concentration": 0.1}'}}," ",{p:[20,5,1247],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.node1_concentration"],s:"Math.round(_0)"},p:[20,30,1272]},"%"]}]}," ",{p:[22,3,1341],t:7,e:"n-section",a:{label:"Node 2"},f:[{p:[23,5,1373],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==0?"disabled":null'},p:[23,43,1411]}],action:"node2",params:'{"concentration": -0.1}'}}," ",{p:[25,5,1528],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==0?"disabled":null'},p:[25,38,1561]}],action:"node2",params:'{"concentration": -0.01}'}}," ",{p:[27,5,1679],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==100?"disabled":null'},p:[27,37,1711]}],action:"node2",params:'{"concentration": 0.01}'}}," ",{p:[29,5,1830],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.node2_concentration"],s:'_0==100?"disabled":null'},p:[29,42,1867]}],action:"node2",params:'{"concentration": 0.1}'}}," ",{p:[31,5,1985],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.node2_concentration"],s:"Math.round(_0)"},p:[31,30,2010]},"%"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],31:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",f:[{ +p:[2,3,15],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,46],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[3,21,62]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[3,65,106]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[4,22,161]}]}]}," ",{t:4,f:[{p:[7,5,245],t:7,e:"n-section",a:{label:"Transfer Rate"},f:[{p:[8,7,286],t:7,e:"n-button",a:{icon:"pencil",action:"transfer",params:'{"rate": "custom"}'},f:["Set"]}," ",{p:[9,7,378],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.transfer_rate","data.max_rate"],s:'_0==_1?"disabled":null'},p:[9,36,407]}],action:"transfer",params:'{"rate": "max"}'},f:["Max"]}," ",{p:[10,7,533],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.transfer_rate"],s:"Math.round(_0)"},p:[10,32,558]}," L/s"]}]}],n:50,r:"data.max_rate",p:[6,3,218]},{t:4,n:51,f:[{p:[13,5,640],t:7,e:"n-section",a:{label:"Output Pressure"},f:[{p:[14,7,683],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[15,7,779],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.set_pressure","data.max_pressure"],s:'_0==_1?"disabled":null'},p:[15,36,808]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}," ",{p:[16,7,941],t:7,e:"span",a:{"class":"buttoninfo"},f:[{t:2,x:{r:["adata.set_pressure"],s:"Math.round(_0)"},p:[16,32,966]}," kPa"]}]}],r:"data.max_rate"}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],32:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-notice",f:[{p:[2,3,14],t:7,e:"span",f:["The regulator ",{t:2,x:{r:["data.hasHoldingTank"],s:'_0?"is":"is not"'},p:[2,23,34]}," connected to a tank."]}]}," ",{p:{button:[{p:[6,5,182],t:7,e:"n-button",a:{icon:"pencil",state:[{t:2,x:{r:["data.canLabel"],s:'_0?null:"disabled"'},p:[6,36,213]}],action:"relable"},f:["Relabel"]}]},t:7,e:"n-display",a:{title:"Canister",button:0},f:[" ",{p:[8,3,307],t:7,e:"n-section",a:{label:"Pressure"},f:[{p:[9,5,341],t:7,e:"span",f:[{t:2,x:{r:["adata.tankPressure"],s:"Math.round(_0)"},p:[9,11,347]}," kPa"]}]}," ",{p:[11,3,412],t:7,e:"n-section",a:{label:"Port"},f:[{p:[12,5,442],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.portConnected"],s:'_0?"good":"average"'},p:[12,18,455]}]},f:[{t:2,x:{r:["data.portConnected"],s:'_0?"Connected":"Not Connected"'},p:[12,63,500]}]}]}]}," ",{p:[15,1,593],t:7,e:"n-display",a:{title:"Valve"},f:[{p:[16,3,622],t:7,e:"n-section",a:{label:"Release Pressure"},f:[{p:[17,5,664],t:7,e:"n-bar",a:{min:[{t:2,r:"data.minReleasePressure",p:[17,17,676]}],max:[{t:2,r:"data.maxReleasePressure",p:[17,51,710]}],value:[{t:2,r:"data.releasePressure",p:[18,14,753]}]},f:[{t:2,x:{r:["adata.releasePressure"],s:"Math.round(_0)"},p:[18,40,779]}," kPa"]}]}," ",{p:[20,3,848],t:7,e:"n-section",a:{label:"Pressure Regulator"},f:[{p:[21,5,892],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["data.releasePressure","data.defaultReleasePressure"],s:'_0!=_1?null:"disabled"'},p:[21,37,924]}],action:"pressure",params:'{"pressure": "reset"}'},f:["Reset"]}," ",{p:[23,5,1079],t:7,e:"n-button",a:{icon:"minus",state:[{t:2,x:{r:["data.releasePressure","data.minReleasePressure"],s:'_0>_1?null:"disabled"'},p:[23,35,1109]}],action:"pressure",params:'{"pressure": "min"}'},f:["Min"]}," ",{p:[25,5,1255],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[26,5,1349],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.releasePressure","data.maxReleasePressure"],s:'_0<_1?null:"disabled"'},p:[26,34,1378]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}]}," ",{p:[29,3,1538],t:7,e:"n-section",a:{label:"Valve"},f:[{p:[30,5,1569],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.valveOpen"],s:'_0?"unlock":"lock"'},p:[30,21,1585]}],style:[{t:2,x:{r:["data.valveOpen","data.hasHoldingTank"],s:'_0?_1?"caution":"danger":null'},p:[31,14,1639]}],action:"valve"},f:[{t:2,x:{r:["data.valveOpen"],s:'_0?"Open":"Closed"'},p:[32,22,1733]}]}]}]}," ",{p:{button:[{t:4,f:[{p:[38,7,1917],t:7,e:"n-button",a:{icon:"eject",style:[{t:2,x:{r:["data.valveOpen"],s:'_0?"danger":null'},p:[38,37,1947]}],action:"eject"},f:["Eject"]}],n:50,r:"data.hasHoldingTank",p:[37,5,1882]}]},t:7,e:"n-display",a:{title:"Holding Tank",button:0},f:[" ",{t:4,f:[{p:[42,3,2080],t:7,e:"n-section",a:{label:"Label"},f:[{t:2,r:"data.holdingTank.name",p:[43,4,2110]}]}," ",{p:[45,3,2155],t:7,e:"n-section",a:{label:"Pressure"},f:[{t:2,x:{r:["adata.holdingTank.tankPressure"],s:"Math.round(_0)"},p:[46,4,2188]}," kPa"]}],n:50,r:"data.hasHoldingTank",p:[41,3,2049]},{t:4,n:51,f:[{p:[49,3,2269],t:7,e:"n-section",f:[{p:[50,4,2285],t:7,e:"span",a:{"class":"average"},f:["No Holding Tank"]}]}],r:"data.hasHoldingTank"}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],33:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",a:{title:"Power"},f:[{p:[2,3,29],t:7,e:"n-section",a:{label:"Energy"},f:[{p:[3,5,61],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.maxEnergy",p:[3,25,81]}],value:[{t:2,r:"data.energy",p:[3,52,108]}]},f:[{t:2,x:{r:["adata.energy"],s:"Math.fixed(_0)"},p:[3,69,125]}," Units"]}]}," ",{t:4,f:[{p:[6,5,227],t:7,e:"n-section",a:{label:"Amount"},f:[{t:4,f:[{p:[8,9,307],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.amount","."],s:'_0==_1?"selected":null'},p:[8,38,336]}],action:"amount",params:['{"amount": ',{t:2,r:".",p:[8,115,413]},"}"]},f:[{t:2,r:".",p:[8,123,421]}]}],n:52,r:"data.beakerTransferAmounts",p:[7,7,261]}]}],n:50,r:"data.beakerTransferAmounts",p:[5,3,187]}]}," ",{p:[13,1,499],t:7,e:"n-display",a:{title:"Dispense"},f:[{p:[14,3,531],t:7,e:"n-section",f:[{t:4,f:[{p:[16,7,580],t:7,e:"n-button",a:{grid:0,icon:"tint",action:"dispense",params:['{"reagent": "',{t:2,r:"id",p:[16,73,646]},'"}']},f:[{t:2,r:"title",p:[16,83,656]}]}],n:52,r:"data.chemicals",p:[15,5,548]}]}]}," ",{p:{button:[{p:[22,5,785],t:7,e:"n-button",a:{icon:"eject",state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[22,35,815]}],action:"eject"},f:["Eject"]}]},t:7,e:"n-display",a:{title:"Beaker",button:0},f:[" ",{t:4,f:[{p:[25,5,951],t:7,e:"n-section",a:{label:"Remove"},f:[{t:4,f:[{p:[27,9,1031],t:7,e:"n-button",a:{icon:"minus",action:"remove",params:['{"amount": ',{t:2,r:".",p:[27,67,1089]},"}"]},f:[{t:2,r:".",p:[27,75,1097]}]}],n:52,r:"data.beakerTransferAmounts",p:[26,7,985]}]}],n:50,r:"data.beakerTransferAmounts",p:[24,3,911]}," ",{p:[31,3,1163],t:7,e:"n-section",a:{label:"Contents"},f:[{t:4,f:[{p:[33,7,1232],t:7,e:"span",f:[{t:2,x:{r:["adata.beakerCurrentVolume"],s:"Math.round(_0)"},p:[33,13,1238]},"/",{t:2,r:"data.beakerMaxVolume",p:[33,55,1280]}," Units"]}," ",{p:[34,7,1325],t:7,e:"br"}," ",{t:4,f:[{p:[36,9,1378],t:7,e:"span",a:{"class":"highlight"},t0:"fade",f:[{t:2,x:{r:["volume"],s:"Math.fixed(_0,2)"},p:[36,52,1421]}," units of ",{t:2,r:"name",p:[36,87,1456]}]},{p:[36,102,1471],t:7,e:"br"}],n:52,r:"adata.beakerContents",p:[35,7,1338]},{t:4,n:51,f:[{p:[38,9,1502],t:7,e:"span",a:{"class":"bad"},f:["Beaker Empty"]}],r:"adata.beakerContents"}],n:50,r:"data.isBeakerLoaded",p:[32,5,1197]},{t:4,n:51,f:[{p:[41,7,1578],t:7,e:"span",a:{"class":"average"},f:["No Beaker"]}],r:"data.isBeakerLoaded"}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],34:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",a:{title:"Thermostat"},f:[{p:[2,3,34],t:7,e:"n-section",a:{label:"Power"},f:[{p:[3,5,65],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isActive"],s:'_0?"power-off":"close"'},p:[3,21,81]}],style:[{t:2,x:{r:["data.isActive"],s:'_0?"selected":null'},p:[4,10,134]}],state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[5,10,183]}],action:"power"},f:[{t:2,x:{r:["data.isActive"],s:'_0?"On":"Off"'},p:[6,18,246]}]}]}," ",{p:[8,3,309],t:7,e:"n-section",a:{label:"Target"},f:[{p:[9,4,340],t:7,e:"n-button",a:{icon:"pencil",action:"temperature"},f:[{t:2,x:{r:["adata.targetTemp"],s:"Math.round(_0)"},p:[9,49,385]}," K"]}]}]}," ",{p:{button:[{p:[14,5,524],t:7,e:"n-button",a:{icon:"eject",state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[14,35,554]}],action:"eject"},f:["Eject"]}]},t:7,e:"n-display",a:{title:"Beaker",button:0},f:[" ",{p:[16,3,650],t:7,e:"n-section",a:{label:"Contents"},f:[{t:4,f:[{p:[18,7,719],t:7,e:"span",f:["Temperature: ",{t:2,x:{r:["adata.currentTemp"],s:"Math.round(_0)"},p:[18,26,738]}," K"]}," ",{p:[19,7,788],t:7,e:"br"}," ",{t:4,f:[{p:[21,9,842],t:7,e:"span",a:{"class":"highlight"},t0:"fade",f:[{t:2,x:{r:["volume"],s:"Math.fixed(_0,2)"},p:[21,52,885]}," units of ",{t:2,r:"name",p:[21,87,920]}]},{p:[21,102,935],t:7,e:"br"}],n:52,r:"adata.beakerContents",p:[20,7,802]},{t:4,n:51,f:[{p:[23,9,966],t:7,e:"span",a:{"class":"bad"},f:["Beaker Empty"]}],r:"adata.beakerContents"}],n:50,r:"data.isBeakerLoaded",p:[17,5,684]},{t:4,n:51,f:[{p:[26,7,1042],t:7,e:"span",a:{"class":"average"},f:["No Beaker"]}],r:"data.isBeakerLoaded"}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],35:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};!function(t){t.exports={computed:{cellTemperatureState:function(){var t;return t=this.get("data.cellTemperature"),225>t?"good":273.15>t?"average":"bad"},occupantStatState:function(){var t;return t=this.get("data.occupant.stat"),0===t?"good":1===t?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[16,1,414],t:7,e:"n-display",a:{title:"Occupant"},f:[{p:[17,3,446],t:7,e:"n-section",a:{label:"Occupant"},f:[{p:[18,3,478],t:7,e:"span",f:[{t:2,x:{r:["data.occupant.name"],s:'_0?_0:"No Occupant"'},p:[18,9,484]}]}]}," ",{t:4,f:[{p:[21,5,600],t:7,e:"n-section",a:{label:"State"},f:[{p:[22,7,633],t:7,e:"span",a:{"class":[{t:2,r:"occupantStatState",p:[22,20,646]}]},f:[{t:2,x:{r:["data.occupant.stat"],s:'_0==0?"Conscious":_0==1?"Unconcious":"Dead"'},p:[22,43,669]}]}]}," ",{p:[24,4,789],t:7,e:"n-section",a:{label:"Temperature"},f:[{p:[25,6,827],t:7,e:"span",f:[{t:2,x:{r:["adata.occupant.bodyTemperature"],s:"Math.round(_0)"},p:[25,12,833]}," K"]}]}," ",{p:[27,5,911],t:7,e:"n-section",a:{label:"Health"},f:[{p:[28,7,945],t:7,e:"n-bar",a:{min:[{t:2,r:"data.occupant.minHealth",p:[28,19,957]}],max:[{t:2,r:"data.occupant.maxHealth",p:[28,53,991]}],value:[{t:2,r:"data.occupant.health",p:[28,89,1027]}],state:[{t:2,x:{r:["data.occupant.health"],s:'_0>=0?"good":"average"'},p:[29,16,1069]}]},f:[{t:2,x:{r:["adata.occupant.health"],s:"Math.round(_0)"},p:[29,68,1121]}]}]}," ",{t:4,f:[{p:[32,7,1356],t:7,e:"n-section",a:{label:[{t:2,r:"label",p:[32,25,1374]}]},f:[{p:[33,9,1395],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.occupant.maxHealth",p:[33,29,1415]}],value:[{t:2,rx:{r:"data.occupant",m:[{t:30,n:"type"}]},p:[33,65,1451]}],state:"bad"},f:[{t:2,x:{r:["type","adata.occupant"],s:"Math.round(_1[_0])"},p:[33,102,1488]}]}]}],n:52,x:{r:[],s:'[{label:"Brute",type:"bruteLoss"},{label:"Respiratory",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Burn",type:"fireLoss"}]'},p:[31,5,1190]}],n:50,r:"data.hasOccupant",p:[20,3,570]}]}," ",{p:[38,1,1594],t:7,e:"n-display",a:{title:"Cell"},f:[{p:[39,3,1622],t:7,e:"n-section",a:{label:"Power"},f:[{p:[40,5,1653],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isOperating"],s:'_0?"power-off":"close"'},p:[40,21,1669]}],style:[{t:2,x:{r:["data.isOperating"],s:'_0?"selected":null'},p:[41,14,1729]}],state:[{t:2,x:{r:["data.isOpen"],s:'_0?"disabled":null'},p:[42,14,1785]}],action:"power"},f:[{t:2,x:{r:["data.isOperating"],s:'_0?"On":"Off"'},p:[43,22,1844]}]}]}," ",{p:[45,3,1910],t:7,e:"n-section",a:{label:"Temperature"},f:[{p:[46,3,1945],t:7,e:"span",a:{"class":[{t:2,r:"cellTemperatureState",p:[46,16,1958]}]},f:[{t:2,x:{r:["adata.cellTemperature"],s:"Math.round(_0)"},p:[46,42,1984]}," K"]}]}," ",{p:[48,2,2048],t:7,e:"n-section",a:{label:"Door"},f:[{p:[49,5,2078],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.isOpen"],s:'_0?"unlock":"lock"'},p:[49,21,2094]}],action:"door"},f:[{t:2,x:{r:["data.isOpen"],s:'_0?"Open":"Closed"'},p:[49,72,2145]}]}," ",{p:[50,5,2197],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.autoEject"],s:'_0?"sign-out":"sign-in"'},p:[50,21,2213]}],action:"autoeject"},f:[{t:2,x:{r:["data.autoEject"],s:'_0?"Auto":"Manual"'},p:[50,85,2277]}]}]}]}," ",{p:{button:[{p:[55,5,2419],t:7,e:"n-button",a:{icon:"eject",state:[{t:2,x:{r:["data.isBeakerLoaded"],s:'_0?null:"disabled"'},p:[55,35,2449]}],action:"ejectbeaker"},f:["Eject"]}]},t:7,e:"n-display",a:{title:"Beaker",button:0},f:[" ",{p:[57,3,2551],t:7,e:"n-section",a:{label:"Contents"},f:[{t:4,f:[{t:4,f:[{p:[60,9,2660],t:7,e:"span",a:{"class":"highlight"},t0:"fade",f:[{t:2,x:{r:["volume"],s:"Math.fixed(_0,2)"},p:[60,52,2703]}," units of ",{t:2,r:"name",p:[60,87,2738]}]},{p:[60,102,2753],t:7,e:"br"}],n:52,r:"adata.beakerContents",p:[59,7,2620]},{t:4,n:51,f:[{p:[62,9,2784],t:7,e:"span",a:{"class":"bad"},f:["Beaker Empty"]}],r:"adata.beakerContents"}],n:50,r:"data.isBeakerLoaded",p:[58,5,2585]},{t:4,n:51,f:[{p:[65,7,2860],t:7,e:"span",a:{"class":"average"},f:["No Beaker"]}],r:"data.isBeakerLoaded"}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],36:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-notice",f:[{p:[2,3,14],t:7,e:"span",f:["The requested interface (",{t:2,r:"config.interface",p:[2,34,45]},") was not found. Does it exist?"]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],37:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};!function(t){t.exports={computed:{capacityPercentState:function(){var t;return t=this.get("data.capacityPercent"),t>50?"good":t>15?"average":"bad"},inputState:function(){var t,e;return t=this.get("data.capacityPercent"),e=this.get("data.inputting"),t>=100?"good":e?"average":"bad"},outputState:function(){var t,e;return t=this.get("data.charge"),e=this.get("data.outputting"),e?"good":t>0?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[23,1,624],t:7,e:"n-display",a:{title:"Storage"},f:[{p:[24,3,655],t:7,e:"n-section",a:{label:"Stored Energy"},f:[{p:[25,5,694],t:7,e:"n-bar",a:{min:"0",max:"100",value:[{t:2,r:"data.capacityPercent",p:[25,37,726]}],state:[{t:2,r:"capacityPercentState",p:[25,70,759]}]},f:[{t:2,x:{r:["adata.capacityPercent"],s:"Math.fixed(_0)"},p:[25,96,785]},"%"]}]}]}," ",{p:[28,1,863],t:7,e:"n-display",a:{title:"Input"},f:[{p:[29,3,892],t:7,e:"n-section",a:{label:"Charge Mode"},f:[{p:[30,5,929],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.inputAttempt"],s:'_0?"refresh":"close"'},p:[30,21,945]}],style:[{t:2,x:{r:["data.inputAttempt"],s:'_0?"selected":null'},p:[30,73,997]}],action:"tryinput"},f:[{t:2,x:{r:["data.inputAttempt"],s:'_0?"Auto":"Off"'},p:[31,25,1065]}]},"   [",{p:[33,6,1133],t:7,e:"span",a:{"class":[{t:2,r:"inputState",p:[33,19,1146]}]},f:[{t:2,x:{r:["data.capacityPercent","data.inputting"],s:'_0>=100?"Fully Charged":_1?"Charging":"Not Charging"'},p:[33,35,1162]}]},"]"]}," ",{p:[35,3,1285],t:7,e:"n-section",a:{label:"Target Input"},f:[{p:[36,5,1323],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.inputLevelMax",p:[36,25,1343]}],value:[{t:2,r:"data.inputLevel",p:[36,56,1374]}]},f:[{t:2,x:{r:["adata.inputLevel"],s:"Math.round(_0)"},p:[36,77,1395]},"W"]}]}," ",{p:[38,3,1455],t:7,e:"n-section",a:{label:"Adjust Input"},f:[{p:[39,5,1493],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.inputLevel"],s:'_0==0?"disabled":null'},p:[39,43,1531]}],action:"input",params:'{"input": "min"}'}}," ",{p:[40,5,1625],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.inputLevel"],s:'_0==0?"disabled":null'},p:[40,38,1658]}],action:"input",params:'{"input": "minus"}'}}," ",{p:[41,5,1754],t:7,e:"n-button",a:{icon:"pencil",action:"input",params:'{"input": "custom"}'},f:["Set"]}," ",{p:[42,5,1842],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.inputLevel","data.inputLevelMax"],s:'_0==_1?"disabled":null'},p:[42,37,1874]}],action:"input",params:'{"input": "plus"}'}}," ",{p:[43,5,1986],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.inputLevel","data.inputLevelMax"],s:'_0==_1?"disabled":null'},p:[43,42,2023]}],action:"input",params:'{"input": "max"}'}}]}," ",{p:[45,3,2148],t:7,e:"n-section",a:{label:"Available"},f:[{p:[46,3,2181],t:7,e:"span",f:[{t:2,x:{r:["adata.inputAvailable"],s:"Math.round(_0)"},p:[46,9,2187]},"W"]}]}]}," ",{p:[49,1,2262],t:7,e:"n-display",a:{title:"Output"},f:[{p:[50,3,2292],t:7,e:"n-section",a:{label:"Output Mode"},f:[{p:[51,5,2329],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.outputAttempt"],s:'_0?"power-off":"close"'},p:[51,21,2345]}],style:[{t:2,x:{r:["data.outputAttempt"],s:'_0?"selected":null'},p:[51,76,2400]}],action:"tryoutput"},f:[{t:2,x:{r:["data.outputAttempt"],s:'_0?"On":"Off"'},p:[52,26,2470]}]},"   [",{p:[54,6,2537],t:7,e:"span",a:{"class":[{t:2,r:"outputState",p:[54,19,2550]}]},f:[{t:2,x:{r:["data.outputting","data.charge"],s:'_0?"Sending":_1>0?"Not Sending":"No Charge"'},p:[54,36,2567]}]},"]"]}," ",{p:[56,3,2673],t:7,e:"n-section",a:{label:"Target Output"},f:[{p:[57,5,2712],t:7,e:"n-bar",a:{min:"0",max:[{t:2,r:"data.outputLevelMax",p:[57,25,2732]}],value:[{t:2,r:"data.outputLevel",p:[57,57,2764]}]},f:[{t:2,x:{r:["adata.outputLevel"],s:"Math.round(_0)"},p:[57,79,2786]},"W"]}]}," ",{p:[59,3,2847],t:7,e:"n-section",a:{label:"Adjust Output"},f:[{p:[60,5,2886],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.outputLevel"],s:'_0==0?"disabled":null'},p:[60,43,2924]}],action:"output",params:'{"output": "min"}'}}," ",{p:[61,5,3021],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.outputLevel"],s:'_0==0?"disabled":null'},p:[61,38,3054]}],action:"output",params:'{"output": "minus"}'}}," ",{p:[62,5,3153],t:7,e:"n-button",a:{icon:"pencil",action:"output",params:'{"output": "custom"}'},f:["Set"]}," ",{p:[63,5,3243],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.outputLevel","data.outputLevelMax"],s:'_0==_1?"disabled":null'},p:[63,37,3275]}],action:"output",params:'{"output": "plus"}'}}," ",{p:[64,5,3391],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.outputLevel","data.outputLevelMax"],s:'_0==_1?"disabled":null'},p:[64,42,3428]}],action:"output",params:'{"output": "max"}'}}]}," ",{p:[66,3,3557],t:7,e:"n-section",a:{label:"Outputting"},f:[{p:[67,3,3591],t:7,e:"span",f:[{t:2,x:{r:["adata.outputUsed"],s:"Math.round(_0)"},p:[67,9,3597]},"W"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],38:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};i.exports.template={v:3,t:[{p:[1,1,0],t:7,e:"n-display",a:{title:"Status"},f:[{p:[2,3,30],t:7,e:"n-section",a:{label:"Generated Power"},f:[{t:2,x:{r:["adata.generated"],s:"Math.round(_0)"},p:[3,5,71]},"W"]}," ",{p:[5,3,123],t:7,e:"n-section",a:{label:"Orientation"},f:[{p:[6,5,160],t:7,e:"span",f:[{t:2,x:{r:["adata.angle"],s:"Math.round(_0)"},p:[6,11,166]},"° (",{t:2,r:"data.direction",p:[6,45,200]},")"]}]}," ",{p:[8,3,246],t:7,e:"n-section",a:{label:"Adjust Angle"},f:[{p:[9,5,284],t:7,e:"n-button",a:{icon:"step-backward",action:"control",params:'{"cdir": -15}'},f:["15°"]}," ",{p:[10,5,379],t:7,e:"n-button",a:{icon:"backward",action:"control",params:'{"cdir": -5}'},f:["5°"]}," ",{p:[11,5,467],t:7,e:"n-button",a:{icon:"forward",action:"control",params:'{"cdir": 5}'},f:["5°"]}," ",{p:[12,5,553],t:7,e:"n-button",a:{icon:"step-forward",action:"control",params:'{"cdir": 15}'},f:["15°"]}]}]}," ",{p:[15,1,671],t:7,e:"n-display",a:{title:"Tracking"},f:[{p:[16,3,703],t:7,e:"n-section",a:{label:"Tracker Mode"},f:[{p:[17,5,741],t:7,e:"n-button",a:{icon:"close",state:[{t:2,x:{r:["data.tracking_state"],s:'_0==0?"selected":null'},p:[17,35,771]}],action:"tracking",params:'{"mode": 0}'},f:["Off"]}," ",{p:[19,5,887],t:7,e:"n-button",a:{icon:"clock-o",state:[{t:2,x:{r:["data.tracking_state"],s:'_0==1?"selected":null'},p:[19,37,919]}],action:"tracking",params:'{"mode": 1}'},f:["Timed"]}," ",{p:[21,5,1037],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["data.connected_tracker","data.tracking_state"],s:'_0?_1==2?"selected":null:"disabled"'},p:[21,37,1069]}],action:"tracking",params:'{"mode": 2}'},f:["Auto"]}]}," ",{p:[24,3,1237],t:7,e:"n-section",a:{label:"Tracking Rate"},f:[{p:[25,3,1274],t:7,e:"span",f:[{t:2,x:{r:["adata.tracking_rate"],s:"Math.round(_0)"},p:[25,9,1280]},"°/h (",{t:2,r:"data.rotating_way",p:[25,53,1324]},")"]}]}," ",{p:[27,3,1372],t:7,e:"n-section",a:{label:"Adjust Rate"},f:[{p:[28,5,1409],t:7,e:"n-button",a:{icon:"fast-backward",action:"control",params:'{"tdir": -180}'},f:["180°"]}," ",{p:[29,5,1506],t:7,e:"n-button",a:{icon:"step-backward",action:"control",params:'{"tdir": -30}'},f:["30°"]}," ",{p:[30,5,1601],t:7,e:"n-button",a:{icon:"backward",action:"control",params:'{"tdir": -5}'},f:["5°"]}," ",{p:[31,5,1689],t:7,e:"n-button",a:{icon:"forward",action:"control",params:'{"tdir": 5}'},f:["5°"]}," ",{p:[32,5,1775],t:7,e:"n-button",a:{icon:"step-forward",action:"control",params:'{"tdir": 30}'},f:["30°"]}," ",{p:[33,5,1868],t:7,e:"n-button",a:{icon:"fast-forward",action:"control",params:'{"tdir": 180}'},f:["180°"]}]}]}," ",{p:{button:[{p:[38,5,2051],t:7,e:"n-button",a:{icon:"refresh",action:"refresh"},f:["Refresh"]}]},t:7,e:"n-display",a:{title:"Devices",button:0},f:[" ",{p:[40,2,2130],t:7,e:"n-section",a:{label:"Solar Tracker"},f:[{p:[41,5,2169],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.connected_tracker"],s:'_0?"good":"bad"'},p:[41,18,2182]}]},f:[{t:2,x:{r:["data.connected_tracker"],s:'_0?"":"Not "'},p:[41,63,2227]},"Found"]}]}," ",{p:[43,2,2297],t:7,e:"n-section",a:{label:"Solar Panels"},f:[{p:[44,3,2333],t:7,e:"span",a:{"class":[{t:2,x:{r:["data.connected_panels"],s:'_0?"good":"bad"'},p:[44,16,2346]}]},f:[{t:2,x:{r:["adata.connected_panels"],s:"Math.round(_0)"},p:[44,60,2390]}," Panels Connected"]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],39:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};!function(e){e.exports={data:{text:t("../text")}}}(i),i.exports.template={v:3,t:[" ",{p:{button:[{t:4,f:[{p:[10,7,193],t:7,e:"n-button",a:{icon:"eject",action:"eject"},f:["Eject"]}],n:50,r:"data.open",p:[9,5,168]}]},t:7,e:"n-display",a:{title:"Power",button:0},f:[" ",{p:[13,3,280],t:7,e:"n-section",a:{label:"Power"},f:[{p:[14,5,311],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.on"],s:'_0?"power-off":"close"'},p:[14,21,327]}],style:[{t:2,x:{r:["data.on"],s:'_0?"selected":null'},p:[15,14,378]}],action:"power"},f:[{t:2,x:{r:["data.on"],s:'_0?"On":"Off"'},p:[16,22,433]}]}]}," ",{p:[18,3,490],t:7,e:"n-section",a:{label:"Cell"},f:[{t:4,f:[{p:[20,7,553],t:7,e:"n-bar",a:{min:"0",max:"100",value:[{t:2,r:"data.powerLevel",p:[20,39,585]}]},f:[{t:2,x:{r:["adata.powerLevel"],s:"Math.fixed(_0)"},p:[20,60,606]},"%"]}],n:50,r:"data.hasPowercell",p:[19,5,520]},{t:4,n:51,f:[{p:[22,4,664],t:7,e:"span",a:{"class":"bad"},f:["No Cell"]}],r:"data.hasPowercell"}]}]}," ",{p:[26,1,739],t:7,e:"n-display",a:{title:"Thermostat"},f:[{p:[27,3,773],t:7,e:"n-section",a:{label:"Current Temperature"},f:[{p:[28,3,816],t:7,e:"span",f:[{t:2,x:{r:["adata.currentTemp"],s:"Math.round(_0)"},p:[28,9,822]},"°C"]}]}," ",{p:[30,2,886],t:7,e:"n-section",a:{label:"Target Temperature"},f:[{p:[31,3,928],t:7,e:"span",f:[{t:2,x:{r:["adata.targetTemp"],s:"Math.round(_0)"},p:[31,9,934]},"°C"]}]}," ",{t:4,f:[{p:[34,2,1018],t:7,e:"n-section",a:{label:"Adjust Target"},f:[{p:[35,7,1059],t:7,e:"n-button",a:{icon:"fast-backward",state:[{t:2,x:{r:["data.targetTemp","data.minTemp"],s:'_0>_1?null:"disabled"'},p:[35,45,1097]}],action:"target",params:'{"target": -20}'}}," ",{p:[36,7,1203],t:7,e:"n-button",a:{icon:"backward",state:[{t:2,x:{r:["data.targetTemp","data.minTemp"],s:'_0>_1?null:"disabled"'},p:[36,40,1236]}],action:"target",params:'{"target": -5}'}}," ",{p:[37,7,1341],t:7,e:"n-button",a:{icon:"pencil",action:"target",params:'{"target": "custom"}'},f:["Set"]}," ",{p:[38,7,1433],t:7,e:"n-button",a:{icon:"forward",state:[{t:2,x:{r:["data.targetTemp","data.maxTemp"],s:'_0<_1?null:"disabled"'},p:[38,39,1465]}],action:"target",params:'{"target": 5}'}}," ",{p:[39,7,1569],t:7,e:"n-button",a:{icon:"fast-forward",state:[{t:2,x:{r:["data.targetTemp","data.maxTemp"],s:'_0<_1?null:"disabled"'},p:[39,44,1606]}],action:"target",params:'{"target": 20}'}}]}],n:50,r:"data.open",p:[33,3,998]}," ",{p:[42,3,1734],t:7,e:"n-section",a:{label:"Mode"},f:[{t:4,f:[{p:[44,7,1787],t:7,e:"n-button",a:{icon:"long-arrow-up",state:[{t:2,x:{r:["data.mode"],s:'_0=="heat"?"selected":null'},p:[44,45,1825]}],action:"mode",params:'{"mode": "heat"}'},f:["Heat"]}," ",{p:[45,7,1933],t:7,e:"n-button",a:{icon:"long-arrow-down",state:[{t:2,x:{r:["data.mode"],s:'_0=="cool"?"selected":null'},p:[45,47,1973]}],action:"mode",params:'{"mode": "cool"}'},f:["Cool"]}," ",{p:[46,7,2081],t:7,e:"n-button",a:{icon:"arrows-v",state:[{t:2,x:{r:["data.mode"],s:'_0=="auto"?"selected":null'},p:[46,40,2114]}],action:"mode",params:'{"mode": "auto"}'},f:["Auto"]}],n:50,r:"data.open",p:[43,3,1762]},{t:4,n:51,f:[{p:[48,4,2231],t:7,e:"span",f:[{t:2,x:{r:["text","data.mode"],s:"_0.titleCase(_1)"},p:[48,10,2237]}]}],r:"data.open"}]}]}]},e.exports=r.extend(i.exports)},{"../text":43,"ractive/ractive.runtime":7}],40:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};!function(t){t.exports={data:{tankPressureState:function(){var t;return t=this.get("data.tankPressureState"),t>=200?"good":t>=100?"average":"bad"}}}}(i),i.exports.template={v:3,t:[" ",{p:[11,1,255],t:7,e:"n-notice",f:[{p:[12,3,269],t:7,e:"span",f:["The regulator ",{t:2,x:{r:["data.hasHoldingTank"],s:'_0?"is":"is not"'},p:[12,23,289]}," connected to a mask."]}]}," ",{p:[14,1,373],t:7,e:"n-display",f:[{p:[15,3,388],t:7,e:"n-section",a:{label:"Tank Pressure"},f:[{p:[16,7,429],t:7,e:"n-bar",a:{min:"0",max:"1013",value:[{t:2,r:"data.tankPressure",p:[16,40,462]}],state:[{t:2,r:"tankPressureState",p:[17,16,501]}]},f:[{t:2,x:{r:["adata.tankPressure"],s:"Math.round(_0)"},p:[17,39,524]}," kPa"]}]}," ",{p:[19,3,590],t:7,e:"n-section",a:{label:"Release Pressure"},f:[{p:[20,5,632],t:7,e:"n-bar",a:{min:[{t:2,r:"data.minReleasePressure",p:[20,17,644]}],max:[{t:2,r:"data.maxReleasePressure",p:[20,51,678]}],value:[{t:2,r:"data.releasePressure",p:[21,14,721]}]},f:[{t:2,x:{r:["adata.releasePressure"],s:"Math.round(_0)"},p:[21,40,747]}," kPa"]}]}," ",{p:[23,3,816],t:7,e:"n-section",a:{label:"Pressure Regulator"},f:[{p:[24,5,860],t:7,e:"n-button",a:{icon:"refresh",state:[{t:2,x:{r:["data.releasePressure","data.defaultReleasePressure"],s:'_0!=_1?null:"disabled"'},p:[24,37,892]}],action:"pressure",params:'{"pressure": "reset"}'},f:["Reset"]}," ",{p:[26,5,1047],t:7,e:"n-button",a:{icon:"minus",state:[{t:2,x:{r:["data.releasePressure","data.minReleasePressure"],s:'_0>_1?null:"disabled"'},p:[26,35,1077]}],action:"pressure",params:'{"pressure": "min"}'},f:["Min"]}," ",{p:[28,5,1223],t:7,e:"n-button",a:{icon:"pencil",action:"pressure",params:'{"pressure": "custom"}'},f:["Set"]}," ",{p:[29,5,1317],t:7,e:"n-button",a:{icon:"plus",state:[{t:2,x:{r:["data.releasePressure","data.maxReleasePressure"],s:'_0<_1?null:"disabled"'},p:[29,34,1346]}],action:"pressure",params:'{"pressure": "max"}'},f:["Max"]}]}," ",{p:[32,3,1506],t:7,e:"n-section",a:{label:"Valve"},f:[{p:[33,5,1537],t:7,e:"n-button",a:{icon:[{t:2,x:{r:["data.valveOpen"],s:'_0?"unlock":"lock"'},p:[33,21,1553]}],state:[{t:2,x:{r:["data.maskConnected"],s:'_0?null:"disabled"'},p:[33,68,1600]}],action:"valve"},f:[{t:2,x:{r:["data.valveOpen"],s:'_0?"Open":"Closed"'},p:[34,22,1666]}]}]}]}]},e.exports=r.extend(i.exports)},{"ractive/ractive.runtime":7}],41:[function(t,e,n){var r,i,a;t("ie8/build/ie8.max"),t("dom4/build/dom4.max"),t("es5-shim"),t("html5shiv"),t("./math"),r=t("ractive/ractive.runtime"),r.DEBUG=/minified/.test(function(t){}),i=t("webfontloader"),i.load({custom:{families:["FontAwesome"],urls:["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"]}}),a=t("./tgui"),window.tgui=new a({el:"#container",data:function(){var t;return t=JSON.parse(document.getElementById("data").textContent),(null==t||null==t.data||null==t.config)&&alert("Initial data did not load correctly."),t.adata=t.data,t},onrender:function(){return this.observe("config.style",function(t,e,n){return null!=e&&document.body.classList.remove(e),null!=t?document.body.classList.add(t):void 0})}})},{"./math":42,"./tgui":44,"dom4/build/dom4.max":1,"es5-shim":2,html5shiv:3,"ie8/build/ie8.max":4,"ractive/ractive.runtime":7,webfontloader:8}],42:[function(t,e,n){Math.clamp=function(t,e,n){return Math.max(e,Math.min(t,n))},Math.fixed=function(t,e){return null==e&&(e=1),+(Math.round(t+"e"+e)+"e-"+e)}},{}],43:[function(t,e,n){e.exports={upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1).toLowerCase()},titleCase:function(t){return t.replace(/\w\S*/g,this.upperCaseFirst)}}},{}],44:[function(t,e,n){var r=t("ractive/ractive.runtime"),i={exports:{}};!function(e){e.exports={components:{"n-bar":t("./components/bar"),"n-button":t("./components/button"),"n-display":t("./components/display"),"n-notice":t("./components/notice"),"n-section":t("./components/section"),"n-subdisplay":t("./components/subdisplay")},events:{enter:t("ractive-events-keys").enter,space:t("ractive-events-keys").space},transitions:{fade:t("ractive-transitions-fade")},onconfig:function(){var e,n;return n=this.get("config.interface"),e={air_alarm:t("./interfaces/air_alarm.ract"),airlock_electronics:t("./interfaces/airlock_electronics.ract"),apc:t("./interfaces/apc.ract"),atmos_filter:t("./interfaces/atmos_filter.ract"),atmos_mixer:t("./interfaces/atmos_mixer.ract"),atmos_pump:t("./interfaces/atmos_pump.ract"),canister:t("./interfaces/canister.ract"),chem_dispenser:t("./interfaces/chem_dispenser.ract"),chem_heater:t("./interfaces/chem_heater.ract"),cryo:t("./interfaces/cryo.ract"),error:t("./interfaces/error.ract"),smes:t("./interfaces/smes.ract"),solar_control:t("./interfaces/solar_control.ract"),space_heater:t("./interfaces/space_heater.ract"),tanks:t("./interfaces/tanks.ract")},null!=e[n]?this.components["interface"]=e[n]:null==this.components["interface"]?this.components["interface"]=t("./interfaces/error"):void 0},onrender:function(){return this.observe("config.style",function(t,e,n){return null!=e&&this.el.classList.remove(e(e)),null!=t?this.el.classList.add(t(t)):void 0})}}}(i),i.exports.template={v:3,t:[" "," "," ",{p:[31,1,1244],t:7,e:"titlebar",f:[{t:3,r:"config.title",p:[31,11,1254]}]}," ",{p:[32,1,1285],t:7,e:"main",f:[{p:[33,3,1295],t:7,e:"interface"}]}," ",{p:[35,1,1319],t:7,e:"resize"}]},i.exports.components=i.exports.components||{};var a={titlebar:t("./components/titlebar.ract"),resize:t("./components/resize.ract")};for(var o in a)a.hasOwnProperty(o)&&(i.exports.components[o]=a[o]);e.exports=r.extend(i.exports)},{"./components/bar":10,"./components/button":11,"./components/display":12,"./components/notice":13,"./components/resize.ract":14,"./components/section":15,"./components/subdisplay":16,"./components/titlebar.ract":17,"./interfaces/air_alarm.ract":19,"./interfaces/airlock_electronics.ract":27,"./interfaces/apc.ract":28,"./interfaces/atmos_filter.ract":29,"./interfaces/atmos_mixer.ract":30,"./interfaces/atmos_pump.ract":31,"./interfaces/canister.ract":32,"./interfaces/chem_dispenser.ract":33,"./interfaces/chem_heater.ract":34,"./interfaces/cryo.ract":35,"./interfaces/error":36,"./interfaces/error.ract":36,"./interfaces/smes.ract":37,"./interfaces/solar_control.ract":38,"./interfaces/space_heater.ract":39,"./interfaces/tanks.ract":40,"ractive-events-keys":5,"ractive-transitions-fade":6,"ractive/ractive.runtime":7}]},{},[41]); \ No newline at end of file diff --git a/nano/coffeelint.json b/tgui/coffeelint.json similarity index 100% rename from nano/coffeelint.json rename to tgui/coffeelint.json diff --git a/nano/colors.json b/tgui/colors.json similarity index 100% rename from nano/colors.json rename to tgui/colors.json diff --git a/nano/gulp/compilers/coffeescript.coffee b/tgui/gulp/compilers/coffeescript.coffee similarity index 100% rename from nano/gulp/compilers/coffeescript.coffee rename to tgui/gulp/compilers/coffeescript.coffee diff --git a/nano/gulp/compilers/stylus.coffee b/tgui/gulp/compilers/stylus.coffee similarity index 100% rename from nano/gulp/compilers/stylus.coffee rename to tgui/gulp/compilers/stylus.coffee diff --git a/nano/gulp/config/flags.coffee b/tgui/gulp/config/flags.coffee similarity index 100% rename from nano/gulp/config/flags.coffee rename to tgui/gulp/config/flags.coffee diff --git a/nano/gulp/config/index.coffee b/tgui/gulp/config/index.coffee similarity index 100% rename from nano/gulp/config/index.coffee rename to tgui/gulp/config/index.coffee diff --git a/nano/gulp/config/plugins.coffee b/tgui/gulp/config/plugins.coffee similarity index 91% rename from nano/gulp/config/plugins.coffee rename to tgui/gulp/config/plugins.coffee index 8d4d0da34bd..e04b85f13fc 100644 --- a/nano/gulp/config/plugins.coffee +++ b/tgui/gulp/config/plugins.coffee @@ -4,7 +4,6 @@ module.exports = coffeeify: require "coffeeify" componentify: require "ractive-componentify" globify: require "require-globify" - strictify: require "strictify" gulp: require("gulp-load-plugins")({replaceString: /^gulp(-|\.)|-/g}) postcss: autoprefixer: require "autoprefixer" diff --git a/nano/gulp/index.coffee b/tgui/gulp/index.coffee similarity index 100% rename from nano/gulp/index.coffee rename to tgui/gulp/index.coffee diff --git a/nano/gulp/tasks/build.coffee b/tgui/gulp/tasks/build.coffee similarity index 100% rename from nano/gulp/tasks/build.coffee rename to tgui/gulp/tasks/build.coffee diff --git a/nano/gulp/tasks/clean.coffee b/tgui/gulp/tasks/clean.coffee similarity index 100% rename from nano/gulp/tasks/clean.coffee rename to tgui/gulp/tasks/clean.coffee diff --git a/nano/gulp/tasks/css.coffee b/tgui/gulp/tasks/css.coffee similarity index 100% rename from nano/gulp/tasks/css.coffee rename to tgui/gulp/tasks/css.coffee diff --git a/nano/gulp/tasks/js.coffee b/tgui/gulp/tasks/js.coffee similarity index 94% rename from nano/gulp/tasks/js.coffee rename to tgui/gulp/tasks/js.coffee index 8d1835ba928..5b173135ed8 100644 --- a/nano/gulp/tasks/js.coffee +++ b/tgui/gulp/tasks/js.coffee @@ -22,7 +22,6 @@ bundle = -> .transform b.componentify .transform b.aliasify .transform b.globify - .transform b.strictify .bundle (err, res) -> return next err if err file.contents = res diff --git a/nano/gulp/tasks/reload.coffee b/tgui/gulp/tasks/reload.coffee similarity index 100% rename from nano/gulp/tasks/reload.coffee rename to tgui/gulp/tasks/reload.coffee diff --git a/nano/gulp/tasks/size.coffee b/tgui/gulp/tasks/size.coffee similarity index 100% rename from nano/gulp/tasks/size.coffee rename to tgui/gulp/tasks/size.coffee diff --git a/nano/gulp/tasks/watch.coffee b/tgui/gulp/tasks/watch.coffee similarity index 100% rename from nano/gulp/tasks/watch.coffee rename to tgui/gulp/tasks/watch.coffee diff --git a/nano/images/nanotrasen.svg b/tgui/images/nanotrasen.svg similarity index 100% rename from nano/images/nanotrasen.svg rename to tgui/images/nanotrasen.svg diff --git a/nano/package.json b/tgui/package.json similarity index 97% rename from nano/package.json rename to tgui/package.json index 0a712cb7b04..cf94626727c 100644 --- a/nano/package.json +++ b/tgui/package.json @@ -1,5 +1,5 @@ { - "name": "nanoui", + "name": "tgui", "private": true, "dependencies": { "aliasify": "^1.8.0", @@ -40,7 +40,6 @@ "ractive-transitions-fade": "^0.3.1", "require-globify": "^1.3.0", "rfr": "^1.2.3", - "strictify": "^0.2.0", "stylus": "^0.53.0", "through2": "^2.0.0", "webfontloader": "^1.6.16" diff --git a/nano/paths.json b/tgui/paths.json similarity index 75% rename from nano/paths.json rename to tgui/paths.json index 2b9cb9dc6f0..bf4b5f9c1d6 100644 --- a/nano/paths.json +++ b/tgui/paths.json @@ -3,7 +3,7 @@ "css":{ "dir":"styles/", "main":"main.styl", - "out":"nanoui.css" + "out":"tgui.css" }, "img":{ "dir":"images/", @@ -12,6 +12,6 @@ "js":{ "dir":"scripts/", "main":"main.coffee", - "out":"nanoui.js" + "out":"tgui.js" } } diff --git a/nano/reload.bat b/tgui/reload.bat similarity index 100% rename from nano/reload.bat rename to tgui/reload.bat diff --git a/nano/scripts/byond.coffee b/tgui/scripts/byond.coffee similarity index 88% rename from nano/scripts/byond.coffee rename to tgui/scripts/byond.coffee index 06b8956480d..43a939371b2 100644 --- a/nano/scripts/byond.coffee +++ b/tgui/scripts/byond.coffee @@ -4,7 +4,7 @@ module.exports = href: (params = {}, url = "") -> # Helper to generate a BYOND href given 'params' as an object (with an optional 'url' for eg winset). params = (Object.keys(params).map (key) -> "#{encode(key)}=#{encode(params[key])}").join("&") "byond://#{url}?#{params}" - act: (src, action, params = {}) -> # Helper to make a BYOND ui_act() call on the NanoUI 'src' given an 'action' and optional 'params'. + act: (src, action, params = {}) -> # Helper to make a BYOND ui_act() call on the UI 'src' given an 'action' and optional 'params'. params.src = src params.action = action location.href = @href params diff --git a/nano/scripts/components/bar.ract b/tgui/scripts/components/bar.ract similarity index 100% rename from nano/scripts/components/bar.ract rename to tgui/scripts/components/bar.ract diff --git a/nano/scripts/components/button.ract b/tgui/scripts/components/button.ract similarity index 89% rename from nano/scripts/components/button.ract rename to tgui/scripts/components/button.ract index 65cd09d9e8d..739cf15f743 100644 --- a/nano/scripts/components/button.ract +++ b/tgui/scripts/components/button.ract @@ -8,7 +8,7 @@ component.exports = if @get("enabled") && not @get "state" then true else false enabled: -> - if @get("config.status") is constants.NANO_INTERACTIVE then true + if @get("config.status") is constants.UI_INTERACTIVE then true else false styles: -> enabled = @get "enabled" diff --git a/nano/scripts/components/display.ract b/tgui/scripts/components/display.ract similarity index 100% rename from nano/scripts/components/display.ract rename to tgui/scripts/components/display.ract diff --git a/nano/scripts/components/notice.ract b/tgui/scripts/components/notice.ract similarity index 100% rename from nano/scripts/components/notice.ract rename to tgui/scripts/components/notice.ract diff --git a/nano/scripts/components/resize.ract b/tgui/scripts/components/resize.ract similarity index 100% rename from nano/scripts/components/resize.ract rename to tgui/scripts/components/resize.ract diff --git a/nano/scripts/components/section.ract b/tgui/scripts/components/section.ract similarity index 100% rename from nano/scripts/components/section.ract rename to tgui/scripts/components/section.ract diff --git a/nano/scripts/components/subdisplay.ract b/tgui/scripts/components/subdisplay.ract similarity index 100% rename from nano/scripts/components/subdisplay.ract rename to tgui/scripts/components/subdisplay.ract diff --git a/nano/scripts/components/titlebar.ract b/tgui/scripts/components/titlebar.ract similarity index 81% rename from nano/scripts/components/titlebar.ract rename to tgui/scripts/components/titlebar.ract index f6fef2e70a3..f4cc29dc0fe 100644 --- a/nano/scripts/components/titlebar.ract +++ b/tgui/scripts/components/titlebar.ract @@ -6,9 +6,9 @@ component.exports = visualStatus: -> status = @get "config.status" constants = require "../constants" - if status is constants.NANO_INTERACTIVE then "good" - else if status is constants.NANO_UPDATE then "average" - else if status is constants.NANO_DISABLED then "bad" + if status is constants.UI_INTERACTIVE then "good" + else if status is constants.UI_UPDATE then "average" + else if status is constants.UI_DISABLED then "bad" oninit: -> @observe "config.fancy", (newkey, oldkey, keypath) -> byond.winset @get("config.window"), "titlebar", !!!newkey @@ -27,7 +27,7 @@ component.exports = @on close: -> byond.winset @get("config.window"), "is-visible", "false" - location.href = byond.href {command: "nanoclose #{@get "config.ref"}"}, "winset" + location.href = byond.href {command: "uiclose #{@get "config.ref"}"}, "winset" minimize: -> byond.winset @get("config.window"), "is-minimized", "true" diff --git a/tgui/scripts/constants.coffee b/tgui/scripts/constants.coffee new file mode 100644 index 00000000000..1457071dabe --- /dev/null +++ b/tgui/scripts/constants.coffee @@ -0,0 +1,6 @@ +# Constants used in tgui; these are mirrored from the BYOND code. +module.exports = + UI_INTERACTIVE: 2 + UI_UPDATE: 1 + UI_DISABLED: 0 + UI_CLOSE: -1 diff --git a/nano/scripts/interfaces/air_alarm.ract b/tgui/scripts/interfaces/air_alarm.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm.ract rename to tgui/scripts/interfaces/air_alarm.ract diff --git a/nano/scripts/interfaces/air_alarm/back.ract b/tgui/scripts/interfaces/air_alarm/back.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/back.ract rename to tgui/scripts/interfaces/air_alarm/back.ract diff --git a/nano/scripts/interfaces/air_alarm/controls.ract b/tgui/scripts/interfaces/air_alarm/controls.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/controls.ract rename to tgui/scripts/interfaces/air_alarm/controls.ract diff --git a/nano/scripts/interfaces/air_alarm/modes.ract b/tgui/scripts/interfaces/air_alarm/modes.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/modes.ract rename to tgui/scripts/interfaces/air_alarm/modes.ract diff --git a/nano/scripts/interfaces/air_alarm/scrubbers.ract b/tgui/scripts/interfaces/air_alarm/scrubbers.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/scrubbers.ract rename to tgui/scripts/interfaces/air_alarm/scrubbers.ract diff --git a/nano/scripts/interfaces/air_alarm/status.ract b/tgui/scripts/interfaces/air_alarm/status.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/status.ract rename to tgui/scripts/interfaces/air_alarm/status.ract diff --git a/nano/scripts/interfaces/air_alarm/thresholds.ract b/tgui/scripts/interfaces/air_alarm/thresholds.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/thresholds.ract rename to tgui/scripts/interfaces/air_alarm/thresholds.ract diff --git a/nano/scripts/interfaces/air_alarm/vents.ract b/tgui/scripts/interfaces/air_alarm/vents.ract similarity index 100% rename from nano/scripts/interfaces/air_alarm/vents.ract rename to tgui/scripts/interfaces/air_alarm/vents.ract diff --git a/nano/scripts/interfaces/airlock_electronics.ract b/tgui/scripts/interfaces/airlock_electronics.ract similarity index 100% rename from nano/scripts/interfaces/airlock_electronics.ract rename to tgui/scripts/interfaces/airlock_electronics.ract diff --git a/nano/scripts/interfaces/apc.ract b/tgui/scripts/interfaces/apc.ract similarity index 100% rename from nano/scripts/interfaces/apc.ract rename to tgui/scripts/interfaces/apc.ract diff --git a/nano/scripts/interfaces/atmos_filter.ract b/tgui/scripts/interfaces/atmos_filter.ract similarity index 100% rename from nano/scripts/interfaces/atmos_filter.ract rename to tgui/scripts/interfaces/atmos_filter.ract diff --git a/nano/scripts/interfaces/atmos_mixer.ract b/tgui/scripts/interfaces/atmos_mixer.ract similarity index 100% rename from nano/scripts/interfaces/atmos_mixer.ract rename to tgui/scripts/interfaces/atmos_mixer.ract diff --git a/nano/scripts/interfaces/atmos_pump.ract b/tgui/scripts/interfaces/atmos_pump.ract similarity index 100% rename from nano/scripts/interfaces/atmos_pump.ract rename to tgui/scripts/interfaces/atmos_pump.ract diff --git a/nano/scripts/interfaces/canister.ract b/tgui/scripts/interfaces/canister.ract similarity index 100% rename from nano/scripts/interfaces/canister.ract rename to tgui/scripts/interfaces/canister.ract diff --git a/nano/scripts/interfaces/chem_dispenser.ract b/tgui/scripts/interfaces/chem_dispenser.ract similarity index 100% rename from nano/scripts/interfaces/chem_dispenser.ract rename to tgui/scripts/interfaces/chem_dispenser.ract diff --git a/nano/scripts/interfaces/chem_heater.ract b/tgui/scripts/interfaces/chem_heater.ract similarity index 100% rename from nano/scripts/interfaces/chem_heater.ract rename to tgui/scripts/interfaces/chem_heater.ract diff --git a/nano/scripts/interfaces/cryo.ract b/tgui/scripts/interfaces/cryo.ract similarity index 100% rename from nano/scripts/interfaces/cryo.ract rename to tgui/scripts/interfaces/cryo.ract diff --git a/nano/scripts/interfaces/error.ract b/tgui/scripts/interfaces/error.ract similarity index 100% rename from nano/scripts/interfaces/error.ract rename to tgui/scripts/interfaces/error.ract diff --git a/nano/scripts/interfaces/smes.ract b/tgui/scripts/interfaces/smes.ract similarity index 100% rename from nano/scripts/interfaces/smes.ract rename to tgui/scripts/interfaces/smes.ract diff --git a/nano/scripts/interfaces/solar_control.ract b/tgui/scripts/interfaces/solar_control.ract similarity index 100% rename from nano/scripts/interfaces/solar_control.ract rename to tgui/scripts/interfaces/solar_control.ract diff --git a/nano/scripts/interfaces/space_heater.ract b/tgui/scripts/interfaces/space_heater.ract similarity index 100% rename from nano/scripts/interfaces/space_heater.ract rename to tgui/scripts/interfaces/space_heater.ract diff --git a/nano/scripts/interfaces/tanks.ract b/tgui/scripts/interfaces/tanks.ract similarity index 100% rename from nano/scripts/interfaces/tanks.ract rename to tgui/scripts/interfaces/tanks.ract diff --git a/nano/scripts/main.coffee b/tgui/scripts/main.coffee similarity index 87% rename from nano/scripts/main.coffee rename to tgui/scripts/main.coffee index 42ec02bdc98..9274c34c689 100644 --- a/nano/scripts/main.coffee +++ b/tgui/scripts/main.coffee @@ -16,9 +16,9 @@ WebFont.load families: ["FontAwesome"] urls: ["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"] -NanoUI = require "./nanoui" -# Create the NanoUI; this is just a Ractive component. -window.nanoui = new NanoUI +tgui = require "./tgui" +# Create the UI; this is just a Ractive component. +window.tgui = new tgui el: "#container" data: -> data = JSON.parse document.getElementById("data").textContent # Load initial data from the server. diff --git a/nano/scripts/math.coffee b/tgui/scripts/math.coffee similarity index 100% rename from nano/scripts/math.coffee rename to tgui/scripts/math.coffee diff --git a/nano/scripts/text.coffee b/tgui/scripts/text.coffee similarity index 100% rename from nano/scripts/text.coffee rename to tgui/scripts/text.coffee diff --git a/nano/scripts/nanoui.ract b/tgui/scripts/tgui.ract similarity index 100% rename from nano/scripts/nanoui.ract rename to tgui/scripts/tgui.ract diff --git a/nano/styles/components/bar.styl b/tgui/styles/components/bar.styl similarity index 100% rename from nano/styles/components/bar.styl rename to tgui/styles/components/bar.styl diff --git a/nano/styles/components/button.styl b/tgui/styles/components/button.styl similarity index 100% rename from nano/styles/components/button.styl rename to tgui/styles/components/button.styl diff --git a/nano/styles/components/display.styl b/tgui/styles/components/display.styl similarity index 100% rename from nano/styles/components/display.styl rename to tgui/styles/components/display.styl diff --git a/nano/styles/components/notice.styl b/tgui/styles/components/notice.styl similarity index 100% rename from nano/styles/components/notice.styl rename to tgui/styles/components/notice.styl diff --git a/nano/styles/components/resize.styl b/tgui/styles/components/resize.styl similarity index 100% rename from nano/styles/components/resize.styl rename to tgui/styles/components/resize.styl diff --git a/nano/styles/components/section.styl b/tgui/styles/components/section.styl similarity index 100% rename from nano/styles/components/section.styl rename to tgui/styles/components/section.styl diff --git a/nano/styles/components/subdisplay.styl b/tgui/styles/components/subdisplay.styl similarity index 100% rename from nano/styles/components/subdisplay.styl rename to tgui/styles/components/subdisplay.styl diff --git a/nano/styles/components/titlebar.styl b/tgui/styles/components/titlebar.styl similarity index 100% rename from nano/styles/components/titlebar.styl rename to tgui/styles/components/titlebar.styl diff --git a/nano/styles/config.styl b/tgui/styles/config.styl similarity index 100% rename from nano/styles/config.styl rename to tgui/styles/config.styl diff --git a/nano/styles/core/clearfix.styl b/tgui/styles/core/clearfix.styl similarity index 100% rename from nano/styles/core/clearfix.styl rename to tgui/styles/core/clearfix.styl diff --git a/nano/styles/core/colors.styl b/tgui/styles/core/colors.styl similarity index 100% rename from nano/styles/core/colors.styl rename to tgui/styles/core/colors.styl diff --git a/nano/styles/core/document.styl b/tgui/styles/core/document.styl similarity index 100% rename from nano/styles/core/document.styl rename to tgui/styles/core/document.styl diff --git a/nano/styles/core/header.styl b/tgui/styles/core/header.styl similarity index 100% rename from nano/styles/core/header.styl rename to tgui/styles/core/header.styl diff --git a/nano/styles/core/text.styl b/tgui/styles/core/text.styl similarity index 100% rename from nano/styles/core/text.styl rename to tgui/styles/core/text.styl diff --git a/nano/styles/main.styl b/tgui/styles/main.styl similarity index 100% rename from nano/styles/main.styl rename to tgui/styles/main.styl diff --git a/nano/styles/styles/generic.styl b/tgui/styles/styles/generic.styl similarity index 100% rename from nano/styles/styles/generic.styl rename to tgui/styles/styles/generic.styl diff --git a/nano/styles/styles/nanotrasen.styl b/tgui/styles/styles/nanotrasen.styl similarity index 100% rename from nano/styles/styles/nanotrasen.styl rename to tgui/styles/styles/nanotrasen.styl diff --git a/nano/nanoui.html b/tgui/tgui.html similarity index 61% rename from nano/nanoui.html rename to tgui/tgui.html index d03347c65f1..162a31592b3 100644 --- a/nano/nanoui.html +++ b/tgui/tgui.html @@ -3,24 +3,21 @@ - + - +
@@ -32,6 +29,6 @@ Please enable Javascript and restart the game.
- +